11 |
11 |
12 get_header(); ?> |
12 get_header(); ?> |
13 |
13 |
14 <div id="primary" class="content-area"> |
14 <div id="primary" class="content-area"> |
15 <div id="content" class="site-content" role="main"> |
15 <div id="content" class="site-content" role="main"> |
|
16 |
|
17 <?php |
|
18 // Start the Loop. |
|
19 while ( have_posts() ) : |
|
20 the_post(); |
|
21 ?> |
|
22 |
16 <article id="post-<?php the_ID(); ?>" <?php post_class( 'image-attachment' ); ?>> |
23 <article id="post-<?php the_ID(); ?>" <?php post_class( 'image-attachment' ); ?>> |
17 <header class="entry-header"> |
24 <header class="entry-header"> |
18 <h1 class="entry-title"><?php the_title(); ?></h1> |
25 <h1 class="entry-title"><?php the_title(); ?></h1> |
19 |
26 |
20 <div class="entry-meta"> |
27 <div class="entry-meta"> |
21 <?php |
28 <?php |
22 $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 $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' ); |
23 $post_title = get_the_title( $post->post_parent ); |
30 $post_title = get_the_title( $post->post_parent ); |
24 if ( empty( $post_title ) || 0 == $post->post_parent ) |
31 if ( empty( $post_title ) || 0 == $post->post_parent ) { |
25 $published_text = '<span class="attachment-meta"><time class="entry-date" datetime="%1$s">%2$s</time></span>'; |
32 $published_text = '<span class="attachment-meta"><time class="entry-date" datetime="%1$s">%2$s</time></span>'; |
|
33 } |
26 |
34 |
27 printf( $published_text, |
35 printf( |
28 esc_attr( get_the_date( 'c' ) ), |
36 $published_text, |
29 esc_html( get_the_date() ), |
37 esc_attr( get_the_date( 'c' ) ), |
30 esc_url( get_permalink( $post->post_parent ) ), |
38 esc_html( get_the_date() ), |
31 esc_attr( strip_tags( $post_title ) ), |
39 esc_url( get_permalink( $post->post_parent ) ), |
32 $post_title |
40 esc_attr( strip_tags( $post_title ) ), |
33 ); |
41 $post_title |
|
42 ); |
34 |
43 |
35 $metadata = wp_get_attachment_metadata(); |
44 $metadata = wp_get_attachment_metadata(); |
36 printf( '<span class="attachment-meta full-size-link"><a href="%1$s" title="%2$s">%3$s (%4$s × %5$s)</a></span>', |
45 printf( |
37 esc_url( wp_get_attachment_url() ), |
46 '<span class="attachment-meta full-size-link"><a href="%1$s" title="%2$s">%3$s (%4$s × %5$s)</a></span>', |
38 esc_attr__( 'Link to full-size image', 'twentythirteen' ), |
47 esc_url( wp_get_attachment_url() ), |
39 __( 'Full resolution', 'twentythirteen' ), |
48 esc_attr__( 'Link to full-size image', 'twentythirteen' ), |
40 $metadata['width'], |
49 __( 'Full resolution', 'twentythirteen' ), |
41 $metadata['height'] |
50 $metadata['width'], |
42 ); |
51 $metadata['height'] |
|
52 ); |
43 |
53 |
44 edit_post_link( __( 'Edit', 'twentythirteen' ), '<span class="edit-link">', '</span>' ); |
54 edit_post_link( __( 'Edit', 'twentythirteen' ), '<span class="edit-link">', '</span>' ); |
45 ?> |
55 ?> |
46 </div><!-- .entry-meta --> |
56 </div><!-- .entry-meta --> |
47 </header><!-- .entry-header --> |
57 </header><!-- .entry-header --> |
48 |
58 |
49 <div class="entry-content"> |
59 <div class="entry-content"> |
50 <nav id="image-navigation" class="navigation image-navigation" role="navigation"> |
60 <nav id="image-navigation" class="navigation image-navigation" role="navigation"> |
51 <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> |
52 <span class="nav-next"><?php next_image_link( false, __( 'Next <span class="meta-nav">→</span>', 'twentythirteen' ) ); ?></span> |
62 <span class="nav-next"><?php next_image_link( false, __( 'Next <span class="meta-nav">→</span>', 'twentythirteen' ) ); ?></span> |
53 </nav><!-- #image-navigation --> |
63 </nav><!-- #image-navigation --> |
54 |
64 |
55 <div class="entry-attachment"> |
65 <div class="entry-attachment"> |
56 <div class="attachment"> |
66 <div class="attachment"> |
57 <?php twentythirteen_the_attached_image(); ?> |
67 <?php twentythirteen_the_attached_image(); ?> |
58 |
68 |
59 <?php if ( has_excerpt() ) : ?> |
69 <?php if ( has_excerpt() ) : ?> |
60 <div class="entry-caption"> |
70 <div class="entry-caption"> |
61 <?php the_excerpt(); ?> |
71 <?php the_excerpt(); ?> |
62 </div> |
72 </div> |
63 <?php endif; ?> |
73 <?php endif; ?> |
64 </div><!-- .attachment --> |
74 </div><!-- .attachment --> |
65 </div><!-- .entry-attachment --> |
75 </div><!-- .entry-attachment --> |
66 |
76 |
67 <?php if ( ! empty( $post->post_content ) ) : ?> |
77 <?php if ( ! empty( $post->post_content ) ) : ?> |
68 <div class="entry-description"> |
78 <div class="entry-description"> |
69 <?php the_content(); ?> |
79 <?php the_content(); ?> |
70 <?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 ?> |
71 </div><!-- .entry-description --> |
88 </div><!-- .entry-description --> |
72 <?php endif; ?> |
89 <?php endif; ?> |
73 |
90 |
74 </div><!-- .entry-content --> |
91 </div><!-- .entry-content --> |
75 </article><!-- #post --> |
92 </article><!-- #post --> |
76 |
93 |
77 <?php comments_template(); ?> |
94 <?php comments_template(); ?> |
78 |
95 |
|
96 <?php endwhile; // End the loop. ?> |
|
97 |
79 </div><!-- #content --> |
98 </div><!-- #content --> |
80 </div><!-- #primary --> |
99 </div><!-- #primary --> |
81 |
100 |
82 <?php get_footer(); ?> |
101 <?php get_footer(); ?> |