diff options
author | Theo Chatzimichos <tampakrap@gentoo.org> | 2011-02-09 13:18:42 +0200 |
---|---|---|
committer | Theo Chatzimichos <tampakrap@gentoo.org> | 2011-02-09 13:18:42 +0200 |
commit | 0b8a5c47c3eb22bc9d8aacbae016ae2b7c643131 (patch) | |
tree | 2f9b8a178c1c968948175cb5fa025cc9812720d7 /plugins/akismet/akismet.php | |
parent | Update akismet to 2.5.1 and smart-youtube to 3.8.3 (diff) | |
download | blogs-gentoo-0b8a5c47c3eb22bc9d8aacbae016ae2b7c643131.tar.gz blogs-gentoo-0b8a5c47c3eb22bc9d8aacbae016ae2b7c643131.tar.bz2 blogs-gentoo-0b8a5c47c3eb22bc9d8aacbae016ae2b7c643131.zip |
Updates:
akismet to version 2.5.3
limit-login-attempts to 1.6.0
wp-stats to 1.8.1
wp-syntax to 0.9.9
Diffstat (limited to 'plugins/akismet/akismet.php')
-rw-r--r-- | plugins/akismet/akismet.php | 30 |
1 files changed, 23 insertions, 7 deletions
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' ); +} |