WordPress.org

Make WordPress Core


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

    r42217 r42343  
    2424    public function __construct() {
    2525        $widget_ops = array(
    26             'description' => __( 'Add a navigation menu to your sidebar.' ),
     26            'description'                 => __( 'Add a navigation menu to your sidebar.' ),
    2727            'customize_selective_refresh' => true,
    2828        );
    29         parent::__construct( 'nav_menu', __('Navigation Menu'), $widget_ops );
     29        parent::__construct( 'nav_menu', __( 'Navigation Menu' ), $widget_ops );
    3030    }
    3131
     
    6060        $nav_menu_args = array(
    6161            'fallback_cb' => '',
    62             'menu'        => $nav_menu
     62            'menu'        => $nav_menu,
    6363        );
    6464
     
    115115    public function form( $instance ) {
    116116        global $wp_customize;
    117         $title = isset( $instance['title'] ) ? $instance['title'] : '';
     117        $title    = isset( $instance['title'] ) ? $instance['title'] : '';
    118118        $nav_menu = isset( $instance['nav_menu'] ) ? $instance['nav_menu'] : '';
    119119
     
    147147        <div class="nav-menu-widget-form-controls" <?php echo $empty_menus_style; ?>>
    148148            <p>
    149                 <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:' ) ?></label>
     149                <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:' ); ?></label>
    150150                <input type="text" class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" value="<?php echo esc_attr( $title ); ?>"/>
    151151            </p>
     
    163163            <?php if ( $wp_customize instanceof WP_Customize_Manager ) : ?>
    164164                <p class="edit-selected-nav-menu" style="<?php echo $nav_menu_style; ?>">
    165                     <button type="button" class="button"><?php _e( 'Edit Menu' ) ?></button>
     165                    <button type="button" class="button"><?php _e( 'Edit Menu' ); ?></button>
    166166                </p>
    167167            <?php endif; ?>
Note: See TracChangeset for help on using the changeset viewer.