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