developer.wordpress.org

dynamic_sidebar_has_widgets – Hook | Developer.WordPress.org

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

return apply_filters( 'dynamic_sidebar_has_widgets', $did_one, $index );

View all references View on Trac View on GitHub

Changelog

VersionDescription
3.9.0Introduced.