WordPress at a glance
function is not described

WP_Block_Type_Registry::is_registered() public WP 5.0.0

Checks if a block type is registered.

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

No Hooks.


true|false. True if the block type is registered, false otherwise.


$WP_Block_Type_Registry = new WP_Block_Type_Registry();
$WP_Block_Type_Registry->is_registered( $name );
$name(string) (required)
Block type name including namespace.


Since 5.0.0 Introduced.

Code of WP_Block_Type_Registry::is_registered() WP 5.7.2

public function is_registered( $name ) {
	return isset( $this->registered_block_types[ $name ] );