<?php
$bosa_business_agency_blog_featured_advertisement_one_ID = get_theme_mod( 'bosa_business_agency_blog_featured_advertisement_one','' );
$bosa_business_agency_blog_featured_advertisement_two_ID = get_theme_mod( 'bosa_business_agency_blog_featured_advertisement_two','' );       
$bosa_business_agency_blog_featured_advertisement_three_ID = get_theme_mod( 'bosa_business_agency_blog_featured_advertisement_three','' );
$bosa_business_agency_blog_featured_advertisement_four_ID = get_theme_mod( 'bosa_business_agency_blog_featured_advertisement_four','' );

$bosa_business_agency_featured_advertisement_array = array();
$bosa_business_agency_has_featured_advertisement = false;
if( !empty( $bosa_business_agency_blog_featured_advertisement_one_ID ) ){
	$bosa_business_agency_blog_featured_advertisement_one  = wp_get_attachment_image_src( $bosa_business_agency_blog_featured_advertisement_one_ID,'bosa-business-agency-1370-550');
 	if ( is_array(  $bosa_business_agency_blog_featured_advertisement_one ) ){
 		$bosa_business_agency_has_featured_advertisement = true;
   	 	$bosa_business_agency_blog_featured_advertisement_one = $bosa_business_agency_blog_featured_advertisement_one[0];
   	 	$bosa_business_agency_featured_advertisement_array['image_one'] = array(
			'ID' => $bosa_business_agency_blog_featured_advertisement_one,
		);	
  	}
}
if( !empty( $bosa_business_agency_blog_featured_advertisement_two_ID ) ){
	$bosa_business_agency_blog_featured_advertisement_two = wp_get_attachment_image_src( $bosa_business_agency_blog_featured_advertisement_two_ID,'bosa-business-agency-420-300');
	if ( is_array(  $bosa_business_agency_blog_featured_advertisement_two ) ){
		$bosa_business_agency_has_featured_advertisement = true;	
        $bosa_business_agency_blog_featured_advertisement_two = $bosa_business_agency_blog_featured_advertisement_two[0];
        $bosa_business_agency_featured_advertisement_array['image_two'] = array(
			'ID' => $bosa_business_agency_blog_featured_advertisement_two,
		);	
  	}
}
if( !empty( $bosa_business_agency_blog_featured_advertisement_three_ID ) ){	
	$bosa_business_agency_blog_featured_advertisement_three = wp_get_attachment_image_src( $bosa_business_agency_blog_featured_advertisement_three_ID,'bosa-business-agency-420-300');
	if ( is_array(  $bosa_business_agency_blog_featured_advertisement_three ) ){
		$bosa_business_agency_has_featured_advertisement = true;
      	$bosa_business_agency_blog_featured_advertisement_three = $bosa_business_agency_blog_featured_advertisement_three[0];
      	$bosa_business_agency_featured_advertisement_array['image_three'] = array(
			'ID' => $bosa_business_agency_blog_featured_advertisement_three,
		);	
  	}
}
if( !empty( $bosa_business_agency_blog_featured_advertisement_four_ID ) ){	
	$bosa_business_agency_blog_featured_advertisement_four = wp_get_attachment_image_src( $bosa_business_agency_blog_featured_advertisement_four_ID,'bosa-business-agency-420-300');
	if ( is_array(  $bosa_business_agency_blog_featured_advertisement_four ) ){
		$bosa_business_agency_has_featured_advertisement = true;
      	$bosa_business_agency_blog_featured_advertisement_four = $bosa_business_agency_blog_featured_advertisement_four[0];
      	$bosa_business_agency_featured_advertisement_array['image_four'] = array(
			'ID' => $bosa_business_agency_blog_featured_advertisement_four,
		);	
  	}
}


if( !get_theme_mod( 'bosa_business_agency_disable_featured_advertisement_section', true ) ) {  ?>
	<section class="section-featured_advertisement-area">
		<?php foreach( $bosa_business_agency_featured_advertisement_array as $bosa_business_agency_each_featured_advertisement ){ ?>
			<figure class= "featured-image">
				<img src="<?php echo esc_url( $bosa_business_agency_each_featured_advertisement['ID'] ); ?>">
			</figure>
		<?php } ?>	
	</section>
<?php }