get_page_of_comment_query_args

過濾鉤子
apply_filters( 'get_page_of_comment_query_args', $comment_args )
引數
  • (array) $comment_args { Array of WP_Comment_Query arguments. @type string $type Limit paginated comments to those matching a given type. Accepts 'comment', 'trackback', 'pingback', 'pings' (trackbacks and pingbacks), or 'all'. Default 'all'. @type int $post_id ID of the post. @type string $fields Comment fields to return. @type bool $count Whether to return a comment count (true) or array of comment objects (false). @type string $status Comment status. @type int $parent Parent ID of comment to retrieve children of. @type array $date_query Date query clauses to limit comments by. See WP_Date_Query. @type array $include_unapproved Array of IDs or email addresses whose unapproved comments will be included in paginated comments. }
    Required:
定義位置
相關勾子
get_page_of_commentrest_comment_querypre_comment_user_agentwidget_comments_argscomments_template_query_args
相關方法
get_page_of_commentwp_edit_attachments_query_varsget_comment_metaget_cancel_comment_reply_linkget_comments_numberget_comment_class
引入
5.5.0
棄用
-

get_page_of_comment_query_args是一個WordPress函式,用於檢索用於檢索給定文章的評論的查詢引數: 該函式接受一個文章ID作為引數,並返回一個用於評論查詢的引數陣列。

過濾get_page_of_comment()中用於查詢評論的引數。

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

常見問題

FAQs
檢視更多 >