Advertisement
rdusnr

Untitled

Jul 18th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.48 KB | None | 0 0
  1. <?php
  2. /**
  3. * The template for displaying Comments
  4. *
  5. * The area of the page that contains comments and the comment form.
  6. *
  7. * @package WordPress
  8. * @subpackage Kleo
  9. * @since Kleo 1.0
  10. */
  11.  
  12. /*
  13. * If the current post is protected by a password and the visitor has not yet
  14. * entered the password we will return early without loading the comments.
  15. */
  16. if ( post_password_required() ) {
  17. return;
  18. }
  19.  
  20. ?>
  21. <?php if ( sq_option( 'replace_wp_comments_with_fb_comments' ) == 1 ) { ?>
  22.  
  23. <section class="container-wrap">
  24. <div class="container">
  25. <div id="comments" class="comments-area">
  26. <div class="fb-comments" data-href="<?php echo get_permalink(); ?>" data-numposts="5" width="100%"></div>
  27. </div><!-- #comments -->
  28. </div>
  29. </section>
  30.  
  31. <?php if ( sq_option( 'facebook_login' ) == 0 || is_user_logged_in() ) : ?>
  32. <div id="fb-root"></div>
  33. <script>(function(d, s, id) {
  34. var js, fjs = d.getElementsByTagName(s)[0];
  35. if (d.getElementById(id)) return;
  36. js = d.createElement(s); js.id = id;
  37. js.src = "//connect.facebook.net/<?php echo apply_filters('kleo_facebook_js_locale', 'en_US'); ?>/sdk.js#xfbml=1&version=v2.8<?php if ( sq_option( 'fb_app_id' ) ) { echo '&appId=' . sq_option( 'fb_app_id' ); } ?>";
  38. fjs.parentNode.insertBefore(js, fjs);
  39. }(document, 'script', 'facebook-jssdk'));
  40. </script>
  41. <?php endif; ?>
  42.  
  43.  
  44. <?php } else { ?>
  45.  
  46. <section class="container-wrap">
  47. <div class="container">
  48. <div id="comments" class="comments-area">
  49.  
  50. <div class="hr-title hr-long"><abbr><?php comments_number( esc_html__( '0 Comments', 'kleo_framework' ), esc_html__( '1 Comment', 'kleo_framework' ), __( '% Comments', 'kleo_framework' ) ); ?></abbr></div>
  51.  
  52. <?php if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) : ?>
  53. <p class="no-comments"><?php esc_html_e( 'Comments are closed.', 'kleo_framework' ); ?></p>
  54. <?php endif; ?>
  55.  
  56. <?php if ( have_comments() ) : ?>
  57. <div id="comments-list">
  58.  
  59. <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?>
  60.  
  61. <div id="comments-nav-above" class="comments-navigation" role="navigation">
  62. <div class="paginated-comments-links clearfix">
  63. <?php
  64. paginate_comments_links( array(
  65. 'type' => 'list',
  66. 'prev_text' => esc_html__( 'Previous', 'kleo_framework' ),
  67. 'next_text' => esc_html__( 'Next', 'kleo_framework' ),
  68. ));
  69. ?>
  70. </div>
  71. </div><!-- #comments-nav-above -->
  72. <?php endif; // Check for comment navigation. ?>
  73. <ol>
  74. <?php wp_list_comments( 'type=all&callback=kleo_custom_comments' ); ?>
  75. </ol>
  76.  
  77. <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?>
  78. <div id="comments-nav-below" class="comments-navigation" role="navigation">
  79. <div class="paginated-comments-links comments-links-after clearfix">
  80. <?php
  81. paginate_comments_links( array(
  82. 'type' => 'list',
  83. 'prev_text' => esc_html__( 'Previous', 'kleo_framework' ),
  84. 'next_text' => esc_html__( 'Next', 'kleo_framework' ),
  85. ) );
  86. ?>
  87. </div>
  88. </div><!-- #comments-nav-below -->
  89. <?php endif; // Check for comment navigation. ?>
  90.  
  91. <div class="activity-timeline"></div>
  92. </div>
  93.  
  94. <?php endif; // have_comments() ?>
  95.  
  96. <?php kleo_comment_form(); ?>
  97.  
  98. </div><!-- #comments -->
  99. </div>
  100. </section>
  101.  
  102. <?php }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement