Title: WP_Block_Styles_Registry::is_registered
Published: November 12, 2019
Last modified: May 20, 2026

---

# WP_Block_Styles_Registry::is_registered( string|null $block_name, string|null $block_style_name ): bool

## In this article

 * [Parameters](https://developer.wordpress.org/reference/classes/wp_block_styles_registry/is_registered/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/classes/wp_block_styles_registry/is_registered/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/classes/wp_block_styles_registry/is_registered/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/classes/wp_block_styles_registry/is_registered/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/classes/wp_block_styles_registry/is_registered/?output_format=md#changelog)

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

Checks if a block style is registered for the given block type.

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

 `$block_name`string|nullrequired

Block type name including namespace.

`$block_style_name`string|nullrequired

Block style name.

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

 bool True if the block style is registered, false otherwise.

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

    ```php
    public function is_registered( $block_name, $block_style_name ) {
    	return isset( $block_name, $block_style_name, $this->registered_block_styles[ $block_name ][ $block_style_name ] );
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/class-wp-block-styles-registry.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/class-wp-block-styles-registry.php#L185)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/class-wp-block-styles-registry.php#L185-L187)

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

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

Unregisters a block style of the given block type.

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

Retrieves the properties of a registered block style for the given block type.

  |

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

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

## User Contributed Notes

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