<?php

/**
 * This template displays page content
 * @link https://developer.wordpress.org/themes/basics/theme-functions/
 * @package Glaciers
 * @since 1.0.0
 */

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

// Is the option to hide the edit link activated in the customizer.
$glaciers_hide_edit = get_theme_mod('glaciers_hide_edit', false);

?>

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

	<div class="entry-content">
		<?php
		the_content();

		// Multi-page navigation
		glaciers_multipage_pagination();

		?>
	</div><!-- .entry-content -->

	<?php if (get_edit_post_link() && false === $glaciers_hide_edit) : ?>
		<footer class="entry-footer">
			<?php
			edit_post_link(
				sprintf(
					wp_kses(
						/* translators: %s: Name of current post. Only visible to screen readers */
						__('Edit <span class="screen-reader-text">%s</span>', 'glaciers'),
						array(
							'span' => array(
								'class' => array(),
							),
						)
					),
					wp_kses_post(get_the_title())
				),
				'<span class="edit-link">',
				'</span>'
			);
			?>
		</footer><!-- .entry-footer -->
	<?php endif; ?>
</article><!-- #post-<?php the_ID(); ?> -->