ACF_Admin_UI_Options_Page::admin_headpublicACF 3.1.8

Sets up all functionality for the post type edit page to work.

Метод класса: ACF_Admin_UI_Options_Page{}

Хуки из метода

Возвращает

null. Ничего (null).

Использование

$ACF_Admin_UI_Options_Page = new ACF_Admin_UI_Options_Page();
$ACF_Admin_UI_Options_Page->admin_head();

Список изменений

С версии 3.1.8 Введена.

Код ACF_Admin_UI_Options_Page::admin_head() ACF 6.4.2

public function admin_head() {
	// global.
	global $post, $acf_ui_options_page;

	// set global var.
	$acf_ui_options_page = acf_get_internal_post_type( $post->ID, $this->post_type );

	// metaboxes.
	add_meta_box( 'acf-basic-settings', __( 'Basic Settings', 'acf' ), array( $this, 'mb_basic_settings' ), 'acf-ui-options-page', 'normal', 'high' );
	add_meta_box( 'acf-advanced-settings', __( 'Advanced Settings', 'acf' ), array( $this, 'mb_advanced_settings' ), 'acf-ui-options-page', '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-ui-options-page', array( $this, 'screen_layout' ), 10, 1 );
	add_filter( 'get_user_option_metaboxhidden_acf-ui-options-page', array( $this, 'force_basic_settings' ), 10, 1 );
	add_filter( 'get_user_option_closedpostboxes_acf-ui-options-page', array( $this, 'force_basic_settings' ), 10, 1 );
	add_filter( 'get_user_option_closedpostboxes_acf-ui-options-page', array( $this, 'force_advanced_settings' ), 10, 1 );

	// 3rd party hook.
	do_action( 'acf/ui_options_page/admin_head' );
}