This repository was archived by the owner on May 6, 2020. It is now read-only.
Repository navigation
Expand file tree
/
Copy pathcomments.php
More file actions
executable file
·112 lines (85 loc) · 3.09 KB
/
Copy pathcomments.php
File metadata and controls
executable file
·112 lines (85 loc) · 3.09 KB
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
<?php
/**
* The template for displaying comments.
*
* This is the template that displays the area of the page that contains both the current comments
* and the comment form.
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package Forte
* @link https://themebeans.com/themes/forte
*/
/*
* If the current post is protected by a password and
* the visitor has not yet entered the password we will
* return early without loading the comments.
*/
if ( post_password_required() ) {
return;
} ?>
<div class="comments-wrap row
<?php
if ( ! comments_open() && '0' == get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) {
echo 'zero-comments'; }
?>
">
<div class="row">
<h3 class="comments-title"><?php comments_number( __( '0 Comments', 'forte' ), __( '1 Comment', 'forte' ), __( '% Comments', 'forte' ) ); ?></h3>
<?php if ( ! comments_open() && is_page() && '0' != get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) { ?>
<span class="nocomments"><?php _e( 'Comments are now closed.', 'forte' ); ?></span>
<?php } ?>
<?php
/*
===================================================================*/
/*
COMMENT FORM
/*===================================================================*/
if ( comments_open() ) {
comment_form();
}
if ( ! comments_open() && have_comments() && ! is_page() ) :
?>
<span class="nocomments"><?php _e( 'Comments are now closed.', 'forte' ); ?></span>
<?php
endif;
// DISPLAY COMMENTS
if ( have_comments() ) {
?>
<div id="comments">
<?php if ( ! empty( $comments_by_type['comment'] ) ) { ?>
<div id="comments-list" class="comments">
<?php
// PAGINATION
$total_pages = get_comment_pages_count();
if ( $total_pages > 1 ) {
?>
<div id="comments-nav-above" class="comments-navigation">
<div class="paginated-comments-links"><?php paginate_comments_links(); ?></div>
</div><!-- END #comments-nav-above -->
<?php } ?>
<ol class="commentlist block">
<?php wp_list_comments( 'type=comment&callback=forte_comment' ); ?>
</ol>
<?php
$total_pages = get_comment_pages_count();
if ( $total_pages > 1 ) {
?>
<div id="comments-nav-below" class="comments-navigation">
<div class="paginated-comments-links"><?php paginate_comments_links(); ?></div>
</div><!-- END #comments-nav-below -->
<?php } ?>
</div><!-- END #comments-list.comments -->
<?php } //END if ( ! empty($comments_by_type['comment']) ) ?>
<?php if ( ! empty( $comments_by_type['pings'] ) ) { ?>
<div id="comments-list" class="comments">
<h3 class="comments-title"><?php _e( 'Trackbacks.', 'forte' ); ?></h3>
<ol class="pinglist">
<?php wp_list_comments( 'type=pings&callback=forte_ping' ); ?>
</ol>
</div><!-- END #comments-list .comments -->
<?php } //END if ( ! empty($comments_by_type['pings']) ) ?>
</div><!-- END #comments -->
<?php } //END if ( have_comments() ) ?>
</div><!-- END .row -->
</div><!-- END #comments -->