is_registered_sidebar( string|int $sidebar_id ): bool

In this article

Checks if a sidebar is registered.

Parameters

$sidebar_idstring|intrequired
The ID of the sidebar when it was registered.

Return

bool True if the sidebar is registered, false otherwise.

Source

function is_registered_sidebar( $sidebar_id ) {
	global $wp_registered_sidebars;

	return isset( $wp_registered_sidebars[ $sidebar_id ] );
}

Changelog

VersionDescription
4.4.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.