wpseek.com
WordPress开发者和主题制作者的搜索引擎



get_custom_header_markup › WordPress Function

Since4.7.0
已弃用n/a
get_custom_header_markup ( 没有参数 )
返回:
  • (string) The markup for a custom header on success.
定义在:
文档:

Retrieves the markup for a custom header.

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


源码

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