toddlahman

Headway Comments.php for Spam Free Wordpress

Nov 7th, 2011
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.33 KB | None | 0 0
  1. <?php
  2. if (!empty($_SERVER['SCRIPT_FILENAME']) && basename($_SERVER['SCRIPT_FILENAME'] == 'comments.php'))
  3.     die('Why, hello thar!  What are you doing here?');
  4. if ( post_password_required() ) { ?>
  5.     <p class="nocomments"><?php _e('This post is password protected.  Please enter the password to view the comments.', 'headway') ?></p>
  6. <?php
  7.     return;
  8. }
  9.  
  10. if ( have_comments() ) : ?>
  11.  
  12.     <span id="comments" class="heading"><?php comments_number(__('No Responses', 'headway'), __('One Response', 'headway'), __('% Responses', 'headway') );?> <?php _e('to', 'headway') ?> <?php the_title(); ?></span>
  13.  
  14.     <ol class="commentlist">
  15.         <?php wp_list_comments('callback='.apply_filters('headway_comments_callback', false)); ?>
  16.     </ol>
  17.  
  18.     <div class="comments-navigation">
  19.         <div class="alignleft"><?php paginate_comments_links() ?></div>
  20.     </div>
  21.    
  22. <?php else : ?>
  23.  
  24.     <?php if ('open' == $post->comment_status) : ?>
  25.  
  26.         <p class="nocomments"><?php echo apply_filters('headway_no_comments', __('There are no comments yet.  Be the first and leave a response!', 'headway')); ?></p>
  27.        
  28.     <?php else : ?>
  29.  
  30.         <?php if(is_single()){ ?>
  31.             <p class="nocomments"><?php echo apply_filters('headway_comments_closed', __('Sorry, comments are closed for this post.', 'headway')); ?></p>
  32.         <?php } ?>
  33.  
  34.     <?php endif; ?>
  35.    
  36. <?php endif; ?>
  37.  
  38. <?php comment_form(); ?>
  39.  
Add Comment
Please, Sign In to add comment