Changeset 14698 for trunk/wp-content/themes/twentyten/attachment.php
- Timestamp:
- 05/16/2010 08:53:36 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/wp-content/themes/twentyten/attachment.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/themes/twentyten/attachment.php
r14692 r14698 59 59 <div class="entry-content"> 60 60 <div class="entry-attachment"> 61 <?php if ( wp_attachment_is_image() ) : ?> 62 <p class="attachment"><a href="<?php echo twentyten_get_next_attachment_url(); ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php 61 <?php if ( wp_attachment_is_image() ) : 62 $attachments = array_values( get_children( array( 'post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ) ); 63 foreach ( $attachments as $k => $attachment ) { 64 if ( $attachment->ID == $post->ID ) 65 break; 66 } 67 $k++; 68 if ( isset( $attachments[ $k ] ) ) 69 $next_attachment_url = get_attachment_link( $attachments[ $k ]->ID ); 70 else 71 $next_attachment_url = get_permalink( $post->post_parent ); 72 ?> 73 <p class="attachment"><a href="<?php echo $next_attachment_url; ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php 63 74 $attachment_size = apply_filters( 'twentyten_attachment_size', 900 ); 64 75 echo wp_get_attachment_image( $post->ID, array( $attachment_size, 9999 ) ); // filterable image width with, essentially, no limit for image height. … … 81 92 82 93 <div class="entry-utility"> 83 <?php echotwentyten_posted_in(); ?>94 <?php twentyten_posted_in(); ?> 84 95 <?php edit_post_link( __( 'Edit', 'twentyten' ), ' <span class="edit-link">', '</span>' ); ?> 85 96 </div><!-- .entry-utility -->
Note: See TracChangeset
for help on using the changeset viewer.