<?php

namespace PowerElements;
use PowerElements\Helpers\Partials as Partials;
use PowerElements\Helpers\Utils as Utils;
	/**
	 * Created by PhpStorm.
	 * User: j3sha
	 * Date: 6/23/2019
	 * Time: 3:46 PM
	 */
	
	$getCats = get_the_terms(get_the_ID(), $post_args['peeao_portfolio_carousel_taxonomy']);
	
	if (is_array($getCats)) { 
		$html ='<p class="power_portfolio_item_tag">';
		$attr ='';
		foreach ($getCats as $key => $cat) {
			if (count($getCats)==1 || $key==count($getCats)-1){
				$coma ='';
			}else{
				$coma =', ';
			}
			$html .=$cat->name.$coma;
			$attr .=' '.$cat->slug.' ';
		}
		$html .='</p>';
	}else{
		$html ='';
		$attr ='';
	}
?>
<div class="item">
	<div class="power_portfoliocarousel_item <?php echo esc_attr($attr);?>">
		<div class="power_portfolio_thumb">
			<img class="power_portfolio_item_image" src="<?php echo esc_url(wp_get_attachment_image_url( get_post_thumbnail_id(), 'full' ))?>" alt="<?php echo get_the_title(); ?>"/>
			<div class="power_portfolio_info">
				<?php if($post_args['peeao_portfolio_carousel_show_popup']=='yes'){?>
				<a class="power_portfolio_popup" href="<?php echo esc_url(wp_get_attachment_image_url( get_post_thumbnail_id(), 'full' ))?>" data-fancybox="images"><i class="<?php echo esc_attr($post_args['peeao_portfolio_carousel_icon']['value']);?>"></i></a>
				<?php }?>
				<div class="power_portfolio_label_text">
					<h4 class="power_portfolio_item_title"><a
							href="<?php echo esc_url( get_the_permalink( get_the_ID() ) ) ?>"><?php echo the_title(); ?></a></h4>
					<?php echo $html;?>
				</div>
			</div>
		</div>
	</div>
</div>
