Advertisement
Bojan_Radonic

comments2

Nov 2nd, 2015
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.04 KB | None | 0 0
  1. <?php if ( post_password_required() ) return; ?>
  2.  
  3. <?php if ( comments_open() ) { echo '<div class="respond-container">'; }
  4.  
  5. comment_form($comments_args);
  6.  
  7. if ( comments_open() ) { echo '</div> <!-- /respond-container -->'; }
  8.  
  9. if ( have_comments() ) :
  10.  
  11.  
  12. ?>
  13.  
  14. <div class="comments-container">
  15.  
  16. <div class="comments-inner">
  17.  
  18. <a name="comments"></a>
  19.  
  20. <div class="comments-title-container">
  21.  
  22. <h2 class="comments-title">
  23.  
  24. <?php echo count($wp_query->comments_by_type['comment']) . ' ';
  25. echo _n( 'Comment' , 'Comments' , count($wp_query->comments_by_type['comment']), 'lovecraft' ); ?>
  26.  
  27. </h2>
  28.  
  29. <?php if ( comments_open() ) : ?>
  30.  
  31. <p class="comments-title-link">
  32.  
  33. <a href="#respond"><?php _e('Add Comment','lovecraft'); ?> &rarr;</a>
  34.  
  35. </p>
  36.  
  37. <?php endif; ?>
  38.  
  39. <div class="clear"></div>
  40.  
  41. </div>
  42.  
  43. <div class="comments">
  44.  
  45. <ol class="commentlist">
  46. <?php wp_list_comments( array( 'type' => 'comment', 'callback' => 'lovecraft_comment' ) ); ?>
  47. </ol>
  48.  
  49. <?php if (!empty($comments_by_type['pings'])) : ?>
  50.  
  51. <div class="pingbacks">
  52.  
  53. <h3 class="pingbacks-title">
  54.  
  55. <?php echo count($wp_query->comments_by_type['pings']) . ' ';
  56. echo _n( 'Pingback', 'Pingbacks', count($wp_query->comments_by_type['pings']), 'lovecraft' ); ?>
  57.  
  58. </h3>
  59.  
  60. <ol class="pingbacklist">
  61. <?php wp_list_comments( array( 'type' => 'pings', 'callback' => 'lovecraft_comment' ) ); ?>
  62. </ol>
  63.  
  64. </div> <!-- /pingbacks -->
  65.  
  66. <?php endif; ?>
  67.  
  68. <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?>
  69.  
  70. <div class="comments-nav" role="navigation">
  71.  
  72. <div class="fleft">
  73.  
  74. <?php previous_comments_link( '&larr; ' . __( 'Previous', 'lovecraft' ) ); ?>
  75.  
  76. </div>
  77.  
  78. <div class="fright">
  79.  
  80. <?php next_comments_link( __( 'Next', 'lovecraft' ) . ' &rarr;' ); ?>
  81.  
  82. </div>
  83.  
  84. <div class="clear"></div>
  85.  
  86. </div> <!-- /comment-nav-below -->
  87.  
  88. <?php endif; ?>
  89.  
  90. </div> <!-- /comments -->
  91.  
  92. </div> <!-- /comments-inner -->
  93.  
  94. </div> <!-- /comments-container -->
  95.  
  96. <?php endif; ?>
  97.  
  98. <?php if ( ! comments_open() && ! is_page() ) : ?>
  99.  
  100. <div class="comments-container">
  101.  
  102. <div class="comments-inner">
  103.  
  104. <p class="no-comments"><?php _e( 'Comments are closed.', 'lovecraft' ); ?></p>
  105.  
  106. </div>
  107.  
  108. </div>
  109.  
  110. <?php endif; ?>
  111.  
  112. <?php $comments_args = array(
  113.  
  114. 'comment_notes_before' =>
  115. '',
  116.  
  117. 'comment_notes_after' =>
  118. '',
  119.  
  120. 'comment_field' =>
  121. '<p class="comment-form-comment">
  122. <label for="comment">' . __('Comment','lovecraft') . ( $req ? '<span class="required">*</span>' : '' ) . '</label>
  123. <textarea id="comment" name="comment" cols="45" rows="6" required></textarea>
  124. </p>',
  125.  
  126. 'fields' => apply_filters( 'comment_form_default_fields', array(
  127.  
  128. 'author' =>
  129. '<p class="comment-form-author">
  130. <label for="author">' . __('Name','lovecraft') . ( $req ? '<span class="required">*</span>' : '' ) . '</label>
  131. <input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30" />
  132. </p>',
  133.  
  134. 'email' =>
  135. '<p class="comment-form-email">
  136. <label for="email">' . __('Email','lovecraft') . ( $req ? '<span class="required">*</span>' : '' ) . '</label>
  137. <input id="email" name="email" type="text" value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="30" />
  138. </p>',
  139.  
  140. 'url' =>
  141. '<p class="comment-form-url">
  142. <label for="url">' . __('Website','lovecraft') . '</label>
  143. <input id="url" name="url" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" />
  144. </p>')
  145. ),
  146. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement