comments_array filter-hook . WP 2.1.0
Filters the comments array.
Usage
add_filter( 'comments_array', 'filter_function_name_4044', 10, 2 ); function filter_function_name_4044( $comments, $post_ID ){ // filter... return $comments; }
- $comments(array)
- Array of comments supplied to the comments template.
- $post_ID(int)
- Post ID.
Changelog
Since 2.1.0 | Introduced. |
Where the hook is called
wp-includes/comment-template.php 1518
$wp_query->comments = apply_filters( 'comments_array', $comments_flat, $post->ID );