Akismet Anti-Spam - Version 4.2.5

Version Description

Release Date - 11 July 2022

  • Fixed a bug that added unnecessary comment history entries after comment rechecks.
  • Added a notice that displays when WP-Cron is disabled and might be affecting comment rechecks.
Download this release

Release Info

Developer cfinke
Plugin Icon 128x128 Akismet Anti-Spam
Version 4.2.5
Comparing to
See all releases

Code changes from version 4.2.4 to 4.2.5

Files changed (6) hide show
  1. akismet.php +3 -3
  2. changelog.txt +50 -6
  3. class.akismet-admin.php +11 -2
  4. class.akismet.php +2 -2
  5. readme.txt +9 -47
  6. views/notice.php +5 -0
akismet.php CHANGED
@@ -6,7 +6,7 @@
6
  Plugin Name: Akismet Anti-Spam
7
  Plugin URI: https://akismet.com/
8
  Description: Used by millions, Akismet is quite possibly the best way in the world to <strong>protect your blog from spam</strong>. It keeps your site protected even while you sleep. To get started: activate the Akismet plugin and then go to your Akismet Settings page to set up your API key.
9
- Version: 4.2.4
10
  Author: Automattic
11
  Author URI: https://automattic.com/wordpress-plugins/
12
  License: GPLv2 or later
@@ -28,7 +28,7 @@ You should have received a copy of the GNU General Public License
28
  along with this program; if not, write to the Free Software
29
  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
30
 
31
- Copyright 2005-2015 Automattic, Inc.
32
  */
33
 
34
  // Make sure we don't expose any info if called directly
@@ -37,7 +37,7 @@ if ( !function_exists( 'add_action' ) ) {
37
  exit;
38
  }
39
 
40
- define( 'AKISMET_VERSION', '4.2.4' );
41
  define( 'AKISMET__MINIMUM_WP_VERSION', '5.0' );
42
  define( 'AKISMET__PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
43
  define( 'AKISMET_DELETE_LIMIT', 10000 );
6
  Plugin Name: Akismet Anti-Spam
7
  Plugin URI: https://akismet.com/
8
  Description: Used by millions, Akismet is quite possibly the best way in the world to <strong>protect your blog from spam</strong>. It keeps your site protected even while you sleep. To get started: activate the Akismet plugin and then go to your Akismet Settings page to set up your API key.
9
+ Version: 4.2.5
10
  Author: Automattic
11
  Author URI: https://automattic.com/wordpress-plugins/
12
  License: GPLv2 or later
28
  along with this program; if not, write to the Free Software
29
  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
30
 
31
+ Copyright 2005-2022 Automattic, Inc.
32
  */
33
 
34
  // Make sure we don't expose any info if called directly
37
  exit;
38
  }
39
 
40
+ define( 'AKISMET_VERSION', '4.2.5' );
41
  define( 'AKISMET__MINIMUM_WP_VERSION', '5.0' );
