-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontent-footer-full.php
106 lines (81 loc) · 2.53 KB
/
content-footer-full.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
<?php
/**
* Full Content Footer
*
* Multipage nav, taxonomy terms, admin Edit link, etc. for full display of different post types.
*/
// No direct access
if ( ! defined( 'ABSPATH' ) ) exit;
// Collect term lists (categories, tags, etc.) for specific post types
$term_lists = array();
// Blog Terms
if ( is_singular( 'post' ) ) {
// Blog Tags
/* translators: used between list items, there is a space after the comma */
if ( $list = get_the_tag_list( '', __( ', ', 'uplifted' ) ) ) {
$term_lists[] = sprintf( __( 'Tagged with %s', 'uplifted' ), $list );
}
}
// Sermon Tags and Series
elseif ( is_singular( 'ctc_sermon' ) ) {
// Series
/* translators: used between list items, there is a space after the comma */
if ( $list = get_the_term_list( $post->ID, 'ctc_sermon_series', '', __( ', ', 'uplifted' ) ) ) {
$term_lists[] = sprintf( __( 'Series: %s', 'uplifted' ), $list );
}
// Sermon Tags
/* translators: used between list items, there is a space after the comma */
if ( $list = get_the_term_list( $post->ID, 'ctc_sermon_tag', '', __( ', ', 'uplifted' ) ) ) {
$term_lists[] = sprintf( __( 'Tagged with %s', 'uplifted' ), $list );
}
}
?>
<?php
// Have footer content to show?
if ( ( ctfw_is_multipage() && ! post_password_required() ) || ! empty( $term_lists ) || ctfw_can_edit_post() ) :
?>
<footer class="uplifted-entry-footer clearfix">
<?php
// "Pages: 1 2 3" when <!--nextpage--> used
if ( ctfw_is_multipage() && ! post_password_required() ) :
?>
<div class="uplifted-entry-footer-item">
<?php
wp_link_pages( array(
'before' => '<div class="uplifted-entry-page-nav"><span>' . __( 'Pages:', 'uplifted' ) . '</span>',
'after' => '</div>'
) );
?>
</div>
<?php endif; ?>
<?php
// Term lists (categories, tags, etc.)
if ( ! empty( $term_lists ) ) :
?>
<div class="uplifted-entry-footer-item">
<?php foreach ( $term_lists as $term_list ) : ?>
<div class="uplifted-entry-footer-terms">
<?php echo $term_list; ?>
</div>
<?php endforeach; ?>
</div>
<?php endif; ?>
<?php
// "Edit" link for privileged user
if ( ctfw_can_edit_post() ) :
?>
<div class="uplifted-entry-footer-item">
<?php
$post_type_obj = get_post_type_object( $post->post_type );
/* translators: %1$s is icon, %1$s is post type singular name */
edit_post_link(
sprintf(
__( ' Edit %1$s', 'uplifted' ), // Link text format
$post_type_obj->labels->singular_name // Post type name
)
);
?>
</div>
<?php endif; ?>
</footer>
<?php endif; ?>