diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2017-12-26 04:12:07 -0500 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2017-12-26 04:12:07 -0500 |
commit | 818606f5cc969538a23e2029312685b36f79eac7 (patch) | |
tree | 527f0f70e376f562aaa624551c9e32fba63e3bcd /plugins/akismet/class.akismet.php | |
parent | Update jetpack 5.6.1 (diff) | |
download | blogs-gentoo-818606f5cc969538a23e2029312685b36f79eac7.tar.gz blogs-gentoo-818606f5cc969538a23e2029312685b36f79eac7.tar.bz2 blogs-gentoo-818606f5cc969538a23e2029312685b36f79eac7.zip |
Update akismet 4.0.2
Diffstat (limited to 'plugins/akismet/class.akismet.php')
-rw-r--r-- | plugins/akismet/class.akismet.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/akismet/class.akismet.php b/plugins/akismet/class.akismet.php index 32b23ea8..867430fc 100644 --- a/plugins/akismet/class.akismet.php +++ b/plugins/akismet/class.akismet.php @@ -701,7 +701,13 @@ class Akismet { foreach ( (array) $comment_errors as $comment_id ) { // if the comment no longer exists, or is too old, remove the meta entry from the queue to avoid getting stuck $comment = get_comment( $comment_id ); - if ( !$comment || strtotime( $comment->comment_date_gmt ) < strtotime( "-15 days" ) ) { + + if ( + ! $comment // Comment has been deleted + || strtotime( $comment->comment_date_gmt ) < strtotime( "-15 days" ) // Comment is too old. + || $comment->comment_approved !== "0" // Comment is no longer in the Pending queue + ) { + echo "Deleting"; delete_comment_meta( $comment_id, 'akismet_error' ); delete_comment_meta( $comment_id, 'akismet_delayed_moderation_email' ); continue; |