Core Function
View Source on Trac ↗ count_many_users_posts()
count_many_users_posts( mixed $users, mixed $post_type = 'post', mixed $public_only = false ) Gets the number of posts written by a list of users.
Parameters 2 required
| Name / Type | Description |
|---|---|
| $users int[] | Array of user IDs. Required |
| (string | | string[]) $post_type Optional. Single post type or array of post types to check. Defaults to 'post'. Required |
| $public_only bool | Optional. Only return counts for public posts. Defaults to false. |
Return Value
(string[])
Amount of posts each user has written, as strings, keyed by user ID.
Function Information
Since Version
3.0.0
Source File
wp-includes/user.php
Advertisement