WordPress at a glance

is_customize_preview() WP 4.0.0

Whether the site is being previewed in the Customizer.

  • Global. WP_Customize_Manager. $wp_customize Customizer instance.
  • Global. WP_Customize_Manager. $wp_customize Customizer instance.
✈ 1 time = 0.000014s = very fast | 50000 times = 0.01s = speed of light PHP 7.1.0, WP 4.7

No Hooks.

Return

true/false. True if the site is being previewed in the Customizer, false otherwise.

Return

true/false. True if the site is being previewed in the Customizer, false otherwise.

Usage

is_customize_preview();

Usage

is_customize_preview();

Examples

#1 ______


#2 ______


		

Code of is_customize_preview: wp-includes/theme.php VER 4.9.8

<?php
function is_customize_preview() {
	global $wp_customize;

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

Related Functions

From tag: Conditional tags (page type and request)

More from tag: Conditional tags (all)

More from category: Settings (customizer)

No comments
    Hello, !     Log In . Register