wp/wp-content/plugins/akismet/class.akismet-widget.php
changeset 7 cf61fcea0001
parent 5 5e2f62d02dcd
--- a/wp/wp-content/plugins/akismet/class.akismet-widget.php	Tue Jun 09 11:14:17 2015 +0000
+++ b/wp/wp-content/plugins/akismet/class.akismet-widget.php	Mon Oct 14 17:39:30 2019 +0200
@@ -62,11 +62,11 @@
 	}
 
 	function form( $instance ) {
-		if ( $instance ) {
+		if ( $instance && isset( $instance['title'] ) ) {
 			$title = $instance['title'];
 		}
 		else {
-			$title = __( 'Spam Blocked' , 'akismet');
+			$title = __( 'Spam Blocked' , 'akismet' );
 		}
 ?>
 
@@ -86,6 +86,10 @@
 	function widget( $args, $instance ) {
 		$count = get_option( 'akismet_spam_count' );
 
+		if ( ! isset( $instance['title'] ) ) {
+			$instance['title'] = __( 'Spam Blocked' , 'akismet' );
+		}
+
 		echo $args['before_widget'];
 		if ( ! empty( $instance['title'] ) ) {
 			echo $args['before_title'];
@@ -95,7 +99,7 @@
 ?>
 
 	<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 , 'akismet'), number_format_i18n( $count ) ); ?></a>
+		<a href="https://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