Filters the arguments used in the top level comments query.
$top_level_argsarray$countbool
$orderbystring|array
$post_idint
$statusstring|array
wp-includes/comment-template.php:1528comments_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. * } */ $top_level_args = apply_filters( 'comments_template_top_level_query_args', $top_level_args ); $top_level_count = $top_level_query->query( $top_level_args ); $comment_args['offset'] = ( (int) ceil( $top_level_count / $per_page ) - 1 ) * $per_page; } }Introduced in 5.6.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.