<?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 celebshine
 */

		if( class_exists( 'ReduxFramework' ) && function_exists( 'loadmore_postSC' ) ) {
			$celebshine_options = get_option( 'celebshine_options' );
			$footer_style = isset( $_GET['footer_style'] ) ? sanitize_text_field( $_GET['footer_style'] ) : '';

			if( $footer_style == 1 ){
				get_template_part( 'template-parts/footer/footer', 'one' );
			}elseif( $footer_style == 2 ){
				get_template_part( 'template-parts/footer/footer', 'two' );
			}elseif( $footer_style == 3 ){
				get_template_part( 'template-parts/footer/footer', 'three' );
			}elseif( $celebshine_options['footer-style'] == "footer-style-1" ){
				get_template_part( 'template-parts/footer/footer', 'one' );
			}elseif( $celebshine_options['footer-style'] == "footer-style-2" ){
				get_template_part( 'template-parts/footer/footer', 'two' );
			}elseif( $celebshine_options['footer-style'] == "footer-style-3" ){
				get_template_part( 'template-parts/footer/footer', 'three' );
			}else{
				get_template_part( 'template-parts/footer/footer', 'main' );
			}

		} else{
			get_template_part( 'template-parts/footer/footer', 'main' );
		} ?>	
	</div><!-- #page -->
</div><!-- #viewport -->
<?php
if( class_exists( 'ReduxFramework' ) && function_exists( 'loadmore_postSC' ) ) {
	$celebshine_options = get_option( 'celebshine_options' );

	if ( $celebshine_options['opt-backtotop'] == 1 ) {
		if( ! empty( $celebshine_options['backtotop-img']['url'] ) && $celebshine_options['backtotop-de-img'] == 0 ){ ?>
			<a class="section-back-to-top back-to-top-img" id="section-top" href="javascript:void(0);">
				<img class="img-fluid logo" src="<?php echo esc_url( $celebshine_options['backtotop-img']['url'] ); ?>" alt="<?php esc_attr_e( 'Top', 'celebshine' ); ?>">
			</a>
			<?php
		} else { ?>
				<div class="back-to-top">
					<svg class="progress-circle svg-content" width="100%" height="100%" viewBox="-1 -1 102 102">
						<path d="M50,1 a49,49 0 0,1 0,98 a49,49 0 0,1 0,-98"/>
					</svg>
				</div>
			<?php
		}
	}
} else {
	?>
	<div class="back-to-top">
		<svg class="progress-circle svg-content" width="100%" height="100%" viewBox="-1 -1 102 102">
			<path d="M50,1 a49,49 0 0,1 0,98 a49,49 0 0,1 0,-98"/>
		</svg>
	</div>
	<?php
}

get_template_part( 'inc/core/subscribe-popup' );
wp_footer();

?>
</body>
</html>
