register_block_style


register_block_style ( $block_name, $style_properties )

Parameters:
  • (string|string[]) block_name Block type name including namespace or array of namespaced block type names.
  • (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().
Links:
Returns:
  • (bool) True if the block style was registered with success and false otherwise.
Defined at:
Change Log:
  • 6: .

Description

Registers a new block style.

Related Functions

unregister_block_style, register_block_type, unregister_block_type, register_block_style_handle, register_block_script_handle

Top Google Results

User discussions

wpseek mobile