WP_Block_Styles_Registry::register

SummerySummery

Registers a block style.

Syntax

WP_Block_Styles_Registry::register( string $block_name, array $style_properties )

ParametersParameters

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

ReturnReturn

(boolean) True if the block style was registered with success and false otherwise.

SourceSource

File: wp-includes/class-wp-block-styles-registry.php


			

ChangelogChangelog

Changelog
Version Description
5.3.0 Introduced.
Scroll to Top