<?php
$bosa_travel_agency_blog_teams_one = get_theme_mod( 'bosa_travel_agency_blog_teams_one','');
$bosa_travel_agency_blog_teams_one_name = get_theme_mod( 'bosa_travel_agency_blog_teams_one_name', '');
$bosa_travel_agency_blog_teams_one_title = get_theme_mod( 'bosa_travel_agency_blog_teams_one_title','');
$bosa_travel_agency_blog_teams_two = get_theme_mod( 'bosa_travel_agency_blog_teams_two','');
$bosa_travel_agency_blog_teams_two_name = get_theme_mod( 'bosa_travel_agency_blog_teams_two_name', '');
$bosa_travel_agency_blog_teams_two_title = get_theme_mod( 'bosa_travel_agency_blog_teams_two_title','');
$bosa_travel_agency_blog_teams_three = get_theme_mod( 'bosa_travel_agency_blog_teams_three','');
$bosa_travel_agency_blog_teams_three_name = get_theme_mod( 'bosa_travel_agency_blog_teams_three_name', '');
$bosa_travel_agency_blog_teams_three_title = get_theme_mod( 'bosa_travel_agency_blog_teams_three_title','');
$bosa_travel_agency_blog_teams_four = get_theme_mod( 'bosa_travel_agency_blog_teams_four','');
$bosa_travel_agency_blog_teams_four_name = get_theme_mod( 'bosa_travel_agency_blog_teams_four_name', '');
$bosa_travel_agency_blog_teams_four_title = get_theme_mod( 'bosa_travel_agency_blog_teams_four_title','');
$bosa_travel_agency_blog_teams_five = get_theme_mod( 'bosa_travel_agency_blog_teams_five','');
$bosa_travel_agency_blog_teams_five_name = get_theme_mod( 'bosa_travel_agency_blog_teams_five_name', '');
$bosa_travel_agency_blog_teams_five_title = get_theme_mod( 'bosa_travel_agency_blog_teams_five_title','');
$bosa_travel_agency_blog_teams_six = get_theme_mod( 'bosa_travel_agency_blog_teams_six','');
$bosa_travel_agency_blog_teams_six_name = get_theme_mod( 'bosa_travel_agency_blog_teams_six_name', '');
$bosa_travel_agency_blog_teams_six_title = get_theme_mod( 'bosa_travel_agency_blog_teams_six_title','');       


