📜  wordpress 用户的帖子数量 - TypeScript 代码示例

📅  最后修改于: 2022-03-11 14:48:18.845000             🧑  作者: Mango

代码示例1
echo count_user_posts(USER,'post');             // posts
echo count_user_posts(USER,'page');             // pages
echo count_user_posts(USER,'CUSTOM_POST_TYPE'); // custom post types


// Under a conditional w/ message:
if(count_user_posts(USER,'post') > 10){
    echo 'greater than';
} else {
    echo 'less than';
}