Make WordPress Core


Ignore:
Timestamp:
08/17/2018 01:50:26 AM (6 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/twentytwelve/inc/custom-header.php

    r42343 r43571  
    8282        // Has the text been hidden?
    8383    if ( ! display_header_text() ) :
    84     ?>
     84        ?>
    8585    .site-title,
    8686    .site-description {
     
    8989        clip: rect(1px, 1px, 1px, 1px);
    9090    }
    91     <?php
    92     // If the user has set a custom color for the text, use that.
     91        <?php
     92        // If the user has set a custom color for the text, use that.
    9393        else :
    94     ?>
     94            ?>
    9595        .site-header h1 a,
    9696        .site-header h2 {
     
    108108 */
    109109function twentytwelve_admin_header_style() {
    110 ?>
     110    ?>
    111111    <style type="text/css" id="twentytwelve-admin-header-css">
    112112    .appearance_page_custom-header #headimg {
     
    139139    }
    140140    </style>
    141 <?php
     141    <?php
    142142}
    143143
     
    161161        $header_image = get_header_image();
    162162        if ( ! empty( $header_image ) ) :
    163         ?>
     163            ?>
    164164            <img src="<?php echo esc_url( $header_image ); ?>" class="header-image" width="<?php echo esc_attr( get_custom_header()->width ); ?>" height="<?php echo esc_attr( get_custom_header()->height ); ?>" alt="" />
    165165        <?php endif; ?>
    166166    </div>
    167 <?php
     167    <?php
    168168}
Note: See TracChangeset for help on using the changeset viewer.