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 Parameters


(int) The user's post count.


(int) User ID.


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


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

Top ↑

Source Source

File: wp-includes/user.php

View on Trac

Top ↑

Changelog Changelog

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

Top ↑

User Contributed Notes User Contributed Notes

Top ↑

You must log in before being able to contribute a note or feedback.