Docs: Upgrade more parameters in docblocks to used typed array notation.

See #51800, #41756

Built from https://develop.svn.wordpress.org/trunk@49693


git-svn-id: http://core.svn.wordpress.org/trunk@49416 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
John Blackbourn
2020-11-24 21:27:05 +00:00
parent 780cdb5eb5
commit f4cda1b62f
19 changed files with 90 additions and 89 deletions

View File

@@ -422,12 +422,12 @@ function comment_author_url_link( $linktext = '', $before = '', $after = '', $co
* @since 2.7.0
* @since 4.4.0 Added the ability for `$comment` to also accept a WP_Comment object.
*
* @param string|array $class Optional. One or more classes to add to the class list.
* Default empty.
* @param int|WP_Comment $comment Comment ID or WP_Comment object. Default current comment.
* @param int|WP_Post $post_id Post ID or WP_Post object. Default current post.
* @param bool $echo Optional. Whether to echo or return the output.
* Default true.
* @param string|string[] $class Optional. One or more classes to add to the class list.
* Default empty.
* @param int|WP_Comment $comment Comment ID or WP_Comment object. Default current comment.
* @param int|WP_Post $post_id Post ID or WP_Post object. Default current post.
* @param bool $echo Optional. Whether to echo or return the output.
* Default true.
* @return void|string Void if `$echo` argument is true, comment classes if `$echo` is false.
*/
function comment_class( $class = '', $comment = null, $post_id = null, $echo = true ) {
@@ -451,9 +451,9 @@ function comment_class( $class = '', $comment = null, $post_id = null, $echo = t
* @global int $comment_depth
* @global int $comment_thread_alt
*
* @param string|array $class Optional. One or more classes to add to the class list. Default empty.
* @param int|WP_Comment $comment_id Comment ID or WP_Comment object. Default current comment.
* @param int|WP_Post $post_id Post ID or WP_Post object. Default current post.
* @param string|string[] $class Optional. One or more classes to add to the class list. Default empty.
* @param int|WP_Comment $comment_id Comment ID or WP_Comment object. Default current comment.
* @param int|WP_Post $post_id Post ID or WP_Post object. Default current post.
* @return string[] An array of classes.
*/
function get_comment_class( $class = '', $comment_id = null, $post_id = null ) {
@@ -530,7 +530,7 @@ function get_comment_class( $class = '', $comment_id = null, $post_id = null ) {
* @since 2.7.0
*
* @param string[] $classes An array of comment classes.
* @param string $class A comma-separated list of additional classes added to the list.
* @param string[] $class An array of additional classes added to the list.
* @param int $comment_id The comment ID.
* @param WP_Comment $comment The comment object.
* @param int|WP_Post $post_id The post ID or WP_Post object.