wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



register_block_style › WordPress Function

Seit5.3.0
Veraltetn/v
register_block_style ( $block_name, $style_properties )
Parameter: (2)
  • (string) $block_name Block type name including namespace.
    Erforderlich: Ja
  • (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). See WP_Block_Styles_Registry::register().
    Erforderlich: Ja
Links:
Gibt zurück:
  • (bool) True if the block style was registered with success and false otherwise.
Definiert in:
Codex:

Registers a new block style.



Quellcode

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