get_usernumposts

過濾鉤子
apply_filters( 'get_usernumposts', $count, $userid, $post_type, $public_only )
引數
  • (int) $count The user's post count.
    Required:
  • (int) $userid User ID.
    Required:
  • (string|array) $post_type Single post type or array of post types to count the number of posts for.
    Required:
  • (bool) $public_only Whether to limit counted posts to public posts.
    Required:
定義位置
相關勾子
get_users_draftsget_termsget_terms_argsget_terms_defaultsusername_exists
相關方法
get_usernumpostsget_postsget_usersget_usermetaget_users_draftsget_user_meta
引入
4.3.1
棄用
-

get_usernumposts: 這個函式檢索一個特定使用者所寫的文章的數量。該使用者是由使用者ID指定的。

過濾一個使用者所寫的文章的數量。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
return apply_filters( 'get_usernumposts', $count, $userid, $post_type, $public_only );
return apply_filters( 'get_usernumposts', $count, $userid, $post_type, $public_only );
return apply_filters( 'get_usernumposts', $count, $userid, $post_type, $public_only );

常見問題

FAQs
檢視更多 >