Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/block-supports/aria-label.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
28 changes: 14 additions & 14 deletions lib/block-supports/duotone.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
Expand All @@ -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' );
Expand Down Expand Up @@ -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' );
Expand Down Expand Up @@ -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' );
Expand Down Expand Up @@ -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' );
Expand All @@ -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' );
Expand All @@ -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' );
Expand Down
4 changes: 2 additions & 2 deletions lib/block-supports/elements.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
Expand Down
12 changes: 6 additions & 6 deletions lib/block-supports/layout.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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 ) {
Expand Down
4 changes: 2 additions & 2 deletions lib/block-supports/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/block-supports/typography.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
12 changes: 6 additions & 6 deletions lib/class-wp-duotone-gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand Down Expand Up @@ -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() ) {
Expand Down Expand Up @@ -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' );
Expand Down
42 changes: 21 additions & 21 deletions lib/class-wp-theme-json-gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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 ) ) {
Expand Down Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -4615,7 +4615,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
*/
Expand Down Expand Up @@ -4665,8 +4665,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' ) {
Expand Down Expand Up @@ -5755,7 +5755,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 ) {
Expand Down Expand Up @@ -5905,7 +5905,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.
*/
Expand Down
6 changes: 3 additions & 3 deletions lib/class-wp-theme-json-resolver-gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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 ) {
Expand Down
4 changes: 2 additions & 2 deletions lib/class-wp-theme-json-schema-gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions lib/client-assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -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__ );
Expand Down
2 changes: 1 addition & 1 deletion lib/compat/wordpress-7.1/icons.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion lib/compat/wordpress-7.1/query-block.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion lib/experimental/kses.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/experimental/navigation-theme-opt-in.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions lib/media/class-gutenberg-rest-attachments-controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Loading