<?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 Edumodo
 */
    $edumodo_footer_layout_style = edumodo_get_theme_mod('edumodo_section_footer_layout_select', 'layout-1');
    $edumodo_enable_footer_column = edumodo_get_theme_mod('edumodo_section_footer_column', 'column-4');
    $edumodo_enable_footer_bottom_social = edumodo_get_theme_mod('edumodo_section_footer_social_enable', 'on');
    $edumodo_enable_footer_bottom = edumodo_get_theme_mod('edumodo_section_footer_bottom_trigger', 'on');
    $edumodo_change_copyright = edumodo_get_theme_mod('edumodo_section_footer_change_copyright', 'off');
    $edumodo_copyright_text = edumodo_get_theme_mod('edumodo_section_footer_copyright_text', '');
    $edumodo_change_credit = edumodo_get_theme_mod('edumodo_section_footer_change_credit', 'off');
    $edumodo_change_credit_text = edumodo_get_theme_mod('edumodo_section_footer_credit_text', '');
    $edumodo_change_credit_url = edumodo_get_theme_mod('edumodo_section_footer_credit_url', '');

?>
    <div id="footer-<?php echo $edumodo_footer_layout_style; ?>">
        <?php
            switch ( $edumodo_enable_footer_column ) {

                case 'column-1':
                    get_template_part( 'template-parts/footer/column', 'one' );
                    break;

                case 'column-2':
                    get_template_part( 'template-parts/footer/column', 'two' );
                    break;

                case 'column-3':
                    get_template_part( 'template-parts/footer/column', 'three' );
                    break;

                case 'column-4':
                    get_template_part( 'template-parts/footer/column', 'four' );
                    break;

                default:
                    get_template_part( 'template-parts/footer/column', 'four' );
            }
        ?>
        <?php if ('on' == $edumodo_enable_footer_bottom_social ):?>
        <div id="footer-middle" class="footer-middle">
            <div class="container">
                    <div class="col-md-12 text-center footer-middle-row">
                        <?php echo apply_filters('edumodo-social', 'edumodo-footer-social');?>
                    </div>
                </div>
            </div>
        <?php endif; ?>

        

        <div id="copyright" class="copyright">
            <div class="container">
                <div class="row">
                    <div class="col-md-12 text-center">
                        <div class="edumodo-credit-wrapper">

                            <?php 
                                if('on'==$edumodo_change_copyright):
                                    echo apply_filters('edumodo-copyright', $edumodo_copyright_text);
                                else:
                                    echo do_action('edumodo-copyright');
                                endif;
                            ?>
                            <?php 
                                if('on'==$edumodo_change_credit):
                                    echo apply_filters('edumodo-credit', $edumodo_change_credit_text, $edumodo_change_credit_url);
                                else:
                                    echo do_action('edumodo-credit');
                                endif;
                            ?>

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