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

---

# WP_Block_Styles_Registry::get_registered( string $block_name, string $block_style_name ): array|null

## In this article

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

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

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

## 󠀁[Parameters](https://developer.wordpress.org/reference/classes/wp_block_styles_registry/get_registered/?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/classes/wp_block_styles_registry/get_registered/?output_format=md#return)󠁿

 array|null Registered block style properties or `null` if the block style is not
registered.

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

    ```php
    public function get_registered( $block_name, $block_style_name ) {
    	if ( ! $this->is_registered( $block_name, $block_style_name ) ) {
    		return null;
    	}

    	return $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#L145)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/class-wp-block-styles-registry.php#L145-L151)

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

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

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

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/classes/wp_block_styles_registry/get_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%2Fget_registered%2F)
before being able to contribute a note or feedback.