Make WordPress Core

Changeset 28602


Ignore:
Timestamp:
05/28/2014 10:04:59 PM (11 years ago)
Author:
DrewAPicture
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/comment-template.php

    r28563 r28602  
    679679 * @since 1.5.0
    680680 *
    681  * @param int|WP_Post $post_id Post ID or WP_Post object. Default current post.
     681 * @param int|WP_Post $post_id Optional. Post ID or WP_Post object. Default is global `$post`.
    682682 * @return int The number of comments a post has.
    683683 */
     
    697697     *
    698698     * @param int         $count   Nnumber of comments a post has.
    699      * @param int|WP_Post $post_id Post ID or WP_Post object.
     699     * @param int $post_id Post ID.
    700700     */
    701701    return apply_filters( 'get_comments_number', $count, $post_id );
Note: See TracChangeset for help on using the changeset viewer.