Repository navigation
Expand file tree
/
Copy pathcomments.php
More file actions
62 lines (51 loc) · 2.86 KB
/
Copy pathcomments.php
File metadata and controls
62 lines (51 loc) · 2.86 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
<?php
// Do not delete these lines
if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
die ('Please do not load this page directly. Thanks!');
if ( post_password_required() ) { ?>
<div id="comments">
<p class="nocomments"><?php _e('This post is password protected. Enter the password to view comments.', 'agera'); ?></p>
</div>
<?php
return;
} ?>
<div id="comments">
<?php if ( have_comments() ) : ?>
<h2 id="response_number"><?php comments_number('No Comments', '1 Comment', '% Comments' );?></h2>
<ol class="commentlist">
<?php wp_list_comments('callback=comments_all'); ?>
</ol>
<div class="navigation">
<div class="alignleft"><?php previous_comments_link() ?></div>
<div class="alignright"><?php next_comments_link() ?></div>
</div>
<?php else : // this is displayed if there are no comments so far ?>
<?php if ('open' == $post->comment_status) : ?>
<!-- If comments are open, but there are no comments. -->
<?php else : // comments are closed ?>
<!-- If comments are closed. -->
<!-- <p class="nocomments">Comments are closed.</p> -->
</div>
<?php endif; ?>
<?php endif; ?>
<div id="respond">
<?php
$fields = array(
'author' => '<div class="comment-from-who"><p class="contact-name"><input type="text" name="author" id="author" value="Name *" size="22" tabindex="1" aria-required="true" class="author_c required" onfocus="if(this.value==\'Name *\')this.value=\'\';" onblur="if(this.value==\'\')this.value=\'Name *\';"/></p>',
'email' => '<p class="contact-email"><input type="text" name="email" id="email" value="Email *" size="22" tabindex="2" aria-required="true" class="email_f required" onfocus="if(this.value==\'Email *\')this.value=\'\';" onblur="if(this.value==\'\')this.value=\'Email *\';"/></p>',
'url' => '<p class="contact-url"><input type="text" name="url" id="url" value="Website" size="22" tabindex="3" class="website_f" onfocus="if(this.value==\'Website\')this.value=\'\';" onblur="if(this.value==\'\')this.value=\'Website\';"/></p></div>'
);
$defaults = array(
'fields' => apply_filters( 'comment_form_default_fields', $fields ),
'id_form' => 'commentform',
'id_submit' => 'submit',
'title_reply' => __( 'Leave a Comment', 'gentle' ),
'title_reply_to' => __( 'Leave a Reply to %s', 'gentle' ),
'cancel_reply_link' => __( '- cancel reply', 'gentle' ),
'label_submit' => __( 'Post Comment', 'gentle' ),
'comment_field' => '<p class="comment-textarea"><textarea name="comment" id="comment" cols="1" rows="1" tabindex="4" class="comments_form text_f required" onfocus="if(this.value==\'Message *\')this.value=\'\';" onblur="if(this.value==\'\')this.value=\'Message *\';">Message *</textarea></p>'
);
comment_form($defaults);
?>
</div><!-- #respond -->
</div>