acf_admin_field_group::admin_head()publicACF 3.1.8

This function will setup all functionality for the field group edit page to work

{} Это метод класса: acf_admin_field_group{}

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

Возвращает

null. Ничего.

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

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

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

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

Код acf_admin_field_group::admin_head() ACF 6.0.4

public function admin_head() {

	// global.
	global $post, $field_group;

	// set global var.
	$field_group = acf_get_field_group( $post->ID );

	// metaboxes.
	add_meta_box( 'acf-field-group-fields', __( 'Fields', 'acf' ), array( $this, 'mb_fields' ), 'acf-field-group', 'normal', 'high' );
	if ( ! defined( 'ACF_PRO' ) || ! ACF_PRO ) {
		add_meta_box( 'acf-field-group-pro-features', 'ACF PRO', array( $this, 'mb_pro_features' ), 'acf-field-group', 'normal', 'high' );
	}
	add_meta_box( 'acf-field-group-options', __( 'Settings', 'acf' ), array( $this, 'mb_options' ), 'acf-field-group', '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-field-group', array( $this, 'screen_layout' ), 10, 1 );

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

}