<?php
$bosa_startup_business_blogpartneroneID 	= get_theme_mod( 'bosa_startup_business_blog_partner_one','' );
$bosa_startup_business_blogpartnertwoID 	= get_theme_mod( 'bosa_startup_business_blog_partner_two','' );       
$bosa_startup_business_blogpartnerthreeID 	= get_theme_mod( 'bosa_startup_business_blog_partner_three','' );
$bosa_startup_business_blogpartnerfourID 	= get_theme_mod( 'bosa_startup_business_blog_partner_four','' );
$bosa_startup_business_blogpartnerfiveID 	= get_theme_mod( 'bosa_startup_business_blog_partner_five','' );
$bosa_startup_business_blogpartnersixID 	= get_theme_mod( 'bosa_startup_business_blog_partner_six','' );

$bosa_startup_business_partner_array = array();
$bosa_startup_business_has_partner = false;
if( !empty( $bosa_startup_business_blogpartneroneID ) ){
	$bosa_startup_business_blog_partner_one  = wp_get_attachment_image_src( $bosa_startup_business_blogpartneroneID,'bosa-startup-business-420-300');
 	if ( is_array(  $bosa_startup_business_blog_partner_one ) ){
 		$bosa_startup_business_has_partner = true;
   	 	$bosa_startup_business_blog_partner_one = $bosa_startup_business_blog_partner_one[0];
   	 	$bosa_startup_business_partner_array['image_one'] = array(
			'ID' => $bosa_startup_business_blog_partner_one,
		);	
  	}
}
if( !empty( $bosa_startup_business_blogpartnertwoID ) ){
	$bosa_startup_business_blog_partner_two = wp_get_attachment_image_src( $bosa_startup_business_blogpartnertwoID,'bosa-startup-business-420-300');
	if ( is_array(  $bosa_startup_business_blog_partner_two ) ){
		$bosa_startup_business_has_partner = true;	
        $bosa_startup_business_blog_partner_two = $bosa_startup_business_blog_partner_two[0];
        $bosa_startup_business_partner_array['image_two'] = array(
			'ID' => $bosa_startup_business_blog_partner_two,
		);	
  	}
}
if( !empty( $bosa_startup_business_blogpartnerthreeID ) ){	
	$bosa_startup_business_blog_partner_three = wp_get_attachment_image_src( $bosa_startup_business_blogpartnerthreeID,'bosa-startup-business-420-300');
	if ( is_array(  $bosa_startup_business_blog_partner_three ) ){
		$bosa_startup_business_has_partner = true;
      	$bosa_startup_business_blog_partner_three = $bosa_startup_business_blog_partner_three[0];
      	$bosa_startup_business_partner_array['image_three'] = array(
			'ID' => $bosa_startup_business_blog_partner_three,
		);	
  	}
}
if( !empty( $bosa_startup_business_blogpartnerfourID ) ){	
	$bosa_startup_business_blog_partner_four = wp_get_attachment_image_src( $bosa_startup_business_blogpartnerfourID,'bosa-startup-business-420-300');
	if ( is_array(  $bosa_startup_business_blog_partner_four ) ){
		$bosa_startup_business_has_partner = true;
      	$bosa_startup_business_blog_partner_four = $bosa_startup_business_blog_partner_four[0];
      	$bosa_startup_business_partner_array['image_four'] = array(
			'ID' => $bosa_startup_business_blog_partner_four,
		);	
  	}
}
if( !empty( $bosa_startup_business_blogpartnerfiveID ) ){	
	$bosa_startup_business_blog_partner_five = wp_get_attachment_image_src( $bosa_startup_business_blogpartnerfiveID,'bosa-startup-business-420-300');
	if ( is_array(  $bosa_startup_business_blog_partner_five ) ){
		$bosa_startup_business_has_partner = true;
      	$bosa_startup_business_blog_partner_five = $bosa_startup_business_blog_partner_five[0];
      	$bosa_startup_business_partner_array['image_five'] = array(
			'ID' => $bosa_startup_business_blog_partner_five,
		);	
  	}
}
if( !empty( $bosa_startup_business_blogpartnersixID ) ){	
	$bosa_startup_business_blog_partner_six = wp_get_attachment_image_src( $bosa_startup_business_blogpartnersixID,'bosa-startup-business-420-300');
	if ( is_array(  $bosa_startup_business_blog_partner_six ) ){
		$bosa_startup_business_has_partner = true;
      	$bosa_startup_business_blog_partner_six = $bosa_startup_business_blog_partner_six[0];
      	$bosa_startup_business_partner_array['image_six'] = array(
			'ID' => $bosa_startup_business_blog_partner_six,
		);	
  	}
}

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