diff --git a/wp-includes/blocks.php b/wp-includes/blocks.php index 952f7b085f..e731f5bd5b 100644 --- a/wp-includes/blocks.php +++ b/wp-includes/blocks.php @@ -991,6 +991,8 @@ function block_version( $content ) { * * @since 5.3.0 * + * @link https://developer.wordpress.org/block-editor/reference-guides/block-api/block-styles/ + * * @param string $block_name Block type name including namespace. * @param array $style_properties Array containing the properties of the style name, * label, style (name of the stylesheet to be enqueued), diff --git a/wp-includes/class-wp-block-styles-registry.php b/wp-includes/class-wp-block-styles-registry.php index 272e400f8c..b9a59f6d6e 100644 --- a/wp-includes/class-wp-block-styles-registry.php +++ b/wp-includes/class-wp-block-styles-registry.php @@ -34,12 +34,28 @@ final class WP_Block_Styles_Registry { /** * Registers a block style for the given block type. * + * If the block styles are present in a standalone stylesheet, register it and pass + * its handle as the `style_handle` argument. If the block styles should be inline, + * use the `inline_style` argument. Usually, one of them would be used to pass CSS + * styles. However, you could also skip them and provide CSS styles in any stylesheet + * or with an inline tag. + * * @since 5.3.0 * + * @link https://developer.wordpress.org/block-editor/reference-guides/block-api/block-styles/ + * * @param string $block_name Block type name including namespace. - * @param array $style_properties Array containing the properties of the style name, label, - * is_default, style_handle (name of the stylesheet to be enqueued), - * inline_style (string containing the CSS to be added). + * @param array $style_properties { + * Array containing the properties of the style. + * + * @type string $name The identifier of the style used to compute a CSS class. + * @type string $label A human-readable label for the style. + * @type string $inline_style Inline CSS code that registers the CSS class required + * for the style. + * @type string $style_handle The handle to an already registered style that should be + * enqueued in places where block styles are needed. + * @type bool $is_default Whether this is the default style for the block type. + * } * @return bool True if the block style was registered with success and false otherwise. */ public function register( $block_name, $style_properties ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index 1d72ca15d6..5e480899c0 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.1-alpha-53891'; +$wp_version = '6.1-alpha-53892'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.