acf_get_combined_post_type_settings_tabs()
Returns an array of tabs for the post type advanced settings.
Хуки из функции
Возвращает
Массив
.
Использование
acf_get_combined_post_type_settings_tabs();
Список изменений
С версии 6.1 | Введена. |
Код acf_get_combined_post_type_settings_tabs() acf get combined post type settings tabs ACF 6.4.2
function acf_get_combined_post_type_settings_tabs() { $default_post_type_tabs = array( 'general' => __( 'General', 'acf' ), 'labels' => __( 'Labels', 'acf' ), 'visibility' => __( 'Visibility', 'acf' ), 'urls' => __( 'URLs', 'acf' ), 'permissions' => __( 'Permissions', 'acf' ), 'rest_api' => __( 'REST API', 'acf' ), ); $additional_post_type_tabs = (array) apply_filters( 'acf/post_type/additional_settings_tabs', array() ); // Remove any default tab values from the filtered tabs. foreach ( $additional_post_type_tabs as $key => $tab ) { if ( isset( $default_post_type_tabs[ $key ] ) ) { unset( $additional_post_type_tabs[ $key ] ); } } return array_merge( $default_post_type_tabs, $additional_post_type_tabs ); }