-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathcomments.php
More file actions
52 lines (52 loc) · 2.2 KB
/
Copy pathcomments.php
File metadata and controls
52 lines (52 loc) · 2.2 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
<?php
if ( post_password_required() )
return;
?>
<div id="comments" class="comments-area">
<div class="layoutSingleColumn">
<?php if ( have_comments() ) : ?>
<h3 class="comments-title"><i class="bi bi-filter me-2"></i>评论<small>(<?php echo number_format_i18n( get_comments_number() );?>)</small></h3>
<ol class="comment-list">
<?php
wp_list_comments( array(
'style' => 'ol',
'short_ping' => true,
'reply_text' => '回复',
'avatar_size' => 40,
'format' => 'html5'
) );
?>
</ol>
<?php the_comments_pagination( array(
'prev_text' => '上一页',
'next_text' => '下一页',
'prev_next' => false,
) );?>
<?php endif; ?>
<?php
$comments_args = array(
'label_submit'=>'发布评论',
'title_reply'=>'<i class="bi bi-keyboard me-1"></i>发布评论',
'comment_form_top' => 'ds',
'comment_notes_before' => '',
'comment_notes_after' => '',
'comment_field' => '<p class="comment-form-comment"><textarea id="comment" name="comment" aria-required="true"></textarea></p>',
'fields' => apply_filters( 'comment_form_default_fields', array(
'author' =>
'<p class="comment-form-author">' .
'<input id="author" class="blog-form-input" placeholder="昵称" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) .
'" size="30" /></p>',
'email' =>
'<p class="comment-form-email">'.
'<input id="email" class="blog-form-input" placeholder="Email " name="email" type="text" value="' . esc_attr( $commenter['comment_author_email'] ) .
'" size="30" /></p>',
'url' =>
'<p class="comment-form-url">'.
'<input id="url" class="blog-form-input" placeholder="网站地址" name="url" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) .
'" size="30" /></p>'
)
),
);
comment_form($comments_args);?>
</div>
</div>