<?php 
global $elonissa_fn_option;


// top part
$text__html		= elonissa_fn_footer_text();


// magic cursor options
$magic_cursor 		= array();
if(isset($elonissa_fn_option['magic_cursor'])){
	$magic_cursor 	= $elonissa_fn_option['magic_cursor'];
}
$mcursor__count		= 0;
$mcursor__default 	= 'no';
$mcursor__link 		= 'no';
$mcursor__slider 	= 'no';
if(!empty($magic_cursor)){
	$mcursor__count = count($magic_cursor);
	foreach($magic_cursor as $key => $value) {
		if($value == 'default'){$mcursor__default 	= 'yes';}
		if($value == 'link'){$mcursor__link 		= 'yes';}
		if($value == 'slider'){$mcursor__slider 	= 'yes';}
	}
}
if(isset($_GET['remove_mcursor'])){
	$mcursor__count = 0;
}


// footer menu
$menu__html		= '';
if(has_nav_menu('footer_menu')){$menu__html = '<div class="footer_menu">'. wp_nav_menu( array('theme_location'  => 'footer_menu','menu_class' => 'footer_nav', 'echo' => false) ) . '</div>';}

// footer logo
$footer_logo = get_template_directory_uri() .'/assets/img/footer-logo.png';
$footer_logo = get_theme_mod( 'footer_logo', $footer_logo );

// footer instagram
$footer_instagram = elonissa_fn_footer_instagram();

?>


		</div>
		<!-- All content without footer ends here -->

		<!-- Footer starts here-->
		<footer class="elonissa_fn_footer">
		
		
			<!-- Footer Instagram -->
			<?php echo wp_kses($footer_instagram, 'post'); ?>
			<!-- /Footer Instagram -->
			
			
			<div class="footer_content">
				<div class="fn-container">
					<div class="footer_bottom">
						<div class="footer_logo">
							<a href="<?php echo esc_url(home_url('/')); ?>">
								<img src="<?php echo esc_url($footer_logo);?>" alt="" />
							</a>
						</div>
						<?php echo wp_kses($menu__html, 'post'); ?>						
						<?php echo wp_kses($text__html, 'post'); ?>	
					</div>
				</div>
			</div>
			
			
		</footer>
		<!-- Footer ends here-->		
			
	</div>
	<!-- All website content ends here -->
	
	<?php if($mcursor__count > 0){ ?>
	<div class="codernelson-cursor cursor-outer" data-default="<?php echo esc_attr($mcursor__default);?>" data-link="<?php echo esc_attr($mcursor__link);?>" data-slider="<?php echo esc_attr($mcursor__slider);?>"><span class="fn-cursor"></span></div>
	<div class="codernelson-cursor cursor-inner" data-default="<?php echo esc_attr($mcursor__default);?>" data-link="<?php echo esc_attr($mcursor__link);?>" data-slider="<?php echo esc_attr($mcursor__slider);?>"><span class="fn-cursor"><span class="fn-left"></span><span class="fn-right"></span></span></div>
	<?php } ?>

</div>
<!-- HTML ends here -->


<?php wp_footer(); ?>
</body>
</html>