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

返回介绍

is_customize_preview()

发布于 2017-09-11 字数1774 浏览 954 评论 0

is_customize_preview()

Whether the site is being previewed in the Customizer.


描述


返回值

(bool) True if the site is being previewed in the Customizer, false otherwise.


源代码

File: wp-includes/theme.php

function is_customize_preview() {
	global $wp_customize;

	return ( $wp_customize instanceof WP_Customize_Manager ) && $wp_customize->is_preview();
}

更新日志

Version 描述
4.0.0 Introduced.

相关函数

Used By

  • wp-includes/theme.php:
    wp_custom_css_cb()
  • wp-includes/theme.php:
    get_custom_header_markup()
  • wp-includes/theme.php:
    the_custom_header_markup()
  • wp-includes/general-template.php:
    get_custom_logo()
  • wp-includes/customize/class-wp-customize-selective-refresh.php:
    WP_Customize_Selective_Refresh::handle_render_partials_request()
  • wp-includes/admin-bar.php:
    wp_admin_bar_customize_menu()
  • wp-includes/general-template.php:
    wp_site_icon()
  • wp-includes/theme.php:
    _custom_background_cb()
  • wp-includes/widgets/class-wp-widget-recent-comments.php:
    WP_Widget_Recent_Comments::__construct()
  • wp-includes/nav-menu-template.php:
    _wp_menu_item_classes_by_context()
  • Show 5 more used by
    Hide more used by


User Contributed Notes

上一篇:is_comment_feed()

下一篇:is_date()

发布评论

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

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