W3cubDocs

/WordPress

apply_filters( 'get_usernumposts', int $count, int $userid, string|array $post_type, bool $public_only )

Filters the number of posts a user has written.

Parameters

$count

(int) The user's post count.

$userid

(int) User ID.

$post_type

(string|array) Single post type or array of post types to count the number of posts for.

$public_only

(bool) Whether to limit counted posts to public posts.

Source

File: wp-includes/user.php

View on Trac

Changelog

Version Description
4.3.1 Added $public_only argument.
4.1.0 Added $post_type argument.
2.7.0 Introduced.

© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/get_usernumposts