WP_Customize_Widgets::is_panel_active() public WP 4.4.0
Determines whether the widgets panel is active, based on whether there are sidebars registered.
{} It's a method of the class: WP_Customize_Widgets{}
No Hooks.
Return
true/false. Active.
Usage
$WP_Customize_Widgets = new WP_Customize_Widgets(); $WP_Customize_Widgets->is_panel_active();
Notes
- See: WP_Customize_Panel::$active_callback
- Global. Array. $wp_registered_sidebars
Changelog
Since 4.4.0 | Introduced. |
Code of WP_Customize_Widgets::is_panel_active() WP Customize Widgets::is panel active WP 5.6
public function is_panel_active() {
global $wp_registered_sidebars;
return ! empty( $wp_registered_sidebars );
}