<?php
/**
 * The template for displaying Comments.
 *
 * The area of the page that contains comments and the comment form.
 *
 * 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;
?>

<?php
$aria_req = ( $req ? " aria-required='true'" : '' );
$comment_args = array(
	'title_reply'=> 'Leave a Comment',
	'fields' => apply_filters( 'comment_form_default_fields', array(
		'author' => '
				<div class="row">
				<div class="col-md-6">
				<input type="text" name="author"  placeholder="'.esc_attr__('Name (required)','photofolio').'" id="name" value="' . esc_attr( $commenter['comment_author'] ) . '" ' . $aria_req . ' /></div>
			
		',
		'email' => '
			<div class="col-md-6">
				<input id="mail" name="email"   placeholder="'.esc_attr__('Email (required)','photofolio').'" type="text" value="' . esc_attr(  $commenter['comment_author_email'] ) . '" ' . $aria_req . ' /></div></div>
			
		',
		'url' => '
			<input id="website" name="url"  placeholder="'.esc_attr__('URL','photofolio').'" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) . '"  />
		
		'
	)),
	'comment_field' => '<textarea  rows="7" id="comment" placeholder="'.esc_attr__('Your Comment (required)','photofolio').'"  name="comment"'.$aria_req.'></textarea>',
	'label_submit' => 'Post Comment',
	'comment_notes_after' => '',
);
?>


<div class="comment-section">
	<h1><?php comments_number( '0 Comments', '1 Comment', '% Comments' ); ?></h1>

	<ul class="comment-tree">
		<?php wp_list_comments('callback=photofolio_theme_comment'); ?>

	</ul>
	<?php
	// Are there comments to navigate through?
	if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) :
		?>
		<footer class="navigation comment-navigation" role="navigation">
			
			<div class="previous"><?php previous_comments_link( esc_html__( '&larr; Older Comments', 'photofolio' ) ); ?></div>
			<div class="next right"><?php next_comments_link( esc_html__( 'Newer Comments &rarr;', 'photofolio' ) ); ?></div>
		</footer><!-- .comment-navigation -->
	<?php endif; // Check for comment navigation ?>

	<?php if ( ! comments_open() && get_comments_number() ) : ?>
		<p class="no-comments"><?php esc_html_e( 'Comments are closed.' , 'photofolio' ); ?></p>
	<?php endif; ?>

	<?php if('open' == $post->comment_status){ ?>

		<?php comment_form($comment_args); ?>

	<?php } ?>


</div>
