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-admin/options-reading.php

    r42343 r43571  
    6363<input name="show_on_front" type="hidden" value="posts" />
    6464<table class="form-table">
    65 <?php
    66 if ( 'posts' != get_option( 'show_on_front' ) ) :
    67     update_option( 'show_on_front', 'posts' );
     65    <?php
     66    if ( 'posts' != get_option( 'show_on_front' ) ) :
     67        update_option( 'show_on_front', 'posts' );
    6868    endif;
    6969
     
    7272        update_option( 'show_on_front', 'posts' );
    7373    }
    74 ?>
     74    ?>
    7575<table class="form-table">
    7676<tr>
     
    9191    <?php
    9292    printf(
    93         __( 'Homepage: %s' ), wp_dropdown_pages(
     93        __( 'Homepage: %s' ),
     94        wp_dropdown_pages(
    9495            array(
    9596                'name'              => 'page_on_front',
     
    101102        )
    102103    );
    103 ?>
     104    ?>
    104105</label></li>
    105106    <li><label for="page_for_posts">
    106107    <?php
    107108    printf(
    108         __( 'Posts page: %s' ), wp_dropdown_pages(
     109        __( 'Posts page: %s' ),
     110        wp_dropdown_pages(
    109111            array(
    110112                'name'              => 'page_for_posts',
     
    116118        )
    117119    );
    118 ?>
     120    ?>
    119121</label></li>
    120122</ul>
    121 <?php if ( 'page' == get_option( 'show_on_front' ) && get_option( 'page_for_posts' ) == get_option( 'page_on_front' ) ) : ?>
     123    <?php if ( 'page' == get_option( 'show_on_front' ) && get_option( 'page_for_posts' ) == get_option( 'page_on_front' ) ) : ?>
    122124<div id="front-page-warning" class="error inline"><p><?php _e( '<strong>Warning:</strong> these pages should not be the same!' ); ?></p></div>
    123125<?php endif; ?>
Note: See TracChangeset for help on using the changeset viewer.