<?php
$options = _WSH()->option();
$upper =  buildark_set( $options, 'show_upper_header4' );
$logo = buildark_set( $options, 'logo_image4' );
$logo = ( $logo ) ? $logo : get_template_directory_uri() . '/assets/images/logo.svg';
$addr_sec = buildark_set( $options, 'address_media4' );
$address_sec = buildark_set( $addr_sec, 'address_media4' );
$search = buildark_set( $options, 'search_area4' );

if ( $upper ) :
?>


<!--Header-Upper-->
<div class="header-upper">
	<div class="auto-container">
		<div class="clearfix">

			<div class="pull-left logo-outer">
				<?php if($logo):?>
                <div class="logo"><a href="<?php echo esc_url( home_url( '/' ) ); ?>"><img src="<?php echo esc_url( $logo );  ?>" alt="<?php esc_attr_e('Awesome Image', 'buildark'); ?>"></a></div>
				<?php else:?>
                <div class="logo"><a href="<?php echo esc_url( home_url( '/' ) ); ?>"><img src="<?php echo esc_url(get_template_directory_uri()). '/assets/images/logo.svg';  ?>" alt="<?php esc_attr_e('Awesome Image', 'buildark'); ?>"></a></div>
                <?php endif;?>
            </div>

			<div class="pull-right upper-right clearfix">
				
				
				<?php if ( $address_sec ) :  ?>	
			
				<?php foreach ( $address_sec as $address ) :
				
						if ( isset( $address['tocopy' ] ) ) continue;

									$value = buildark_set( $address, 'address_desc4');

									$icon = buildark_set( $address, 'address_icon4');
				
									$title = buildark_set( $address, 'address_title4');
				
				?>
					<!--Info Box-->
					<div class="upper-column info-box">
						<div class="icon-box"><span class="<?php echo esc_attr( $icon ); ?>"></span></div>
						<ul>
							<li><strong><?php echo wp_kses_post( $title ); ?> </strong></li>
							<li><?php echo wp_kses_post( $value ); ?></li>
						</ul>
					</div>
					
					
				<?php endforeach; ?>
				
			<?php endif; ?>
					
			<?php if ( $search ) : ?>

					<!--Info Box-->
					<div class="upper-column info-box">
						<!-- Search -->
						<div class="search-box">
						<?php get_template_part('searchform5')?>	
						</div>
					</div>
					
			<?php endif; ?>

			</div>

		</div>
	</div>
</div>
<!--End Header Upper-->


<?php endif; ?>