Repository navigation
Expand file tree
/
Copy pathcomments.php
More file actions
77 lines (63 loc) · 3.14 KB
/
Copy pathcomments.php
File metadata and controls
77 lines (63 loc) · 3.14 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
<?php
/**
* The template for displaying comments
*/
if ( post_password_required() ) {
return;
}
?>
<div id="comments" class="comments-area">
<?php if ( have_comments() ) : ?>
<h2 class="comments-title">
<?php
printf(
_nx( cb_t( 'one_comment' ), cb_t( 'comments_count' ), get_comments_number(), 'comments title', 'credibleblog' ),
number_format_i18n( get_comments_number() )
);
?>
</h2>
<ol class="comment-list">
<?php
wp_list_comments( array(
'style' => 'ol',
'short_ping' => true,
'avatar_size' => 60,
) );
?>
</ol>
<?php the_comments_navigation(); ?>
<?php if ( ! comments_open() ) : ?>
<p class="no-comments"><?php echo esc_html( cb_t( 'comments_closed' ) ); ?></p>
<?php endif; ?>
<?php endif; ?>
<?php
$commenter = wp_get_current_commenter();
comment_form( array(
'class_form' => 'comment-form-premium',
'title_reply_before' => '<h3 id="reply-title" class="comment-reply-title">',
'title_reply_after' => '</h3>',
'title_reply' => cb_t( 'leave_reply', 'Diskusi' ),
'label_submit' => cb_t( 'post_comment', 'Kirim Komentar' ),
'logged_in_as' => '', // Remove default "Logged in as"
'comment_notes_before' => '', // Remove "Required fields are marked *"
'class_submit' => 'btn-premium btn-wide submit',
'submit_field' => '<div class="form-submit">%1$s %2$s</div>',
// Custom Comment Field
'comment_field' => '<div class="comment-form-comment form-group">
<textarea id="comment" name="comment" cols="45" rows="5" maxlength="65525" required="required" placeholder="' . esc_attr( cb_t( 'leave_comment', 'Tulis komentar Anda...' ) ) . '"></textarea>
</div>',
// Custom Fields (Name, Email, URL) - Only shown if not logged in
'fields' => array(
'author' => '<div class="comment-form-author form-group">
<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30" maxlength="245" required="required" placeholder="' . esc_attr__( 'Name', 'credibleblog' ) . '">
</div>',
'email' => '<div class="comment-form-email form-group">
<input id="email" name="email" type="email" value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="30" maxlength="100" required="required" placeholder="' . esc_attr__( 'Email', 'credibleblog' ) . '">
</div>',
'url' => '<div class="comment-form-url form-group">
<input id="url" name="url" type="url" value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" maxlength="200" placeholder="' . esc_attr__( 'Website', 'credibleblog' ) . '">
</div>',
),
) );
?>
</div>