pre_wp_list_authors_post_counts_query

過濾鉤子
apply_filters( 'pre_wp_list_authors_post_counts_query', false, $parsed_args )
引數
  • (int[]|false) $post_counts Array of post counts, keyed by author ID.
    Required:
  • (array) $parsed_args The arguments passed to wp_list_authors() combined with the defaults.
    Required:
定義位置
相關勾子
rest_this-post_type_querywp_list_authors_argsrest_post_format_search_querywp_sitemaps_posts_query_argsrest_post_search_query
相關方法
get_author_posts_urlwp_edit_posts_querywp_edit_attachments_querywp_untrash_post_commentswp_list_authorswp_trash_post_comments
引入
6.1.0
棄用
-

pre_wp_list_authors_post_counts_query是一個過濾鉤子,用於在執行作者文章計數查詢前過濾。這個過濾器可以用來修改作者文章計數查詢,或者給查詢新增額外的條件。

過濾是否短路執行作者文章數量的查詢。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$post_counts = apply_filters( 'pre_wp_list_authors_post_counts_query', false, $parsed_args );
$post_counts = apply_filters( 'pre_wp_list_authors_post_counts_query', false, $parsed_args );
$post_counts = apply_filters( 'pre_wp_list_authors_post_counts_query', false, $parsed_args );

常見問題

FAQs
檢視更多 >