customize_control_active
Filters response of WP_Customize_Control::active().
Usage
add_filter( 'customize_control_active', 'wp_kama_customize_control_active_filter', 10, 2 ); /** * Function for `customize_control_active` filter-hook. * * @param bool $active Whether the Customizer control is active. * @param WP_Customize_Control $control WP_Customize_Control instance. * * @return bool */ function wp_kama_customize_control_active_filter( $active, $control ){ // filter... return $active; }
- $active(true|false)
- Whether the Customizer control is active.
- $control(WP_Customize_Control)
- WP_Customize_Control instance.
Changelog
Since 4.0.0 | Introduced. |
Where the hook is called
customize_control_active
wp-includes/class-wp-customize-control.php 270
$active = apply_filters( 'customize_control_active', $active, $control );