WP_Block_Templates_Registry::is_registeredpublicWP 6.7.0

Checks if a template is registered.

Method of the class: WP_Block_Templates_Registry{}

No Hooks.

Returns

true|false. True if the template is registered, false otherwise.

Usage

$WP_Block_Templates_Registry = new WP_Block_Templates_Registry();
$WP_Block_Templates_Registry->is_registered( $template_name );
$template_name(string) (required)
Template name.

Changelog

Since 6.7.0 Introduced.

WP_Block_Templates_Registry::is_registered() code WP 6.8.1

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