Akismet Anti-Spam - Version 3.1

Version Description

Release Date - 11th March, 2015

  • Use HTTPS by default for all requests to Akismet.
  • Fix for a situation where Akismet might strip HTML from a comment.
Download this release

Release Info

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

Code changes from version 3.0.4 to 3.1

Files changed (7) hide show
  1. _inc/akismet.css +6 -1
  2. akismet.php +3 -3
  3. class.akismet.php +69 -4
  4. readme.txt +9 -3
  5. views/config.php +32 -2
  6. views/notice.php +1 -1
  7. wrapper.php +0 -86
_inc/akismet.css CHANGED
@@ -340,11 +340,16 @@ h2.ak-header {
340
  text-align: center;
341
  }
342
 
343
- .akismet-settings th.strictness {
344
  vertical-align: top;
345
  padding-top: 15px;
346
  }
347
 
 
 
 
 
 
348
  .akismet-settings input[type=text] {
349
  width: 75%;
350
  }
340
  text-align: center;
341
  }
342
 
343
+ .akismet-settings th:first-child {
344
  vertical-align: top;
345
  padding-top: 15px;
346
  }
347
 
348
+ .akismet-settings th.akismet-api-key {
349
+ vertical-align: middle;
350
+ padding-top: 0;
351
+ }
352
+
353
  .akismet-settings input[type=text] {
354
  width: 75%;
355
  }
akismet.php CHANGED
@@ -6,7 +6,7 @@
6
  Plugin Name: Akismet
7
  Plugin URI: http://akismet.com/
8
  Description: Used by millions, Akismet is quite possibly the best way in the world to <strong>protect your blog from comment and trackback spam</strong>. It keeps your site protected from spam even while you sleep. To get started: 1) Click the "Activate" link to the left of this description, 2) <a href="http://akismet.com/get/">Sign up for an Akismet API key</a>, and 3) Go to your Akismet configuration page, and save your API key.
9
- Version: 3.0.4
10
  Author: Automattic
11
  Author URI: http://automattic.com/wordpress-plugins/
12
  License: GPLv2 or later
@@ -35,8 +35,8 @@ if ( !function_exists( 'add_action' ) ) {
35
  exit;
36
  }
37
 
38
- define( 'AKISMET_VERSION', '3.0.4' );
39
- define( 'AKISMET__MINIMUM_WP_VERSION', '3.1' );
40
  define( 'AKISMET__PLUGIN_URL', plugin_dir_url( __FILE__ ) );
41
  define( 'AKISMET__PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
42
  define( 'AKISMET_DELETE_LIMIT', 100000 );
6
  Plugin Name: Akismet
7
  Plugin URI: http://akismet.com/
8
  Description: Used by millions, Akismet is quite possibly the best way in the world to <strong>protect your blog from comment and trackback spam</strong>. It keeps your site protected from spam even while you sleep. To get started: 1) Click the "Activate" link to the left of this description, 2) <a href="http://akismet.com/get/">Sign up for an Akismet API key</a>, and 3) Go to your Akismet configuration page, and save your API key.
9
+ Version: 3.1
10
  Author: Automattic
11
  Author URI: http://automattic.com/wordpress-plugins/
12
  License: GPLv2 or later
35
  exit;
36
  }
37
 
38
+ define( 'AKISMET_VERSION', '3.1' );
39
+ define( 'AKISMET__MINIMUM_WP_VERSION', '3.2' );
40
  define( 'AKISMET__PLUGIN_URL', plugin_dir_url( __FILE__ ) );
41
  define( 'AKISMET__PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
42
  define( 'AKISMET_DELETE_LIMIT', 100000 );
class.akismet.php CHANGED
@@ -23,7 +23,7 @@ class Akismet {
23
  self::$initiated = true;
24
 
25
  add_action( 'wp_insert_comment', array( 'Akismet', 'auto_check_update_meta' ), 10, 2 );
26
- add_action( 'preprocess_comment', array( 'Akismet', 'auto_check_comment' ), 1 );
27
  add_action( 'akismet_scheduled_delete', array( 'Akismet', 'delete_old_comments' ) );
28
  add_action( 'akismet_scheduled_delete', array( 'Akismet', 'delete_old_comments_meta' ) );
29
  add_action( 'akismet_schedule_cron_recheck', array( 'Akismet', 'cron_recheck' ) );
@@ -161,6 +161,7 @@ class Akismet {
161
  if ( function_exists('wp_next_scheduled') && function_exists('wp_schedule_single_event') ) {
162
  if ( !wp_next_scheduled( 'akismet_schedule_cron_recheck' ) ) {
163
  wp_schedule_single_event( time() + 1200, 'akismet_schedule_cron_recheck' );
 
164
  }
165
  }
166
 
@@ -180,7 +181,7 @@ class Akismet {
180
  self::set_last_comment( $commentdata );
181
  self::fix_scheduled_recheck();
182
 
183
- return self::$last_comment;
184
  }
185
 
186
  public static function get_last_comment() {
@@ -547,6 +548,7 @@ class Akismet {
547
  if ( get_option( 'akismet_alert_code' ) || $status == 'invalid' ) {
548
  // since there is currently a problem with the key, reschedule a check for 6 hours hence
549
  wp_schedule_single_event( time() + 21600, 'akismet_schedule_cron_recheck' );
 
550
  return false;
551
  }
552
 
@@ -608,6 +610,7 @@ class Akismet {
608
 
609
  delete_comment_meta( $comment_id, 'akismet_rechecking' );
610
  wp_schedule_single_event( time() + 1200, 'akismet_schedule_cron_recheck' );
 
611
  return;
612
  }
613
  delete_comment_meta( $comment_id, 'akismet_rechecking' );
@@ -616,6 +619,7 @@ class Akismet {
616
  $remaining = $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->commentmeta} WHERE meta_key = 'akismet_error'" );
617
  if ( $remaining && !wp_next_scheduled('akismet_schedule_cron_recheck') ) {
618
  wp_schedule_single_event( time() + 1200, 'akismet_schedule_cron_recheck' );
 
619
  }
620
  }
621
 
@@ -633,6 +637,7 @@ class Akismet {
633
  if ( $future_check > $check_range ) {
634
  wp_clear_scheduled_hook( 'akismet_schedule_cron_recheck' );
635
  wp_schedule_single_event( time() + 300, 'akismet_schedule_cron_recheck' );
 
636
  }
637
  }
638
 
@@ -809,11 +814,71 @@ class Akismet {
809
  'timeout' => 15
810
  );
811
 
812
- $akismet_url = "http://{$http_host}/1.1/{$path}";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
813
  $response = wp_remote_post( $akismet_url, $http_args );
 
814
  Akismet::log( compact( 'akismet_url', 'http_args', 'response' ) );
815
- if ( is_wp_error( $response ) )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
816
  return array( '', '' );
 
 
 
 
 
 
 
 
817
 
818
  return array( $response['headers'], $response['body'] );
819
  }
23
  self::$initiated = true;
24
 
25
  add_action( 'wp_insert_comment', array( 'Akismet', 'auto_check_update_meta' ), 10, 2 );
26
+ add_filter( 'preprocess_comment', array( 'Akismet', 'auto_check_comment' ), 1 );
27
  add_action( 'akismet_scheduled_delete', array( 'Akismet', 'delete_old_comments' ) );
28
  add_action( 'akismet_scheduled_delete', array( 'Akismet', 'delete_old_comments_meta' ) );
29
  add_action( 'akismet_schedule_cron_recheck', array( 'Akismet', 'cron_recheck' ) );
161
  if ( function_exists('wp_next_scheduled') && function_exists('wp_schedule_single_event') ) {
162
  if ( !wp_next_scheduled( 'akismet_schedule_cron_recheck' ) ) {
163
  wp_schedule_single_event( time() + 1200, 'akismet_schedule_cron_recheck' );
164
+ do_action( 'akismet_scheduled_recheck', 'invalid-response-' . $response[1] );
165
  }
166
  }
167
 
181
  self::set_last_comment( $commentdata );
182
  self::fix_scheduled_recheck();
183
 
184
+ return $commentdata;
185
  }
186
 
187
  public static function get_last_comment() {
548
  if ( get_option( 'akismet_alert_code' ) || $status == 'invalid' ) {
549
  // since there is currently a problem with the key, reschedule a check for 6 hours hence
550
  wp_schedule_single_event( time() + 21600, 'akismet_schedule_cron_recheck' );
551
+ do_action( 'akismet_scheduled_recheck', 'key-problem-' . get_option( 'akismet_alert_code' ) . '-' . $status );
552
  return false;
553
  }
554
 
610
 
611
  delete_comment_meta( $comment_id, 'akismet_rechecking' );
612
  wp_schedule_single_event( time() + 1200, 'akismet_schedule_cron_recheck' );
613
+ do_action( 'akismet_scheduled_recheck', 'check-db-comment-' . $status );
614
  return;
615
  }
616
  delete_comment_meta( $comment_id, 'akismet_rechecking' );
619
  $remaining = $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->commentmeta} WHERE meta_key = 'akismet_error'" );
620
  if ( $remaining && !wp_next_scheduled('akismet_schedule_cron_recheck') ) {
621
  wp_schedule_single_event( time() + 1200, 'akismet_schedule_cron_recheck' );
622
+ do_action( 'akismet_scheduled_recheck', 'remaining' );
623
  }
624
  }
625
 
637
  if ( $future_check > $check_range ) {
638
  wp_clear_scheduled_hook( 'akismet_schedule_cron_recheck' );
639
  wp_schedule_single_event( time() + 300, 'akismet_schedule_cron_recheck' );
640
+ do_action( 'akismet_scheduled_recheck', 'fix-scheduled-recheck' );
641
  }
642
  }
643
 
814
  'timeout' => 15
815
  );
816
 
