web/wp-content/plugins/akismet/akismet.php
branchwordpress
changeset 132 4d4862461b8d
parent 109 03b0d1493584
equal deleted inserted replaced
131:a4642baaf829 132:4d4862461b8d
     1 <?php
     1 <?php
     2 /*
     2 /*
     3 Plugin Name: Akismet
     3 Plugin Name: Akismet
     4 Plugin URI: http://akismet.com/
     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://wordpress.com/api-keys/">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>&lt;?php akismet_counter(); ?&gt;</code> in your template. See also: <a href="http://wordpress.org/extend/plugins/stats/">WP Stats plugin</a>.
     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>&lt;?php akismet_counter(); ?&gt;</code> in your template. See also: <a href="http://wordpress.org/extend/plugins/stats/">WP Stats plugin</a>.
     6 Version: 2.2.6
     6 Version: 2.2.7
     7 Author: Matt Mullenweg
     7 Author: Matt Mullenweg
     8 Author URI: http://ma.tt/
     8 Author URI: http://ma.tt/
     9 */
     9 */
    10 
    10 
    11 define('AKISMET_VERSION', '2.2.6');
    11 define('AKISMET_VERSION', '2.2.7');
    12 
    12 
    13 // If you hardcode a WP.com API key here, all key config screens will be hidden
    13 // If you hardcode a WP.com API key here, all key config screens will be hidden
    14 if ( defined('WPCOM_API_KEY') )
    14 if ( defined('WPCOM_API_KEY') )
    15 	$wpcom_api_key = constant('WPCOM_API_KEY');
    15 	$wpcom_api_key = constant('WPCOM_API_KEY');
    16 else
    16 else
   120 		'new_key_empty' => array('color' => 'aa0', 'text' => __('Your key has been cleared.')),
   120 		'new_key_empty' => array('color' => 'aa0', 'text' => __('Your key has been cleared.')),
   121 		'new_key_valid' => array('color' => '2d2', 'text' => __('Your key has been verified. Happy blogging!')),
   121 		'new_key_valid' => array('color' => '2d2', 'text' => __('Your key has been verified. Happy blogging!')),
   122 		'new_key_invalid' => array('color' => 'd22', 'text' => __('The key you entered is invalid. Please double-check it.')),
   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.')),
   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.')),
   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://wordpress.com/profile/')),
   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.')),
   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.')));
   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 ?>
   128 ?>
   129 <?php if ( !empty($_POST['submit'] ) ) : ?>
   129 <?php if ( !empty($_POST['submit'] ) ) : ?>
   130 <div id="message" class="updated fade"><p><strong><?php _e('Options saved.') ?></strong></p></div>
   130 <div id="message" class="updated fade"><p><strong><?php _e('Options saved.') ?></strong></p></div>
   132 <div class="wrap">
   132 <div class="wrap">
   133 <h2><?php _e('Akismet Configuration'); ?></h2>
   133 <h2><?php _e('Akismet Configuration'); ?></h2>
   134 <div class="narrow">
   134 <div class="narrow">
   135 <form action="" method="post" id="akismet-conf" style="margin: auto; width: 400px; ">
   135 <form action="" method="post" id="akismet-conf" style="margin: auto; width: 400px; ">
   136 <?php if ( !$wpcom_api_key ) { ?>
   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">WordPress.com</a>.'), 'http://akismet.com/', 'http://wordpress.com/api-keys/'); ?></p>
   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 
   138 
   139 <?php akismet_nonce_field($akismet_nonce) ?>
   139 <?php akismet_nonce_field($akismet_nonce) ?>
   140 <h3><label for="key"><?php _e('WordPress.com API Key'); ?></label></h3>
   140 <h3><label for="key"><?php _e('WordPress.com API Key'); ?></label></h3>
   141 <?php foreach ( $ms as $m ) : ?>
   141 <?php foreach ( $ms as $m ) : ?>
   142 	<p style="padding: .5em; background-color: #<?php echo $messages[$m]['color']; ?>; color: #fff; font-weight: bold;"><?php echo $messages[$m]['text']; ?></p>
   142 	<p style="padding: .5em; background-color: #<?php echo $messages[$m]['color']; ?>; color: #fff; font-weight: bold;"><?php echo $messages[$m]['text']; ?></p>