Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 59 lines (42 sloc) 2.179 kb
98a8e4e @jayj updated
authored
1 <?php
2 /**
3 * Comments Template
4 *
5 * Lists comments and calls the comment form. Individual comments have their own templates. The
6 * hierarchy for these templates is $comment_type.php, comment.php.
7 *
8 * @package Cakifo
9 * @subpackage Template
10 */
11
12 /* Kill the page if trying to access this template directly. */
06a0bcc @jayj Use !defined('ABSPATH') to detect if the comments.php is being called…
authored
13 if ( !defined('ABSPATH') ) die;
98a8e4e @jayj updated
authored
14
15 /* If a post password is required or no comments are given and comments/pings are closed, return */
16 if ( post_password_required() || ( ! have_comments() && ! comments_open() && ! pings_open() ) )
17 return;
18 ?>
19
58bfc73 @jayj Use <section> in comments
authored
20 <section id="comments">
98a8e4e @jayj updated
authored
21
22 <?php if ( have_comments() ) : ?>
23
58bfc73 @jayj Use <section> in comments
authored
24 <h2 id="comments-number" class="comments-header"><?php comments_number( __( 'No Responses', 'cakifo' ), __( 'One Response', 'cakifo' ), __( '% Responses', 'cakifo' ) ); ?></h2>
98a8e4e @jayj updated
authored
25
58bfc73 @jayj Use <section> in comments
authored
26 <?php do_atomic( 'before_comment_list' ); // cakifo_before_comment_list ?>
98a8e4e @jayj updated
authored
27
28 <ol class="comment-list">
29 <?php wp_list_comments( hybrid_list_comments_args() ); ?>
30 </ol> <!-- .comment-list -->
31
32 <?php do_atomic( 'after_comment_list' ); // cakifo_after_comment_list ?>
33
69d14a0 @jayj Comment navigation
authored
34 <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?>
35 <nav class="pagination comment-pagination">
d5b6def @jayj Make the Cakifo textdomain static due to changes in Hybrid Core
authored
36 <h3 class="assistive-text"><?php _e( 'Comment navigation', 'cakifo' ); ?></h3>
98a8e4e @jayj updated
authored
37 <?php paginate_comments_links(); ?>
69d14a0 @jayj Comment navigation
authored
38 </nav> <!-- .comment-navigation -->
98a8e4e @jayj updated
authored
39 <?php endif; ?>
40
41 <?php endif; // have_comments() ?>
42
58bfc73 @jayj Use <section> in comments
authored
43 <?php if ( pings_open() && ! comments_open() ) : ?>
98a8e4e @jayj updated
authored
44
45 <p class="comments-closed pings-open warning">
d5b6def @jayj Make the Cakifo textdomain static due to changes in Hybrid Core
authored
46 <?php printf( __( 'Comments are closed, but <a href="%1$s" title="Trackback URL for this post">trackbacks</a> and pingbacks are open.', 'cakifo' ), get_trackback_url() ); ?>
98a8e4e @jayj updated
authored
47 </p> <!-- .comments-closed .pings-open .warning -->
48
58bfc73 @jayj Use <section> in comments
authored
49 <?php elseif ( ! comments_open() ) : ?>
98a8e4e @jayj updated
authored
50
51 <p class="comments-closed warning">
d5b6def @jayj Make the Cakifo textdomain static due to changes in Hybrid Core
authored
52 <?php _e( 'Comments are closed.', 'cakifo' ); ?>
98a8e4e @jayj updated
authored
53 </p> <!-- .comments-closed .warning -->
54
55 <?php endif; ?>
56
57 <?php comment_form(); // Loads the comment form ?>
58
58bfc73 @jayj Use <section> in comments
authored
59 </section> <!-- #comments -->
Something went wrong with that request. Please try again.