Make WordPress Core


Ignore:
Timestamp:
11/30/2017 11:09:33 PM (9 years ago)
Author:
pento
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/widgets/class-wp-widget-calendar.php

    r41867 r42343  
    3333        public function __construct() {
    3434                $widget_ops = array(
    35                         'classname' => 'widget_calendar',
    36                         'description' => __( 'A calendar of your site’s Posts.' ),
     35                        'classname'                   => 'widget_calendar',
     36                        'description'                 => __( 'A calendar of your site’s Posts.' ),
    3737                        'customize_selective_refresh' => true,
    3838                );
    … …  
    8282         */
    8383        public function update( $new_instance, $old_instance ) {
    84                 $instance = $old_instance;
     84                $instance          = $old_instance;
    8585                $instance['title'] = sanitize_text_field( $new_instance['title'] );
    8686
    … …  
    9797        public function form( $instance ) {
    9898                $instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );
    99                 $title = sanitize_text_field( $instance['title'] );
     99                $title    = sanitize_text_field( $instance['title'] );
    100100                ?>
    101                 <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:'); ?></label>
    102                 <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>
     101                <p><label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:' ); ?></label>
     102                <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>
    103103                <?php
    104104        }
Note: See TracChangeset for help on using the changeset viewer.