<?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 podcastin
 */

?>
<?php
$podcastin_options = podcastin_theme_options();
$show_widgets = $podcastin_options['show_widgets'];
$fb_url = $podcastin_options['fb_url'];
$youtube_url = $podcastin_options['youtube_url'];

?>

	<footer id="colophon" class="site-footer">

		<?php if($show_widgets==1){?>
			<div class="prefooter">
			 	<div class="container">
		            <div class="row">
		            	<div class="col-md-12">
		                <?php if (is_active_sidebar('podcastin_footer_1')) : ?>
		                    <div class="col-md-4">
		                        <?php dynamic_sidebar('podcastin_footer_1') ?>
		                    </div>
		                    <?php
		                else: podcastin_blank_widget();
		                endif; ?>
		                <?php if (is_active_sidebar('podcastin_footer_2')) : ?>
		                    <div class="col-md-4">
		                        <?php dynamic_sidebar('podcastin_footer_2') ?>
		                    </div>
		                    <?php
		                else: podcastin_blank_widget();
		                endif; ?>
		                <?php if (is_active_sidebar('podcastin_footer_3')) : ?>
		                    <div class="col-md-4">
		                        <?php dynamic_sidebar('podcastin_footer_3') ?>
		                    </div>
		                    <?php
		                else: podcastin_blank_widget();
		                endif; ?>
		            	</div>
		        	</div>
		        </div>
	       </div>
		<?php } else { ?>

		<div class="footer-site-logo">
			<div class="container">
	            	<div class="row">
	            		<div class="col-md-12">
				<?php
				the_custom_logo(); ?>

					<h2 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h2>
			<?php
			    if ($fb_url || $youtube_url ): ?>
			    <div class="social-icons">
			        <?php if ($fb_url): ?>
			        <span><a target="_blank" href='<?php esc_html($fb_url) ?>'><i class="fa-brands fa-facebook"></i></a></span>
			        <?php endif;  ?>

			        
			         <?php if ($youtube_url): ?>
			        <span><a target="_blank" href='<?php esc_html($youtube_url) ?>'><i class="fa-brands fa-youtube"></i></a></span>
			        <?php endif;  ?>

			    </div>

			<?php endif;  ?>
		        		</div>
			     </div>
		     </div>
		</div><!-- .site-logo -->

		<?php } ?>

		<div class="site-info">
			<div class="container">
        			<div class="row">
        				<div class="col-md-12">

<p><?php esc_html_e('Powered By WordPress', 'podcastin');
                    esc_html_e(' | ', 'podcastin') ?>
                    <span><a target="_blank" href="https://themesartist.com/podcastin/"><?php esc_html_e('Podcastin' , 'podcastin'); ?></a></span>
                </p>
	    				</div>
	     		</div>
      		</div>
		</div><!-- .site-info -->
	</footer><!-- #colophon -->
</div><!-- #page -->

<?php wp_footer(); ?>

</body>
</html>
