<?php
namespace PowerElements;
	/**
	 * Created by PhpStorm.
	 * User: j3sha
	 * Date: 6/23/2019
	 * Time: 3:45 PM
	 */
	
	if ( ! empty( $term_ids ) || $term_ids != null ) {
		foreach($term_ids as $id){
			$term = get_term( $id, 'peeao_portfolio_cat' );
			?><button class="power_portfolio_button" data-filter=".<?php echo esc_attr($term->slug)?>"><?php echo esc_html($term->name)?><sup class="filter-count"></sup>
			</button><?php
		}
	}else{
		$terms = get_terms( array(
			'taxonomy'   => 'peeao_portfolio_cat',
			'hide_empty' => 1,
		) );
		if ( ! empty( $terms ) && ! is_wp_error( $terms ) ) { ?>
			<?php foreach ( $terms as $term ) { ?>
				<button class="power_portfolio_button" data-filter=".<?php echo esc_attr($term->slug)?>"><?php echo esc_html($term->name)?><sup class="filter-count"></sup>
				</button>
			<?php } ?>
		<?php }
	}