get_usernumposts

Advertisement

Summery Summery

Filters the number of posts a user has written.

Syntax Syntax

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

Parameters Parameters

$count

The user's post count.

$userid

User ID.

$post_type

Single post type or array of post types to count the number of posts for.

$public_only

Whether to limit counted posts to public posts.

Source Source

File: wp-includes/user.php

Advertisement

Changelog Changelog

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

Advertisement

Leave a Reply