Unregisters a block style of the given block type.
Parameters
$block_name
stringrequired- Block type name including namespace.
$block_style_name
stringrequired- Block style name.
Source
*
* @param string $block_name Block type name including namespace.
* @param string $block_style_name Block style name.
* @return bool True if the block style was unregistered with success and false otherwise.
*/
public function unregister( $block_name, $block_style_name ) {
if ( ! $this->is_registered( $block_name, $block_style_name ) ) {
_doing_it_wrong(
__METHOD__,
/* translators: 1: Block name, 2: Block style name. */
sprintf( __( 'Block "%1$s" does not contain a style named "%2$s".' ), $block_name, $block_style_name ),
'5.3.0'
);
return false;
}
Changelog
Version | Description |
---|---|
5.3.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.