Repository navigation
Expand file tree
/
Copy pathcomments.php
More file actions
76 lines (55 loc) · 2.29 KB
/
Copy pathcomments.php
File metadata and controls
76 lines (55 loc) · 2.29 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
76
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
/**
* Comments Template
*
* This template file handles the display of comments, pingbacks and trackbacks.
*
* External functions are used to display the various types of comments.
*
* @package WooFramework
* @subpackage Template
*/
// 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() ) { ?>
<p class="nocomments"><?php _e( 'This post is password protected. Enter the password to view comments.', 'woothemes' ); ?></p>
<?php return; } ?>
<?php $comments_by_type = &separate_comments( $comments ); ?>
<!-- You can start editing here. -->
<?php if ( have_comments() ) { ?>
<div id="comments">
<?php if ( ! empty( $comments_by_type['comment'] ) ) { ?>
<span class="heading"><?php the_title(); ?></span>
<h3><?php comments_number( __( 'No Responses', 'woothemes' ), __( 'One Response', 'woothemes' ), __( '% Responses', 'woothemes' ) ); ?></h3>
<ol class="commentlist">
<?php wp_list_comments( 'avatar_size=40&callback=custom_comment&type=comment' ); ?>
</ol>
<nav class="navigation fix">
<div class="fl"><?php previous_comments_link(); ?></div>
<div class="fr"><?php next_comments_link(); ?></div>
</nav><!-- /.navigation -->
<?php } ?>
<?php if ( ! empty( $comments_by_type['pings'] ) ) { ?>
<span class="heading"><?php _e( 'Trackbacks/Pingbacks', 'woothemes' ); ?></span>
<ol class="pinglist">
<?php wp_list_comments( 'type=pings&callback=list_pings' ); ?>
</ol>
<?php }; ?>
</div> <!-- /#comments_wrap -->
<?php } else { // this is displayed if there are no comments so far ?>
<?php
// If there are no comments and comments are closed, let's leave a little note, shall we?
if ( comments_open() && is_singular() ) { ?>
<div id="comments">
<h5 class="nocomments"><?php _e( 'No comments yet.', 'woothemes' ); ?></h5>
</div>
<?php } ?>
<?php
} // End IF Statement
/* The Respond Form. Uses filters in the theme-functions.php file to customise the form HTML. */
if ( comments_open() )
comment_form();
?>