<?php
/**
 * Template part for displaying content of page
 *
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
 *
 * @package errigal
 * @since 1.0.0
 */

defined( 'ABSPATH' ) || exit;

use Errigal\Constant\Errigal_Template_Part as Template_Part;

while ( have_posts() ) {
	the_post();
	get_template_part(
		'template-parts/component/content/article',
		null,
		array(
			/**
			 * Renders page article content.
			 *
			 * @since 1.1.0
			 *
			 * @return void
			 */
			Template_Part::RENDER_CALLBACK => function () {
				get_template_part(
					'template-parts/header/page-header',
					null,
					array(
						Template_Part::HEADING => get_the_title(),
					)
				);
				get_template_part( 'template-parts/component/content/content-entry' );
			},
		)
	);
	get_template_part( 'template-parts/component/content/comments' );
}
