Filters the comments array.
$commentsarray$post_idintwp-includes/comment-template.php:1593comments_template() * * @since 2.1.0 * * @param array $comments Array of comments supplied to the comments template. * @param int $post_id Post ID. */ $wp_query->comments = apply_filters( 'comments_array', $comments_flat, $post->ID ); $comments = &$wp_query->comments; $wp_query->comment_count = count( $wp_query->comments ); $wp_query->max_num_comment_pages = $comment_query->max_num_pages; if ( $separate_comments ) {Introduced in 2.1.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.