Closed
Conversation
costdev
requested changes
Nov 26, 2022
Contributor
costdev
left a comment
There was a problem hiding this comment.
Thanks for the PR @riccardodicurti!
This review contains suggestions for consistency in Core and to add the default value for each optional parameter.
src/wp-admin/includes/template.php
Outdated
| * @since 2.5.1 | ||
| * | ||
| * @param int $link_id | ||
| * @param int $link_id Optional. The link ID. |
Contributor
There was a problem hiding this comment.
Suggested change
| * @param int $link_id Optional. The link ID. | |
| * @param int $link_id Optional. The link ID. Default 0. |
src/wp-admin/includes/template.php
Outdated
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. |
Contributor
There was a problem hiding this comment.
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. |
src/wp-admin/includes/template.php
Outdated
| * @since 2.7.0 | ||
| * | ||
| * @param string $found_action | ||
| * @param string $found_action Optional. Value to assign to the found_action input field. |
Contributor
There was a problem hiding this comment.
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. |
src/wp-admin/includes/template.php
Outdated
| * @since 1.2.0 | ||
| * | ||
| * @param array $meta | ||
| * @param array $meta Array of meta data arrays. |
Contributor
There was a problem hiding this comment.
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'. |
src/wp-admin/includes/template.php
Outdated
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. |
Contributor
There was a problem hiding this comment.
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.
costdev
approved these changes
Nov 26, 2022
Contributor
costdev
left a comment
There was a problem hiding this comment.
Thanks for the updates @riccardodicurti! LGTM 👍
Contributor
|
Thanks everyone. Committed in https://core.trac.wordpress.org/changeset/54883 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.