count_user_posts ( $userid, $post_type = 'post', $public_only = false )
- (int) $userid User ID.
- (array|string) $post_type Optional. Single post type or array of post types to count the number of posts for. Default 'post'.
- (bool) $public_only Optional. Whether to only return counts for public posts. Default false.
Defined at:Change Log:
- (string) Number of posts the user has written in this post type.
- Introduced in WordPress: 3.0.0
- Deprecated in WordPress: —
Number of posts user has written.