<?php

/**
 * The template for displaying the footer
 * Contains the closing of the #content div and all content after.
 * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
 * @package Glaciers
 * @since 1.0.0
 */

if (!defined('ABSPATH')) {
	exit; // Exit if accessed directly.
}
$glaciers_hide_backtotop = apply_filters('glaciers_hide_backtotop', get_theme_mod('glaciers_hide_backtotop', false));
?>


<?php if (!is_page_template('elementor_header_footer')) { ?>
	</section><!-- #content -->
<?php
} ?>

</main><!-- #main -->


<?php // Action hook for any content placed before the bottom sidebar
do_action('glaciers_before_bottom_sidebar');

// Get the bottom sidebar group
get_template_part('template-parts/sidebars/sidebar', 'bottom');

// Action hook for any content placed after the bottom sidebar
do_action('glaciers_after_bottom_sidebar');

// Action hook for the footer layout
do_action('glaciers_footer');
?>

</div><!-- #page -->


<?php if (false === $glaciers_hide_backtotop) { ?>
	<!-- Back to top button -->
	<button type="button" id="back-to-top" aria-label="<?php get_theme_mod('glaciers_back_to_top_text', esc_attr_e('Back To Top', 'glaciers')); ?>">
		<?php glaciers_theme_svg('arrow-up'); ?>
		<?php echo '<span class="visually-hidden">' . get_theme_mod('glaciers_back_to_top_text', esc_html__('Back To Top', 'glaciers')) . '</span>'; ?>
	</button>
<?php } ?>

<?php wp_footer(); ?>

</body>

</html>