acf_get_combined_field_type_settings_tabs()
Returns an array of tabs for a field type. We combine a list of default tabs with filtered tabs. I.E. Default tabs should be static and should not be changed by the filtered tabs.
Хуки из функции
Возвращает
Массив. Key/value array of the default settings tabs for field type settings.
Использование
acf_get_combined_field_type_settings_tabs();
Список изменений
| С версии 6.1 | Введена. |
Код acf_get_combined_field_type_settings_tabs() acf get combined field type settings tabs ACF 6.4.2
function acf_get_combined_field_type_settings_tabs() {
$default_field_type_settings_tabs = array(
'general' => __( 'General', 'acf' ),
'validation' => __( 'Validation', 'acf' ),
'presentation' => __( 'Presentation', 'acf' ),
'conditional_logic' => __( 'Conditional Logic', 'acf' ),
'advanced' => __( 'Advanced', 'acf' ),
);
$field_type_settings_tabs = (array) apply_filters( 'acf/field_group/additional_field_settings_tabs', array() );
// remove any default tab values from filter tabs.
foreach ( $field_type_settings_tabs as $key => $tab ) {
if ( isset( $default_field_type_settings_tabs[ $key ] ) ) {
unset( $field_type_settings_tabs[ $key ] );
}
}
$combined_field_type_settings_tabs = array_merge( $default_field_type_settings_tabs, $field_type_settings_tabs );
return $combined_field_type_settings_tabs;
}