WordPress at Your Fingertips
function is not described

WP_Block_Pattern_Categories_Registry::is_registered() public WP 5.5.0

Checks if a pattern category is registered.

{} It's a method of the class: WP_Block_Pattern_Categories_Registry{}

No Hooks.


true|false. True if the pattern category is registered, false otherwise.


$WP_Block_Pattern_Categories_Registry = new WP_Block_Pattern_Categories_Registry();
$WP_Block_Pattern_Categories_Registry->is_registered( $category_name );
$category_name(string) (required)
Pattern category name including namespace.


Since 5.5.0 Introduced.

Code of WP_Block_Pattern_Categories_Registry::is_registered() WP 5.8

public function is_registered( $category_name ) {
	return isset( $this->registered_categories[ $category_name ] );