Make WordPress Core

Ticket #33520: 33520.patch

File 33520.patch, 1.2 KB (added by tyxla, 9 years ago)

Docs of count_user_posts() and get_usernumposts filter - improving $post_type to describe that either a single post type or an array of post types can be passed.

  • src/wp-includes/user.php

     
    261261 * @global wpdb $wpdb WordPress database object for queries.
    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.
    267267 */
     
    281281         *
    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         */
    287287        return apply_filters( 'get_usernumposts', $count, $userid, $post_type, $public_only );