<?php
/*****************************************************************************************************************************************************
******************************************************************************************************************************************************
 
																	Post Module 3
 
*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function reza_image_featured ($option){ 

	$css='';
	$image_featured_query = reza_data($option,'image_featured_query');
 
 	if($image_featured_query =='slider' ){

	/*
 	$sliders = reza_data($option,'sliders');
		$args['post_type'] = 'sao_slide';
 		$args['no_found_rows'] = 1;
 		$args['posts_per_page'] = 1;
 		$args['tax_query'] =  array(
				array(
					'taxonomy' => 'sao_sliders',
					'terms' => $sliders,
					'field' => 'slug',
				)
			);
		 
		
 	$query = new WP_Query($args );		 
	 
	 
	if( $query->have_posts() ) : 
	while ( $query->have_posts() ) : $query->the_post(); 
 
		echo'<div class="rd-post-item rd-post-item-featured">';
		reza_slider_module_3($option);
 		echo'</div>';
		 
  	endwhile; 
	endif; 
 	wp_reset_query();
wp_reset_postdata();
 */
 
 
	}elseif($image_featured_query =='upload' || $image_featured_query =='link' ){ 
 		$image_featured_id = reza_data($option,'image_featured_id');
 		$image_featured_url = reza_data($option,'image_featured_url');
		$thumbnail = !empty($image_featured_id)? wp_get_attachment_image_src($image_featured_id, 'full'):'';
 		//$image_featured_id = reza_data($option,'image_featured_url');

 		$style='style="'.$backgground.'"';	  
  
 		?>
		
        <div class="rd-item rd-glider ">
			<div class="rd-post-slider" >
				<?php if(!empty($thumbnail[0])){ ?>
					<div class="rd-thumb"> 
					<a href="<?php echo esc_url($image_featured_url) ?>"  ><figure style="background-image:url('<?php echo $thumbnail[0];?>');"></figure></a>
					</div>
				<?php }?>   
 
     	   </div>
        </div>
 		
		<?php
     
        
 	}
	 
  	 
 
}
   
?>