Advertisement
Guest User

Comments Page

a guest
Jul 18th, 2011
269
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.02 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 ( function_exists( 'builder_show_comments' ) && ! 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. <?php if ( have_comments() ) : ?>
  20.     <div id="comments">
  21.         <h3><?php _e( 'Comments', 'it-l10n-BuilderChild-Ionic' ); ?></h3>
  22.        
  23.         <ol class="commentlist">
  24.             <?php wp_list_comments(); ?>
  25.         </ol>
  26.        
  27.         <?php if ( get_comment_pages_count() > 1 ) : ?>
  28.             <div class="navigation">
  29.                 <div class="alignleft"><?php previous_comments_link(); ?></div>
  30.                 <div class="alignright"><?php next_comments_link(); ?></div>
  31.             </div>
  32.         <?php endif; ?>
  33.     </div>
  34.     <!-- end #comments -->
  35. <?php endif; ?>
  36.  
  37. <?php if ( comments_open() ) : ?>
  38.     <div id="respond">
  39.         <h3><?php comment_form_title( __( 'Leave a Reply', 'it-l10n-BuilderChild-Ionic' ), __( 'Leave a Reply to %s', 'it-l10n-BuilderChild-Ionic' ) ); ?></h3>
  40.        
  41.         <div class="cancel-comment-reply">
  42.             <small><?php cancel_comment_reply_link(); ?></small>
  43.         </div>
  44.        
  45.         <?php if ( get_option( 'comment_registration' ) && ! is_user_logged_in() ) : ?>
  46.             <p class="must-log-in"><?php printf( __( 'You must be <a href="%s">logged in</a> to post a comment.', 'it-l10n-BuilderChild-Ionic' ), $login_url ); ?></p>
  47.         <?php else : ?>
  48.            
  49.             <form action="<?php echo site_url( '/wp-comments-post.php' ); ?>" method="post" id="commentform">
  50.                 <?php if ( is_user_logged_in() ) : ?>
  51.                     <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-Ionic' ), admin_url( 'profile.php' ), $user_identity, $logout_url ); ?></p>
  52.                 <?php else : ?>
  53.                     <p class="comment-form-author">
  54.                         <input type="text" name="author" id="author" value="<?php echo esc_attr( $commenter['comment_author'] ); ?>" size="22"<?php echo $aria_req; ?> />
  55.                         <label for="author"><small><?php _e( 'Name', 'it-l10n-BuilderChild-Ionic' ); ?> <?php if ( $req ) _e( "<span class='required'>(required)</span>", 'it-l10n-BuilderChild-Ionic' ); ?></small></label>
  56.                     </p>
  57.                    
  58.                     <p class="comment-form-email">
  59.                         <input type="text" name="email" id="email" value="<?php echo esc_attr(  $commenter['comment_author_email'] ); ?>" size="22"<?php echo $aria_req; ?> />
  60.                         <label for="email"><small><?php _e( 'Mail (will not be published)', 'it-l10n-BuilderChild-Ionic' ); ?> <?php if ( $req ) _e( "<span class='required'>(required)</span>", 'it-l10n-BuilderChild-Ionic' ); ?></small></label>
  61.                     </p>
  62.                    
  63.                     <p class="comment-form-url">
  64.                         <input type="text" name="url" id="url" value="<?php echo esc_attr( $commenter['comment_author_url'] ); ?>" size="22" />
  65.                         <label for="url"><small><?php _e( 'Website', 'it-l10n-BuilderChild-Ionic' ); ?></small></label>
  66.                     </p>
  67.                 <?php endif; ?>
  68.                
  69.                 <!--<p><small><strong>XHTML:</strong> You can use these tags: <code><?php echo allowed_tags(); ?></code></small></p>-->
  70.                 <p><textarea name="comment" id="comment" cols="45" rows="10"></textarea></p>
  71.                
  72.                 <p class="comment-submit-wrapper">
  73.                     <input name="submit" type="submit" id="submit" value="<?php _e( 'Submit Comment &rarr;', 'it-l10n-BuilderChild-Ionic' ); ?>" />
  74.                     <?php comment_id_fields(); ?>
  75.                 </p>
  76.                
  77.                 <?php do_action( 'comment_form', $post->ID ); ?>
  78.             </form>
  79.         <?php endif; // If registration required and not logged in ?>
  80.     </div>
  81.     <!--end #respond-->
  82. <?php else : // comments are closed ?>
  83.     <?php echo builder_get_closed_comments_message( __( 'Comments are closed.', 'it-l10n-BuilderChild-Ionic' ) ); ?>
  84. <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement