<?php
/**
 * Template part for displaying posts
 *
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
 *
 * @package One Newspaper
 */
use OneNewspaper\CustomizerDefault as ONP;
$single_layout = $args['single_layout'];
?>
<article <?php one_newspaper_schema_article_attributes(); ?> id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
	<div class="post-inner one-newspaper-card">
		<?php
			if( ! in_array( $single_layout, [ 'two', 'four', 'five' ] ) ) one_newspaper_single_layout_part();
			if( in_array( $single_layout, [ 'five' ] ) ) :
				$single_post_image_caption = ONP\one_newspaper_get_customizer_option( 'single_post_image_caption' );
				$single_post_show_original_image_option = ONP\one_newspaper_get_customizer_option( 'single_post_show_original_image_option' );
				one_newspaper_post_thumbnail( $single_post_show_original_image_option, $single_post_image_caption );
			endif;
		?>

		<div <?php one_newspaper_schema_article_body_attributes(); ?> class="entry-content">
			<?php
				do_action( 'one_newspaper_before_single_content_hook' );
				the_content(
					sprintf(
						wp_kses(
							/* translators: %s: Name of current post. Only visible to screen readers */
							__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'one-newspaper' ),
							array(
								'span' => array(
									'class' => array(),
								),
							)
						),
						wp_kses_post( get_the_title() )
					)
				);
				do_action( 'one_newspaper_after_single_content_hook' );

				wp_link_pages(
					array(
						'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'one-newspaper' ),
						'after'  => '</div>',
					)
				);
			?>
		</div><!-- .entry-content -->

		<footer class="entry-footer">
			<?php one_newspaper_tags_list(); ?>
			<?php one_newspaper_entry_footer(); ?>
		</footer><!-- .entry-footer -->
		<?php
			the_post_navigation(
				array(
					'prev_text' => '<span class="nav-subtitle"><i class="fas fa-angle-double-left"></i>' . esc_html__( 'Previous:', 'one-newspaper' ) . '</span> <span class="nav-title">%title</span>',
					'next_text' => '<span class="nav-subtitle">' . esc_html__( 'Next:', 'one-newspaper' ) . '<i class="fas fa-angle-double-right"></i></span> <span class="nav-title">%title</span>',
				)
			);
		?>
	</div>
	<?php
		// If comments are open or we have at least one comment, load up the comment template.
		if ( comments_open() || get_comments_number() ) :
			comments_template();
		endif;
	?>
</article><!-- #post-<?php the_ID(); ?> -->
<?php
	/**
	 * hook - one_newspaper_single_post_append_hook
	 * 
	 */
	do_action( 'one_newspaper_single_post_append_hook' );
?>