Filters the arguments used to query comments in comments_template().
$comment_argsarray$orderbystring|array
$orderstring
$statusstring
$include_unapprovedarray
$post_idint
$no_found_rowsbool
$update_comment_meta_cachebool
$hierarchicalbool|string
$offsetint
$numberint
wp-includes/comment-template.php:1559comments_template() * @type bool $update_comment_meta_cache Whether to prime cache for comment meta. * @type bool|string $hierarchical Whether to query for comments hierarchically. * @type int $offset Comment offset. * @type int $number Number of comments to fetch. * } */ $comment_args = apply_filters( 'comments_template_query_args', $comment_args ); $comment_query = new WP_Comment_Query( $comment_args ); $_comments = $comment_query->comments; // Trees must be flattened before they're passed to the walker. if ( $comment_args['hierarchical'] ) {Introduced in 4.5.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.