Filters the comments array.
$commentsarray
$post_idint
Used inside comments_template that allows you to catch all the comments going through the query for the post.
$wp_query->comments = apply_filters( 'comments_array', $comments_flat, $post->ID );
| Version | Description |
|---|---|
| 2.1.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/comments_array