Make WordPress Core

Ticket #31081: 31081.2.diff

File 31081.2.diff, 1.0 KB (added by rachelbaker, 10 years ago)
  • src/wp-includes/comment-template.php

     
    12021202        $wp_query->comments = apply_filters( 'comments_array', $comments, $post->ID );
    12031203        $comments = &$wp_query->comments;
    12041204        $wp_query->comment_count = count($wp_query->comments);
    1205         update_comment_cache($wp_query->comments);
    12061205
    12071206        if ( $separate_comments ) {
    12081207                $wp_query->comments_by_type = separate_comments($comments);
  • src/wp-includes/comment.php

     
    893893                $comments = apply_filters_ref_array( 'the_comments', array( $results, &$this ) );
    894894
    895895                wp_cache_add( $cache_key, $comments, 'comment' );
     896                if ( '*' === $fields ) {
     897                        update_comment_cache( $comments );
     898                }
    896899
    897900                $this->comments = $comments;
    898901                return $this->comments;