On this page
Custom_Image_Header::__construct( callable $admin_header_callback, callable $admin_image_div_callback = '' )
Constructor – Register administration header callback.
Parameters
$admin_header_callbackcallable Required$admin_image_div_callbackcallable Optional-
custom image div output callback.
Default:
''
Source
File: wp-admin/includes/class-custom-image-header.php. View all references
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' ) );
}
Related
Uses
| Uses | Description |
|---|---|
| add_action() wp-includes/plugin.php | Adds a callback function to an action hook. |
Used By
| Used By | Description |
|---|---|
| _custom_header_background_just_in_time() wp-includes/theme.php | Registers the internal custom header and background routines. |
| WP_Customize_Header_Image_Setting::update() wp-includes/customize/class-wp-customize-header-image-setting.php |
Changelog
| Version | Description |
|---|---|
| 2.1.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/custom_image_header/__construct