<?php
/**
 * The template for displaying the footer
 * 
 * @package Purenote
 * 
 */

// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
    exit;
}
?>
    </div><!-- #content -->

    <?php
        /**
         * hook - purenote_before_colophon
         * 
         * 
         * @since 1.0.0
         */
        do_action( 'purenote_before_colophon' );

        // Check if either footer section is enabled before rendering <footer>
        $footer_main_enabled   = purenote_get_customizer_option_value( 'purenote_footer_main_enable' );
        $footer_bottom_enabled = purenote_get_customizer_option_value( 'purenote_footer_bottom_enable' );

        if ( $footer_main_enabled || $footer_bottom_enabled ) :
    ?>
            <footer id="colophon" class="site-footer" <?php purenote_schema_markup( 'footer' ); ?>>
                <?php
                    if ( $footer_main_enabled ) {
                        get_template_part( 'template-parts/partials/footer/widget', 'area' );
                    }

                    if ( $footer_bottom_enabled ) {
                        get_template_part( 'template-parts/footer/bottom', 'area' );
                    }
                ?>
            </footer><!-- #colophon -->
    <?php
        endif;

        /**
         * hook - purenote_after_colophon
         * 
         * 
         * @since 1.0.0
         */
        do_action( 'purenote_after_colophon' );
    ?>
</div><!-- #page -->

<?php
    /**
     * hook - purenote_after_page
     * 
     * 
     * @since 1.0.0
     */
    do_action( 'purenote_after_page' );
    wp_footer();
?>

</body>
</html>
