Make WordPress Core


Ignore:
Timestamp:
11/30/2017 11:09:33 PM (7 years ago)
Author:
pento
Message:

Code is Poetry.
WordPress' code just... wasn't.
This is now dealt with.

Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS.
Fixes #41057.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyten/loop-single.php

    r32116 r42343  
    1616?>
    1717
    18 <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
     18<?php
     19if ( have_posts() ) {
     20    while ( have_posts() ) :
     21        the_post();
     22    ?>
    1923
    2024                <div id="nav-above" class="navigation">
     
    3236                    <div class="entry-content">
    3337                        <?php the_content(); ?>
    34                         <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?>
     38                        <?php
     39                        wp_link_pages(
     40                            array(
     41                                'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ),
     42                                'after'  => '</div>',
     43                            )
     44                        );
     45    ?>
    3546                    </div><!-- .entry-content -->
    3647
    37 <?php if ( get_the_author_meta( 'description' ) ) : // If a user has filled out their description, show a bio on their entries ?>
     48    <?php if ( get_the_author_meta( 'description' ) ) : // If a user has filled out their description, show a bio on their entries ?>
    3849                    <div id="entry-author-info">
    3950                        <div id="author-avatar">
     
    4253                            echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyten_author_bio_avatar_size', 60 ) );
    4354                            ?>
    44                         </div><!-- #author-avatar -->
    45                         <div id="author-description">
     55                            </div><!-- #author-avatar -->
     56                            <div id="author-description">
    4657                            <h2><?php printf( __( 'About %s', 'twentyten' ), get_the_author() ); ?></h2>
    4758                            <?php the_author_meta( 'description' ); ?>
     
    5162                                </a>
    5263                            </div><!-- #author-link -->
    53                         </div><!-- #author-description -->
    54                     </div><!-- #entry-author-info -->
    55 <?php endif; ?>
     64                            </div><!-- #author-description -->
     65                        </div><!-- #entry-author-info -->
     66    <?php endif; ?>
    5667
    57                     <div class="entry-utility">
    58                         <?php twentyten_posted_in(); ?>
    59                         <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="edit-link">', '</span>' ); ?>
    60                     </div><!-- .entry-utility -->
    61                 </div><!-- #post-## -->
     68                        <div class="entry-utility">
     69                            <?php twentyten_posted_in(); ?>
     70                            <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="edit-link">', '</span>' ); ?>
     71                        </div><!-- .entry-utility -->
     72                    </div><!-- #post-## -->
    6273
    63                 <div id="nav-below" class="navigation">
    64                     <div class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', 'twentyten' ) . '</span> %title' ); ?></div>
    65                     <div class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '&rarr;', 'Next post link', 'twentyten' ) . '</span>' ); ?></div>
    66                 </div><!-- #nav-below -->
     74                    <div id="nav-below" class="navigation">
     75                        <div class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', 'twentyten' ) . '</span> %title' ); ?></div>
     76                        <div class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '&rarr;', 'Next post link', 'twentyten' ) . '</span>' ); ?></div>
     77                    </div><!-- #nav-below -->
    6778
    68                 <?php comments_template( '', true ); ?>
     79                    <?php comments_template( '', true ); ?>
    6980
    70 <?php endwhile; // end of the loop. ?>
     81    <?php endwhile;
     82}; // end of the loop. ?>
Note: See TracChangeset for help on using the changeset viewer.