register_block_style()
最后更新于:2021-11-27 21:29:21
register_block_style( string$block_name, array$style_properties)Registers a new block style.
参数
- $block_name
-
(string) (Required) Block type name including namespace.
- $style_properties
-
(array) (Required) Array containing the properties of the style name, label, style (name of the stylesheet to be enqueued), inline_style (string containing the CSS to be added).
响应
(bool) True if the block style was registered with success and false otherwise.
源文件
文件: gc-includes/blocks.php
function register_block_style( $block_name, $style_properties ) {
return GC_Block_Styles_Registry::get_instance()->register( $block_name, $style_properties );
}