forked from tenman/raindrops
/
part-additional.php
94 lines (78 loc) · 2.73 KB
/
part-additional.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
<?php
/**
* Template part file part-additional.php
*
* @package Raindrops
* @since Raindrops 1.247
*
*/
if ( !defined( 'ABSPATH' ) ) {
exit;
}
global $template;
do_action( 'raindrops_pre_part_' . basename( __FILE__, '.php' ) . '_' . basename( $template ) );
$format = get_post_format();
if ( false === $format ) {
$raindrops_entry_meta_class = 'entry-meta-default';
} else {
$raindrops_entry_meta_class = 'entry-meta-' . $format;
}
raindrops_entry_title();
?>
<div class="<?php echo $raindrops_entry_meta_class; ?>">
<?php
if( 'before' == raindrops_warehouse( 'raindrops_posted_on_position' ) ) {
?><div class="posted-on" ><?php
raindrops_posted_on();
?></div><?php
}
if( 'before' == raindrops_warehouse( 'raindrops_posted_in_position' ) ) {
raindrops_posted_in();
}
?>
</div>
<div class="entry-content clearfix">
<?php
raindrops_prepend_entry_content();
$content = $post->post_content;
$content = apply_filters( 'the_content', $content );
$content = apply_filters( 'raindrops_entry_content', $content );
$content = str_replace( ']]>', ']]>', $content );
$content = str_replace( '<span id="more-' . $post->ID . '"></span>', '<!--more-->', $content );
$text_array = get_extended( $content );
if ( empty( $text_array[ 'more_text' ] ) ) {
$text_array[ 'more_text' ] = esc_html__( 'Continue reading ', 'raindrops' ) . '<span class="meta-nav">→</span><span class="more-link-post-unique">' . esc_html__( ' Post ID ', 'raindrops' ) . get_the_ID() . '</span>';
}
if ( $text_array[ 'extended' ] !== '' ) {
$text_array[ 'main' ] .= sprintf( '<p class="additional-more"><a href="%1$s"><span>%2$s</span></a></p>', get_permalink(), $text_array[ 'more_text' ] );
}
if ( has_post_thumbnail( $post->ID ) && is_front_page() ) {
?>
<div class="line">
<div class="unit size1of4"><?php the_post_thumbnail(); ?></div>
<div class="unit size3of4"><?php echo $text_array[ 'main' ]; ?></div>
</div>
<?php
} else {
echo $text_array[ 'main' ];
}
wp_link_pages( 'before=<p class="pagenate clearfix">&after=</p>&next_or_number=number&pagelink=<span>%</span>' );
?>
<br class="clear" />
<?php
raindrops_append_entry_content();
?>
</div>
<div class="entry-utility entry-meta">
<?php
edit_post_link( esc_html__( 'Edit', 'raindrops' ) . raindrops_link_unique( 'Post', $post->ID ), '<span class="edit-link">', '</span>' );
raindrops_delete_post_link( esc_html__( 'Trash', 'raindrops' ) . raindrops_link_unique( 'Post', $post->ID ), '<span class="edit-link">', '</span>' );
?>
</div>
<?php
if ( is_singular() && !is_front_page() ) {
raindrops_prev_next_post( 'nav-below' );
comments_template( '', true );
}
do_action( 'raindrops_after_part_' . basename( __FILE__, '.php' ) . '_' . basename( $template ) );
?>