Commit 928e20cf authored by godog's avatar godog Committed by lechuck
Browse files

Import akismet 2.5.1

parent 9e046a53
This diff is collapsed.
#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
jQuery(document).ready(function () {
jQuery('.akismet-status').each(function () {
var thisId = jQuery(this).attr('commentid');
jQuery(this).prependTo('#comment-' + thisId + ' .column-comment div:first-child');
});
jQuery('.akismet-user-comment-count').each(function () {
var thisId = jQuery(this).attr('commentid');
jQuery(this).insertAfter('#comment-' + thisId + ' .author strong:first').show();
});
});
This diff is collapsed.
=== Akismet ===
Contributors: matt, ryan, andy, mdawaffe, tellyworth, automattic
Contributors: matt, ryan, andy, mdawaffe, tellyworth, josephscott, lessbloat, automattic
Tags: akismet, comments, spam
Requires at least: 2.0
Tested up to: 3.0
Stable tag: 2.4.0
Requires at least: 3.0
Tested up to: 3.1
Stable tag: 2.5.1
License: GPLv2
Akismet checks your comments against the Akismet web service to see if they look like spam or not.
......@@ -13,11 +13,15 @@ Akismet checks your comments against the Akismet web service to see if they look
Akismet checks your comments against the Akismet web service to see if they look like spam or not and lets you
review the spam it catches under your blog's "Comments" admin screen.
Want to show off how much spam Akismet has caught for you? Just put `<?php akismet_counter(); ?>` in your template.
Major new features in Akismet 2.5 include:
See also: [WP Stats plugin](http://wordpress.org/extend/plugins/stats/).
* A comment status history, so you can easily see which comments were caught or cleared by Akismet, and which were spammed or unspammed by a moderator
* Links are highlighted in the comment body, to reveal hidden or misleading links
* If your web host is unable to reach Akismet's servers, the plugin will automatically retry when your connection is back up
* Moderators can see the number of approved comments for each user
* Spam and Unspam reports now include more information, to help improve accuracy
PS: You'll need an [Akismet.com API key](http://akismet.com/get/) to use it.
PS: You'll need an [Akismet.com API key](http://akismet.com/get/) to use it. Keys are free for personal blogs, with paid subscriptions available for businesses and commercial sites.
== Installation ==
......@@ -27,6 +31,39 @@ Upload the Akismet plugin to your blog, Activate it, then enter your [Akismet.co
== Changelog ==
= 2.5.1 =
* Fix a bug that caused the "Auto delete" option to fail to discard comments correctly
* Remove the comment nonce form field from the 'Akismet Configuration' page in favor of using a filter, akismet_comment_nonce
* Fixed padding bug in "author" column of posts screen
* Added margin-top to "cleared by ..." badges on dashboard
* Fix possible error when calling akismet_cron_recheck()
* Fix more PHP warnings
* Clean up XHTML warnings for comment nonce
* Fix for possible condition where scheduled comment re-checks could get stuck
* Clean up the comment meta details after deleting a comment
* Only show the status badge if the comment status has been changed by someone/something other than Akismet
* Show a 'History' link in the row-actions
* Translation fixes
* Reduced font-size on author name
* Moved "flagged by..." notification to top right corner of comment container and removed heavy styling
* Hid "flagged by..." notification while on dashboard
= 2.5.0 =
* Track comment actions under 'Akismet Status' on the edit comment screen
* Fix a few remaining deprecated function calls ( props Mike Glendinning )
* Use HTTPS for the stats IFRAME when wp-admin is using HTTPS
* Use the WordPress HTTP class if available
* Move the admin UI code to a separate file, only loaded when needed
* Add cron retry feature, to replace the old connectivity check
* Display Akismet status badge beside each comment
* Record history for each comment, and display it on the edit page
* Record the complete comment as originally submitted in comment_meta, to use when reporting spam and ham
* Highlight links in comment content
* New option, "Show the number of comments you've approved beside each comment author."
* New option, "Use a nonce on the comment form."
= 2.4.0 =
* Spell out that the license is GPLv2
......
<?php
/**
* @package Akismet
*/
// Widget stuff
function widget_akismet_register() {
if ( function_exists('register_sidebar_widget') ) :
function widget_akismet($args) {
extract($args);
$options = get_option('widget_akismet');
$count = get_option('akismet_spam_count');
?>
<?php echo $before_widget; ?>
<?php echo $before_title . $options['title'] . $after_title; ?>
<div id="akismetwrap"><div id="akismetstats"><a id="aka" href="http://akismet.com" title=""><?php printf( _n( '%1$s%2$s%3$s %4$sspam comment%5$s %6$sblocked by%7$s<br />%8$sAkismet%9$s', '%1$s%2$s%3$s %4$sspam comments%5$s %6$sblocked by%7$s<br />%8$sAkismet%9$s', $count ), '<span id="akismet1"><span id="akismetcount">', number_format_i18n( $count ), '</span>', '<span id="akismetsc">', '</span></span>', '<span id="akismet2"><span id="akismetbb">', '</span>', '<span id="akismeta">', '</span></span>' ); ?></a></div></div>
<?php echo $after_widget; ?>
<?php
}
function widget_akismet_style() {
$plugin_dir = '/wp-content/plugins';
if ( defined( 'PLUGINDIR' ) )
$plugin_dir = '/' . PLUGINDIR;
?>
<style type="text/css">
#aka,#aka:link,#aka:hover,#aka:visited,#aka:active{color:#fff;text-decoration:none}
#aka:hover{border:none;text-decoration:none}
#aka:hover #akismet1{display:none}
#aka:hover #akismet2,#akismet1{display:block}
#akismet2{display:none;padding-top:2px}
#akismeta{font-size:16px;font-weight:bold;line-height:18px;text-decoration:none}
#akismetcount{display:block;font:15px Verdana,Arial,Sans-Serif;font-weight:bold;text-decoration:none}
#akismetwrap #akismetstats{background:url(<?php echo get_option('siteurl'), $plugin_dir; ?>/akismet/akismet.gif) no-repeat top left;border:none;color:#fff;font:11px 'Trebuchet MS','Myriad Pro',sans-serif;height:40px;line-height:100%;overflow:hidden;padding:8px 0 0;text-align:center;width:120px}
</style>
<?php
}
function widget_akismet_control() {
$options = $newoptions = get_option('widget_akismet');
if ( isset( $_POST['akismet-submit'] ) && $_POST["akismet-submit"] ) {
$newoptions['title'] = strip_tags(stripslashes($_POST["akismet-title"]));
if ( empty($newoptions['title']) ) $newoptions['title'] = __('Spam Blocked');
}
if ( $options != $newoptions ) {
$options = $newoptions;
update_option('widget_akismet', $options);
}
$title = htmlspecialchars($options['title'], ENT_QUOTES);
?>
<p><label for="akismet-title"><?php _e('Title:'); ?> <input style="width: 250px;" id="akismet-title" name="akismet-title" type="text" value="<?php echo $title; ?>" /></label></p>
<input type="hidden" id="akismet-submit" name="akismet-submit" value="1" />
<?php
}
if ( function_exists( 'wp_register_sidebar_widget' ) ) {
wp_register_sidebar_widget( 'akismet', 'Akismet', 'widget_akismet', null, 'akismet');
wp_register_widget_control( 'akismet', 'Akismet', 'widget_akismet_control', null, 75, 'akismet');
} else {
register_sidebar_widget('Akismet', 'widget_akismet', null, 'akismet');
register_widget_control('Akismet', 'widget_akismet_control', null, 75, 'akismet');
}
if ( is_active_widget('widget_akismet') )
add_action('wp_head', 'widget_akismet_style');
endif;
}
add_action('init', 'widget_akismet_register');
// Counter for non-widget users
function akismet_counter() {
$plugin_dir = '/wp-content/plugins';
if ( defined( 'PLUGINDIR' ) )
$plugin_dir = '/' . PLUGINDIR;
?>
<style type="text/css">
#akismetwrap #aka,#aka:link,#aka:hover,#aka:visited,#aka:active{color:#fff;text-decoration:none}
#aka:hover{border:none;text-decoration:none}
#aka:hover #akismet1{display:none}
#aka:hover #akismet2,#akismet1{display:block}
#akismet2{display:none;padding-top:2px}
#akismeta{font-size:16px;font-weight:bold;line-height:18px;text-decoration:none}
#akismetcount{display:block;font:15px Verdana,Arial,Sans-Serif;font-weight:bold;text-decoration:none}
#akismetwrap #akismetstats{background:url(<?php echo get_option('siteurl'), $plugin_dir; ?>/akismet/akismet.gif) no-repeat top left;border:none;color:#fff;font:11px 'Trebuchet MS','Myriad Pro',sans-serif;height:40px;line-height:100%;overflow:hidden;padding:8px 0 0;text-align:center;width:120px}
</style>
<?php
$count = get_option('akismet_spam_count');
printf( _n( '<div id="akismetwrap"><div id="akismetstats"><a id="aka" href="http://akismet.com" title=""><div id="akismet1"><span id="akismetcount">%1$s</span> <span id="akismetsc">spam comment</span></div> <div id="akismet2"><span id="akismetbb">blocked by</span><br /><span id="akismeta">Akismet</span></div></a></div></div>', '<div id="akismetwrap"><div id="akismetstats"><a id="aka" href="http://akismet.com" title=""><div id="akismet1"><span id="akismetcount">%1$s</span> <span id="akismetsc">spam comments</span></div> <div id="akismet2"><span id="akismetbb">blocked by</span><br /><span id="akismeta">Akismet</span></div></a></div></div>', $count ), number_format_i18n( $count ) );
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment