summaryrefslogtreecommitdiff
path: root/comments.php
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2011-11-27 12:23:12 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2011-11-27 12:23:12 -0500
commit8e2064bbd878ac93438a6616cbf4af21a0f41edd (patch)
tree113cd09cd2dd11d02455d575037dd1f32bb4aaea /comments.php
The North Star 2010-2011 theme, a fork of Twenty TenHEADmaster
I'm not planning on maintaining this, I just figured I'd put it in git in case I ever want it. This has already been cleaned up a lot. I might one day do the work to make it a proper child theme (it was forked too many versions ago for it to be clean), but probably not.
Diffstat (limited to 'comments.php')
-rw-r--r--comments.php57
1 files changed, 57 insertions, 0 deletions
diff --git a/comments.php b/comments.php
new file mode 100644
index 0000000..8645cd3
--- /dev/null
+++ b/comments.php
@@ -0,0 +1,57 @@
+<?php
+/**
+ * The template for displaying Comments.
+ *
+ * The area of the page that contains both current comments
+ * and the comment form. The actual display of comments is
+ * handled by a callback to twentyten_comment which is
+ * located in the functions.php file.
+ *
+ * @package WordPress
+ * @subpackage Twenty_Ten
+ * @since Twenty Ten 1.0
+ */
+
+global $head;
+?>
+
+ <div id="comments">
+<?php if ( post_password_required() ) { ?>
+ <p class="nopassword"><?php _e( 'This post is password protected. Enter the password to view any comments.', 'twentyten' ); ?></p>
+<?php } else {
+ if ( have_comments() ) { ?>
+ <h3 id="comments-title"><?php
+ printf( _n( 'One Response to %2$s', '%1$s Responses to %2$s', get_comments_number(), 'twentyten' ),
+ number_format_i18n( get_comments_number() ), '<em>' . get_the_title() . '</em>' );
+ ?></h3>
+<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) { ?>
+ <div class="navigation">
+ <div class="nav-previous"><?php previous_comments_link( __( '<span class="meta-nav">&larr;</span> Older Comments', 'twentyten' ) ); ?></div>
+ <div class="nav-next"><?php next_comments_link( __( 'Newer Comments <span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?></div>
+ </div> <!-- .navigation -->
+<?php } ?>
+ <ol class="commentlist">
+ <?php
+ /* Loop through and list the comments. Tell wp_list_comments()
+ * to use twentyten_comment() to format the comments.
+ * If you want to overload this in a child theme then you can
+ * define twentyten_comment() and that will be used instead.
+ * See twentyten_comment() in twentyten/functions.php for more.
+ */
+ wp_list_comments( array( 'callback' => 'lts_comment' ) );
+ ?>
+ </ol>
+<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) { ?>
+ <div class="navigation">
+ <div class="nav-previous"><?php previous_comments_link( __( '<span class="meta-nav">&larr;</span> Older Comments', 'twentyten' ) ); ?></div>
+ <div class="nav-next"><?php next_comments_link( __( 'Newer Comments <span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?></div>
+ </div><!-- .navigation -->
+<?php }
+ } else { // !have_comments()
+ if ( ! comments_open() ) { ?>
+ <p class="nocomments"><?php _e( 'Comments are closed.', 'twentyten' ); ?></p>
+<?php }
+ } // end have_comments()
+ comment_form(); ?>
+ </div><!-- #comments -->
+<?php } ?>