From 07405d17c3ed619db3d8af200546e157a81ad11b Mon Sep 17 00:00:00 2001 From: Theo Chatzimichos Date: Thu, 3 Oct 2013 22:00:33 +0200 Subject: Update akismet --- plugins/akismet/.htaccess | 11 ------- plugins/akismet/admin.php | 62 ++++++++++++++++++++++++---------------- plugins/akismet/akismet.php | 4 +-- plugins/akismet/img/logo.png | Bin 0 -> 2710 bytes plugins/akismet/img/logo@2x.png | Bin 0 -> 1467 bytes plugins/akismet/readme.txt | 7 ++++- 6 files changed, 46 insertions(+), 38 deletions(-) delete mode 100644 plugins/akismet/.htaccess create mode 100644 plugins/akismet/img/logo.png create mode 100644 plugins/akismet/img/logo@2x.png diff --git a/plugins/akismet/.htaccess b/plugins/akismet/.htaccess deleted file mode 100644 index cfad4685..00000000 --- a/plugins/akismet/.htaccess +++ /dev/null @@ -1,11 +0,0 @@ -Order Deny,Allow -Deny from all - - - Allow from all - - -#allow access to any image - - Allow from all - \ No newline at end of file diff --git a/plugins/akismet/admin.php b/plugins/akismet/admin.php index 481b0f3d..f8071916 100644 --- a/plugins/akismet/admin.php +++ b/plugins/akismet/admin.php @@ -39,10 +39,10 @@ function akismet_load_js_and_css() { 'plugins_page_akismet-key-config', 'jetpack_page_akismet-key-config', ) ) ) { - wp_register_style( 'akismet.css', AKISMET_PLUGIN_URL . 'akismet.css', array(), '2.5.4.4' ); + wp_register_style( 'akismet.css', AKISMET_PLUGIN_URL . 'akismet.css', array(), '2.5.9' ); wp_enqueue_style( 'akismet.css'); - wp_register_script( 'akismet.js', AKISMET_PLUGIN_URL . 'akismet.js', array('jquery'), '2.5.4.6' ); + wp_register_script( 'akismet.js', AKISMET_PLUGIN_URL . 'akismet.js', array('jquery'), '2.5.9' ); wp_enqueue_script( 'akismet.js' ); wp_localize_script( 'akismet.js', 'WPAkismet', array( 'comment_author_url_nonce' => wp_create_nonce( 'comment_author_url_nonce' ) @@ -67,11 +67,14 @@ add_filter( 'plugin_action_links', 'akismet_plugin_action_links', 10, 2 ); function akismet_conf() { global $akismet_nonce, $current_user; - $new_key_link = 'https://akismet.com/get/'; - $api_key = akismet_get_key(); - $show_key_form = $api_key; - $key_status = 'empty'; - $saved_ok = false; + $new_key_link = 'https://akismet.com/get/'; + $config_link = esc_url( add_query_arg( array( 'page' => 'akismet-key-config', 'show' => 'enter-api-key' ), class_exists( 'Jetpack' ) ? admin_url( 'admin.php' ) : admin_url( 'plugins.php' ) ) ); + $stats_link = esc_url( add_query_arg( array( 'page' => 'akismet-stats-display' ), class_exists( 'Jetpack' ) ? admin_url( 'admin.php' ) : admin_url( 'index.php' ) ) ); + $api_key = akismet_get_key(); + $show_key_form = $api_key; + $key_status = 'empty'; + $saved_ok = false; + $key_status_text = ''; $ms = array(); @@ -98,17 +101,17 @@ function akismet_conf() { $ms[] = 'key_empty'; } else - $key_status = akismet_verify_key( $key ); - + $key_status = akismet_verify_key( $key ); + if ( $key != $api_key && $key_status == 'valid' ) { - update_option('wordpress_api_key', $key); $ms[] = 'new_key_valid'; + update_option('wordpress_api_key', $key); } elseif ( $key_status == 'invalid' ) $ms[] = 'new_key_invalid'; elseif ( $key_status == 'failed' ) $ms[] = 'new_key_failed'; - + $api_key = $key_status == 'valid' ? $key : false; if ( isset( $_POST['akismet_discard_month'] ) ) @@ -130,6 +133,9 @@ function akismet_conf() { check_admin_referer( $akismet_nonce ); akismet_get_server_connectivity(0); } + elseif ( isset( $_GET['show'] ) && $_GET['show'] == 'enter-api-key' ) { + $show_key_form = true; + } if ( $show_key_form ) { //check current key status @@ -154,7 +160,14 @@ function akismet_conf() { elseif ( !empty( $key ) && $key_status == 'failed' ) $ms[] = 'key_failed'; } - } + } + + $key_status_strings = array( + 'empty' => __( 'Empty' ), + 'valid' => __( 'Valid' ), + 'invalid' => __( 'Invalid' ), + 'failed' => __( 'Failed' ), + ); $messages = array( 'new_key_empty' => array( 'class' => 'updated fade', 'text' => __('Your key has been cleared.' ) ), @@ -174,7 +187,7 @@ function akismet_conf() {

