-
Notifications
You must be signed in to change notification settings - Fork 18
/
image.php
103 lines (81 loc) · 3.24 KB
/
image.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<?php
/**
* Image template
*
* Displays when an image url is visited
*
* @package responsive_mobile
* @license license.txt
* @copyright 2014 CyberChimps Inc
* @since 0.0.1
*
* Please do not edit this file. This file is part of the Framework and all modifications
* should be made in a child theme.
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
get_header(); ?>
<div id="content" class="content-area">
<main id="main" class="site-main" role="main">
<?php if ( have_posts() ) : ?>
<?php get_template_part( 'template-parts/loop-header' ); ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php responsive_mobile_entry_before(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php responsive_mobile_entry_top(); ?>
<h1 class="post-title"><?php the_title(); ?></h1>
<p><?php _e( '‹ Return to', 'responsive-mobile' ); ?> <a
href="<?php echo get_permalink( $post->post_parent ); ?>"
rel="gallery"><?php echo get_the_title( $post->post_parent ); ?></a>
</p>
<div class="post-meta">
<?php responsive_mobile_post_meta_data(); ?>
<?php if ( comments_open() ) : ?>
<span class="comments-link">
<span class="mdash">—</span>
<?php comments_popup_link( __( 'No Comments ↓', 'responsive-mobile' ), __( '1 Comment ↓', 'responsive-mobile' ), __( '% Comments ↓', 'responsive-mobile' ) ); ?>
</span>
<?php endif; ?>
</div>
<!-- end of .post-meta -->
<div class="attachment-entry">
<a href="<?php echo wp_get_attachment_url( $post->ID ); ?>"><?php echo wp_get_attachment_image( $post->ID, 'large' ); ?></a>
<?php if ( ! empty( $post->post_excerpt ) ) {
the_excerpt();
} ?>
<?php the_content( __( 'Read more ›', 'responsive-mobile' ) ); ?>
<?php wp_link_pages( array(
'before' => '<div class="pagination">' . __( 'Pages:', 'responsive-mobile' ),
'after' => '</div>'
) ); ?>
</div><!-- end of .post-entry -->
<nav class="navigation">
<div class="nav-previous"><?php previous_image_link( 'thumbnail' ); ?></div>
<div class="nav-next"><?php next_image_link( 'thumbnail' ); ?></div>
</nav><!-- end of .navigation -->
<?php if ( comments_open() ) : ?>
<div class="post-data">
<?php the_tags( __( 'Tagged with:', 'responsive-mobile' ) . ' ', ', ', '<br />' ); ?>
<?php the_category( __( 'Posted in %s', 'responsive-mobile' ) . ', ' ); ?>
</div><!-- end of .post-data -->
<?php endif; ?>
<?php get_template_part( 'template-parts/post-data' ); ?>
<?php responsive_mobile_entry_bottom(); ?>
</article><!-- end of #post-<?php the_ID(); ?> -->
<?php responsive_mobile_entry_after(); ?>
<?php responsive_mobile_comments_before(); ?>
<?php comments_template( '', true ); ?>
<?php responsive_mobile_comments_after(); ?>
<?php
endwhile;
get_template_part( 'template-parts/loop-nav' );
else :
get_template_part( 'template-parts/loop-no-posts' );
endif;
?>
</main><!-- #main -->
<?php get_sidebar( 'gallery' ); ?>
</div><!-- #content -->
<?php get_footer(); ?>