From 8479ff90bcbab4d1585c169a095df2453d2506ba Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Mon, 14 Sep 2015 22:39:24 +0000 Subject: [PATCH] Ensure that the count cache for `all` is in sync with `comment-{$post_id}` values. These are the values most often relied-upon by the list table for comments. Adds unit tests. See #33875. Built from https://develop.svn.wordpress.org/trunk@34136 git-svn-id: http://core.svn.wordpress.org/trunk@34104 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/comment-functions.php | 1 + wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-includes/comment-functions.php b/wp-includes/comment-functions.php index b1127fa9d1..b54528d56c 100644 --- a/wp-includes/comment-functions.php +++ b/wp-includes/comment-functions.php @@ -1916,6 +1916,7 @@ function wp_update_comment_count_now($post_id) { clean_post_cache( $post ); + wp_cache_delete( 'comments-0', 'counts' ); wp_cache_delete( "comments-{$post_id}", 'counts' ); /** diff --git a/wp-includes/version.php b/wp-includes/version.php index 749e2da27c..57a7c5ae3b 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-34135'; +$wp_version = '4.4-alpha-34136'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.