comments_array

comments_array

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.7.2

apply_filters('comments_array') is found 1 times:

  • /wp-includes/comment-template.php line 1593
    1589
    1590
    1591
    1592
    1593
    1594
    1595
    1596
    1597
    1598
    1599
    *
     * @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 ) {

See this hook used in plugins:

Examples using comments_array