Core Function
View Source on Trac ↗ register_block_style()
register_block_style( mixed $block_name, mixed $style_properties ) Registers a new block style.
Parameters 2 required
| Name / Type | Description |
|---|---|
| (string | | string[]) $block_name Block type name including namespace or array of namespaced block type names. Required |
| array | $style_properties Array containing the properties of the style name, label, style_handle (name of the stylesheet to be enqueued), inline_style (string containing the CSS to be added), style_data (theme.json-like array to generate CSS from). See WP_Block_Styles_Registry::register(). Required |
Return Value
(bool)
True if the block style was registered with success and false otherwise.
Function Information
Since Version
5.3.0
Source File
wp-includes/blocks.php
Advertisement