GC_Block_Styles_Registry::get_registered_styles_for_block()

最后更新于:2021-11-26 10:41:29

GC_Block_Styles_Registry::get_registered_styles_for_block( string$block_name)

Retrieves registered block styles for a specific block.

参数

$block_name

(string) (Required) Block type name including namespace.

响应

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

源文件

文件: gc-includes/class-gc-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();
	}