ACF_Admin_Taxonomy::admin_head
Sets up all functionality for the taxonomy edit page to work.
Метод класса: ACF_Admin_Taxonomy{}
Хуки из метода
Возвращает
null. Ничего (null).
Использование
$ACF_Admin_Taxonomy = new ACF_Admin_Taxonomy(); $ACF_Admin_Taxonomy->admin_head();
Список изменений
| С версии 3.1.8 | Введена. |
Код ACF_Admin_Taxonomy::admin_head() ACF Admin Taxonomy::admin head ACF 6.4.2
public function admin_head() {
// global.
global $post, $acf_taxonomy;
// set global var.
$acf_taxonomy = acf_get_internal_post_type( $post->ID, $this->post_type );
if ( ! empty( $acf_taxonomy['not_registered'] ) ) {
acf_add_admin_notice(
__( 'This taxonomy could not be registered because its key is in use by another taxonomy registered by another plugin or theme.', 'acf' ),
'error'
);
}
// metaboxes.
add_meta_box( 'acf-basic-settings', __( 'Basic Settings', 'acf' ), array( $this, 'mb_basic_settings' ), 'acf-taxonomy', 'normal', 'high' );
add_meta_box( 'acf-advanced-settings', __( 'Advanced Settings', 'acf' ), array( $this, 'mb_advanced_settings' ), 'acf-taxonomy', 'normal', 'high' );
// actions.
add_action( 'post_submitbox_misc_actions', array( $this, 'post_submitbox_misc_actions' ), 10, 0 );
add_action( 'edit_form_after_title', array( $this, 'edit_form_after_title' ), 10, 0 );
// filters.
add_filter( 'screen_settings', array( $this, 'screen_settings' ), 10, 1 );
add_filter( 'get_user_option_screen_layout_acf-taxonomy', array( $this, 'screen_layout' ), 10, 1 );
add_filter( 'get_user_option_metaboxhidden_acf-taxonomy', array( $this, 'force_basic_settings' ), 10, 1 );
add_filter( 'get_user_option_closedpostboxes_acf-taxonomy', array( $this, 'force_basic_settings' ), 10, 1 );
add_filter( 'get_user_option_closedpostboxes_acf-taxonomy', array( $this, 'force_advanced_settings' ), 10, 1 );
// 3rd party hook.
do_action( 'acf/taxonomy/admin_head' );
}