Code is Poetry.

WordPress' code just... wasn't.
This is now dealt with.

Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS.
Fixes #41057.


Built from https://develop.svn.wordpress.org/trunk@42343


git-svn-id: http://core.svn.wordpress.org/trunk@42172 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Gary Pendergast
2017-11-30 23:11:00 +00:00
parent 62be7ad218
commit aaf99e6913
610 changed files with 55731 additions and 43711 deletions

View File

@@ -32,8 +32,8 @@ class WP_Widget_Calendar extends WP_Widget {
*/
public function __construct() {
$widget_ops = array(
'classname' => 'widget_calendar',
'description' => __( 'A calendar of your site’s Posts.' ),
'classname' => 'widget_calendar',
'description' => __( 'A calendar of your site’s Posts.' ),
'customize_selective_refresh' => true,
);
parent::__construct( 'calendar', __( 'Calendar' ), $widget_ops );
@@ -81,7 +81,7 @@ class WP_Widget_Calendar extends WP_Widget {
* @return array Updated settings to save.
*/
public function update( $new_instance, $old_instance ) {
$instance = $old_instance;
$instance = $old_instance;
$instance['title'] = sanitize_text_field( $new_instance['title'] );
return $instance;
@@ -96,10 +96,10 @@ class WP_Widget_Calendar extends WP_Widget {
*/
public function form( $instance ) {
$instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );
$title = sanitize_text_field( $instance['title'] );
$title = sanitize_text_field( $instance['title'] );
?>
<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 esc_attr($title); ?>" /></p>
<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 esc_attr( $title ); ?>" /></p>
<?php
}
}