WP_Block_Type_Registry::is_registered()publicWP 5.0.0

Checks if a block type is registered.

Method of the class: WP_Block_Type_Registry{}

No Hooks.

Return

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

Usage

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

Changelog

Since 5.0.0 Introduced.

WP_Block_Type_Registry::is_registered() code WP 6.1.1

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