Skip to content

57208#3689

Closed
riccardodicurti wants to merge 2 commits intoWordPress:trunkfrom
riccardodicurti:57208
Closed

57208#3689
riccardodicurti wants to merge 2 commits intoWordPress:trunkfrom
riccardodicurti:57208

Conversation

@riccardodicurti
Copy link
Copy Markdown

Added missing comment about parameters for some functions.

Trac ticket: https://core.trac.wordpress.org/ticket/57208


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

Copy link
Copy Markdown
Contributor

@costdev costdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @riccardodicurti!

This review contains suggestions for consistency in Core and to add the default value for each optional parameter.

* @since 2.5.1
*
* @param int $link_id
* @param int $link_id Optional. The link ID.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @param int $link_id Optional. The link ID.
* @param int $link_id Optional. The link ID. Default 0.

Comment on lines +405 to +408
* @param int $position Optional. Value to assign to the position input field.
* @param bool $checkbox Optional. Value to assign to the checkbox input field.
* @param string $mode Optional. Use WP_Post_Comments_List_Table instead WP_Comments_List_Table.
* @param bool $table_row Optional. Use table instead div.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @param int $position Optional. Value to assign to the position input field.
* @param bool $checkbox Optional. Value to assign to the checkbox input field.
* @param string $mode Optional. Use WP_Post_Comments_List_Table instead WP_Comments_List_Table.
* @param bool $table_row Optional. Use table instead div.
* @param int $position Optional. The value of the 'position' input field. Default 1.
* @param bool $checkbox Optional. The value of the 'checkbox' input field. Default false.
* @param string $mode Optional. If set to 'single', will use WP_Post_Comments_List_Table, otherwise WP_Comments_List_Table. Default 'single'.
* @param bool $table_row Optional. Whether to use a table instead of a div element. Default true.

* @since 2.7.0
*
* @param string $found_action
* @param string $found_action Optional. Value to assign to the found_action input field.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @param string $found_action Optional. Value to assign to the found_action input field.
* @param string $found_action Optional. Value of the 'found_action' input field. Default empty string.

* @since 1.2.0
*
* @param array $meta
* @param array $meta Array of meta data arrays.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @param array $meta Array of meta data arrays.
* @param array[] $meta An array of meta data arrays keyed on 'meta_key' and 'meta_value'.

Comment on lines +612 to +614
* @param array $entry Array of meta data.
* @param int $count Counter variable passed by reference.
* @return string Single row of public meta data.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @param array $entry Array of meta data.
* @param int $count Counter variable passed by reference.
* @return string Single row of public meta data.
* @param array $entry An array of meta data keyed on 'meta_key' and 'meta_value'.
* @param int $count Reference to the row number.
* @return string A single row of public meta data.

Only @param annotations should be aligned with each other. @return should have a single space.

Copy link
Copy Markdown
Contributor

@costdev costdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the updates @riccardodicurti! LGTM 👍

@audrasjb
Copy link
Copy Markdown
Contributor

Thanks everyone. Committed in https://core.trac.wordpress.org/changeset/54883

@audrasjb audrasjb closed this Nov 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants