YITH WooCommerce Ajax Product Filter - Version 3.8.1

Version Description

  • Released on 04 November 2019 =

  • Update: plugin framework

  • Fix: Undefined variable message on frontend

Download this release

Release Info

Developer yithemes
Plugin Icon 128x128 YITH WooCommerce Ajax Product Filter
Version 3.8.1
Comparing to
See all releases

Code changes from version 3.8.0 to 3.8.1

README.txt CHANGED
@@ -4,7 +4,7 @@ Contributors: yithemes
4
Tags: woocommerce ajax product filter download, woocommerce, widget, ajax, ajax filtered nav, ajax navigation, ajax filtered navigation, woocommerce layered navigation, woocommerce layered nav, product filter, product filters, ajax product filter, woocommerce ajax product filter, woocommerce filters, sidebar filter, sidebar ajax filter, ajax price filter, price filter, product sorting, woocommerce filter, taxonomy filter, attribute filter, attributes filter, woocommerce product sort, ajax sort, woocommerce ajax product filter, advanced product filters, ajax product filters, filters, woocommerce ajax product filters, woocommerce product filters, woocommerce product filters, category filter, attribute filters, woocommerce products filter, woocommerce price filter, yit, yith, yithemes
5
Requires at least: 4.0
6
Tested up to: 5.3
7
- Stable tag: 3.8.0
8
License: GPLv2 or later
9
License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
@@ -159,6 +159,11 @@ If you want to see a demonstration version of the premium plugin, you can see it
159
160
== Changelog ==
161
162
= 3.8.0 - Released on 30 October 2019 =
163
164
* New: Support for WordPress 5.3
4
Tags: woocommerce ajax product filter download, woocommerce, widget, ajax, ajax filtered nav, ajax navigation, ajax filtered navigation, woocommerce layered navigation, woocommerce layered nav, product filter, product filters, ajax product filter, woocommerce ajax product filter, woocommerce filters, sidebar filter, sidebar ajax filter, ajax price filter, price filter, product sorting, woocommerce filter, taxonomy filter, attribute filter, attributes filter, woocommerce product sort, ajax sort, woocommerce ajax product filter, advanced product filters, ajax product filters, filters, woocommerce ajax product filters, woocommerce product filters, woocommerce product filters, category filter, attribute filters, woocommerce products filter, woocommerce price filter, yit, yith, yithemes
5
Requires at least: 4.0
6
Tested up to: 5.3
7
+ Stable tag: 3.8.1
8
License: GPLv2 or later
9
License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
159
160
== Changelog ==
161
162
+ = 3.8.1 - Released on 04 November 2019 =
163
+
164
+ * Update: plugin framework
165
+ * Fix: Undefined variable message on frontend
166
+
167
= 3.8.0 - Released on 30 October 2019 =
168
169
* New: Support for WordPress 5.3
init.php CHANGED
@@ -3,7 +3,7 @@
3
* Plugin Name: YITH WooCommerce Ajax Product Filter
4
* Plugin URI: https://wordpress.org/plugins/yith-woocommerce-ajax-navigation/
5
* Description:<code><strong>YITH WooCommerce AJAX Product Filter</strong></code> allows your users to find the product they are looking for as quickly as possible. Thanks to the plugin you will be able to set up one or more search filters for your WooCommerce products, improve the user experience and give the impression of being in a big and reliable store. <a href="https://yithemes.com/" target="_blank">Get more plugins for your e-commerce shop on <strong>YITH</strong></a>
6
- * Version: 3.8.0
7
* Author: YITH
8
* Author URI: https://yithemes.com/
9
* Text Domain: yith-woocommerce-ajax-navigation
@@ -67,7 +67,7 @@ load_plugin_textdomain( 'yith-woocommerce-ajax-navigation', false, dirname( plug
67
! defined( 'YITH_WCAN' ) && define( 'YITH_WCAN', true );
68
! defined( 'YITH_WCAN_URL' ) && define( 'YITH_WCAN_URL', plugin_dir_url( __FILE__ ) );
69
! defined( 'YITH_WCAN_DIR' ) && define( 'YITH_WCAN_DIR', plugin_dir_path( __FILE__ ) );
70
- ! defined( 'YITH_WCAN_VERSION' ) && define( 'YITH_WCAN_VERSION', '3.8.0' );
71
! defined( 'YITH_WCAN_FREE_INIT') && define( 'YITH_WCAN_FREE_INIT', plugin_basename( __FILE__ ) );
72
! defined( 'YITH_WCAN_FILE' ) && define( 'YITH_WCAN_FILE', __FILE__ );
73
3
* Plugin Name: YITH WooCommerce Ajax Product Filter
4
* Plugin URI: https://wordpress.org/plugins/yith-woocommerce-ajax-navigation/
5
* Description:<code><strong>YITH WooCommerce AJAX Product Filter</strong></code> allows your users to find the product they are looking for as quickly as possible. Thanks to the plugin you will be able to set up one or more search filters for your WooCommerce products, improve the user experience and give the impression of being in a big and reliable store. <a href="https://yithemes.com/" target="_blank">Get more plugins for your e-commerce shop on <strong>YITH</strong></a>
6
+ * Version: 3.8.1
7
* Author: YITH
8
* Author URI: https://yithemes.com/
9
* Text Domain: yith-woocommerce-ajax-navigation
67
! defined( 'YITH_WCAN' ) && define( 'YITH_WCAN', true );
68
! defined( 'YITH_WCAN_URL' ) && define( 'YITH_WCAN_URL', plugin_dir_url( __FILE__ ) );
69
! defined( 'YITH_WCAN_DIR' ) && define( 'YITH_WCAN_DIR', plugin_dir_path( __FILE__ ) );
70
+ ! defined( 'YITH_WCAN_VERSION' ) && define( 'YITH_WCAN_VERSION', '3.8.1' );
71
! defined( 'YITH_WCAN_FREE_INIT') && define( 'YITH_WCAN_FREE_INIT', plugin_basename( __FILE__ ) );
72
! defined( 'YITH_WCAN_FILE' ) && define( 'YITH_WCAN_FILE', __FILE__ );
73
plugin-fw/assets/css/yith-fields.css CHANGED
@@ -460,6 +460,10 @@ YITH UI
460
-moz-osx-font-smoothing: grayscale;
461
}
462
463
.yith-icon-calendar_add:before {
464
content: "\e913";
465
color: #757575;
@@ -1194,11 +1198,7 @@ YITH UI
1194
.yith-plugin-ui .select2-container--default .select2-results__option[data-selected=true],
1195
.yith-plugin-ui .select2-container--default .select2-results__option[aria-selected=true],
1196
.yith-plugin-fw-panel .select2-container--default .select2-results__option[data-selected=true],
1197
- .yith-plugin-fw-panel .select2-container--default .select2-results__option[aria-selected=true] {
1198
- background-color: #fff;
1199
- outline: none;
1200
- }
1201
-
1202
.yith-plugin-ui .select2-container--default .select2-results__option--highlighted[aria-selected],
1203
.yith-plugin-ui .select2-container--default .select2-results__option--highlighted[data-selected],
1204
.yith-plugin-fw-panel .select2-container--default .select2-results__option--highlighted[aria-selected],
@@ -1675,7 +1675,7 @@ DATEPICKER
1675
}
1676
1677
.yith-plugin-ui .wp-picker-default-custom:before {
1678
- content: "\e910";
1679
text-indent: 0;
1680
font-family: 'yith-icon';
1681
font-size: 20px;
@@ -2089,6 +2089,30 @@ DATEPICKER
2089
border: 0;
2090
}
2091
2092
@media screen and (max-width: 1440px) {
2093
.yith-plugin-ui .yith-add-box,
2094
.yith-plugin-ui .yith-toggle-row {
460
-moz-osx-font-smoothing: grayscale;
461
}
462
463
+ .yith-icon-reply:before {
464
+ content: "\e91a";
465
+ color: #757575;
466
+ }
467
.yith-icon-calendar_add:before {
468
content: "\e913";
469
color: #757575;
1198
.yith-plugin-ui .select2-container--default .select2-results__option[data-selected=true],
1199
.yith-plugin-ui .select2-container--default .select2-results__option[aria-selected=true],
1200
.yith-plugin-fw-panel .select2-container--default .select2-results__option[data-selected=true],
1201
+ .yith-plugin-fw-panel .select2-container--default .select2-results__option[aria-selected=true],
1202
.yith-plugin-ui .select2-container--default .select2-results__option--highlighted[aria-selected],
1203
.yith-plugin-ui .select2-container--default .select2-results__option--highlighted[data-selected],
1204
.yith-plugin-fw-panel .select2-container--default .select2-results__option--highlighted[aria-selected],
1675
}
1676
1677
.yith-plugin-ui .wp-picker-default-custom:before {
1678
+ content: "\e91a";
1679
text-indent: 0;
1680
font-family: 'yith-icon';
1681
font-size: 20px;
2089
border: 0;
2090
}
2091
2092
+ /** MULTI SELECT **/
2093
+ .yith-plugin-ui .yith-plugin-fw-multi-select .yith-select-group {
2094
+ display: -webkit-flex;
2095
+ display: flex;
2096
+ -webkit-flex-direction: row;
2097
+ flex-direction: row;
2098
+ }
2099
+ .yith-plugin-ui .yith-plugin-fw-multi-select .yith-single-select {
2100
+ -webkit-flex: 50%;
2101
+ flex: 50%;
2102
+ margin-right: 20px;
2103
+ }
2104
+ .yith-plugin-ui .yith-plugin-fw-multi-select .yith-single-select label {
2105
+ display: block;
2106
+ font-size: 11px;
2107
+ font-weight: 600;
2108
+ margin: 0 0 10px 0;
2109
+ }
2110
+ .yith-plugin-ui .yith-plugin-fw-multi-select .yith-single-select select,
2111
+ .yith-plugin-ui .yith-plugin-fw-multi-select .yith-single-select span.select2 {
2112
+ width: 100% !important;
2113
+ min-width: auto !important;
2114
+ }
2115
+
2116
@media screen and (max-width: 1440px) {
2117
.yith-plugin-ui .yith-add-box,
2118
.yith-plugin-ui .yith-toggle-row {
plugin-fw/assets/fonts/yith-icon.eot CHANGED
Binary file
plugin-fw/assets/fonts/yith-icon.svg CHANGED
@@ -33,4 +33,5 @@
33
<glyph unicode="&#xe917;" glyph-name="shield_money" d="M146.091 837.12v-530.261l365.909-284.501 365.909 284.672v530.091h-219.477v-73.216h-36.523v109.739h-219.648v-109.739h-36.523v73.216h-219.648zM475.477 690.859v109.739h73.216v-109.739h182.955v73.216h73.216v-421.205l-292.864-227.669-292.693 227.669v421.035h73.216v-73.216h182.955zM548.523 324.949h-73.216c-20.139 0-36.523 16.384-36.523 36.523h-73.216c0-60.587 49.152-109.739 109.739-109.739v-36.523h73.216v36.523c60.587 0 109.739 49.152 109.739 109.739s-49.152 109.739-109.739 109.739h-73.216c-20.139 0-36.523 16.384-36.523 36.523s16.384 36.523 36.523 36.523h73.216c20.139 0 36.523-16.384 36.523-36.523h73.216c0 60.587-49.152 109.739-109.739 109.739v36.523h-73.216v-36.523c-60.587 0-109.739-49.152-109.739-109.739s49.152-109.739 109.739-109.739h73.216c20.139 0 36.523-16.384 36.523-36.523s-16.213-36.523-36.523-36.523z" />
34
<glyph unicode="&#xe918;" glyph-name="time_check" d="M86.528 448.341c-0.341-235.008 189.952-425.643 424.96-425.984s425.643 189.952 425.984 424.96c0.171 83.968-24.576 166.059-71.168 236.032l-60.075-63.488c22.528-39.765 37.035-83.627 42.325-129.195h-80.384v-84.651h80.384c-19.627-154.795-141.483-276.651-296.277-296.277v84.651h-84.651v-84.651c-154.795 19.456-276.821 141.483-296.277 296.277h84.651v84.651h-84.651c18.432 155.307 140.971 277.845 296.277 296.277v-82.603h84.651v81.749c46.251-5.803 90.795-21.163 130.731-44.885l61.44 61.44c-68.779 46.080-149.675 70.827-232.448 71.168-234.837-0.341-425.301-190.635-425.472-425.472zM414.549 605.355l-59.563-59.733 157.013-157.013 410.624 410.965-59.733 59.733-350.891-350.891z" />
35
<glyph unicode="&#xe919;" glyph-name="world_settings" d="M833.707 597.333l48.981 81.92-139.435 139.435-81.92-48.981c-8.875 4.267-18.091 7.851-27.648 11.435l-23.040 92.672h-98.645c-235.179-0.171-425.643-190.635-425.643-425.813s190.464-425.643 425.643-425.643h98.645l23.040 92.672c9.557 3.584 18.773 7.168 27.648 11.435l81.92-48.981 139.435 139.435-48.981 81.92c3.925 8.875 7.851 18.091 11.435 27.648l92.672 23.040v197.12l-92.672 23.040c-3.584 9.557-7.168 20.139-11.435 27.648zM319.659 448c0.171 35.669 3.243 71.339 9.216 106.496h147.627v-212.821h-147.627c-5.973 34.987-9.045 70.656-9.216 106.325zM476.501 795.989v-170.667h-129.877c28.16 86.699 75.264 150.869 129.877 170.667zM476.501 270.677v-171.008c-54.613 19.797-101.888 84.139-129.877 171.008h129.877zM547.499 547.669c55.125-20.309 83.456-81.579 63.147-136.704-10.752-29.184-33.792-52.224-63.147-63.147v199.851zM323.925 748.203c-22.869-38.4-40.277-79.701-51.712-122.709h-67.072c29.013 49.835 69.803 91.989 118.784 122.709zM173.568 554.496h83.797c-11.435-70.485-11.435-142.336 0-212.821h-83.797c-21.845 69.12-21.845 143.531 0 212.821zM205.141 270.677h67.072c11.435-43.179 29.013-84.651 51.712-123.051-48.981 30.72-89.771 73.045-118.784 123.051zM866.816 404.651l-77.312-19.456-5.632-19.115c-5.632-18.091-12.8-35.669-21.675-52.565l-9.557-17.749 40.789-68.096-61.099-61.44-68.437 41.301-17.749-9.557c-16.725-8.875-34.133-16.043-52.224-21.675l-19.456-5.632-19.115-77.312h-7.851v180.907c96.085 19.456 158.037 113.152 138.581 209.067-14.165 69.803-68.779 124.416-138.581 138.581v180.907h7.851l19.115-77.312 19.456-5.632c18.091-5.973 35.669-13.824 52.224-23.381l17.749-9.557 68.437 40.789 61.099-61.099-40.96-66.731 9.557-17.749c8.875-16.555 16.213-34.133 21.675-52.224l5.632-19.456 77.312-19.115 0.171-86.699z" />
36
</font></defs></svg>
33
<glyph unicode="&#xe917;" glyph-name="shield_money" d="M146.091 837.12v-530.261l365.909-284.501 365.909 284.672v530.091h-219.477v-73.216h-36.523v109.739h-219.648v-109.739h-36.523v73.216h-219.648zM475.477 690.859v109.739h73.216v-109.739h182.955v73.216h73.216v-421.205l-292.864-227.669-292.693 227.669v421.035h73.216v-73.216h182.955zM548.523 324.949h-73.216c-20.139 0-36.523 16.384-36.523 36.523h-73.216c0-60.587 49.152-109.739 109.739-109.739v-36.523h73.216v36.523c60.587 0 109.739 49.152 109.739 109.739s-49.152 109.739-109.739 109.739h-73.216c-20.139 0-36.523 16.384-36.523 36.523s16.384 36.523 36.523 36.523h73.216c20.139 0 36.523-16.384 36.523-36.523h73.216c0 60.587-49.152 109.739-109.739 109.739v36.523h-73.216v-36.523c-60.587 0-109.739-49.152-109.739-109.739s49.152-109.739 109.739-109.739h73.216c20.139 0 36.523-16.384 36.523-36.523s-16.213-36.523-36.523-36.523z" />
34
<glyph unicode="&#xe918;" glyph-name="time_check" d="M86.528 448.341c-0.341-235.008 189.952-425.643 424.96-425.984s425.643 189.952 425.984 424.96c0.171 83.968-24.576 166.059-71.168 236.032l-60.075-63.488c22.528-39.765 37.035-83.627 42.325-129.195h-80.384v-84.651h80.384c-19.627-154.795-141.483-276.651-296.277-296.277v84.651h-84.651v-84.651c-154.795 19.456-276.821 141.483-296.277 296.277h84.651v84.651h-84.651c18.432 155.307 140.971 277.845 296.277 296.277v-82.603h84.651v81.749c46.251-5.803 90.795-21.163 130.731-44.885l61.44 61.44c-68.779 46.080-149.675 70.827-232.448 71.168-234.837-0.341-425.301-190.635-425.472-425.472zM414.549 605.355l-59.563-59.733 157.013-157.013 410.624 410.965-59.733 59.733-350.891-350.891z" />
35
<glyph unicode="&#xe919;" glyph-name="world_settings" d="M833.707 597.333l48.981 81.92-139.435 139.435-81.92-48.981c-8.875 4.267-18.091 7.851-27.648 11.435l-23.040 92.672h-98.645c-235.179-0.171-425.643-190.635-425.643-425.813s190.464-425.643 425.643-425.643h98.645l23.040 92.672c9.557 3.584 18.773 7.168 27.648 11.435l81.92-48.981 139.435 139.435-48.981 81.92c3.925 8.875 7.851 18.091 11.435 27.648l92.672 23.040v197.12l-92.672 23.040c-3.584 9.557-7.168 20.139-11.435 27.648zM319.659 448c0.171 35.669 3.243 71.339 9.216 106.496h147.627v-212.821h-147.627c-5.973 34.987-9.045 70.656-9.216 106.325zM476.501 795.989v-170.667h-129.877c28.16 86.699 75.264 150.869 129.877 170.667zM476.501 270.677v-171.008c-54.613 19.797-101.888 84.139-129.877 171.008h129.877zM547.499 547.669c55.125-20.309 83.456-81.579 63.147-136.704-10.752-29.184-33.792-52.224-63.147-63.147v199.851zM323.925 748.203c-22.869-38.4-40.277-79.701-51.712-122.709h-67.072c29.013 49.835 69.803 91.989 118.784 122.709zM173.568 554.496h83.797c-11.435-70.485-11.435-142.336 0-212.821h-83.797c-21.845 69.12-21.845 143.531 0 212.821zM205.141 270.677h67.072c11.435-43.179 29.013-84.651 51.712-123.051-48.981 30.72-89.771 73.045-118.784 123.051zM866.816 404.651l-77.312-19.456-5.632-19.115c-5.632-18.091-12.8-35.669-21.675-52.565l-9.557-17.749 40.789-68.096-61.099-61.44-68.437 41.301-17.749-9.557c-16.725-8.875-34.133-16.043-52.224-21.675l-19.456-5.632-19.115-77.312h-7.851v180.907c96.085 19.456 158.037 113.152 138.581 209.067-14.165 69.803-68.779 124.416-138.581 138.581v180.907h7.851l19.115-77.312 19.456-5.632c18.091-5.973 35.669-13.824 52.224-23.381l17.749-9.557 68.437 40.789 61.099-61.099-40.96-66.731 9.557-17.749c8.875-16.555 16.213-34.133 21.675-52.224l5.632-19.456 77.312-19.115 0.171-86.699z" />
36
+ <glyph unicode="&#xe91a;" glyph-name="reply" d="M426 554.667q208-30 321-159t149-311q-154 218-470 218v-174l-298 298 298 298v-170z" />
37
</font></defs></svg>
plugin-fw/assets/fonts/yith-icon.ttf CHANGED
Binary file
plugin-fw/assets/fonts/yith-icon.woff CHANGED
Binary file
plugin-fw/init.php CHANGED
@@ -1,7 +1,7 @@
1
<?php
2
/**
3
* Framework Name: YIT Plugin Framework
4
- * Version: 3.3.13
5
* Author: YITHEMES
6
* Text Domain: yith-plugin-fw
7
* Domain Path: /languages/
1
<?php
2
/**
3
* Framework Name: YIT Plugin Framework
4
+ * Version: 3.3.14
5
* Author: YITHEMES
6
* Text Domain: yith-plugin-fw
7
* Domain Path: /languages/
plugin-fw/lib/promo/yith-promo.php CHANGED
@@ -12,6 +12,7 @@ if( ! function_exists( 'simplexml_load_string' ) ){
12
return false;
13
}
14
15
add_action( 'admin_notices', 'yith_plugin_fw_promo_notices', 15 );
16
add_action( 'admin_enqueue_scripts', 'yith_plugin_fw_notice_dismiss', 20 );
17
@@ -36,33 +37,38 @@ if( ! function_exists( 'yith_plugin_fw_promo_notices' ) ){
36
37
if ( ! is_wp_error( $remote_data ) && ! empty( $remote_data ) ) {
38
$promo_data = @simplexml_load_string( $remote_data );
39
- if( true === $create_transient ){
40
- $is_membership_user = false;
41
- $license = function_exists( 'YITH_Plugin_Licence' ) ? YITH_Plugin_Licence()->get_licence() : array();
42
- $xml_expiry_date = '';
43
-
44
- if( is_array( $license ) && apply_filters( 'yith_plugin_fw_check_for_membership_user', true ) ){
45
- /* === Check is the user have the YITH Club === */
46
- foreach( $license as $plugin => $data ){
47
- if( ! empty( $data['is_membership'] ) ){
48
- $is_membership_user = true;
49
- $xml_expiry_date = $data['licence_expires'];
50
- $remote_data = $promo_data = array();
51
- break;
52
- }
53
}
54
- }
55
56
- if( empty( $is_membership_user ) && ! empty( $promo_data->expiry_date ) ){
57
- $xml_expiry_date = $promo_data->expiry_date;
58
- }
59
60
//Set Site Transient
61
set_site_transient( $transient, $remote_data, yith_plugin_fw_get_promo_transient_expiry_date( $xml_expiry_date ) );
62
}
63
64
if ( $promo_data && ! empty( $promo_data->promo ) ) {
65
- $now = strtotime( current_time( 'mysql' ) );
66
67
foreach ($promo_data->promo as $promo ){
68
$show_promo = true;
@@ -186,4 +192,13 @@ if( ! function_exists( 'yith_plugin_fw_get_promo_transient_expiry_date' ) ){
186
187
return $expiry_date;
188
}
189
}
12
return false;
13
}
14
15
+ add_action( 'admin_notices', 'yith_plugin_fw_regenerate_transient' );
16
add_action( 'admin_notices', 'yith_plugin_fw_promo_notices', 15 );
17
add_action( 'admin_enqueue_scripts', 'yith_plugin_fw_notice_dismiss', 20 );
18
37
38
if ( ! is_wp_error( $remote_data ) && ! empty( $remote_data ) ) {
39
$promo_data = @simplexml_load_string( $remote_data );
40
+
41
+ /**
42
+ * Check if current user is an YITH Club Members
43
+ */
44
+ $is_membership_user = false;
45
+ $license = function_exists( 'YITH_Plugin_Licence' ) ? YITH_Plugin_Licence()->get_licence() : array();
46
+ $xml_expiry_date = '';
47
+
48
+ if( is_array( $license ) && apply_filters( 'yith_plugin_fw_check_for_membership_user', true ) ){
49
+ /* === Check is the user have the YITH Club === */
50
+ foreach( $license as $plugin => $data ){
51
+ if( ! empty( $data['is_membership'] ) ){
52
+ $is_membership_user = true;
53
+ $xml_expiry_date = $data['licence_expires'];
54
+ $remote_data = $promo_data = array();
55
+ $create_transient = true;
56
+ break;
57
}
58
+ }
59
+ }
60
61
+ if( empty( $is_membership_user ) && ! empty( $promo_data->expiry_date ) ){
62
+ $xml_expiry_date = $promo_data->expiry_date;
63
+ }
64
65
+ if( true === $create_transient ){
66
//Set Site Transient
67
set_site_transient( $transient, $remote_data, yith_plugin_fw_get_promo_transient_expiry_date( $xml_expiry_date ) );
68
}
69
70
if ( $promo_data && ! empty( $promo_data->promo ) ) {
71
+ $now = apply_filters( 'yith_plugin_fw_promo_now_date', strtotime( current_time( 'mysql' ) ) );
72
73
foreach ($promo_data->promo as $promo ){
74
$show_promo = true;
192
193
return $expiry_date;
194
}
195
+ }
196
+
197
+ if( ! function_exists( 'yith_plugin_fw_regenerate_transient' ) ){
198
+ function yith_plugin_fw_regenerate_transient(){
199
+ if( false === get_option( 'yith_plugin_fw_promo_2019', false ) ){
200
+ delete_site_transient( 'yith_promo_message' );
201
+ update_option( 'yith_plugin_fw_promo_2019', true );
202
+ }
203
+ }
204
}
plugin-fw/lib/promo/yith-promo.xml CHANGED
@@ -28,7 +28,7 @@
28
<banner>cyber.jpg</banner>
29
<title><![CDATA[<strong>YITH Cyber Monday</strong>]]></title>
30
<description><![CDATA[
31
- Don't miss our <strong>30% discount</strong> on all our products! No coupon needed in cart. Valid from <strong>28th November</strong> to <strong>30th November</strong>.
32
]]></description>
33
<link>
34
<label>Get your deals now!</label>
@@ -47,7 +47,7 @@
47
<banner>black.jpg</banner>
48
<title><![CDATA[<strong>YITH Black Friday</strong>]]></title>
49
<description><![CDATA[
50
- Don't miss our <strong>30% discount</strong> on all our products! No coupon needed in cart. Valid from <strong>1st December</strong> to <strong>2nd December</strong>.
51
]]></description>
52
<link>
53
<label>Get your deals now!</label>
28
<banner>cyber.jpg</banner>
29
<title><![CDATA[<strong>YITH Cyber Monday</strong>]]></title>
30
<description><![CDATA[
31
+ Don't miss our <strong>30% discount</strong> on all our products! No coupon needed in cart. Valid from <strong>1st December</strong> to <strong>2nd December</strong>.
32
]]></description>
33
<link>
34
<label>Get your deals now!</label>
47
<banner>black.jpg</banner>
48
<title><![CDATA[<strong>YITH Black Friday</strong>]]></title>
49
<description><![CDATA[
50
+ Don't miss our <strong>30% discount</strong> on all our products! No coupon needed in cart. Valid from <strong>28th November</strong> to <strong>30th November</strong>.
51
]]></description>
52
<link>
53
<label>Get your deals now!</label>
plugin-fw/templates/fields/multi-select.php ADDED
@@ -0,0 +1,46 @@
1
+ <?php
2
+ /**
3
+ * This file belongs to the YIT Plugin Framework.
4
+ *
5
+ * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
6
+ * that is bundled with this package in the file LICENSE.txt.
7
+ * It is also available through the world-wide-web at this URL:
8
+ * http://www.gnu.org/licenses/gpl-3.0.txt
9
+ *
10
+ * @var array $field
11
+ */
12
+
13
+ !defined( 'ABSPATH' ) && exit; // Exit if accessed directly
14
+
15
+ extract( $field );
16
+ if ( empty( $selects ) ){
17
+ return;
18
+ }
19
+ ?>
20
+ <div class="yith-plugin-fw-multi-select" id="<?php echo esc_attr( $id ) ?>">
21
+ <?php
22
+ for( $i = 0; $i < count( $selects ); $i++ ) :
23
+ // open group
24
+ if( ( $i%2 ) == 0 ) : ?>
25
+ <div class="yith-select-group">
26
+ <?php endif; ?>
27
+
28
+ <div class="yith-single-select">
29
+ <?php
30
+ $select = $selects[$i];
31
+ $select['type'] = 'select';
32
+ $select['title'] = isset( $select['title'] ) ? $select['title'] : $select['name'];
33
+ $select['name'] = $name."[{$select['id']}]";
34
+ $select['value'] = isset( $value[$select['id']] ) ? $value[$select['id']] : $select['default'];
35
+ $select['id'] = $name."_".$select['id'];
36
+ $select['class'] = $class
37
+ ?>
38
+ <label for="<?php echo esc_attr( $select['id'] ); ?>"><?php echo esc_html( $select['title'] ); ?></label>
39
+ <?php yith_plugin_fw_get_field( $select, true, false ); ?>
40
+ </div>
41
+
42
+ <?php if( ( $i%2 ) != 0 || ! isset( $selects[$i+1] ) ) : ?>
43
+ </div>
44
+ <?php endif;
45
+ endfor; ?>
46
+ </div>
plugin-fw/templates/fields/select.php CHANGED
@@ -30,9 +30,17 @@ $class = isset( $class ) ? $class : 'yith-plugin-fw-select';
30
<?php echo $placeholder ?>
31
<?php echo $custom_attributes ?>
32
<?php if ( isset( $data ) ) echo yith_plugin_fw_html_data_to_string( $data ); ?>>
33
- <?php foreach ( $options as $key => $item ) : ?>
34
- <option value="<?php echo esc_attr( $key ) ?>" <?php if ( $multiple ): selected( true, in_array( $key, $value ) );
35
- else: selected( $key, $value ); endif; ?> ><?php echo $item ?></option>
36
<?php endforeach; ?>
37
</select>
38
30
<?php echo $placeholder ?>
31
<?php echo $custom_attributes ?>
32
<?php if ( isset( $data ) ) echo yith_plugin_fw_html_data_to_string( $data ); ?>>
33
+ <?php foreach ( $options as $key => $item ) :
34
+ if( is_array( $item ) ): ?>
35
+ <optgroup label="<?php esc_attr_e( $item['label'] ) ?>">
36
+ <?php foreach( $item['options'] as $option_key => $option ) : ?>
37
+ <option value="<?php echo esc_attr( $option_key ) ?>" <?php selected( $option_key, $value ); ?>><?php echo $option ?></option>
38
+ <?php endforeach; ?>
39
+ </optgroup>
40
+ <?php else: ?>
41
+ <option value="<?php echo esc_attr( $key ) ?>" <?php if ( $multiple ): selected( true, in_array( $key, $value ) );
42
+ else: selected( $key, $value ); endif; ?> ><?php echo $item ?></option>
43
+ <?php endif; ?>
44
<?php endforeach; ?>
45
</select>
46