42
  define( 'AKISMET__PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
43
  define( 'AKISMET_DELETE_LIMIT', 10000 );
changelog.txt CHANGED
@@ -5,6 +5,50 @@
5
  This file contains older changelog entries, so we can keep the size of the standard WordPress readme.txt file reasonable.
6
  For the latest changes, please see the "Changelog" section of the [readme.txt file](https://plugins.svn.wordpress.org/akismet/trunk/readme.txt).
7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  = 4.1.5 =
9
  *Release Date - 29 April 2020*
10
 
@@ -56,7 +100,7 @@ For the latest changes, please see the "Changelog" section of the [readme.txt fi
56
  *Release Date - 19 June 2018*
57
 
58
  * Improved the grammar and consistency of the in-admin privacy related notes (notice and config).
59
- * Revised in-admin explanation of the comment form privacy notice to make its usage clearer.
60
  * Added `rel="nofollow noopener"` to the comment form privacy notice to improve SEO and security.
61
 
62
  = 4.0.7 =
@@ -69,7 +113,7 @@ For the latest changes, please see the "Changelog" section of the [readme.txt fi
69
  = 4.0.6 =
70
  *Release Date - 26 May 2018*
71
 
72
- * Moved away from using `empty( get_option() )` to instantiating a variable to be compatible with older versions of PHP (5.3, 5.4, etc).
73
 
74
  = 4.0.5 =
75
  *Release Date - 26 May 2018*
@@ -132,7 +176,7 @@ For the latest changes, please see the "Changelog" section of the [readme.txt fi
132
  *Release Date - 10 May 2017*
133
 
134
  * Fixed a bug causing JavaScript errors in some browsers.
135
-
136
  = 3.3.1 =
137
  *Release Date - 2 May 2017*
138
 
@@ -293,7 +337,7 @@ For the latest changes, please see the "Changelog" section of the [readme.txt fi
293
  *Release Date - 18th March, 2014*
294
 
295
  * Add ajax paging to the check for spam button to handle large volumes of comments
296
- * Optimize javascript and add localization support
297
  * Fix bug in link to spam comments from right now dashboard widget
298
  * Fix bug with deleting old comments to avoid timeouts dealing with large volumes of comments
299
  * Include X-Pingback-Forwarded-For header in outbound WordPress pingback verifications
@@ -353,7 +397,7 @@ For the latest changes, please see the "Changelog" section of the [readme.txt fi
353
  * Move wp-admin menu items under Jetpack, if it is installed
354
  * Purge old Akismet comment meta data, default of 15 days
355
 
356
- = 2.5.3 =
357
  *Release Date - 8th Febuary, 2011*
358
 
359
  * Specify the license is GPL v2 or later
@@ -393,7 +437,7 @@ For the latest changes, please see the "Changelog" section of the [readme.txt fi
393
  *Release Date - 7th December, 2010*
394
 
395
  * Track comment actions under 'Akismet Status' on the edit comment screen
396
- * Fix a few remaining deprecated function calls ( props Mike Glendinning )
397
  * Use HTTPS for the stats IFRAME when wp-admin is using HTTPS
398
  * Use the WordPress HTTP class if available
399
  * Move the admin UI code to a separate file, only loaded when needed
5
  This file contains older changelog entries, so we can keep the size of the standard WordPress readme.txt file reasonable.
6
  For the latest changes, please see the "Changelog" section of the [readme.txt file](https://plugins.svn.wordpress.org/akismet/trunk/readme.txt).
7
 
8
+ = 4.1.12 =
9
+ *Release Date - 3 September 2021*
10
+
11
+ * Fixed "Use of undefined constant" notice.
12
+ * Improved styling of alert notices.
13
+
14
+ = 4.1.11 =
15
+ *Release Date - 23 August 2021*
16
+
17
+ * Added support for Akismet API usage notifications on Akismet settings and edit-comments admin pages.
18
+ * Added support for the deleted_comment action when bulk-deleting comments from Spam.
19
+
20
+ = 4.1.10 =
21
+ *Release Date - 6 July 2021*
22
+
23
+ * Simplified the code around checking comments in REST API and XML-RPC requests.
24
+ * Updated Plus plan terminology in notices to match current subscription names.
25
+ * Added `rel="noopener"` to the widget link to avoid warnings in Google Lighthouse.
26
+ * Set the Akismet JavaScript as deferred instead of async to improve responsiveness.
27
+ * Improved the preloading of screenshot popups on the edit comments admin page.
28
+
29
+ = 4.1.9 =
30
+ *Release Date - 2 March 2021*
31
+
32
+ * Improved handling of pingbacks in XML-RPC multicalls
33
+
34
+ = 4.1.8 =
35
+ *Release Date - 6 January 2021*
36
+
37
+ * Fixed missing fields in submit-spam and submit-ham calls that could lead to reduced accuracy.
38
+ * Fixed usage of deprecated jQuery function.
39
+
40
+ = 4.1.7 =
41
+ *Release Date - 22 October 2020*
42
+
43
+ * Show the "Set up your Akismet account" banner on the comments admin screen, where it's relevant to mention if Akismet hasn't been configured.
44
+ * Don't use wp_blacklist_check when the new wp_check_comment_disallowed_list function is available.
45
+
46
+ = 4.1.6 =
47
+ *Release Date - 4 June 2020*
48
+
49
+ * Disable "Check for Spam" button until the page is loaded to avoid errors with clicking through to queue recheck endpoint directly.
50
+ * Added filter "akismet_enable_mshots" to allow disabling screenshot popups on the edit comments admin page.
51
+
52
  = 4.1.5 =
53
  *Release Date - 29 April 2020*
54
 
100
  *Release Date - 19 June 2018*
101
 
102
  * Improved the grammar and consistency of the in-admin privacy related notes (notice and config).
103
+ * Revised in-admin explanation of the comment form privacy notice to make its usage clearer.
104
  * Added `rel="nofollow noopener"` to the comment form privacy notice to improve SEO and security.
105
 
106
  = 4.0.7 =
113
  = 4.0.6 =
114
  *Release Date - 26 May 2018*
115
 
116
+ * Moved away from using `empty( get_option() )` to instantiating a variable to be compatible with older versions of PHP (5.3, 5.4, etc).
117
 
118
  = 4.0.5 =
119
  *Release Date - 26 May 2018*
176
  *Release Date - 10 May 2017*
177
 
178
  * Fixed a bug causing JavaScript errors in some browsers.
179
+
180
  = 3.3.1 =
181
  *Release Date - 2 May 2017*
182
 
337
  *Release Date - 18th March, 2014*
338
 
339
  * Add ajax paging to the check for spam button to handle large volumes of comments
340
+ * Optimize javascript and add localization support
341
  * Fix bug in link to spam comments from right now dashboard widget
342
  * Fix bug with deleting old comments to avoid timeouts dealing with large volumes of comments
343
  * Include X-Pingback-Forwarded-For header in outbound WordPress pingback verifications
397
  * Move wp-admin menu items under Jetpack, if it is installed
398
  * Purge old Akismet comment meta data, default of 15 days
399
 
400
+ = 2.5.3 =
401
  *Release Date - 8th Febuary, 2011*
402
 
403
  * Specify the license is GPL v2 or later
437
  *Release Date - 7th December, 2010*
438
 
439
  * Track comment actions under 'Akismet Status' on the edit comment screen
440
+ * Fix a few remaining deprecated function calls ( props Mike Glendinning )
441
  * Use HTTPS for the stats IFRAME when wp-admin is using HTTPS
442
  * Use the WordPress HTTP class if available
443
  * Move the admin UI code to a separate file, only loaded when needed
class.akismet-admin.php CHANGED
@@ -923,8 +923,16 @@ class Akismet_Admin {
923
  Akismet::fix_scheduled_recheck();
924
 
925
  if ( wp_next_scheduled('akismet_schedule_cron_recheck') > time() && self::are_any_comments_waiting_to_be_checked() ) {
926
- $link_text = apply_filters( 'akismet_spam_check_warning_link_text', sprintf( __( 'Please check your <a href="%s">Akismet configuration</a> and contact your web host if problems persist.', 'akismet'), esc_url( self::get_page_url() ) ) );
927
- Akismet::view( 'notice', array( 'type' => 'spam-check', 'link_text' => $link_text ) );
 
 
 
 
 
 
 
 
928
  }
929
  }
930
 
@@ -1077,6 +1085,7 @@ class Akismet_Admin {
1077
  $notices[] = array( 'type' => 'limit-reached', 'level' => 'yellow' );
1078
  $notices[] = array( 'type' => 'limit-reached', 'level' => 'red' );
1079
  $notices[] = array( 'type' => 'usage-limit', 'api_calls' => '15000', 'usage_limit' => '10000', 'upgrade_plan' => 'Enterprise', 'upgrade_url' => 'https://akismet.com/account/' );
 
1080
  */
1081
 
1082
  Akismet::log( compact( 'stat_totals', 'akismet_user' ) );
923
  Akismet::fix_scheduled_recheck();
924
 
925
  if ( wp_next_scheduled('akismet_schedule_cron_recheck') > time() && self::are_any_comments_waiting_to_be_checked() ) {
926
+ /*
927
+ * The 'akismet_display_cron_disabled_notice' filter can be used to control whether the WP-Cron disabled notice is displayed.
928
+ */
929
+ if ( defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON && apply_filters( 'akismet_display_cron_disabled_notice', true ) ) {
930
+ Akismet::view( 'notice', array( 'type' => 'spam-check-cron-disabled' ) );
931
+ } else {
932
+ /* translators: The Akismet configuration page URL. */
933
+ $link_text = apply_filters( 'akismet_spam_check_warning_link_text', sprintf( __( 'Please check your <a href="%s">Akismet configuration</a> and contact your web host if problems persist.', 'akismet' ), esc_url( self::get_page_url() ) ) );
934
+ Akismet::view( 'notice', array( 'type' => 'spam-check', 'link_text' => $link_text ) );
935
+ }
936
  }
937
  }
938
 
1085
  $notices[] = array( 'type' => 'limit-reached', 'level' => 'yellow' );
1086
  $notices[] = array( 'type' => 'limit-reached', 'level' => 'red' );
1087
  $notices[] = array( 'type' => 'usage-limit', 'api_calls' => '15000', 'usage_limit' => '10000', 'upgrade_plan' => 'Enterprise', 'upgrade_url' => 'https://akismet.com/account/' );
1088
+ $notices[] = array( 'type' => 'spam-check-cron-disabled' );
1089
  */
1090
 
1091
  Akismet::log( compact( 'stat_totals', 'akismet_user' ) );
class.akismet.php CHANGED
@@ -672,8 +672,6 @@ class Akismet {
672
 
673
  $api_response = self::check_db_comment( $id, $recheck_reason );
674
 
675
- delete_comment_meta( $id, 'akismet_rechecking' );
676
-
677
  if ( is_wp_error( $api_response ) ) {
678
  // Invalid comment ID.
679
  }
@@ -701,6 +699,8 @@ class Akismet {
701
  );
702
  }
703
 
 
 
704
  return $api_response;
705
  }
706
 
672
 
673
  $api_response = self::check_db_comment( $id, $recheck_reason );
674
 
 
 
675
  if ( is_wp_error( $api_response ) ) {
676
  // Invalid comment ID.
677
  }
699
  );
700
  }
701
 
702
+ delete_comment_meta( $id, 'akismet_rechecking' );
703
+
704
  return $api_response;
705
  }
706
 
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === Akismet Spam Protection ===
2
- Contributors: matt, ryan, andy, mdawaffe, tellyworth, josephscott, lessbloat, eoigal, cfinke, automattic, jgs, procifer, stephdau
3
  Tags: comments, spam, antispam, anti-spam, contact form, anti spam, comment moderation, comment spam, contact form spam, spam comments
4
  Requires at least: 5.0
5
- Tested up to: 6.0
6
- Stable tag: 4.2.4
7
  License: GPLv2 or later
8
 
9
  The best anti-spam protection to block spam comments and spam in a contact form. The most trusted antispam solution for WordPress and WooCommerce.
@@ -30,6 +30,12 @@ Upload the Akismet plugin to your blog, activate it, and then enter your Akismet
30
 
31
  == Changelog ==
32
 
 
 
 
 
 
 
33
  = 4.2.4 =
34
  *Release Date - 20 May 2022*
35
 
@@ -65,48 +71,4 @@ Upload the Akismet plugin to your blog, activate it, and then enter your Akismet
65
  * Improved compatibility with the most popular contact form plugins.
66
  * Improved API usage buttons for clarity on what upgrade is needed.
67
 
68
- = 4.1.12 =
69
- *Release Date - 3 September 2021*
70
-
71
- * Fixed "Use of undefined constant" notice.
72
- * Improved styling of alert notices.
73
-
74
- = 4.1.11 =
75
- *Release Date - 23 August 2021*
76
-
77
- * Added support for Akismet API usage notifications on Akismet settings and edit-comments admin pages.
78
- * Added support for the deleted_comment action when bulk-deleting comments from Spam.
79
-
80
- = 4.1.10 =
81
- *Release Date - 6 July 2021*
82
-
83
- * Simplified the code around checking comments in REST API and XML-RPC requests.
84
- * Updated Plus plan terminology in notices to match current subscription names.
85
- * Added `rel="noopener"` to the widget link to avoid warnings in Google Lighthouse.
86
- * Set the Akismet JavaScript as deferred instead of async to improve responsiveness.
87
- * Improved the preloading of screenshot popups on the edit comments admin page.
88
-
89
- = 4.1.9 =
90
- *Release Date - 2 March 2021*
91
-
92
- * Improved handling of pingbacks in XML-RPC multicalls
93
-
94
- = 4.1.8 =
95
- *Release Date - 6 January 2021*
96
-
97
- * Fixed missing fields in submit-spam and submit-ham calls that could lead to reduced accuracy.
98
- * Fixed usage of deprecated jQuery function.
99
-
100
- = 4.1.7 =
101
- *Release Date - 22 October 2020*
102
-
103
- * Show the "Set up your Akismet account" banner on the comments admin screen, where it's relevant to mention if Akismet hasn't been configured.
104
- * Don't use wp_blacklist_check when the new wp_check_comment_disallowed_list function is available.
105
-
106
- = 4.1.6 =
107
- *Release Date - 4 June 2020*
108
-
109
- * Disable "Check for Spam" button until the page is loaded to avoid errors with clicking through to queue recheck endpoint directly.
110
- * Added filter "akismet_enable_mshots" to allow disabling screenshot popups on the edit comments admin page.
111
-
112
  For older changelog entries, please see the [additional changelog.txt file](https://plugins.svn.wordpress.org/akismet/trunk/changelog.txt) delivered with the plugin.
1
  === Akismet Spam Protection ===
2
+ Contributors: matt, ryan, andy, mdawaffe, tellyworth, josephscott, lessbloat, eoigal, cfinke, automattic, jgs, procifer, stephdau, kbrownkd
3
  Tags: comments, spam, antispam, anti-spam, contact form, anti spam, comment moderation, comment spam, contact form spam, spam comments
4
  Requires at least: 5.0
5
+ Tested up to: 6.0.1
6
+ Stable tag: 4.2.5
7
  License: GPLv2 or later
8
 
9
  The best anti-spam protection to block spam comments and spam in a contact form. The most trusted antispam solution for WordPress and WooCommerce.
30
 
31
  == Changelog ==
32
 
33
+ = 4.2.5 =
34
+ *Release Date - 11 July 2022*
35
+
36
+ * Fixed a bug that added unnecessary comment history entries after comment rechecks.
37
+ * Added a notice that displays when WP-Cron is disabled and might be affecting comment rechecks.
38
+
39
  = 4.2.4 =
40
  *Release Date - 20 May 2022*
41
 
71
  * Improved compatibility with the most popular contact form plugins.
72
  * Improved API usage buttons for clarity on what upgrade is needed.
73
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
  For older changelog entries, please see the [additional changelog.txt file](https://plugins.svn.wordpress.org/akismet/trunk/changelog.txt) delivered with the plugin.
views/notice.php CHANGED
@@ -26,6 +26,11 @@
26
  <p><?php echo $link_text; ?></p>
27
  <?php } ?>
28
  </div>
 
 
 
 
 
29
  <?php elseif ( $type == 'alert' ) : ?>
30
  <div class='error'>
31
  <p><strong><?php printf( esc_html__( 'Akismet Error Code: %s', 'akismet' ), $code ); ?></strong></p>
26
  <p><?php echo $link_text; ?></p>
27
  <?php } ?>
28
  </div>
29
+ <?php elseif ( $type == 'spam-check-cron-disabled' ) : ?>
30
+ <div class="notice notice-warning">
31
+ <p><strong><?php esc_html_e( 'Akismet has detected a problem.', 'akismet' ); ?></strong></p>
32
+ <p><?php esc_html_e( 'WP-Cron has been disabled using the DISABLE_WP_CRON constant. Comment rechecks may not work properly.', 'akismet' ); ?></p>
33
+ </div>
34
  <?php elseif ( $type == 'alert' ) : ?>
35
  <div class='error'>
36
  <p><strong><?php printf( esc_html__( 'Akismet Error Code: %s', 'akismet' ), $code ); ?></strong></p>