Make WordPress Core


Ignore:
Timestamp:
11/30/2017 11:09:33 PM (7 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-meta.php

    r41867 r42343  
    2626    public function __construct() {
    2727        $widget_ops = array(
    28             'classname' => 'widget_meta',
    29             'description' => __( 'Login, RSS, & WordPress.org links.' ),
     28            'classname'                   => 'widget_meta',
     29            'description'                 => __( 'Login, RSS, & WordPress.org links.' ),
    3030            'customize_selective_refresh' => true,
    3131        );
     
    5757            <?php wp_register(); ?>
    5858            <li><?php wp_loginout(); ?></li>
    59             <li><a href="<?php echo esc_url( get_bloginfo( 'rss2_url' ) ); ?>"><?php _e('Entries <abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li>
    60             <li><a href="<?php echo esc_url( get_bloginfo( 'comments_rss2_url' ) ); ?>"><?php _e('Comments <abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li>
     59            <li><a href="<?php echo esc_url( get_bloginfo( 'rss2_url' ) ); ?>"><?php _e( 'Entries <abbr title="Really Simple Syndication">RSS</abbr>' ); ?></a></li>
     60            <li><a href="<?php echo esc_url( get_bloginfo( 'comments_rss2_url' ) ); ?>"><?php _e( 'Comments <abbr title="Really Simple Syndication">RSS</abbr>' ); ?></a></li>
    6161            <?php
    6262            /**
     
    6969             * @param array  $instance   Array of settings for the current widget.
    7070             */
    71             echo apply_filters( 'widget_meta_poweredby', sprintf( '<li><a href="%s" title="%s">%s</a></li>',
    72                 esc_url( __( 'https://wordpress.org/' ) ),
    73                 esc_attr__( 'Powered by WordPress, state-of-the-art semantic personal publishing platform.' ),
    74                 _x( 'WordPress.org', 'meta widget link text' )
    75             ), $instance );
     71            echo apply_filters(
     72                'widget_meta_poweredby', sprintf(
     73                    '<li><a href="%s" title="%s">%s</a></li>',
     74                    esc_url( __( 'https://wordpress.org/' ) ),
     75                    esc_attr__( 'Powered by WordPress, state-of-the-art semantic personal publishing platform.' ),
     76                    _x( 'WordPress.org', 'meta widget link text' )
     77                ), $instance
     78            );
    7679
    7780            wp_meta();
     
    8083            <?php
    8184
    82         echo $args['after_widget'];
     85            echo $args['after_widget'];
    8386    }
    8487
     
    9497     */
    9598    public function update( $new_instance, $old_instance ) {
    96         $instance = $old_instance;
     99        $instance          = $old_instance;
    97100        $instance['title'] = sanitize_text_field( $new_instance['title'] );
    98101
     
    109112    public function form( $instance ) {
    110113        $instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );
    111         $title = sanitize_text_field( $instance['title'] );
     114        $title    = sanitize_text_field( $instance['title'] );
    112115?>
    113             <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>
     116            <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>
    114117<?php
    115118    }
Note: See TracChangeset for help on using the changeset viewer.