unregister_block_template( string $template_name ): WP_Block_Template|WP_Error

In this article

Unregister a block template.

Parameters

$template_namestringrequired
Template name in the form of plugin_uri//template_name.

Return

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

Source

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

Changelog

VersionDescription
6.7.0Introduced.

User Contributed Notes

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