Summery Summery

Unregisters a block style.

Syntax Syntax

WP_Block_Styles_Registry::unregister( string $block_name, string $block_style_name )

Parameters Parameters


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


(string) (Required) Block style name.

Return Return

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

Source Source

File: wp-includes/class-wp-block-styles-registry.php

	public function unregister( $block_name, $block_style_name ) {
		if ( ! $this->is_registered( $block_name, $block_style_name ) ) {
			/* translators: 1: Block name, 2: Block style name. */
			$message = sprintf( __( 'Block "%1$s" does not contain a style named "%2$s".' ), $block_name, $block_style_name );
			_doing_it_wrong( __METHOD__, $message, '5.3.0' );
			return false;

		unset( $this->registered_block_styles[ $block_name ][ $block_style_name ] );

		return true;



Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.