Title: unregister_block_style
Published: November 12, 2019
Last modified: August 20, 2026

---

# unregister_block_style( string $block_name, string $block_style_name ): bool

## In this article

 * [Parameters](https://developer.wordpress.org/reference/functions/unregister_block_style/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/functions/unregister_block_style/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/unregister_block_style/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/unregister_block_style/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/unregister_block_style/?output_format=md#changelog)
 * [User Contributed Notes](https://developer.wordpress.org/reference/functions/unregister_block_style/?output_format=md#user-contributed-notes)

[ Back to top](https://developer.wordpress.org/reference/functions/unregister_block_style/?output_format=md#wp--skip-link--target)

Unregisters a block style.

## 󠀁[Parameters](https://developer.wordpress.org/reference/functions/unregister_block_style/?output_format=md#parameters)󠁿

 `$block_name`stringrequired

Block type name including namespace.

`$block_style_name`stringrequired

Block style name.

## 󠀁[Return](https://developer.wordpress.org/reference/functions/unregister_block_style/?output_format=md#return)󠁿

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

## 󠀁[Source](https://developer.wordpress.org/reference/functions/unregister_block_style/?output_format=md#source)󠁿

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

[View all references](https://developer.wordpress.org/reference/files/wp-includes/blocks.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.1/src/wp-includes/blocks.php#L2719)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/blocks.php#L2719-L2721)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/unregister_block_style/?output_format=md#related)󠁿

| Uses | Description | 
| [WP_Block_Styles_Registry::get_instance()](https://developer.wordpress.org/reference/classes/wp_block_styles_registry/get_instance/)`wp-includes/class-wp-block-styles-registry.php` |

Utility method to retrieve the main instance of the class.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/unregister_block_style/?output_format=md#changelog)󠁿

| Version | Description | 
| [5.3.0](https://developer.wordpress.org/reference/since/5.3.0/) | Introduced. |

## 󠀁[User Contributed Notes](https://developer.wordpress.org/reference/functions/unregister_block_style/?output_format=md#user-contributed-notes)󠁿

 1.   [Skip to note 4 content](https://developer.wordpress.org/reference/functions/unregister_block_style/?output_format=md#comment-content-4946)
 2.    [Marie Comet](https://profiles.wordpress.org/chaton666/)  [  6 years ago  ](https://developer.wordpress.org/reference/functions/unregister_block_style/#comment-4946)
 3.  [You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Funregister_block_style%2F%23comment-4946)
     Vote results for this note: 1[You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Funregister_block_style%2F%23comment-4946)
 4.  The following code sample unregister the style named ‘fancy-quote’ from the core
     quote block:
 5.  `unregister_block_style( 'core/quote', 'fancy-quote' );`
 6.  **Important**: The function `unregister_block_style` only unregisters styles that
     were registered on the server using `register_block_style`. The function does 
     not unregister a style registered using client-side code.
 7.   [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Funregister_block_style%2F%3Freplytocom%3D4946%23feedback-editor-4946)
 8.   [Skip to note 5 content](https://developer.wordpress.org/reference/functions/unregister_block_style/?output_format=md#comment-content-6732)
 9.    [Jason Raveling](https://profiles.wordpress.org/webunraveling/)  [  3 years ago  ](https://developer.wordpress.org/reference/functions/unregister_block_style/#comment-6732)
 10. [You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Funregister_block_style%2F%23comment-6732)
     Vote results for this note: 0[You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Funregister_block_style%2F%23comment-6732)
 11. As [Marie Comet](https://profiles.wordpress.org/chaton666/) mentioned, you cannot
     use `unregister_block_style()` on a style that was registered serverside (e.g.
     via PHP). The following PHP will not unregister a block style from the core/table
     block:
 12.     ```php
         // PHP
         unregister_block_style( 'core/table', 'stripes' );
         ```
     
 13. You can use the Block API via JavaScript to unregister it. Running the following
     JavaScript will successfully unregister the style.
 14.     ```javascript
         // JavaScript
         wp.blocks.unregisterBlockStyle( 'core/table', 'stripes' );
         ```
     
 15. For more info, look under [Styles in the Block API Reference](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-styles/)
     of the [Block Editor Handbook](https://developer.wordpress.org/block-editor/).
 16.  [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Funregister_block_style%2F%3Freplytocom%3D6732%23feedback-editor-6732)
 17.  [Skip to note 6 content](https://developer.wordpress.org/reference/functions/unregister_block_style/?output_format=md#comment-content-7178)
 18.   [Max Bond](https://profiles.wordpress.org/max-bond/)  [  2 years ago  ](https://developer.wordpress.org/reference/functions/unregister_block_style/#comment-7178)
 19. [You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Funregister_block_style%2F%23comment-7178)
     Vote results for this note: 0[You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Funregister_block_style%2F%23comment-7178)
 20. I wanted to unregister default **core/quote** block Plain style.
 21. First I have tried `unregister_block_style(‘core/quote’, ‘plain’)` – not working!
 22. Then I tried JS `wp.blocks.unregisterBlockStyle()` – partly working! Block style
     was removed from editor, but was present in FSE Style guide section!…
 23. Then I came back to PHP and tried to filter block.json args:
 24.     ```php
         add_filter( 'register_block_type_args', function ( $args, $block_type ) {
         	if ( 'core/quote' === $block_type ) {
         		unset($args['styles']);
         	}
     
         	return $args;
         }, 10, 2 );
         ```
     
 25. … And it worked finally! This API seems inconsistent… (
 26.  [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Funregister_block_style%2F%3Freplytocom%3D7178%23feedback-editor-7178)

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Funregister_block_style%2F)
before being able to contribute a note or feedback.