customize_panel_active
Filters response of WP_Customize_Panel::active().
Использование
add_filter( 'customize_panel_active', 'wp_kama_customize_panel_active_filter', 10, 2 ); /** * Function for `customize_panel_active` filter-hook. * * @param bool $active Whether the Customizer panel is active. * @param WP_Customize_Panel $panel WP_Customize_Panel instance. * * @return bool */ function wp_kama_customize_panel_active_filter( $active, $panel ){ // filter... return $active; }
- $active(true|false)
- Whether the Customizer panel is active.
- $panel(WP_Customize_Panel)
- WP_Customize_Panel instance.
Список изменений
С версии 4.1.0 | Введена. |
Где вызывается хук
customize_panel_active
wp-includes/class-wp-customize-panel.php 195
$active = apply_filters( 'customize_panel_active', $active, $panel );