WP_Block_Styles_Registry::get_registered
Retrieves the properties of a registered block style for the given block type.
Метод класса: WP_Block_Styles_Registry{}
Хуков нет.
Возвращает
array|null. Registered block style properties or null if the block style is not registered.
Использование
$WP_Block_Styles_Registry = new WP_Block_Styles_Registry(); $WP_Block_Styles_Registry->get_registered( $block_name, $block_style_name );
- $block_name(строка) (обязательный)
- Block type name including namespace.
- $block_style_name(строка) (обязательный)
- Block style name.
Список изменений
| С версии 5.3.0 | Введена. |
Код WP_Block_Styles_Registry::get_registered() WP Block Styles Registry::get registered WP 7.1.2
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 ];
}