customize_preview_init

The WordPress Core customize preview init hook.

Description

add_action( 'customize_preview_init', (array) $array ); 

Parameters (1)

0. $array (array) => array( __CLASS__, 'customize_preview_init' )
The array.

Usage

To run the hook, copy the example below.
  1. // run the action 
  2. do_action( 'customize_preview_init', $array ); 
The following example is for adding a hook callback.
  1. // define the customize_preview_init callback 
  2. function action_customize_preview_init( $array ) { 
  3. // make action magic happen here... 
  4. }; 
  5.  
  6. // add the action 
  7. add_action( 'customize_preview_init', 'action_customize_preview_init', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the action 
  2. remove_action( 'customize_preview_init', 'action_customize_preview_init', 10, 1 ); 

Defined (5)

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

/modules/custom-css/custom-css-4.7.php  
  1. add_action( 'customize_preview_init', array( __CLASS__, 'customize_preview_init' ) ); 
  1. add_action( 'customize_preview_init', array( __CLASS__, 'preview_content_width' ) ); 
/modules/theme-tools/content-options/customizer.php  
  1. add_action( 'customize_preview_init', 'jetpack_content_options_customize_preview_js' ); 
/modules/theme-tools/site-logo/inc/class-site-logo.php  
  1. add_action( 'customize_preview_init', array( $this, 'preview_enqueue' ) ); 
/modules/widgets.php  
  1. add_action( 'customize_preview_init', 'jetpack_widgets_customizer_assets_preview' );