[ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * The template for displaying image attachments 4 * 5 * @package WordPress 6 * @subpackage Twenty_Sixteen 7 * @since Twenty Sixteen 1.0 8 */ 9 10 get_header(); ?> 11 12 <div id="primary" class="content-area"> 13 <main id="main" class="site-main"> 14 15 <?php 16 // Start the loop. 17 while ( have_posts() ) : 18 the_post(); 19 ?> 20 21 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 22 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 --> 29 30 <header class="entry-header"> 31 <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?> 32 </header><!-- .entry-header --> 33 34 <div class="entry-content"> 35 36 <div class="entry-attachment"> 37 <?php 38 /** 39 * Filters 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' ); 46 47 echo wp_get_attachment_image( get_the_ID(), $image_size ); 48 ?> 49 50 <?php twentysixteen_excerpt( 'entry-caption' ); ?> 51 52 </div><!-- .entry-attachment --> 53 54 <?php 55 the_content(); 56 wp_link_pages( 57 array( 58 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentysixteen' ) . '</span>', 59 'after' => '</div>', 60 'link_before' => '<span>', 61 'link_after' => '</span>', 62 /* translators: Hidden accessibility text. */ 63 'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentysixteen' ) . ' </span>%', 64 'separator' => '<span class="screen-reader-text">, </span>', 65 ) 66 ); 67 ?> 68 </div><!-- .entry-content --> 69 70 <footer class="entry-footer"> 71 <?php twentysixteen_entry_meta(); ?> 72 <?php 73 // Retrieve attachment metadata. 74 $metadata = wp_get_attachment_metadata(); 75 if ( $metadata ) { 76 printf( 77 '<span class="full-size-link"><span class="screen-reader-text">%1$s </span><a href="%2$s">%3$s × %4$s</a></span>', 78 /* translators: Hidden accessibility text. */ 79 esc_html_x( 'Full size', 'Used before full size attachment link.', 'twentysixteen' ), 80 esc_url( wp_get_attachment_url() ), 81 absint( $metadata['width'] ), 82 absint( $metadata['height'] ) 83 ); 84 } 85 ?> 86 <?php 87 edit_post_link( 88 sprintf( 89 /* translators: %s: Post title. Only visible to screen readers. */ 90 __( 'Edit<span class="screen-reader-text"> "%s"</span>', 'twentysixteen' ), 91 get_the_title() 92 ), 93 '<span class="edit-link">', 94 '</span>' 95 ); 96 ?> 97 </footer><!-- .entry-footer --> 98 </article><!-- #post-<?php the_ID(); ?> --> 99 100 <?php 101 // If comments are open or we have at least one comment, load up the comment template. 102 if ( comments_open() || get_comments_number() ) { 103 comments_template(); 104 } 105 106 // Parent post navigation. 107 the_post_navigation( 108 array( 109 'prev_text' => _x( '<span class="meta-nav">Published in</span><span class="post-title">%title</span>', 'Parent post link', 'twentysixteen' ), 110 ) 111 ); 112 // End the loop. 113 endwhile; 114 ?> 115 116 </main><!-- .site-main --> 117 </div><!-- .content-area --> 118 119 <?php get_sidebar(); ?> 120 <?php get_footer(); ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated : Thu Nov 21 08:20:01 2024 | Cross-referenced by PHPXref |