PageRenderTime 56ms CodeModel.GetById 29ms RepoModel.GetById 1ms app.codeStats 0ms

/wp-content/themes/ifeature/comments.php

https://github.com/Bochet/festival_lgbt
PHP | 78 lines | 42 code | 11 blank | 25 comment | 10 complexity | faec66bbf419e4d841ccc27b3f70fc69 MD5 | raw file
Possible License(s): GPL-2.0, AGPL-1.0, LGPL-2.1
  1. <?php
  2. /**
  3. * Comments Template
  4. *
  5. * Please do not edit this file. This file is part of the Cyber Chimps Framework and all modifications
  6. * should be made in a child theme.
  7. *
  8. * @category CyberChimps Framework
  9. * @package Framework
  10. * @since 1.0
  11. * @author CyberChimps
  12. * @license http://www.opensource.org/licenses/gpl-license.php GPL v2.0 (or later)
  13. * @link http://www.cyberchimps.com/
  14. */
  15. ?>
  16. <?php
  17. /*
  18. * If the current post is protected by a password and
  19. * the visitor has not yet entered the password we will
  20. * return early without loading the comments.
  21. */
  22. if ( post_password_required() )
  23. return;
  24. ?>
  25. <div id="comments" class="comments-area">
  26. <?php // You can start editing here -- including this comment! ?>
  27. <?php if ( have_comments() ) : ?>
  28. <h2 class="comments-title">
  29. <?php
  30. printf( _n( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'cyberchimps' ),
  31. number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>' );
  32. ?>
  33. </h2>
  34. <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
  35. <nav role="navigation" id="comment-nav-above" class="site-navigation comment-navigation">
  36. <h4 class="assistive-text"><?php _e( 'Comment navigation', 'cyberchimps' ); ?></h4>
  37. <div class="nav-previous"><?php previous_comments_link( '&larr; ' . __( 'Older Comments', 'cyberchimps' ) ); ?></div>
  38. <div class="nav-next"><?php next_comments_link( __( 'Newer Comments', 'cyberchimps' ) . ' &rarr;' ); ?></div>
  39. </nav>
  40. <?php endif; // check for comment navigation ?>
  41. <ol class="commentlist">
  42. <?php
  43. /* Loop through and list the comments. Tell wp_list_comments()
  44. * to use cyberchimps_comment() to format the comments.
  45. * If you want to overload this in a child theme then you can
  46. * define cyberchimps_comment() and that will be used instead.
  47. * See cyberchimps_comment() in functions.php for more.
  48. */
  49. wp_list_comments( array( 'callback' => 'cyberchimps_comment' ) );
  50. ?>
  51. </ol>
  52. <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
  53. <nav role="navigation" id="comment-nav-below" class="site-navigation comment-navigation">
  54. <h4 class="assistive-text"><?php _e( 'Comment navigation', 'cyberchimps' ); ?></h4>
  55. <div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'cyberchimps' ) ); ?></div>
  56. <div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'cyberchimps' ) ); ?></div>
  57. </nav>
  58. <?php endif; // check for comment navigation ?>
  59. <?php endif; // have_comments() ?>
  60. <?php
  61. // If comments are closed and there are comments, let's leave a little note, shall we?
  62. if ( ! comments_open() && '0' != get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :
  63. ?>
  64. <p class="nocomments"><?php _e( 'Comments are closed.', 'cyberchimps' ); ?></p>
  65. <?php endif; ?>
  66. <?php comment_form(); ?>
  67. </div><!-- #comments .comments-area -->