| @@ -5,8 +5,10 @@ | ||
| 5 | 5 | * This template can be overridden by copying it to yourtheme/filters/filters-button.php. |
| 6 | 6 | * |
| 7 | 7 | * $wpc_found_posts - int|NULL, found posts number |
| 8 | 8 | * |
| 9 | + * $button_error - array, errors | |
| 10 | + * | |
| 9 | 11 | * @see https://filtereverything.pro/resources/templates-overriding/ |
| 10 | 12 | */ |
| 11 | 13 | |
| 12 | 14 | if ( ! defined('ABSPATH') ) { |
| @@ -12,11 +14,21 @@ | ||
| 12 | 14 | if ( ! defined('ABSPATH') ) { |
| 13 | 15 | exit; |
| 14 | 16 | } |
| 15 | 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 | + | |
| 16 | 28 | ?> |
| 17 | -<div class="wpc-filters-open-button-container wpc-open-button-<?php echo esc_attr( $set_id ); ?>"> | |
| 18 | - <a class="<?php echo esc_attr( $class ); ?>" href="javascript:void(0);" data-wid="<?php echo esc_attr( $set_id ); ?>"><span class="wpc-button-inner"><?php | |
| 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 | |
| 19 | 31 | // Button icon |
| 20 | 32 | flrt_get_icon_html(); |
| 21 | 33 | |
| 22 | 34 | ?><span class="wpc-filters-button-text"><?php |