Repository navigation
Expand file tree
/
Copy pathcomments.php
More file actions
67 lines (55 loc) · 1.75 KB
/
Copy pathcomments.php
File metadata and controls
67 lines (55 loc) · 1.75 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
<?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 Tabor
* @link https://themebeans.com/themes/tabor
*/
/*
* 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 id="comments" class="comments">
<?php $sidebar_class = ( is_active_sidebar( 'sidebar-3' ) ) ? ' has-sidebar' : null; ?>
<div class="comments__inner container <?php echo esc_attr( $sidebar_class ); ?>">
<?php
if ( have_comments() ) :
?>
<ol class="comment-list list-reset">
<?php
wp_list_comments(
array(
'avatar_size' => 100,
'style' => 'ol',
'short_ping' => true,
)
);
?>
</ol>
<?php
the_comments_pagination(
array(
'prev_text' => wp_kses( tabor_get_svg( array( 'icon' => 'left' ) ), tabor_svg_allowed_html() ) . '<span class="screen-reader-text">' . __( 'Previous', 'tabor' ) . '</span>',
'next_text' => '<span class="screen-reader-text">' . __( 'Next', 'tabor' ) . '</span>' . wp_kses( tabor_get_svg( array( 'icon' => 'right' ) ), tabor_svg_allowed_html() ),
)
);
endif; // Check for have_comments().
comment_form();
// If comments are closed and there are comments, let's leave a little note, shall we?
if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :
?>
<p class="no-comments"><?php esc_html_e( 'Comments are closed.', 'tabor' ); ?></p>
<?php
endif;
?>
</div>
</div>