diff options
author | Theo Chatzimichos <tampakrap@gentoo.org> | 2011-01-01 17:55:35 +0200 |
---|---|---|
committer | Theo Chatzimichos <tampakrap@gentoo.org> | 2011-01-01 17:55:35 +0200 |
commit | 08c08d251a0e2a71ebe8073c782e226e17b07012 (patch) | |
tree | 10c65598c02105770dc71f3b9f1dcc05de9616f2 | |
parent | Fixor akismet to include the file with the api key (diff) | |
download | blogs-gentoo-08c08d251a0e2a71ebe8073c782e226e17b07012.tar.gz blogs-gentoo-08c08d251a0e2a71ebe8073c782e226e17b07012.tar.bz2 blogs-gentoo-08c08d251a0e2a71ebe8073c782e226e17b07012.zip |
Update akismet to 2.5.1 and smart-youtube to 3.8.3
-rw-r--r-- | plugins/akismet/admin.php | 68 | ||||
-rw-r--r-- | plugins/akismet/akismet.css | 20 | ||||
-rw-r--r-- | plugins/akismet/akismet.js | 2 | ||||
-rw-r--r-- | plugins/akismet/akismet.php | 39 | ||||
-rw-r--r-- | plugins/akismet/readme.txt | 24 | ||||
-rw-r--r-- | plugins/akismet/widget.php | 10 | ||||
-rw-r--r-- | plugins/smart-youtube/readme.txt | 3 | ||||
-rw-r--r-- | plugins/smart-youtube/smartyoutube.class.php | 4 | ||||
-rw-r--r-- | plugins/smart-youtube/smartyoutube.php | 2 |
9 files changed, 109 insertions, 63 deletions
diff --git a/plugins/akismet/admin.php b/plugins/akismet/admin.php index fb6bd130..eaef99ce 100644 --- a/plugins/akismet/admin.php +++ b/plugins/akismet/admin.php @@ -25,9 +25,9 @@ function akismet_admin_init() { $hook = 'dashboard_page_akismet-stats-display'; add_action('admin_head-'.$hook, 'akismet_stats_script'); add_meta_box('akismet-status', __('Comment History'), 'akismet_comment_status_meta_box', 'comment', 'normal'); - wp_register_style('akismet.css', AKISMET_PLUGIN_URL . '/akismet.css'); + wp_register_style('akismet.css', AKISMET_PLUGIN_URL . 'akismet.css'); wp_enqueue_style('akismet.css'); - wp_register_script('akismet.js', AKISMET_PLUGIN_URL . '/akismet.js', array('jquery')); + wp_register_script('akismet.js', AKISMET_PLUGIN_URL . 'akismet.js', array('jquery')); wp_enqueue_script('akismet.js'); } add_action('admin_init', 'akismet_admin_init'); @@ -91,11 +91,6 @@ function akismet_conf() { else update_option( 'akismet_show_user_comments_approved', 'false' ); - if ( isset( $_POST['akismet_comment_nonce'] ) ) - update_option( 'akismet_comment_nonce', 'true' ); - else - update_option( 'akismet_comment_nonce', 'false' ); - } elseif ( isset($_POST['check']) ) { akismet_get_server_connectivity(0); } @@ -141,7 +136,7 @@ function akismet_conf() { <div class="wrap"> <h2><?php _e('Akismet Configuration'); ?></h2> <?php if (isset($_GET['message']) && $_GET['message'] == 'success') { ?> - <div class="updated below-h2" id="message"><p><strong>Sign up success!</strong> Please check your email for your Akismet API Key and enter it below.</p></div> + <div class="updated below-h2" id="message"><p><?php _e( '<strong>Sign up success!</strong> Please check your email for your Akismet API Key and enter it below.' ); ?></p></div> <?php } ?> <div class="narrow"> <form action="" method="post" id="akismet-conf" style="margin: auto; width: 400px; "> @@ -161,7 +156,6 @@ function akismet_conf() { <?php akismet_nonce_field($akismet_nonce) ?> <p><label><input name="akismet_discard_month" id="akismet_discard_month" value="true" type="checkbox" <?php if ( get_option('akismet_discard_month') == 'true' ) echo ' checked="checked" '; ?> /> <?php _e('Auto-delete spam submitted on posts more than a month old.'); ?></label></p> <p><label><input name="akismet_show_user_comments_approved" id="akismet_show_user_comments_approved" value="true" type="checkbox" <?php if ( get_option('akismet_show_user_comments_approved') == 'true' ) echo ' checked="checked" '; ?> /> <?php _e('Show the number of comments you\'ve approved beside each comment author.'); ?></label></p> -<p><label><input name="akismet_comment_nonce" id="akismet_comment_nonce" value="true" type="checkbox" <?php if ( get_option( 'akismet_comment_nonce' ) == 'true' || get_option( 'akismet_comment_nonce' ) == '' ) echo ' checked="checked" '; ?> /> <?php _e( 'Use a nonce on the comment form.' ); ?></label></p> <p class="submit"><input type="submit" name="submit" value="<?php _e('Update options »'); ?>" /></p> </form> @@ -281,13 +275,13 @@ function akismet_stats() { if ( !$count = get_option('akismet_spam_count') ) return; $path = plugin_basename(__FILE__); - echo '<h3>'.__('Spam').'</h3>'; + echo '<h3>' . _x( 'Spam', 'comments' ) . '</h3>'; global $submenu; if ( isset( $submenu['edit-comments.php'] ) ) $link = 'edit-comments.php'; else $link = 'edit.php'; - echo '<p>'.sprintf(__('<a href="%1$s">Akismet</a> has protected your site from <a href="%2$s">%3$s spam comments</a>.'), 'http://akismet.com/', clean_url("$link?page=akismet-admin"), number_format_i18n($count) ).'</p>'; + echo '<p>'.sprintf( _n( '<a href="%1$s">Akismet</a> has protected your site from <a href="%2$s">%3$s spam comments</a>.', '<a href="%1$s">Akismet</a> has protected your site from <a href="%2$s">%3$s spam comments</a>.', $count ), 'http://akismet.com/', clean_url("$link?page=akismet-admin"), number_format_i18n($count) ).'</p>'; } add_action('activity_box_end', 'akismet_stats'); @@ -308,7 +302,7 @@ function akismet_admin_warnings() { $next_check = human_time_diff( wp_next_scheduled('akismet_schedule_cron_recheck') ); if ( $waiting > 0 ) echo " - <div id='akismet-warning' class='updated fade'><p><strong>".__('Akismet has detected a problem.')."</strong> ".sprintf(_n('A server or network problem prevented Akismet from checking %d comment. It has been temporarily held for moderation and will be automatically re-checked in %s.', 'A server or network problem prevented Akismet from checking %d comments. They have been temporarily held for moderation and will be automatically re-checked in %s.', $waiting), $waiting, $next_check)."</p></div> + <div id='akismet-warning' class='updated fade'><p><strong>".__('Akismet has detected a problem.')."</strong> ".sprintf(_n('A server or network problem prevented Akismet from checking %d comment. It has been temporarily held for moderation and will be automatically re-checked in %s.', 'A server or network problem prevented Akismet from checking %d comments. They have been temporarily held for moderation and will be automatically re-checked in %s.', $waiting), number_format_i18n( $waiting ), $next_check)."</p></div> "; } add_action('admin_notices', 'akismet_warning'); @@ -326,13 +320,14 @@ function akismet_comment_row_action( $a, $comment ) { $akismet_result = get_comment_meta( $comment->comment_ID, 'akismet_result', true ); $user_result = get_comment_meta( $comment->comment_ID, 'akismet_user_result', true); + $comment_status = wp_get_comment_status( $comment->comment_ID ); $desc = null; if ( !$user_result || $user_result == $akismet_result ) { // Show the original Akismet result if the user hasn't overridden it, or if their decision was the same - if ( $akismet_result == 'true' ) - $desc = 'Flagged as spam by Akismet'; - elseif ( $akismet_result == 'false' ) - $desc = 'Cleared by Akismet'; + if ( $akismet_result == 'true' && $comment_status != 'spam' && $comment_status != 'trash' ) + $desc = __( 'Flagged as spam by Akismet' ); + elseif ( $akismet_result == 'false' && $comment_status == 'spam' ) + $desc = __( 'Cleared by Akismet' ); } else { $who = get_comment_meta( $comment->comment_ID, 'akismet_user', true ); if ( $user_result == 'true' ) @@ -340,13 +335,25 @@ function akismet_comment_row_action( $a, $comment ) { else $desc = sprintf( __('Un-spammed by %s'), $who ); } - + + // add a History item to the hover links, just after Edit + if ( $akismet_result ) { + $b = array(); + foreach ( $a as $k => $item ) { + $b[ $k ] = $item; + if ( $k == 'edit' ) + $b['history'] = '<a href="comment.php?action=editcomment&c='.$comment->comment_ID.'#akismet-status" title="'. esc_attr__( 'View comment history' ) . '"> '. __('History') . '</a>'; + } + + $a = $b; + } + if ( $desc ) 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( __( '%s approved' ), intval($comment_count) ).'</span></span>'; + 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>'; } return $a; @@ -441,30 +448,25 @@ function akismet_rightnow() { if ( $count = get_option('akismet_spam_count') ) { $intro = sprintf( $plural_func( - '<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,', + '<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 ), 'http://akismet.com/', number_format_i18n( $count ) ); } else { - $intro = sprintf( __('<a href="%1$s">Akismet</a> blocks spam from getting to your blog,'), 'http://akismet.com/' ); + $intro = sprintf( __('<a href="%1$s">Akismet</a> blocks spam from getting to your blog. '), 'http://akismet.com/' ); } if ( $queue_count = akismet_spam_count() ) { $queue_text = sprintf( $plural_func( - 'and there\'s <a href="%2$s">%1$s comment</a> in your spam queue right now.', - 'and there are <a href="%2$s">%1$s comments</a> in your spam queue right now.', + '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 ), number_format_i18n( $queue_count ), $esc_url($link) ); } else { - $queue_text = sprintf( __( " but there's nothing in your <a href='%1\$s'>spam queue</a> at the moment." ), $esc_url($link) ); + $queue_text = sprintf( __( "There's nothing in your <a href='%1\$s'>spam queue</a> at the moment." ), $esc_url($link) ); } - // _c was deprecated in WP 2.9.0 - if ( function_exists( '_x' ) ) - $text = sprintf( _x( '%1$s%2$s', 'akismet_rightnow' ), $intro, $queue_text ); - else - $text = sprintf( _c( '%1$s%2$s|akismet_rightnow' ), $intro, $queue_text ); - + $text = $intro . '<br />' . $queue_text; echo "<p class='akismet-right-now'>$text</p>\n"; } @@ -582,6 +584,12 @@ function akismet_submit_spam_comment ( $comment_id ) { function akismet_transition_comment_status( $new_status, $old_status, $comment ) { if ( $new_status == $old_status ) return; + + if ( !is_admin() ) + return; + + if ( !current_user_can( 'edit_post', $comment->comment_post_ID ) && !current_user_can( 'moderate_comments' ) ) + return; if ( defined('WP_IMPORTING') && WP_IMPORTING == true ) return; diff --git a/plugins/akismet/akismet.css b/plugins/akismet/akismet.css index 4beff9c8..ab03efc7 100644 --- a/plugins/akismet/akismet.css +++ b/plugins/akismet/akismet.css @@ -1,12 +1,12 @@ - #submitted-on { position: relative; } -.author { padding-bottom: 5px !important; white-space: nowrap; } -.author a { padding-left: 42px !important; } -.author img { position: absolute; top: 1px; left: 0; } -.author strong { padding-left: 42px; font-size: 14px; position: relative; } -.author .akismet-user-comment-count { display: inline; } -.author .akismet-user-comment-counts { padding-left: 42px; } -.akismet-status { background: #EEE; border: 1px solid #E4E4E4; color: #999; margin-bottom: 5px; padding: 1px 8px 2px 8px; -moz-border-radius:6px; border-radius:6px; -webkit-border-radius:6px; float: right; line-height: 1.2em; } -.row-actions { margin-top: -3px; } +#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; } +span.comment-link:after { content: " " attr(title) " "; color: #aaa; text-decoration: none; }
\ No newline at end of file diff --git a/plugins/akismet/akismet.js b/plugins/akismet/akismet.js index 34d037a5..39089351 100644 --- a/plugins/akismet/akismet.js +++ b/plugins/akismet/akismet.js @@ -1,7 +1,7 @@ jQuery(document).ready(function () { jQuery('.akismet-status').each(function () { var thisId = jQuery(this).attr('commentid'); - jQuery(this).prependTo('#comment-' + thisId + ' #submitted-on'); + jQuery(this).prependTo('#comment-' + thisId + ' .column-comment div:first-child'); }); jQuery('.akismet-user-comment-count').each(function () { var thisId = jQuery(this).attr('commentid'); diff --git a/plugins/akismet/akismet.php b/plugins/akismet/akismet.php index f5a76421..e5428382 100644 --- a/plugins/akismet/akismet.php +++ b/plugins/akismet/akismet.php @@ -5,8 +5,8 @@ /* 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="https:akismet.com/signup/?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.0 +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 Author: Automattic Author URI: http://automattic.com/wordpress-plugins/ License: GPLv2 @@ -84,8 +84,6 @@ function akismet_verify_key( $key, $ip = null ) { // if we're in debug or test modes, use a reduced service level so as not to polute training or stats data function akismet_test_mode() { - if ( defined('WP_DEBUG') && WP_DEBUG ) - return true; if ( defined('AKISMET_TEST_MODE') && AKISMET_TEST_MODE ) return true; return false; @@ -208,7 +206,7 @@ function akismet_update_comment_history( $comment_id, $message, $event=null ) { return false; $user = ''; - if ( is_object($current_user) ) + if ( is_object($current_user) && isset($current_user->user_login) ) $user = $current_user->user_login; $event = array( @@ -298,7 +296,7 @@ function akismet_auto_check_comment( $commentdata ) { $comment['user_role'] = akismet_get_user_roles($comment['user_ID']); - $akismet_nonce_option = get_option( 'akismet_comment_nonce' ); + $akismet_nonce_option = apply_filters( 'akismet_comment_nonce', get_option( 'akismet_comment_nonce' ) ); $comment['akismet_comment_nonce'] = 'inactive'; if ( $akismet_nonce_option == 'true' || $akismet_nonce_option == '' ) { $comment['akismet_comment_nonce'] = 'failed'; @@ -352,6 +350,7 @@ function akismet_auto_check_comment( $commentdata ) { if ( $incr = apply_filters('akismet_spam_count_incr', 1) ) update_option( 'akismet_spam_count', get_option('akismet_spam_count') + $incr ); wp_redirect( $_SERVER['HTTP_REFERER'] ); + die(); } } @@ -381,9 +380,13 @@ function akismet_delete_old() { $comment_ids = $wpdb->get_col("SELECT comment_id FROM $wpdb->comments WHERE DATE_SUB('$now_gmt', INTERVAL 15 DAY) > comment_date_gmt AND comment_approved = 'spam'"); if ( empty( $comment_ids ) ) return; + + $comma_comment_ids = implode( ', ', array_map('intval', $comment_ids) ); do_action( 'delete_comment', $comment_ids ); - $wpdb->query("DELETE FROM $wpdb->comments WHERE comment_id IN ( " . implode( ', ', $comment_ids ) . " )"); + $wpdb->query("DELETE FROM $wpdb->comments WHERE comment_id IN ( $comma_comment_ids )"); + $wpdb->query("DELETE FROM $wpdb->commentmeta WHERE comment_id IN ( $comma_comment_ids )"); + clean_comment_cache( $comment_ids ); $n = mt_rand(1, 5000); if ( apply_filters('akismet_optimize_table', ($n == 11)) ) // lucky number $wpdb->query("OPTIMIZE TABLE $wpdb->comments"); @@ -420,7 +423,7 @@ function akismet_check_db_comment( $id, $recheck_reason = 'recheck_queue' ) { return $response[1]; } -function akismet_cron_recheck( $data ) { +function akismet_cron_recheck() { global $wpdb; delete_option('akismet_available_servers'); @@ -429,9 +432,16 @@ function akismet_cron_recheck( $data ) { SELECT comment_id FROM {$wpdb->prefix}commentmeta WHERE meta_key = 'akismet_error' + LIMIT 100 " ); - + foreach ( (array) $comment_errors as $comment_id ) { + // if the comment no longer exists, remove the meta entry from the queue to avoid getting stuck + if ( !get_comment( $comment_id ) ) { + delete_comment_meta( $comment_id, 'akismet_error' ); + continue; + } + add_comment_meta( $comment_id, 'akismet_rechecking', true ); $status = akismet_check_db_comment( $comment_id, 'retry' ); @@ -467,12 +477,21 @@ function akismet_cron_recheck( $data ) { return; } } + + $remaining = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->commentmeta WHERE meta_key = 'akismet_error'" ) ); + if ( $remaining && !wp_next_scheduled('akismet_schedule_cron_recheck') ) { + wp_schedule_single_event( time() + 1200, 'akismet_schedule_cron_recheck' ); + } } add_action( 'akismet_schedule_cron_recheck', 'akismet_cron_recheck' ); function akismet_add_comment_nonce( $post_id ) { + echo '<p style="display: none;">'; wp_nonce_field( 'akismet_comment_nonce_' . $post_id, 'akismet_comment_nonce', FALSE ); + echo '</p>'; } -if ( get_option( 'akismet_comment_nonce' ) == 'true' || get_option( 'akismet_comment_nonce' ) == '' ) +$akismet_comment_nonce_option = apply_filters( 'akismet_comment_nonce', get_option( 'akismet_comment_nonce' ) ); + +if ( $akismet_comment_nonce_option == 'true' || $akismet_comment_nonce_option == '' ) add_action( 'comment_form', 'akismet_add_comment_nonce' ); diff --git a/plugins/akismet/readme.txt b/plugins/akismet/readme.txt index 250fb366..97962ef2 100644 --- a/plugins/akismet/readme.txt +++ b/plugins/akismet/readme.txt @@ -2,8 +2,8 @@ Contributors: matt, ryan, andy, mdawaffe, tellyworth, josephscott, lessbloat, automattic Tags: akismet, comments, spam Requires at least: 3.0 -Tested up to: 3.0 -Stable tag: 2.5.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. @@ -21,7 +21,7 @@ Major new features in Akismet 2.5 include: * 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/signup/) to use it. Keys are free for personal blogs, with paid subscriptions available for businesses and commercial sites. +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 == @@ -31,6 +31,24 @@ 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 diff --git a/plugins/akismet/widget.php b/plugins/akismet/widget.php index 06bcdb66..e9a3f626 100644 --- a/plugins/akismet/widget.php +++ b/plugins/akismet/widget.php @@ -8,11 +8,11 @@ function widget_akismet_register() { function widget_akismet($args) { extract($args); $options = get_option('widget_akismet'); - $count = number_format_i18n(get_option('akismet_spam_count')); + $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( __( '%1$s %2$sspam comments%3$s %4$sblocked by%5$s<br />%6$sAkismet%7$s' ), '<span id="akismet1"><span id="akismetcount">' . $count . '</span>', '<span id="akismetsc">', '</span></span>', '<span id="akismet2"><span id="akismetbb">', '</span>', '<span id="akismeta">', '</span></span>' ); ?></a></div></div> + <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 } @@ -85,8 +85,6 @@ function akismet_counter() { #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 = number_format_i18n(get_option('akismet_spam_count')); -?> -<div id="akismetwrap"><div id="akismetstats"><a id="aka" href="http://akismet.com" title=""><div id="akismet1"><span id="akismetcount"><?php echo $count; ?></span> <span id="akismetsc"><?php _e('spam comments') ?></span></div> <div id="akismet2"><span id="akismetbb"><?php _e('blocked by') ?></span><br /><span id="akismeta">Akismet</span></div></a></div></div> -<?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 ) ); } diff --git a/plugins/smart-youtube/readme.txt b/plugins/smart-youtube/readme.txt index 3334df3f..f6127694 100644 --- a/plugins/smart-youtube/readme.txt +++ b/plugins/smart-youtube/readme.txt @@ -37,6 +37,9 @@ Plugin by Vladimir Prelovac. Looking for <a href="http://www.prelovac.com/vladim == Changelog ==
+= 3.8.3 =
+* Fixed a bug that caused video options not to be set to default
+
= 3.8.2 =
* Sometimes video won't show because template option is empty - now made sure that default template is used
diff --git a/plugins/smart-youtube/smartyoutube.class.php b/plugins/smart-youtube/smartyoutube.class.php index 98af1de0..89c37acd 100644 --- a/plugins/smart-youtube/smartyoutube.class.php +++ b/plugins/smart-youtube/smartyoutube.class.php @@ -33,8 +33,8 @@ class SmartYouTube $this->key = 'smart_youtube'; - if (get_option($this->key)) - $this->options=$this->get_options(); + + $this->options=$this->get_options(); $this->add_filters_and_hooks(); } diff --git a/plugins/smart-youtube/smartyoutube.php b/plugins/smart-youtube/smartyoutube.php index 85ac380c..86423b04 100644 --- a/plugins/smart-youtube/smartyoutube.php +++ b/plugins/smart-youtube/smartyoutube.php @@ -4,7 +4,7 @@ Plugin Name: Smart Youtube Plugin URI: http://www.prelovac.com/vladimir/wordpress-plugins/smart-youtube Description: Insert YouTube videos in posts, comments and RSS feeds with ease and full customization. Author: Vladimir Prelovac -Version: 3.8.2 +Version: 3.8.3 Author URI: http://www.prelovac.com/vladimir/ |