WordPress at Your Fingertips
function is not described

Custom_Background::init() public WP 3.0.0

Set up the hooks for the Custom Background admin page.

{} It's a method of the class: Custom_Background{}

No Hooks.

Return

null. Nothing.

Usage

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

Changelog

Since 3.0.0 Introduced.

Code of Custom_Background::init() WP 5.8.2

public function init() {
	$page = add_theme_page( __( 'Background' ), __( '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 );
	}
}