<?php
/**
 * The template for displaying comments
 *
 * This is the template that displays the area of the page that contains both the current comments
 * and the comment form.
 *
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
 *
 * @package bizconsulting
 */

/*
 * 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;
}
?>

<div id="comments" class="comment-section">
	<div class="comments-area">
		<div class="comments-heading">
			<h3>
				<?php
				$bizconsulting_comment_count = get_comments_number();
				if ( '1' === $bizconsulting_comment_count ) {
					printf(
						/* translators: 1: title. */
						esc_html__( 'One thought on &ldquo;%1$s&rdquo;', 'bizconsulting' ),
						'<span>' . get_the_title() . '</span>'
					);
				} else {
					printf( // WPCS: XSS OK.
						/* translators: 1: comment count number, 2: title. */
						esc_html( _nx( '%1$s thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', $bizconsulting_comment_count, 'comments title', 'bizconsulting' ) ),
						number_format_i18n( $bizconsulting_comment_count ),
						'<span>' . get_the_title() . '</span>'
					);
				}
				?>
			</h3>
			<?php the_comments_navigation(); ?>
		</div>
		<div class="comments-list">
			<ul>
				<?php
					wp_list_comments( array(
						'style'      => 'ul',
						'short_ping' => true,
						'callback' => 'bpt_comments'
					) );
				?>
			</ul>
		</div>
	</div>

	<div class="comment-respond">
		<?php
		// If comments are closed and there are comments, let's leave a little note, shall we?
		if ( ! comments_open() ) :
			?>
			<p class="no-comments"><?php echo esc_html__( 'Comments are closed.', 'bizconsulting' ); ?></p>
			<?php
		endif;

		$comments_args = array(
			'comment_field' => '<div class="col-lg-12 col-md-12 col-sm-12 comment-form-comment">
					<div class="row">
						<textarea class="form-control" placeholder="'.esc_attr__( 'Your Message *', 'bizconsulting' ).'"  id="comment" name="comment" aria-required="true" cols="30" rows="10"></textarea>
					</div>
				</div>',

		);
		comment_form($comments_args);
		?>
	</div>


</div><!-- #comments -->
