<?php
/**
 * @package somalite
 */

?>

<footer>
    <?php
        if(is_active_sidebar('footer-column1') || is_active_sidebar('footer-column2') || is_active_sidebar('footer-column3') || is_active_sidebar('footer-column4')){
            ?>
                <div id="soma-footer-section">
                    <div class="container">
                        <div class="row">                
                            <div class="footer-widgets-wrapper">
                                <?php get_sidebar( 'footer' ); ?>
                            </div>
                        </div>
                    </div>
                </div>
            <?php        
        }
    ?>    
    <div id="soma-footer-bottom">
        <div class="container">
            <div class="row">
            	<div class="col-md-12 col-sm-12">
                	<p class="soma-copyright">
                		<?php
	                        if("" != esc_html(get_theme_mod( 'sm_copyright_text'))) :
	                            echo esc_html(get_theme_mod( 'sm_copyright_text'));
	                            if(get_theme_mod('somalite_en_footer_credits',true)) :
	                                ?><span><?php esc_html_e(' | Theme by ','somalite') ?><a href="<?php echo esc_url(SOMALITE_THEME_AUTH); ?>" target="_blank" rel="nofollow noopener"><?php esc_html_e('Spiracle Themes','somalite') ?></a></span>
	                                <?php   
	                            endif;
	                        else :
	                            echo date_i18n(
	                                /* translators: Copyright date format, see https://secure.php.net/date */
	                                _x( 'Y', 'copyright date format', 'somalite' )
	                            );
	                            ?>
	                                <a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a>
	                                <span><?php esc_html_e(' | Theme by ','somalite') ?><a href="<?php echo esc_url(SOMALITE_THEME_AUTH); ?>" target="_blank" rel="nofollow noopener"><?php esc_html_e('Spiracle Themes','somalite') ?></a></span>
	                            <?php
	                        endif;
	                    ?>
                	</p>
                </div>                
            </div>
        </div>

    </div>
</footer>

<?php wp_footer(); ?>

</body>
</html>
