wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



register_block_style › WordPress Function

Depuis5.3.0
Dépréciéen/a
register_block_style ( $block_name, $style_properties )
Paramètres: (2)
  • (string) $block_name Block type name including namespace.
    Requis: Oui
  • (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().
    Requis: Oui
Liens:
Retourne:
  • (bool) True if the block style was registered with success and false otherwise.
Défini(e) dans:
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 );
}