<?php

	if ( 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']) ) {
		die ( 'Please do not load this page directly. Thanks.' );
	}

  /*
   * If the current post is protected by a password and
   * the visitor has not yet entered the password we will
   * return early without loading the comments.
   */
  if ( post_password_required() ) {
	  return;
  }

?>

  <section id="comments" class="clear comments-area">
<?php if ( comments_open() || have_comments() ) { ?>
    <h2 class="comments-title"><?php echo __('Discussion', 'sandbox'); ?> (<?php comments_number(__('No comments', 'sandbox'), __('<span>One</span> Comment', 'sandbox'), __('<span>%</span> Comments', 'sandbox') );?>)</h2>
  <?php if ( comments_open() ) {  ?>
    <?php comment_form(); ?>
  <?php } ?>
  <?php if ( have_comments() ) { ?>
    <ol class="comment-list">
      <?php
        wp_list_comments(array(
				  'style'       => 'ol',
				  'short_ping'  => true,
				  'avatar_size' => 150,
				  'callback'    => 'sandbox_comment_item',
        ));
      ?>
    </ol>
  <?php } ?>
<?php } else { ?>
  <h2 class="comments-title"><?php
    if ( !comments_open() ) {
  ?><span class="comments-closed"><?php _e( 'Comments are closed', 'sandbox' ); ?></span><?php
  } ?><?php
    if ( !have_comments() ) {
  ?> - <span class="no-comments"><?php _e( 'No Comments written', 'sandbox' ); ?></span><?php
  } ?></h2>
<?php } ?>
  </section><!-- #comments -->
