| 1 |
<?php |
| 2 |
/** |
| 3 |
* The Template for displaying Filters opening/closing button. |
| 4 |
* |
| 5 |
* This template can be overridden by copying it to yourtheme/filters/filters-button.php. |
| 6 |
* |
| 7 |
* $wpc_found_posts - int|NULL, found posts number |
| 8 |
* |
| 9 |
* $button_error - array, errors |
| 10 |
* |
| 11 |
* @see https://filtereverything.pro/resources/templates-overriding/ |
| 12 |
*/ |
| 13 |
|
| 14 |
if ( ! defined('ABSPATH') ) { |
| 15 |
exit; |
| 16 |
} |
| 17 |
|
| 18 |
$error = ''; |
| 19 |
if (!empty($button_error)) { |
| 20 |
if (!empty($button_error['filter_set_error'])) { |
| 21 |
$error .= ' data-wpc-button-filter-set-error="' . esc_attr($button_error['filter_set_error']) . '" '; |
| 22 |
} |
| 23 |
if (!empty($button_error['filter_widget_error'])) { |
| 24 |
$error .= ' data-wpc-button-widget-error="' . esc_attr($button_error['filter_widget_error']) . '" '; |
| 25 |
} |
| 26 |
} |
| 27 |
|
| 28 |
?> |
| 29 |
<div class="wpc-filters-open-button-container wpc-open-button-<?php echo esc_attr( $set_id ); ?> <?php echo esc_attr( $wrap_class ); ?>"> |
| 30 |
<a class="<?php echo esc_attr( $class ); ?>" href="javascript:void(0);" data-wid="<?php echo esc_attr( $set_id ); ?>"<?php echo $error; ?>><span class="wpc-button-inner"><?php |
| 31 |
// Button icon |
| 32 |
flrt_get_icon_html(); |
| 33 |
|
| 34 |
?><span class="wpc-filters-button-text"><?php |
| 35 |
|
| 36 |
if( $wpc_found_posts !== NULL ){ |
| 37 |
esc_html_e( sprintf( __('Filtered %s', 'filter-everything'), '('.$wpc_found_posts.')' ) ); |
| 38 |
} else { |
| 39 |
esc_html_e('Filters', 'filter-everything'); |
| 40 |
} |
| 41 |
|
| 42 |
?></span></span></a> |
| 43 |
</div> |