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/twentythirteen/inc/custom-header.php

    r42343 r43571  
    100100    <?php
    101101    if ( ! empty( $header_image ) ) :
    102     ?>
     102        ?>
    103103    .site-header {
    104104        background: url(<?php header_image(); ?>) no-repeat scroll top;
     
    115115        }
    116116    }
    117     <?php
     117        <?php
    118118        endif;
    119119
    120120        // Has the text been hidden?
    121121    if ( ! display_header_text() ) :
    122     ?>
     122        ?>
    123123    .site-title,
    124124    .site-description {
     
    127127        clip: rect(1px, 1px, 1px, 1px);
    128128    }
    129     <?php
    130     if ( empty( $header_image ) ) :
    131     ?>
     129        <?php
     130        if ( empty( $header_image ) ) :
     131            ?>
    132132    .site-header .home-link {
    133133    min-height: 0;
    134134    }
    135     <?php
     135            <?php
    136136        endif;
    137137
    138138        // If the user has set a custom color for the text, use that.
    139139        elseif ( $text_color != get_theme_support( 'custom-header', 'default-text-color' ) ) :
    140     ?>
     140            ?>
    141141        .site-title,
    142142        .site-description {
     
    155155function twentythirteen_admin_header_style() {
    156156    $header_image = get_header_image();
    157 ?>
     157    ?>
    158158    <style type="text/css" id="twentythirteen-admin-header-css">
    159159    .appearance_page_custom-header #headimg {
     
    211211    }
    212212    </style>
    213 <?php
     213    <?php
    214214}
    215215
     
    233233        </div>
    234234    </div>
    235 <?php
    236 }
     235    <?php
     236}
Note: See TracChangeset for help on using the changeset viewer.