WordPress at a glance

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.

Is the basis for: the_custom_header_markup()
Works based on: get_header_image_tag()

No Hooks.

Return

String. The markup for a custom header on success.

Usage

get_custom_header_markup();

Code of get_custom_header_markup: wp-includes/theme.php VER 5.0.1

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

Related Functions

From tag: custom_header (theme options: video color image)

More from category: Other Theme Functions

No comments
    Hello, !     Log In . Register