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/class-wp-customize-panel.php

    r41586 r42343  
    153153
    154154                $this->manager = $manager;
    155                 $this->id = $id;
     155                $this->id      = $id;
    156156                if ( empty( $this->active_callback ) ) {
    157157                        $this->active_callback = array( $this, 'active_callback' );
    … …  
    171171         */
    172172        final public function active() {
    173                 $panel = $this;
     173                $panel  = $this;
    174174                $active = call_user_func( $this->active_callback, $this );
    175175
    … …  
    209209         */
    210210        public function json() {
    211                 $array = wp_array_slice_assoc( (array) $this, array( 'id', 'description', 'priority', 'type' ) );
    212                 $array['title'] = html_entity_decode( $this->title, ENT_QUOTES, get_bloginfo( 'charset' ) );
    213                 $array['content'] = $this->get_content();
    214                 $array['active'] = $this->active();
    215                 $array['instanceNumber'] = $this->instance_number;
     211                $array                          = wp_array_slice_assoc( (array) $this, array( 'id', 'description', 'priority', 'type' ) );
     212                $array['title']                 = html_entity_decode( $this->title, ENT_QUOTES, get_bloginfo( 'charset' ) );
     213                $array['content']               = $this->get_content();
     214                $array['active']                = $this->active();
     215                $array['instanceNumber']        = $this->instance_number;
    216216                $array['autoExpandSoleSection'] = $this->auto_expand_sole_section;
    217217                return $array;
    … …  
    319319                        <?php $this->render_template(); ?>
    320320                </script>
    321         <?php
     321                <?php
    322322        }
    323323
    … …  
    359359                        <button class="customize-panel-back" tabindex="-1"><span class="screen-reader-text"><?php _e( 'Back' ); ?></span></button>
    360360                        <div class="accordion-section-title">
    361                                 <span class="preview-notice"><?php
     361                                <span class="preview-notice">
     362                                <?php
    362363                                        /* translators: %s: the site/panel title in the Customizer */
    363364                                        echo sprintf( __( 'You are customizing %s' ), '<strong class="panel-title">{{ data.title }}</strong>' );
    364                                 ?></span>
     365                                ?>
     366                                </span>
    365367                                <# if ( data.description ) { #>
    366368                                        <button type="button" class="customize-help-toggle dashicons dashicons-editor-help" aria-expanded="false"><span class="screen-reader-text"><?php _e( 'Help' ); ?></span></button>
Note: See TracChangeset for help on using the changeset viewer.