On this page
apply_filters( 'dynamic_sidebar_has_widgets', bool $did_one, int|string $index )
Filters whether a sidebar has widgets.
Description
Note: The filter is also evaluated for empty sidebars, and on both the front end and back end, including the Inactive Widgets sidebar on the Widgets screen.
Parameters
$did_onebool-
Whether at least one widget was rendered in the sidebar.
Default false. $indexint|string-
Index, name, or ID of the dynamic sidebar.
Source
File: wp-includes/widgets.php. View all references
return apply_filters( 'dynamic_sidebar_has_widgets', $did_one, $index );
Related
Used By
| Used By | Description |
|---|---|
| dynamic_sidebar() wp-includes/widgets.php | Display dynamic sidebar. |
Changelog
| Version | Description |
|---|---|
| 3.9.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/dynamic_sidebar_has_widgets