customize_panel_active
Filter HookDescription
Filters response of WP_Customize_Panel::active().Hook Information
File Location |
wp-includes/class-wp-customize-panel.php
View on GitHub
|
Hook Type | Filter |
Line Number | 200 |
Hook Parameters
Type | Name | Description |
---|---|---|
bool
|
$active
|
Whether the Customizer panel is active. |
WP_Customize_Panel
|
$panel
|
WP_Customize_Panel instance. |
Usage Examples
Basic Usage
<?php
// Hook into customize_panel_active
add_filter('customize_panel_active', 'my_custom_filter', 10, 2);
function my_custom_filter($active, $panel) {
// Your custom filtering logic here
return $active;
}
Source Code Context
wp-includes/class-wp-customize-panel.php:200
- How this hook is used in WordPress core
<?php
195 * @since 4.1.0
196 *
197 * @param bool $active Whether the Customizer panel is active.
198 * @param WP_Customize_Panel $panel WP_Customize_Panel instance.
199 */
200 $active = apply_filters( 'customize_panel_active', $active, $panel );
201
202 return $active;
203 }
204
205 /**
PHP Documentation
<?php
/**
* Filters response of WP_Customize_Panel::active().
*
* @since 4.1.0
*
* @param bool $active Whether the Customizer panel is active.
* @param WP_Customize_Panel $panel WP_Customize_Panel instance.
*/
Quick Info
- Hook Type: Filter
- Parameters: 2
- File: wp-includes/class-wp-customize-panel.php
Related Hooks
Related hooks will be displayed here in future updates.