get_custom_header_markup()

Retrieves the markup for a custom header.


Description Description

The container div will always be returned in the Customizer preview.


Top ↑

Return Return

(string) The markup for a custom header on success.


Top ↑

Source Source

File: wp-includes/theme.php

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()
	);
}


Top ↑

Changelog Changelog

Changelog
Version Description
4.7.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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