customize_preview_(type)
Fires when the WP_Customize_Setting::preview() method is called for settings not handled as theme_mods or options.
The dynamic portion of the hook name, $this->type, refers to the setting type.
Использование
add_action( 'customize_preview_(type)', 'wp_kama_customize_preview_type_action' ); /** * Function for `customize_preview_(type)` action-hook. * * @param WP_Customize_Setting $setting WP_Customize_Setting instance. * * @return void */ function wp_kama_customize_preview_type_action( $setting ){ // action... }
- $setting(WP_Customize_Setting)
- WP_Customize_Setting instance.
Список изменений
С версии 4.1.0 | Введена. |
Где вызывается хук
customize_preview_(type)
wp-includes/class-wp-customize-setting.php 412
do_action( "customize_preview_{$this->type}", $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' ) );