diff options
Diffstat (limited to 'plugins/akismet/class.akismet.php')
-rw-r--r-- | plugins/akismet/class.akismet.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/akismet/class.akismet.php b/plugins/akismet/class.akismet.php index 9b70d9ec..7dc8ba91 100644 --- a/plugins/akismet/class.akismet.php +++ b/plugins/akismet/class.akismet.php @@ -575,6 +575,11 @@ class Akismet { if ( $new_status == $old_status ) return; + if ( 'spam' === $new_status || 'spam' === $old_status ) { + // Clear the cache of the "X comments in your spam queue" count on the dashboard. + wp_cache_delete( 'akismet_spam_count', 'widget' ); + } + # we don't need to record a history item for deleted comments if ( $new_status == 'delete' ) return; |