unregister_block_style() WordPress Function

The unregister_block_style() function allows you to unregister a block style that was previously registered using the register_block_style() function. This function takes the block name and the style name as parameters.

unregister_block_style( string $block_name, string $block_style_name ) #

Unregisters a block style.


Parameters

$block_name

(string)(Required)Block type name including namespace.

$block_style_name

(string)(Required)Block style name.


Top ↑

Return

(bool) True if the block style was unregistered with success and false otherwise.


Top ↑

Source

File: wp-includes/blocks.php

function unregister_block_style( $block_name, $block_style_name ) {
	return WP_Block_Styles_Registry::get_instance()->unregister( $block_name, $block_style_name );
}


Top ↑

Changelog

Changelog
VersionDescription
5.3.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.