<?php
/**
 * The template for displaying the footer.
 *
 * Contains the closing of the #content div and all content after
 *
 * @package Pena Lite
 */

?>
	<?php if ( is_active_sidebar( 'footer-1' ) || is_active_sidebar( 'footer-2' ) || is_active_sidebar( 'footer-3' ) ) : ?>

	<div class="site-footer" role="complementary">

		<div class="hfeed site">

			<div class="content site-content">

				<div class="footer-widgets clear">

					<?php if ( is_active_sidebar( 'footer-1' ) ) : ?>

						<div class="widget-area">

							<?php dynamic_sidebar( 'footer-1' ); ?>

						</div><!-- .widget-area -->

					<?php endif; ?>

					<?php if ( is_active_sidebar( 'footer-2' ) ) : ?>

						<div class="widget-area">

							<?php dynamic_sidebar( 'footer-2' ); ?>

						</div><!-- .widget-area -->

					<?php endif; ?>

					<?php if ( is_active_sidebar( 'footer-3' ) ) : ?>

						<div class="widget-area">

							<?php dynamic_sidebar( 'footer-3' ); ?>

						</div><!-- .widget-area -->

				<?php endif; ?>

				</div><!-- .footer-widgets -->

			</div><!-- .site -->

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

	</footer><!-- #colophon -->
	<?php endif; ?>
	<?php if( get_theme_mod( 'hide_copyright' ) == '') { ?>
			<footer id="colophon" class="site-info" role="contentinfo">
				<div class="hfeed site">
					<div class="content site-content">
					<?php
			            if ( function_exists( 'the_privacy_policy_link' ) ) {
			            the_privacy_policy_link( '', '<span role="separator" aria-hidden="true">|</span>' );
			            }
		            ?>
		            <?php
			        /**
			        * Fires before the Pena Lite footer text for footer customization.
			        *
			        * @since Pena Lite 1.0
			        */
			        do_action( 'pena_lite_credits' );
		            ?>
		            <?php if(!get_theme_mod('pena_lite_copyright')) : ?>
		                <a href="<?php echo esc_url( esc_html__( 'https://www.anarieldesign.com/free-charity-wordpress-theme-pena/', 'pena-lite' ) ); ?>"><?php printf( esc_html__( 'Theme: %1$s', 'pena-lite' ), 'Pena Lite' ); ?></a>
		            <?php else: ?>
		                <?php esc_attr_e('&copy;', 'pena-lite'); ?>
		                <a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr(get_bloginfo('name', 'display')); ?>"> <?php echo esc_html( get_theme_mod( 'pena_lite_copyright', __( 'Built using Pena Lite Theme. Proudly powered by WordPress.', 'pena-lite' ) ) ); ?> </a>
		            <?php endif; ?>
					</div><!-- .content -->
				</div><!-- .site -->
			</footer><!-- .site-info -->
	    <?php } // end if ?>
		</div><!-- .inner-page -->
	</div><!-- .inner -->
	</div><!-- #content -->
<?php wp_footer(); ?>

</body>
</html>