is_customize_preview

Whether the site is being previewed in the Customizer.

Description

is_customize_preview(); 

Usage

  1. if ( !function_exists( 'is_customize_preview' ) ) { 
  2. require_once '/functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = is_customize_preview(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/functions.php  
  1. function is_customize_preview() { 
  2. global $wp_customize; 
  3.  
  4. return ( $wp_customize instanceof WP_Customize_Manager ) && $wp_customize->is_preview();