Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 21st, 2012  |  syntax: None  |  size: 2.85 KB  |  hits: 34  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php if ( have_comments() || comments_open() ) : ?>
  2.  
  3. <section id="comments"<?php if ( ! comments_open() ) : ?> class="comments-closed"<?php endif; ?>>
  4.        
  5.         <?php if ( have_comments() ) : ?>
  6.        
  7.         <header class="visuallyhidden">
  8.                 <h3>Responses</h3>
  9.         </header>
  10.        
  11.         <?php wp_list_comments( array(
  12.                 'callback' => 'tsticka14_comment',
  13.                 'max_depth' => 1
  14.         ) ); ?>
  15.        
  16.         <?php endif; ?>
  17.        
  18.         <?php if ( comments_open() ) :
  19.  
  20.         global $user_identity, $id, $post;
  21.         $commenter = wp_get_current_commenter();
  22.         $logged_in_as = '<p class="comment-form-item comment-form-logged-in-as">' . sprintf( __( 'Logged in as <a href="%1$s">%2$s</a>. <a href="%3$s" title="Log out of this account">Log out?</a>' ), admin_url( 'profile.php' ), $user_identity, wp_logout_url( apply_filters( 'the_permalink', get_permalink( $post->ID ) ) ) ) . '</p>';
  23.  
  24.         $note = 'Your email address won\'t be published. ';
  25.         if ( function_exists(Markdown) ) {
  26.                 $note.= 'You can use some HTML or <a href="http://daringfireball.net/projects/markdown/syntax" rel="external nofollow">Markdown</a>.';
  27.         } else {
  28.                 $note.= 'You can use some HTML.';
  29.         }
  30.  
  31.         ?>
  32.         <div class="content comment-form" id="respond">
  33.                 <h3 class="primary comment-form-hd">Leave a response</h3>
  34.                 <form action="<?php echo site_url( '/wp-comments-post.php' ); ?>" method="post" id="<?php echo esc_attr( $args['id_form'] ); ?>">
  35.                 <?php if ( is_user_logged_in() ) : ?>
  36.                         <?php echo apply_filters( 'comment_form_logged_in', $logged_in_as, $commenter, $user_identity ); ?>
  37.                 <?php else : ?>
  38.                         <p class="comment-form-item comment-form-author clearfix">
  39.                                 <label for="author" class="required">Name</label>
  40.                                 <input id="author" name="author" type="text" value="<?php echo esc_attr( $commenter['comment_author'] ); ?>" size="20" aria-required="true" />
  41.                         </p>
  42.                         <p class="comment-form-item comment-form-email clearfix">
  43.                                 <label for="email" class="required">Email</label>
  44.                                 <input id="email" name="email" type="email" value="<?php echo esc_attr( $commenter['comment_author_email'] ); ?>" size="20" aria-required="true" placeholder="you@website.com" />
  45.                         </p>
  46.                         <p class="comment-form-item comment-form-url clearfix">
  47.                                 <label for="url">Website <span class="note">(Optional)</span></label>
  48.                                 <input id="url" name="url" type="url" value="<?php echo esc_attr( $commenter['comment_author_url'] ); ?>" size="20" placeholder="http://website.com" />
  49.                         </p>
  50.                 <?php endif; ?>
  51.                         <p class="comment-form-item comment-form-comment clearfix">
  52.                                 <label for="comment" class="required">Message</label>
  53.                                 <textarea id="comment" name="comment" cols="45" rows="4" aria-required="true"></textarea>
  54.                         </p>
  55.                         <p class="note comment-form-item"><?php echo wptexturize( $note ); ?></p>
  56.                         <p class="comment-form-item">
  57.                                 <input name="submit" type="submit" id="submit" value="Submit your comment" />
  58.                                 <?php comment_id_fields( $id ); ?>
  59.                         </p>
  60.                 </form>
  61.         </div>
  62.         <?php endif; ?>
  63.  
  64. </section>
  65.  
  66. <?php endif; ?>