X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/67f24b02807a1ff7e9d1a97453ed84c404c0af0f..3f5685912e89eb3b0534acd85aa0946b1ca2bbe3:/wp-content/plugins/akismet/akismet.php
diff --git a/wp-content/plugins/akismet/akismet.php b/wp-content/plugins/akismet/akismet.php
index a2402a10..2460b707 100644
--- a/wp-content/plugins/akismet/akismet.php
+++ b/wp-content/plugins/akismet/akismet.php
@@ -3,12 +3,12 @@
Plugin Name: Akismet
Plugin URI: http://akismet.com/
Description: Akismet checks your comments against the Akismet web service to see if they look like spam or not. You need a WordPress.com API key to use it. You can review the spam it catches under "Comments." To show off your Akismet stats just put <?php akismet_counter(); ?>
in your template. See also: WP Stats plugin.
-Version: 2.2.6
+Version: 2.2.7
Author: Matt Mullenweg
Author URI: http://ma.tt/
*/
-define('AKISMET_VERSION', '2.2.6');
+define('AKISMET_VERSION', '2.2.7');
// If you hardcode a WP.com API key here, all key config screens will be hidden
if ( defined('WPCOM_API_KEY') )
@@ -315,6 +315,10 @@ function akismet_get_server_connectivity( $cache_timeout = 86400 ) {
// Returns true if server connectivity was OK at the last check, false if there was a problem that needs to be fixed.
function akismet_server_connectivity_ok() {
+ // skip the check on WPMU because the status page is hidden
+ global $wpcom_api_key;
+ if ( $wpcom_api_key )
+ return true;
$servers = akismet_get_server_connectivity();
return !( empty($servers) || !count($servers) || count( array_filter($servers) ) < count($servers) );
}
@@ -403,7 +407,8 @@ function akismet_http_post($request, $host, $path, $port = 80, $ip=null) {
// filter handler used to return a spam result to pre_comment_approved
function akismet_result_spam( $approved ) {
// bump the counter here instead of when the filter is added to reduce the possibility of overcounting
- update_option( 'akismet_spam_count', get_option('akismet_spam_count') + 1 );
+ if ( $incr = apply_filters('akismet_spam_count_incr', 1) )
+ update_option( 'akismet_spam_count', get_option('akismet_spam_count') + $incr );
return 'spam';
}
@@ -442,7 +447,8 @@ function akismet_auto_check_comment( $comment ) {
if ( $post->post_type == 'post' && $diff > 30 && get_option( 'akismet_discard_month' ) == 'true' ) {
// akismet_result_spam() won't be called so bump the counter here
- update_option( 'akismet_spam_count', get_option('akismet_spam_count') + 1 );
+ if ( $incr = apply_filters('akismet_spam_count_incr', 1) )
+ update_option( 'akismet_spam_count', get_option('akismet_spam_count') + $incr );
die;
}
}