WordPress at Your Fingertips
function is not described

WP_Block_Styles_Registry::get_registered_styles_for_block() public WP 5.3.0

Retrieves registered block styles for a specific block.

{} It's a method of the class: WP_Block_Styles_Registry{}

No Hooks.


Array. Array whose keys are block style names and whose value are block style properties.


$WP_Block_Styles_Registry = new WP_Block_Styles_Registry();
$WP_Block_Styles_Registry->get_registered_styles_for_block( $block_name );
$block_name(string) (required)
Block type name including namespace.


Since 5.3.0 Introduced.

Code of WP_Block_Styles_Registry::get_registered_styles_for_block() WP 5.8.1

public function get_registered_styles_for_block( $block_name ) {
	if ( isset( $this->registered_block_styles[ $block_name ] ) ) {
		return $this->registered_block_styles[ $block_name ];
	return array();