-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdesk-mess-mirrored.php
128 lines (96 loc) · 3.57 KB
/
desk-mess-mirrored.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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<?php
/**
* Desk Mess Mirrored loops
* Displays the default loop content.
*
* @package Desk_Mess_Mirrored
* @since 2.0
*
* @link http://buynowshop.com/themes/desk-mess-mirrored/
* @link https://github.com/Cais/desk-mess-mirrored/
* @link https://wordpress.org/themes/desk-mess-mirrored/
*
* @author Edward Caissie <edward.caissie@gmail.com>
* @copyright Copyright (c) 2009-2016, Edward Caissie
*
* @uses get_template_part( 'desk-mess-mirrored', get_post_format() )
*
* @internal for 404, archive, author, index (home, front-page), page, single templates
*
* @version 2.0.3
* @date May 24, 2012
* Added conditional check for custom post types
*
* @version 2.2
* @date February 24, 2013
* Refactor post meta details into a better string output
*
* @version 2.2.3
* @date November 16, 2013
* Made "Page Permalink" link conditionally display with default as false.
*
* @version 2.2.4
* @date April 13, 2014
* Added `dmm_post_meta_link_edit()` function with filter hooks for DRY purposes
*
* @version 2.4
* @date May 16, 2015
* Improved i18n implementation
* Extracted out code for `dmm_single_view_author_link` function for all post-formats templates
*/
/** Set count variable for author 'mullet' loop */
global $count, $post;
$count ++; ?>
<div <?php post_class(); ?> id="post-<?php the_ID(); ?>">
<?php if ( is_page() ) { ?>
<h1><?php the_title(); ?></h1>
<?php edit_post_link( __( 'Edit This Page', 'desk-mess-mirrored' ), '»', '«' );
}
if ( ! post_password_required() && ( comments_open() || ( get_comments_number() > 0 ) ) ) { ?>
<div class="post-comments">
<?php comments_popup_link( __( '0', 'desk-mess-mirrored' ), __( '1', 'desk-mess-mirrored' ), '%', '', '-' ); ?>
</div>
<?php }
if ( ! is_page() ) { ?>
<h1>
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php _e( 'Permanent Link to', 'desk-mess-mirrored' ); ?> <?php the_title_attribute(); ?>"><?php the_title(); ?></a>
</h1>
<div class="postdata">
<?php printf(
__( '%1$s by %2$s on %3$s in %4$s', 'desk-mess-mirrored' ),
dmm_use_posted(),
get_the_author(),
get_the_time( get_option( 'date_format' ) ),
get_the_category_list( ', ' )
);
if ( ! post_password_required() && ! comments_open() && ( is_home() || is_front_page() ) ) {
/** Only displays when comments are closed */
echo ' ';
comments_popup_link( '', '', '', '', __( 'with Comments closed', 'desk-mess-mirrored' ) );
}
dmm_post_meta_link_edit(); ?>
</div><!-- .postdata -->
<?php }
dmm_featured_image_view();
if ( is_home() || is_front_page() || is_single() || is_page() || ( is_author() && ( $count == 1 ) ) ) {
the_content( __( 'Read more...', 'desk-mess-mirrored' ) ); ?>
<div class="clear"><!-- For inserted media at the end of the post --></div>
<?php wp_link_pages(
array(
'before' => '<p id="wp-link-pages"><strong>' . __( 'Pages:', 'desk-mess-mirrored' ) . '</strong> ',
'after' => '</p>',
'next_or_number' => 'number'
)
);
} else {
the_excerpt(); ?>
<div class="clear"><!-- For inserted media at the end of the post --></div>
<?php }
dmm_single_view_author_link();
/** Show a shortlink on the page - requires Jetpack be active */
if ( DMM_SHOW_PAGE_PERMALINK ) {
dmm_page_link( $text = __( 'Page Permalink', 'desk-mess-mirrored' ) );
} ?>
<p class="single-meta"><?php the_tags(); ?></p>
</div> <!-- .post #post-ID -->
<?php comments_template();