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

In this article

Constructor – Registers administration header callback.

Parameters

$admin_header_callbackcallablerequired
Administration header callback.
$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( 'customize_save_after', array( $this, 'customize_set_last_used' ) );
	add_action( 'wp_ajax_custom-header-crop', array( $this, 'ajax_header_crop' ) );
	add_action( 'wp_ajax_custom-header-add', array( $this, 'ajax_header_add' ) );
	add_action( 'wp_ajax_custom-header-remove', array( $this, 'ajax_header_remove' ) );
}

Changelog

VersionDescription
2.1.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.