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-includes/feed-atom-comments.php

    r42827 r43571  
    7777        the_comment();
    7878        $comment_post = $GLOBALS['post'] = get_post( $comment->comment_post_ID );
    79     ?>
     79        ?>
    8080    <entry>
    8181        <title>
     
    9191            printf( ent2ncr( __( 'By: %s' ) ), get_comment_author_rss() );
    9292        }
    93             ?>
     93        ?>
    9494            </title>
    9595            <link rel="alternate" href="<?php comment_link(); ?>" type="<?php bloginfo_rss( 'html_type' ); ?>" />
     
    100100            if ( get_comment_author_url() ) {
    101101                echo '<uri>' . get_comment_author_url() . '</uri>';}
    102 ?>
     102            ?>
    103103
    104104        </author>
     
    107107        <updated><?php echo mysql2date( 'Y-m-d\TH:i:s\Z', get_comment_time( 'Y-m-d H:i:s', true, false ), false ); ?></updated>
    108108        <published><?php echo mysql2date( 'Y-m-d\TH:i:s\Z', get_comment_time( 'Y-m-d H:i:s', true, false ), false ); ?></published>
    109     <?php if ( post_password_required( $comment_post ) ) : ?>
     109        <?php if ( post_password_required( $comment_post ) ) : ?>
    110110        <content type="html" xml:base="<?php comment_link(); ?>"><![CDATA[<?php echo get_the_password_form(); ?>]]></content>
    111111    <?php else : // post pass ?>
     
    121121        $parent_comment = get_comment( $comment->comment_parent );
    122122        // The rel attribute below and the id tag above should be GUIDs, but WP doesn't create them for comments (unlike posts). Either way, it's more important that they both use the same system
    123     ?>
     123        ?>
    124124        <thr:in-reply-to ref="<?php comment_guid( $parent_comment ); ?>" href="<?php echo get_comment_link( $parent_comment ); ?>" type="<?php bloginfo_rss( 'html_type' ); ?>" />
    125 <?php
     125        <?php
    126126endif;
    127127    /**
     
    136136    ?>
    137137    </entry>
    138     <?php
     138        <?php
    139139    endwhile;
    140140endif;
Note: See TracChangeset for help on using the changeset viewer.