Version Description
Released: 05 November 2019 =
Update: Plugin framework
Download this release
Release Info
Developer | yithemes |
Plugin | YITH WooCommerce Wishlist |
Version | 2.2.15 |
Comparing to | |
See all releases |
Code changes from version 2.2.14 to 2.2.15
- README.txt +5 -1
- includes/class.yith-wcwl-init.php +1 -1
- init.php +1 -1
- plugin-fw/assets/css/yith-fields.css +40 -11
- plugin-fw/assets/fonts/yith-icon.eot +0 -0
- plugin-fw/assets/fonts/yith-icon.svg +1 -0
- plugin-fw/assets/fonts/yith-icon.ttf +0 -0
- plugin-fw/assets/fonts/yith-icon.woff +0 -0
- plugin-fw/init.php +1 -1
- plugin-fw/lib/promo/yith-promo.php +34 -19
- plugin-fw/lib/promo/yith-promo.xml +2 -2
- plugin-fw/lib/yit-cpt-unlimited.php +1 -1
- plugin-fw/lib/yit-plugin-panel-wc.php +1 -1
- plugin-fw/templates/fields/multi-select.php +46 -0
- plugin-fw/templates/fields/select.php +11 -3
- plugin-fw/templates/fields/toggle-element-fixed.php +68 -0
- plugin-fw/yit-functions.php +6 -0
README.txt
CHANGED
@@ -4,7 +4,7 @@ Contributors: yithemes
|
|
4 |
Tags: wishlist, woocommerce, products, yit, e-commerce, shop, ecommerce wishlist, yith, woocommerce wishlist, shop wishlist
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 5.2
|
7 |
-
Stable tag: 2.2.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -109,6 +109,10 @@ you should ask theme developers to update custom templates and replace the old t
|
|
109 |
|
110 |
== Changelog ==
|
111 |
|
|
|
|
|
|
|
|
|
112 |
= 2.2.14 - Released: 30 October 2019 =
|
113 |
|
114 |
* Update: Plugin framework
|
4 |
Tags: wishlist, woocommerce, products, yit, e-commerce, shop, ecommerce wishlist, yith, woocommerce wishlist, shop wishlist
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 5.2
|
7 |
+
Stable tag: 2.2.15
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
109 |
|
110 |
== Changelog ==
|
111 |
|
112 |
+
= 2.2.15 - Released: 05 November 2019 =
|
113 |
+
|
114 |
+
* Update: Plugin framework
|
115 |
+
|
116 |
= 2.2.14 - Released: 30 October 2019 =
|
117 |
|
118 |
* Update: Plugin framework
|
includes/class.yith-wcwl-init.php
CHANGED
@@ -49,7 +49,7 @@ if ( ! class_exists( 'YITH_WCWL_Init' ) ) {
|
|
49 |
* @var string
|
50 |
* @since 1.0.0
|
51 |
*/
|
52 |
-
public $version = '2.2.
|
53 |
|
54 |
/**
|
55 |
* Plugin database version
|
49 |
* @var string
|
50 |
* @since 1.0.0
|
51 |
*/
|
52 |
+
public $version = '2.2.15';
|
53 |
|
54 |
/**
|
55 |
* Plugin database version
|
init.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: YITH WooCommerce Wishlist
|
4 |
* Plugin URI: https://yithemes.com/themes/plugins/yith-woocommerce-wishlist/
|
5 |
* Description: <code><strong>YITH WooCommerce Wishlist</strong></code> gives your users the possibility to create, fill, manage and share their wishlists allowing you to analyze their interests and needs to improve your marketing strategies. <a href="https://yithemes.com/" target="_blank">Get more plugins for your e-commerce on <strong>YITH</strong></a>
|
6 |
-
* Version: 2.2.
|
7 |
* Author: YITH
|
8 |
* Author URI: https://yithemes.com/
|
9 |
* Text Domain: yith-woocommerce-wishlist
|
3 |
* Plugin Name: YITH WooCommerce Wishlist
|
4 |
* Plugin URI: https://yithemes.com/themes/plugins/yith-woocommerce-wishlist/
|
5 |
* Description: <code><strong>YITH WooCommerce Wishlist</strong></code> gives your users the possibility to create, fill, manage and share their wishlists allowing you to analyze their interests and needs to improve your marketing strategies. <a href="https://yithemes.com/" target="_blank">Get more plugins for your e-commerce on <strong>YITH</strong></a>
|
6 |
+
* Version: 2.2.15
|
7 |
* Author: YITH
|
8 |
* Author URI: https://yithemes.com/
|
9 |
* Text Domain: yith-woocommerce-wishlist
|
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;
|
@@ -764,7 +768,9 @@ YITH UI
|
|
764 |
.yith-plugin-ui #plugin-fw-wc table.form-table th, #yith-plugin-fw-panel table.form-table th.titledesc, .yith-plugin-ui #plugin-fw-wc table.form-table td, #yith-plugin-fw-panel table.form-table td.forminp {
|
765 |
padding: 30px 20px;
|
766 |
}
|
767 |
-
|
|
|
|
|
768 |
.yith-plugin-ui #plugin-fw-wc h2 + div {
|
769 |
background: #fff;
|
770 |
border-left: 1px solid #d9d9d9;
|
@@ -1194,11 +1200,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 +1677,7 @@ DATEPICKER
|
|
1675 |
}
|
1676 |
|
1677 |
.yith-plugin-ui .wp-picker-default-custom:before {
|
1678 |
-
content: "\
|
1679 |
text-indent: 0;
|
1680 |
font-family: 'yith-icon';
|
1681 |
font-size: 20px;
|
@@ -1797,7 +1799,10 @@ DATEPICKER
|
|
1797 |
cursor: pointer;
|
1798 |
transition: all ease 0.5s;
|
1799 |
}
|
1800 |
-
|
|
|
|
|
|
|
1801 |
.yith-plugin-ui .yith-toggle-row.highlight {
|
1802 |
transition: all ease 0.5s;
|
1803 |
/*box-shadow: 0 0 7px rgb(81, 117, 129);*/
|
@@ -1882,7 +1887,7 @@ DATEPICKER
|
|
1882 |
}
|
1883 |
|
1884 |
.yith-plugin-ui .yith-add-box-row label,
|
1885 |
-
.yith-plugin-ui .yith-toggle-row-opened .yith-toggle-content .yith-toggle-content-row label {
|
1886 |
display: table-cell;
|
1887 |
width: 200px;
|
1888 |
padding-right: 21px;
|
@@ -2089,16 +2094,40 @@ 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 {
|
2095 |
width: 80%;
|
2096 |
}
|
2097 |
}
|
2098 |
|
2099 |
@media screen and (max-width: 1024px) {
|
2100 |
.yith-plugin-ui .yith-add-box,
|
2101 |
-
.yith-plugin-ui .yith-toggle-row {
|
2102 |
width: 90%;
|
2103 |
}
|
2104 |
|
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;
|
768 |
.yith-plugin-ui #plugin-fw-wc table.form-table th, #yith-plugin-fw-panel table.form-table th.titledesc, .yith-plugin-ui #plugin-fw-wc table.form-table td, #yith-plugin-fw-panel table.form-table td.forminp {
|
769 |
padding: 30px 20px;
|
770 |
}
|
771 |
+
.yith-plugin-ui #plugin-fw-wc table.form-table tr.toggle-element-fixed td, #yith-plugin-fw-panel table.form-table tr.toggle-element-fixed td.forminp {
|
772 |
+
padding: 0 20px 30px;
|
773 |
+
}
|
774 |
.yith-plugin-ui #plugin-fw-wc h2 + div {
|
775 |
background: #fff;
|
776 |
border-left: 1px solid #d9d9d9;
|
1200 |
.yith-plugin-ui .select2-container--default .select2-results__option[data-selected=true],
|
1201 |
.yith-plugin-ui .select2-container--default .select2-results__option[aria-selected=true],
|
1202 |
.yith-plugin-fw-panel .select2-container--default .select2-results__option[data-selected=true],
|
1203 |
+
.yith-plugin-fw-panel .select2-container--default .select2-results__option[aria-selected=true],
|
|
|
|
|
|
|
|
|
1204 |
.yith-plugin-ui .select2-container--default .select2-results__option--highlighted[aria-selected],
|
1205 |
.yith-plugin-ui .select2-container--default .select2-results__option--highlighted[data-selected],
|
1206 |
.yith-plugin-fw-panel .select2-container--default .select2-results__option--highlighted[aria-selected],
|
1677 |
}
|
1678 |
|
1679 |
.yith-plugin-ui .wp-picker-default-custom:before {
|
1680 |
+
content: "\e91a";
|
1681 |
text-indent: 0;
|
1682 |
font-family: 'yith-icon';
|
1683 |
font-size: 20px;
|
1799 |
cursor: pointer;
|
1800 |
transition: all ease 0.5s;
|
1801 |
}
|
1802 |
+
.yith-plugin-ui .yith-toggle-row.fixed {
|
1803 |
+
width: 100%;
|
1804 |
+
margin: 0;
|
1805 |
+
}
|
1806 |
.yith-plugin-ui .yith-toggle-row.highlight {
|
1807 |
transition: all ease 0.5s;
|
1808 |
/*box-shadow: 0 0 7px rgb(81, 117, 129);*/
|
1887 |
}
|
1888 |
|
1889 |
.yith-plugin-ui .yith-add-box-row label,
|
1890 |
+
.yith-plugin-ui .yith-toggle-row-opened .yith-toggle-content .yith-toggle-content-row > label {
|
1891 |
display: table-cell;
|
1892 |
width: 200px;
|
1893 |
padding-right: 21px;
|
2094 |
border: 0;
|
2095 |
}
|
2096 |
|
2097 |
+
/** MULTI SELECT **/
|
2098 |
+
.yith-plugin-ui .yith-plugin-fw-multi-select .yith-select-group {
|
2099 |
+
display: -webkit-flex;
|
2100 |
+
display: flex;
|
2101 |
+
-webkit-flex-direction: row;
|
2102 |
+
flex-direction: row;
|
2103 |
+
}
|
2104 |
+
.yith-plugin-ui .yith-plugin-fw-multi-select .yith-single-select {
|
2105 |
+
-webkit-flex: 50%;
|
2106 |
+
flex: 50%;
|
2107 |
+
margin-right: 20px;
|
2108 |
+
}
|
2109 |
+
.yith-plugin-ui .yith-plugin-fw-multi-select .yith-single-select label {
|
2110 |
+
display: block;
|
2111 |
+
font-size: 11px;
|
2112 |
+
font-weight: 600;
|
2113 |
+
margin: 0 0 10px 0;
|
2114 |
+
}
|
2115 |
+
.yith-plugin-ui .yith-plugin-fw-multi-select .yith-single-select select,
|
2116 |
+
.yith-plugin-ui .yith-plugin-fw-multi-select .yith-single-select span.select2 {
|
2117 |
+
width: 100% !important;
|
2118 |
+
min-width: auto !important;
|
2119 |
+
}
|
2120 |
+
|
2121 |
@media screen and (max-width: 1440px) {
|
2122 |
.yith-plugin-ui .yith-add-box,
|
2123 |
+
.yith-plugin-ui .yith-toggle-row:not(.fixed) {
|
2124 |
width: 80%;
|
2125 |
}
|
2126 |
}
|
2127 |
|
2128 |
@media screen and (max-width: 1024px) {
|
2129 |
.yith-plugin-ui .yith-add-box,
|
2130 |
+
.yith-plugin-ui .yith-toggle-row:not(.fixed) {
|
2131 |
width: 90%;
|
2132 |
}
|
2133 |
|
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="" 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="" 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="" 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="" 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="" 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="" 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="" 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.
|
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.15
|
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 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
|
|
|
|
|
|
53 |
}
|
54 |
-
|
|
|
55 |
|
56 |
-
|
57 |
-
|
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>
|
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>
|
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/lib/yit-cpt-unlimited.php
CHANGED
@@ -1592,7 +1592,7 @@ class YIT_CPT_Unlimited {
|
|
1592 |
public function admin_assets() {
|
1593 |
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
|
1594 |
wp_enqueue_media();
|
1595 |
-
wp_enqueue_script( 'yit-cptu', YIT_CORE_PLUGIN_URL . '/assets/js/yit-cpt-unlimited' . $suffix . 'js', array('jquery'), '', true );
|
1596 |
}
|
1597 |
|
1598 |
/**
|
1592 |
public function admin_assets() {
|
1593 |
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
|
1594 |
wp_enqueue_media();
|
1595 |
+
wp_enqueue_script( 'yit-cptu', YIT_CORE_PLUGIN_URL . '/assets/js/yit-cpt-unlimited' . $suffix . '.js', array('jquery'), '', true );
|
1596 |
}
|
1597 |
|
1598 |
/**
|
plugin-fw/lib/yit-plugin-panel-wc.php
CHANGED
@@ -588,7 +588,7 @@ if ( !class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
|
|
588 |
|
589 |
$value = apply_filters( 'yith_plugin_fw_wc_panel_pre_field_value', null, $field );
|
590 |
if ( is_null( $value ) ) {
|
591 |
-
if ( 'toggle-element' === $field[ 'type' ] ) {
|
592 |
$value = get_option( $field[ 'id' ], $field[ 'default' ] );
|
593 |
} else {
|
594 |
$value = WC_Admin_Settings::get_option( $field[ 'id' ], $field[ 'default' ] );
|
588 |
|
589 |
$value = apply_filters( 'yith_plugin_fw_wc_panel_pre_field_value', null, $field );
|
590 |
if ( is_null( $value ) ) {
|
591 |
+
if ( 'toggle-element' === $field[ 'type' ] || 'toggle-element-fixed' === $field[ 'type' ] ) {
|
592 |
$value = get_option( $field[ 'id' ], $field[ 'default' ] );
|
593 |
} else {
|
594 |
$value = WC_Admin_Settings::get_option( $field[ 'id' ], $field[ 'default' ] );
|
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 |
-
|
35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
|
plugin-fw/templates/fields/toggle-element-fixed.php
ADDED
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
+
exit;
|
4 |
+
}
|
5 |
+
|
6 |
+
$defaults = array(
|
7 |
+
'id' => '',
|
8 |
+
'name' => '',
|
9 |
+
'class' => '',
|
10 |
+
'custom_attributes' => '',
|
11 |
+
'elements' => [],
|
12 |
+
'onoff_field' => true,
|
13 |
+
|
14 |
+
);
|
15 |
+
$field = wp_parse_args( $field, $defaults );
|
16 |
+
|
17 |
+
extract( $field );
|
18 |
+
|
19 |
+
empty( $name ) && $name = $id;
|
20 |
+
$value = get_option( $name, [] );
|
21 |
+
?>
|
22 |
+
<div class="yith-toggle_fixed_wrapper" id="<?php echo $id ?>" >
|
23 |
+
<div class="yith-toggle-elements">
|
24 |
+
<div id="<?php echo $id; ?>" class="yith-toggle-row fixed <?php echo ! empty( $subtitle ) ? 'with-subtitle' : ''; ?> <?php echo $class; ?>" <?php echo $custom_attributes; ?>>
|
25 |
+
<div class="yith-toggle-title">
|
26 |
+
<h3>
|
27 |
+
<span class="title"><?php echo $title ?></span>
|
28 |
+
<?php if ( ! empty( $subtitle ) ): ?>
|
29 |
+
<span class="subtitle"><?php echo $subtitle; ?></span>
|
30 |
+
<?php endif; ?>
|
31 |
+
</h3>
|
32 |
+
<span class="yith-toggle"><span class="yith-icon yith-icon-arrow_right ui-sortable-handle"></span></span>
|
33 |
+
<?php
|
34 |
+
// add on off field if needed
|
35 |
+
if( ! empty( $onoff_field ) ) : ?>
|
36 |
+
<span class="yith-toggle-onoff">
|
37 |
+
<?php yith_plugin_fw_get_field( [
|
38 |
+
'type' => 'onoff',
|
39 |
+
'name' => "{$name}[enabled]",
|
40 |
+
'id' => "{$id}_enabled",
|
41 |
+
'value' => isset( $value['enabled'] ) ? $value['enabled'] : 'no',
|
42 |
+
], true );
|
43 |
+
?>
|
44 |
+
</span>
|
45 |
+
<?php endif; ?>
|
46 |
+
</div>
|
47 |
+
<div class="yith-toggle-content">
|
48 |
+
<?php foreach ( $elements as $element ):
|
49 |
+
// build correct name and id
|
50 |
+
$field_id = $element['id'];
|
51 |
+
$element['name'] = "{$name}[{$field_id}]";
|
52 |
+
$element['id'] = "{$id}_{$field_id}";
|
53 |
+
// get value
|
54 |
+
$element['value'] = isset( $value[ $field_id ] ) ? $value[ $field_id ] : ( isset( $element['default'] ) ? $element['default'] : '' );
|
55 |
+
?>
|
56 |
+
<div class="yith-toggle-content-row <?php echo $element['type'] ?>">
|
57 |
+
<label for="<?php echo $element['id']; ?>"><?php echo $element['title']; ?></label>
|
58 |
+
<div class="yith-plugin-fw-option-with-description">
|
59 |
+
<?php yith_plugin_fw_get_field( $element, true ); ?>
|
60 |
+
<span class="description"><?php echo ! empty( $element['desc'] ) ? $element['desc'] : ''; ?></span>
|
61 |
+
</div>
|
62 |
+
</div>
|
63 |
+
<?php endforeach;
|
64 |
+
?>
|
65 |
+
</div>
|
66 |
+
</div>
|
67 |
+
</div>
|
68 |
+
</div>
|
plugin-fw/yit-functions.php
CHANGED
@@ -1008,6 +1008,12 @@ if ( !function_exists( 'yith_plugin_fw_get_field' ) ) {
|
|
1008 |
|
1009 |
$field_template = yith_plugin_fw_get_field_template_path( $field );
|
1010 |
|
|
|
|
|
|
|
|
|
|
|
|
|
1011 |
if ( $field_template ) {
|
1012 |
if ( !$echo )
|
1013 |
ob_start();
|
1008 |
|
1009 |
$field_template = yith_plugin_fw_get_field_template_path( $field );
|
1010 |
|
1011 |
+
if ( !isset( $field[ 'id' ] ) ) {
|
1012 |
+
static $field_number = 1;
|
1013 |
+
$field[ 'id' ] = "yith-plugin-fw-field__{$field_number}";
|
1014 |
+
$field_number++;
|
1015 |
+
}
|
1016 |
+
|
1017 |
if ( $field_template ) {
|
1018 |
if ( !$echo )
|
1019 |
ob_start();
|