add_custom_image_header

Add callbacks for image header display.

Description

add_custom_image_header( (callable) $wp_head_callback, (callable) $admin_head_callback, (string) $admin_preview_callback = '' ); 

Parameters (3)

0. $wp_head_callback (callable)
The wp head callback.
1. $admin_head_callback (callable)
Call on custom header administration screen.
2. $admin_preview_callback — Optional. (string) => ''
Output a custom header image div on the custom header administration screen. Optional.

Usage

  1. if ( !function_exists( 'add_custom_image_header' ) ) { 
  2. require_once ABSPATH . WPINC . '/deprecated.php'; 
  3.  
  4. // The wp head callback. 
  5. $wp_head_callback = null; 
  6.  
  7. // Call on custom header administration screen. 
  8. $admin_head_callback = null; 
  9.  
  10. // Output a custom header image div on the custom header administration screen. Optional. 
  11. $admin_preview_callback = ''; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = add_custom_image_header($wp_head_callback, $admin_head_callback, $admin_preview_callback); 
  15.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/deprecated.php  
  1. function add_custom_image_header( $wp_head_callback, $admin_head_callback, $admin_preview_callback = '' ) { 
  2. _deprecated_function( __FUNCTION__, '3.4.0', 'add_theme_support( \'custom-header\', $args )' ); 
  3. $args = array( 
  4. 'wp-head-callback' => $wp_head_callback,  
  5. 'admin-head-callback' => $admin_head_callback,  
  6. ); 
  7. if ( $admin_preview_callback ) 
  8. $args['admin-preview-callback'] = $admin_preview_callback; 
  9. return add_theme_support( 'custom-header', $args );