函数原型
get_usernumposts( int $userid ): int
函数描述
Retrieves the number of posts a user has written.
是否弃用
Warning: This function has been deprecated. Use count_user_posts() instead.
函数参数
-
$userid
int
Required - User to count posts for.
函数返回值
int Number of posts the given user has written.
函数位置
File: wp-includes/deprecated.php.
函数源码
function get_usernumposts( $userid ) {
_deprecated_function( __FUNCTION__, '3.0.0', 'count_user_posts()' );
return count_user_posts( $userid );
}
源码链接
变更日志
| Version | Description |
|---|---|
| 3.0.0 | Use count_user_posts() |
| 0.71 | Introduced. |

