WordPress.org

Make WordPress Core


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

    r42150 r42343  
    5252         * By opening an Ajax request, this is avoided and the changeset is published. See #39221.
    5353         */
    54         $nonces = $wp_customize->get_nonces();
     54        $nonces       = $wp_customize->get_nonces();
    5555        $request_args = array(
    56             'nonce' => $nonces['save'],
    57             'customize_changeset_uuid' => $wp_customize->changeset_uuid(),
    58             'wp_customize' => 'on',
     56            'nonce'                      => $nonces['save'],
     57            'customize_changeset_uuid'   => $wp_customize->changeset_uuid(),
     58            'wp_customize'               => 'on',
    5959            'customize_changeset_status' => 'publish',
    6060        );
     
    9797}
    9898
    99 $registered = $wp_scripts->registered;
    100 $wp_scripts = new WP_Scripts;
     99$registered             = $wp_scripts->registered;
     100$wp_scripts             = new WP_Scripts;
    101101$wp_scripts->registered = $registered;
    102102
    103 add_action( 'customize_controls_print_scripts',        'print_head_scripts', 20 );
    104 add_action( 'customize_controls_print_footer_scripts', '_wp_footer_scripts'     );
    105 add_action( 'customize_controls_print_styles',         'print_admin_styles', 20 );
     103add_action( 'customize_controls_print_scripts', 'print_head_scripts', 20 );
     104add_action( 'customize_controls_print_footer_scripts', '_wp_footer_scripts' );
     105add_action( 'customize_controls_print_styles', 'print_admin_styles', 20 );
    106106
    107107/**
     
    124124
    125125// Let's roll.
    126 @header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
     126@header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) );
    127127
    128128wp_user_settings();
     
    134134    $body_class .= ' mobile';
    135135
    136     ?><meta name="viewport" id="viewport-meta" content="width=device-width, initial-scale=1.0, minimum-scale=0.5, maximum-scale=1.2" /><?php
     136    ?>
     137    <meta name="viewport" id="viewport-meta" content="width=device-width, initial-scale=1.0, minimum-scale=0.5, maximum-scale=1.2" />
     138    <?php
    137139endif;
    138140
     
    148150$admin_title = sprintf( $wp_customize->get_document_title_template(), __( 'Loading&hellip;' ) );
    149151
    150 ?><title><?php echo $admin_title; ?></title>
     152?>
     153<title><?php echo $admin_title; ?></title>
    151154
    152155<script type="text/javascript">
     
    203206                <div id="customize-info" class="accordion-section customize-info">
    204207                    <div class="accordion-section-title">
    205                         <span class="preview-notice"><?php
     208                        <span class="preview-notice">
     209                        <?php
    206210                            echo sprintf( __( 'You are customizing %s' ), '<strong class="panel-title site-title">' . get_bloginfo( 'name', 'display' ) . '</strong>' );
    207                         ?></span>
     211                        ?>
     212                        </span>
    208213                        <button type="button" class="customize-help-toggle dashicons dashicons-editor-help" aria-expanded="false"><span class="screen-reader-text"><?php _e( 'Help' ); ?></span></button>
    209214                    </div>
    210                     <div class="customize-panel-description"><?php
     215                    <div class="customize-panel-description">
     216                    <?php
    211217                        _e( 'The Customizer allows you to preview changes to your site before publishing them. You can navigate to different pages on your site within the preview. Edit shortcuts are shown for some editable elements.' );
    212                     ?></div>
     218                    ?>
     219                    </div>
    213220                </div>
    214221
     
    234241                        }
    235242                        $active = ! empty( $settings['default'] );
    236                         $class = 'preview-' . $device;
     243                        $class  = 'preview-' . $device;
    237244                        if ( $active ) {
    238245                            $class .= ' active';
    239246                        }
    240247                        ?>
    241                         <button type="button" class="<?php echo esc_attr( $class ); ?>" aria-pressed="<?php echo esc_attr( $active ) ?>" data-device="<?php echo esc_attr( $device ); ?>">
     248                        <button type="button" class="<?php echo esc_attr( $class ); ?>" aria-pressed="<?php echo esc_attr( $active ); ?>" data-device="<?php echo esc_attr( $device ); ?>">
    242249                            <span class="screen-reader-text"><?php echo esc_html( $settings['label'] ); ?></span>
    243250                        </button>
Note: See TracChangeset for help on using the changeset viewer.