Advertisement
Guest User

Untitled

a guest
Mar 5th, 2013
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.99 KB | None | 0 0
  1. <?php // Do not delete these lines
  2. if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename
  3. ($_SERVER['SCRIPT_FILENAME']))
  4. die ('Please do not load this page directly. Thanks!');
  5.  
  6. if ( post_password_required() ) { ?>
  7.  
  8. <p class="nocomments"><?php _e('This post is password protected. Enter the password to view comments.', 'framework'); ?></p>
  9.     <?php
  10.         return;
  11.     }
  12. ?>
  13.     <!-- You can start editing here. -->
  14.     <?php if ( have_comments() ) : ?>
  15.    <div class="commentsheader" id="comments">
  16.     <h3><?php _e('Comments', 'framework'); ?></h3>
  17.     </div>
  18. <ol class="listcomments">
  19.     <?php wp_list_comments('type=comment&callback=ag_comment'); ?>
  20. </ol>
  21. <div class="navigation-comments">
  22.     <div class="alignleft">
  23.         <p>
  24.             <?php previous_comments_link() ?>
  25.         </p>
  26.     </div>
  27.     <div class="alignright">
  28.         <p>
  29.             <?php next_comments_link() ?>
  30.         </p>
  31.     </div>
  32. </div>
  33. <div class="clear"></div>
  34. <?php else : // this is displayed if there are no comments so far ?>
  35. <?php if ('open' == $post->comment_status) : ?>
  36. <?php else : // comments are closed ?>
  37. <?php endif; ?>
  38. <?php endif; ?>
  39. <?php
  40. /*-----------------------------------------------------------------------------------*/
  41. /*  Comment Form
  42. /*-----------------------------------------------------------------------------------*/
  43.  
  44. if ( comments_open() ) : ?>
  45. <!-- Submit Comment Form -->
  46. <div class="commentsform">
  47. <h3><?php _e('Submit a Comment', 'framework'); ?></h3>
  48.     <?php
  49.  
  50.     $comments_args = array( 'fields' => apply_filters( 'comment_form_default_fields',
  51.                    array(
  52.                         'author' => '<div>
  53.                                         <label for="author">'. __('Name', 'framework') .( $req ? '<span class="required">*</span>' : '' ) . '</label>
  54.                                         <input type="text" name="author"  id="author" value="'.$comment_author.'" size="22" tabindex="1" '. ( $req ? 'class="required"' : '' ).'/>
  55.                                    </div>',
  56.                         'email'  => '<div>
  57.                                         <label for="email">'. __('Mail', 'framework') .( $req ? '<span class="required">*</span>' : '' ) . '</label>
  58.                                         <input type="text" name="email"  id="email" value="'.$comment_author_email.'" size="22" tabindex="2" '. ( $req ? 'class="required email"' : '' ).'/>
  59.                                    </div>',
  60.                         'url'    => '<label for="url">'. __('Website', 'framework') .'</label>
  61.                                    <input type="text" name="url" id="url" value="'. $comment_author_url .'" size="44" tabindex="3" />',
  62.                        
  63.                         )),
  64.                         'comment_field' => '<label for="comment">'.__('Message', 'framework').'<span>*</span></label>'.
  65.                                             '<textarea name="comment" id="comment" cols="58" rows="8" tabindex="4" '. ( $req ? 'class="required"' : '' ).'></textarea>',
  66.                    
  67.                                    
  68.                     'must_log_in' => '',
  69.                     'logged_in_as' => '<p>'. __("Logged in as", "framework").' <a href="'.get_option('siteurl').'/wp-admin/profile.php">'.$user_identity.'</a>. <a href="'.get_option('siteurl').'/wp-login.php?action=logout" title="Log out of this account">'.__("Logout.", "framework").' &raquo;</a></p>',
  70.                     'id_form' => 'commentsubmit',
  71.                     'comment_notes_before' => '',
  72.                     'comment_notes_after' => '',
  73.                     'id_submit' => 'submit',
  74.                     'title_reply'          => '',
  75.                     'title_reply_to'       => '',
  76.                     'cancel_reply_link'    => __( 'Cancel reply', 'framework' ),
  77.                     'label_submit'         => __( 'Post Comment', 'framework' )
  78.                     );
  79.     comment_form($comments_args); ?>
  80. </div>
  81. <?php endif; // If registration required and not logged in ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement