Changeset 44155 for trunk/src/wp-content/themes/twentynineteen/image.php
- Timestamp:
- 12/14/2018 03:24:35 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentynineteen/image.php
r44149 r44155 16 16 <?php 17 17 // Start the loop. 18 19 20 ?>18 while ( have_posts() ) : 19 the_post(); 20 ?> 21 21 22 22 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 23 23 24 24 <header class="entry-header"> 25 25 <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?> 26 26 </header><!-- .entry-header --> 27 27 … … 29 29 30 30 <figure class="entry-attachment wp-block-image"> 31 32 33 34 35 36 37 38 39 31 <?php 32 /** 33 * Filter the default twentynineteen image attachment size. 34 * 35 * @since Twenty Sixteen 1.0 36 * 37 * @param string $image_size Image size. Default 'large'. 38 */ 39 $image_size = apply_filters( 'twentynineteen_attachment_size', 'full' ); 40 40 41 42 41 echo wp_get_attachment_image( get_the_ID(), $image_size ); 42 ?> 43 43 44 44 <figcaption class="wp-caption-text"><?php echo get_the_excerpt(); ?></figcaption> … … 47 47 48 48 <?php 49 50 51 52 53 54 55 56 57 58 59 49 the_content(); 50 wp_link_pages( 51 array( 52 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentynineteen' ) . '</span>', 53 'after' => '</div>', 54 'link_before' => '<span>', 55 'link_after' => '</span>', 56 'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentynineteen' ) . ' </span>%', 57 'separator' => '<span class="screen-reader-text">, </span>', 58 ) 59 ); 60 60 ?> 61 61 </div><!-- .entry-content --> 62 62 63 63 <footer class="entry-footer"> 64 65 66 67 68 69 70 71 72 73 74 75 76 64 <?php 65 // Retrieve attachment metadata. 66 $metadata = wp_get_attachment_metadata(); 67 if ( $metadata ) { 68 printf( 69 '<span class="full-size-link"><span class="screen-reader-text">%1$s</span><a href="%2$s">%3$s × %4$s</a></span>', 70 _x( 'Full size', 'Used before full size attachment link.', 'twentynineteen' ), 71 esc_url( wp_get_attachment_url() ), 72 absint( $metadata['width'] ), 73 absint( $metadata['height'] ) 74 ); 75 } 76 ?> 77 77 78 78 <?php twentynineteen_entry_footer(); ?> … … 82 82 83 83 <?php 84 85 86 87 88 89 84 // Parent post navigation. 85 the_post_navigation( 86 array( 87 'prev_text' => _x( '<span class="meta-nav">Published in</span><br><span class="post-title">%title</span>', 'Parent post link', 'twentynineteen' ), 88 ) 89 ); 90 90 91 92 93 94 91 // If comments are open or we have at least one comment, load up the comment template. 92 if ( comments_open() || get_comments_number() ) { 93 comments_template(); 94 } 95 95 96 96 // End the loop.
Note: See TracChangeset
for help on using the changeset viewer.