add_custom_image_header

The timeline below displays how wordpress function add_custom_image_header has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 4.6

/**
 * Add callbacks for image header display.
 *
 * @since 2.1.0
 * @deprecated 3.4.0 Use add_theme_support()
 * @see add_theme_support()
 *
 * @param callable $wp_head_callback Call on the {@see 'wp_head'} action.
 * @param callable $admin_head_callback Call on custom header administration screen.
 * @param callable $admin_preview_callback Output a custom header image div on the custom header administration screen. Optional.
 */
function add_custom_image_header($wp_head_callback, $admin_head_callback, $admin_preview_callback = '')
{
    _deprecated_function(__FUNCTION__, '3.4.0', 'add_theme_support( \'custom-header\', $args )');
    $args = array('wp-head-callback' => $wp_head_callback, 'admin-head-callback' => $admin_head_callback);
    if ($admin_preview_callback) {
        $args['admin-preview-callback'] = $admin_preview_callback;
    }
    return add_theme_support('custom-header', $args);
}

WordPress Version: 4.4

/**
 * Add callbacks for image header display.
 *
 * @since 2.1.0
 * @deprecated 3.4.0 Use add_theme_support()
 * @see add_theme_support()
 *
 * @param callable $wp_head_callback Call on 'wp_head' action.
 * @param callable $admin_head_callback Call on custom header administration screen.
 * @param callable $admin_preview_callback Output a custom header image div on the custom header administration screen. Optional.
 */
function add_custom_image_header($wp_head_callback, $admin_head_callback, $admin_preview_callback = '')
{
    _deprecated_function(__FUNCTION__, '3.4', 'add_theme_support( \'custom-header\', $args )');
    $args = array('wp-head-callback' => $wp_head_callback, 'admin-head-callback' => $admin_head_callback);
    if ($admin_preview_callback) {
        $args['admin-preview-callback'] = $admin_preview_callback;
    }
    return add_theme_support('custom-header', $args);
}

WordPress Version: 3.7

/**
 * Add callbacks for image header display.
 *
 * @since 2.1.0
 * @deprecated 3.4.0
 * @deprecated Use add_theme_support('custom-header', $args)
 * @see add_theme_support()
 *
 * @param callback $wp_head_callback Call on 'wp_head' action.
 * @param callback $admin_head_callback Call on custom header administration screen.
 * @param callback $admin_preview_callback Output a custom header image div on the custom header administration screen. Optional.
 */
function add_custom_image_header($wp_head_callback, $admin_head_callback, $admin_preview_callback = '')
{
    _deprecated_function(__FUNCTION__, '3.4', 'add_theme_support( \'custom-header\', $args )');
    $args = array('wp-head-callback' => $wp_head_callback, 'admin-head-callback' => $admin_head_callback);
    if ($admin_preview_callback) {
        $args['admin-preview-callback'] = $admin_preview_callback;
    }
    return add_theme_support('custom-header', $args);
}