register_block_style() – Registers a new block style.

You appear to be a bot. Output may be restricted

Description

Registers a new block style.

Usage

$bool = register_block_style( $block_name, $style_properties );

Parameters

$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).

Returns

bool True if the block style was registered with success and false otherwise.

Source

File name: wordpress/wp-includes/blocks.php
Lines:

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

 View on GitHub View on Trac