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.
Return
(WP_Block_Type|false) The unregistered block type on success, or false on failure.
Source
File: wp-includes/blocks.php
function unregister_block_type( $name ) {
return WP_Block_Type_Registry::get_instance()->unregister( $name );
}
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
| Version | Description |
|---|---|
| 5.0.0 | Introduced. |