Custom_Background::__construct()publicWP 3.0.0

Constructor - Registers administration header callback.

Method of the class: Custom_Background{}

No Hooks.

Return

null. Nothing (null).

Usage

$Custom_Background = new Custom_Background();
$Custom_Background->__construct( $admin_header_callback, $admin_image_div_callback );
$admin_header_callback(callable)
Administration header callback.
Default: empty string
$admin_image_div_callback(callable)
Custom image div output callback.
Default: empty string

Changelog

Since 3.0.0 Introduced.

Custom_Background::__construct() code WP 6.5.2

public function __construct( $admin_header_callback = '', $admin_image_div_callback = '' ) {
	$this->admin_header_callback    = $admin_header_callback;
	$this->admin_image_div_callback = $admin_image_div_callback;

	add_action( 'admin_menu', array( $this, 'init' ) );

	add_action( 'wp_ajax_custom-background-add', array( $this, 'ajax_background_add' ) );

	// Unused since 3.5.0.
	add_action( 'wp_ajax_set-background-image', array( $this, 'wp_set_background_image' ) );
}