]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-content/plugins/akismet/class.akismet-widget.php
WordPress 3.9
[autoinstalls/wordpress.git] / wp-content / plugins / akismet / class.akismet-widget.php
similarity index 83%
rename from wp-content/plugins/akismet/widget.php
rename to wp-content/plugins/akismet/class.akismet-widget.php
index 8c5a120f567d800616741345859c10e6b37da7c0..a60ae603bc357984f12e9918e6958dce3c679ee4 100644 (file)
@@ -5,10 +5,12 @@
 class Akismet_Widget extends WP_Widget {
 
        function __construct() {
+               load_plugin_textdomain( 'akismet' );
+               
                parent::__construct(
                        'akismet_widget',
-                       __( 'Akismet Widget' ),
-                       array( 'description' => __( 'Display the number of spam comments Akismet has caught' ) )
+                       __( 'Akismet Widget' , 'akismet'),
+                       array( 'description' => __( 'Display the number of spam comments Akismet has caught' , 'akismet') )
                );
 
                if ( is_active_widget( false, false, $this->id_base ) ) {
@@ -23,7 +25,7 @@ class Akismet_Widget extends WP_Widget {
 .a-stats {
        width: auto;
 }
-.a-stats a { 
+.a-stats a {
        background: #7CA821;
        background-image:-moz-linear-gradient(0% 100% 90deg,#5F8E14,#7CA821);
        background-image:-webkit-gradient(linear,0% 0,0% 100%,from(#7CA821),to(#5F8E14));
@@ -41,7 +43,7 @@ class Akismet_Widget extends WP_Widget {
        -webkit-border-radius:3px;
        width: 100%;
 }
-.a-stats a:hover { 
+.a-stats a:hover {
        text-decoration: none;
        background-image:-moz-linear-gradient(0% 100% 90deg,#6F9C1B,#659417);
        background-image:-webkit-gradient(linear,0% 0,0% 100%,from(#659417),to(#6F9C1B));
@@ -61,19 +63,19 @@ class Akismet_Widget extends WP_Widget {
 
        function form( $instance ) {
                if ( $instance ) {
-                       $title = esc_attr( $instance['title'] );
+                       $title = $instance['title'];
                }
                else {
-                       $title = __( 'Spam Blocked' );
+                       $title = __( 'Spam Blocked' , 'akismet');
                }
 ?>
 
                <p>
-               <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:' ); ?></label> 
-               <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo $title; ?>" />
+               <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php esc_html_e( 'Title:' , 'akismet'); ?></label>
+               <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" />
                </p>
 
-<?php 
+<?php
        }
 
        function update( $new_instance, $old_instance ) {
@@ -93,7 +95,7 @@ class Akismet_Widget extends WP_Widget {
 ?>
 
        <div class="a-stats">
-               <a href="http://akismet.com" target="_blank" title=""><?php printf( _n( '<strong class="count">%1$s spam</strong> blocked by <strong>Akismet</strong>', '<strong class="count">%1$s spam</strong> blocked by <strong>Akismet</strong>', $count ), number_format_i18n( $count ) ); ?></a>
+               <a href="http://akismet.com" target="_blank" title=""><?php printf( _n( '<strong class="count">%1$s spam</strong> blocked by <strong>Akismet</strong>', '<strong class="count">%1$s spam</strong> blocked by <strong>Akismet</strong>', $count , 'akismet'), number_format_i18n( $count ) ); ?></a>
        </div>
 
 <?php