Advertisement
Guest User

Untitled

a guest
Jul 14th, 2011
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.62 KB | None | 0 0
  1. <?php
  2. /**
  3.  * The template for displaying Comments.
  4.  *
  5.  * The area of the page that contains both current comments
  6.  * and the comment form.  The actual display of comments is
  7.  * handled by a callback to twentyten_comment which is
  8.  * located in the functions.php file.
  9.  *
  10.  * @package WordPress
  11.  * @subpackage Twenty_Ten
  12.  * @since Twenty Ten 1.0
  13.  */
  14. ?>
  15.  
  16.             <div id="comments">
  17. <?php if ( post_password_required() ) : ?>
  18.                 <p class="nopassword"><?php _e( 'This post is password protected. Enter the password to view any comments.', 'twentyten' ); ?></p>
  19.             </div><!-- #comments -->
  20. <?php
  21.         /* Stop the rest of comments.php from being processed,
  22.          * but don't kill the script entirely -- we still have
  23.          * to fully load the template.
  24.          */
  25.         return;
  26.     endif;
  27. ?>
  28.  
  29. <?php
  30.     // You can start editing here -- including this comment!
  31. ?>
  32.  
  33. <?php if ( have_comments() ) : ?>
  34.             <h3 id="comments-title"><?php
  35.             printf( _n( 'One Response to the post %2$s', '%1$s Responses to the post %2$s', get_comments_number(), 'twentyten' ),
  36.             number_format_i18n( get_comments_number() ), '<em>' . get_the_title() . '</em>' );
  37.             ?></h3>
  38.  
  39. <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>
  40.             <div class="navigation">
  41.                 <div class="nav-previous"><?php previous_comments_link( __( '<span class="meta-nav">&larr;</span> Older Comments', 'twentyten' ) ); ?></div>
  42.                 <div class="nav-next"><?php next_comments_link( __( 'Newer Comments <span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?></div>
  43.             </div> <!-- .navigation -->
  44. <?php endif; // check for comment navigation ?>
  45.  
  46.             <ol class="commentlist">
  47.                 <?php wp_list_comments( array( 'callback' => 'gyc_blog_comments' ) ); ?>
  48.             </ol>
  49.  
  50. <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>
  51.             <div class="navigation">
  52.                 <div class="nav-previous"><?php previous_comments_link( __( '<span class="meta-nav">&larr;</span> Older Comments', 'twentyten' ) ); ?></div>
  53.                 <div class="nav-next"><?php next_comments_link( __( 'Newer Comments <span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?></div>
  54.             </div><!-- .navigation -->
  55. <?php endif; // check for comment navigation ?>
  56.  
  57. <?php else : // or, if we don't have comments:
  58.  
  59.     /* If there are no comments and comments are closed,
  60.      * let's leave a little note, shall we?
  61.      */
  62.     if ( ! comments_open() ) :
  63. ?>
  64.     <p class="nocomments"><?php _e( 'Comments are closed.', 'twentyten' ); ?></p>
  65. <?php endif; // end ! comments_open() ?>
  66.  
  67. <?php endif; // end have_comments() ?>
  68.  
  69. <?php comment_form(
  70.     array(
  71.         'fields' => apply_filters( 'comment_form_default_fields', array(
  72.             'author' => '<p class="comment-form-author">' . ( $req ? '<span class="req">*</span>' : '' ) .
  73.                     '<input id="author" name="author" type="text" value="' . esc_attr(  $commenter['comment_author'] ) . '" size="30"' . $aria_req . ' onload="if (this.value == \'\' ) {this.value = \'name\';}" onfocus="if (this.value == \'name\') {this.value = \'\';}" onblur="if (this.value == \'\') {this.value = \'name\';}" /></p>',
  74.             'email'  => '<p class="comment-form-email">' . ( $req ? '<span class="req">*</span>' : '' ) .
  75.                     '<input id="email" name="email" type="text" value="' . esc_attr(  $commenter['comment_author_email'] ) . '" size="30"' . $aria_req . ' onload="if (this.value == \'\' ) {this.value = \'name\';}" onfocus="if (this.value == \'name\') {this.value = \'\';}" onblur="if (this.value == \'\') {this.value = \'name\';}"/></p>',
  76.             'agree_terms'  => '<p class="agree-terms">' . ( $req ? '<span class="required">*</span>' : '' ) .
  77.                     '<input id="agree" name="agree" type="checkbox" value="' . esc_attr(  $commenter['comment_agree'] ) . '" ' . $aria_req . '/> I have read and agree to the <a href="/commenting-rules">commenting rules</a>.',
  78.             )),
  79.         'title_reply'          => 'Leave A Comment:',
  80.         'logged_in_as'         => '<p class="logged-in-as">' . sprintf( __( 'logged in as <a href="%1$s">%2$s</a>. <br /><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>',
  81.         'comment_field'       => '<p class="comment-form-comment"><textarea id="comment" value="comment" onfocus="if (this.value == \'comment\') {this.value = \'\';}" onblur="if (this.value == \'\') {this.value = \'comment\';}" name="comment" cols="45" rows="8" aria-required="true"></textarea></p>',
  82.         'comment_notes_after'  => '<div class="agree-placeholder"></div>'
  83.         ));
  84.        
  85. ?>
  86.  
  87.  
  88. </div><!-- #comments -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement