<?php
/**
 * Echo the structural markup for each comment. It also calls the comment action hooks.
 *
 * @package SplendorStudio\Framework\Templates\Structure
 *
 * @since   1.0.0
 */

fancify_lite_open_markup_e(
	'fancify_lite_comment',
	'article',
	array(
		'id'        => 'div-comment-' . esc_attr( get_comment_ID() ),
		'class'     => 'fancify-comment',
		'itemprop'  => 'comment',
		'itemscope' => 'itemscope',
		'itemtype'  => 'https://schema.org/Comment',
	)
);

fancify_lite_open_markup_e('fancify_lite_comment_header', 'header', array('class' => 'fancify-comment-header'));

/**
 * Fires in the comment header.
 *
 * @since 1.0.0
 */
do_action('fancify_lite_comment_header');

fancify_lite_close_markup_e('fancify_lite_comment_header', 'header');

fancify_lite_open_markup_e(
	'fancify_lite_comment_body',
	'div',
	array(
		'class'    => 'fancify-comment-body',
		'itemprop' => 'text',
	)
);

/**
 * Fires in the comment body.
 *
 * @since 1.0.0
 */
do_action('fancify_lite_comment_content');

fancify_lite_close_markup_e('fancify_lite_comment_body', 'div');

fancify_lite_close_markup_e('fancify_lite_comment', 'article'); // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect -- Code structure mirrors HTML markup.