<?php
/**
 * wp-it-courses WordPress Theme, ordasvit.com
 * wp-it-courses is distributed under the terms of the GNU GPL
 * Copyright: 2023 OrdaSvit, Andrey Kvasnevskiy, ordasvit.com
 */
?>

<footer id="footer" class="site-footer">
	<div class="container">


		<div class="row">
			<div class="col-lg-12 col-sm-12 col-xs-12 wrapper-custom-logo-link">
				<?php

				if (function_exists('the_custom_logo')) {
					the_custom_logo();
				}

				?>
			</div>
		</div>

		<div class="row">

			<?php
			if (!wp_it_courses_show_position_preview("position_left_footer", 'col-md-3 col-sm-3 col-xs-12') && wp_it_courses_is_active_sidebar("position_left_footer")) { ?>
				<div class="<?php if (wp_it_courses_is_active_sidebar("position_right_footer") && wp_it_courses_is_active_sidebar("position_center_left_footer") && wp_it_courses_is_active_sidebar("position_center_right_footer")) {
					echo 'col-md-3 col-sm-3 col-xs-12';
				} else if (wp_it_courses_is_active_sidebar("position_right_footer") && wp_it_courses_is_active_sidebar("position_center_left_footer")) {
					echo ('col-lg-4 col-md-12 col-sm-12 col-xs-12');
				} else if (wp_it_courses_is_active_sidebar("position_right_footer") && wp_it_courses_is_active_sidebar("position_center_right_footer")) {
					echo ('col-lg-4 col-md-12 col-sm-12 col-xs-12');
				} else if (wp_it_courses_is_active_sidebar("position_center_left_footer") && wp_it_courses_is_active_sidebar("position_center_right_footer")) {
					echo ('col-lg-4 col-md-12 col-sm-12 col-xs-12');
				} else if (wp_it_courses_is_active_sidebar("position_right_footer") || wp_it_courses_is_active_sidebar("position_center_left_footer")) {
					echo ('col-md-6 col-sm-6 col-xs-12');
				} else if (wp_it_courses_is_active_sidebar("position_center_left_footer") || wp_it_courses_is_active_sidebar("position_center_right_footer")) {
					echo ('col-md-6 col-sm-6 col-xs-12');
				} else if (wp_it_courses_is_active_sidebar("position_right_footer") || wp_it_courses_is_active_sidebar("position_center_right_footer")) {
					echo ('col-md-6 col-sm-6 col-xs-12');
				} else if (wp_it_courses_is_active_sidebar("position_right_footer") || wp_it_courses_is_active_sidebar("position_center_left_footer") || wp_it_courses_is_active_sidebar("position_center_right_footer")) {
					echo ('col-md-6 col-sm-6 col-xs-12');
				} else {
					echo ('col-lg-12');
				} ?>">
					<?php if (function_exists('dynamic_sidebar'))
						dynamic_sidebar('position_left_footer'); ?>
				</div>
			<?php }
			; ?>

			<?php
			if (!wp_it_courses_show_position_preview("position_center_left_footer", 'col-md-3 col-sm-3 col-xs-12') && wp_it_courses_is_active_sidebar("position_center_left_footer")) { ?>
				<div class="<?php if (wp_it_courses_is_active_sidebar("position_right_footer") && wp_it_courses_is_active_sidebar("position_left_footer") && wp_it_courses_is_active_sidebar("position_center_right_footer")) {
					echo 'col-md-3 col-sm-3 col-xs-12';
				} else if (wp_it_courses_is_active_sidebar("position_right_footer") && wp_it_courses_is_active_sidebar("position_left_footer")) {
					echo ('col-lg-4 col-md-12 col-sm-12 col-xs-12');
				} else if (wp_it_courses_is_active_sidebar("position_right_footer") && wp_it_courses_is_active_sidebar("position_center_right_footer")) {
					echo ('col-lg-4 col-md-12 col-sm-12 col-xs-12');
				} else if (wp_it_courses_is_active_sidebar("position_left_footer") && wp_it_courses_is_active_sidebar("position_center_right_footer")) {
					echo ('col-lg-4 col-md-12 col-sm-12 col-xs-12');
				} else if (wp_it_courses_is_active_sidebar("position_right_footer") || wp_it_courses_is_active_sidebar("position_left_footer")) {
					echo ('col-md-6 col-sm-6 col-xs-12');
				} else if (wp_it_courses_is_active_sidebar("position_left_footer") || wp_it_courses_is_active_sidebar("position_center_right_footer")) {
					echo ('col-md-6 col-sm-6 col-xs-12');
				} else if (wp_it_courses_is_active_sidebar("position_right_footer") || wp_it_courses_is_active_sidebar("position_center_right_footer")) {
					echo ('col-md-6 col-sm-6 col-xs-12');
				} else if (wp_it_courses_is_active_sidebar("position_right_footer") || wp_it_courses_is_active_sidebar("position_left_footer") || wp_it_courses_is_active_sidebar("position_center_right_footer")) {
					echo ('col-md-6 col-sm-6 col-xs-12');
				} else {
					echo ('col-lg-12');
				} ?>">
					<?php if (function_exists('dynamic_sidebar'))
						dynamic_sidebar('position_center_left_footer'); ?>
				</div>
			<?php }
			; ?>

			<?php
			if (!wp_it_courses_show_position_preview("position_center_right_footer", 'col-md-3 col-sm-3 col-xs-12') && wp_it_courses_is_active_sidebar("position_center_right_footer")) { ?>
				<div class="<?php if (wp_it_courses_is_active_sidebar("position_right_footer") && wp_it_courses_is_active_sidebar("position_center_left_footer") && wp_it_courses_is_active_sidebar("position_left_footer")) {
					echo 'col-md-3 col-sm-3 col-xs-12';
				} else if (wp_it_courses_is_active_sidebar("position_right_footer") && wp_it_courses_is_active_sidebar("position_center_left_footer")) {
					echo ('col-lg-4 col-md-12 col-sm-12 col-xs-12');
				} else if (wp_it_courses_is_active_sidebar("position_right_footer") && wp_it_courses_is_active_sidebar("position_left_footer")) {
					echo ('col-lg-4 col-md-12 col-sm-12 col-xs-12');
				} else if (wp_it_courses_is_active_sidebar("position_center_left_footer") && wp_it_courses_is_active_sidebar("position_left_footer")) {
					echo ('col-lg-4 col-md-12 col-sm-12 col-xs-12');
				} else if (wp_it_courses_is_active_sidebar("position_right_footer") || wp_it_courses_is_active_sidebar("position_center_left_footer")) {
					echo ('col-md-6 col-sm-6 col-xs-12');
				} else if (wp_it_courses_is_active_sidebar("position_center_left_footer") || wp_it_courses_is_active_sidebar("position_left_footer")) {
					echo ('col-md-6 col-sm-6 col-xs-12');
				} else if (wp_it_courses_is_active_sidebar("position_right_footer") || wp_it_courses_is_active_sidebar("position_left_footer")) {
					echo ('col-md-6 col-sm-6 col-xs-12');
				} else if (wp_it_courses_is_active_sidebar("position_right_footer") || wp_it_courses_is_active_sidebar("position_center_left_footer") || wp_it_courses_is_active_sidebar("position_left_footer")) {
					echo ('col-md-6 col-sm-6 col-xs-12');
				} else {
					echo ('col-lg-12');
				} ?>">
					<?php if (function_exists('dynamic_sidebar'))
						dynamic_sidebar('position_center_right_footer'); ?>
				</div>
			<?php }
			; ?>

			<?php
			if (!wp_it_courses_show_position_preview("position_right_footer", 'col-md-3 col-sm-3 col-xs-12') && wp_it_courses_is_active_sidebar("position_right_footer")) { ?>
				<div class="<?php if (wp_it_courses_is_active_sidebar("position_left_footer") && wp_it_courses_is_active_sidebar("position_center_left_footer") && wp_it_courses_is_active_sidebar("position_center_right_footer")) {
					echo 'col-md-3 col-sm-3 col-xs-12';
				} else if (wp_it_courses_is_active_sidebar("position_left_footer") && wp_it_courses_is_active_sidebar("position_center_left_footer")) {
					echo ('col-lg-4 col-md-12 col-sm-12 col-xs-12');
				} else if (wp_it_courses_is_active_sidebar("position_left_footer") && wp_it_courses_is_active_sidebar("position_center_right_footer")) {
					echo ('col-lg-4 col-md-12 col-sm-12 col-xs-12');
				} else if (wp_it_courses_is_active_sidebar("position_center_left_footer") && wp_it_courses_is_active_sidebar("position_center_right_footer")) {
					echo ('col-lg-4 col-md-12 col-sm-12 col-xs-12');
				} else if (wp_it_courses_is_active_sidebar("position_left_footer") || wp_it_courses_is_active_sidebar("position_center_left_footer")) {
					echo ('col-md-6 col-sm-6 col-xs-12');
				} else if (wp_it_courses_is_active_sidebar("position_center_left_footer") || wp_it_courses_is_active_sidebar("position_center_right_footer")) {
					echo ('col-md-6 col-sm-6 col-xs-12');
				} else if (wp_it_courses_is_active_sidebar("position_left_footer") || wp_it_courses_is_active_sidebar("position_center_right_footer")) {
					echo ('col-md-6 col-sm-6 col-xs-12');
				} else if (wp_it_courses_is_active_sidebar("position_left_footer") || wp_it_courses_is_active_sidebar("position_center_left_footer") || wp_it_courses_is_active_sidebar("position_center_right_footer")) {
					echo ('col-md-6 col-sm-6 col-xs-12');
				} else {
					echo ('col-lg-12');
				} ?>">
					<?php if (function_exists('dynamic_sidebar'))
						dynamic_sidebar('position_right_footer'); ?>
				</div>
			<?php }
			; ?>

		</div>

		<div class="row">
			<div class="col-lg-12 col-sm-12 col-xs-12">
				<div class="soc_links">
					<ul>
						<?php if (get_theme_mod("wp_it_courses_social_links_facebook")) { ?>
							<li><a target=_blank class="facebook fab fa-facebook"
									href='<?php echo wp_it_courses_sanitize_url(get_theme_mod("wp_it_courses_social_links_facebook")); ?>'></a>
							</li>
						<?php } ?>
						<?php if (get_theme_mod("wp_it_courses_social_links_twitter")) { ?>
							<li><a target=_blank class="twitter fab fa-twitter"
									href='<?php echo wp_it_courses_sanitize_url(get_theme_mod("wp_it_courses_social_links_twitter")); ?>'></a>
							</li>
						<?php } ?>
						<?php if (get_theme_mod("wp_it_courses_social_links_skype")) { ?>
							<li><a target=_blank class="skype fab fa-skype"
									href='<?php echo wp_it_courses_sanitize_url(get_theme_mod("wp_it_courses_social_links_skype")); ?>'></a>
							</li>
						<?php } ?>
						<?php if (get_theme_mod("wp_it_courses_social_links_dribbble")) { ?>
							<li><a target=_blank class="dribbble fab fa-dribbble"
									href='<?php echo wp_it_courses_sanitize_url(get_theme_mod("wp_it_courses_social_links_dribbble")); ?>'></a>
							</li>
						<?php } ?>
						<?php if (get_theme_mod("wp_it_courses_social_links_vimeo")) { ?>
							<li><a target=_blank class="vimeo fab fa-vimeo-square"
									href='<?php echo wp_it_courses_sanitize_url(get_theme_mod("wp_it_courses_social_links_vimeo")); ?>'></a>
							</li>
						<?php } ?>
						<?php if (get_theme_mod("wp_it_courses_social_links_flickr")) { ?>
							<li><a target=_blank class="vimeo fab fa-flickr"
									href='<?php echo wp_it_courses_sanitize_url(get_theme_mod("wp_it_courses_social_links_flickr")); ?>'></a>
							</li>
						<?php } ?>
						<?php if (get_theme_mod("wp_it_courses_social_links_youtube_play")) { ?>
							<li><a target=_blank class="vimeo fab fa-youtube"
									href='<?php echo wp_it_courses_sanitize_url(get_theme_mod("wp_it_courses_social_links_youtube_play")); ?>'></a>
							</li>
						<?php } ?>
						<?php if (get_theme_mod("wp_it_courses_social_links_instagram")) { ?>
							<li><a target=_blank class="vimeo fab fa-instagram"
									href='<?php echo wp_it_courses_sanitize_url(get_theme_mod("wp_it_courses_social_links_instagram")); ?>'></a>
							</li>
						<?php } ?>
						<?php if (get_theme_mod("wp_it_courses_social_links_linkedin")) { ?>
							<li><a target=_blank class="vimeo fab fa-linkedin"
									href='<?php echo wp_it_courses_sanitize_url(get_theme_mod("wp_it_courses_social_links_linkedin")); ?>'></a>
							</li>
						<?php } ?>
					</ul>
				</div>
			</div>
			<div class="col-xs-12 col-lg-12">
				<div id="copyright">
					<?php if( (get_theme_mod("wp_it_courses_copyright_link")) && (get_theme_mod("wp_it_courses_copyright")) ) { ?>
						<a target="blank" class="copyright"  
							title="<?php echo sanitize_text_field(get_theme_mod("wp_it_courses_copyright")); ?>" 
							href='<?php echo wp_it_courses_sanitize_url(get_theme_mod("wp_it_courses_copyright_link")); ?>'>
							<?php echo sanitize_text_field(get_theme_mod("wp_it_courses_copyright")); ?>
						</a>
					<?php } ?>
					<?php if( (!get_theme_mod("wp_it_courses_copyright_link")) && (get_theme_mod("wp_it_courses_copyright")) ) { ?>
						<p>
							<?php echo sanitize_text_field(get_theme_mod("wp_it_courses_copyright")); ?>
						</p>
					<?php } ?>
					<?php if( (get_theme_mod("wp_it_courses_copyright_link")) && (!get_theme_mod("wp_it_courses_copyright")) ) { ?>
						<a target="blank" class="copyright" 
							href='<?php echo wp_it_courses_sanitize_url(get_theme_mod("wp_it_courses_copyright_link")); ?>'></a>
					<?php } ?>
				</div>
			</div>

		</div>


		<div class="container">
			<?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('Block')) { ?>

			<?php } ?>
		</div>


	</div>
</footer><!-- #colophon -->
</div><!-- #page -->

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

</html>