函数原型
get_the_author_posts(): int
函数描述
Retrieves the number of posts by the author of the current post.
是否弃用
未弃用
函数参数
无
函数返回值
int The number of posts by the author.
函数位置
File: wp-includes/author-template.php.
函数源码
function get_the_author_posts() {
$post = get_post();
if ( ! $post ) {
return 0;
}
return count_user_posts( $post->post_author, $post->post_type );
}
源码链接
变更日志
| Version | Description |
|---|---|
| 1.5.0 | Introduced. |

