Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 60 lines (42 sloc) 2.034 kb
98a8e4e @jayj updated
authored
1 <?php
2 /**
3 * Comments Template
4 *
30f9e0d @jayj Code cleanup
authored
5 * Lists comments and calls the comment form. Individual comments have their own templates. The
98a8e4e @jayj updated
authored
6 * hierarchy for these templates is $comment_type.php, comment.php.
7 *
bda9730 @jayj PHPDoc changes. You can browse the documentation on http://wpthemes.jayj...
authored
8 * @package Cakifo
9 * @subpackage Template
98a8e4e @jayj updated
authored
10 */
11
3fb3ddb @jayj Inline documentation improvements
authored
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 di...
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
0116328 @jayj Spacing clean ups
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
0116328 @jayj Spacing clean ups
authored
26 <?php do_atomic( 'before_comment_list' ); // cakifo_before_comment_list ?>
98a8e4e @jayj updated
authored
27
0116328 @jayj Spacing clean ups
authored
28 <ol class="comment-list">
29 <?php wp_list_comments( hybrid_list_comments_args() ); ?>
30 </ol> <!-- .comment-list -->
98a8e4e @jayj updated
authored
31
0116328 @jayj Spacing clean ups
authored
32 <?php do_atomic( 'after_comment_list' ); // cakifo_after_comment_list ?>
98a8e4e @jayj updated
authored
33
0116328 @jayj Spacing clean ups
authored
34 <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?>
35 <nav class="pagination comment-pagination">
36 <h3 class="assistive-text"><?php _e( 'Comment navigation', 'cakifo' ); ?></h3>
37 <?php paginate_comments_links(); ?>
38 </nav> <!-- .comment-navigation -->
39 <?php endif; ?>
98a8e4e @jayj updated
authored
40
0116328 @jayj Spacing clean ups
authored
41 <?php endif; // have_comments() ?>
98a8e4e @jayj updated
authored
42
0116328 @jayj Spacing clean ups
authored
43 <?php if ( pings_open() && ! comments_open() ) : ?>
98a8e4e @jayj updated
authored
44
0116328 @jayj Spacing clean ups
authored
45 <p class="comments-closed pings-open warning">
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() ); ?>
47 </p> <!-- .comments-closed .pings-open .warning -->
98a8e4e @jayj updated
authored
48
0116328 @jayj Spacing clean ups
authored
49 <?php elseif ( ! comments_open() ) : ?>
98a8e4e @jayj updated
authored
50
0116328 @jayj Spacing clean ups
authored
51 <p class="comments-closed warning">
52 <?php _e( 'Comments are closed.', 'cakifo' ); ?>
53 </p> <!-- .comments-closed .warning -->
98a8e4e @jayj updated
authored
54
0116328 @jayj Spacing clean ups
authored
55 <?php endif; ?>
98a8e4e @jayj updated
authored
56
0116328 @jayj Spacing clean ups
authored
57 <?php comment_form(); // Loads the comment form ?>
98a8e4e @jayj updated
authored
58
30f9e0d @jayj Code cleanup
authored
59 </section> <!-- #comments -->
Something went wrong with that request. Please try again.