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

    r42827 r43571  
    7373    $catname = apply_filters( 'link_category', $cat->name );
    7474
    75 ?>
     75    ?>
    7676<outline type="category" title="<?php echo esc_attr( $catname ); ?>">
    77 <?php
     77    <?php
    7878    $bookmarks = get_bookmarks( array( 'category' => $cat->term_id ) );
    79 foreach ( (array) $bookmarks as $bookmark ) :
    80     /**
    81     * Filters the OPML outline link title text.
    82     *
    83     * @since 2.2.0
    84     *
    85     * @param string $title The OPML outline title text.
    86     */
    87     $title = apply_filters( 'link_title', $bookmark->link_name );
    88 ?>
     79    foreach ( (array) $bookmarks as $bookmark ) :
     80        /**
     81        * Filters the OPML outline link title text.
     82        *
     83        * @since 2.2.0
     84        *
     85        * @param string $title The OPML outline title text.
     86        */
     87        $title = apply_filters( 'link_title', $bookmark->link_name );
     88        ?>
    8989<outline text="<?php echo esc_attr( $title ); ?>" type="link" xmlUrl="<?php echo esc_attr( $bookmark->link_rss ); ?>" htmlUrl="<?php echo esc_attr( $bookmark->link_url ); ?>" updated="
    9090                            <?php
    9191                            if ( '0000-00-00 00:00:00' != $bookmark->link_updated ) {
    9292                                echo $bookmark->link_updated;}
    93 ?>
     93                            ?>
    9494" />
    95 <?php
     95        <?php
    9696    endforeach; // $bookmarks
    97 ?>
     97    ?>
    9898</outline>
    99 <?php
     99    <?php
    100100endforeach; // $cats
    101101?>
Note: See TracChangeset for help on using the changeset viewer.