Make WordPress Core


Ignore:
Timestamp:
08/17/2018 01:50:26 AM (6 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-content/themes/twentyten/loop.php

    r42343 r43571  
    5959while ( have_posts() ) :
    6060    the_post();
    61 ?>
     61    ?>
    6262
    63 <?php /* How to display posts of the Gallery format. The gallery category is the old way. */ ?>
     63    <?php /* How to display posts of the Gallery format. The gallery category is the old way. */ ?>
    6464
    6565    <?php if ( ( function_exists( 'get_post_format' ) && 'gallery' == get_post_format( $post->ID ) ) || in_category( _x( 'gallery', 'gallery category slug', 'twentyten' ) ) ) : ?>
     
    7272
    7373            <div class="entry-content">
    74 <?php if ( post_password_required() ) : ?>
     74        <?php if ( post_password_required() ) : ?>
    7575                <?php the_content(); ?>
    7676<?php else : ?>
     
    8080                    $total_images = count( $images );
    8181                    $image        = reset( $images );
    82                 ?>
     82                    ?>
    8383                    <div class="gallery-thumb">
    8484                        <a class="size-thumbnail" href="<?php the_permalink(); ?>"><?php echo wp_get_attachment_image( $image, 'thumbnail' ); ?></a>
     
    9191                            number_format_i18n( $total_images )
    9292                        );
    93                             ?>
     93                    ?>
    9494                            </em></p>
    9595                <?php endif; // end twentyten_get_gallery_images() check ?>
     
    111111        </div><!-- #post-## -->
    112112
    113 <?php /* How to display posts of the Aside format. The asides category is the old way. */ ?>
     113        <?php /* How to display posts of the Aside format. The asides category is the old way. */ ?>
    114114
    115115    <?php elseif ( ( function_exists( 'get_post_format' ) && 'aside' == get_post_format( $post->ID ) ) || in_category( _x( 'asides', 'asides category slug', 'twentyten' ) ) ) : ?>
     
    134134        </div><!-- #post-## -->
    135135
    136 <?php /* How to display all other posts. */ ?>
     136    <?php /* How to display all other posts. */ ?>
    137137
    138138    <?php else : ?>
     
    158158                    )
    159159                );
    160 ?>
     160                ?>
    161161            </div><!-- .entry-content -->
    162162    <?php endif; ?>
     
    172172                    $tags_list = get_the_tag_list( '', ', ' );
    173173                if ( $tags_list ) :
    174                 ?>
     174                    ?>
    175175                <span class="tag-links">
    176176                    <?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?>
Note: See TracChangeset for help on using the changeset viewer.