<?php
/**
* The template for displaying the footer
*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package GridFlex WordPress Theme
* @copyright Copyright (C) 2024 ThemesDNA
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later
* @author ThemesDNA <themesdna@gmail.com>
*/
?>

</div>

</div><!--/#gridflex-content-wrapper -->
</div><!--/#gridflex-wrapper -->

<?php gridflex_bottom_wide_widgets(); ?>

<?php gridflex_before_footer(); ?>

<?php if ( !(gridflex_hide_footer_widgets()) ) { ?>
<?php if ( is_active_sidebar( 'gridflex-footer-1' ) || is_active_sidebar( 'gridflex-footer-2' ) || is_active_sidebar( 'gridflex-footer-3' ) || is_active_sidebar( 'gridflex-footer-4' ) || is_active_sidebar( 'gridflex-footer-5' ) || is_active_sidebar( 'gridflex-top-footer' ) || is_active_sidebar( 'gridflex-bottom-footer' ) ) : ?>
<div class='gridflex-clearfix' id='gridflex-footer-blocks' itemscope='itemscope' itemtype='http://schema.org/WPFooter' role='contentinfo'>
<div class='gridflex-container gridflex-clearfix'>
<div class="gridflex-outer-wrapper">

<?php if ( is_active_sidebar( 'gridflex-top-footer' ) ) : ?>
<div class='gridflex-clearfix'>
<div class='gridflex-top-footer-block'>
<?php dynamic_sidebar( 'gridflex-top-footer' ); ?>
</div>
</div>
<?php endif; ?>

<?php if ( is_active_sidebar( 'gridflex-footer-1' ) || is_active_sidebar( 'gridflex-footer-2' ) || is_active_sidebar( 'gridflex-footer-3' ) || is_active_sidebar( 'gridflex-footer-4' ) || is_active_sidebar( 'gridflex-footer-5' ) ) : ?>
<div class='gridflex-footer-block-cols gridflex-clearfix'>

<div class="gridflex-footer-block-col gridflex-footer-5-col" id="gridflex-footer-block-1">
<?php dynamic_sidebar( 'gridflex-footer-1' ); ?>
</div>

<div class="gridflex-footer-block-col gridflex-footer-5-col" id="gridflex-footer-block-2">
<?php dynamic_sidebar( 'gridflex-footer-2' ); ?>
</div>

<div class="gridflex-footer-block-col gridflex-footer-5-col" id="gridflex-footer-block-3">
<?php dynamic_sidebar( 'gridflex-footer-3' ); ?>
</div>

<div class="gridflex-footer-block-col gridflex-footer-5-col" id="gridflex-footer-block-4">
<?php dynamic_sidebar( 'gridflex-footer-4' ); ?>
</div>

<div class="gridflex-footer-block-col gridflex-footer-5-col" id="gridflex-footer-block-5">
<?php dynamic_sidebar( 'gridflex-footer-5' ); ?>
</div>

</div>
<?php endif; ?>

<?php if ( is_active_sidebar( 'gridflex-bottom-footer' ) ) : ?>
<div class='gridflex-clearfix'>
<div class='gridflex-bottom-footer-block'>
<?php dynamic_sidebar( 'gridflex-bottom-footer' ); ?>
</div>
</div>
<?php endif; ?>

</div>
</div>
</div><!--/#gridflex-footer-blocks-->
<?php endif; ?>
<?php } ?>

<div class='gridflex-clearfix' id='gridflex-copyright-area'>
<div class='gridflex-copyright-area-inside gridflex-container'>
<div class="gridflex-outer-wrapper">

<div class='gridflex-copyright-area-inside-content gridflex-clearfix'>
<?php if ( gridflex_get_option('footer_text') ) : ?>
  <p class='gridflex-copyright'><?php echo wp_kses_post( force_balance_tags( gridflex_get_option('footer_text') ) ); ?></p>
<?php else : ?>
  <p class='gridflex-copyright'><?php /* translators: %s: Year and site name. */ printf( esc_html__( 'Copyright &copy; %s', 'gridflex' ), esc_html(date_i18n(__('Y','gridflex'))) . ' ' . esc_html(get_bloginfo( 'name' ))  ); ?></p>
<?php endif; ?>
<p class='gridflex-credit'><a href="<?php echo esc_url( 'https://themesdna.com/' ); ?>"><?php /* translators: %s: Theme author. */ printf( esc_html__( 'Design by %s', 'gridflex' ), 'ThemesDNA.com' ); ?></a></p>
</div>

</div>
</div>
</div><!--/#gridflex-copyright-area -->

<?php gridflex_after_footer(); ?>

</div>

<?php if ( gridflex_is_backtotop_active() ) { ?><button class="gridflex-scroll-top" title="<?php esc_attr_e('Scroll to Top','gridflex'); ?>"><i class="fas fa-arrow-up" aria-hidden="true"></i><span class="gridflex-sr-only"><?php esc_html_e('Scroll to Top', 'gridflex'); ?></span></button><?php } ?>

<?php wp_footer(); ?>
</body>
</html>