PluginProbe
Filter Everything — WordPress & WooCommerce Filters / 1.9.2.1
Filter Everything — WordPress & WooCommerce Filters v1.9.2.1
1.9.7 1.9.6 1.9.5 1.9.4 1.9.3 1.9.2.2 1.9.2.1 trunk 1.2.1 1.2.3 1.2.4 1.2.5 1.3.0 1.3.1 1.3.2 1.4.1 1.4.4 1.4.5 1.4.8 1.4.9 1.5.0 1.5.1 1.6.0 1.6.1 1.6.2 All 52 releases
filter-everything / views / frontend / chips.php

chips.php in Filter Everything — WordPress & WooCommerce Filters 1.9.2.1, at views/frontend/chips.php

40 lines 2.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * The Template for displaying filter selected terms.
4 *
5 * This template can be overridden by copying it to yourtheme/filters/chips.php.
6 *
7 * $chips - array, with the Filter Set parameters
8 *
9 * @see https://filtereverything.pro/resources/templates-overriding/
10 */
11
12 if ( ! defined('ABSPATH') ) {
13 exit;
14 }
15 global $chips_count;
16 // Iterate global chips widget count
17 $selected_and_above_status = (isset($filter['selected_and_above']) && $filter['selected_and_above'] === 'yes') ? true : false;
18 $chips_count++;
19 ?>
20 <ul class="wpc-filter-chips-list wpc-filter-chips-<?php echo esc_attr( $setid .'-' .$chips_count ); ?> wpc-filter-chips-<?php echo esc_attr( $setid ); ?><?php if( ! $chips ){echo ' wpc-empty-chips-container';} ?>" data-set="<?php echo esc_attr( $setid ); ?>" data-setcount="<?php echo $setid .'-' .$chips_count ; ?>">
21 <?php if( $chips ) : ?>
22 <?php foreach( $chips as $chip ): ?>
23 <li class="wpc-filter-chip <?php echo esc_attr( $chip['class'] ); ?>"><a href="<?php echo esc_url( $chip['link'] ); ?>" title="<?php if( $chip['name'] !== esc_html__('Reset all', 'filter-everything') ){
24 if ( $chip['class'] === 'wpc-chip-search' ) {
25 echo esc_attr( sprintf( __('Remove %s from results', 'filter-everything'), '&laquo;'.$chip['label'].'&raquo;' ) );
26 } else {
27 echo esc_attr( sprintf( __('Remove %s from results', 'filter-everything'), '&laquo;'.$chip['label'] .': '.$chip['name'].'&raquo;' ) );
28 }
29 } ?>"><span class="wpc-chip-content"><?php if(isset($chip['rating'])) : ?><span class="wpc-chip-stars"><?php
30 for ($i = 1; $i <= $chip['rating']; $i++){
31 echo '<span>' . flrt_rating_star() . '</span>';
32 }
33 ?></span><?php
34 else :
35 ?><span class="wpc-filter-chip-name"><?php echo esc_html( $chip['name'] ); ?></span><?php
36 endif;
37 ?><span class="wpc-chip-remove-icon">&#215;</span></a></span></li>
38 <?php endforeach; ?>
39 <?php endif; ?>
40 </ul>