On this page
is_registered_sidebar( string|int $sidebar_id ): bool
Checks if a sidebar is registered.
Parameters
$sidebar_idstring|int Required-
The ID of the sidebar when it was registered.
Return
bool True if the sidebar is registered, false otherwise.
Source
File: wp-includes/widgets.php. View all references
function is_registered_sidebar( $sidebar_id ) {
global $wp_registered_sidebars;
return isset( $wp_registered_sidebars[ $sidebar_id ] );
}
Related
Used By
| Used By | Description |
|---|---|
| WP_Customize_Widgets::render_widget_partial() wp-includes/class-wp-customize-widgets.php | Renders a specific widget using the supplied sidebar arguments. |
| WP_Customize_Widgets::filter_dynamic_sidebar_params() wp-includes/class-wp-customize-widgets.php | Inject selective refresh data attributes into widget container elements. |
| register_sidebars() wp-includes/widgets.php | Creates multiple sidebars. |
| WP_Customize_Widgets::tally_sidebars_via_is_active_sidebar_calls() wp-includes/class-wp-customize-widgets.php | Tallies the sidebars rendered via is_active_sidebar() . |
| WP_Customize_Widgets::tally_sidebars_via_dynamic_sidebar_calls() wp-includes/class-wp-customize-widgets.php | Tallies the sidebars rendered via dynamic_sidebar() . |
| WP_Customize_Widgets::customize_register() wp-includes/class-wp-customize-widgets.php | Registers Customizer settings and controls for all sidebars and widgets. |
Changelog
| Version | Description |
|---|---|
| 4.4.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/is_registered_sidebar