comments_template_top_level_query_args

過濾鉤子
apply_filters( 'comments_template_top_level_query_args', $top_level_args )
引數
  • (array) $top_level_args { The top level query arguments for the comments template. @type bool $count Whether to return a comment count. @type string|array $orderby The field(s) to order by. @type int $post_id The post ID. @type string|array $status The comment status to limit results by. }
    Required:
定義位置
相關勾子
comments_template_query_argscomments_list_table_query_argscomments_templateusers_list_table_query_argscomment_reply_link_args
相關方法
comments_templateget_template_directory_uriremove_query_argget_template_partblock_core_comment_template_render_commentsget_template_directory
引入
5.6.0
棄用
-

omments_template_top_level_query_args過濾鉤子是用來修改查詢引數的,這些引數在被傳遞給評論模板之前用於檢索頂級評論。

過濾頂層評論查詢中使用的引數。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$top_level_args = apply_filters( 'comments_template_top_level_query_args', $top_level_args );
$top_level_args = apply_filters( 'comments_template_top_level_query_args', $top_level_args );
$top_level_args = apply_filters( 'comments_template_top_level_query_args', $top_level_args );

常見問題

FAQs
檢視更多 >