diff --git a/backport-changelog/7.2/13416.md b/backport-changelog/7.2/13416.md new file mode 100644 index 00000000000000..63f744bd3eea53 --- /dev/null +++ b/backport-changelog/7.2/13416.md @@ -0,0 +1,3 @@ +https://github.com/WordPress/wordpress-develop/pull/13416 + +* https://github.com/WordPress/gutenberg/pull/81902 diff --git a/lib/block-supports/aria-label.php b/lib/block-supports/aria-label.php index 546ab4e6ccfe89..de450e33f712eb 100644 --- a/lib/block-supports/aria-label.php +++ b/lib/block-supports/aria-label.php @@ -31,7 +31,7 @@ function gutenberg_register_aria_label_support( $block_type ) { /** * Add the aria-label to the output. * - * @param WP_Block_Type $block_type Block Type. + * @param WP_Block_Type $block_type Block Type. * @param array $block_attributes Block attributes. * * @return array Block aria-label. diff --git a/lib/block-supports/background.php b/lib/block-supports/background.php index b17a84a31ba63a..d1a660b5e4cbb4 100644 --- a/lib/block-supports/background.php +++ b/lib/block-supports/background.php @@ -35,9 +35,9 @@ function gutenberg_register_background_support( $block_type ) { * This block support uses the `render_block` hook to ensure that * it is also applied to non-server-rendered blocks. * - * @param string $block_content Rendered block content. - * @param array $block Block object. - * @return string Filtered block content. + * @param string $block_content Rendered block content. + * @param array $block Block object. + * @return string Filtered block content. */ function gutenberg_render_background_support( $block_content, $block ) { $block_type = WP_Block_Type_Registry::get_instance()->get_registered( $block['blockName'] ); diff --git a/lib/block-supports/block-style-variations.php b/lib/block-supports/block-style-variations.php index 1c0ff04f4b3a31..73986ebe87fa1b 100644 --- a/lib/block-supports/block-style-variations.php +++ b/lib/block-supports/block-style-variations.php @@ -225,10 +225,10 @@ function gutenberg_render_block_style_variation_support_styles( $parsed_block ) * * @see gutenberg_render_block_style_variation_support_styles * - * @param string $block_content Rendered block content. - * @param array $block Block object. + * @param string $block_content Rendered block content. + * @param array $block Block object. * - * @return string Filtered block content. + * @return string Filtered block content. */ function gutenberg_render_block_style_variation_class_name( $block_content, $block ) { if ( ! $block_content || empty( $block['attrs']['className'] ) ) { diff --git a/lib/block-supports/border.php b/lib/block-supports/border.php index bd4c772675a5ed..1c09361ba08a40 100644 --- a/lib/block-supports/border.php +++ b/lib/block-supports/border.php @@ -138,7 +138,7 @@ function gutenberg_apply_border_support( $block_type, $block_attributes ) { * @param string $feature Name of the feature to check support for. * @param mixed $default_value Fallback value for feature support, defaults to false. * - * @return boolean Whether or not the feature is supported. + * @return boolean Whether or not the feature is supported. */ function gutenberg_has_border_feature_support( $block_type, $feature, $default_value = false ) { // Check if all border support features have been opted into via `"__experimentalBorder": true`. diff --git a/lib/block-supports/colors.php b/lib/block-supports/colors.php index 5ee4cecfcff74d..cc2335031685e3 100644 --- a/lib/block-supports/colors.php +++ b/lib/block-supports/colors.php @@ -66,8 +66,8 @@ function gutenberg_register_colors_support( $block_type ) { * Add CSS classes and inline styles for colors to the incoming attributes array. * This will be applied to the block markup in the front-end. * - * @param WP_Block_Type $block_type Block type. - * @param array $block_attributes Block attributes. + * @param WP_Block_Type $block_type Block type. + * @param array $block_attributes Block attributes. * * @return array Colors CSS classes and inline styles. */ diff --git a/lib/block-supports/custom-css.php b/lib/block-supports/custom-css.php index fcbb5234114850..dc73b902b6dca0 100644 --- a/lib/block-supports/custom-css.php +++ b/lib/block-supports/custom-css.php @@ -91,7 +91,7 @@ function gutenberg_enqueue_block_custom_css() { * * @param string $block_content Rendered block content. * @param array $block Block object. - * @return string Filtered block content. + * @return string Filtered block content. * * @phpstan-param array{ * attrs: array{ diff --git a/lib/block-supports/dimensions.php b/lib/block-supports/dimensions.php index f1ddd78522e6d3..f21e2800283af7 100644 --- a/lib/block-supports/dimensions.php +++ b/lib/block-supports/dimensions.php @@ -100,9 +100,9 @@ function gutenberg_is_explicit_aspect_ratio_value( $aspect_ratio ) { * This block support uses the `render_block` hook to ensure that * it is also applied to non-server-rendered blocks. * - * @param string $block_content Rendered block content. - * @param array $block Block object. - * @return string Filtered block content. + * @param string $block_content Rendered block content. + * @param array $block Block object. + * @return string Filtered block content. */ function gutenberg_render_dimensions_support( $block_content, $block ) { $block_type = WP_Block_Type_Registry::get_instance()->get_registered( $block['blockName'] ); diff --git a/lib/block-supports/duotone.php b/lib/block-supports/duotone.php index 2663b7f5910c9e..bfae787b8e59f9 100644 --- a/lib/block-supports/duotone.php +++ b/lib/block-supports/duotone.php @@ -65,9 +65,9 @@ * * @deprecated 6.3.0 * - * @param mixed $n Number of unknown type. - * @param int $max Upper value of the range to bound to. - * @return float Value in the range [0,1]. + * @param mixed $n Number of unknown type. + * @param int $max Upper value of the range to bound to. + * @return float Value in the range [0,1]. */ function gutenberg_tinycolor_bound01( $n, $max ) { _deprecated_function( __FUNCTION__, '6.3.0' ); @@ -100,8 +100,8 @@ function gutenberg_tinycolor_bound01( $n, $max ) { * * @deprecated 6.3.0 * - * @param mixed $n Number of unknown type. - * @return float Value in the range [0,1]. + * @param mixed $n Number of unknown type. + * @return float Value in the range [0,1]. */ function gutenberg_tinycolor_bound_alpha( $n ) { _deprecated_function( __FUNCTION__, '6.3.0' ); @@ -122,8 +122,8 @@ function gutenberg_tinycolor_bound_alpha( $n ) { * * @deprecated 6.3.0 * - * @param array $rgb_color RGB object. - * @return array Rounded and converted RGB object. + * @param array $rgb_color RGB object. + * @return array Rounded and converted RGB object. */ function gutenberg_tinycolor_rgb_to_rgb( $rgb_color ) { _deprecated_function( __FUNCTION__, '6.3.0' ); @@ -142,10 +142,10 @@ function gutenberg_tinycolor_rgb_to_rgb( $rgb_color ) { * * @deprecated 6.3.0 * - * @param float $p first component. - * @param float $q second component. - * @param float $t third component. - * @return float R, G, or B component. + * @param float $p first component. + * @param float $q second component. + * @param float $t third component. + * @return float R, G, or B component. */ function gutenberg_tinycolor_hue_to_rgb( $p, $q, $t ) { _deprecated_function( __FUNCTION__, '6.3.0' ); @@ -175,8 +175,8 @@ function gutenberg_tinycolor_hue_to_rgb( $p, $q, $t ) { * * @deprecated 6.3.0 * - * @param array $hsl_color HSL object. - * @return array Rounded and converted RGB object. + * @param array $hsl_color HSL object. + * @return array Rounded and converted RGB object. */ function gutenberg_tinycolor_hsl_to_rgb( $hsl_color ) { _deprecated_function( __FUNCTION__, '6.3.0' ); @@ -214,8 +214,8 @@ function gutenberg_tinycolor_hsl_to_rgb( $hsl_color ) { * * @deprecated 6.3.0 * - * @param string $color_str CSS color string. - * @return array RGB object. + * @param string $color_str CSS color string. + * @return array RGB object. */ function gutenberg_tinycolor_string_to_rgb( $color_str ) { _deprecated_function( __FUNCTION__, '6.3.0' ); @@ -371,8 +371,8 @@ function gutenberg_tinycolor_string_to_rgb( $color_str ) { * * @deprecated 6.3.0 * - * @param array $preset Duotone preset value as seen in theme.json. - * @return string Duotone filter CSS id. + * @param array $preset Duotone preset value as seen in theme.json. + * @return string Duotone filter CSS id. */ function gutenberg_get_duotone_filter_id( $preset ) { _deprecated_function( __FUNCTION__, '6.3.0' ); @@ -384,8 +384,8 @@ function gutenberg_get_duotone_filter_id( $preset ) { * * @deprecated 6.3.0 * - * @param array $preset Duotone preset value as seen in theme.json. - * @return string Duotone CSS filter property url value. + * @param array $preset Duotone preset value as seen in theme.json. + * @return string Duotone CSS filter property url value. */ function gutenberg_get_duotone_filter_property( $preset ) { _deprecated_function( __FUNCTION__, '6.3.0' ); @@ -397,8 +397,8 @@ function gutenberg_get_duotone_filter_property( $preset ) { * * @deprecated 6.3.0 * - * @param array $preset Duotone preset value as seen in theme.json. - * @return string Duotone SVG filter. + * @param array $preset Duotone preset value as seen in theme.json. + * @return string Duotone SVG filter. */ function gutenberg_get_duotone_filter_svg( $preset ) { _deprecated_function( __FUNCTION__, '6.3.0' ); @@ -422,9 +422,9 @@ function gutenberg_register_duotone_support( $block_type ) { * * @deprecated 6.3.0 Use WP_Duotone_Gutenberg::render_duotone_support() instead. * - * @param string $block_content Rendered block content. - * @param array $block Block object. - * @return string Filtered block content. + * @param string $block_content Rendered block content. + * @param array $block Block object. + * @return string Filtered block content. */ function gutenberg_render_duotone_support( $block_content, $block ) { _deprecated_function( __FUNCTION__, '6.3.0', 'WP_Duotone_Gutenberg::render_duotone_support' ); diff --git a/lib/block-supports/elements.php b/lib/block-supports/elements.php index 9198fc8c9c893f..a115523ab5881e 100644 --- a/lib/block-supports/elements.php +++ b/lib/block-supports/elements.php @@ -10,8 +10,8 @@ * * @deprecated 6.6.0 Use `gutenberg_render_elements_class_name` instead. * - * @param string $block_content Rendered block content. - * @return string Filtered block content. + * @param string $block_content Rendered block content. + * @return string Filtered block content. */ function gutenberg_render_elements_support( $block_content ) { _deprecated_function( __FUNCTION__, '6.6.0', 'gutenberg_render_elements_class_name' ); @@ -21,10 +21,10 @@ function gutenberg_render_elements_support( $block_content ) { /** * Determines whether an elements class name should be added to the block. * - * @param array $block Block object. - * @param array $options Per element type options e.g. whether to skip serialization. + * @param array $block Block object. + * @param array $options Per element type options e.g. whether to skip serialization. * - * @return boolean Whether the block needs an elements class name. + * @return boolean Whether the block needs an elements class name. */ function gutenberg_should_add_elements_class_name( $block, $options ) { if ( ! isset( $block['attrs']['style']['elements'] ) ) { @@ -234,7 +234,7 @@ function gutenberg_render_elements_support_styles( $parsed_block ) { * * @param string $block_content Rendered block content. * @param array $block Block object. - * @return string Filtered block content. + * @return string Filtered block content. * * @phpstan-param array{ * attrs: array{ diff --git a/lib/block-supports/layout.php b/lib/block-supports/layout.php index b5d06d3125c79f..a2448b6f7abdce 100644 --- a/lib/block-supports/layout.php +++ b/lib/block-supports/layout.php @@ -321,9 +321,9 @@ function gutenberg_sanitize_block_gap_value( $gap_value ) { /** * Returns child layout styles for a block affected by its parent's layout. * - * @param string $selector CSS selector. - * @param array $child_layout Child layout values. - * @param array $parent_layout Parent layout values. + * @param string $selector CSS selector. + * @param array $child_layout Child layout values. + * @param array $parent_layout Parent layout values. * @param array|null $viewport_overrides Optional. Child viewport layout overrides to emit. * @return array Child layout style rules. */ @@ -985,8 +985,8 @@ function gutenberg_get_layout_style( $selector, $layout, $has_block_gap_support * but it is unique across the life of the PHP process and it's stable per * prefix. * - * @param string $prefix Prefix for the returned ID. - * @return string Incremental ID per prefix. + * @param string $prefix Prefix for the returned ID. + * @return string Incremental ID per prefix. */ function gutenberg_incremental_id_per_prefix( $prefix = '' ) { static $id_counters = array(); @@ -1017,9 +1017,9 @@ function gutenberg_unique_id_from_values( array $data, string $prefix = '' ): st /** * Renders the layout config to the block wrapper. * - * @param string $block_content Rendered block content. - * @param array $block Block object. - * @return string Filtered block content. + * @param string $block_content Rendered block content. + * @param array $block Block object. + * @return string Filtered block content. */ function gutenberg_render_layout_support_flag( $block_content, $block ) { $block_type = WP_Block_Type_Registry::get_instance()->get_registered( $block['blockName'] ); @@ -1536,9 +1536,9 @@ function ( $parsed_block, $source_block, $parent_block ) { * to restore the inner div for the group block * to avoid breaking styles relying on that div. * - * @param string $block_content Rendered block content. - * @param array $block Block object. - * @return string Filtered block content. + * @param string $block_content Rendered block content. + * @param array $block Block object. + * @return string Filtered block content. */ function gutenberg_restore_group_inner_container( $block_content, $block ) { $tag_name_attr = $block['attrs']['tagName'] ?? null; @@ -1610,7 +1610,7 @@ static function ( $matches ) { * to avoid breaking styles relying on that div. * * @param string $block_content Rendered block content. - * @param array $block Block object. + * @param array $block Block object. * @return string Filtered block content. */ function gutenberg_restore_image_outer_container( $block_content, $block ) { diff --git a/lib/block-supports/position.php b/lib/block-supports/position.php index 930e726d123211..5b28db68325483 100644 --- a/lib/block-supports/position.php +++ b/lib/block-supports/position.php @@ -28,9 +28,9 @@ function gutenberg_register_position_support( $block_type ) { /** * Renders position styles to the block wrapper. * - * @param string $block_content Rendered block content. - * @param array $block Block object. - * @return string Filtered block content. + * @param string $block_content Rendered block content. + * @param array $block Block object. + * @return string Filtered block content. */ function gutenberg_render_position_support( $block_content, $block ) { $block_type = WP_Block_Type_Registry::get_instance()->get_registered( $block['blockName'] ); diff --git a/lib/block-supports/settings.php b/lib/block-supports/settings.php index 0246b5c039c86a..3015dfbb8f7890 100644 --- a/lib/block-supports/settings.php +++ b/lib/block-supports/settings.php @@ -10,9 +10,9 @@ * * @access private * - * @param string $block_content Rendered block content. - * @param array $block Block object. - * @return string Filtered block content. + * @param string $block_content Rendered block content. + * @param array $block Block object. + * @return string Filtered block content. */ function _gutenberg_add_block_level_presets_class( $block_content, $block ) { if ( ! $block_content ) { @@ -46,8 +46,8 @@ function _gutenberg_add_block_level_presets_class( $block_content, $block ) { * * @access private * - * @param string|null $pre_render The pre-rendered content. Default null. - * @param array $block The block being rendered. + * @param string|null $pre_render The pre-rendered content. Default null. + * @param array $block The block being rendered. * * @return null */ diff --git a/lib/block-supports/shadow.php b/lib/block-supports/shadow.php index 25c365067e0c32..d93bd15698c1db 100644 --- a/lib/block-supports/shadow.php +++ b/lib/block-supports/shadow.php @@ -39,8 +39,8 @@ function gutenberg_register_shadow_support( $block_type ) { * This will be applied to the block markup in * the front-end. * - * @param WP_Block_Type $block_type Block type. - * @param array $block_attributes Block attributes. + * @param WP_Block_Type $block_type Block type. + * @param array $block_attributes Block attributes. * * @return array Shadow CSS classes and inline styles. */ diff --git a/lib/block-supports/typography.php b/lib/block-supports/typography.php index e0ebc09ce210c1..576e7bcfd63a54 100644 --- a/lib/block-supports/typography.php +++ b/lib/block-supports/typography.php @@ -74,8 +74,8 @@ function gutenberg_register_typography_support( $block_type ) { * to the incoming attributes array. This will be applied to the block markup in * the front-end. * - * @param WP_Block_Type $block_type Block type. - * @param array $block_attributes Block attributes. + * @param WP_Block_Type $block_type Block type. + * @param array $block_attributes Block attributes. * * @return array Typography CSS classes and inline styles. */ @@ -247,9 +247,9 @@ function gutenberg_typography_get_preset_inline_style_value( $style_value, $css_ /** * Renders typography styles/content to the block wrapper. * - * @param string $block_content Rendered block content. - * @param array $block Block object. - * @return string Filtered block content. + * @param string $block_content Rendered block content. + * @param array $block Block object. + * @return string Filtered block content. */ function gutenberg_render_typography_support( $block_content, $block ) { if ( ! empty( $block['attrs']['fitText'] ) && $block['attrs']['fitText'] && ! is_admin() ) { @@ -480,7 +480,7 @@ function gutenberg_get_computed_fluid_typography_value( $args = array() ) { * @since 6.6.0 Deprecated bool argument $should_use_fluid_typography. * @since 6.7.0 Font size presets can enable fluid typography individually, even if it’s disabled globally. * - * @param array $preset { + * @param array $preset { * Required. fontSizes preset value as seen in theme.json. * * @type string $name Name of the font size preset. diff --git a/lib/class-wp-duotone-gutenberg.php b/lib/class-wp-duotone-gutenberg.php index 0ea546e6759d05..e0809d5482e8a5 100644 --- a/lib/class-wp-duotone-gutenberg.php +++ b/lib/class-wp-duotone-gutenberg.php @@ -135,8 +135,8 @@ class WP_Duotone_Gutenberg { * @link https://github.com/omgovich/colord/blob/3f859e03b0ca622eb15480f611371a0f15c9427f/src/helpers.ts#L23 * * @param float $number The number to clamp. - * @param float $min The minimum value. - * @param float $max The maximum value. + * @param float $min The minimum value. + * @param float $max The maximum value. * @return float The clamped value. */ private static function colord_clamp( $number, $min = 0, $max = 1 ) { @@ -878,9 +878,9 @@ public static function set_global_style_block_names() { * * @since 6.3.0 * - * @param string $block_content Rendered block content. - * @param array $block Block object. - * @param WP_Block $wp_block The block instance. + * @param string $block_content Rendered block content. + * @param array $block Block object. + * @param WP_Block $wp_block The block instance. * @return string Filtered block content. */ public static function render_duotone_support( $block_content, $block, $wp_block ) { @@ -967,8 +967,8 @@ public static function render_duotone_support( $block_content, $block, $wp_block * * @since 6.5.0 * - * @param string $block_content Rendered block content. - * @return string Filtered block content. + * @param string $block_content Rendered block content. + * @return string Filtered block content. */ public static function restore_image_outer_container( $block_content ) { if ( wp_theme_has_theme_json() ) { @@ -1119,8 +1119,8 @@ public static function migrate_experimental_duotone_support_flag( $settings, $me * @since 6.3.0 * @deprecated 6.3.0 * - * @param array $preset Duotone preset value as seen in theme.json. - * @return string Duotone filter CSS id. + * @param array $preset Duotone preset value as seen in theme.json. + * @return string Duotone filter CSS id. */ public static function get_filter_id_from_preset( $preset ) { _deprecated_function( __FUNCTION__, '6.3.0' ); diff --git a/lib/class-wp-theme-json-gutenberg.php b/lib/class-wp-theme-json-gutenberg.php index 2ad6b7586051b7..660973bdab55b6 100644 --- a/lib/class-wp-theme-json-gutenberg.php +++ b/lib/class-wp-theme-json-gutenberg.php @@ -652,7 +652,7 @@ class WP_Theme_JSON_Gutenberg { * @since 7.1.0 * * @param mixed $viewport_settings Viewport settings from theme.json. - * @param array $options { + * @param array $options { * Optional. Options for generating media queries. * * @type bool $include_desktop Whether to include the desktop media query. Default false. @@ -917,11 +917,11 @@ protected static function schema_in_root_and_per_origin( $schema ) { /** * Processes pseudo-selectors for any node (block or variation). * - * @param array $node The node data (block or variation). - * @param string $base_selector The base selector. - * @param array $settings The theme settings. - * @param string $block_name The block name. - * @param array|null $block_metadata Metadata about the block to get styles for. + * @param array $node The node data (block or variation). + * @param string $base_selector The base selector. + * @param array $settings The theme settings. + * @param string $block_name The block name. + * @param array|null $block_metadata Metadata about the block to get styles for. * @param array|null $style_variation Style variation metadata. * @return array Array of pseudo-selector declarations. */ @@ -2125,7 +2125,7 @@ public function get_block_custom_css_nodes() { * Returns the global styles custom CSS for a single block. * This function is deprecated; please do not sync to core. * - * @param array $css The block css node. + * @param array $css The block css node. * @param string $selector The block selector. * * @return string The global styles custom CSS for the block. @@ -3019,13 +3019,13 @@ protected static function flatten_tree( $tree, $prefix = '', $token = '--' ) { * @since 6.6.0 Passing current theme JSON settings to wp_get_typography_font_size_value(). Using style engine to correctly fetch background CSS values. * @since 6.7.0 Allow ref resolution of background properties. * - * @param array $styles Styles to process. - * @param array $settings Theme settings. - * @param array $properties Properties metadata. - * @param array $theme_json Theme JSON array. - * @param string $selector The style block selector. + * @param array $styles Styles to process. + * @param array $settings Theme settings. + * @param array $properties Properties metadata. + * @param array $theme_json Theme JSON array. + * @param string $selector The style block selector. * @param boolean $use_root_padding Whether to add custom properties at root level. - * @return array Returns the modified $declarations. + * @return array Returns the modified $declarations. */ protected static function compute_style_properties( $styles, $settings = array(), $properties = null, $theme_json = null, $selector = null, $use_root_padding = null ) { if ( empty( $styles ) ) { @@ -3151,8 +3151,8 @@ protected static function compute_style_properties( $styles, $settings = array() * @since 6.1.0 Added the `$theme_json` parameter. * @since 6.7.0 Added support for background image refs * - * @param array $styles Styles subtree. - * @param array $path Which property to process. + * @param array $styles Styles subtree. + * @param array $path Which property to process. * @param array $theme_json Theme JSON array. * @return string|array Style property value. */ @@ -3526,7 +3526,7 @@ private static function update_paragraph_text_indent_selector( $feature_declarat * * @param array $theme_json The theme.json converted to an array. * @param array $selectors Optional list of selectors per block. - * @param array $options { + * @param array $options { * Optional. An array of options for now used for internal purposes only (may change without notice). * * @type bool $include_block_style_variations Includes nodes for block style variations. Default false. @@ -4629,7 +4629,7 @@ protected static function get_default_slugs( $data, $node_path ) { * * @since 5.9.0 * - * @param string $slug The slug we want to find a match from default presets. + * @param string $slug The slug we want to find a match from default presets. * @param array $base_path The path to inspect. It's 'settings' by default. * @return string|null */ @@ -4679,8 +4679,8 @@ protected static function filter_slugs( $node, $slugs ) { * @since 6.6.0 Added support for block style variation element styles and $origin parameter. * * @param array $theme_json Structure to sanitize. - * @param string $origin Optional. What source of data this object represents. - * One of 'blocks', 'default', 'theme', or 'custom'. Default 'theme'. + * @param string $origin Optional. What source of data this object represents. + * One of 'blocks', 'default', 'theme', or 'custom'. Default 'theme'. * @return array Sanitized structure. */ public static function remove_insecure_properties( $theme_json, $origin = 'theme' ) { @@ -5769,7 +5769,7 @@ private static function convert_custom_properties( $value ) { * It is recursive and modifies the input in-place. * * @since 6.3.0 - * @param array $tree Input to process. + * @param array $tree Input to process. * @return array The modified $tree. */ private static function resolve_custom_css_format( $tree ) { @@ -5919,7 +5919,7 @@ function ( $matches ) use ( $variation_class ) { * declarations instead of deriving it by subtracting the root selector from * the feature selector. * - * @param array $style_variation Style variation metadata. + * @param array $style_variation Style variation metadata. * @param string $feature_selector CSS selector for the feature. * @return string Feature selector with block style variation selector added. */ diff --git a/lib/class-wp-theme-json-resolver-gutenberg.php b/lib/class-wp-theme-json-resolver-gutenberg.php index c8488f77c8e1ae..284666442c1f3a 100644 --- a/lib/class-wp-theme-json-resolver-gutenberg.php +++ b/lib/class-wp-theme-json-resolver-gutenberg.php @@ -224,7 +224,7 @@ protected static function has_same_registered_blocks( $origin ) { * Added registration and merging of block style variations from partial theme.json files and the block styles registry. * * @param array $deprecated Deprecated. Not used. - * @param array $options { + * @param array $options { * Options arguments. * * @type bool $with_supports Whether to include theme supports in the data. Default true. @@ -927,7 +927,7 @@ public static function resolve_theme_file_uris( $theme_json ) { * * @since 6.6.0 * - * @param array $data Array following the theme.json specification. + * @param array $data Array following the theme.json specification. * @param array $variations Shared block style variations. * @return array Theme json data including shared block style variation definitions. */ @@ -969,7 +969,7 @@ private static function inject_variations_from_block_style_variation_files( $dat * * @since 6.6.0 * - * @param array $data Array following the theme.json specification. + * @param array $data Array following the theme.json specification. * @return array Theme json data including variations from the block styles registry. */ private static function inject_variations_from_block_styles_registry( $data ) { diff --git a/lib/class-wp-theme-json-schema-gutenberg.php b/lib/class-wp-theme-json-schema-gutenberg.php index ee1c97a571d41f..c8909410644747 100644 --- a/lib/class-wp-theme-json-schema-gutenberg.php +++ b/lib/class-wp-theme-json-schema-gutenberg.php @@ -105,7 +105,7 @@ private static function migrate_v1_to_v2( $old ) { * * @since 6.6.0 * - * @param array $old Data to migrate. + * @param array $old Data to migrate. * @param string $origin What source of data this object represents. * One of 'blocks', 'default', 'theme', or 'custom'. * @return array Data with defaultFontSizes set to false. @@ -219,7 +219,7 @@ private static function rename_settings( &$settings, $paths_to_rename ) { * @since 5.9.0 * * @param array $settings Reference to the current settings array. - * @param array $path Path to the property to be removed. + * @param array $path Path to the property to be removed. */ private static function unset_setting_by_path( &$settings, $path ) { $tmp_settings = &$settings; // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable diff --git a/lib/client-assets.php b/lib/client-assets.php index 53268a167039ea..bb0e6d685fd6b6 100644 --- a/lib/client-assets.php +++ b/lib/client-assets.php @@ -26,9 +26,9 @@ function gutenberg_dir_path() { * * @since 0.1.0 * - * @param string $path Relative path of the desired file. + * @param string $path Relative path of the desired file. * - * @return string Fully qualified URL pointing to the desired file. + * @return string Fully qualified URL pointing to the desired file. */ function gutenberg_url( $path ) { return plugins_url( $path, __DIR__ ); diff --git a/lib/compat/wordpress-7.0/blocks.php b/lib/compat/wordpress-7.0/blocks.php index df7d2849166b4f..526721d5a437a5 100644 --- a/lib/compat/wordpress-7.0/blocks.php +++ b/lib/compat/wordpress-7.0/blocks.php @@ -129,7 +129,7 @@ function gutenberg_resolve_pattern_blocks( $blocks ) { * * @param array $query The query vars. * @param WP_Block $block Block instance. - * @return array The filtered query vars. + * @return array The filtered query vars. */ function gutenberg_update_tax_query_of_query_loop_block( $query, $block ) { if ( empty( $block->context['query']['taxQuery'] ) ) { diff --git a/lib/compat/wordpress-7.0/class-gutenberg-rest-templates-controller-7-0.php b/lib/compat/wordpress-7.0/class-gutenberg-rest-templates-controller-7-0.php index f9e84ae83a2950..ca4c03b0344da1 100644 --- a/lib/compat/wordpress-7.0/class-gutenberg-rest-templates-controller-7-0.php +++ b/lib/compat/wordpress-7.0/class-gutenberg-rest-templates-controller-7-0.php @@ -303,7 +303,7 @@ public function prepare_item_for_response( $item, $request ) { * @since 6.5.0 * * @param WP_Block_Template $template_object Template instance. - * @return string Original source of the template one of theme, plugin, site, or user. + * @return string Original source of the template one of theme, plugin, site, or user. */ private static function get_wp_templates_original_source_field( $template_object ) { if ( 'wp_template' === $template_object->type || 'wp_template_part' === $template_object->type ) { @@ -355,7 +355,7 @@ private static function get_wp_templates_original_source_field( $template_object * @since 6.5.0 * * @param WP_Block_Template $template_object Template instance. - * @return string Human readable text for the author. + * @return string Human readable text for the author. */ private static function get_wp_templates_author_text_field( $template_object ) { $original_source = self::get_wp_templates_original_source_field( $template_object ); diff --git a/lib/compat/wordpress-7.1/icons.php b/lib/compat/wordpress-7.1/icons.php index 00560daf22b153..f5224f0e15684c 100644 --- a/lib/compat/wordpress-7.1/icons.php +++ b/lib/compat/wordpress-7.1/icons.php @@ -44,7 +44,7 @@ function wp_unregister_icon_collection( $slug ) { * reserved for WordPress core icons; third-party code should * register icons under its own collection rather than the * "core" collection. - * @param array $args { + * @param array $args { * List of properties for the icon. * * @type string $label Required. A human-readable label for the icon. diff --git a/lib/compat/wordpress-7.1/query-block.php b/lib/compat/wordpress-7.1/query-block.php index 0b7551dd40b94e..f10f9ae27a4fae 100644 --- a/lib/compat/wordpress-7.1/query-block.php +++ b/lib/compat/wordpress-7.1/query-block.php @@ -8,7 +8,7 @@ /** * Filters the query loop block query vars to exclude the current post. * - * @param array $query The current query vars. + * @param array $query The current query vars. * @param WP_Block $block The block instance. * * @return array The modified query vars. diff --git a/lib/experimental/kses.php b/lib/experimental/kses.php index ef9ff81898d238..04b0edfe1ac855 100644 --- a/lib/experimental/kses.php +++ b/lib/experimental/kses.php @@ -79,7 +79,7 @@ function gutenberg_override_core_kses_init_filters() { * * This function should not be backported to core. * - * @param bool $allow_css Whether the CSS is allowed. + * @param bool $allow_css Whether the CSS is allowed. * @param string $css_test_string The CSS to test. * @return bool Whether the CSS is allowed. */ diff --git a/lib/experimental/navigation-theme-opt-in.php b/lib/experimental/navigation-theme-opt-in.php index 23e2c19341a47d..b14b5f4a8fbcee 100644 --- a/lib/experimental/navigation-theme-opt-in.php +++ b/lib/experimental/navigation-theme-opt-in.php @@ -177,7 +177,7 @@ static function ( $menu_item ) { * Transformation depends on the menu item type. Link menu items are turned into * a `core/navigation-link` block. Block menu items are simply parsed. * - * @param array $menu_items The menu items to convert, sorted by each menu item's menu order. + * @param array $menu_items The menu items to convert, sorted by each menu item's menu order. * @param array $menu_items_by_parent_id All menu items, indexed by their parent's ID. * * @return array Updated menu items, sorted by each menu item's menu order. diff --git a/lib/media/class-gutenberg-rest-attachments-controller.php b/lib/media/class-gutenberg-rest-attachments-controller.php index be431ee0eee2ca..c6654ed72895b5 100644 --- a/lib/media/class-gutenberg-rest-attachments-controller.php +++ b/lib/media/class-gutenberg-rest-attachments-controller.php @@ -1756,8 +1756,8 @@ public function finalize_item( WP_REST_Request $request ) { * https://github.com/WordPress/wordpress-develop/pull/11856; until it lands * the function_exists() guard falls back to the inline implementation below. * - * @param non-empty-string $mime_type The output image MIME type, e.g. 'image/jpeg'. - * @param array{ width?: non-negative-int, height?: non-negative-int } $size Dimensions ('width', 'height') for the wp_editor_set_quality filter. + * @param non-empty-string $mime_type The output image MIME type, e.g. 'image/jpeg'. + * @param array{ width?: non-negative-int, height?: non-negative-int } $size Dimensions ('width', 'height') for the wp_editor_set_quality filter. * @return int<1, 100> Encode quality between 1 and 100. */ private function get_image_encode_quality( string $mime_type, array $size = array() ): int {