unregister_block_type() WordPress Function

The unregister_block_type() function is used to unregister a block type. This function takes a single parameter, which is the name of the block type to be unregistered.

unregister_block_type( string|WP_Block_Type $name ) #

Unregisters a block type.


Parameters

$name

(string|WP_Block_Type)(Required)Block type name including namespace, or alternatively a complete WP_Block_Type instance.


Top ↑

Return

(WP_Block_Type|false) The unregistered block type on success, or false on failure.


Top ↑

Source

File: wp-includes/blocks.php

function unregister_block_type( $name ) {
	return WP_Block_Type_Registry::get_instance()->unregister( $name );
}


Top ↑

Changelog

Changelog
VersionDescription
5.0.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.