unregister_block_template()WP 6.7.0

Unregister a block template.

No Hooks.

Return

WP_Block_Template|WP_Error. The unregistered template object on success, WP_Error object on failure or if the template doesn't exist.

Usage

unregister_block_template( $template_name );
$template_name(string) (required)
Template name in the form of plugin_uri//template_name.

Changelog

Since 6.7.0 Introduced.

unregister_block_template() code WP 6.7.1

function unregister_block_template( $template_name ) {
	return WP_Block_Templates_Registry::get_instance()->unregister( $template_name );
}