Custom_Background::__construct() WordPress Method

The Custom_Background::__construct() method initializes the custom background feature. It registers support for the custom background feature with WordPress and sets up the default custom background args.

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

Constructor – Register administration header callback.


Parameters

$admin_header_callback

(callable)(Optional)

Default value: ''

$admin_image_div_callback

(callable)(Optional)custom image div output callback.

Default value: ''


Top ↑

Source

File: wp-admin/includes/class-custom-background.php

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


Top ↑

Changelog

Changelog
VersionDescription
3.0.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.