unregister_block_template()WP 6.7.0

Unregister a block template.

Хуков нет.

Возвращает

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

Использование

unregister_block_template( $template_name );
$template_name(строка) (обязательный)
Template name in the form of plugin_uri//template_name.

Список изменений

С версии 6.7.0 Введена.

Код unregister_block_template() WP 6.7.1

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