<?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://codex.wordpress.org/Template_Hierarchy
 *
 * @package code4rest
 */

namespace Code4rest;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/*
 * 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;
}
code4rest()->print_styles( 'code4rest-comments' );
?>
<div id="comments" class="comments-area<?php echo ( code4rest()->option( 'post_footer_area_boxed' ) ? ' content-bg entry-content-wrap entry' : '' ); ?>">
	<?php
	do_action( 'code4rest_before_comments' );
	/**
	 * Code4rest Comments hook.
	 *
	 * @hooked Code4rest/comments_list - 10
	 * @hooked Code4rest/comments_form - 15/5
	 */
	do_action( 'code4rest_comments' );

	do_action( 'code4rest_after_comments' );

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