Changeset 42343 for trunk/src/wp-content/themes/twentythirteen/image.php
- Timestamp:
- 11/30/2017 11:09:33 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentythirteen/image.php
r36136 r42343 17 17 <?php 18 18 // Start the Loop. 19 while ( have_posts() ) : the_post(); 19 while ( have_posts() ) : 20 the_post(); 20 21 ?> 21 22 22 23 <article id="post-<?php the_ID(); ?>" <?php post_class( 'image-attachment' ); ?>> 23 <header class="entry-header">24 <h1 class="entry-title"><?php the_title(); ?></h1>24 <header class="entry-header"> 25 <h1 class="entry-title"><?php the_title(); ?></h1> 25 26 26 <div class="entry-meta"> 27 <?php 28 $published_text = __( '<span class="attachment-meta">Published on <time class="entry-date" datetime="%1$s">%2$s</time> in <a href="%3$s" title="Return to %4$s" rel="gallery">%5$s</a></span>', 'twentythirteen' ); 29 $post_title = get_the_title( $post->post_parent ); 30 if ( empty( $post_title ) || 0 == $post->post_parent ) 31 $published_text = '<span class="attachment-meta"><time class="entry-date" datetime="%1$s">%2$s</time></span>'; 27 <div class="entry-meta"> 28 <?php 29 $published_text = __( '<span class="attachment-meta">Published on <time class="entry-date" datetime="%1$s">%2$s</time> in <a href="%3$s" title="Return to %4$s" rel="gallery">%5$s</a></span>', 'twentythirteen' ); 30 $post_title = get_the_title( $post->post_parent ); 31 if ( empty( $post_title ) || 0 == $post->post_parent ) { 32 $published_text = '<span class="attachment-meta"><time class="entry-date" datetime="%1$s">%2$s</time></span>'; 33 } 32 34 33 printf( $published_text, 34 esc_attr( get_the_date( 'c' ) ), 35 esc_html( get_the_date() ), 36 esc_url( get_permalink( $post->post_parent ) ), 37 esc_attr( strip_tags( $post_title ) ), 38 $post_title 39 ); 35 printf( 36 $published_text, 37 esc_attr( get_the_date( 'c' ) ), 38 esc_html( get_the_date() ), 39 esc_url( get_permalink( $post->post_parent ) ), 40 esc_attr( strip_tags( $post_title ) ), 41 $post_title 42 ); 40 43 41 $metadata = wp_get_attachment_metadata(); 42 printf( '<span class="attachment-meta full-size-link"><a href="%1$s" title="%2$s">%3$s (%4$s × %5$s)</a></span>', 43 esc_url( wp_get_attachment_url() ), 44 esc_attr__( 'Link to full-size image', 'twentythirteen' ), 45 __( 'Full resolution', 'twentythirteen' ), 46 $metadata['width'], 47 $metadata['height'] 48 ); 44 $metadata = wp_get_attachment_metadata(); 45 printf( 46 '<span class="attachment-meta full-size-link"><a href="%1$s" title="%2$s">%3$s (%4$s × %5$s)</a></span>', 47 esc_url( wp_get_attachment_url() ), 48 esc_attr__( 'Link to full-size image', 'twentythirteen' ), 49 __( 'Full resolution', 'twentythirteen' ), 50 $metadata['width'], 51 $metadata['height'] 52 ); 49 53 50 edit_post_link( __( 'Edit', 'twentythirteen' ), '<span class="edit-link">', '</span>' );51 ?>54 edit_post_link( __( 'Edit', 'twentythirteen' ), '<span class="edit-link">', '</span>' ); 55 ?> 52 56 </div><!-- .entry-meta --> 53 57 </header><!-- .entry-header --> … … 55 59 <div class="entry-content"> 56 60 <nav id="image-navigation" class="navigation image-navigation" role="navigation"> 57 <span class="nav-previous"><?php previous_image_link( false, __( '<span class="meta-nav">←</span> Previous', 'twentythirteen' ) ); ?></span>61 <span class="nav-previous"><?php previous_image_link( false, __( '<span class="meta-nav">←</span> Previous', 'twentythirteen' ) ); ?></span> 58 62 <span class="nav-next"><?php next_image_link( false, __( 'Next <span class="meta-nav">→</span>', 'twentythirteen' ) ); ?></span> 59 63 </nav><!-- #image-navigation --> … … 61 65 <div class="entry-attachment"> 62 66 <div class="attachment"> 63 <?php twentythirteen_the_attached_image(); ?>67 <?php twentythirteen_the_attached_image(); ?> 64 68 65 <?php if ( has_excerpt() ) : ?>69 <?php if ( has_excerpt() ) : ?> 66 70 <div class="entry-caption"> 67 71 <?php the_excerpt(); ?> … … 74 78 <div class="entry-description"> 75 79 <?php the_content(); ?> 76 <?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'twentythirteen' ), 'after' => '</div>' ) ); ?> 80 <?php 81 wp_link_pages( 82 array( 83 'before' => '<div class="page-links">' . __( 'Pages:', 'twentythirteen' ), 84 'after' => '</div>', 85 ) 86 ); 87 ?> 77 88 </div><!-- .entry-description --> 78 89 <?php endif; ?>
Note: See TracChangeset
for help on using the changeset viewer.