Make WordPress Core

Changeset 32769


Ignore:
Timestamp:
06/14/2015 07:20:12 PM (11 years ago)
Author:
nacin
Message:

Update comment caches in WP_Comment_Query, rather than comments template.

props dd32.
fixes #31081.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/comment-template.php

    r32568 r32769  
    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 ) {
  • trunk/src/wp-includes/comment.php

    r32650 r32769  
    894894
    895895                wp_cache_add( $cache_key, $comments, 'comment' );
     896                if ( '*' === $fields ) {
     897                        update_comment_cache( $comments );
     898                }
    896899
    897900                $this->comments = $comments;
Note: See TracChangeset for help on using the changeset viewer.