Make WordPress Core

Changeset 33716


Ignore:
Timestamp:
08/23/2015 05:45:51 PM (9 years ago)
Author:
DrewAPicture
Message:

Docs: Better clarify that the $post_type parameter for the get_usernumposts filter and count_user_posts() can accept either a single post type or array of post types.

Props tyxla
See #33481. Fixes #33520.

File:
1 edited

Legend:

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

    r33710 r33716  
    262262 *
    263263 * @param int          $userid      User ID.
    264  * @param array|string $post_type   Optional. Post type(s) to count the number of posts for. Default 'post'.
     264 * @param array|string $post_type   Optional. Single post type or array of post types to count the number of posts for. Default 'post'.
    265265 * @param bool         $public_only Optional. Whether to only return counts for public posts. Default false.
    266266 * @return int Number of posts the user has written in this post type.
     
    282282     * @param int          $count       The user's post count.
    283283     * @param int          $userid      User ID.
    284      * @param string|array $post_type   Post types to count the number of posts for.
     284     * @param string|array $post_type   Single post type or array of post types to count the number of posts for.
    285285     * @param bool         $public_only Whether to limit counted posts to public posts.
    286286     */
Note: See TracChangeset for help on using the changeset viewer.