WordPress at a glance
filter is not described

comments_template_query_args filter-hook . WP 4.5.0

Filters the arguments used to query comments in comments_template().

Usage

add_filter( 'comments_template_query_args', 'filter_function_name_3454' );
function filter_function_name_3454( $comment_args ){
	// filter...

	return $comment_args;
}
$comment_args(array)

Array of WP_Comment_Query arguments.

  • $orderby (string/array)
    Field(s) to order by.

  • $order (string)
    Order of results. Accepts 'ASC' or 'DESC'.

  • $status (string)
    Comment status.

  • $include_unapproved (array)
    Array of IDs or email addresses whose unapproved comments will be included in results.

  • $post_id (int)
    ID of the post.

  • $no_found_rows (true/false)
    Whether to refrain from querying for found rows.

  • $update_comment_meta_cache (true/false)
    Whether to prime cache for comment meta.

  • $hierarchical (true/false/string)
    Whether to query for comments hierarchically.

  • $offset (int)
    Comment offset.

  • $number (int)
    Number of comments to fetch.

Where the hook is called

comments_template()
comments_template_query_args
wp-includes/comment-template.php 1417
$comment_args = apply_filters( 'comments_template_query_args', $comment_args );

Where the hook is used (in WP core)

Does not used.