From b2d74b21b970e9a24e21378f26b87c7305d3b98d Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Thu, 30 May 2024 08:54:07 +0000 Subject: [PATCH] Editor: Improve types in docblock after [58246]. Makes it clearer that an array of strings is expected. See #61274. Built from https://develop.svn.wordpress.org/trunk@58247 git-svn-id: http://core.svn.wordpress.org/trunk@57710 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/blocks.php | 14 +++++++------- wp-includes/class-wp-block-styles-registry.php | 4 ++-- wp-includes/version.php | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/wp-includes/blocks.php b/wp-includes/blocks.php index cda01dac4e..e33912b617 100644 --- a/wp-includes/blocks.php +++ b/wp-includes/blocks.php @@ -1902,16 +1902,16 @@ function block_version( $content ) { * Registers a new block style. * * @since 5.3.0 - * @since 6.6.0 Updated types as registry now allows registering styles for multiple block types at once. + * @since 6.6.0 Added support for registering styles for multiple block types. * * @link https://developer.wordpress.org/block-editor/reference-guides/block-api/block-styles/ * - * @param string|array $block_name Block type name including namespace or array of namespaced block type names. - * @param 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(). + * @param string|string[] $block_name Block type name including namespace or array of namespaced block type names. + * @param 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(). * @return bool True if the block style was registered with success and false otherwise. */ function register_block_style( $block_name, $style_properties ) { diff --git a/wp-includes/class-wp-block-styles-registry.php b/wp-includes/class-wp-block-styles-registry.php index c0ed2a3545..2d16e0e034 100644 --- a/wp-includes/class-wp-block-styles-registry.php +++ b/wp-includes/class-wp-block-styles-registry.php @@ -46,8 +46,8 @@ final class WP_Block_Styles_Registry { * * @link https://developer.wordpress.org/block-editor/reference-guides/block-api/block-styles/ * - * @param string|array $block_name Block type name including namespace or array of namespaced block type names. - * @param array $style_properties { + * @param string|string[] $block_name Block type name including namespace or array of namespaced block type names. + * @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. diff --git a/wp-includes/version.php b/wp-includes/version.php index 1c2d39ea76..44e2622217 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.6-alpha-58246'; +$wp_version = '6.6-alpha-58247'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.