the_custom_header_markup() - WordPress 函数参考中文文档

返回介绍

the_custom_header_markup()

发布于 2017-09-11 字数1551 浏览 1018 评论 0

the_custom_header_markup()

Print the markup for a custom header.


描述

A container div will always be printed in the Customizer preview.


源代码

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

更新日志

Version 描述
4.7.0 Introduced.

相关函数

Uses

  • wp-includes/theme.php:
    get_custom_header_markup()
  • wp-includes/theme.php:
    is_header_video_active()
  • wp-includes/theme.php:
    has_header_video()
  • wp-includes/theme.php:
    get_header_video_settings()
  • wp-includes/theme.php:
    is_customize_preview()
  • wp-includes/functions.wp-scripts.php:
    wp_enqueue_script()
  • wp-includes/functions.wp-scripts.php:
    wp_localize_script()
  • Show 2 more uses
    Hide more uses


User Contributed Notes

上一篇:the_content_rss()

下一篇:the_custom_logo()

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

目前还没有任何评论,快来抢沙发吧!