Make WordPress Core

Ticket #13466: wp13466-loop-indent-long-lines.diff

File wp13466-loop-indent-long-lines.diff, 6.7 KB (added by lloydbudd, 15 years ago)
  • wp-content/themes/twentyten/loop.php

     
    4949         */ ?>
    5050<?php while ( have_posts() ) : the_post(); ?>
    5151
    52 <?php /* How to display posts in the Gallery category. */ ?>
     52        <?php /* How to display posts in the Gallery category. */ ?>
    5353
    5454        <?php if ( in_category( _x('gallery', 'gallery category slug', 'twentyten') ) ) : ?>
    5555                <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    56                         <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
     56                        <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ),
     57                                the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
    5758
    5859                        <div class="entry-meta">
    5960                                <?php twentyten_posted_on(); ?>
     
    6162
    6263                        <div class="entry-content">
    6364                                <div class="gallery-thumb">
    64 <?php
    65         $images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999 ) );
     65        <?php
     66        $images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order',
     67                                'order' => 'ASC', 'numberposts' => 999 ) );
    6668        $total_images = count( $images );
    6769        $image = array_shift( $images );
    6870        $image_img_tag = wp_get_attachment_image( $image->ID, 'thumbnail' );
     
    7072                                        <a class="size-thumbnail" href="<?php the_permalink(); ?>"><?php echo $image_img_tag; ?></a>
    7173                                </div>
    7274                                <p><em><?php printf( __( 'This gallery contains <a %1$s>%2$s photos</a>.', 'twentyten' ),
    73                                                 'href="' . get_permalink() . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ) . '" rel="bookmark"',
     75                                                'href="' . get_permalink() . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'twentyten' ),
     76                                                        the_title_attribute( 'echo=0' ) ) . '" rel="bookmark"',
    7477                                                $total_images
    7578                                        ); ?></em></p>
    7679
     
    7881                        </div><!-- .entry-content -->
    7982
    8083                        <div class="entry-utility">
    81                                 <a href="<?php echo get_term_link( _x('gallery', 'gallery category slug', 'twentyten'), 'category' ); ?>" title="<?php esc_attr_e( 'View posts in the Gallery category', 'twentyten' ); ?>"><?php _e( 'More Galleries', 'twentyten' ); ?></a>
     84                                <a href="<?php echo get_term_link( _x('gallery', 'gallery category slug', 'twentyten'), 'category' ); ?>" title="<?php
     85                                        esc_attr_e( 'View posts in the Gallery category', 'twentyten' ); ?>"><?php _e( 'More Galleries', 'twentyten' ); ?></a>
    8286                                <span class="meta-sep">|</span>
    83                                 <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span>
     87                                <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ),
     88                                        __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span>
    8489                                <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?>
    8590                        </div><!-- #entry-utility -->
    8691                </div>
    8792
    88 <?php /* How to display posts in the asides category */ ?>
     93        <?php /* How to display posts in the asides category */ ?>
    8994
    9095        <?php elseif ( in_category( _x('asides', 'asides category slug', 'twentyten') ) ) : ?>
    9196                <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
     
    103108                        <div class="entry-utility">
    104109                                <?php twentyten_posted_on(); ?>
    105110                                <span class="meta-sep">|</span>
    106                                 <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span>
     111                                <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ),
     112                                         __( '% Comments', 'twentyten' ) ); ?></span>
    107113                                <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?>
    108114                        </div><!-- #entry-utility -->
    109115                </div><!-- #post-(id) -->
    110116
    111 <?php /* How to display all other posts. */ ?>
     117        <?php /* How to display all other posts. */ ?>
    112118
    113119        <?php else : ?>
    114120                <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    115                         <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
     121                        <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ),
     122                                the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
    116123
    117124                        <div class="entry-meta">
    118125                                <?php twentyten_posted_on(); ?>
     
    132139                        <div class="entry-utility">
    133140                                <?php if ( count( get_the_category() ) ) : ?>
    134141                                        <span class="cat-links">
    135                                                 <span class="entry-utility-prep entry-utility-prep-cat-links"><?php printf( __('Posted in %s', 'twentyten' ), '</span> ' . get_the_category_list( ', ' ) ); ?>
     142                                                <span class="entry-utility-prep entry-utility-prep-cat-links"><?php printf( __('Posted in %s', 'twentyten' ), '</span> ' .
     143                                                         get_the_category_list( ', ' ) ); ?>
    136144                                        </span>
    137145                                        <span class="meta-sep">|</span>
    138146                                <?php endif; ?>
     
    141149                                        if ( $tags_list ):
    142150                                ?>
    143151                                        <span class="tag-links">
    144                                                 <span class="entry-utility-prep entry-utility-prep-tag-links"><?php printf( __('Tagged %s', 'twentyten'), '</span> ' . $tags_list ); ?>
     152                                                <span class="entry-utility-prep entry-utility-prep-tag-links"><?php printf( __('Tagged %s', 'twentyten'), '</span> ' .
     153                                                        $tags_list ); ?>
    145154                                        </span>
    146155                                        <span class="meta-sep">|</span>
    147156                                <?php endif; ?>
    148                                 <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span>
     157                                <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ),
     158                                        __( '% Comments', 'twentyten' ) ); ?></span>
    149159                                <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?>
    150160                        </div><!-- #entry-utility -->
    151161                </div><!-- #post-<?php the_ID(); ?> -->
     
    163173                                        <div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?></div>
    164174                                </div><!-- #nav-below -->
    165175<?php endif; ?>
     176<?php /* end of loop.php */ ?>