首页 WordPress函数大全 count_user_posts()

count_user_posts()

2020-05-01 / 3535阅 / 悠然

如何你看完本文还不知道如何使用该函数,可以联系我定制视频教程,50元/个函数,学不会全额退款

count_user_posts( int $userid, array|string $post_type = 'post', bool $public_only = false )

Number of posts user has written.

描述

参数

$userid

(int)
(Required)
User ID.

$post_type

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

Default value: 'post'

$public_only

(bool)
(Optional)
Whether to>Default value: false

返回

(string) Number of posts the user has written in this post type.

大家谈论
    我的见解