<?php
$bosa_media_marketing_blogassociateoneID = get_theme_mod( 'bosa_media_marketing_blog_associate_one','' );
$bosa_media_marketing_blogassociatetwoID = get_theme_mod( 'bosa_media_marketing_blog_associate_two','' );       
$bosa_media_marketing_blogassociatethreeID = get_theme_mod( 'bosa_media_marketing_blog_associate_three','' );
$bosa_media_marketing_blogassociatefourID = get_theme_mod( 'bosa_media_marketing_blog_associate_four','' );
$bosa_media_marketing_blogassociatefiveID = get_theme_mod( 'bosa_media_marketing_blog_associate_five','' );
$bosa_media_marketing_blogassociatesixID = get_theme_mod( 'bosa_media_marketing_blog_associate_six','' );

$bosa_media_marketing_associate_array = array();
$bosa_media_marketing_has_associate = false;
if( !empty( $bosa_media_marketing_blogassociateoneID ) ){
	$bosa_media_marketing_blog_associate_one  = wp_get_attachment_image_src( $bosa_media_marketing_blogassociateoneID,'bosa-media-marketing-420-300');
 	if ( is_array(  $bosa_media_marketing_blog_associate_one ) ){
 		$bosa_media_marketing_has_associate = true;
   	 	$bosa_media_marketing_blog_associate_one = $bosa_media_marketing_blog_associate_one[0];
   	 	$bosa_media_marketing_associate_array['image_one'] = array(
			'ID' => $bosa_media_marketing_blog_associate_one,
		);	
  	}
}
if( !empty( $bosa_media_marketing_blogassociatetwoID ) ){
	$bosa_media_marketing_blog_associate_two = wp_get_attachment_image_src( $bosa_media_marketing_blogassociatetwoID,'bosa-media-marketing-420-300');
	if ( is_array(  $bosa_media_marketing_blog_associate_two ) ){
		$bosa_media_marketing_has_associate = true;	
        $bosa_media_marketing_blog_associate_two = $bosa_media_marketing_blog_associate_two[0];
        $bosa_media_marketing_associate_array['image_two'] = array(
			'ID' => $bosa_media_marketing_blog_associate_two,
		);	
  	}
}
if( !empty( $bosa_media_marketing_blogassociatethreeID ) ){	
	$bosa_media_marketing_blog_associate_three = wp_get_attachment_image_src( $bosa_media_marketing_blogassociatethreeID,'bosa-media-marketing-420-300');
	if ( is_array(  $bosa_media_marketing_blog_associate_three ) ){
		$bosa_media_marketing_has_associate = true;
      	$bosa_media_marketing_blog_associate_three = $bosa_media_marketing_blog_associate_three[0];
      	$bosa_media_marketing_associate_array['image_three'] = array(
			'ID' => $bosa_media_marketing_blog_associate_three,
		);	
  	}
}
if( !empty( $bosa_media_marketing_blogassociatefourID ) ){	
	$bosa_media_marketing_blog_associate_four = wp_get_attachment_image_src( $bosa_media_marketing_blogassociatefourID,'bosa-media-marketing-420-300');
	if ( is_array(  $bosa_media_marketing_blog_associate_four ) ){
		$bosa_media_marketing_has_associate = true;
      	$bosa_media_marketing_blog_associate_four = $bosa_media_marketing_blog_associate_four[0];
      	$bosa_media_marketing_associate_array['image_four'] = array(
			'ID' => $bosa_media_marketing_blog_associate_four,
		);	
  	}
}
if( !empty( $bosa_media_marketing_blogassociatefiveID ) ){	
	$bosa_media_marketing_blog_associate_five = wp_get_attachment_image_src( $bosa_media_marketing_blogassociatefiveID,'bosa-media-marketing-420-300');
	if ( is_array(  $bosa_media_marketing_blog_associate_five ) ){
		$bosa_media_marketing_has_associate = true;
      	$bosa_media_marketing_blog_associate_five = $bosa_media_marketing_blog_associate_five[0];
      	$bosa_media_marketing_associate_array['image_five'] = array(
			'ID' => $bosa_media_marketing_blog_associate_five,
		);	
  	}
}
if( !empty( $bosa_media_marketing_blogassociatesixID ) ){	
	$bosa_media_marketing_blog_associate_six = wp_get_attachment_image_src( $bosa_media_marketing_blogassociatesixID,'bosa-media-marketing-420-300');
	if ( is_array(  $bosa_media_marketing_blog_associate_six ) ){
		$bosa_media_marketing_has_associate = true;
      	$bosa_media_marketing_blog_associate_six = $bosa_media_marketing_blog_associate_six[0];
      	$bosa_media_marketing_associate_array['image_six'] = array(
			'ID' => $bosa_media_marketing_blog_associate_six,
		);	
  	}
}

if( !get_theme_mod( 'bosa_media_marketing_disable_associates_section', true ) && $bosa_media_marketing_has_associate ){ ?>
	<section class="section-associate-area">
		<div class="content-wrap">
			<div class="row">
				<?php foreach( $bosa_media_marketing_associate_array as $bosa_media_marketing_each_associate ){ ?>
					<div class="col-sm-4 col-md-3 col-lg-2 col-6">
						<article class="associate-content-wrap">
							<figure class= "featured-image">
								<img src="<?php echo esc_url( $bosa_media_marketing_each_associate['ID'] ); ?>">
							</figure>
						</article>
					</div>
				<?php } ?>
			</div>	
		</div>
	</section>
<?php } ?>