-

Stats' ), esc_url( add_query_arg( array( 'page' => 'akismet-stats-display' ), class_exists( 'Jetpack' ) ? admin_url( 'admin.php' ) : admin_url( 'index.php' ) ) ) ); ?>

+

Stats' ), $stats_link ); ?>

@@ -182,10 +195,10 @@ function akismet_conf() { - +
- +
@@ -203,7 +216,7 @@ function akismet_conf() { -
+

create one here'), '#' );?>

@@ -212,8 +225,8 @@ function akismet_conf() {
-
- +
+
@@ -301,12 +314,13 @@ function akismet_conf() { function akismet_stats_display() { global $akismet_api_host, $akismet_api_port; - $blog = urlencode( get_bloginfo('url') ); - $api_key = akismet_get_key();?> + $blog = urlencode( get_bloginfo('url') ); + $api_key = akismet_get_key(); + $config_link = esc_url( add_query_arg( array( 'page' => 'akismet-key-config' ), class_exists( 'Jetpack' ) ? admin_url( 'admin.php' ) : admin_url( 'plugins.php' ) ) );?>
-

enter your Akismet API key for it to work.' ), esc_url( add_query_arg( array( 'page' => 'akismet-key-config' ), admin_url( 'admin.php' ) ) ) );?>

enter your Akismet API key for it to work.' ), $config_link );?>

@@ -368,7 +382,7 @@ function akismet_admin_warnings() { -
+ @@ -376,10 +390,10 @@ function akismet_admin_warnings() {
A
-
Activate your Akismet account
+
'.__('Activate your Akismet account').'
-
Almost done - activate your account and say goodbye to comment spam.
+
'.__('Almost done - activate your account and say goodbye to comment spam').'
diff --git a/plugins/akismet/akismet.php b/plugins/akismet/akismet.php index 1e622f63..b0b258df 100644 --- a/plugins/akismet/akismet.php +++ b/plugins/akismet/akismet.php @@ -6,7 +6,7 @@ Plugin Name: Akismet Plugin URI: http://akismet.com/?return=true Description: Used by millions, Akismet is quite possibly the best way in the world to protect your blog from comment and trackback spam. 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) Sign up for an Akismet API key, and 3) Go to your Akismet configuration page, and save your API key. -Version: 2.5.8 +Version: 2.5.9 Author: Automattic Author URI: http://automattic.com/wordpress-plugins/ License: GPLv2 or later @@ -34,7 +34,7 @@ if ( !function_exists( 'add_action' ) ) { exit; } -define('AKISMET_VERSION', '2.5.8'); +define('AKISMET_VERSION', '2.5.9'); define('AKISMET_PLUGIN_URL', plugin_dir_url( __FILE__ )); /** If you hardcode a WP.com API key here, all key config screens will be hidden */ diff --git a/plugins/akismet/img/logo.png b/plugins/akismet/img/logo.png new file mode 100644 index 00000000..b5f5b9a1 Binary files /dev/null and b/plugins/akismet/img/logo.png differ diff --git a/plugins/akismet/img/logo@2x.png b/plugins/akismet/img/logo@2x.png new file mode 100644 index 00000000..80c835b0 Binary files /dev/null and b/plugins/akismet/img/logo@2x.png differ diff --git a/plugins/akismet/readme.txt b/plugins/akismet/readme.txt index 597749e7..d0094d20 100644 --- a/plugins/akismet/readme.txt +++ b/plugins/akismet/readme.txt @@ -3,7 +3,7 @@ Contributors: matt, ryan, andy, mdawaffe, tellyworth, josephscott, lessbloat, eo Tags: akismet, comments, spam Requires at least: 3.0 Tested up to: 3.6 -Stable tag: 2.5.8 +Stable tag: 2.5.9 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,11 @@ Upload the Akismet plugin to your blog, Activate it, then enter your [Akismet.co == Changelog == += 2.5.9 = +* Update 'Already have a key' link to redirect page rather than depend on javascript +* Fix some non-translatable strings to be translatable +* Update Activation banner in plugins page to redirect user to Akismet config page + = 2.5.8 = * Simplify the activation process for new users * Remove the reporter_ip parameter -- cgit v1.2.3-18-g5258