WP_Block_Templates_Registry::is_registered( string $template_name ): bool

In this article

Checks if a template is registered.

Parameters

$template_namestringrequired
Template name.

Return

bool True if the template is registered, false otherwise.

Source

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

Changelog

VersionDescription
6.7.0Introduced.

User Contributed Notes

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