<div class="container">
    <?php 
        $footer_col = '3_3_3_3';
        if( !empty( get_theme_mod( 'ft_widget_layout', '3_3_3_3' ) ) ){
            $footer_col = get_theme_mod( 'ft_widget_layout', '3_3_3_3' );
        }
        if ( is_active_sidebar( 'footer-1' ) || is_active_sidebar( 'footer-2' ) || is_active_sidebar( 'footer-3' ) || is_active_sidebar( 'footer-4' )) {
            echo '<div class="footer-widget-area">';
        }	
        
        if ( is_active_sidebar( 'footer-1' ) || is_active_sidebar( 'footer-2' ) || is_active_sidebar( 'footer-3' ) || is_active_sidebar( 'footer-4' ) ) {
            ?>
            <?php 
                if($footer_col == '3_3_3_3'){
            ?>
                <div class="row footer-widget-row">
                    <?php if ( is_active_sidebar( 'footer-1' ) ) : ?>
                        <div class="col-xs-12 col-sm-12 col-md-6 col-lg-6 col-xl-3">
                            <?php dynamic_sidebar( 'footer-1' ); ?>
                        </div><!-- .widget-area -->
                    <?php endif; ?>

                    <?php if ( is_active_sidebar( 'footer-2' ) ) : ?>
                        <div class="col-xs-12 col-sm-12 col-md-6 col-lg-6 col-xl-3">
                            <?php dynamic_sidebar( 'footer-2' ); ?>
                        </div><!-- .widget-area -->
                    <?php endif; ?>	

                    <?php if ( is_active_sidebar( 'footer-3' ) ) : ?>
                        <div class="col-xs-12 col-sm-12 col-md-6 col-lg-6 col-xl-3">
                            <?php dynamic_sidebar( 'footer-3' ); ?>
                        </div><!-- .widget-area -->
                    <?php endif; ?>

                    <?php if ( is_active_sidebar( 'footer-4' ) ) : ?>
                        <div class="col-xs-12 col-sm-12 col-md-6 col-lg-6 col-xl-3">
                            <?php dynamic_sidebar( 'footer-4' ); ?>
                        </div><!-- .widget-area -->
                    <?php endif; ?>
                    
                </div>
            <?php }else{ ?>
                <div class="row footer-widget-row">
                    <?php
                        $footer_col = explode('_', $footer_col);
                        if( is_array($footer_col) && count($footer_col)>0 ){
                            $i = 1;
                            foreach($footer_col as $col){
                            // ROW width class
                            $row_class = 'col-xs-12 col-sm-12 col-md-6 col-lg-'.$col;
                            if ( is_active_sidebar( 'footer-'.$i.'' ) ) : ?>
                                <div class="<?php echo esc_attr($row_class); ?> footer">
                                    <?php dynamic_sidebar( 'footer-'.$i.'' ); ?>
                                </div><!-- .widget-area -->
                            <?php endif;
                            $i++;
                            }
                        }
                    ?>
                </div>
            <?php } ?>
        <?php
        }
        if ( is_active_sidebar( 'footer-1' ) || is_active_sidebar( 'footer-2' ) || is_active_sidebar( 'footer-3' ) || is_active_sidebar( 'footer-4' )) {
            echo '</div>';
        }
    ?>
</div>

<?php 
if ( has_nav_menu( 'footer' ) && true === get_theme_mod( 'enable_footer_menu', true ) ){
    $newshit_center = 'copyright-inner';
}else{
    $newshit_center = 'copyright-inner justify-content-center';
}
?>
<div class="copyright-area">
    <div class="container">
        <div class="<?php echo esc_attr( $newshit_center ); ?>">

            <?php 
            /**
             * newshit_copyright_action
             */
            do_action( 'newshit_copyright_action' );
            ?>

            <?php if ( has_nav_menu( 'footer' ) && true === get_theme_mod( 'enable_footer_menu', true ) ) : ?>
                <div class="copyright-menu">
                    <?php
                        wp_nav_menu(
                            array(
                                'container' 		  => false,
                                'theme_location' 	=> 'footer',
                                'menu_id'        	=> 'footer-menu',
                                'fallback_cb'     => false,
                            )
                        );
                    ?>
                </div>
            <?php endif; ?>

        </div>
    </div>
</div>