author | ymh <ymh.work@gmail.com> |
Mon, 14 Oct 2019 17:39:30 +0200 | |
changeset 7 | cf61fcea0001 |
parent 5 | 5e2f62d02dcd |
permissions | -rw-r--r-- |
5 | 1 |
<?php |
2 |
/** |
|
3 |
* The template for displaying image attachments |
|
4 |
* |
|
5 |
* @package WordPress |
|
6 |
* @subpackage Twenty_Fourteen |
|
7 |
* @since Twenty Fourteen 1.0 |
|
8 |
*/ |
|
9 |
||
10 |
// Retrieve attachment metadata. |
|
11 |
$metadata = wp_get_attachment_metadata(); |
|
12 |
||
13 |
get_header(); |
|
14 |
?> |
|
15 |
||
16 |
<section id="primary" class="content-area image-attachment"> |
|
17 |
<div id="content" class="site-content" role="main"> |
|
18 |
||
19 |
<?php |
|
20 |
// Start the Loop. |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
21 |
while ( have_posts() ) : |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
22 |
the_post(); |
5 | 23 |
?> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
24 |
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
25 |
<header class="entry-header"> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
26 |
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?> |
5 | 27 |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
28 |
<div class="entry-meta"> |
5 | 29 |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
30 |
<span class="entry-date"><time class="entry-date" datetime="<?php echo esc_attr( get_the_date( 'c' ) ); ?>"><?php echo esc_html( get_the_date() ); ?></time></span> |
5 | 31 |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
32 |
<span class="full-size-link"><a href="<?php echo esc_url( wp_get_attachment_url() ); ?>"><?php echo esc_html( $metadata['width'] ); ?> × <?php echo esc_html( $metadata['height'] ); ?></a></span> |
5 | 33 |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
34 |
<span class="parent-post-link"><a href="<?php echo esc_url( get_permalink( $post->post_parent ) ); ?>" rel="gallery"><?php echo get_the_title( $post->post_parent ); ?></a></span> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
35 |
<?php edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' ); ?> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
36 |
</div><!-- .entry-meta --> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
37 |
</header><!-- .entry-header --> |
5 | 38 |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
39 |
<div class="entry-content"> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
40 |
<div class="entry-attachment"> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
41 |
<div class="attachment"> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
42 |
<?php twentyfourteen_the_attached_image(); ?> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
43 |
</div><!-- .attachment --> |
5 | 44 |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
45 |
<?php if ( has_excerpt() ) : ?> |
5 | 46 |
<div class="entry-caption"> |
47 |
<?php the_excerpt(); ?> |
|
48 |
</div><!-- .entry-caption --> |
|
49 |
<?php endif; ?> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
50 |
</div><!-- .entry-attachment --> |
5 | 51 |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
52 |
<?php |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
53 |
the_content(); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
54 |
wp_link_pages( |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
55 |
array( |
5 | 56 |
'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>', |
57 |
'after' => '</div>', |
|
58 |
'link_before' => '<span>', |
|
59 |
'link_after' => '</span>', |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
60 |
) |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
61 |
); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
62 |
?> |
5 | 63 |
</div><!-- .entry-content --> |
64 |
</article><!-- #post-## --> |
|
65 |
||
66 |
<nav id="image-navigation" class="navigation image-navigation"> |
|
67 |
<div class="nav-links"> |
|
68 |
<?php previous_image_link( false, '<div class="previous-image">' . __( 'Previous Image', 'twentyfourteen' ) . '</div>' ); ?> |
|
69 |
<?php next_image_link( false, '<div class="next-image">' . __( 'Next Image', 'twentyfourteen' ) . '</div>' ); ?> |
|
70 |
</div><!-- .nav-links --> |
|
71 |
</nav><!-- #image-navigation --> |
|
72 |
||
73 |
<?php comments_template(); ?> |
|
74 |
||
75 |
<?php endwhile; // end of the loop. ?> |
|
76 |
||
77 |
</div><!-- #content --> |
|
78 |
</section><!-- #primary --> |
|
79 |
||
80 |
<?php |
|
81 |
get_sidebar(); |
|
82 |
get_footer(); |