Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 77 lines (65 sloc) 2.888 kB
edfeccc @ianstewart _s: initial fork of Toolbox
ianstewart authored
1 <?php
2 /**
3 * The template for displaying Comments.
4 *
5 * The area of the page that contains both current comments
6 * and the comment form. The actual display of comments is
7 * handled by a callback to _s_comment() which is
8 * located in the functions.php file.
9 *
10 * @package _s
11 * @since _s 1.0
12 */
13 ?>
c82269d @mfields _s: Remove password-protected message from comments.php. fixes #1217
mfields authored
14
15 <?php
16 /*
17 * If the current post is protected by a password and
18 * the visitor has not yet entered the password we will
19 * return early without loading the comments.
20 */
21 if ( post_password_required() )
22 return;
23 ?>
24
139dda7 @ianstewart _s: cleaner, more consistent ids and classes for comments.php
ianstewart authored
25 <div id="comments" class="comments-area">
edfeccc @ianstewart _s: initial fork of Toolbox
ianstewart authored
26
27 <?php // You can start editing here -- including this comment! ?>
28
29 <?php if ( have_comments() ) : ?>
139dda7 @ianstewart _s: cleaner, more consistent ids and classes for comments.php
ianstewart authored
30 <h2 class="comments-title">
edfeccc @ianstewart _s: initial fork of Toolbox
ianstewart authored
31 <?php
32 printf( _n( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), '_s' ),
33 number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>' );
34 ?>
35 </h2>
36
37 <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
0a42cc0 @ianstewart _s: Adding ARIA navigation roles to the all the nav elements
ianstewart authored
38 <nav role="navigation" id="comment-nav-above" class="site-navigation comment-navigation">
139dda7 @ianstewart _s: cleaner, more consistent ids and classes for comments.php
ianstewart authored
39 <h1 class="assistive-text"><?php _e( 'Comment navigation', '_s' ); ?></h1>
edfeccc @ianstewart _s: initial fork of Toolbox
ianstewart authored
40 <div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', '_s' ) ); ?></div>
41 <div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', '_s' ) ); ?></div>
42 </nav>
43 <?php endif; // check for comment navigation ?>
44
45 <ol class="commentlist">
46 <?php
47 /* Loop through and list the comments. Tell wp_list_comments()
48 * to use _s_comment() to format the comments.
49 * If you want to overload this in a child theme then you can
50 * define _s_comment() and that will be used instead.
22522ac @ianstewart _s: adding instructions on forking _s to the readme and cleaning up a…
ianstewart authored
51 * See _s_comment() in functions.php for more.
edfeccc @ianstewart _s: initial fork of Toolbox
ianstewart authored
52 */
53 wp_list_comments( array( 'callback' => '_s_comment' ) );
54 ?>
55 </ol>
56
57 <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
0a42cc0 @ianstewart _s: Adding ARIA navigation roles to the all the nav elements
ianstewart authored
58 <nav role="navigation" id="comment-nav-below" class="site-navigation comment-navigation">
139dda7 @ianstewart _s: cleaner, more consistent ids and classes for comments.php
ianstewart authored
59 <h1 class="assistive-text"><?php _e( 'Comment navigation', '_s' ); ?></h1>
edfeccc @ianstewart _s: initial fork of Toolbox
ianstewart authored
60 <div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', '_s' ) ); ?></div>
61 <div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', '_s' ) ); ?></div>
62 </nav>
63 <?php endif; // check for comment navigation ?>
64
65 <?php endif; // have_comments() ?>
66
67 <?php
68 // If comments are closed and there are no comments, let's leave a little note, shall we?
69 if ( ! comments_open() && '0' != get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :
70 ?>
71 <p class="nocomments"><?php _e( 'Comments are closed.', '_s' ); ?></p>
72 <?php endif; ?>
73
74 <?php comment_form(); ?>
75
139dda7 @ianstewart _s: cleaner, more consistent ids and classes for comments.php
ianstewart authored
76 </div><!-- #comments .comments-area -->
Something went wrong with that request. Please try again.