Check whether a widget area is in use.
Since a Beans widget area is using the WordPress sidebar, this function checks if the defined sidebar is in use using is_active_sidebar().
beans_is_active_widget_area( string $id )
Return: (bool) True if the widget area is in use, false otherwise.
Parameters
Name | Type | Required | Default | Description |
---|---|---|---|---|
$id | string | true | - | The ID of the registered widget area. |
Source
function beans_is_active_widget_area( $id ) {
return is_active_sidebar( $id );
}