diff options
Diffstat (limited to 'plugins/akismet')
-rw-r--r-- | plugins/akismet/admin.php | 24 | ||||
-rw-r--r-- | plugins/akismet/akismet.css | 7 | ||||
-rw-r--r-- | plugins/akismet/akismet.php | 30 | ||||
-rw-r--r-- | plugins/akismet/readme.txt | 18 |
4 files changed, 51 insertions, 28 deletions
diff --git a/plugins/akismet/admin.php b/plugins/akismet/admin.php index eaef99ce..91cedb29 100644 --- a/plugins/akismet/admin.php +++ b/plugins/akismet/admin.php @@ -236,11 +236,8 @@ function akismet_stats_script() { ?> <script type="text/javascript"> function resizeIframe() { - var height = document.documentElement.clientHeight; - height -= document.getElementById('akismet-stats-frame').offsetTop; - height += 100; // magic padding - - document.getElementById('akismet-stats-frame').style.height = height +"px"; + + document.getElementById('akismet-stats-frame').style.height = "2500px"; }; function resizeIframeInit() { @@ -352,8 +349,9 @@ function akismet_comment_row_action( $a, $comment ) { echo '<span class="akismet-status" commentid="'.$comment->comment_ID.'"><a href="comment.php?action=editcomment&c='.$comment->comment_ID.'#akismet-status" title="' . esc_attr__( 'View comment history' ) . '">'.htmlspecialchars($desc).'</a></span>'; if ( apply_filters( 'akismet_show_user_comments_approved', get_option('akismet_show_user_comments_approved') ) == 'true' ) { - $comment_count = akimset_get_user_comments_approved( $comment->user_id, $comment->comment_author_email, $comment->comment_author, $comment->comment_author_url ); - echo '<span class="akismet-user-comment-count" commentid="'.$comment->comment_ID.'" style="display:none;"><br><span class="akismet-user-comment-counts">'.sprintf( _n( '%s approved', '%s approved', $comment_count ), intval($comment_count) ).'</span></span>'; + $comment_count = akismet_get_user_comments_approved( $comment->user_id, $comment->comment_author_email, $comment->comment_author, $comment->comment_author_url ); + $comment_count = intval( $comment_count ); + echo '<span class="akismet-user-comment-count" commentid="'.$comment->comment_ID.'" style="display:none;"><br><span class="akismet-user-comment-counts">'.sprintf( _n( '%s approved', '%s approved', $comment_count ), number_format_i18n( $comment_count ) ) . '</span></span>'; } return $a; @@ -430,10 +428,6 @@ add_filter('comment_text', 'akismet_text_add_link_class'); function akismet_rightnow() { global $submenu, $wp_db_version; - $plural_func = '__ngettext'; - if ( function_exists( '_n' ) ) - $plural_func = '_n'; - // clean_url was deprecated in WP 3.0 $esc_url = 'clean_url'; if ( function_exists( 'esc_url' ) ) @@ -447,7 +441,7 @@ function akismet_rightnow() { $link = 'edit.php?page=akismet-admin'; if ( $count = get_option('akismet_spam_count') ) { - $intro = sprintf( $plural_func( + $intro = sprintf( _n( '<a href="%1$s">Akismet</a> has protected your site from %2$s spam comment already. ', '<a href="%1$s">Akismet</a> has protected your site from %2$s spam comments already. ', $count @@ -457,7 +451,7 @@ function akismet_rightnow() { } if ( $queue_count = akismet_spam_count() ) { - $queue_text = sprintf( $plural_func( + $queue_text = sprintf( _n( 'There\'s <a href="%2$s">%1$s comment</a> in your spam queue right now.', 'There are <a href="%2$s">%1$s comments</a> in your spam queue right now.', $queue_count @@ -584,6 +578,10 @@ function akismet_submit_spam_comment ( $comment_id ) { function akismet_transition_comment_status( $new_status, $old_status, $comment ) { if ( $new_status == $old_status ) return; + + # we don't need to record a history item for deleted comments + if ( $new_status == 'delete' ) + return; if ( !is_admin() ) return; diff --git a/plugins/akismet/akismet.css b/plugins/akismet/akismet.css index ab03efc7..6bc84587 100644 --- a/plugins/akismet/akismet.css +++ b/plugins/akismet/akismet.css @@ -1,12 +1,7 @@ #submitted-on { position: relative; } -#the-comment-list .author { padding-bottom: 5px !important; white-space: nowrap; } -#the-comment-list .author a { padding-left: 42px !important; } -#the-comment-list .author img { position: absolute; top: 0; left: 0; } -#the-comment-list .author strong { padding-left: 42px; font-size: 12px; position: relative; } #the-comment-list .author .akismet-user-comment-count { display: inline; } -#the-comment-list .author .akismet-user-comment-counts { padding-left: 42px; } #dashboard_recent_comments .akismet-status { display: none; } /* never show the flagged by text on the dashboard */ .akismet-status { float: right; } .akismet-status a { color: #AAA; font-style: italic; } span.comment-link a { text-decoration: underline; } -span.comment-link:after { content: " " attr(title) " "; color: #aaa; text-decoration: none; }
\ No newline at end of file +span.comment-link:after { content: " " attr(title) " "; color: #aaa; text-decoration: none; } diff --git a/plugins/akismet/akismet.php b/plugins/akismet/akismet.php index e5428382..ad86624d 100644 --- a/plugins/akismet/akismet.php +++ b/plugins/akismet/akismet.php @@ -5,11 +5,11 @@ /* Plugin Name: Akismet Plugin URI: http://akismet.com/ -Description: Used by millions, Akismet is quite possibly the best way in the world to <strong>protect your blog from comment and track-back 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/?return=true">Sign up for an Akismet API key</a>, and 3) Go to your <a href="plugins.php?page=akismet-key-config">Akismet configuration</a> page, and save your API key. -Version: 2.5.1 +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/?return=true">Sign up for an Akismet API key</a>, and 3) Go to your <a href="plugins.php?page=akismet-key-config">Akismet configuration</a> page, and save your API key. +Version: 2.5.3 Author: Automattic Author URI: http://automattic.com/wordpress-plugins/ -License: GPLv2 +License: GPLv2 or later */ /* @@ -28,7 +28,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -define('AKISMET_VERSION', '2.5.0'); +define('AKISMET_VERSION', '2.5.3'); define('AKISMET_PLUGIN_URL', plugin_dir_url( __FILE__ )); /** If you hardcode a WP.com API key here, all key config screens will be hidden */ @@ -101,7 +101,16 @@ function akismet_get_user_roles($user_id ) { if ( isset($comment_user->roles) ) $roles = join(',', $comment_user->roles); } - + + if ( is_multisite() && is_super_admin( $user_id ) ) { + if ( empty( $roles ) ) { + $roles = 'super_admin'; + } else { + $comment_user->roles[] = 'super_admin'; + $roles = join( ',', $comment_user->roles ); + } + } + return $roles; } @@ -133,7 +142,8 @@ function akismet_http_post($request, $host, $path, $port = 80, $ip=null) { 'Host' => $host, 'User-Agent' => $akismet_ua ), - 'httpversion' => '1.0' + 'httpversion' => '1.0', + 'timeout' => 15 ); $akismet_url = "http://{$http_host}{$path}"; $response = wp_remote_post( $akismet_url, $http_args ); @@ -180,7 +190,7 @@ function akismet_result_hold( $approved ) { } // how many approved comments does this author have? -function akimset_get_user_comments_approved( $user_id, $comment_author_email, $comment_author, $comment_author_url ) { +function akismet_get_user_comments_approved( $user_id, $comment_author_email, $comment_author, $comment_author_url ) { global $wpdb; if ( !empty($user_id) ) @@ -495,3 +505,9 @@ $akismet_comment_nonce_option = apply_filters( 'akismet_comment_nonce', get_opti if ( $akismet_comment_nonce_option == 'true' || $akismet_comment_nonce_option == '' ) add_action( 'comment_form', 'akismet_add_comment_nonce' ); + +if ( '3.0.5' == $wp_version ) { + remove_filter( 'comment_text', 'wp_kses_data' ); + if ( is_admin() ) + add_filter( 'comment_text', 'wp_kses_post' ); +} diff --git a/plugins/akismet/readme.txt b/plugins/akismet/readme.txt index 97962ef2..fbd3513b 100644 --- a/plugins/akismet/readme.txt +++ b/plugins/akismet/readme.txt @@ -3,8 +3,8 @@ Contributors: matt, ryan, andy, mdawaffe, tellyworth, josephscott, lessbloat, au Tags: akismet, comments, spam Requires at least: 3.0 Tested up to: 3.1 -Stable tag: 2.5.1 -License: GPLv2 +Stable tag: 2.5.3 +License: GPLv2 or later Akismet checks your comments against the Akismet web service to see if they look like spam or not. @@ -31,6 +31,20 @@ Upload the Akismet plugin to your blog, Activate it, then enter your [Akismet.co == Changelog == += 2.5.3 = +* Specify the license is GPL v2 or later +* Fix a bug that could result in orphaned commentmeta entries +* Include hotfix for WordPress 3.0.5 filter issue + += 2.5.2 = + +* Properly format the comment count for author counts +* Look for super admins on multisite installs when looking up user roles +* Increase the HTTP request timeout +* Removed padding for author approved count +* Fix typo in function name +* Set Akismet stats iframe height to fixed 2500px. Better to have one tall scroll bar than two side by side. + = 2.5.1 = * Fix a bug that caused the "Auto delete" option to fail to discard comments correctly |