comments.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. /*
  3. * If the current post is protected by a password and
  4. * the visitor has not yet entered the password we will
  5. * return early without loading the comments.
  6. */
  7. if ( post_password_required() )
  8. return;
  9. ?>
  10. <div id="comments" class="comments-area">
  11. <?php // You can start editing here -- including this comment! ?>
  12. <?php if ( have_comments() ) : ?>
  13. <h2 class="comments-title">
  14. <?php
  15. printf( _n( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'foto' ),
  16. number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>' );
  17. ?>
  18. </h2>
  19. <?php foto_comment_nav(); ?>
  20. <ol class="commentlist">
  21. <?php
  22. /* Loop through and list the comments. Tell wp_list_comments()
  23. * to use foto_comment() to format the comments.
  24. * If you want to overload this in a child theme then you can
  25. * define foto_comment() and that will be used instead.
  26. * See foto_comment() in library/includes/templates.php for more.
  27. */
  28. wp_list_comments( array( 'callback' => 'foto_comment' ) );
  29. ?>
  30. </ol>
  31. <?php foto_comment_nav(); ?>
  32. <?php endif; // have_comments() ?>
  33. <?php
  34. // If comments are closed and there are no comments, let's leave a little note, shall we?
  35. if ( ! comments_open() && '0' != get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :
  36. ?>
  37. <p class="nocomments"><?php _e( 'Comments are closed.', 'foto' ); ?></p>
  38. <?php endif; ?>
  39. <?php
  40. $args = array(
  41. 'label_submit' => __( 'Send your comment', 'foto' ),
  42. 'comment_notes_after' => ''
  43. );
  44. comment_form($args);
  45. ?>
  46. </div><!-- #comments .comments-area -->