<?php
/**
 * The template for displaying the footer.
 *
 * Contains the closing of the #content div and all content after.
 *
 * @package Newsxo
 */ ?>
<!-- </main> -->
<?php do_action('newsxo_action_footer_missed_section'); ?>
    <!--==================== FOOTER AREA ====================-->
    <?php $footer_bg_img = newsxo_get_option('newsxo_footer_bg_img');
    $newsxo_footer_overlay_color = get_theme_mod('newsxo_footer_overlay_color');
    if ( ! function_exists('get_footer_bg_img') ) {
        function get_footer_bg_img() {
            $img_id = newsxo_get_option('newsxo_footer_bg_img');
            if ($img_id) {
                return wp_get_attachment_url($img_id);
            }
            return '';
        }
    }

    $footer_bg_url = get_footer_bg_img();
    ?>

    <footer class="footer one<?php echo esc_attr($footer_bg_url ? ' back-img' : ''); ?>"
    <?php if($footer_bg_url) { ?> style="background-image:url('<?php echo esc_url($footer_bg_url); ?>');" <?php } ?>>
        <div class="overlay" style="background-color: <?php echo esc_html($newsxo_footer_overlay_color);?>;">
            <?php 
            do_action('newsxo_action_footer_widget_area');
            do_action('newsxo_action_footer_bottom_area'); 
            do_action('newsxo_action_footer_copyright');
            ?>
        </div>
        <!--/overlay-->
    </footer>
    <!--/footer-->
</div>
<!--/wrapper-->
<!--Scroll To Top-->
    <?php newsxo_scrolltoup(); 
    newsxo_side_menu_section(); 
    newsxo_search_popup(); ?>
<!--/Scroll To Top-->
<?php wp_footer(); ?>
</body>
</html>