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.php

    r42343 r43571  
    5252    while ( have_posts() ) :
    5353        the_post();
    54     ?>
     54        ?>
    5555    <entry>
    5656        <author>
     
    5858            <?php $author_url = get_the_author_meta( 'url' ); if ( ! empty( $author_url ) ) : ?>
    5959            <uri><?php the_author_meta( 'url' ); ?></uri>
    60             <?php
     60                <?php
    6161            endif;
    6262
     
    6767             */
    6868            do_action( 'atom_author' );
    69         ?>
     69?>
    7070        </author>
    7171        <title type="<?php html_type_rss(); ?>"><![CDATA[<?php the_title_rss(); ?>]]></title>
     
    7676        <?php the_category_rss( 'atom' ); ?>
    7777        <summary type="<?php html_type_rss(); ?>"><![CDATA[<?php the_excerpt_rss(); ?>]]></summary>
    78 <?php if ( ! get_option( 'rss_use_excerpt' ) ) : ?>
     78        <?php if ( ! get_option( 'rss_use_excerpt' ) ) : ?>
    7979        <content type="<?php html_type_rss(); ?>" xml:base="<?php the_permalink_rss(); ?>"><![CDATA[<?php the_content_feed( 'atom' ); ?>]]></content>
    80 <?php endif; ?>
    81     <?php
    82     atom_enclosure();
    83     /**
    84     * Fires at the end of each Atom feed item.
    85     *
    86     * @since 2.0.0
    87     */
    88     do_action( 'atom_entry' );
     80        <?php endif; ?>
     81        <?php
     82        atom_enclosure();
     83        /**
     84        * Fires at the end of each Atom feed item.
     85        *
     86        * @since 2.0.0
     87        */
     88        do_action( 'atom_entry' );
    8989
    90     if ( get_comments_number() || comments_open() ) :
    91         ?>
     90        if ( get_comments_number() || comments_open() ) :
     91            ?>
    9292        <link rel="replies" type="<?php bloginfo_rss( 'html_type' ); ?>" href="<?php the_permalink_rss(); ?>#comments" thr:count="<?php echo get_comments_number(); ?>"/>
    9393        <link rel="replies" type="application/atom+xml" href="<?php echo esc_url( get_post_comments_feed_link( 0, 'atom' ) ); ?>" thr:count="<?php echo get_comments_number(); ?>"/>
    9494        <thr:total><?php echo get_comments_number(); ?></thr:total>
    95     <?php endif; ?>
     95        <?php endif; ?>
    9696    </entry>
    9797    <?php endwhile; ?>
Note: See TracChangeset for help on using the changeset viewer.