Filters the comments array.
Parameters
$comments
array- Array of comments supplied to the comments template.
$post_id
int- Post ID.
Source
$wp_query->comments = apply_filters( 'comments_array', $comments_flat, $post->ID );
Changelog
Version | Description |
---|---|
2.1.0 | Introduced. |
If you want to hide all of the existing comments for your posts, use the following function to return an empty array: