WP_Customize_Widgets::is_panel_active() WordPress Method
The WP_Customize_Widgets::is_panel_active() method is used to check if the widgets panel is currently active in the Customizer. This is useful for determining whether to show or hide certain controls that are only relevant to the widgets panel.
WP_Customize_Widgets::is_panel_active() #
Determines whether the widgets panel is active, based on whether there are sidebars registered.
Description
See also
- WP_Customize_Panel::$active_callback
Return
(bool) Active.
Source
File: wp-includes/class-wp-customize-widgets.php
public function is_panel_active() { global $wp_registered_sidebars; return ! empty( $wp_registered_sidebars ); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
4.4.0 | Introduced. |