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/network/site-new.php

    r42793 r43571  
    174174                    'update' => 'added',
    175175                    'id'     => $id,
    176                 ), 'site-new.php'
     176                ),
     177                'site-new.php'
    177178            )
    178179        );
     
    213214}
    214215?>
    215 <p><?php
     216<p>
     217<?php
    216218printf(
    217219    /* translators: %s: asterisk to mark required form fields. */
     
    219221    '<span class="required">*</span>'
    220222);
    221 ?></p>
     223?>
     224</p>
    222225<form method="post" action="<?php echo network_admin_url( 'site-new.php?action=add-site' ); ?>" novalidate="novalidate">
    223226<?php wp_nonce_field( 'add-blog', '_wpnonce_add-blog' ); ?>
     
    228231            <?php if ( is_subdomain_install() ) { ?>
    229232                <input name="blog[domain]" type="text" class="regular-text" id="site-address" aria-describedby="site-address-desc" autocapitalize="none" autocorrect="off" required /><span class="no-break">.<?php echo preg_replace( '|^www\.|', '', get_network()->domain ); ?></span>
    230             <?php
     233                <?php
    231234} else {
    232235    echo get_network()->domain . get_network()->path
    233236    ?>
    234237                <input name="blog[domain]" type="text" class="regular-text" id="site-address" aria-describedby="site-address-desc" autocapitalize="none" autocorrect="off" required />
    235 <?php
     238    <?php
    236239}
    237240            echo '<p class="description" id="site-address-desc">' . __( 'Only lowercase letters (a-z), numbers, and hyphens are allowed.' ) . '</p>';
    238             ?>
     241?>
    239242            </td>
    240243        </tr>
Note: See TracChangeset for help on using the changeset viewer.