Twenty Eleven: fix spacing and add a few missing esc_attr() calls in widgets.php - see #17198
git-svn-id: http://svn.automattic.com/wordpress/trunk@17723 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
963d908223
commit
5daf376821
|
@ -19,7 +19,6 @@ class Twenty_Eleven_Ephemera_Widget extends WP_Widget {
|
||||||
add_action( 'save_post', array(&$this, 'flush_widget_cache' ) );
|
add_action( 'save_post', array(&$this, 'flush_widget_cache' ) );
|
||||||
add_action( 'deleted_post', array(&$this, 'flush_widget_cache' ) );
|
add_action( 'deleted_post', array(&$this, 'flush_widget_cache' ) );
|
||||||
add_action( 'switch_theme', array(&$this, 'flush_widget_cache' ) );
|
add_action( 'switch_theme', array(&$this, 'flush_widget_cache' ) );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -155,11 +154,11 @@ class Twenty_Eleven_Ephemera_Widget extends WP_Widget {
|
||||||
$title = isset( $instance['title']) ? esc_attr( $instance['title'] ) : '';
|
$title = isset( $instance['title']) ? esc_attr( $instance['title'] ) : '';
|
||||||
$number = isset( $instance['number'] ) ? absint( $instance['number'] ) : 10;
|
$number = isset( $instance['number'] ) ? absint( $instance['number'] ) : 10;
|
||||||
?>
|
?>
|
||||||
<p><label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'twentyeleven' ); ?></label>
|
<p><label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"><?php _e( 'Title:', 'twentyeleven' ); ?></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; ?>" /></p>
|
<input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" /></p>
|
||||||
|
|
||||||
<p><label for="<?php echo $this->get_field_id( 'number' ); ?>"><?php _e( 'Number of posts to show:', 'twentyeleven' ); ?></label>
|
<p><label for="<?php echo esc_attr( $this->get_field_id( 'number' ) ); ?>"><?php _e( 'Number of posts to show:', 'twentyeleven' ); ?></label>
|
||||||
<input id="<?php echo $this->get_field_id( 'number' ); ?>" name="<?php echo $this->get_field_name( 'number' ); ?>" type="text" value="<?php echo $number; ?>" size="3" /></p>
|
<input id="<?php echo esc_attr( $this->get_field_id( 'number' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'number' ) ); ?>" type="text" value="<?php echo esc_attr( $number ); ?>" size="3" /></p>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue