get_custom_header_markup

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

WordPress Version: 5.5

/**
 * Retrieves the markup for a custom header.
 *
 * The container div will always be returned in the Customizer preview.
 *
 * @since 4.7.0
 *
 * @return string The markup for a custom header on success.
 */
function get_custom_header_markup()
{
    if (!has_custom_header() && !is_customize_preview()) {
        return '';
    }
    return sprintf('<div id="wp-custom-header" class="wp-custom-header">%s</div>', get_header_image_tag());
}

WordPress Version: 4.7

/**
 * Retrieve the markup for a custom header.
 *
 * The container div will always be returned in the Customizer preview.
 *
 * @since 4.7.0
 *
 * @return string The markup for a custom header on success.
 */
function get_custom_header_markup()
{
    if (!has_custom_header() && !is_customize_preview()) {
        return '';
    }
    return sprintf('<div id="wp-custom-header" class="wp-custom-header">%s</div>', get_header_image_tag());
}