WordPress.org

Make WordPress Core


Ignore:
Timestamp:
08/17/2018 01:50:26 AM (3 years ago)
Author:
pento
Message:

Coding Standards: Upgrade WPCS to 1.0.0

WPCS 1.0.0 includes a bunch of new auto-fixers, which drops the number of coding standards issues across WordPress significantly. Prior to running the auto-fixers, there were 15,312 issues detected. With this commit, we now drop to 4,769 issues.

This change includes three notable additions:

  • Multiline function calls must now put each parameter on a new line.
  • Auto-formatting files is now part of the grunt precommit script.
  • Auto-fixable coding standards issues will now cause Travis failures.

Fixes #44600.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyfourteen/inc/custom-header.php

    r42343 r43571  
    3737     */
    3838    add_theme_support(
    39         'custom-header', apply_filters(
    40             'twentyfourteen_custom_header_args', array(
     39        'custom-header',
     40        apply_filters(
     41            'twentyfourteen_custom_header_args',
     42            array(
    4143                'default-text-color'     => 'fff',
    4244                'width'                  => 1260,
     
    7274        // Has the text been hidden?
    7375        if ( ! display_header_text() ) :
    74     ?>
     76            ?>
    7577        .site-title,
    7678        .site-description {
     
    7981            position: absolute;
    8082        }
    81     <?php
    82         // If the user has set a custom color for the text, use that.
     83            <?php
     84            // If the user has set a custom color for the text, use that.
    8385        elseif ( $text_color != get_theme_support( 'custom-header', 'default-text-color' ) ) :
    84     ?>
     86            ?>
    8587        .site-title a {
    8688            color: #<?php echo esc_attr( $text_color ); ?>;
     
    8890    <?php endif; ?>
    8991    </style>
    90     <?php
     92        <?php
    9193    }
    9294endif; // twentyfourteen_header_style
     
    102104     */
    103105    function twentyfourteen_admin_header_style() {
    104     ?>
     106        ?>
    105107    <style type="text/css" id="twentyfourteen-admin-header-css">
    106108    .appearance_page_custom-header #headimg {
     
    127129    }
    128130    </style>
    129     <?php
     131        <?php
    130132    }
    131133endif; // twentyfourteen_admin_header_style
     
    140142     */
    141143    function twentyfourteen_admin_header_image() {
    142     ?>
     144        ?>
    143145    <div id="headimg">
    144146        <?php if ( get_header_image() ) : ?>
     
    147149        <h1 class="displaying-header-text"><a id="name" style="<?php echo esc_attr( sprintf( 'color: #%s;', get_header_textcolor() ) ); ?>" onclick="return false;" href="<?php echo esc_url( home_url( '/' ) ); ?>" tabindex="-1"><?php bloginfo( 'name' ); ?></a></h1>
    148150    </div>
    149 <?php
     151        <?php
    150152    }
    151153endif; // twentyfourteen_admin_header_image
Note: See TracChangeset for help on using the changeset viewer.