the_custom_header_markup() WordPress Function
The the_custom_header_markup() function is used to display the custom header markup in the theme. This function must be called in the header.php file of the theme.
the_custom_header_markup() #
Prints the markup for a custom header.
Description
A container div will always be printed in the Customizer preview.
Source
File: wp-includes/theme.php
function the_custom_header_markup() { $custom_header = get_custom_header_markup(); if ( empty( $custom_header ) ) { return; } echo $custom_header; if ( is_header_video_active() && ( has_header_video() || is_customize_preview() ) ) { wp_enqueue_script( 'wp-custom-header' ); wp_localize_script( 'wp-custom-header', '_wpCustomHeaderSettings', get_header_video_settings() ); } }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
4.7.0 | Introduced. |