A WordPress-centric search engine for devs and theme authors



register_block_style ›

Since5.3.0
Deprecatedn/a
register_block_style ( $block_name, $style_properties )
Parameters: (2)
  • (string) $block_name Block type name including namespace.
    Required: Yes
  • (array) $style_properties 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).
    Required: Yes
Returns:
  • (boolean) True if the block style was registered with success and false otherwise.
Defined at:
Codex:

Registers a new block style.



Source

function register_block_style( $block_name, $style_properties ) {
	return WP_Block_Styles_Registry::get_instance()->register( $block_name, $style_properties );
}