get_custom_header_markup() WP 1.0
Retrieve the markup for a custom header.
The container div will always be returned in the Customizer preview.
Works based on: get_header_image_tag()
Basis of: the_custom_header_markup()
No Hooks.
Return
String. The markup for a custom header on success.
Usage
get_custom_header_markup();
Changelog
Since 4.7.0 | Introduced. |
Code of get_custom_header_markup() get custom header markup WP 5.6
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()
);
}Related Functions
From tag: custom_header (theme options: video color image)
More from category: Other Theme Functions
- add_theme_support()
- bloginfo()
- body_class()
- current_theme_supports()
- get_custom_logo()
- get_page_templates()
- get_post_class()
- get_query_template()
- get_stylesheet()
- get_template()
- get_theme_mod()
- get_theme_mods()
- get_theme_root()
- has_custom_logo()