Repository navigation
Expand file tree
/
Copy pathcomments.php
More file actions
executable file
·62 lines (55 loc) · 3.15 KB
/
Copy pathcomments.php
File metadata and controls
executable file
·62 lines (55 loc) · 3.15 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
if( ! empty( $_SERVER[ 'SCRIPT_FILENAME' ] ) && 'comments.php' == basename( $_SERVER[ 'SCRIPT_FILENAME' ] ) )
die(__('please do not load this page directly kind sir', 'wpflex'));
?>
<div class="comments">
<?php if ( post_password_required() ) : ?>
<p class="nopassword"><?php _e( 'This post is password protected. Enter the password to view any comments.' , 'wpflex'); ?></p>
<?php return; ?>
<?php endif; ?>
<div id="comment-count">
<?php if ( have_comments() ) : ?>
<h3><a href="<?php the_permalink(); ?>#respond"><?php _e( 'Leave a Comment','wpflex');?></a></h3>
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // check if there comments to navigate through ?>
<div class="pagination comment-pagination">
<span class="prev-comments-link"><?php previous_comments_link( __( '<span>← older comments</span>','wpflex')); ?></span>
<span class="nxt-comments-link"><?php next_comments_link( __('<span>newer comments →</span>','wpflex')); ?></span>
</div>
<?php endif; ?>
</div>
<ol class="comment-list">
<?php
$wpflex_comment_array = array(
'walker' => null,
'max_depth' => '',
'style' => 'ol',
'callback' => 'wpflex_comments',
'end-callback' => null,
'type' => __( 'comment', 'wpflex' ),
'reply_text' => __( 'reply', 'wpflex' ),
'page' => '',
'per_page' => '',
'reverse_top_level' => false,
'reverse_children' => false,
);
?>
<?php wp_list_comments( $wpflex_comment_array ); ?>
</ol>
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>
<div class="pagination comment-pagination">
<span class="prev-comments-link"><?php previous_comments_link( __( '<span>← older comments</span>','wpflex')); ?></span>
<span class="nxt-comments-link"><?php next_comments_link( __('<span>newer comments →</span>','wpflex')); ?></span>
</div>
<?php endif; ?>
<?php else :
if ( ! comments_open() ) : ?>
<p class="nocomments"><?php _e( 'Comments are closed' , 'wpflex' ); ?></p>
<?php endif; ?>
<?php endif; ?>
<?php if ( comments_open() ) : ?>
<?php
$commentform_args = array( 'comment_notes_after' => '<p class="form-allowed-tags">'. __('You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes:','wpflex') . '<pre><code class="language-markup"><a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong></code></pre></p>' );
?>
<?php comment_form($commentform_args); ?>
<?php endif; ?>
</div>