Repository navigation
Expand file tree
/
Copy pathcomments.php
More file actions
53 lines (36 loc) · 1.45 KB
/
Copy pathcomments.php
File metadata and controls
53 lines (36 loc) · 1.45 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
<?php
/**
* The template for comments.
* @package highwind
* @since 1.0
*/
?>
<?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
<?php highwind_comments_before(); ?>
<div id="comments" class="comments<?php if ( ! comments_open() && post_type_supports( get_post_type(), 'comments' ) && is_page() ) { echo ' page-nocomments'; } ?>">
<?php if ( post_password_required() ) : ?>
<p class="nopassword"><?php _e( 'This post is password protected. Enter the password to view any comments.', 'highwind' ); ?></p>
</div><!-- #comments -->
<?php
return;
endif;
?>
<?php if ( have_comments() ) : ?>
<h2 class="comments-title">
<?php
printf( _n( 'One thought on “%2$s”', '%1$s thoughts on “%2$s”', get_comments_number(), 'highwind' ),
number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>' );
?>
</h2>
<ol class="commentlist">
<?php wp_list_comments( 'callback=highwind_comment&avatar_size=' . apply_filters( 'highwind_comment_avatar_size', $avatar_size = '96' ) ); ?>
</ol>
<?php highwind_comment_navigation(); ?>
<?php
elseif ( ! comments_open() && post_type_supports( get_post_type(), 'comments' ) && ! is_page() ) :
?>
<p class="nocomments"><?php _e( 'Comments are closed.', 'highwind' ); ?></p>
<?php endif; ?>
<?php comment_form(); ?>
</div><!-- .comments -->
<?php highwind_comments_after(); ?>