Custom_Image_Header::init()publicWP 2.1.0

Sets up the hooks for the Custom Header admin page.

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

Хуков нет.

Возвращает

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

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

$Custom_Image_Header = new Custom_Image_Header();
$Custom_Image_Header->init();

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

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

Код Custom_Image_Header::init() WP 6.5.2

public function init() {
	$page = add_theme_page(
		_x( 'Header', 'custom image header' ),
		_x( 'Header', 'custom image header' ),
		'edit_theme_options',
		'custom-header',
		array( $this, 'admin_page' )
	);

	if ( ! $page ) {
		return;
	}

	add_action( "admin_print_scripts-{$page}", array( $this, 'js_includes' ) );
	add_action( "admin_print_styles-{$page}", array( $this, 'css_includes' ) );
	add_action( "admin_head-{$page}", array( $this, 'help' ) );
	add_action( "admin_head-{$page}", array( $this, 'take_action' ), 50 );
	add_action( "admin_head-{$page}", array( $this, 'js' ), 50 );

	if ( $this->admin_header_callback ) {
		add_action( "admin_head-{$page}", $this->admin_header_callback, 51 );
	}
}