<?php

/**
 * This template displays the content for a full post
 * @link https://developer.wordpress.org/themes/basics/theme-functions/
 * @package Glaciers
 * @since 1.0.0
 */

if (!defined('ABSPATH')) {
	exit; // Exit if accessed directly.
}

// Are the options activated in the customizer.		
$glaciers_hide_author_bio = get_theme_mod('glaciers_hide_author_bio', false);
$glaciers_featured_img_below = get_theme_mod('glaciers_featured_img_below', false);
$glaciers_post_style = apply_filters('glaciers_post_style', get_theme_mod('glaciers_post_style', 'classic-right'));
?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

	<?php if ('center' === $glaciers_post_style && false === $glaciers_featured_img_below || 'classic-right' === $glaciers_post_style || 'classic-left' === $glaciers_post_style) {
		glaciers_post_thumbnail();
	}
	?>

	<div class="single-inner">
		<header class="entry-header">

			<?php // Get the post title and meta
			glaciers_featured_badge();

			// Full post title
			the_title('<h1 class="entry-title">', '</h1>');
			?>
			<div class="entry-meta">
				<?php // Get post meta
				glaciers_posted_by();
				glaciers_first_category();
				glaciers_posted_on();
				glaciers_comment_link();
				?>
			</div>
		</header>

		<?php if ('center' === $glaciers_post_style && true === $glaciers_featured_img_below) {
			glaciers_post_thumbnail();
		}
		?>

		<div class="entry-content clearfix">
			<?php
			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>', 'glaciers'),
						array(
							'span' => array(
								'class' => array(),
							),
						)
					),
					wp_kses_post(get_the_title())
				)
			);

			// Multi-page navigation
			glaciers_multipage_pagination();
			?>
		</div><!-- .entry-content -->

		<?php
		// Action hook for any content placed after entry-content
		do_action('glaciers_after_post_entry_content');

		// Action hook for any content placed after author bio
		do_action('glaciers_before_author_bio');

		// Author bio.   
		if (false === $glaciers_hide_author_bio) {
			glaciers_author_post_bio_info();
		}

		// Action hook for any content placed after author bio
		do_action('glaciers_after_author_bio');
		?>

	</div><!-- single-inner -->
</article>