Ticket #13466: wp13466-loop-indent-long-lines.diff
File wp13466-loop-indent-long-lines.diff, 6.7 KB (added by , 15 years ago) |
---|
-
wp-content/themes/twentyten/loop.php
49 49 */ ?> 50 50 <?php while ( have_posts() ) : the_post(); ?> 51 51 52 <?php /* How to display posts in the Gallery category. */ ?>52 <?php /* How to display posts in the Gallery category. */ ?> 53 53 54 54 <?php if ( in_category( _x('gallery', 'gallery category slug', 'twentyten') ) ) : ?> 55 55 <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> 57 58 58 59 <div class="entry-meta"> 59 60 <?php twentyten_posted_on(); ?> … … 61 62 62 63 <div class="entry-content"> 63 64 <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 ) ); 66 68 $total_images = count( $images ); 67 69 $image = array_shift( $images ); 68 70 $image_img_tag = wp_get_attachment_image( $image->ID, 'thumbnail' ); … … 70 72 <a class="size-thumbnail" href="<?php the_permalink(); ?>"><?php echo $image_img_tag; ?></a> 71 73 </div> 72 74 <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"', 74 77 $total_images 75 78 ); ?></em></p> 76 79 … … 78 81 </div><!-- .entry-content --> 79 82 80 83 <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> 82 86 <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> 84 89 <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?> 85 90 </div><!-- #entry-utility --> 86 91 </div> 87 92 88 <?php /* How to display posts in the asides category */ ?>93 <?php /* How to display posts in the asides category */ ?> 89 94 90 95 <?php elseif ( in_category( _x('asides', 'asides category slug', 'twentyten') ) ) : ?> 91 96 <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> … … 103 108 <div class="entry-utility"> 104 109 <?php twentyten_posted_on(); ?> 105 110 <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> 107 113 <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?> 108 114 </div><!-- #entry-utility --> 109 115 </div><!-- #post-(id) --> 110 116 111 <?php /* How to display all other posts. */ ?>117 <?php /* How to display all other posts. */ ?> 112 118 113 119 <?php else : ?> 114 120 <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> 116 123 117 124 <div class="entry-meta"> 118 125 <?php twentyten_posted_on(); ?> … … 132 139 <div class="entry-utility"> 133 140 <?php if ( count( get_the_category() ) ) : ?> 134 141 <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( ', ' ) ); ?> 136 144 </span> 137 145 <span class="meta-sep">|</span> 138 146 <?php endif; ?> … … 141 149 if ( $tags_list ): 142 150 ?> 143 151 <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 ); ?> 145 154 </span> 146 155 <span class="meta-sep">|</span> 147 156 <?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> 149 159 <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?> 150 160 </div><!-- #entry-utility --> 151 161 </div><!-- #post-<?php the_ID(); ?> --> … … 163 173 <div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">→</span>', 'twentyten' ) ); ?></div> 164 174 </div><!-- #nav-below --> 165 175 <?php endif; ?> 176 <?php /* end of loop.php */ ?>