Changeset 42343 for trunk/src/wp-content/themes/twentyten/loop.php
- Timestamp:
- 11/30/2017 11:09:33 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentyten/loop.php
r32116 r42343 56 56 */ 57 57 ?> 58 <?php while ( have_posts() ) : the_post(); ?> 58 <?php 59 while ( have_posts() ) : 60 the_post(); 61 ?> 59 62 60 63 <?php /* How to display posts of the Gallery format. The gallery category is the old way. */ ?> … … 74 77 <?php 75 78 $images = twentyten_get_gallery_images(); 76 77 78 $image= reset( $images );79 if ( $images ) : 80 $total_images = count( $images ); 81 $image = reset( $images ); 79 82 ?> 80 <div class="gallery-thumb"> 81 <a class="size-thumbnail" href="<?php the_permalink(); ?>"><?php echo wp_get_attachment_image( $image, 'thumbnail' ); ?></a> 82 </div><!-- .gallery-thumb --> 83 <p><em><?php printf( _n( 'This gallery contains <a %1$s>%2$s photo</a>.', 'This gallery contains <a %1$s>%2$s photos</a>.', $total_images, 'twentyten' ), 84 'href="' . esc_url( get_permalink() ) . '" title="' . esc_attr( sprintf( __( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ) ) . '" rel="bookmark"', 85 number_format_i18n( $total_images ) 86 ); ?></em></p> 83 <div class="gallery-thumb"> 84 <a class="size-thumbnail" href="<?php the_permalink(); ?>"><?php echo wp_get_attachment_image( $image, 'thumbnail' ); ?></a> 85 </div><!-- .gallery-thumb --> 86 <p><em> 87 <?php 88 printf( 89 _n( 'This gallery contains <a %1$s>%2$s photo</a>.', 'This gallery contains <a %1$s>%2$s photos</a>.', $total_images, 'twentyten' ), 90 'href="' . esc_url( get_permalink() ) . '" title="' . esc_attr( sprintf( __( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ) ) . '" rel="bookmark"', 91 number_format_i18n( $total_images ) 92 ); 93 ?> 94 </em></p> 87 95 <?php endif; // end twentyten_get_gallery_images() check ?> 88 96 <?php the_excerpt(); ?> … … 105 113 <?php /* How to display posts of the Aside format. The asides category is the old way. */ ?> 106 114 107 <?php elseif ( ( function_exists( 'get_post_format' ) && 'aside' == get_post_format( $post->ID ) ) || in_category( _x( 'asides', 'asides category slug', 'twentyten' ) ) 115 <?php elseif ( ( function_exists( 'get_post_format' ) && 'aside' == get_post_format( $post->ID ) ) || in_category( _x( 'asides', 'asides category slug', 'twentyten' ) ) ) : ?> 108 116 <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 109 117 … … 143 151 <div class="entry-content"> 144 152 <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?> 145 <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?> 153 <?php 154 wp_link_pages( 155 array( 156 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 157 'after' => '</div>', 158 ) 159 ); 160 ?> 146 161 </div><!-- .entry-content --> 147 162 <?php endif; ?> … … 156 171 <?php 157 172 $tags_list = get_the_tag_list( '', ', ' ); 158 if ( $tags_list ):173 if ( $tags_list ) : 159 174 ?> 160 161 162 163 175 <span class="tag-links"> 176 <?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?> 177 </span> 178 <span class="meta-sep">|</span> 164 179 <?php endif; ?> 165 180 <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span> … … 175 190 176 191 <?php /* Display navigation to next/previous pages when applicable */ ?> 177 <?php if ( 192 <?php if ( $wp_query->max_num_pages > 1 ) : ?> 178 193 <div id="nav-below" class="navigation"> 179 194 <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">←</span> Older posts', 'twentyten' ) ); ?></div>
Note: See TracChangeset
for help on using the changeset viewer.