W3cubDocs

/WordPress

Custom_Background::__construct( callable $admin_header_callback = , callable $admin_image_div_callback = )

Constructor – Registers administration header callback.

Parameters

$admin_header_callbackcallableoptional
Administration header callback.

Default:''

$admin_image_div_callbackcallableoptional
Custom image div output callback.

Default:''

Source

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' ) );
}

Changelog

Version Description
3.0.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/custom_background/__construct