Changeset 15392 for trunk/wp-content/themes/twentyten/loop.php
- Timestamp:
- 07/12/2010 07:40:21 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/themes/twentyten/loop.php
r15247 r15392 69 69 <?php if ( post_password_required() ) : ?> 70 70 <?php the_content(); ?> 71 <?php else : ?> 72 <div class="gallery-thumb"> 73 <?php 74 $images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999 ) ); 75 $total_images = count( $images ); 76 $image = array_shift( $images ); 77 $image_img_tag = wp_get_attachment_image( $image->ID, 'thumbnail' ); 78 ?> 79 <a class="size-thumbnail" href="<?php the_permalink(); ?>"><?php echo $image_img_tag; ?></a> 80 </div><!-- .gallery-thumb --> 81 <p><em><?php printf( __( 'This gallery contains <a %1$s>%2$s photos</a>.', 'twentyten' ), 82 'href="' . get_permalink() . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ) . '" rel="bookmark"', 83 $total_images 84 ); ?></em></p> 85 86 <?php the_excerpt(); ?> 71 <?php else : ?> 72 <?php 73 $images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999 ) ); 74 if ( $images ) : 75 $total_images = count( $images ); 76 $image = array_shift( $images ); 77 $image_img_tag = wp_get_attachment_image( $image->ID, 'thumbnail' ); 78 ?> 79 <div class="gallery-thumb"> 80 <a class="size-thumbnail" href="<?php the_permalink(); ?>"><?php echo $image_img_tag; ?></a> 81 </div><!-- .gallery-thumb --> 82 <p><em><?php printf( __( 'This gallery contains <a %1$s>%2$s photos</a>.', 'twentyten' ), 83 'href="' . get_permalink() . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ) . '" rel="bookmark"', 84 $total_images 85 ); ?></em></p> 86 <?php endif; ?> 87 <?php the_excerpt(); ?> 87 88 <?php endif; ?> 88 89 </div><!-- .entry-content -->
Note: See TracChangeset
for help on using the changeset viewer.