mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-02 19:54:28 +00:00
Update comment caches in WP_Comment_Query, rather than comments template.
props dd32. fixes #31081. git-svn-id: https://develop.svn.wordpress.org/trunk@32769 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -893,6 +893,9 @@ class WP_Comment_Query {
|
||||
$comments = apply_filters_ref_array( 'the_comments', array( $results, &$this ) );
|
||||
|
||||
wp_cache_add( $cache_key, $comments, 'comment' );
|
||||
if ( '*' === $fields ) {
|
||||
update_comment_cache( $comments );
|
||||
}
|
||||
|
||||
$this->comments = $comments;
|
||||
return $this->comments;
|
||||
|
||||
Reference in New Issue
Block a user