Advertisement
masonjames

Untitled

Nov 3rd, 2011
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.46 KB | None | 0 0
  1. <?php
  2. // Important, please do not delete
  3. if ( ! empty( $_SERVER['SCRIPT_FILENAME'] ) && ( 'comments.php' === basename( $_SERVER['SCRIPT_FILENAME'] ) ) )
  4. die( 'Please do not load this page directly. Thanks!' );
  5.  
  6. if ( ! builder_show_comments() )
  7. return;
  8.  
  9. $login_url = wp_login_url( apply_filters( 'the_permalink', get_permalink() ) );
  10. $logout_url = wp_logout_url( apply_filters( 'the_permalink', get_permalink() ) );
  11. $req = get_option( 'require_name_email' );
  12. $aria_req = ( $req ) ? ' aria-required="true"' : '';
  13. $commenter = wp_get_current_commenter();
  14.  
  15. if ( post_password_required() )
  16. return;
  17. ?>
  18.  
  19.  
  20. <?php if ( have_comments() ) : ?>
  21. <div id="comments" class="clearfix">
  22. <?php do_action( 'builder_comments_popup_link', '<h3 class="comments-title">', '</h3>', __( '<span class="comment-number">%s</span> for ' . get_the_title() . '', 'it-l10n-BuilderChild-Kepler' ), __( '0 Responses', 'it-l10n-BuilderChild-Kepler' ), __( '1 Response', 'it-l10n-BuilderChild-Kepler' ), __( '% Responses', 'it-l10n-BuilderChild-Kepler' ) ); ?>
  23.  
  24. <ol class="commentlist">
  25. <?php wp_list_comments( array( 'type' => 'comment', 'callback' => 'builder_child_kepler_comments_structure' ) ); ?>
  26. </ol>
  27.  
  28. <?php if ( get_comment_pages_count() > 1 ) : ?>
  29. <div class="navigation">
  30. <div class="alignleft"><?php previous_comments_link(); ?></div>
  31. <div class="alignright"><?php next_comments_link(); ?></div>
  32. </div>
  33. <?php endif; ?>
  34. </div>
  35. <!-- end #comments -->
  36. <?php endif; ?>
  37.  
  38. <?php if ( comments_open() ) : ?>
  39. <div id="respond">
  40. <?php do_action("comment_form_before");?>
  41. <h3><?php comment_form_title( __( 'Leave a Reply', 'it-l10n-BuilderChild-Kepler' ), __( 'Leave a Reply to %s', 'it-l10n-BuilderChild-Kepler' ) ); ?></h3>
  42.  
  43. <div class="cancel-comment-reply">
  44. <small><?php cancel_comment_reply_link( 'Cancel Reply' ); ?></small>
  45. </div>
  46.  
  47. <?php if ( get_option( 'comment_registration' ) && ! is_user_logged_in() ) : ?>
  48. <p class="must-log-in"><?php printf( __( 'You must be <a href="%s">logged in</a> to post a comment.', 'it-l10n-BuilderChild-Kepler' ), $login_url ); ?></p>
  49. <?php else : ?>
  50.  
  51. <form action="<?php echo site_url( '/wp-comments-post.php' ); ?>" method="post" id="commentform">
  52. <?php if ( is_user_logged_in() ) : ?>
  53. <p class="logged-in-as"><?php printf( __( 'Logged in as <a href="%1$s">%2$s</a>. <a href="%3$s" title="Log out of this account">Log out?</a>', 'it-l10n-BuilderChild-Kepler' ), admin_url( 'profile.php' ), $user_identity, $logout_url ); ?></p>
  54. <?php else : ?>
  55. <p class="comment-form-author">
  56. <input type="text" name="author" id="author" value="<?php echo esc_attr( $commenter['comment_author'] ); ?>" size="22"<?php echo $aria_req; ?> />
  57. <label for="author"><small><?php _e( 'Name', 'it-l10n-BuilderChild-Kepler' ); ?> <?php if ( $req ) _e( "<span class='required'>(required)</span>", 'it-l10n-BuilderChild-Kepler' ); ?></small></label>
  58. </p>
  59.  
  60. <p class="comment-form-email">
  61. <input type="text" name="email" id="email" value="<?php echo esc_attr( $commenter['comment_author_email'] ); ?>" size="22"<?php echo $aria_req; ?> />
  62. <label for="email"><small><?php _e( 'Mail (will not be published)', 'it-l10n-BuilderChild-Kepler' ); ?> <?php if ( $req ) _e( "<span class='required'>(required)</span>", 'it-l10n-BuilderChild-Kepler' ); ?></small></label>
  63. </p>
  64.  
  65. <p class="comment-form-url">
  66. <input type="text" name="url" id="url" value="<?php echo esc_attr( $commenter['comment_author_url'] ); ?>" size="22" />
  67. <label for="url"><small><?php _e( 'Website', 'it-l10n-BuilderChild-Kepler' ); ?></small></label>
  68. </p>
  69. <?php endif; ?>
  70.  
  71. <!--<p><small><strong>XHTML:</strong> You can use these tags: <code><?php echo allowed_tags(); ?></code></small></p>-->
  72. <p><textarea name="comment" id="comment" cols="45" rows="10"></textarea></p>
  73.  
  74. <p class="comment-submit-wrapper">
  75. <input name="submit" type="submit" id="submit" value="<?php _e( 'Submit Comment', 'it-l10n-BuilderChild-Kepler' ); ?>" />
  76. <?php comment_id_fields(); ?>
  77. </p>
  78.  
  79. <?php do_action( 'comment_form', $post->ID ); ?>
  80. </form>
  81. <?php endif; // If registration required and not logged in ?>
  82. </div>
  83. <!--end #respond-->
  84. <?php do_action("comment_form_after");?>
  85. <?php else : // comments are closed ?>
  86. <?php echo builder_get_closed_comments_message( __( 'Comments are closed.', 'it-l10n-BuilderChild-Kepler' ) ); ?>
  87. <?php endif; ?>
  88.  
  89.  
  90.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement