Custom_Background::init()
Sets up the hooks for the Custom Background admin page.
Метод класса: Custom_Background{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$Custom_Background = new Custom_Background(); $Custom_Background->init();
Список изменений
С версии 3.0.0 | Введена. |
Код Custom_Background::init() Custom Background::init WP 6.6.2
public function init() { $page = add_theme_page( _x( 'Background', 'custom background' ), _x( 'Background', 'custom background' ), 'edit_theme_options', 'custom-background', array( $this, 'admin_page' ) ); if ( ! $page ) { return; } add_action( "load-{$page}", array( $this, 'admin_load' ) ); add_action( "load-{$page}", array( $this, 'take_action' ), 49 ); add_action( "load-{$page}", array( $this, 'handle_upload' ), 49 ); if ( $this->admin_header_callback ) { add_action( "admin_head-{$page}", $this->admin_header_callback, 51 ); } }