WordPress函数文档count_many_users_posts()

返回多个用户的文章总数 描述 Returns the post counts for a list of us…

返回多个用户的文章总数

描述

Returns the post counts for a list of user IDs. This is an O(n) operation, so it is preferred over count_user_posts() any time more than a single count is needed.

用法

 <?php count_many_users_posts$users$post_type$public_only ); ?> 

参数

$users

(array) (必填) List of ID values of the users whose post counts should be retrieved.

默认值: None

$post_type

(string) (可选) Name of the post type

默认值: null

$public_only

(string) (可选) Bypasses checking capabilities of current user (False) or returns posts only if they can be viewed by current user (True).

默认值: False

历史

  • 3.5.0: 添加 public_only parameter
  • 添加于 版本: 3.0.0

源文件

count_many_users_posts() 函数的代码位于 wp-includes/user.php.

相关

count_user_posts,
get_posts_by_author_sql

  • 原文:http://codex.wordpress.org/Function_Reference/count_many_users_posts
类别:WordPress函数文档

本文收集自互联网,转载请注明来源。
如有侵权,请联系 wper_net@163.com 删除。

评论 (0)COMMENT