Make WordPress Core

Changeset 33710


Ignore:
Timestamp:
08/22/2015 06:58:18 PM (9 years ago)
Author:
boonebgorges
Message:

Pass the $public_only value to 'get_usernumposts' filter.

[32523] introduced the $public_only parameter to count_user_posts(). That
changeset was supposed to pass $public_only to the 'get_usernumposts' filter
at the end of the function, but only the documentation was modified, not the
filter itself.

This changeset also fixes an incorrect variable name in the docblock for
the same filter.

Props swisspidy, tmatsuur.
Fixes #33481 for trunk.

File:
1 edited

Legend:

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

    r33708 r33710  
    278278     * @since 2.7.0
    279279     * @since 4.1.0 Added `$post_type` argument.
    280      * @since 4.3.0 Added `$public_only` argument.
     280     * @since 4.3.1 Added `$public_only` argument.
    281281     *
    282282     * @param int          $count       The user's post count.
    283283     * @param int          $userid      User ID.
    284      * @param string|array $post_types  Post types to count the number of posts for.
     284     * @param string|array $post_type   Post types to count the number of posts for.
    285285     * @param bool         $public_only Whether to limit counted posts to public posts.
    286286     */
    287     return apply_filters( 'get_usernumposts', $count, $userid, $post_type );
     287    return apply_filters( 'get_usernumposts', $count, $userid, $post_type, $public_only );
    288288}
    289289
Note: See TracChangeset for help on using the changeset viewer.