-
Notifications
You must be signed in to change notification settings - Fork 2
/
comments.php
62 lines (53 loc) · 1.7 KB
/
comments.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
<?php
if ( post_password_required() ) {
return;
}
?>
<div id="comments" class="comments-area">
<?php
if ( have_comments() ) : ?>
<h2 class="comments-title">
<?php
$comments_number = get_comments_number();
if ( '1' === $comments_number ) {
/* translators: %s: post title */
printf( esc_html_x( 'یک پاسخ به “%s”', 'comments title', 'flat-personal-blog' ), get_the_title() );
} else {
printf(
/* translators: 1: number of comments, 2: post title */
esc_html( _nx(
'%1$s پاسخ به “%2$s”',
'%1$s پاسخ به “%2$s”',
$comments_number,
'comments title',
'flat-personal-blog'
) ),
per_number( esc_html( number_format_i18n( $comments_number ) ) ),
get_the_title()
);
}
?>
</h2>
<ol class="comment-list">
<?php
wp_list_comments( array(
'avatar_size' => 100,
'style' => 'ol',
'short_ping' => true,
'reply_text' => __( 'پاسخ', 'flat-personal-blog' ),
) );
?>
</ol>
<?php the_comments_pagination( array(
'prev_text' => '<span class="screen-reader-text">' . __( 'بعدی', 'flat-personal-blog' ) . '</span>',
'next_text' => '<span class="screen-reader-text">' . __( 'قبلی', 'flat-personal-blog' ) . '</span>',
) );
endif; // Check for have_comments().
// 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( 'دیدگاهها بسته شدهاند.', 'flat-personal-blog' ); ?></p>
<?php
endif;
comment_form();
?>
</div><!-- #comments -->