WP_Block_Type_Registry::get_registered( string $name ): WP_Block_Type|null

In this article

Retrieves a registered block type.

Parameters

$namestringrequired
Block type name including namespace.

Return

WP_Block_Type|null The registered block type, or null if it is not registered.

Source

public function get_registered( $name ) {
	if ( ! $this->is_registered( $name ) ) {
		return null;
	}

	return $this->registered_block_types[ $name ];
}

Changelog

VersionDescription
5.0.0Introduced.

User Contributed Notes

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