customize_preview_init хук-событиеWP 3.4.0

Fires once the Customizer preview has initialized and JavaScript settings have been printed.

Использование

add_action( 'customize_preview_init', 'wp_kama_customize_preview_init_action' );

/**
 * Function for `customize_preview_init` action-hook.
 * 
 * @param WP_Customize_Manager $manager WP_Customize_Manager instance.
 *
 * @return void
 */
function wp_kama_customize_preview_init_action( $manager ){

	// action...
}
$manager(WP_Customize_Manager)
WP_Customize_Manager instance.

Список изменений

С версии 3.4.0 Введена.

Где вызывается хук

WP_Customize_Manager::customize_preview_init()
customize_preview_init
wp-includes/class-wp-customize-manager.php 1946
do_action( 'customize_preview_init', $this );

Где используется хук в WordPress

wp-includes/class-wp-customize-nav-menus.php 67
add_action( 'customize_preview_init', array( $this, 'customize_preview_init' ) );
wp-includes/class-wp-customize-nav-menus.php 68
add_action( 'customize_preview_init', array( $this, 'make_auto_draft_status_previewable' ) );
wp-includes/class-wp-customize-widgets.php 120
add_action( 'customize_preview_init', array( $this, 'customize_preview_init' ) );
wp-includes/class-wp-customize-widgets.php 130
add_action( 'customize_preview_init', array( $this, 'selective_refresh_init' ) );
wp-includes/customize/class-wp-customize-selective-refresh.php 68
add_action( 'customize_preview_init', array( $this, 'init_preview' ) );