WP_Block_Styles_Registry::get_registered_styles_for_block

Advertisement

Summery Summery

Retrieves registered block styles for a specific block.

Syntax Syntax

WP_Block_Styles_Registry::get_registered_styles_for_block( string $block_name )

Parameters Parameters

$block_name

(Required) Block type name including namespace.

Return Return

(array) Array whose keys are block style names and whose value are block style properties.

Source Source

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

	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();
	}

Advertisement

Changelog Changelog

Changelog
Version Description
5.3.0 Introduced.

Advertisement

Leave a Reply