$bosa_travel_agency_Advert_array = array();
$bosa_travel_agency_has_Advert = false;
$bosa_travel_agency_has_label = false;
if( !empty( $bosa_travel_agency_blog_teams_one ) || !empty( $bosa_travel_agency_blog_teams_one_name ) || !empty( $bosa_travel_agency_blog_teams_one_title ) ){
	$bosa_travel_agency_blog_teams_one  = wp_get_attachment_image_src( $bosa_travel_agency_blog_teams_one,'bosa-travel-agency-590-310');
 	if ( is_array(  $bosa_travel_agency_blog_teams_one ) ){
 		$bosa_travel_agency_has_Advert = true;
 		$bosa_travel_agency_has_label = true;
   	 	$bosa_travel_agency_blog_teamss_one = $bosa_travel_agency_blog_teams_one[0];
   	 	$bosa_travel_agency_Advert_array['image_one'] = array(
			'ID' => $bosa_travel_agency_blog_teamss_one,
			'name' => $bosa_travel_agency_blog_teams_one_name,
			'title' => $bosa_travel_agency_blog_teams_one_title,
		);	
  	}
}
if( !empty( $bosa_travel_agency_blog_teams_two ) || !empty( $bosa_travel_agency_blog_teams_two_name ) || !empty( $bosa_travel_agency_blog_teams_two_title ) ){
	$bosa_travel_agency_blog_teams_two  = wp_get_attachment_image_src( $bosa_travel_agency_blog_teams_two,'bosa-travel-agency-590-310');
 	if ( is_array(  $bosa_travel_agency_blog_teams_two ) ){
 		$bosa_travel_agency_has_Advert = true;
 		$bosa_travel_agency_has_label = true;
   	 	$bosa_travel_agency_blog_teamss_two = $bosa_travel_agency_blog_teams_two[0];
   	 	$bosa_travel_agency_Advert_array['image_two'] = array(
			'ID' => $bosa_travel_agency_blog_teamss_two,
			'name' => $bosa_travel_agency_blog_teams_two_name,
			'title' => $bosa_travel_agency_blog_teams_two_title,
		);	
  	}
}
if( !empty( $bosa_travel_agency_blog_teams_three ) || !empty( $bosa_travel_agency_blog_teams_three_name ) || !empty( $bosa_travel_agency_blog_teams_three_title ) ){
	$bosa_travel_agency_blog_teams_three  = wp_get_attachment_image_src( $bosa_travel_agency_blog_teams_three,'bosa-travel-agency-590-310');
 	if ( is_array(  $bosa_travel_agency_blog_teams_three ) ){
 		$bosa_travel_agency_has_Advert = true;
 		$bosa_travel_agency_has_label = true;
   	 	$bosa_travel_agency_blog_teamss_three = $bosa_travel_agency_blog_teams_three[0];
   	 	$bosa_travel_agency_Advert_array['image_three'] = array(
			'ID' => $bosa_travel_agency_blog_teamss_three,
			'name' => $bosa_travel_agency_blog_teams_three_name,
			'title' => $bosa_travel_agency_blog_teams_three_title,
		);	
  	}
}
if( !empty( $bosa_travel_agency_blog_teams_four ) || !empty( $bosa_travel_agency_blog_teams_four_name ) || !empty( $bosa_travel_agency_blog_teams_four_title ) ){
	$bosa_travel_agency_blog_teams_four  = wp_get_attachment_image_src( $bosa_travel_agency_blog_teams_four,'bosa-travel-agency-590-310');
 	if ( is_array(  $bosa_travel_agency_blog_teams_four ) ){
 		$bosa_travel_agency_has_Advert = true;
 		$bosa_travel_agency_has_label = true;
   	 	$bosa_travel_agency_blog_teamss_four = $bosa_travel_agency_blog_teams_four[0];
   	 	$bosa_travel_agency_Advert_array['image_four'] = array(
			'ID' => $bosa_travel_agency_blog_teamss_four,
			'name' => $bosa_travel_agency_blog_teams_four_name,
			'title' => $bosa_travel_agency_blog_teams_four_title,
		);	
  	}
}
if( !empty( $bosa_travel_agency_blog_teams_five ) || !empty( $bosa_travel_agency_blog_teams_five_name ) || !empty( $bosa_travel_agency_blog_teams_five_title ) ){
	$bosa_travel_agency_blog_teams_five  = wp_get_attachment_image_src( $bosa_travel_agency_blog_teams_five,'bosa-travel-agency-590-310');
 	if ( is_array(  $bosa_travel_agency_blog_teams_five ) ){
 		$bosa_travel_agency_has_Advert = true;
 		$bosa_travel_agency_has_label = true;
   	 	$bosa_travel_agency_blog_teamss_five = $bosa_travel_agency_blog_teams_five[0];
   	 	$bosa_travel_agency_Advert_array['image_five'] = array(
			'ID' => $bosa_travel_agency_blog_teamss_five,
			'name' => $bosa_travel_agency_blog_teams_five_name,
			'title' => $bosa_travel_agency_blog_teams_five_title,
		);	
  	}
}
if( !empty( $bosa_travel_agency_blog_teams_six ) || !empty( $bosa_travel_agency_blog_teams_six_name ) || !empty( $bosa_travel_agency_blog_teams_six_title ) ){
	$bosa_travel_agency_blog_teams_six  = wp_get_attachment_image_src( $bosa_travel_agency_blog_teams_six,'bosa-travel-agency-590-310');
 	if ( is_array(  $bosa_travel_agency_blog_teams_six ) ){
 		$bosa_travel_agency_has_Advert = true;
 		$bosa_travel_agency_has_label = true;
   	 	$bosa_travel_agency_blog_teamss_six = $bosa_travel_agency_blog_teams_six[0];
   	 	$bosa_travel_agency_Advert_array['image_six'] = array(
			'ID' => $bosa_travel_agency_blog_teamss_six,
			'name' => $bosa_travel_agency_blog_teams_six_name,
			'title' => $bosa_travel_agency_blog_teams_six_title,
		);	
  	}
}

if( !get_theme_mod( 'bosa_travel_agency_disable_teams_section', true ) && $bosa_travel_agency_has_Advert && $bosa_travel_agency_has_label ){ ?>
	<section class="section-teams-area">
		<div class="content-wrap">
			<div class="row justify-content-center">
				<?php foreach( $bosa_travel_agency_Advert_array as $bosa_travel_agency_each_Advert ){ ?>
					<div class="col-sm-6 col-md-4">
						<article class="teams-content-wrap">
							<figure class= "featured-image">
								<img src="<?php echo esc_url( $bosa_travel_agency_each_Advert['ID'] ); ?>">
							</figure>
							<?php if( !empty( $bosa_travel_agency_each_Advert['name'] ) || !empty( $bosa_travel_agency_each_Advert['title'] ) ) { ?>
									<div class="overlay-txt">
										<h4 class="team-name">
										<?php echo esc_html( $bosa_travel_agency_each_Advert['name'] ); ?>
										</h4>
										<h6 class="team-title">
											<?php echo esc_html( $bosa_travel_agency_each_Advert['title'] ); ?>
										</h6>	
									</div>
								<?php } ?>
						</article>
					</div>
				<?php } ?>
			</div>	
		</div>
	</section>
<?php } 