From 6989c5ab46c4b95e018d21562531af1c8a2fe6fc Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Wed, 28 May 2014 22:05:18 +0000 Subject: [PATCH] Fix parameter description for the `$post_id` argument in `get_comments_number()` to note that it is optional. Also fixes the corresponding filter docs, as `$post_id`, not `$post` is passed to the filter. See [27156]. Fixes #26240. Built from https://develop.svn.wordpress.org/trunk@28602 git-svn-id: http://core.svn.wordpress.org/trunk@28427 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/comment-template.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php index 4c04dfb5e9..6f8c9d83b2 100644 --- a/wp-includes/comment-template.php +++ b/wp-includes/comment-template.php @@ -678,7 +678,7 @@ function comments_link( $deprecated = '', $deprecated_2 = '' ) { * * @since 1.5.0 * - * @param int|WP_Post $post_id Post ID or WP_Post object. Default current post. + * @param int|WP_Post $post_id Optional. Post ID or WP_Post object. Default is global `$post`. * @return int The number of comments a post has. */ function get_comments_number( $post_id = 0 ) { @@ -696,7 +696,7 @@ function get_comments_number( $post_id = 0 ) { * @since 1.5.0 * * @param int $count Nnumber of comments a post has. - * @param int|WP_Post $post_id Post ID or WP_Post object. + * @param int $post_id Post ID. */ return apply_filters( 'get_comments_number', $count, $post_id ); }