817
+ $akismet_url = $http_akismet_url = "http://{$http_host}/1.1/{$path}";
818
+
819
+ /**
820
+ * Try SSL first; if that fails, try without it and don't try it again for a while.
821
+ */
822
+
823
+ $ssl = $ssl_failed = false;
824
+
825
+ // Check if SSL requests were disabled fewer than X hours ago.
826
+ $ssl_disabled = get_option( 'akismet_ssl_disabled' );
827
+
828
+ if ( $ssl_disabled && $ssl_disabled < ( time() - 60 * 60 * 24 ) ) { // 24 hours
829
+ $ssl_disabled = false;
830
+ delete_option( 'akismet_ssl_disabled' );
831
+ }
832
+ else if ( $ssl_disabled ) {
833
+ do_action( 'akismet_ssl_disabled' );
834
+ }
835
+
836
+ if ( ! $ssl_disabled && function_exists( 'wp_http_supports') && ( $ssl = wp_http_supports( array( 'ssl' ) ) ) ) {
837
+ $akismet_url = set_url_scheme( $akismet_url, 'https' );
838
+
839
+ do_action( 'akismet_https_request_pre' );
840
+ }
841
+
842
  $response = wp_remote_post( $akismet_url, $http_args );
843
+
844
  Akismet::log( compact( 'akismet_url', 'http_args', 'response' ) );
845
+
846
+ if ( $ssl && is_wp_error( $response ) ) {
847
+ do_action( 'akismet_https_request_failure', $response );
848
+
849
+ // Intermittent connection problems may cause the first HTTPS
850
+ // request to fail and subsequent HTTP requests to succeed randomly.
851
+ // Retry the HTTPS request once before disabling SSL for a time.
852
+ $response = wp_remote_post( $akismet_url, $http_args );
853
+
854
+ Akismet::log( compact( 'akismet_url', 'http_args', 'response' ) );
855
+
856
+ if ( is_wp_error( $response ) ) {
857
+ $ssl_failed = true;
858
+
859
+ do_action( 'akismet_https_request_failure', $response );
860
+
861
+ do_action( 'akismet_http_request_pre' );
862
+
863
+ // Try the request again without SSL.
864
+ $response = wp_remote_post( $http_akismet_url, $http_args );
865
+
866
+ Akismet::log( compact( 'http_akismet_url', 'http_args', 'response' ) );
867
+ }
868
+ }
869
+
870
+ if ( is_wp_error( $response ) ) {
871
+ do_action( 'akismet_request_failure', $response );
872
+
873
  return array( '', '' );
874
+ }
875
+
876
+ if ( $ssl_failed ) {
877
+ // The request failed when using SSL but succeeded without it. Disable SSL for future requests.
878
+ update_option( 'akismet_ssl_disabled', time() );
879
+
880
+ do_action( 'akismet_https_disabled' );
881
+ }
882
 
883
  return array( $response['headers'], $response['body'] );
884
  }
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === Akismet ===
2
  Contributors: matt, ryan, andy, mdawaffe, tellyworth, josephscott, lessbloat, eoigal, cfinke, automattic, jgs
3
  Tags: akismet, comments, spam
4
- Requires at least: 3.1
5
- Tested up to: 4.1
6
- Stable tag: 3.0.4
7
  License: GPLv2 or later
8
 
9
  Akismet checks your comments against the Akismet Web service to see if they look like spam or not.
@@ -30,6 +30,12 @@ Upload the Akismet plugin to your blog, Activate it, then enter your [Akismet.co
30
 
31
  == Changelog ==
32
 
 
 
 
 
 
 
33
  = 3.0.4 =
34
  *Release Date - 11th December, 2014*
35
 
1
  === Akismet ===
2
  Contributors: matt, ryan, andy, mdawaffe, tellyworth, josephscott, lessbloat, eoigal, cfinke, automattic, jgs
3
  Tags: akismet, comments, spam
4
+ Requires at least: 3.2
5
+ Tested up to: 4.1.1
6
+ Stable tag: 3.1
7
  License: GPLv2 or later
8
 
9
  Akismet checks your comments against the Akismet Web service to see if they look like spam or not.
30
 
31
  == Changelog ==
32
 
33
+ = 3.1 =
34
+ *Release Date - 11th March, 2015*
35
+
36
+ * Use HTTPS by default for all requests to Akismet.
37
+ * Fix for a situation where Akismet might strip HTML from a comment.
38
+
39
  = 3.0.4 =
40
  *Release Date - 11th December, 2014*
41
 
views/config.php CHANGED
@@ -64,13 +64,43 @@
64
  <tbody>
65
  <?php if ( !defined( 'WPCOM_API_KEY' ) ):?>
66
  <tr>
67
- <th width="10%" align="left" scope="row"><?php esc_html_e('API Key', 'akismet');?></th>
68
  <td width="5%"/>
69
  <td align="left">
70
  <span class="api-key"><input id="key" name="key" type="text" size="15" maxlength="12" value="<?php echo esc_attr( get_option('wordpress_api_key') ); ?>" class="regular-text code <?php echo $akismet_user->status;?>"></span>
71
  </td>
72
  </tr>
73
  <?php endif; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
  <tr>
75
  <th align="left" scope="row"><?php esc_html_e('Comments', 'akismet');?></th>
76
  <td></td>
@@ -95,7 +125,7 @@
95
 
96
  printf(
97
  _n(
98
- 'Spam in the <a href="%s">spam folder</a> older than 1 day is deleted automatically.',
99
  'Spam in the <a href="%1$s">spam folder</a> older than %2$d days is deleted automatically.',
100
  $delete_interval,
101
  'akismet'
64
  <tbody>
65
  <?php if ( !defined( 'WPCOM_API_KEY' ) ):?>
66
  <tr>
67
+ <th class="akismet-api-key" width="10%" align="left" scope="row"><?php esc_html_e('API Key', 'akismet');?></th>
68
  <td width="5%"/>
69
  <td align="left">
70
  <span class="api-key"><input id="key" name="key" type="text" size="15" maxlength="12" value="<?php echo esc_attr( get_option('wordpress_api_key') ); ?>" class="regular-text code <?php echo $akismet_user->status;?>"></span>
71
  </td>
72
  </tr>
73
  <?php endif; ?>
74
+ <?php if ( isset( $_GET['ssl_status'] ) ) { ?>
75
+ <tr>
76
+ <th align="left" scope="row"><?php esc_html_e( 'SSL Status', 'akismet' ); ?></th>
77
+ <td></td>
78
+ <td align="left">
79
+ <p>
80
+ <?php
81
+
82
+ if ( ! function_exists( 'wp_http_supports' ) ) {
83
+ ?><b><?php esc_html_e( 'Disabled.', 'akismet' ); ?></b> <?php printf( esc_html( 'Your WordPress installation does not include the function %s; upgrade to the latest version of WordPress.', 'akismet' ), '<code>wp_http_supports</code>' ); ?><?php
84
+ }
85
+ else if ( ! wp_http_supports( array( 'ssl' ) ) ) {
86
+ ?><b><?php esc_html_e( 'Disabled.', 'akismet' ); ?></b> <?php esc_html_e( 'Your Web server cannot make SSL requests; contact your Web host and ask them to add support for SSL requests.', 'akismet' ); ?><?php
87
+ }
88
+ else {
89
+ $ssl_disabled = get_option( 'akismet_ssl_disabled' );
90
+
91
+ if ( $ssl_disabled ) {
92
+ ?><b><?php esc_html_e( 'Temporarily disabled.', 'akismet' ); ?></b> <?php esc_html_e( 'Akismet encountered a problem with a previous SSL request and disabled it temporarily. It will begin using SSL for requests again shortly.', 'akismet' ); ?><?php
93
+ }
94
+ else {
95
+ ?><b><?php esc_html_e( 'Enabled.', 'akismet' ); ?></b> <?php esc_html_e( 'All systems functional.', 'akismet' ); ?><?php
96
+ }
97
+ }
98
+
99
+ ?>
100
+ </p>
101
+ </td>
102
+ </tr>
103
+ <?php } ?>
104
  <tr>
105
  <th align="left" scope="row"><?php esc_html_e('Comments', 'akismet');?></th>
106
  <td></td>
125
 
126
  printf(
127
  _n(
128
+ 'Spam in the <a href="%1$s">spam folder</a> older than 1 day is deleted automatically.',
129
  'Spam in the <a href="%1$s">spam folder</a> older than %2$d days is deleted automatically.',
130
  $delete_interval,
131
  'akismet'
views/notice.php CHANGED
@@ -93,7 +93,7 @@
93
  <div class="wrap alert critical">
94
  <?php if ( $level == 'yellow' ): ?>
95
  <h3 class="key-status failed"><?php esc_html_e("You're using your Akismet key on more sites than your Pro subscription allows.", 'akismet'); ?></h3>
96
- <p class="description"><?php printf( __('If you would like to use Akismet on more than 10 sites, you will need to <a href="%s" target="_blank">upgrade to an Enterprise subscription</a>. If you have any questions, please <a href="%s" target="_blank">get in touch with our support team</a>', 'akismet'), 'https://akismet.com/account/upgrade/', 'https://akismet.com/contact/'); ?></p>
97
  <?php elseif ( $level == 'red' ): ?>
98
  <h3 class="key-status failed"><?php esc_html_e("You're using Akismet on far too many sites for your Pro subscription.", 'akismet'); ?></h3>
99
  <p class="description"><?php printf( __('To continue your service, <a href="%s" target="_blank">upgrade to an Enterprise subscription</a>, which covers an unlimited number of sites. Please <a href="%s" target="_blank">contact our support team</a> with any questions.', 'akismet'), 'https://akismet.com/account/upgrade/', 'https://akismet.com/contact/'); ?></p>
93
  <div class="wrap alert critical">
94
  <?php if ( $level == 'yellow' ): ?>
95
  <h3 class="key-status failed"><?php esc_html_e("You're using your Akismet key on more sites than your Pro subscription allows.", 'akismet'); ?></h3>
96
+ <p class="description"><?php printf( __('Your Pro subscription allows the use of Akismet on only one site. Please <a href="http://docs.akismet.com/billing/add-more-sites/">purchase additional Pro subscriptions</a> or upgrade to an Enterprise subscription that allows the use of Akismet on unlimited sites.<br /><br />If you have any questions, please get in touch with our support team.', 'akismet'), 'https://akismet.com/account/upgrade/', 'https://akismet.com/contact/'); ?></p>
97
  <?php elseif ( $level == 'red' ): ?>
98
  <h3 class="key-status failed"><?php esc_html_e("You're using Akismet on far too many sites for your Pro subscription.", 'akismet'); ?></h3>
99
  <p class="description"><?php printf( __('To continue your service, <a href="%s" target="_blank">upgrade to an Enterprise subscription</a>, which covers an unlimited number of sites. Please <a href="%s" target="_blank">contact our support team</a> with any questions.', 'akismet'), 'https://akismet.com/account/upgrade/', 'https://akismet.com/contact/'); ?></p>
wrapper.php CHANGED
@@ -7,46 +7,32 @@ $akismet_api_host = Akismet::get_api_key() . '.rest.akismet.com';
7
  $akismet_api_port = 80;
8
 
9
  function akismet_test_mode() {
10
- _deprecated_function( __FUNCTION__, '3.0', 'Akismet::is_test_mode()' );
11
-
12
  return Akismet::is_test_mode();
13
  }
14
 
15
  function akismet_http_post( $request, $host, $path, $port = 80, $ip = null ) {
16
- _deprecated_function( __FUNCTION__, '3.0', 'Akismet::http_post()' );
17
-
18
  $path = str_replace( '/1.1/', '', $path );
19
 
20
  return Akismet::http_post( $request, $path, $ip );
21
  }
22
 
23
  function akismet_microtime() {
24
- _deprecated_function( __FUNCTION__, '3.0', 'Akismet::_get_microtime()' );
25
-
26
  return Akismet::_get_microtime();
27
  }
28
 
29
  function akismet_delete_old() {
30
- _deprecated_function( __FUNCTION__, '3.0', 'Akismet::delete_old_comments()' );
31
-
32
  return Akismet::delete_old_comments();
33
  }
34
 
35
  function akismet_delete_old_metadata() {
36
- _deprecated_function( __FUNCTION__, '3.0', 'Akismet::delete_old_comments_meta()' );
37
-
38
  return Akismet::delete_old_comments_meta();
39
  }
40
 
41
  function akismet_check_db_comment( $id, $recheck_reason = 'recheck_queue' ) {
42
- _deprecated_function( __FUNCTION__, '3.0', 'Akismet::check_db_comment()' );
43
-
44
  return Akismet::check_db_comment( $id, $recheck_reason );
45
  }
46
 
47
  function akismet_rightnow() {
48
- _deprecated_function( __FUNCTION__, '3.0', 'Akismet_Admin::rightnow_stats()' );
49
-
50
  if ( !class_exists( 'Akismet_Admin' ) )
51
  return false;
52
 
@@ -63,13 +49,9 @@ function akismet_load_js_and_css() {
63
  _deprecated_function( __FUNCTION__, '3.0' );
64
  }
65
  function akismet_nonce_field( $action = -1 ) {
66
- _deprecated_function( __FUNCTION__, '3.0', 'wp_nonce_field' );
67
-
68
  return wp_nonce_field( $action );
69
  }
70
  function akismet_plugin_action_links( $links, $file ) {
71
- _deprecated_function( __FUNCTION__, '3.0', 'Akismet_Admin::plugin_action_links()' );
72
-
73
  return Akismet_Admin::plugin_action_links( $links, $file );
74
  }
75
  function akismet_conf() {
@@ -79,21 +61,15 @@ function akismet_stats_display() {
79
  _deprecated_function( __FUNCTION__, '3.0' );
80
  }
81
  function akismet_stats() {
82
- _deprecated_function( __FUNCTION__, '3.0', 'Akismet_Admin::dashboard_stats()' );
83
-
84
  return Akismet_Admin::dashboard_stats();
85
  }
86
  function akismet_admin_warnings() {
87
  _deprecated_function( __FUNCTION__, '3.0' );
88
  }
89
  function akismet_comment_row_action( $a, $comment ) {
90
- _deprecated_function( __FUNCTION__, '3.0', 'Akismet_Admin::comment_row_action()' );
91
-
92
  return Akismet_Admin::comment_row_actions( $a, $comment );
93
  }
94
  function akismet_comment_status_meta_box( $comment ) {
95
- _deprecated_function( __FUNCTION__, '3.0', 'Akismet_Admin::comment_status_meta_box()' );
96
-
97
  return Akismet_Admin::comment_status_meta_box( $comment );
98
  }
99
  function akismet_comments_columns( $columns ) {
@@ -105,63 +81,39 @@ function akismet_comment_column_row( $column, $comment_id ) {
105
  _deprecated_function( __FUNCTION__, '3.0' );
106
  }
107
  function akismet_text_add_link_callback( $m ) {
108
- _deprecated_function( __FUNCTION__, '3.0', 'Akismet_Admin::text_add_link_callback()' );
109
-
110
  return Akismet_Admin::text_add_link_callback( $m );
111
  }
112
  function akismet_text_add_link_class( $comment_text ) {
113
- _deprecated_function( __FUNCTION__, '3.0', 'Akismet_Admin::text_add_link_class()' );
114
-
115
  return Akismet_Admin::text_add_link_class( $comment_text );
116
  }
117
  function akismet_check_for_spam_button( $comment_status ) {
118
- _deprecated_function( __FUNCTION__, '3.0', 'Akismet_Admin::check_for_spam_button()' );
119
-
120
  return Akismet_Admin::check_for_spam_button( $comment_status );
121
  }
122
  function akismet_submit_nonspam_comment( $comment_id ) {
123
- _deprecated_function( __FUNCTION__, '3.0', 'Akismet::submit_nonspam_comment()' );
124
-
125
  return Akismet::submit_nonspam_comment( $comment_id );
126
  }
127
  function akismet_submit_spam_comment( $comment_id ) {
128
- _deprecated_function( __FUNCTION__, '3.0', 'Akismet::submit_spam_comment()' );
129
-
130
  return Akismet::submit_spam_comment( $comment_id );
131
  }
132
  function akismet_transition_comment_status( $new_status, $old_status, $comment ) {
133
- _deprecated_function( __FUNCTION__, '3.0', 'Akismet::transition_comment_status()' );
134
-
135
  return Akismet::transition_comment_status( $new_status, $old_status, $comment );
136
  }
137
  function akismet_spam_count( $type = false ) {
138
- _deprecated_function( __FUNCTION__, '3.0', 'Akismet_Admin::get_spam_count()' );
139
-
140
  return Akismet_Admin::get_spam_count( $type );
141
  }
142
  function akismet_recheck_queue() {
143
- _deprecated_function( __FUNCTION__, '3.0', 'Akismet_Admin::recheck_queue()' );
144
-
145
  return Akismet_Admin::recheck_queue();
146
  }
147
  function akismet_remove_comment_author_url() {
148
- _deprecated_function( __FUNCTION__, '3.0', 'Akismet_Admin::remove_comment_author_url()' );
149
-
150
  return Akismet_Admin::remove_comment_author_url();
151
  }
152
  function akismet_add_comment_author_url() {
153
- _deprecated_function( __FUNCTION__, '3.0', 'Akismet_Admin::add_comment_author_url()' );
154
-
155
  return Akismet_Admin::add_comment_author_url();
156
  }
157
  function akismet_check_server_connectivity() {
158
- _deprecated_function( __FUNCTION__, '3.0', 'Akismet_Admin::check_server_connectivity()' );
159
-
160
  return Akismet_Admin::check_server_connectivity();
161
  }
162
  function akismet_get_server_connectivity( $cache_timeout = 86400 ) {
163
- _deprecated_function( __FUNCTION__, '3.0', 'Akismet_Admin::()' );
164
-
165
  return Akismet_Admin::get_server_connectivity( $cache_timeout );
166
  }
167
  function akismet_server_connectivity_ok() {
@@ -170,101 +122,63 @@ function akismet_server_connectivity_ok() {
170
  return true;
171
  }
172
  function akismet_admin_menu() {
173
- _deprecated_function( __FUNCTION__, '3.0', 'Akismet_Admin::admin_menu()' );
174
-
175
  return Akismet_Admin::admin_menu();
176
  }
177
  function akismet_load_menu() {
178
- _deprecated_function( __FUNCTION__, '3.0', 'Akismet_Admin::load_menu()' );
179
-
180
  return Akismet_Admin::load_menu();
181
  }
182
  function akismet_init() {
183
  _deprecated_function( __FUNCTION__, '3.0' );
184
  }
185
  function akismet_get_key() {
186
- _deprecated_function( __FUNCTION__, '3.0', 'Akismet::get_api_key()' );
187
-
188
  return Akismet::get_api_key();
189
  }
190
  function akismet_check_key_status( $key, $ip = null ) {
191
- _deprecated_function( __FUNCTION__, '3.0', 'Akismet::check_key_status()' );
192
-
193
  return Akismet::check_key_status( $key, $ip );
194
  }
195
  function akismet_update_alert( $response ) {
196
- _deprecated_function( __FUNCTION__, '3.0', 'Akismet::update_alert()' );
197
-
198
  return Akismet::update_alert( $response );
199
  }
200
  function akismet_verify_key( $key, $ip = null ) {
201
- _deprecated_function( __FUNCTION__, '3.0', 'Akismet::verify_key()' );
202
-
203
  return Akismet::verify_key( $key, $ip );
204
  }
205
  function akismet_get_user_roles( $user_id ) {
206
- _deprecated_function( __FUNCTION__, '3.0', 'Akismet::get_user_roles()' );
207
-
208
  return Akismet::get_user_roles( $user_id );
209
  }
210
  function akismet_result_spam( $approved ) {
211
- _deprecated_function( __FUNCTION__, '3.0', 'Akismet::comment_is_spam()' );
212
-
213
  return Akismet::comment_is_spam( $approved );
214
  }
215
  function akismet_result_hold( $approved ) {
216
- _deprecated_function( __FUNCTION__, '3.0', 'Akismet::comment_needs_moderation()' );
217
-
218
  return Akismet::comment_needs_moderation( $approved );
219
  }
220
  function akismet_get_user_comments_approved( $user_id, $comment_author_email, $comment_author, $comment_author_url ) {
221
- _deprecated_function( __FUNCTION__, '3.0', 'Akismet::get_user_comments_approved()' );
222
-
223
  return Akismet::get_user_comments_approved( $user_id, $comment_author_email, $comment_author, $comment_author_url );
224
  }
225
  function akismet_update_comment_history( $comment_id, $message, $event = null ) {
226
- _deprecated_function( __FUNCTION__, '3.0', 'Akismet::update_comment_history()' );
227
-
228
  return Akismet::update_comment_history( $comment_id, $message, $event );
229
  }
230
  function akismet_get_comment_history( $comment_id ) {
231
- _deprecated_function( __FUNCTION__, '3.0', 'Akismet::get_comment_history()' );
232
-
233
  return Akismet::get_comment_history( $comment_id );
234
  }
235
  function akismet_cmp_time( $a, $b ) {
236
- _deprecated_function( __FUNCTION__, '3.0', 'Akismet::_cmp_time()' );
237
-
238
  return Akismet::_cmp_time( $a, $b );
239
  }
240
  function akismet_auto_check_update_meta( $id, $comment ) {
241
- _deprecated_function( __FUNCTION__, '3.0', 'Akismet::auto_check_update_meta()' );
242
-
243
  return Akismet::auto_check_update_meta( $id, $comment );
244
  }
245
  function akismet_auto_check_comment( $commentdata ) {
246
- _deprecated_function( __FUNCTION__, '3.0', 'Akismet::auto_check_comment()' );
247
-
248
  return Akismet::auto_check_comment( $commentdata );
249
  }
250
  function akismet_get_ip_address() {
251
- _deprecated_function( __FUNCTION__, '3.0', 'Akismet::get_ip_address()' );
252
-
253
  return Akismet::get_ip_address();
254
  }
255
  function akismet_cron_recheck() {
256
- _deprecated_function( __FUNCTION__, '3.0', 'Akismet::cron_recheck()' );
257
-
258
  return Akismet::cron_recheck();
259
  }
260
  function akismet_add_comment_nonce() {
261
- _deprecated_function( __FUNCTION__, '3.0', 'Akismet::add_comment_nonce()' );
262
-
263
  return Akismet::add_comment_nonce( $post_id );
264
  }
265
  function akismet_fix_scheduled_recheck() {
266
- _deprecated_function( __FUNCTION__, '3.0', 'Akismet::fix_scheduled_recheck()' );
267
-
268
  return Akismet::fix_scheduled_recheck();
269
  }
270
  function akismet_spam_comments() {
7
  $akismet_api_port = 80;
8
 
9
  function akismet_test_mode() {
 
 
10
  return Akismet::is_test_mode();
11
  }
12
 
13
  function akismet_http_post( $request, $host, $path, $port = 80, $ip = null ) {
 
 
14
  $path = str_replace( '/1.1/', '', $path );
15
 
16
  return Akismet::http_post( $request, $path, $ip );
17
  }
18
 
19
  function akismet_microtime() {
 
 
20
  return Akismet::_get_microtime();
21
  }
22
 
23
  function akismet_delete_old() {
 
 
24
  return Akismet::delete_old_comments();
25
  }
26
 
27
  function akismet_delete_old_metadata() {
 
 
28
  return Akismet::delete_old_comments_meta();
29
  }
30
 
31
  function akismet_check_db_comment( $id, $recheck_reason = 'recheck_queue' ) {
 
 
32
  return Akismet::check_db_comment( $id, $recheck_reason );
33
  }
34
 
35
  function akismet_rightnow() {
 
 
36
  if ( !class_exists( 'Akismet_Admin' ) )
37
  return false;
38
 
49
  _deprecated_function( __FUNCTION__, '3.0' );
50
  }
51
  function akismet_nonce_field( $action = -1 ) {
 
 
52
  return wp_nonce_field( $action );
53
  }
54
  function akismet_plugin_action_links( $links, $file ) {
 
 
55
  return Akismet_Admin::plugin_action_links( $links, $file );
56
  }
57
  function akismet_conf() {
61
  _deprecated_function( __FUNCTION__, '3.0' );
62
  }
63
  function akismet_stats() {
 
 
64
  return Akismet_Admin::dashboard_stats();
65
  }
66
  function akismet_admin_warnings() {
67
  _deprecated_function( __FUNCTION__, '3.0' );
68
  }
69
  function akismet_comment_row_action( $a, $comment ) {
 
 
70
  return Akismet_Admin::comment_row_actions( $a, $comment );
71
  }
72
  function akismet_comment_status_meta_box( $comment ) {
 
 
73
  return Akismet_Admin::comment_status_meta_box( $comment );
74
  }
75
  function akismet_comments_columns( $columns ) {
81
  _deprecated_function( __FUNCTION__, '3.0' );
82
  }
83
  function akismet_text_add_link_callback( $m ) {
 
 
84
  return Akismet_Admin::text_add_link_callback( $m );
85
  }
86
  function akismet_text_add_link_class( $comment_text ) {
 
 
87
  return Akismet_Admin::text_add_link_class( $comment_text );
88
  }
89
  function akismet_check_for_spam_button( $comment_status ) {
 
 
90
  return Akismet_Admin::check_for_spam_button( $comment_status );
91
  }
92
  function akismet_submit_nonspam_comment( $comment_id ) {
 
 
93
  return Akismet::submit_nonspam_comment( $comment_id );
94
  }
95
  function akismet_submit_spam_comment( $comment_id ) {
 
 
96
  return Akismet::submit_spam_comment( $comment_id );
97
  }
98
  function akismet_transition_comment_status( $new_status, $old_status, $comment ) {
 
 
99
  return Akismet::transition_comment_status( $new_status, $old_status, $comment );
100
  }
101
  function akismet_spam_count( $type = false ) {
 
 
102
  return Akismet_Admin::get_spam_count( $type );
103
  }
104
  function akismet_recheck_queue() {
 
 
105
  return Akismet_Admin::recheck_queue();
106
  }
107
  function akismet_remove_comment_author_url() {
 
 
108
  return Akismet_Admin::remove_comment_author_url();
109
  }
110
  function akismet_add_comment_author_url() {
 
 
111
  return Akismet_Admin::add_comment_author_url();
112
  }
113
  function akismet_check_server_connectivity() {
 
 
114
  return Akismet_Admin::check_server_connectivity();
115
  }
116
  function akismet_get_server_connectivity( $cache_timeout = 86400 ) {
 
 
117
  return Akismet_Admin::get_server_connectivity( $cache_timeout );
118
  }
119
  function akismet_server_connectivity_ok() {
122
  return true;
123
  }
124
  function akismet_admin_menu() {
 
 
125
  return Akismet_Admin::admin_menu();
126
  }
127
  function akismet_load_menu() {
 
 
128
  return Akismet_Admin::load_menu();
129
  }
130
  function akismet_init() {
131
  _deprecated_function( __FUNCTION__, '3.0' );
132
  }
133
  function akismet_get_key() {
 
 
134
  return Akismet::get_api_key();
135
  }
136
  function akismet_check_key_status( $key, $ip = null ) {
 
 
137
  return Akismet::check_key_status( $key, $ip );
138
  }
139
  function akismet_update_alert( $response ) {
 
 
140
  return Akismet::update_alert( $response );
141
  }
142
  function akismet_verify_key( $key, $ip = null ) {
 
 
143
  return Akismet::verify_key( $key, $ip );
144
  }
145
  function akismet_get_user_roles( $user_id ) {
 
 
146
  return Akismet::get_user_roles( $user_id );
147
  }
148
  function akismet_result_spam( $approved ) {
 
 
149
  return Akismet::comment_is_spam( $approved );
150
  }
151
  function akismet_result_hold( $approved ) {
 
 
152
  return Akismet::comment_needs_moderation( $approved );
153
  }
154
  function akismet_get_user_comments_approved( $user_id, $comment_author_email, $comment_author, $comment_author_url ) {
 
 
155
  return Akismet::get_user_comments_approved( $user_id, $comment_author_email, $comment_author, $comment_author_url );
156
  }
157
  function akismet_update_comment_history( $comment_id, $message, $event = null ) {
 
 
158
  return Akismet::update_comment_history( $comment_id, $message, $event );
159
  }
160
  function akismet_get_comment_history( $comment_id ) {
 
 
161
  return Akismet::get_comment_history( $comment_id );
162
  }
163
  function akismet_cmp_time( $a, $b ) {
 
 
164
  return Akismet::_cmp_time( $a, $b );
165
  }
166
  function akismet_auto_check_update_meta( $id, $comment ) {
 
 
167
  return Akismet::auto_check_update_meta( $id, $comment );
168
  }
169
  function akismet_auto_check_comment( $commentdata ) {
 
 
170
  return Akismet::auto_check_comment( $commentdata );
171
  }
172
  function akismet_get_ip_address() {
 
 
173
  return Akismet::get_ip_address();
174
  }
175
  function akismet_cron_recheck() {
 
 
176
  return Akismet::cron_recheck();
177
  }
178
  function akismet_add_comment_nonce() {
 
 
179
  return Akismet::add_comment_nonce( $post_id );
180
  }
181
  function akismet_fix_scheduled_recheck() {
 
 
182
  return Akismet::fix_scheduled_recheck();
183
  }
184
  function akismet_spam_comments() {