Changeset 42343 for trunk/src/wp-content/themes/twentysixteen/image.php
- Timestamp:
- 11/30/2017 11:09:33 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentysixteen/image.php
r40851 r42343 15 15 <?php 16 16 // Start the loop. 17 while ( have_posts() ) : the_post(); 17 while ( have_posts() ) : 18 the_post(); 18 19 ?> 19 20 20 21 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 21 22 22 23 24 25 26 27 23 <nav id="image-navigation" class="navigation image-navigation"> 24 <div class="nav-links"> 25 <div class="nav-previous"><?php previous_image_link( false, __( 'Previous Image', 'twentysixteen' ) ); ?></div> 26 <div class="nav-next"><?php next_image_link( false, __( 'Next Image', 'twentysixteen' ) ); ?></div> 27 </div><!-- .nav-links --> 28 </nav><!-- .image-navigation --> 28 29 29 30 31 30 <header class="entry-header"> 31 <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?> 32 </header><!-- .entry-header --> 32 33 33 34 <div class="entry-content"> 34 35 35 36 37 38 39 40 41 42 43 44 36 <div class="entry-attachment"> 37 <?php 38 /** 39 * Filter the default twentysixteen image attachment size. 40 * 41 * @since Twenty Sixteen 1.0 42 * 43 * @param string $image_size Image size. Default 'large'. 44 */ 45 $image_size = apply_filters( 'twentysixteen_attachment_size', 'large' ); 45 46 46 47 47 echo wp_get_attachment_image( get_the_ID(), $image_size ); 48 ?> 48 49 49 50 <?php twentysixteen_excerpt( 'entry-caption' ); ?> 50 51 51 52 </div><!-- .entry-attachment --> 52 53 53 54 <?php 54 the_content(); 55 wp_link_pages( array( 55 the_content(); 56 wp_link_pages( 57 array( 56 58 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentysixteen' ) . '</span>', 57 59 'after' => '</div>', … … 60 62 'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentysixteen' ) . ' </span>%', 61 63 'separator' => '<span class="screen-reader-text">, </span>', 62 ) ); 63 ?> 64 ) 65 ); 66 ?> 64 67 </div><!-- .entry-content --> 65 68 66 69 <footer class="entry-footer"> 67 70 <?php twentysixteen_entry_meta(); ?> 68 71 <?php 69 // Retrieve attachment metadata. 70 $metadata = wp_get_attachment_metadata(); 71 if ( $metadata ) { 72 printf( '<span class="full-size-link"><span class="screen-reader-text">%1$s </span><a href="%2$s">%3$s × %4$s</a></span>', 73 esc_html_x( 'Full size', 'Used before full size attachment link.', 'twentysixteen' ), 74 esc_url( wp_get_attachment_url() ), 75 absint( $metadata['width'] ), 76 absint( $metadata['height'] ) 77 ); 78 } 72 // Retrieve attachment metadata. 73 $metadata = wp_get_attachment_metadata(); 74 if ( $metadata ) { 75 printf( 76 '<span class="full-size-link"><span class="screen-reader-text">%1$s </span><a href="%2$s">%3$s × %4$s</a></span>', 77 esc_html_x( 'Full size', 'Used before full size attachment link.', 'twentysixteen' ), 78 esc_url( wp_get_attachment_url() ), 79 absint( $metadata['width'] ), 80 absint( $metadata['height'] ) 81 ); 82 } 79 83 ?> 80 84 <?php 81 82 83 84 85 86 87 88 89 90 85 edit_post_link( 86 sprintf( 87 /* translators: %s: Name of current post */ 88 __( 'Edit<span class="screen-reader-text"> "%s"</span>', 'twentysixteen' ), 89 get_the_title() 90 ), 91 '<span class="edit-link">', 92 '</span>' 93 ); 94 ?> 91 95 </footer><!-- .entry-footer --> 92 96 </article><!-- #post-## --> 93 97 94 98 <?php 95 96 97 98 99 // If comments are open or we have at least one comment, load up the comment template. 100 if ( comments_open() || get_comments_number() ) { 101 comments_template(); 102 } 99 103 100 // Parent post navigation. 101 the_post_navigation( array( 104 // Parent post navigation. 105 the_post_navigation( 106 array( 102 107 'prev_text' => _x( '<span class="meta-nav">Published in</span><span class="post-title">%title</span>', 'Parent post link', 'twentysixteen' ), 103 ) ); 108 ) 109 ); 104 110 // End the loop. 105 111 endwhile;
Note: See TracChangeset
for help on using the changeset viewer.