Filter hook 'customize_control_active'

in WP Core File wp-includes/class-wp-customize-control.php at line 275

View Source

customize_control_active

Filter Hook
Description
Filters response of WP_Customize_Control::active().

Hook Information

File Location wp-includes/class-wp-customize-control.php View on GitHub
Hook Type Filter
Line Number 275

Hook Parameters

Type Name Description
bool $active Whether the Customizer control is active.
WP_Customize_Control $control WP_Customize_Control instance.

Usage Examples

Basic Usage
<?php
// Hook into customize_control_active
add_filter('customize_control_active', 'my_custom_filter', 10, 2);

function my_custom_filter($active, $control) {
    // Your custom filtering logic here
    return $active;
}

Source Code Context

wp-includes/class-wp-customize-control.php:275 - How this hook is used in WordPress core
<?php
 270  		 * @since 4.0.0
 271  		 *
 272  		 * @param bool                 $active  Whether the Customizer control is active.
 273  		 * @param WP_Customize_Control $control WP_Customize_Control instance.
 274  		 */
 275  		$active = apply_filters( 'customize_control_active', $active, $control );
 276  
 277  		return $active;
 278  	}
 279  
 280  	/**

PHP Documentation

<?php
/**
		 * Filters response of WP_Customize_Control::active().
		 *
		 * @since 4.0.0
		 *
		 * @param bool                 $active  Whether the Customizer control is active.
		 * @param WP_Customize_Control $control WP_Customize_Control instance.
		 */
Quick Info
  • Hook Type: Filter
  • Parameters: 2
  • File: wp-includes/class-wp-customize-control.php
Related Hooks

Related hooks will be displayed here in future updates.