/** * 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()); }
/** * Display the image markup for a custom header image. * * @since 4.4.0 * * @param array $attr Optional. Attributes for the image markup. Default empty. */ function the_header_image_tag($attr = array()) { echo get_header_image_tag($attr); }
/** * Retrieve the markup for a custom header. * * @since 4.7.0 * * @return string|false The markup for a custom header on success. False if not. */ function get_custom_header_markup() { if (!has_custom_header()) { return false; } return sprintf('<div id="wp-custom-header" class="wp-custom-header">%s</div>', get_header_image_tag()); }