get_usernumposts

函数
get_usernumposts ( $userid )
参数
  • (int) $userid User to count posts for.
    Required:
返回值
  • (int) Number of posts the given user has written.
相关
  • count_user_posts()
定义位置
相关方法
get_postsget_usersget_usermetaget_users_draftsget_user_meta
引入
0.71
弃用
3.0.0

get_usernumposts: 这个函数用来检索WordPress中一个特定用户的发表文章的数量: 该函数以一个用户ID为参数,并返回一个代表已发表文章数量的整数值。

检索一个用户所写的文章的数量。

function get_usernumposts( $userid ) {
	_deprecated_function( __FUNCTION__, '3.0.0', 'count_user_posts()' );
	return count_user_posts( $userid );
}

常见问题

FAQs
查看更多 >
闪电侠

(工作日 10:00 - 18:30 为您服务)

2025-12-05 18:32:58

您好,无论是售前、售后、意见建议……均可通过联系工单与我们取得联系。

您也可选择聊天工具与我们即时沟通或点击查看:

您的工单我们已经收到,我们将会尽快跟您联系!
取消
选择聊天工具: