Version Description
- Fix bug in initial comment check for ipv6 addresses
- Report comments as ham when they are moved from spam to moderation
- Report comments as ham when clicking undo after spam
- Use transition_comment_status action when available instead of older actions for spam/ham submissions
- Better diagnostic messages when PHP network functions are unavailable
- Better handling of comments by logged-in users
Download this release
Release Info
Developer | tellyworth |
Plugin | Akismet Anti-Spam |
Version | 2.2.8 |
Comparing to | |
See all releases |
Code changes from version 2.2.7 to 2.2.8
- akismet.php +89 -37
- readme.txt +11 -1
akismet.php
CHANGED
@@ -2,13 +2,13 @@
|
|
2 |
/*
|
3 |
Plugin Name: Akismet
|
4 |
Plugin URI: http://akismet.com/
|
5 |
-
Description: Akismet checks your comments against the Akismet web service to see if they look like spam or not. You need a <a href="http://
|
6 |
-
Version: 2.2.
|
7 |
Author: Matt Mullenweg
|
8 |
Author URI: http://ma.tt/
|
9 |
*/
|
10 |
|
11 |
-
define('AKISMET_VERSION', '2.2.
|
12 |
|
13 |
// If you hardcode a WP.com API key here, all key config screens will be hidden
|
14 |
if ( defined('WPCOM_API_KEY') )
|
@@ -122,7 +122,7 @@ function akismet_conf() {
|
|
122 |
'new_key_invalid' => array('color' => 'd22', 'text' => __('The key you entered is invalid. Please double-check it.')),
|
123 |
'new_key_failed' => array('color' => 'd22', 'text' => __('The key you entered could not be verified because a connection to akismet.com could not be established. Please check your server configuration.')),
|
124 |
'no_connection' => array('color' => 'd22', 'text' => __('There was a problem connecting to the Akismet server. Please check your server configuration.')),
|
125 |
-
'key_empty' => array('color' => 'aa0', 'text' => sprintf(__('Please enter an API key. (<a href="%s" style="color:#fff">Get your key.</a>)'), 'http://
|
126 |
'key_valid' => array('color' => '2d2', 'text' => __('This key is valid.')),
|
127 |
'key_failed' => array('color' => 'aa0', 'text' => __('The key below was previously validated but a connection to akismet.com can not be established at this time. Please check your server configuration.')));
|
128 |
?>
|
@@ -134,7 +134,7 @@ function akismet_conf() {
|
|
134 |
<div class="narrow">
|
135 |
<form action="" method="post" id="akismet-conf" style="margin: auto; width: 400px; ">
|
136 |
<?php if ( !$wpcom_api_key ) { ?>
|
137 |
-
<p><?php printf(__('For many people, <a href="%1$s">Akismet</a> will greatly reduce or even completely eliminate the comment and trackback spam you get on your site. If one does happen to get through, simply mark it as "spam" on the moderation screen and Akismet will learn from the mistakes. If you don\'t have a WordPress.com account yet, you can get one at <a href="%2$s">
|
138 |
|
139 |
<?php akismet_nonce_field($akismet_nonce) ?>
|
140 |
<h3><label for="key"><?php _e('WordPress.com API Key'); ?></label></h3>
|
@@ -155,35 +155,37 @@ function akismet_conf() {
|
|
155 |
|
156 |
<h3><?php _e('Server Connectivity'); ?></h3>
|
157 |
<?php
|
158 |
-
|
159 |
-
$fail_count = count($servers) - count( array_filter($servers) );
|
160 |
-
if ( is_array($servers) && count($servers) > 0 ) {
|
161 |
-
// some connections work, some fail
|
162 |
-
if ( $fail_count > 0 && $fail_count < count($servers) ) { ?>
|
163 |
-
<p style="padding: .5em; background-color: #aa0; color: #fff; font-weight:bold;"><?php _e('Unable to reach some Akismet servers.'); ?></p>
|
164 |
-
<p><?php echo sprintf( __('A network problem or firewall is blocking some connections from your web server to Akismet.com. Akismet is working but this may cause problems during times of network congestion. Please contact your web host or firewall administrator and give them <a href="%s" target="_blank">this information about Akismet and firewalls</a>.'), 'http://blog.akismet.com/akismet-hosting-faq/'); ?></p>
|
165 |
-
<?php
|
166 |
-
// all connections fail
|
167 |
-
} elseif ( $fail_count > 0 ) { ?>
|
168 |
-
<p style="padding: .5em; background-color: #d22; color: #fff; font-weight:bold;"><?php _e('Unable to reach any Akismet servers.'); ?></p>
|
169 |
-
<p><?php echo sprintf( __('A network problem or firewall is blocking all connections from your web server to Akismet.com. <strong>Akismet cannot work correctly until this is fixed.</strong> Please contact your web host or firewall administrator and give them <a href="%s" target="_blank">this information about Akismet and firewalls</a>.'), 'http://blog.akismet.com/akismet-hosting-faq/'); ?></p>
|
170 |
-
<?php
|
171 |
-
// all connections work
|
172 |
-
} else { ?>
|
173 |
-
<p style="padding: .5em; background-color: #2d2; color: #fff; font-weight:bold;"><?php _e('All Akismet servers are available.'); ?></p>
|
174 |
-
<p><?php _e('Akismet is working correctly. All servers are accessible.'); ?></p>
|
175 |
-
<?php
|
176 |
-
}
|
177 |
-
} elseif ( !is_callable('fsockopen') ) {
|
178 |
?>
|
179 |
<p style="padding: .5em; background-color: #d22; color: #fff; font-weight:bold;"><?php _e('Network functions are disabled.'); ?></p>
|
180 |
-
<p><?php echo sprintf( __('Your web host or server administrator has disabled PHP\'s <code>fsockopen</code>
|
181 |
<?php
|
182 |
} else {
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
187 |
}
|
188 |
|
189 |
if ( !empty($servers) ) {
|
@@ -278,7 +280,7 @@ function akismet_check_server_connectivity() {
|
|
278 |
$test_host = 'rest.akismet.com';
|
279 |
|
280 |
// Some web hosts may disable one or both functions
|
281 |
-
if ( !
|
282 |
return array();
|
283 |
|
284 |
$ips = gethostbynamel($test_host);
|
@@ -370,6 +372,22 @@ function akismet_get_host($host) {
|
|
370 |
return $host;
|
371 |
}
|
372 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
373 |
// Returns array with headers in $response[0] and body in $response[1]
|
374 |
function akismet_http_post($request, $host, $path, $port = 80, $ip=null) {
|
375 |
global $wp_version;
|
@@ -415,13 +433,15 @@ function akismet_result_spam( $approved ) {
|
|
415 |
function akismet_auto_check_comment( $comment ) {
|
416 |
global $akismet_api_host, $akismet_api_port;
|
417 |
|
418 |
-
$comment['user_ip'] =
|
419 |
$comment['user_agent'] = $_SERVER['HTTP_USER_AGENT'];
|
420 |
$comment['referrer'] = $_SERVER['HTTP_REFERER'];
|
421 |
$comment['blog'] = get_option('home');
|
422 |
$comment['blog_lang'] = get_locale();
|
423 |
$comment['blog_charset'] = get_option('blog_charset');
|
424 |
$comment['permalink'] = get_permalink($comment['comment_post_ID']);
|
|
|
|
|
425 |
|
426 |
$ignore = array( 'HTTP_COOKIE' );
|
427 |
|
@@ -445,7 +465,7 @@ function akismet_auto_check_comment( $comment ) {
|
|
445 |
$diff = time() - $last_updated;
|
446 |
$diff = $diff / 86400;
|
447 |
|
448 |
-
if ( $post->post_type == 'post' && $diff > 30 && get_option( 'akismet_discard_month' ) == 'true' ) {
|
449 |
// akismet_result_spam() won't be called so bump the counter here
|
450 |
if ( $incr = apply_filters('akismet_spam_count_incr', 1) )
|
451 |
update_option( 'akismet_spam_count', get_option('akismet_spam_count') + $incr );
|
@@ -468,7 +488,7 @@ function akismet_delete_old() {
|
|
468 |
function akismet_submit_nonspam_comment ( $comment_id ) {
|
469 |
global $wpdb, $akismet_api_host, $akismet_api_port, $current_user, $current_site;
|
470 |
$comment_id = (int) $comment_id;
|
471 |
-
|
472 |
$comment = $wpdb->get_row("SELECT * FROM $wpdb->comments WHERE comment_ID = '$comment_id'");
|
473 |
if ( !$comment ) // it was deleted
|
474 |
return;
|
@@ -482,6 +502,8 @@ function akismet_submit_nonspam_comment ( $comment_id ) {
|
|
482 |
if ( is_object($current_site) ) {
|
483 |
$comment->site_domain = $current_site->domain;
|
484 |
}
|
|
|
|
|
485 |
$query_string = '';
|
486 |
foreach ( $comment as $key => $data )
|
487 |
$query_string .= $key . '=' . urlencode( stripslashes($data) ) . '&';
|
@@ -508,6 +530,7 @@ function akismet_submit_spam_comment ( $comment_id ) {
|
|
508 |
if ( is_object($current_site) ) {
|
509 |
$comment->site_domain = $current_site->domain;
|
510 |
}
|
|
|
511 |
$query_string = '';
|
512 |
foreach ( $comment as $key => $data )
|
513 |
$query_string .= $key . '=' . urlencode( stripslashes($data) ) . '&';
|
@@ -515,13 +538,39 @@ function akismet_submit_spam_comment ( $comment_id ) {
|
|
515 |
$response = akismet_http_post($query_string, $akismet_api_host, "/1.1/submit-spam", $akismet_api_port);
|
516 |
}
|
517 |
|
518 |
-
add_action('wp_set_comment_status', 'akismet_submit_spam_comment');
|
519 |
-
add_action('edit_comment', 'akismet_submit_spam_comment');
|
520 |
add_action('preprocess_comment', 'akismet_auto_check_comment', 1);
|
521 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
522 |
function akismet_spamtoham( $comment ) { akismet_submit_nonspam_comment( $comment->comment_ID ); }
|
523 |
-
add_filter( 'comment_spam_to_approved', 'akismet_spamtoham' );
|
524 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
525 |
// Total spam in queue
|
526 |
// get_option( 'akismet_spam_count' ) is the total caught ever
|
527 |
function akismet_spam_count( $type = false ) {
|
@@ -956,6 +1005,8 @@ function akismet_rightnow() {
|
|
956 |
add_action('rightnow_end', 'akismet_rightnow');
|
957 |
|
958 |
// For WP <= 2.3.x
|
|
|
|
|
959 |
if ( 'moderation.php' == $pagenow ) {
|
960 |
function akismet_recheck_button( $page ) {
|
961 |
global $submenu;
|
@@ -999,6 +1050,7 @@ function akismet_recheck_queue() {
|
|
999 |
$c['blog_lang'] = get_locale();
|
1000 |
$c['blog_charset'] = get_option('blog_charset');
|
1001 |
$c['permalink'] = get_permalink($c['comment_post_ID']);
|
|
|
1002 |
$id = (int) $c['comment_ID'];
|
1003 |
|
1004 |
$query_string = '';
|
2 |
/*
|
3 |
Plugin Name: Akismet
|
4 |
Plugin URI: http://akismet.com/
|
5 |
+
Description: Akismet checks your comments against the Akismet web service to see if they look like spam or not. You need a <a href="http://akismet.com/get/">WordPress.com API key</a> to use it. You can review the spam it catches under "Comments." To show off your Akismet stats just put <code><?php akismet_counter(); ?></code> in your template. See also: <a href="http://wordpress.org/extend/plugins/stats/">WP Stats plugin</a>.
|
6 |
+
Version: 2.2.8
|
7 |
Author: Matt Mullenweg
|
8 |
Author URI: http://ma.tt/
|
9 |
*/
|
10 |
|
11 |
+
define('AKISMET_VERSION', '2.2.8');
|
12 |
|
13 |
// If you hardcode a WP.com API key here, all key config screens will be hidden
|
14 |
if ( defined('WPCOM_API_KEY') )
|
122 |
'new_key_invalid' => array('color' => 'd22', 'text' => __('The key you entered is invalid. Please double-check it.')),
|
123 |
'new_key_failed' => array('color' => 'd22', 'text' => __('The key you entered could not be verified because a connection to akismet.com could not be established. Please check your server configuration.')),
|
124 |
'no_connection' => array('color' => 'd22', 'text' => __('There was a problem connecting to the Akismet server. Please check your server configuration.')),
|
125 |
+
'key_empty' => array('color' => 'aa0', 'text' => sprintf(__('Please enter an API key. (<a href="%s" style="color:#fff">Get your key.</a>)'), 'http://akismet.com/get/')),
|
126 |
'key_valid' => array('color' => '2d2', 'text' => __('This key is valid.')),
|
127 |
'key_failed' => array('color' => 'aa0', 'text' => __('The key below was previously validated but a connection to akismet.com can not be established at this time. Please check your server configuration.')));
|
128 |
?>
|
134 |
<div class="narrow">
|
135 |
<form action="" method="post" id="akismet-conf" style="margin: auto; width: 400px; ">
|
136 |
<?php if ( !$wpcom_api_key ) { ?>
|
137 |
+
<p><?php printf(__('For many people, <a href="%1$s">Akismet</a> will greatly reduce or even completely eliminate the comment and trackback spam you get on your site. If one does happen to get through, simply mark it as "spam" on the moderation screen and Akismet will learn from the mistakes. If you don\'t have a WordPress.com account yet, you can get one at <a href="%2$s">Akismet.com</a>.'), 'http://akismet.com/', 'http://akismet.com/get/'); ?></p>
|
138 |
|
139 |
<?php akismet_nonce_field($akismet_nonce) ?>
|
140 |
<h3><label for="key"><?php _e('WordPress.com API Key'); ?></label></h3>
|
155 |
|
156 |
<h3><?php _e('Server Connectivity'); ?></h3>
|
157 |
<?php
|
158 |
+
if ( !function_exists('fsockopen') || !function_exists('gethostbynamel') ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
159 |
?>
|
160 |
<p style="padding: .5em; background-color: #d22; color: #fff; font-weight:bold;"><?php _e('Network functions are disabled.'); ?></p>
|
161 |
+
<p><?php echo sprintf( __('Your web host or server administrator has disabled PHP\'s <code>fsockopen</code> or <code>gethostbynamel</code> functions. <strong>Akismet cannot work correctly until this is fixed.</strong> Please contact your web host or firewall administrator and give them <a href="%s" target="_blank">this information about Akismet\'s system requirements</a>.'), 'http://blog.akismet.com/akismet-hosting-faq/'); ?></p>
|
162 |
<?php
|
163 |
} else {
|
164 |
+
$servers = akismet_get_server_connectivity();
|
165 |
+
$fail_count = count($servers) - count( array_filter($servers) );
|
166 |
+
if ( is_array($servers) && count($servers) > 0 ) {
|
167 |
+
// some connections work, some fail
|
168 |
+
if ( $fail_count > 0 && $fail_count < count($servers) ) { ?>
|
169 |
+
<p style="padding: .5em; background-color: #aa0; color: #fff; font-weight:bold;"><?php _e('Unable to reach some Akismet servers.'); ?></p>
|
170 |
+
<p><?php echo sprintf( __('A network problem or firewall is blocking some connections from your web server to Akismet.com. Akismet is working but this may cause problems during times of network congestion. Please contact your web host or firewall administrator and give them <a href="%s" target="_blank">this information about Akismet and firewalls</a>.'), 'http://blog.akismet.com/akismet-hosting-faq/'); ?></p>
|
171 |
+
<?php
|
172 |
+
// all connections fail
|
173 |
+
} elseif ( $fail_count > 0 ) { ?>
|
174 |
+
<p style="padding: .5em; background-color: #d22; color: #fff; font-weight:bold;"><?php _e('Unable to reach any Akismet servers.'); ?></p>
|
175 |
+
<p><?php echo sprintf( __('A network problem or firewall is blocking all connections from your web server to Akismet.com. <strong>Akismet cannot work correctly until this is fixed.</strong> Please contact your web host or firewall administrator and give them <a href="%s" target="_blank">this information about Akismet and firewalls</a>.'), 'http://blog.akismet.com/akismet-hosting-faq/'); ?></p>
|
176 |
+
<?php
|
177 |
+
// all connections work
|
178 |
+
} else { ?>
|
179 |
+
<p style="padding: .5em; background-color: #2d2; color: #fff; font-weight:bold;"><?php _e('All Akismet servers are available.'); ?></p>
|
180 |
+
<p><?php _e('Akismet is working correctly. All servers are accessible.'); ?></p>
|
181 |
+
<?php
|
182 |
+
}
|
183 |
+
} else {
|
184 |
+
?>
|
185 |
+
<p style="padding: .5em; background-color: #d22; color: #fff; font-weight:bold;"><?php _e('Unable to find Akismet servers.'); ?></p>
|
186 |
+
<p><?php echo sprintf( __('A DNS problem or firewall is preventing all access from your web server to Akismet.com. <strong>Akismet cannot work correctly until this is fixed.</strong> Please contact your web host or firewall administrator and give them <a href="%s" target="_blank">this information about Akismet and firewalls</a>.'), 'http://blog.akismet.com/akismet-hosting-faq/'); ?></p>
|
187 |
+
<?php
|
188 |
+
}
|
189 |
}
|
190 |
|
191 |
if ( !empty($servers) ) {
|
280 |
$test_host = 'rest.akismet.com';
|
281 |
|
282 |
// Some web hosts may disable one or both functions
|
283 |
+
if ( !function_exists('fsockopen') || !function_exists('gethostbynamel') )
|
284 |
return array();
|
285 |
|
286 |
$ips = gethostbynamel($test_host);
|
372 |
return $host;
|
373 |
}
|
374 |
|
375 |
+
// return a comma-separated list of role names for the given user
|
376 |
+
function akismet_get_user_roles($user_id ) {
|
377 |
+
$roles = false;
|
378 |
+
|
379 |
+
if ( !class_exists('WP_User') )
|
380 |
+
return false;
|
381 |
+
|
382 |
+
if ( $user_id > 0 ) {
|
383 |
+
$comment_user = new WP_User($user_id);
|
384 |
+
if ( isset($comment_user->roles) )
|
385 |
+
$roles = join(',', $comment_user->roles);
|
386 |
+
}
|
387 |
+
|
388 |
+
return $roles;
|
389 |
+
}
|
390 |
+
|
391 |
// Returns array with headers in $response[0] and body in $response[1]
|
392 |
function akismet_http_post($request, $host, $path, $port = 80, $ip=null) {
|
393 |
global $wp_version;
|
433 |
function akismet_auto_check_comment( $comment ) {
|
434 |
global $akismet_api_host, $akismet_api_port;
|
435 |
|
436 |
+
$comment['user_ip'] = $_SERVER['REMOTE_ADDR'];
|
437 |
$comment['user_agent'] = $_SERVER['HTTP_USER_AGENT'];
|
438 |
$comment['referrer'] = $_SERVER['HTTP_REFERER'];
|
439 |
$comment['blog'] = get_option('home');
|
440 |
$comment['blog_lang'] = get_locale();
|
441 |
$comment['blog_charset'] = get_option('blog_charset');
|
442 |
$comment['permalink'] = get_permalink($comment['comment_post_ID']);
|
443 |
+
|
444 |
+
$comment['user_role'] = akismet_get_user_roles($comment['user_ID']);
|
445 |
|
446 |
$ignore = array( 'HTTP_COOKIE' );
|
447 |
|
465 |
$diff = time() - $last_updated;
|
466 |
$diff = $diff / 86400;
|
467 |
|
468 |
+
if ( $post->post_type == 'post' && $diff > 30 && get_option( 'akismet_discard_month' ) == 'true' && empty($comment['user_ID']) ) {
|
469 |
// akismet_result_spam() won't be called so bump the counter here
|
470 |
if ( $incr = apply_filters('akismet_spam_count_incr', 1) )
|
471 |
update_option( 'akismet_spam_count', get_option('akismet_spam_count') + $incr );
|
488 |
function akismet_submit_nonspam_comment ( $comment_id ) {
|
489 |
global $wpdb, $akismet_api_host, $akismet_api_port, $current_user, $current_site;
|
490 |
$comment_id = (int) $comment_id;
|
491 |
+
|
492 |
$comment = $wpdb->get_row("SELECT * FROM $wpdb->comments WHERE comment_ID = '$comment_id'");
|
493 |
if ( !$comment ) // it was deleted
|
494 |
return;
|
502 |
if ( is_object($current_site) ) {
|
503 |
$comment->site_domain = $current_site->domain;
|
504 |
}
|
505 |
+
$comment->user_role = akismet_get_user_roles($comment->user_ID);
|
506 |
+
|
507 |
$query_string = '';
|
508 |
foreach ( $comment as $key => $data )
|
509 |
$query_string .= $key . '=' . urlencode( stripslashes($data) ) . '&';
|
530 |
if ( is_object($current_site) ) {
|
531 |
$comment->site_domain = $current_site->domain;
|
532 |
}
|
533 |
+
$comment->user_role = akismet_get_user_roles($comment->user_ID);
|
534 |
$query_string = '';
|
535 |
foreach ( $comment as $key => $data )
|
536 |
$query_string .= $key . '=' . urlencode( stripslashes($data) ) . '&';
|
538 |
$response = akismet_http_post($query_string, $akismet_api_host, "/1.1/submit-spam", $akismet_api_port);
|
539 |
}
|
540 |
|
|
|
|
|
541 |
add_action('preprocess_comment', 'akismet_auto_check_comment', 1);
|
542 |
|
543 |
+
// For old versions of WP only
|
544 |
+
function akismet_set_comment_status( $comment_id, $status ) {
|
545 |
+
if ( $status == 'spam' ) {
|
546 |
+
akismet_submit_spam_comment( $comment_id );
|
547 |
+
} elseif ( $status == 'approve' ) {
|
548 |
+
akismet_submit_nonspam_comment( $comment_id );
|
549 |
+
}
|
550 |
+
}
|
551 |
+
|
552 |
+
// For WP 2.7+
|
553 |
+
function akismet_transition_comment_status( $new_status, $old_status, $comment ) {
|
554 |
+
if ( $new_status == $old_status )
|
555 |
+
return;
|
556 |
+
|
557 |
+
if ( $new_status == 'spam' ) {
|
558 |
+
akismet_submit_spam_comment( $comment->comment_ID );
|
559 |
+
} elseif ( $old_status == 'spam' ) {
|
560 |
+
akismet_submit_nonspam_comment( $comment->comment_ID );
|
561 |
+
}
|
562 |
+
}
|
563 |
+
|
564 |
function akismet_spamtoham( $comment ) { akismet_submit_nonspam_comment( $comment->comment_ID ); }
|
|
|
565 |
|
566 |
+
if ( function_exists( 'wp_transition_comment_status' ) ) {
|
567 |
+
add_action( 'transition_comment_status', 'akismet_transition_comment_status', 10, 3 );
|
568 |
+
} else {
|
569 |
+
add_action('wp_set_comment_status', 'akismet_set_comment_status', 10, 2);
|
570 |
+
add_action('edit_comment', 'akismet_submit_spam_comment');
|
571 |
+
add_filter( 'comment_spam_to_approved', 'akismet_spamtoham' );
|
572 |
+
add_filter( 'comment_spam_to_unapproved', 'akismet_spamtoham' );
|
573 |
+
}
|
574 |
// Total spam in queue
|
575 |
// get_option( 'akismet_spam_count' ) is the total caught ever
|
576 |
function akismet_spam_count( $type = false ) {
|
1005 |
add_action('rightnow_end', 'akismet_rightnow');
|
1006 |
|
1007 |
// For WP <= 2.3.x
|
1008 |
+
global $pagenow;
|
1009 |
+
|
1010 |
if ( 'moderation.php' == $pagenow ) {
|
1011 |
function akismet_recheck_button( $page ) {
|
1012 |
global $submenu;
|
1050 |
$c['blog_lang'] = get_locale();
|
1051 |
$c['blog_charset'] = get_option('blog_charset');
|
1052 |
$c['permalink'] = get_permalink($c['comment_post_ID']);
|
1053 |
+
$c['user_role'] = akismet_get_user_roles($c['user_ID']);
|
1054 |
$id = (int) $c['comment_ID'];
|
1055 |
|
1056 |
$query_string = '';
|
readme.txt
CHANGED
@@ -2,7 +2,8 @@
|
|
2 |
Contributors: matt, ryan, andy, mdawaffe, tellyworth, automattic
|
3 |
Tags: akismet, comments, spam
|
4 |
Requires at least: 2.0
|
5 |
-
Tested up to:
|
|
|
6 |
|
7 |
Akismet checks your comments against the Akismet web service to see if they look like spam or not.
|
8 |
|
@@ -25,6 +26,15 @@ Upload the Akismet plugin to your blog, Activate it, then enter your [WordPress.
|
|
25 |
|
26 |
== Changelog ==
|
27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
= 2.2.7 =
|
29 |
|
30 |
* Add a new AKISMET_VERSION constant
|
2 |
Contributors: matt, ryan, andy, mdawaffe, tellyworth, automattic
|
3 |
Tags: akismet, comments, spam
|
4 |
Requires at least: 2.0
|
5 |
+
Tested up to: 3.0
|
6 |
+
Stable tag: 2.2.8
|
7 |
|
8 |
Akismet checks your comments against the Akismet web service to see if they look like spam or not.
|
9 |
|
26 |
|
27 |
== Changelog ==
|
28 |
|
29 |
+
= 2.2.8 =
|
30 |
+
|
31 |
+
* Fix bug in initial comment check for ipv6 addresses
|
32 |
+
* Report comments as ham when they are moved from spam to moderation
|
33 |
+
* Report comments as ham when clicking undo after spam
|
34 |
+
* Use transition_comment_status action when available instead of older actions for spam/ham submissions
|
35 |
+
* Better diagnostic messages when PHP network functions are unavailable
|
36 |
+
* Better handling of comments by logged-in users
|
37 |
+
|
38 |
= 2.2.7 =
|
39 |
|
40 |
* Add a new AKISMET_VERSION constant
|