<?php

// Prevent Direct Access
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

$clients_suptitle = get_theme_mod('clients_suptitle');
$clients_title = get_theme_mod('clients_title');
$clients = get_theme_mod('clients', array());
$section_id = get_theme_mod('clients_menu_id', 'clients');
?>

<div id="<?php echo $section_id ?>" class="padding">
	<div class="container">
	
		<?php if( $clients_title != '' || $clients_suptitle != '' ){ ?>
		<div class="col-md-12 col-sm-12 text-center title_block heading_space">
			<?php
			if( $clients_suptitle != '' ){ echo '<p class="title bottom0">'.$clients_suptitle.'</p>'; }
			if( $clients_title != '' ){ echo '<h2 class="darkcolor">'.$clients_title.'</h2>'; }
			?>
		</div>
		<?php } ?>

		<?php if( $clients ){ ?>
		<div class="col-md-12 col-sm-12">
			<div class="partners">
				<div class="swiper-container">
					<div class="swiper-wrapper">
						
						<?php
						foreach ($clients as $client){
							if($client['image']){
						?>
						<div class="swiper-slide">
							<div class="image">
							
								<?php if($client['link']){ echo '<a href="'.$client['link'].'">'; } ?>
								
								<img src="<?php echo wp_get_attachment_url($client['image']) ?>" alt="<?php echo $client['title'] ?>" title="<?php echo $client['title'] ?>">
								
								<?php if($client['link']){ echo '</a>'; } ?>
								
							</div>
						</div>
						<?php
							}
						}
						?>
						
					</div>
				</div>
			</div>
		</div>
		<?php } ?>
		
	</div>
</div>