wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema



register_block_style › WordPress Function

Desde5.3.0
Obsoleton/a
register_block_style ( $block_name, $style_properties )
Parâmetros: (2)
  • (string|string[]) $block_name Block type name including namespace or array of namespaced block type names.
    Required: Yes
  • (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().
    Required: Yes
Links:
Retorna:
  • (bool) True if the block style was registered with success and false otherwise.
Definido em:
Codex:
Log de mudanças:
  • 6.6.0

Registers a new block style.



Fonte

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