beans_has_widget_area

Check whether a widget area is registered.

While beans_is_active_widget_area() checks if a widget area contains widgets, this function only checks if a widget area is registered.

beans_has_widget_area( string $id )

Return: (bool) True if the widget area is registered, false otherwise.

Parameters

NameTypeRequiredDefaultDescription
$idstringtrue-The ID of the registered widget area.

Source

function beans_has_widget_area( $id ) {

	global $wp_registered_sidebars;

	if ( isset( $wp_registered_sidebars[ $id ] ) ) {
		return true;
	}

	return false;

}