- Timestamp:
- 11/30/2017 11:09:33 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentyeleven/content-gallery.php
r32116 r42343 33 33 <?php if ( post_password_required() ) : ?> 34 34 <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyeleven' ) ); ?> 35 <?php else : 35 <?php 36 else : 36 37 $images = twentyeleven_get_gallery_images(); 37 38 if ( $images ) : 38 39 $total_images = count( $images ); 39 $image = reset( $images );40 $image = reset( $images ); 40 41 ?> 41 42 <figure class="gallery-thumb"> 42 43 <a href="<?php the_permalink(); ?>"><?php echo wp_get_attachment_image( $image, 'thumbnail' ); ?></a> 43 44 </figure><!-- .gallery-thumb --> 44 45 45 <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, 'twentyeleven' ), 46 'href="' . esc_url( get_permalink() ) . '" title="' . esc_attr( sprintf( __( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ) . '" rel="bookmark"', 47 number_format_i18n( $total_images ) 48 ); ?></em></p> 49 <?php endif; // end twentyeleven_get_gallery_images() check ?> 46 <p><em> 47 <?php 48 printf( 49 _n( 'This gallery contains <a %1$s>%2$s photo</a>.', 'This gallery contains <a %1$s>%2$s photos</a>.', $total_images, 'twentyeleven' ), 50 'href="' . esc_url( get_permalink() ) . '" title="' . esc_attr( sprintf( __( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ) . '" rel="bookmark"', 51 number_format_i18n( $total_images ) 52 ); 53 ?> 54 </em></p> 55 <?php endif; // end twentyeleven_get_gallery_images() check ?> 50 56 <?php the_excerpt(); ?> 51 57 <?php endif; ?> 52 <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?> 58 <?php 59 wp_link_pages( 60 array( 61 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 62 'after' => '</div>', 63 ) 64 ); 65 ?> 53 66 </div><!-- .entry-content --> 54 67 <?php endif; ?> … … 59 72 /* translators: used between list items, there is a space after the comma */ 60 73 $categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) ); 61 if ( $categories_list ):74 if ( $categories_list ) : 62 75 ?> 63 76 <span class="cat-links"> 64 <?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list ); 65 $show_sep = true; ?> 77 <?php 78 printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list ); 79 $show_sep = true; 80 ?> 66 81 </span> 67 82 <?php endif; // End if categories ?> … … 69 84 /* translators: used between list items, there is a space after the comma */ 70 85 $tags_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) ); 71 if ( $tags_list ): 72 if ( $show_sep ) : ?> 86 if ( $tags_list ) : 87 if ( $show_sep ) : 88 ?> 73 89 <span class="sep"> | </span> 74 90 <?php endif; // End if $show_sep ?> 75 91 <span class="tag-links"> 76 <?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); 77 $show_sep = true; ?> 92 <?php 93 printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); 94 $show_sep = true; 95 ?> 78 96 </span> 79 97 <?php endif; // End if $tags_list ?>
Note: See TracChangeset
for help on using the changeset viewer.