Version Description
Released Jun 12 - 2019
- Update: Plugin Core
Download this release
Release Info
Developer | yithemes |
Plugin | YITH WooCommerce Quick View |
Version | 1.3.11 |
Comparing to | |
See all releases |
Code changes from version 1.3.10 to 1.3.11
- README.txt +6 -4
- init.php +3 -3
- plugin-fw/assets/css/yith-fields.css +70 -13
- 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/assets/js/yith-fields.js +13 -21
- plugin-fw/assets/js/yith-fields.min.js +1 -1
- plugin-fw/init.php +2 -2
- plugin-fw/lib/promo/black.jpg +0 -0
- plugin-fw/lib/promo/cyber.jpg +0 -0
- plugin-fw/lib/promo/halloween.jpg +0 -0
- plugin-fw/lib/promo/yith-promo.php +189 -0
- plugin-fw/lib/promo/yith-promo.xml +64 -0
- plugin-fw/lib/yit-metabox.php +32 -0
- plugin-fw/lib/yit-plugin-licence.php +4 -1
- plugin-fw/lib/yit-theme-licence.php +4 -1
- plugin-fw/lib/yit-upgrade.php +4 -1
- plugin-fw/templates/fields/colorpicker.php +1 -1
- plugin-fw/templates/fields/select-buttons.php +3 -2
- plugin-fw/templates/fields/select.php +4 -2
- plugin-fw/templates/fields/upload.php +8 -8
- plugin-fw/yit-functions.php +1 -1
- plugin-fw/yit-plugin.php +1 -0
README.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: yithemes
|
|
3 |
Tags: woocommerce, quick view, woocommerce quick view, products quick view
|
4 |
Requires at least: 4.0
|
5 |
Tested up to: 5.2
|
6 |
-
Stable tag: 1.3.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -42,6 +42,10 @@ Full documentation is available [here](http://yithemes.com/docs-plugins/yith-woo
|
|
42 |
|
43 |
== Changelog ==
|
44 |
|
|
|
|
|
|
|
|
|
45 |
= 1.3.10 = Released Jun 11 - 2019
|
46 |
|
47 |
* New: Support to WooCommerce 3.6.4
|
@@ -222,8 +226,6 @@ Or, if you have created your own language pack, or have an update for an existin
|
|
222 |
|
223 |
== Upgrade notice ==
|
224 |
|
225 |
-
= 1.3.
|
226 |
|
227 |
-
* New: Support to WooCommerce 3.6.4
|
228 |
-
* New: Support to WordPress 5.2.1
|
229 |
* Update: Plugin Core
|
3 |
Tags: woocommerce, quick view, woocommerce quick view, products quick view
|
4 |
Requires at least: 4.0
|
5 |
Tested up to: 5.2
|
6 |
+
Stable tag: 1.3.11
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
42 |
|
43 |
== Changelog ==
|
44 |
|
45 |
+
= 1.3.11 = Released Jun 12 - 2019
|
46 |
+
|
47 |
+
* Update: Plugin Core
|
48 |
+
|
49 |
= 1.3.10 = Released Jun 11 - 2019
|
50 |
|
51 |
* New: Support to WooCommerce 3.6.4
|
226 |
|
227 |
== Upgrade notice ==
|
228 |
|
229 |
+
= 1.3.11 = Released Jun 12 - 2019
|
230 |
|
|
|
|
|
231 |
* Update: Plugin Core
|
init.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: YITH WooCommerce Quick View
|
4 |
* Plugin URI: https://yithemes.com/themes/plugins/yith-woocommerce-quick-view
|
5 |
* Description: The <code><strong>YITH WooCommerce Quick View</strong></code> plugin allows your customers to have a quick look about products. <a href="https://yithemes.com/" target="_blank">Get more plugins for your e-commerce shop on <strong>YITH</strong></a>.
|
6 |
-
* Version: 1.3.
|
7 |
* Author: YITH
|
8 |
* Author URI: https://yithemes.com/
|
9 |
* Text Domain: yith-woocommerce-quick-view
|
@@ -13,7 +13,7 @@
|
|
13 |
*
|
14 |
* @author YITH
|
15 |
* @package YITH WooCommerce Quick View
|
16 |
-
* @version 1.3.
|
17 |
*/
|
18 |
/* Copyright 2015 Your Inspiration Themes (email : plugins@yithemes.com)
|
19 |
|
@@ -61,7 +61,7 @@ register_activation_hook( __FILE__, 'yith_plugin_registration_hook' );
|
|
61 |
|
62 |
|
63 |
if ( ! defined( 'YITH_WCQV_VERSION' ) ){
|
64 |
-
define( 'YITH_WCQV_VERSION', '1.3.
|
65 |
}
|
66 |
|
67 |
if ( ! defined( 'YITH_WCQV_FREE_INIT' ) ) {
|
3 |
* Plugin Name: YITH WooCommerce Quick View
|
4 |
* Plugin URI: https://yithemes.com/themes/plugins/yith-woocommerce-quick-view
|
5 |
* Description: The <code><strong>YITH WooCommerce Quick View</strong></code> plugin allows your customers to have a quick look about products. <a href="https://yithemes.com/" target="_blank">Get more plugins for your e-commerce shop on <strong>YITH</strong></a>.
|
6 |
+
* Version: 1.3.11
|
7 |
* Author: YITH
|
8 |
* Author URI: https://yithemes.com/
|
9 |
* Text Domain: yith-woocommerce-quick-view
|
13 |
*
|
14 |
* @author YITH
|
15 |
* @package YITH WooCommerce Quick View
|
16 |
+
* @version 1.3.11
|
17 |
*/
|
18 |
/* Copyright 2015 Your Inspiration Themes (email : plugins@yithemes.com)
|
19 |
|
61 |
|
62 |
|
63 |
if ( ! defined( 'YITH_WCQV_VERSION' ) ){
|
64 |
+
define( 'YITH_WCQV_VERSION', '1.3.11' );
|
65 |
}
|
66 |
|
67 |
if ( ! defined( 'YITH_WCQV_FREE_INIT' ) ) {
|
plugin-fw/assets/css/yith-fields.css
CHANGED
@@ -493,7 +493,10 @@ YITH UI
|
|
493 |
content: "\e90e";
|
494 |
color: #d8d8d8;
|
495 |
}
|
496 |
-
|
|
|
|
|
|
|
497 |
.yith-plugin-fw-banner{
|
498 |
width: 100%;
|
499 |
height: 75px;
|
@@ -602,7 +605,7 @@ YITH UI
|
|
602 |
color: #716269;
|
603 |
font-size: 11px;
|
604 |
font-style: normal;
|
605 |
-
font-weight:
|
606 |
margin-top: 15px;
|
607 |
margin-left: 0;
|
608 |
}
|
@@ -643,6 +646,10 @@ YITH UI
|
|
643 |
padding-left: 0;
|
644 |
}
|
645 |
|
|
|
|
|
|
|
|
|
646 |
.yith-plugin-ui #plugin-fw-wc h2 + div {
|
647 |
background: #fff;
|
648 |
border-left: 1px solid #d9d9d9;
|
@@ -716,6 +723,8 @@ YITH UI
|
|
716 |
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=text].wp-color-picker{
|
717 |
border: 0;
|
718 |
height: 30px;
|
|
|
|
|
719 |
}
|
720 |
|
721 |
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=text].small-text,
|
@@ -905,9 +914,7 @@ YITH UI
|
|
905 |
background-color: #1c4863;
|
906 |
color: #fff;
|
907 |
}
|
908 |
-
|
909 |
-
content: "\e905";
|
910 |
-
}
|
911 |
|
912 |
/** yith-remove-button **/
|
913 |
|
@@ -990,7 +997,7 @@ YITH UI
|
|
990 |
.yith-plugin-ui .select2-container--open .select2-dropdown--above,
|
991 |
.yith-plugin-fw-panel .select2-container--open .select2-dropdown--below,
|
992 |
.yith-plugin-fw-panel .select2-container--open .select2-dropdown--above {
|
993 |
-
margin-top:
|
994 |
border-radius: 8px;
|
995 |
box-shadow:0 2px 4px 0 rgba(0,0,0,0.12),0 2px 10px 0 rgba(0,0,0,0.12) !important;
|
996 |
}
|
@@ -1039,16 +1046,23 @@ YITH UI
|
|
1039 |
text-indent: -9999px;
|
1040 |
}
|
1041 |
|
1042 |
-
|
1043 |
-
.
|
|
|
|
|
1044 |
float: right;
|
1045 |
color: #fff;
|
1046 |
content: "\e906";
|
1047 |
font-family: 'yith-icon' !important;
|
1048 |
font-size: 9px;
|
1049 |
-
line-height:
|
1050 |
text-indent: 0;
|
1051 |
}
|
|
|
|
|
|
|
|
|
|
|
1052 |
.yith-plugin-ui .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:after
|
1053 |
.yith-plugin-fw-panel .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:after{
|
1054 |
color: #000;
|
@@ -1360,6 +1374,17 @@ DATEPICKER
|
|
1360 |
}
|
1361 |
|
1362 |
/** colorpicker **/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1363 |
.woocommerce .yith-plugin-ui .iris-picker{
|
1364 |
border:0;
|
1365 |
margin-top: 20px;
|
@@ -1380,9 +1405,40 @@ DATEPICKER
|
|
1380 |
box-shadow: none;
|
1381 |
border: 1px solid #d9d9d9;
|
1382 |
margin-bottom: 0;
|
|
|
|
|
1383 |
}
|
1384 |
-
.yith-plugin-ui .wp-picker-
|
1385 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1386 |
}
|
1387 |
.yith-plugin-ui .wp-picker-container{
|
1388 |
width: auto;
|
@@ -1551,13 +1607,14 @@ DATEPICKER
|
|
1551 |
.yith-plugin-ui .yith-add-box-row label,
|
1552 |
.yith-plugin-ui .yith-toggle-row-opened .yith-toggle-content .yith-toggle-content-row label{
|
1553 |
display: table-cell;
|
1554 |
-
width:
|
1555 |
-
padding-right:
|
1556 |
color: #33373b;
|
1557 |
font-size: 13px;
|
1558 |
vertical-align: top;
|
1559 |
font-weight: 600;
|
1560 |
}
|
|
|
1561 |
.yith-plugin-ui .yith-add-box-row .yith-plugin-fw-field-wrapper:not(.yith-plugin-fw-title-field-wrapper),
|
1562 |
.yith-plugin-ui .yith-toggle-row-opened .yith-plugin-fw-field-wrapper:not(.yith-plugin-fw-title-field-wrapper) {
|
1563 |
/* display: table-cell;*/
|
493 |
content: "\e90e";
|
494 |
color: #d8d8d8;
|
495 |
}
|
496 |
+
.icon-reset:before {
|
497 |
+
content: "\e910";
|
498 |
+
color: #d8d8d8;
|
499 |
+
}
|
500 |
.yith-plugin-fw-banner{
|
501 |
width: 100%;
|
502 |
height: 75px;
|
605 |
color: #716269;
|
606 |
font-size: 11px;
|
607 |
font-style: normal;
|
608 |
+
font-weight: 400;
|
609 |
margin-top: 15px;
|
610 |
margin-left: 0;
|
611 |
}
|
646 |
padding-left: 0;
|
647 |
}
|
648 |
|
649 |
+
.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 {
|
650 |
+
padding: 30px 20px;
|
651 |
+
}
|
652 |
+
|
653 |
.yith-plugin-ui #plugin-fw-wc h2 + div {
|
654 |
background: #fff;
|
655 |
border-left: 1px solid #d9d9d9;
|
723 |
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=text].wp-color-picker{
|
724 |
border: 0;
|
725 |
height: 30px;
|
726 |
+
max-width: 60px;
|
727 |
+
|
728 |
}
|
729 |
|
730 |
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=text].small-text,
|
914 |
background-color: #1c4863;
|
915 |
color: #fff;
|
916 |
}
|
917 |
+
|
|
|
|
|
918 |
|
919 |
/** yith-remove-button **/
|
920 |
|
997 |
.yith-plugin-ui .select2-container--open .select2-dropdown--above,
|
998 |
.yith-plugin-fw-panel .select2-container--open .select2-dropdown--below,
|
999 |
.yith-plugin-fw-panel .select2-container--open .select2-dropdown--above {
|
1000 |
+
margin-top: 10px;
|
1001 |
border-radius: 8px;
|
1002 |
box-shadow:0 2px 4px 0 rgba(0,0,0,0.12),0 2px 10px 0 rgba(0,0,0,0.12) !important;
|
1003 |
}
|
1046 |
text-indent: -9999px;
|
1047 |
}
|
1048 |
|
1049 |
+
|
1050 |
+
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:after,
|
1051 |
+
.woocommerce .yith-plugin-ui .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:after,
|
1052 |
+
.yith-plugin-ui .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:after{
|
1053 |
float: right;
|
1054 |
color: #fff;
|
1055 |
content: "\e906";
|
1056 |
font-family: 'yith-icon' !important;
|
1057 |
font-size: 9px;
|
1058 |
+
line-height: 21px;
|
1059 |
text-indent: 0;
|
1060 |
}
|
1061 |
+
|
1062 |
+
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:after{
|
1063 |
+
color: #000;
|
1064 |
+
}
|
1065 |
+
|
1066 |
.yith-plugin-ui .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:after
|
1067 |
.yith-plugin-fw-panel .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:after{
|
1068 |
color: #000;
|
1374 |
}
|
1375 |
|
1376 |
/** colorpicker **/
|
1377 |
+
.yith-plugin-ui .yith-plugin-fw-colorpicker-field-wrapper .iris-picker,
|
1378 |
+
.yith-plugin-ui .yith-plugin-fw-colorpicker-field-wrapper .wp-picker-holder {
|
1379 |
+
display: none !important;
|
1380 |
+
}
|
1381 |
+
.yith-plugin-ui .yith-plugin-fw-colorpicker-field-wrapper .wp-picker-input-wrap {
|
1382 |
+
display: inline !important;
|
1383 |
+
}
|
1384 |
+
.yith-plugin-ui .yith-plugin-fw-colorpicker-field-wrapper .wp-picker-active .iris-picker,
|
1385 |
+
.yith-plugin-ui .yith-plugin-fw-colorpicker-field-wrapper .wp-picker-active .wp-picker-holder {
|
1386 |
+
display: block !important;
|
1387 |
+
}
|
1388 |
.woocommerce .yith-plugin-ui .iris-picker{
|
1389 |
border:0;
|
1390 |
margin-top: 20px;
|
1405 |
box-shadow: none;
|
1406 |
border: 1px solid #d9d9d9;
|
1407 |
margin-bottom: 0;
|
1408 |
+
display: inline-block;
|
1409 |
+
vertical-align: middle;
|
1410 |
}
|
1411 |
+
.yith-plugin-ui .wp-picker-default-custom{
|
1412 |
+
cursor: pointer;
|
1413 |
+
width: 25px;
|
1414 |
+
padding: 0 5px;
|
1415 |
+
display: inline-block;
|
1416 |
+
vertical-align: middle;
|
1417 |
+
position: relative;
|
1418 |
+
}
|
1419 |
+
.yith-plugin-ui .wp-picker-default-custom input.button {
|
1420 |
+
opacity: 0;
|
1421 |
+
margin: 0;
|
1422 |
+
padding: 0;
|
1423 |
+
position: absolute;
|
1424 |
+
top: 0;
|
1425 |
+
right: 0;
|
1426 |
+
left: 0;
|
1427 |
+
bottom: 0;
|
1428 |
+
z-index: 2;
|
1429 |
+
}
|
1430 |
+
.yith-plugin-ui .wp-picker-default-custom:before{
|
1431 |
+
content: "\e910";
|
1432 |
+
text-indent: 0;
|
1433 |
+
font-family: 'yith-icon';
|
1434 |
+
font-size: 20px;
|
1435 |
+
color: #d8d8d8;
|
1436 |
+
font-weight: normal;
|
1437 |
+
width:15px;
|
1438 |
+
display:block;
|
1439 |
+
background: none;
|
1440 |
+
line-height: 20px;
|
1441 |
+
margin-left: 8px;
|
1442 |
}
|
1443 |
.yith-plugin-ui .wp-picker-container{
|
1444 |
width: auto;
|
1607 |
.yith-plugin-ui .yith-add-box-row label,
|
1608 |
.yith-plugin-ui .yith-toggle-row-opened .yith-toggle-content .yith-toggle-content-row label{
|
1609 |
display: table-cell;
|
1610 |
+
width: 250px;
|
1611 |
+
padding-right:40px;
|
1612 |
color: #33373b;
|
1613 |
font-size: 13px;
|
1614 |
vertical-align: top;
|
1615 |
font-weight: 600;
|
1616 |
}
|
1617 |
+
|
1618 |
.yith-plugin-ui .yith-add-box-row .yith-plugin-fw-field-wrapper:not(.yith-plugin-fw-title-field-wrapper),
|
1619 |
.yith-plugin-ui .yith-toggle-row-opened .yith-plugin-fw-field-wrapper:not(.yith-plugin-fw-title-field-wrapper) {
|
1620 |
/* display: table-cell;*/
|
plugin-fw/assets/fonts/yith-icon.eot
CHANGED
Binary file
|
plugin-fw/assets/fonts/yith-icon.svg
CHANGED
@@ -23,4 +23,5 @@
|
|
23 |
<glyph unicode="" glyph-name="trash" d="M734.591 132.655c0-20.48-16.696-37.101-37.101-37.101h-371.014c-20.406 0-37.101 16.621-37.101 37.101v519.42h-74.203v-519.42c0-61.403 50.087-111.304 111.304-111.304h371.014c61.217 0 111.304 49.901 111.304 111.304v519.42h-74.203v-519.42zM400.679 800.48h222.608v-37.101h-222.608v37.101zM697.49 800.48c0 40.923-33.391 74.203-74.203 74.203h-222.608c-40.812 0-74.203-33.28-74.203-74.203v-37.101h-185.507v-74.203h742.028v74.203h-185.507v37.101zM474.882 614.973h74.203v-445.217h-74.203v445.217zM363.577 614.973h74.203v-445.217h-74.203v445.217zM586.186 614.973h74.203v-445.217h-74.203v445.217z" />
|
24 |
<glyph unicode="" glyph-name="info" d="M511.957 92.471c-196.017 0-355.555 159.466-355.555 355.555 0 196.053 159.538 355.555 355.555 355.555 196.053 0 355.555-159.502 355.555-355.555 0-196.089-159.502-355.555-355.555-355.555zM511.957 874.692c-235.271 0-426.666-191.431-426.666-426.666 0-235.271 191.395-426.666 426.666-426.666 235.306 0 426.666 191.395 426.666 426.666 0 235.235-191.36 426.666-426.666 426.666zM476.402 270.248v177.777h35.555v-177.777h-35.555zM583.068 448.026v71.111h-213.333v-71.111h35.555v-248.888h213.333v71.111h-35.555v177.777zM494.179 661.359c9.813 0 17.778-8 17.778-17.778 0-9.813-7.964-17.778-17.778-17.778-9.778 0-17.778 7.964-17.778 17.778 0 9.778 8 17.778 17.778 17.778zM494.179 554.692c49.031 0 88.889 39.858 88.889 88.889 0 48.995-39.858 88.889-88.889 88.889-48.995 0-88.889-39.893-88.889-88.889 0-49.031 39.893-88.889 88.889-88.889z" />
|
25 |
<glyph unicode="" glyph-name="drag" d="M241.835 409.259h232.277v-232.277h-116.053l156.501-154.795 156.501 154.795h-119.467v232.277h233.813v-116.224l154.965 156.672-154.965 156.501v-119.467h-233.813v232.277h119.467l-156.501 154.795-156.501-154.795h116.053v-232.277h-232.277v119.467l-154.795-156.501 154.795-156.672z" />
|
|
|
26 |
</font></defs></svg>
|
23 |
<glyph unicode="" glyph-name="trash" d="M734.591 132.655c0-20.48-16.696-37.101-37.101-37.101h-371.014c-20.406 0-37.101 16.621-37.101 37.101v519.42h-74.203v-519.42c0-61.403 50.087-111.304 111.304-111.304h371.014c61.217 0 111.304 49.901 111.304 111.304v519.42h-74.203v-519.42zM400.679 800.48h222.608v-37.101h-222.608v37.101zM697.49 800.48c0 40.923-33.391 74.203-74.203 74.203h-222.608c-40.812 0-74.203-33.28-74.203-74.203v-37.101h-185.507v-74.203h742.028v74.203h-185.507v37.101zM474.882 614.973h74.203v-445.217h-74.203v445.217zM363.577 614.973h74.203v-445.217h-74.203v445.217zM586.186 614.973h74.203v-445.217h-74.203v445.217z" />
|
24 |
<glyph unicode="" glyph-name="info" d="M511.957 92.471c-196.017 0-355.555 159.466-355.555 355.555 0 196.053 159.538 355.555 355.555 355.555 196.053 0 355.555-159.502 355.555-355.555 0-196.089-159.502-355.555-355.555-355.555zM511.957 874.692c-235.271 0-426.666-191.431-426.666-426.666 0-235.271 191.395-426.666 426.666-426.666 235.306 0 426.666 191.395 426.666 426.666 0 235.235-191.36 426.666-426.666 426.666zM476.402 270.248v177.777h35.555v-177.777h-35.555zM583.068 448.026v71.111h-213.333v-71.111h35.555v-248.888h213.333v71.111h-35.555v177.777zM494.179 661.359c9.813 0 17.778-8 17.778-17.778 0-9.813-7.964-17.778-17.778-17.778-9.778 0-17.778 7.964-17.778 17.778 0 9.778 8 17.778 17.778 17.778zM494.179 554.692c49.031 0 88.889 39.858 88.889 88.889 0 48.995-39.858 88.889-88.889 88.889-48.995 0-88.889-39.893-88.889-88.889 0-49.031 39.893-88.889 88.889-88.889z" />
|
25 |
<glyph unicode="" glyph-name="drag" d="M241.835 409.259h232.277v-232.277h-116.053l156.501-154.795 156.501 154.795h-119.467v232.277h233.813v-116.224l154.965 156.672-154.965 156.501v-119.467h-233.813v232.277h119.467l-156.501 154.795-156.501-154.795h116.053v-232.277h-232.277v119.467l-154.795-156.501 154.795-156.672z" />
|
26 |
+
<glyph unicode="" glyph-name="reset" d="M188.928 400.384c23.211-158.379 159.573-280.405 324.267-280.405 118.613 0 228.352 64.341 286.379 167.936l-63.488 35.499c-45.227-80.555-130.56-130.731-222.891-130.731-120.491 0-221.525 84.139-248.149 196.608l40.107-40.107 51.541 51.541-135.168 135.168-135.168-135.168 51.541-51.541 51.029 51.2zM513.195 703.317c121.685 0 223.573-85.675 249.003-199.68l-43.179 43.179-51.541-51.541 135.168-135.168 135.168 135.168-51.541 51.541-48.981-48.981c-24.064 157.355-159.915 278.528-323.925 278.528-116.736 0-225.621-62.805-284.16-164.011l63.147-36.523c45.227 78.507 129.877 127.488 220.843 127.488z" />
|
27 |
</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/assets/js/yith-fields.js
CHANGED
@@ -40,32 +40,24 @@ jQuery(function ($) {
|
|
40 |
}
|
41 |
});
|
42 |
|
43 |
-
$colorpicker.each(function () {
|
44 |
-
var $cp = $(this).closest('.colorpicker'),
|
45 |
-
$button = $cp.find('.wp-color-result'),
|
46 |
-
$picker = $cp.find('.wp-picker-holder'),
|
47 |
-
$wrap = $cp.find('.wp-picker-input-wrap'),
|
48 |
-
$iris = $cp.find('.iris-picker');
|
49 |
|
50 |
-
|
51 |
-
$
|
|
|
|
|
52 |
|
53 |
-
|
54 |
-
e.preventDefault();
|
55 |
-
$wrap.show();
|
56 |
-
if ($picker.is(':visible')) {
|
57 |
-
$picker.hide();
|
58 |
-
$iris.hide();
|
59 |
-
} else {
|
60 |
-
$picker.show();
|
61 |
-
$iris.show();
|
62 |
-
}
|
63 |
-
});
|
64 |
|
65 |
-
|
66 |
-
|
|
|
|
|
|
|
|
|
67 |
});
|
68 |
|
|
|
|
|
69 |
/* Upload */
|
70 |
if (typeof wp !== 'undefined' && typeof wp.media !== 'undefined') {
|
71 |
var _custom_media = true;
|
40 |
}
|
41 |
});
|
42 |
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
|
44 |
+
$colorpicker.each(function () {
|
45 |
+
var select_label = $(this).data('variations-label'),
|
46 |
+
wrap_main = $(this).closest( '.yith-plugin-fw-field-wrapper' ),
|
47 |
+
wrap = wrap_main.find('.wp-picker-input-wrap');
|
48 |
|
49 |
+
wrap_main.find('a.wp-color-result').attr('title', select_label);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
|
51 |
+
if( ! wrap.find( '.wp-picker-clear-custom' ).length ) {
|
52 |
+
var button = $('<span/>').attr({
|
53 |
+
class :"wp-picker-default-custom"
|
54 |
+
});
|
55 |
+
wrap.find( '.wp-picker-default' ).wrap( button );
|
56 |
+
}
|
57 |
});
|
58 |
|
59 |
+
|
60 |
+
|
61 |
/* Upload */
|
62 |
if (typeof wp !== 'undefined' && typeof wp.media !== 'undefined') {
|
63 |
var _custom_media = true;
|
plugin-fw/assets/js/yith-fields.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(function(g){function h(){var e=g(".yith-plugin-fw-datepicker"),t=g(".yith-plugin-fw-colorpicker"),n={imgPreviewHandler:".yith-plugin-fw-upload-img-preview",uploadButtonHandler:".yith-plugin-fw-upload-button",imgUrlHandler:".yith-plugin-fw-upload-img-url",resetButtonHandler:".yith-plugin-fw-upload-button-reset",imgUrl:g(".yith-plugin-fw-upload-img-url")},i=g(".add_media"),a={sliderWrapper:g(".yith-plugin-fw .image-gallery ul.slides-wrapper"),buttonHandler:".yith-plugin-fw .image-gallery-button"},l=g(".yith-plugin-fw-sidebar-layout"),o=g(".yith-plugin-fw .yith-plugin-fw-slider-container .ui-slider-horizontal"),r=g(".codemirror"),d=g(".yit-icons-manager-wrapper"),s=g(".yith-plugin-ui td.forminp-checkbox");if(e.each(function(){var e=g(this).data();g(this).datepicker(e)}),t.wpColorPicker({palettes:!1,width:200,mode:"hsl",clear:function(){var e=g(this);e.val(e.data("default-color")),e.change()}}),t.each(function(){var e=g(this).closest(".colorpicker"),t=e.find(".wp-color-result"),i=e.find(".wp-picker-holder"),a=e.find(".wp-picker-input-wrap"),l=e.find(".iris-picker");a.show(),i.hide(),t.on("click",function(e){e.preventDefault(),a.show(),i.is(":visible")?(i.hide(),l.hide()):(i.show(),l.show())});var n=g(this).data("variations-label");g(this).parent().parent().find("a.wp-color-result").attr("title",n)}),"undefined"!=typeof wp&&void 0!==wp.media){n.imgUrl.change(function(){var e=g(this).val(),t=new RegExp("(http|ftp|https)://[a-zA-Z0-9@?^=%&:/~+#-_.]*.(gif|jpg|jpeg|png|ico)"),i=g(this).parent().find(n.imgPreviewHandler).first();i.length<1&&(i=g(this).parent().parent().find(n.imgPreviewHandler).first()),t.test(e)?i.html('<img src="'+e+'" style="max-width:100px; max-height:100px;" />'):i.html("")}).trigger("change"),g(document).on("click",n.uploadButtonHandler,function(e){e.preventDefault();var t,i=g(this).attr("id").replace(/-button$/,"");if(t)t.open();else{var a=[new wp.media.controller.Library({library:wp.media.query(),multiple:!1,title:"Choose Image",priority:20,filterable:"uploaded"})];(t=wp.media.frames.downloadable_file=wp.media({title:"Choose Image",library:{type:""},button:{text:"Choose Image"},multiple:!1,states:a})).on("select",function(){var e=t.state().get("selection").first().toJSON();g("#"+i).val(e.url),g("#"+i+"-yith-attachment-id")&&g("#"+i+"-yith-attachment-id").val(e.id),n.imgUrl.trigger("change")}),t.open()}}),g(document).on("click",n.resetButtonHandler,function(e){var t=g(this),i=t.attr("id"),a=t.attr("id").replace(/-button-reset$/,""),l=g("#"+i).data("default");g("#"+a).val(l),n.imgUrl.trigger("change")})}i.on("click",function(){!1}),"undefined"!=typeof wp&&void 0!==wp.media&&(g(document).on("click",a.buttonHandler,function(e){var t=g(this),i=t.closest(".image-gallery"),a=i.find(".image_gallery_ids"),l=a.val(),n=i.find("ul.slides-wrapper"),o=wp.media.frames.image_gallery=wp.media({title:t.data("choose"),button:{text:t.data("update")},states:[new wp.media.controller.Library({title:t.data("choose"),filterable:"all",multiple:!0})]});o.on("select",function(){o.state().get("selection").map(function(e){(e=e.toJSON()).id&&(l=l?l+","+e.id:e.id,n.append('<li class="image" data-attachment_id="'+e.id+'"><img src="'+e.sizes.thumbnail.url+'"/><ul class="actions"><li><a href="#" class="delete" title="'+t.data("delete")+'">x</a></li></ul></li>'))}),a.val(l)}),o.open()}),a.sliderWrapper.each(function(){var a=g(this);a.sortable({items:"li.image",cursor:"move",scrollSensitivity:40,forcePlaceholderSize:!0,forceHelperSize:!1,helper:"clone",opacity:.65,start:function(e,t){t.item.css("background-color","#f6f6f6")},stop:function(e,t){t.item.removeAttr("style")},update:function(e,t){var i="";a.find("li.image").css("cursor","default").each(function(){var e=g(this).attr("data-attachment_id");i=i+e+","}),a.closest(".image-gallery").find(".image_gallery_ids").val(i)}})}),a.sliderWrapper.on("click","a.delete",function(){var e=g(this).closest(".image-gallery"),t=g(this).closest(".image-gallery ul.slides-wrapper"),i=e.find(".image_gallery_ids"),a="";g(this).closest("li.image").remove(),t.find("li.image").css("cursor","default").each(function(){var e=g(this).attr("data-attachment_id");a=a+e+","}),i.val(a)})),l.each(function(){g(this).find("img").on("click",function(){var e=g(this).closest(".yith-plugin-fw-sidebar-layout"),t=e.find(".yith-plugin-fw-sidebar-layout-sidebar-left-container"),i=e.find(".yith-plugin-fw-sidebar-layout-sidebar-right-container"),a=g(this).data("type");if(g(this).parent().children(":radio").attr("checked",!1),g(this).prev(":radio").attr("checked",!0),void 0!==a)switch(a){case"left":t.show(),i.hide();break;case"right":i.show(),t.hide();break;case"double":t.show(),i.show();break;default:t.hide(),i.hide()}})}),o.each(function(){var e=g(this).data("val"),t=g(this).data("min"),i=g(this).data("max"),a=g(this).data("step"),l=g(this).data("labels");g(this).slider({value:e,min:t,max:i,range:"min",step:a,create:function(){g(this).find(".ui-slider-handle").text(g(this).slider("value"))},slide:function(e,t){g(this).find("input").val(t.value),g(this).find(".ui-slider-handle").text(t.value),g(this).siblings(".feedback").find("strong").text(t.value+l)}})}),r.each(function(e,t){var i=CodeMirror.fromTextArea(t,{lineNumbers:1,mode:"javascript",showCursorWhenSelecting:!0});g(t).data("codemirrorInstance",i)}),g(document).on("click",".yith-plugin-fw-select-all",function(){g("#"+g(this).data("select-id")).find("option").prop("selected",!0).trigger("change")}),g(document).on("click",".yith-plugin-fw-deselect-all",function(){g("#"+g(this).data("select-id")).find("option").prop("selected",!1).trigger("change")}),d.each(function(){var o=g(this),r=o.find(".yit-icons-manager-icon-preview").first(),d=o.find(".yit-icons-manager-icon-text");o.on("click",".yit-icons-manager-list li",function(e){var t=g(e.target).closest("li"),i=t.data("font"),a=t.data("icon"),l=t.data("key"),n=t.data("name");r.attr("data-font",i),r.attr("data-icon",a),r.attr("data-key",l),r.attr("data-name",n),d.val(i+":"+n),o.find(".yit-icons-manager-list li").removeClass("active"),t.addClass("active")}),o.on("click",".yit-icons-manager-action-set-default",function(){o.find(".yit-icons-manager-list li.default").trigger("click")})}),g(document).on("click",".yith-plugin-fw-select-images__item",function(){var e=g(this),t=e.data("key"),i=e.closest(".yith-plugin-fw-select-images__wrapper"),a=i.find(".yith-plugin-fw-select-images__item"),l=i.find("select").first();l.length&&(l.val(t),a.removeClass("yith-plugin-fw-select-images__item--selected"),e.addClass("yith-plugin-fw-select-images__item--selected"))}),g(document.body).trigger("wc-enhanced-select-init"),g(document).find(".ui-sortable .yith-toggle-elements").sortable({cursor:"move",axis:"y",scrollSensitivity:40,forcePlaceholderSize:!0,helper:"clone",stop:function(e,t){var i=jQuery(".ui-sortable-handle"),a=0,l=new Array;for(a=0;a<i.length;a++)l[a]=g(i[a]).data("item_key");0<l.length&&g(this).closest(".toggle-element").saveToggleElement(null,l)}}),g.each(s,function(){var e=g(this).find("fieldset");3<e.length&&e.length<6&&g(this).addClass("two-cols"),6<e.length&&g(this).addClass("three-cols")}),g(document.body).trigger("yith-framework-enhanced-select-init")}h(),g(document).on("click",".yith-plugin-fw-onoff-container span",function(){var e=g(this).prev("input");e.prop("checked")?e.prop("checked",!1).attr("value","no").removeClass("onoffchecked"):e.prop("checked",!0).attr("value","yes").addClass("onoffchecked"),e.change()}),g.fn.saveToggleElement=function(t,e){var i=g(this),a="yith_plugin_fw_save_toggle_element",l=i.serializeToggleElement(),n=i.find(".yith-toggle_wrapper").attr("id"),o=g.urlParam("tab");void 0!==e&&0<e.length&&l.append("yith_toggle_elements_order_keys",e),i.closest(".metaboxes-tab.yith-plugin-ui").length?(a="yith_plugin_fw_save_toggle_element_metabox",post_id=g(this).closest("form#post").find("#post_ID").val(),yit_metaboxes_nonce=g(this).closest("form#post").find("#yit_metaboxes_nonce").val(),url=yith_framework_fw_fields.ajax_url+"?action="+a+"&post_ID="+post_id+"&yit_metaboxes_nonce="+yit_metaboxes_nonce+"&toggle_id="+n):url=yith_framework_fw_fields.admin_url+"?action="+a+"&tab="+o+"&toggle_id="+n,g.ajax({type:"POST",url:url,data:l,contentType:!1,processData:!1,success:function(e){t&&t.removeClass("show"),g(document).trigger("yith_save_toggle_element_done",[e,i])}})},g.fn.serializeToggleElement=function(){var e=g(this),i=new FormData,t=g(e).find(":input").serializeArray();return g.each(t,function(e,t){el_name=t.name,i.append(t.name,t.value)}),i},g.fn.formatToggleTitle=function(){var e=g(this),t=e.find(":input"),i=e.find("span.title").data("title_format"),a=e.find(".subtitle").data("subtitle_format"),l=new RegExp("[^%%]+(?=[%%])","g");if(void 0!==i)var n=i.match(l);if(void 0!==a)var o=a.match(l);g.each(t,function(e,t){void 0!==g(t).attr("id")&&($field_id=g(t).attr("id"),$field_array=$field_id.split("_"),$field_array.pop(),$field_id=$field_array.join("_"),$field_val=g(t).val(),null!=n&&void 0!==n&&-1!==n.indexOf($field_id)&&(i=i.replace("%%"+$field_id+"%%",$field_val)),null!=o&&void 0!==o&&-1!==o.indexOf($field_id)&&(a=a.replace("%%"+$field_id+"%%",$field_val)))}),""!==i&&e.find("span.title").html(i),""!==a&&e.find(".subtitle").html(a),g(document).trigger("yith-toggle-element-item-title",[e])},g.urlParam=function(e){var t=new RegExp("[?&]"+e+"=([^&#]*)").exec(window.location.search);return null!==t&&(t[1]||0)},g(document).on("click",".yith-toggle",function(e){var t=g(e.target).closest(".yith-toggle-row"),i=t.find(".yith-toggle-content");t.is(".yith-toggle-row-opened")?i.slideUp(400):i.slideDown(400),t.toggleClass("yith-toggle-row-opened")}),g(document).on("click",".yith-add-box-button",function(e){e.preventDefault();var t=g(this).data("box_id"),i=g(this).closest(".yith-toggle_wrapper").attr("id");template=wp.template("yith-toggle-element-add-box-content-"+i),""!==t&&(g("#"+t).html(template({index:"box_id"})).slideToggle(),h(),g(document).trigger("yith-add-box-button-toggle",[g(this)]))}),g(document).on("click",".yith-add-box-buttons .yith-save-button",function(e){e.preventDefault();var t=g(this).parents(".yith-add-box"),i=g(this).closest(".yith-toggle_wrapper").attr("id"),a=t.find(".spinner"),l=g(this).parents(".toggle-element"),n=t.find(":input"),o=l.find(".yith-toggle-row").length,r=g('<input type="hidden">');r.val(o),g(document).trigger("yith-toggle-change-counter",[r,t]),o=r.val();var d=wp.template("yith-toggle-element-item-"+i),s=g(d({index:o}));a.addClass("show"),g.each(n,function(e,t){void 0!==g(t).attr("id")&&($field_id=g(t).attr("id"),$field_val=g(t).val(),"radio"==g(t).attr("type")?($field_id=$field_id.replace("new_",""),$field_id=$field_id.replace("-"+$field_val,""),$field_id=$field_id+"_dataindex-"+$field_val):$field_id=$field_id.replace("new_","")+"_"+o,g(t).is(":checked")&&g(s).find("#"+$field_id).prop("checked",!0),(g(t).hasClass("yith-post-search")||g(t).hasClass("yith-term-search"))&&g(s).find("#"+$field_id).html(g("#"+g(t).attr("id")).html()),g(s).find("#"+$field_id).val($field_val))}),g(s).formatToggleTitle();var c=g('<input type="hidden">').val("yes");g(document).trigger("yith-toggle-element-item-before-add",[t,s,c]),"yes"===c.val()&&(g(l).find(".yith-toggle-elements").append(s),g(t).find(".yith-plugin-fw-datepicker").datepicker("destroy"),g(t).html("").toggle(),l.saveToggleElement(),h())}),g(document).on("click",".yith-toggle-row .yith-save-button",function(e){e.preventDefault();var t=g(this).closest(".toggle-element"),i=g(this).closest(".yith-toggle-row"),a=i.find(".spinner");i.formatToggleTitle();var l=g('<input type="hidden">').val("yes");g(document).trigger("yith-toggle-element-item-before-update",[t,i,l]),"yes"===l.val()&&(a.addClass("show"),t.saveToggleElement(a))}),g(document).on("click",".yith-toggle-row .yith-delete-button",function(e){e.preventDefault();var t=g(this).closest(".toggle-element");g(this).closest(".yith-toggle-row").remove(),t.saveToggleElement()}),g(document).on("click",".yith-toggle-onoff",function(e){e.preventDefault(),g(this).closest(".toggle-element").saveToggleElement()})});
|
1 |
+
jQuery(function(g){function f(){var e=g(".yith-plugin-fw-datepicker"),t=g(".yith-plugin-fw-colorpicker"),n={imgPreviewHandler:".yith-plugin-fw-upload-img-preview",uploadButtonHandler:".yith-plugin-fw-upload-button",imgUrlHandler:".yith-plugin-fw-upload-img-url",resetButtonHandler:".yith-plugin-fw-upload-button-reset",imgUrl:g(".yith-plugin-fw-upload-img-url")},i=g(".add_media"),a={sliderWrapper:g(".yith-plugin-fw .image-gallery ul.slides-wrapper"),buttonHandler:".yith-plugin-fw .image-gallery-button"},l=g(".yith-plugin-fw-sidebar-layout"),o=g(".yith-plugin-fw .yith-plugin-fw-slider-container .ui-slider-horizontal"),r=g(".codemirror"),d=g(".yit-icons-manager-wrapper"),s=g(".yith-plugin-ui td.forminp-checkbox");if(e.each(function(){var e=g(this).data();g(this).datepicker(e)}),t.wpColorPicker({palettes:!1,width:200,mode:"hsl",clear:function(){var e=g(this);e.val(e.data("default-color")),e.change()}}),t.each(function(){var e=g(this).data("variations-label"),t=g(this).closest(".yith-plugin-fw-field-wrapper"),i=t.find(".wp-picker-input-wrap");if(t.find("a.wp-color-result").attr("title",e),!i.find(".wp-picker-clear-custom").length){var a=g("<span/>").attr({class:"wp-picker-default-custom"});i.find(".wp-picker-default").wrap(a)}}),"undefined"!=typeof wp&&void 0!==wp.media){n.imgUrl.change(function(){var e=g(this).val(),t=new RegExp("(http|ftp|https)://[a-zA-Z0-9@?^=%&:/~+#-_.]*.(gif|jpg|jpeg|png|ico)"),i=g(this).parent().find(n.imgPreviewHandler).first();i.length<1&&(i=g(this).parent().parent().find(n.imgPreviewHandler).first()),t.test(e)?i.html('<img src="'+e+'" style="max-width:100px; max-height:100px;" />'):i.html("")}).trigger("change"),g(document).on("click",n.uploadButtonHandler,function(e){e.preventDefault();var t,i=g(this).attr("id").replace(/-button$/,"");if(t)t.open();else{var a=[new wp.media.controller.Library({library:wp.media.query(),multiple:!1,title:"Choose Image",priority:20,filterable:"uploaded"})];(t=wp.media.frames.downloadable_file=wp.media({title:"Choose Image",library:{type:""},button:{text:"Choose Image"},multiple:!1,states:a})).on("select",function(){var e=t.state().get("selection").first().toJSON();g("#"+i).val(e.url),g("#"+i+"-yith-attachment-id")&&g("#"+i+"-yith-attachment-id").val(e.id),n.imgUrl.trigger("change")}),t.open()}}),g(document).on("click",n.resetButtonHandler,function(e){var t=g(this),i=t.attr("id"),a=t.attr("id").replace(/-button-reset$/,""),l=g("#"+i).data("default");g("#"+a).val(l),n.imgUrl.trigger("change")})}i.on("click",function(){!1}),"undefined"!=typeof wp&&void 0!==wp.media&&(g(document).on("click",a.buttonHandler,function(e){var t=g(this),i=t.closest(".image-gallery"),a=i.find(".image_gallery_ids"),l=a.val(),n=i.find("ul.slides-wrapper"),o=wp.media.frames.image_gallery=wp.media({title:t.data("choose"),button:{text:t.data("update")},states:[new wp.media.controller.Library({title:t.data("choose"),filterable:"all",multiple:!0})]});o.on("select",function(){o.state().get("selection").map(function(e){(e=e.toJSON()).id&&(l=l?l+","+e.id:e.id,n.append('<li class="image" data-attachment_id="'+e.id+'"><img src="'+e.sizes.thumbnail.url+'"/><ul class="actions"><li><a href="#" class="delete" title="'+t.data("delete")+'">x</a></li></ul></li>'))}),a.val(l)}),o.open()}),a.sliderWrapper.each(function(){var a=g(this);a.sortable({items:"li.image",cursor:"move",scrollSensitivity:40,forcePlaceholderSize:!0,forceHelperSize:!1,helper:"clone",opacity:.65,start:function(e,t){t.item.css("background-color","#f6f6f6")},stop:function(e,t){t.item.removeAttr("style")},update:function(e,t){var i="";a.find("li.image").css("cursor","default").each(function(){var e=g(this).attr("data-attachment_id");i=i+e+","}),a.closest(".image-gallery").find(".image_gallery_ids").val(i)}})}),a.sliderWrapper.on("click","a.delete",function(){var e=g(this).closest(".image-gallery"),t=g(this).closest(".image-gallery ul.slides-wrapper"),i=e.find(".image_gallery_ids"),a="";g(this).closest("li.image").remove(),t.find("li.image").css("cursor","default").each(function(){var e=g(this).attr("data-attachment_id");a=a+e+","}),i.val(a)})),l.each(function(){g(this).find("img").on("click",function(){var e=g(this).closest(".yith-plugin-fw-sidebar-layout"),t=e.find(".yith-plugin-fw-sidebar-layout-sidebar-left-container"),i=e.find(".yith-plugin-fw-sidebar-layout-sidebar-right-container"),a=g(this).data("type");if(g(this).parent().children(":radio").attr("checked",!1),g(this).prev(":radio").attr("checked",!0),void 0!==a)switch(a){case"left":t.show(),i.hide();break;case"right":i.show(),t.hide();break;case"double":t.show(),i.show();break;default:t.hide(),i.hide()}})}),o.each(function(){var e=g(this).data("val"),t=g(this).data("min"),i=g(this).data("max"),a=g(this).data("step"),l=g(this).data("labels");g(this).slider({value:e,min:t,max:i,range:"min",step:a,create:function(){g(this).find(".ui-slider-handle").text(g(this).slider("value"))},slide:function(e,t){g(this).find("input").val(t.value),g(this).find(".ui-slider-handle").text(t.value),g(this).siblings(".feedback").find("strong").text(t.value+l)}})}),r.each(function(e,t){var i=CodeMirror.fromTextArea(t,{lineNumbers:1,mode:"javascript",showCursorWhenSelecting:!0});g(t).data("codemirrorInstance",i)}),g(document).on("click",".yith-plugin-fw-select-all",function(){g("#"+g(this).data("select-id")).find("option").prop("selected",!0).trigger("change")}),g(document).on("click",".yith-plugin-fw-deselect-all",function(){g("#"+g(this).data("select-id")).find("option").prop("selected",!1).trigger("change")}),d.each(function(){var o=g(this),r=o.find(".yit-icons-manager-icon-preview").first(),d=o.find(".yit-icons-manager-icon-text");o.on("click",".yit-icons-manager-list li",function(e){var t=g(e.target).closest("li"),i=t.data("font"),a=t.data("icon"),l=t.data("key"),n=t.data("name");r.attr("data-font",i),r.attr("data-icon",a),r.attr("data-key",l),r.attr("data-name",n),d.val(i+":"+n),o.find(".yit-icons-manager-list li").removeClass("active"),t.addClass("active")}),o.on("click",".yit-icons-manager-action-set-default",function(){o.find(".yit-icons-manager-list li.default").trigger("click")})}),g(document).on("click",".yith-plugin-fw-select-images__item",function(){var e=g(this),t=e.data("key"),i=e.closest(".yith-plugin-fw-select-images__wrapper"),a=i.find(".yith-plugin-fw-select-images__item"),l=i.find("select").first();l.length&&(l.val(t),a.removeClass("yith-plugin-fw-select-images__item--selected"),e.addClass("yith-plugin-fw-select-images__item--selected"))}),g(document.body).trigger("wc-enhanced-select-init"),g(document).find(".ui-sortable .yith-toggle-elements").sortable({cursor:"move",axis:"y",scrollSensitivity:40,forcePlaceholderSize:!0,helper:"clone",stop:function(e,t){var i=jQuery(".ui-sortable-handle"),a=0,l=new Array;for(a=0;a<i.length;a++)l[a]=g(i[a]).data("item_key");0<l.length&&g(this).closest(".toggle-element").saveToggleElement(null,l)}}),g.each(s,function(){var e=g(this).find("fieldset");3<e.length&&e.length<6&&g(this).addClass("two-cols"),6<e.length&&g(this).addClass("three-cols")}),g(document.body).trigger("yith-framework-enhanced-select-init")}f(),g(document).on("click",".yith-plugin-fw-onoff-container span",function(){var e=g(this).prev("input");e.prop("checked")?e.prop("checked",!1).attr("value","no").removeClass("onoffchecked"):e.prop("checked",!0).attr("value","yes").addClass("onoffchecked"),e.change()}),g.fn.saveToggleElement=function(t,e){var i=g(this),a="yith_plugin_fw_save_toggle_element",l=i.serializeToggleElement(),n=i.find(".yith-toggle_wrapper").attr("id"),o=g.urlParam("tab");void 0!==e&&0<e.length&&l.append("yith_toggle_elements_order_keys",e),i.closest(".metaboxes-tab.yith-plugin-ui").length?(a="yith_plugin_fw_save_toggle_element_metabox",post_id=g(this).closest("form#post").find("#post_ID").val(),yit_metaboxes_nonce=g(this).closest("form#post").find("#yit_metaboxes_nonce").val(),url=yith_framework_fw_fields.ajax_url+"?action="+a+"&post_ID="+post_id+"&yit_metaboxes_nonce="+yit_metaboxes_nonce+"&toggle_id="+n):url=yith_framework_fw_fields.admin_url+"?action="+a+"&tab="+o+"&toggle_id="+n,g.ajax({type:"POST",url:url,data:l,contentType:!1,processData:!1,success:function(e){t&&t.removeClass("show"),g(document).trigger("yith_save_toggle_element_done",[e,i])}})},g.fn.serializeToggleElement=function(){var e=g(this),i=new FormData,t=g(e).find(":input").serializeArray();return g.each(t,function(e,t){el_name=t.name,i.append(t.name,t.value)}),i},g.fn.formatToggleTitle=function(){var e=g(this),t=e.find(":input"),i=e.find("span.title").data("title_format"),a=e.find(".subtitle").data("subtitle_format"),l=new RegExp("[^%%]+(?=[%%])","g");if(void 0!==i)var n=i.match(l);if(void 0!==a)var o=a.match(l);g.each(t,function(e,t){void 0!==g(t).attr("id")&&($field_id=g(t).attr("id"),$field_array=$field_id.split("_"),$field_array.pop(),$field_id=$field_array.join("_"),$field_val=g(t).val(),null!=n&&void 0!==n&&-1!==n.indexOf($field_id)&&(i=i.replace("%%"+$field_id+"%%",$field_val)),null!=o&&void 0!==o&&-1!==o.indexOf($field_id)&&(a=a.replace("%%"+$field_id+"%%",$field_val)))}),""!==i&&e.find("span.title").html(i),""!==a&&e.find(".subtitle").html(a),g(document).trigger("yith-toggle-element-item-title",[e])},g.urlParam=function(e){var t=new RegExp("[?&]"+e+"=([^&#]*)").exec(window.location.search);return null!==t&&(t[1]||0)},g(document).on("click",".yith-toggle",function(e){var t=g(e.target).closest(".yith-toggle-row"),i=t.find(".yith-toggle-content");t.is(".yith-toggle-row-opened")?i.slideUp(400):i.slideDown(400),t.toggleClass("yith-toggle-row-opened")}),g(document).on("click",".yith-add-box-button",function(e){e.preventDefault();var t=g(this).data("box_id"),i=g(this).closest(".yith-toggle_wrapper").attr("id");template=wp.template("yith-toggle-element-add-box-content-"+i),""!==t&&(g("#"+t).html(template({index:"box_id"})).slideToggle(),f(),g(document).trigger("yith-add-box-button-toggle",[g(this)]))}),g(document).on("click",".yith-add-box-buttons .yith-save-button",function(e){e.preventDefault();var t=g(this).parents(".yith-add-box"),i=g(this).closest(".yith-toggle_wrapper").attr("id"),a=t.find(".spinner"),l=g(this).parents(".toggle-element"),n=t.find(":input"),o=l.find(".yith-toggle-row").length,r=g('<input type="hidden">');r.val(o),g(document).trigger("yith-toggle-change-counter",[r,t]),o=r.val();var d=wp.template("yith-toggle-element-item-"+i),s=g(d({index:o}));a.addClass("show"),g.each(n,function(e,t){void 0!==g(t).attr("id")&&($field_id=g(t).attr("id"),$field_val=g(t).val(),"radio"==g(t).attr("type")?($field_id=$field_id.replace("new_",""),$field_id=$field_id.replace("-"+$field_val,""),$field_id=$field_id+"_dataindex-"+$field_val):$field_id=$field_id.replace("new_","")+"_"+o,g(t).is(":checked")&&g(s).find("#"+$field_id).prop("checked",!0),(g(t).hasClass("yith-post-search")||g(t).hasClass("yith-term-search"))&&g(s).find("#"+$field_id).html(g("#"+g(t).attr("id")).html()),g(s).find("#"+$field_id).val($field_val))}),g(s).formatToggleTitle();var c=g('<input type="hidden">').val("yes");g(document).trigger("yith-toggle-element-item-before-add",[t,s,c]),"yes"===c.val()&&(g(l).find(".yith-toggle-elements").append(s),g(t).find(".yith-plugin-fw-datepicker").datepicker("destroy"),g(t).html("").toggle(),l.saveToggleElement(),f())}),g(document).on("click",".yith-toggle-row .yith-save-button",function(e){e.preventDefault();var t=g(this).closest(".toggle-element"),i=g(this).closest(".yith-toggle-row"),a=i.find(".spinner");i.formatToggleTitle();var l=g('<input type="hidden">').val("yes");g(document).trigger("yith-toggle-element-item-before-update",[t,i,l]),"yes"===l.val()&&(a.addClass("show"),t.saveToggleElement(a))}),g(document).on("click",".yith-toggle-row .yith-delete-button",function(e){e.preventDefault();var t=g(this).closest(".toggle-element");g(this).closest(".yith-toggle-row").remove(),t.saveToggleElement()}),g(document).on("click",".yith-toggle-onoff",function(e){e.preventDefault(),g(this).closest(".toggle-element").saveToggleElement()})});
|
plugin-fw/init.php
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Framework Name: YIT Plugin Framework
|
4 |
-
* Version: 3.2
|
5 |
* Author: YITHEMES
|
6 |
* Text Domain: yith-plugin-fw
|
7 |
* Domain Path: /languages/
|
8 |
*
|
9 |
* @author Your Inspiration Themes
|
10 |
-
* @version 3.
|
11 |
*/
|
12 |
/**
|
13 |
* This file belongs to the YIT Plugin Framework.
|
1 |
<?php
|
2 |
/**
|
3 |
* Framework Name: YIT Plugin Framework
|
4 |
+
* Version: 3.3.2
|
5 |
* Author: YITHEMES
|
6 |
* Text Domain: yith-plugin-fw
|
7 |
* Domain Path: /languages/
|
8 |
*
|
9 |
* @author Your Inspiration Themes
|
10 |
+
* @version 3.3.2
|
11 |
*/
|
12 |
/**
|
13 |
* This file belongs to the YIT Plugin Framework.
|
plugin-fw/lib/promo/black.jpg
ADDED
Binary file
|
plugin-fw/lib/promo/cyber.jpg
ADDED
Binary file
|
plugin-fw/lib/promo/halloween.jpg
ADDED
Binary file
|
plugin-fw/lib/promo/yith-promo.php
ADDED
@@ -0,0 +1,189 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
|
11 |
+
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 |
+
|
18 |
+
if( ! function_exists( 'yith_plugin_fw_promo_notices' ) ){
|
19 |
+
function yith_plugin_fw_promo_notices(){
|
20 |
+
if( function_exists( 'current_user_can' ) && ! current_user_can( 'administrator' ) ){
|
21 |
+
return false;
|
22 |
+
}
|
23 |
+
|
24 |
+
$base_url = apply_filters( 'yith_plugin_fw_promo_base_url', YIT_CORE_PLUGIN_URL . '/lib/promo/' );
|
25 |
+
$xml = apply_filters( 'yith_plugin_fw_promo_xml_url', $base_url . 'yith-promo.xml' );
|
26 |
+
$transient = "yith_promo_message";
|
27 |
+
$remote_data = get_site_transient( $transient );
|
28 |
+
$regenerate_promo_transient = isset( $_GET['yith_regenerate_promo_transient'] ) && 'yes' == $_GET['yith_regenerate_promo_transient'] ? $_GET['yith_regenerate_promo_transient'] : '';
|
29 |
+
$promo_data = false;
|
30 |
+
$create_transient = false;
|
31 |
+
|
32 |
+
if( false === $remote_data || apply_filters( 'yith_plugin_fw_force_regenerate_promo_transient', false ) || 'yes' == $regenerate_promo_transient ){
|
33 |
+
$remote_data = file_get_contents( $xml );
|
34 |
+
$create_transient = true;
|
35 |
+
}
|
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;
|
69 |
+
/* === Check for Special Promo === */
|
70 |
+
if( ! empty( $promo->show_promo_in ) ){
|
71 |
+
$show_promo_in = explode( ',', $promo->show_promo_in );
|
72 |
+
$show_promo_in = array_map( 'trim', $show_promo_in );
|
73 |
+
if( ! empty( $show_promo_in ) ){
|
74 |
+
$show_promo = false;
|
75 |
+
foreach( $show_promo_in as $plugin ){
|
76 |
+
$plugin_slug = constant( $plugin );
|
77 |
+
$plugin_is_activated = ! empty( $license[ $plugin_slug ]['activated'] );
|
78 |
+
if( defined( $plugin ) && ! apply_filters( 'yith_plugin_fw_promo_plugin_is_activated', $plugin_is_activated ) ){
|
79 |
+
$show_promo = true;
|
80 |
+
break;
|
81 |
+
}
|
82 |
+
}
|
83 |
+
}
|
84 |
+
}
|
85 |
+
|
86 |
+
$start_date = isset( $promo->start_date ) ? $promo->start_date : '';
|
87 |
+
$end_date = isset( $promo->end_date ) ? $promo->end_date : '';
|
88 |
+
|
89 |
+
if( $show_promo && ! empty( $start_date ) && ! empty( $end_date ) ){
|
90 |
+
$start_date = strtotime( $start_date );
|
91 |
+
$end_date = strtotime( $end_date );
|
92 |
+
|
93 |
+
if( $end_date >= $start_date && $now >= $start_date && $now <= $end_date ){
|
94 |
+
//is valid promo
|
95 |
+
$title = isset( $promo->title ) ? $promo->title : '';
|
96 |
+
$description = isset( $promo->description ) ? $promo->description : '';
|
97 |
+
$url = isset( $promo->link->url ) ? $promo->link->url : '';
|
98 |
+
$url_label = isset( $promo->link->label ) ? $promo->link->label : '';
|
99 |
+
$image_bg_color = isset( $promo->style->image_bg_color ) ? $promo->style->image_bg_color : '';
|
100 |
+
$border_color = isset( $promo->style->border_color ) ? $promo->style->border_color : '';
|
101 |
+
$background_color = isset( $promo->style->background_color ) ? $promo->style->background_color : '';
|
102 |
+
$promo_id = isset( $promo->promo_id ) ? $promo->promo_id : '';
|
103 |
+
$banner = isset( $promo->banner ) ? $promo->banner : '';
|
104 |
+
$style = $link = '';
|
105 |
+
$show_notice = false;
|
106 |
+
|
107 |
+
if( ! empty( $border_color ) ){
|
108 |
+
$style .= "border-left-color: {$border_color};";
|
109 |
+
}
|
110 |
+
|
111 |
+
if( ! empty( $background_color ) ){
|
112 |
+
$style .= "background-color: {$background_color};";
|
113 |
+
}
|
114 |
+
|
115 |
+
if( ! empty( $image_bg_color ) ){
|
116 |
+
$image_bg_color = "background-color: {$image_bg_color};";
|
117 |
+
}
|
118 |
+
|
119 |
+
if( ! empty( $title ) ) {
|
120 |
+
$promo_id .= $title;
|
121 |
+
$title = sprintf( '%s: ', $title );
|
122 |
+
$show_notice = true;
|
123 |
+
}
|
124 |
+
|
125 |
+
if( ! empty( $description ) ) {
|
126 |
+
$promo_id .= $description;
|
127 |
+
$description = sprintf( '%s', $description );
|
128 |
+
$show_notice = true;
|
129 |
+
}
|
130 |
+
|
131 |
+
if( ! empty( $url ) && ! empty( $url_label )) {
|
132 |
+
$promo_id .= $url . $url_label;
|
133 |
+
$link = sprintf( '<a href="%s" target="_blank">%s</a>', $url, $url_label );
|
134 |
+
$show_notice = true;
|
135 |
+
}
|
136 |
+
|
137 |
+
if( ! empty( $banner ) ){
|
138 |
+
$banner = sprintf( '<img src="%s" class="yith-promo-banner-image">', $base_url . $banner );
|
139 |
+
|
140 |
+
if( ! empty( $url ) ){
|
141 |
+
$banner = sprintf( '<a class="yith-promo-banner-image-link" href="%s" target="_blank" style="%s">%s</a>', $url, $image_bg_color, $banner);
|
142 |
+
}
|
143 |
+
}
|
144 |
+
|
145 |
+
$unique_promo_id = "yith-notice-" . md5 ( $promo_id );
|
146 |
+
|
147 |
+
if( ! empty( $_COOKIE[ 'hide_' . $unique_promo_id ] ) && 'yes' == $_COOKIE[ 'hide_' . $unique_promo_id ] ){
|
148 |
+
$show_notice = false;
|
149 |
+
}
|
150 |
+
|
151 |
+
if ( true === $show_notice ) :
|
152 |
+
wp_enqueue_script( 'yith-promo' );
|
153 |
+
?>
|
154 |
+
<div id="<?php echo $unique_promo_id; ?>" class="yith-notice-is-dismissible notice notice-yith notice-alt is-dismissible" style="<?php echo $style; ?>" data-expiry= <?php echo $promo->end_date; ?>>
|
155 |
+
<p>
|
156 |
+
<?php if( ! empty( $banner ) ) { printf( '%s', $banner ); } ?>
|
157 |
+
<?php printf( "%s %s %s", $title, $description, $link ); ?>
|
158 |
+
</p>
|
159 |
+
</div>
|
160 |
+
<?php endif;
|
161 |
+
}
|
162 |
+
}
|
163 |
+
}
|
164 |
+
}
|
165 |
+
}
|
166 |
+
}
|
167 |
+
}
|
168 |
+
|
169 |
+
if( ! function_exists( 'yith_plugin_fw_notice_dismiss' ) ){
|
170 |
+
function yith_plugin_fw_notice_dismiss(){
|
171 |
+
$script_path = defined( 'YIT_CORE_PLUGIN_URL' ) ? YIT_CORE_PLUGIN_URL : get_template_directory_uri() . '/core/plugin-fw';
|
172 |
+
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
|
173 |
+
wp_register_script( 'yith-promo', $script_path . '/assets/js/yith-promo' . $suffix . '.js', array( 'jquery' ), '1.0.0', true );
|
174 |
+
}
|
175 |
+
}
|
176 |
+
|
177 |
+
if( ! function_exists( 'yith_plugin_fw_get_promo_transient_expiry_date' ) ){
|
178 |
+
function yith_plugin_fw_get_promo_transient_expiry_date( $expiry_date ) {
|
179 |
+
$xml_expiry_date = ! empty( $expiry_date ) ? $expiry_date : '+24 hours';
|
180 |
+
$current = strtotime( current_time( 'Y-m-d H:i:s' ) );
|
181 |
+
$expiry_date = strtotime( $xml_expiry_date, $current );
|
182 |
+
|
183 |
+
if( $expiry_date <= $current ){
|
184 |
+
$expiry_date = strtotime( '+24 hours', $current );
|
185 |
+
}
|
186 |
+
|
187 |
+
return $expiry_date;
|
188 |
+
}
|
189 |
+
}
|
plugin-fw/lib/promo/yith-promo.xml
ADDED
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<!-- Default border color: #acc327 -->
|
3 |
+
<!-- Default background color: #ecf7ed -->
|
4 |
+
|
5 |
+
<promotions>
|
6 |
+
<expiry_date>2019-12-10</expiry_date>
|
7 |
+
<promo>
|
8 |
+
<promo_id>yithhalloween2019</promo_id>
|
9 |
+
<banner>halloween.jpg</banner>
|
10 |
+
<title><![CDATA[<strong>YITH Halloween</strong>]]></title>
|
11 |
+
<description><![CDATA[
|
12 |
+
Don't miss our <strong>30% discount</strong> on all our products! No coupon needed in cart. Valid only on <strong>31st October</strong>.
|
13 |
+
]]></description>
|
14 |
+
<link>
|
15 |
+
<label>Get your deals now!</label>
|
16 |
+
<url><![CDATA[https://yithemes.com]]></url>
|
17 |
+
</link>
|
18 |
+
<style>
|
19 |
+
<image_bg_color>#005c7d</image_bg_color>
|
20 |
+
<border_color>#ea5105</border_color>
|
21 |
+
<background_color>#ffffff</background_color>
|
22 |
+
</style>
|
23 |
+
<start_date>2019-10-30 16:00:00</start_date>
|
24 |
+
<end_date>2019-11-01 08:00:00</end_date>
|
25 |
+
</promo>
|
26 |
+
<promo>
|
27 |
+
<promo_id>yithcybermonday2019</promo_id>
|
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>
|
35 |
+
<url><![CDATA[https://yithemes.com]]></url>
|
36 |
+
</link>
|
37 |
+
<style>
|
38 |
+
<image_bg_color>#12fdd4</image_bg_color>
|
39 |
+
<border_color>#181d7b</border_color>
|
40 |
+
<background_color>#ffffff</background_color>
|
41 |
+
</style>
|
42 |
+
<start_date>2019-12-01 00:00:00</start_date>
|
43 |
+
<end_date>2019-12-03 08:00:00</end_date>
|
44 |
+
</promo>
|
45 |
+
<promo>
|
46 |
+
<promo_id>yithblackfriday2019</promo_id>
|
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>
|
54 |
+
<url><![CDATA[https://yithemes.com]]></url>
|
55 |
+
</link>
|
56 |
+
<style>
|
57 |
+
<image_bg_color>#272121</image_bg_color>
|
58 |
+
<border_color>#272121</border_color>
|
59 |
+
<background_color>#ffffff</background_color>
|
60 |
+
</style>
|
61 |
+
<start_date>2019-11-27 23:59:59</start_date>
|
62 |
+
<end_date>2019-11-30 23:59:59</end_date>
|
63 |
+
</promo>
|
64 |
+
</promotions>
|
plugin-fw/lib/yit-metabox.php
CHANGED
@@ -136,6 +136,7 @@ if ( !class_exists( 'YIT_Metabox' ) ) {
|
|
136 |
add_filter( 'yit_icons_screen_ids', array( $this, 'add_screen_ids_for_icons' ) );
|
137 |
|
138 |
add_action( 'wp_ajax_yith_plugin_fw_save_toggle_element_metabox', array( $this, 'save_toggle_element' ) );
|
|
|
139 |
}
|
140 |
|
141 |
/**
|
@@ -586,6 +587,37 @@ if ( !class_exists( 'YIT_Metabox' ) ) {
|
|
586 |
}
|
587 |
}
|
588 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
589 |
/**
|
590 |
* Save the element toggle via Ajax.
|
591 |
*
|
136 |
add_filter( 'yit_icons_screen_ids', array( $this, 'add_screen_ids_for_icons' ) );
|
137 |
|
138 |
add_action( 'wp_ajax_yith_plugin_fw_save_toggle_element_metabox', array( $this, 'save_toggle_element' ) );
|
139 |
+
add_filter( 'admin_body_class', array( $this, 'add_body_class' ), 10, 1 );
|
140 |
}
|
141 |
|
142 |
/**
|
587 |
}
|
588 |
}
|
589 |
|
590 |
+
|
591 |
+
/**
|
592 |
+
* Add custom class to body
|
593 |
+
*
|
594 |
+
* It is necessary to add new style to the metaboxes
|
595 |
+
*
|
596 |
+
* @param $classes
|
597 |
+
*
|
598 |
+
* @return string
|
599 |
+
* @author Emanuela Castorina
|
600 |
+
*/
|
601 |
+
public function add_body_class( $classes ) {
|
602 |
+
global $post;
|
603 |
+
|
604 |
+
$exclude_post_types = apply_filters( 'yith_plugin_fw_exclude_post_types_to_additional_classes', array( 'product' ) );
|
605 |
+
|
606 |
+
if ( $post && in_array( $post->post_type, $exclude_post_types ) ) {
|
607 |
+
return $classes;
|
608 |
+
}
|
609 |
+
|
610 |
+
$new_class = apply_filters( 'yith_plugin_fw_metabox_class', '', $post );
|
611 |
+
|
612 |
+
if ( empty( $new_class ) ) {
|
613 |
+
return $classes;
|
614 |
+
}
|
615 |
+
|
616 |
+
$classes = yith_plugin_fw_remove_duplicate_classes( $classes. ' '. $new_class);
|
617 |
+
|
618 |
+
return $classes;
|
619 |
+
}
|
620 |
+
|
621 |
/**
|
622 |
* Save the element toggle via Ajax.
|
623 |
*
|
plugin-fw/lib/yit-plugin-licence.php
CHANGED
@@ -58,7 +58,10 @@ if ( ! class_exists( 'YIT_Plugin_Licence' ) ) {
|
|
58 |
yith_plugin_fw_load_update_and_licence_files();
|
59 |
}
|
60 |
|
61 |
-
|
|
|
|
|
|
|
62 |
}
|
63 |
|
64 |
/**
|
58 |
yith_plugin_fw_load_update_and_licence_files();
|
59 |
}
|
60 |
|
61 |
+
try {
|
62 |
+
YITH_Plugin_Licence()->register( $init, $secret_key, $product_id );
|
63 |
+
} catch( Error $e ){
|
64 |
+
}
|
65 |
}
|
66 |
|
67 |
/**
|
plugin-fw/lib/yit-theme-licence.php
CHANGED
@@ -58,7 +58,10 @@ if ( ! class_exists( 'YIT_Theme_Licence' ) ) {
|
|
58 |
yith_plugin_fw_load_update_and_licence_files();
|
59 |
}
|
60 |
|
61 |
-
|
|
|
|
|
|
|
62 |
}
|
63 |
|
64 |
/**
|
58 |
yith_plugin_fw_load_update_and_licence_files();
|
59 |
}
|
60 |
|
61 |
+
try {
|
62 |
+
YITH_Theme_Licence()->register( $init, $secret_key, $product_id );
|
63 |
+
} catch( Error $e ){
|
64 |
+
}
|
65 |
}
|
66 |
|
67 |
/**
|
plugin-fw/lib/yit-upgrade.php
CHANGED
@@ -56,7 +56,10 @@ if ( ! class_exists( 'YIT_Upgrade' ) ) {
|
|
56 |
yith_plugin_fw_load_update_and_licence_files();
|
57 |
}
|
58 |
|
59 |
-
|
|
|
|
|
|
|
60 |
}
|
61 |
|
62 |
/**
|
56 |
yith_plugin_fw_load_update_and_licence_files();
|
57 |
}
|
58 |
|
59 |
+
try {
|
60 |
+
YITH_Plugin_Upgrade()->register( $plugin_slug, $plugin_init );
|
61 |
+
} catch( Error $e ){
|
62 |
+
}
|
63 |
}
|
64 |
|
65 |
/**
|
plugin-fw/templates/fields/colorpicker.php
CHANGED
@@ -21,7 +21,7 @@ $class = !empty( $class ) ? $class : 'yith-plugin-fw-colorpicker';
|
|
21 |
|
22 |
<input type="text" name="<?php echo $name ?>"
|
23 |
id="<?php echo $id ?>" value="<?php echo esc_attr( $value ) ?>"
|
24 |
-
<?php if ( isset( $
|
25 |
class="<?php echo $class ?>"
|
26 |
<?php echo $custom_attributes ?>
|
27 |
<?php if ( isset( $data ) ) echo yith_plugin_fw_html_data_to_string( $data ); ?>/>
|
21 |
|
22 |
<input type="text" name="<?php echo $name ?>"
|
23 |
id="<?php echo $id ?>" value="<?php echo esc_attr( $value ) ?>"
|
24 |
+
<?php if ( isset( $default ) ) : ?> data-default-color="<?php echo $default ?>"<?php endif ?>
|
25 |
class="<?php echo $class ?>"
|
26 |
<?php echo $custom_attributes ?>
|
27 |
<?php if ( isset( $data ) ) echo yith_plugin_fw_html_data_to_string( $data ); ?>/>
|
plugin-fw/templates/fields/select-buttons.php
CHANGED
@@ -18,19 +18,20 @@ $field[ 'type' ] = 'select';
|
|
18 |
|
19 |
if ( empty( $field[ 'class' ] ) ) unset( $field[ 'class' ] );
|
20 |
|
|
|
21 |
$default_args = array(
|
22 |
'multiple' => true,
|
23 |
'class' => 'wc-enhanced-select',
|
24 |
'buttons' => array(
|
25 |
array(
|
26 |
-
'name' =>
|
27 |
'class' => 'yith-plugin-fw-select-all',
|
28 |
'data' => array(
|
29 |
'select-id' => $field[ 'id' ]
|
30 |
),
|
31 |
),
|
32 |
array(
|
33 |
-
'name' => __( '
|
34 |
'class' => 'yith-plugin-fw-deselect-all',
|
35 |
'data' => array(
|
36 |
'select-id' => $field[ 'id' ]
|
18 |
|
19 |
if ( empty( $field[ 'class' ] ) ) unset( $field[ 'class' ] );
|
20 |
|
21 |
+
$add_label = isset( $field['add_all_button_label'] ) ? $field['add_all_button_label'] : __( 'Add All', 'yith-plugin-fw' );
|
22 |
$default_args = array(
|
23 |
'multiple' => true,
|
24 |
'class' => 'wc-enhanced-select',
|
25 |
'buttons' => array(
|
26 |
array(
|
27 |
+
'name' => $add_label,
|
28 |
'class' => 'yith-plugin-fw-select-all',
|
29 |
'data' => array(
|
30 |
'select-id' => $field[ 'id' ]
|
31 |
),
|
32 |
),
|
33 |
array(
|
34 |
+
'name' => __( 'Remove All', 'yith-plugin-fw' ),
|
35 |
'class' => 'yith-plugin-fw-deselect-all',
|
36 |
'data' => array(
|
37 |
'select-id' => $field[ 'id' ]
|
plugin-fw/templates/fields/select.php
CHANGED
@@ -15,17 +15,19 @@
|
|
15 |
extract( $field );
|
16 |
$multiple = isset( $multiple ) && $multiple;
|
17 |
$multiple_html = ( $multiple ) ? ' multiple' : '';
|
18 |
-
|
19 |
if ( $multiple && !is_array( $value ) )
|
20 |
$value = array();
|
21 |
|
22 |
$class = isset( $class ) ? $class : 'yith-plugin-fw-select';
|
23 |
?>
|
24 |
<select<?php echo $multiple_html ?>
|
25 |
-
|
26 |
name="<?php echo $name ?><?php if ( $multiple ) echo "[]" ?>" <?php if ( isset( $std ) ) : ?>
|
27 |
data-std="<?php echo ( $multiple ) ? implode( ' ,', $std ) : $std ?>"<?php endif ?>
|
|
|
28 |
class="<?php echo $class ?>"
|
|
|
29 |
<?php echo $custom_attributes ?>
|
30 |
<?php if ( isset( $data ) ) echo yith_plugin_fw_html_data_to_string( $data ); ?>>
|
31 |
<?php foreach ( $options as $key => $item ) : ?>
|
15 |
extract( $field );
|
16 |
$multiple = isset( $multiple ) && $multiple;
|
17 |
$multiple_html = ( $multiple ) ? ' multiple' : '';
|
18 |
+
$placeholder = isset( $placeholder ) ? ' data-placeholder = "' . $placeholder .'" ': '';
|
19 |
if ( $multiple && !is_array( $value ) )
|
20 |
$value = array();
|
21 |
|
22 |
$class = isset( $class ) ? $class : 'yith-plugin-fw-select';
|
23 |
?>
|
24 |
<select<?php echo $multiple_html ?>
|
25 |
+
id="<?php echo $id ?>"
|
26 |
name="<?php echo $name ?><?php if ( $multiple ) echo "[]" ?>" <?php if ( isset( $std ) ) : ?>
|
27 |
data-std="<?php echo ( $multiple ) ? implode( ' ,', $std ) : $std ?>"<?php endif ?>
|
28 |
+
|
29 |
class="<?php echo $class ?>"
|
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 ) : ?>
|
plugin-fw/templates/fields/upload.php
CHANGED
@@ -14,15 +14,15 @@
|
|
14 |
|
15 |
extract( $field );
|
16 |
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
<input type="text" id="<?php echo $id ?>" name="<?php echo $name ?>" value="<?php echo esc_attr( $value ) ?>" <?php if ( isset( $default ) ) : ?>data-std="<?php echo $default ?>"<?php endif ?> class="yith-plugin-fw-upload-img-url"/>
|
18 |
<button class="button-secondary yith-plugin-fw-upload-button" id="<?php echo $id ?>-button"><?php _e( 'Upload', 'yith-plugin-fw' ) ?></button>
|
19 |
<button type="button" id="<?php echo $id ?>-button-reset" class="yith-plugin-fw-upload-button-reset button"
|
20 |
data-default="<?php echo isset( $default ) ? $default : '' ?>"><?php _e( 'Reset', 'yith-plugin-fw' ) ?></button>
|
21 |
-
<div class="yith-plugin-fw-upload-img-preview" style="margin-top:10px;">
|
22 |
-
<?php
|
23 |
-
$file = $value;
|
24 |
-
if ( preg_match( '/(jpg|jpeg|png|gif|ico)$/', $file ) ) {
|
25 |
-
echo "<img src='$file' style='max-width:600px; max-height:300px;' />";
|
26 |
-
}
|
27 |
-
?>
|
28 |
-
</div>
|
14 |
|
15 |
extract( $field );
|
16 |
?>
|
17 |
+
<div class="yith-plugin-fw-upload-img-preview" style="margin-top:10px;">
|
18 |
+
<?php
|
19 |
+
$file = $value;
|
20 |
+
if ( preg_match( '/(jpg|jpeg|png|gif|ico)$/', $file ) ) {
|
21 |
+
echo "<img src='$file' style='max-width:600px; max-height:300px;' />";
|
22 |
+
}
|
23 |
+
?>
|
24 |
+
</div>
|
25 |
<input type="text" id="<?php echo $id ?>" name="<?php echo $name ?>" value="<?php echo esc_attr( $value ) ?>" <?php if ( isset( $default ) ) : ?>data-std="<?php echo $default ?>"<?php endif ?> class="yith-plugin-fw-upload-img-url"/>
|
26 |
<button class="button-secondary yith-plugin-fw-upload-button" id="<?php echo $id ?>-button"><?php _e( 'Upload', 'yith-plugin-fw' ) ?></button>
|
27 |
<button type="button" id="<?php echo $id ?>-button-reset" class="yith-plugin-fw-upload-button-reset button"
|
28 |
data-default="<?php echo isset( $default ) ? $default : '' ?>"><?php _e( 'Reset', 'yith-plugin-fw' ) ?></button>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
plugin-fw/yit-functions.php
CHANGED
@@ -1344,7 +1344,7 @@ if( ! function_exists( 'yith_plugin_fw_load_update_and_licence_files' ) ){
|
|
1344 |
}
|
1345 |
}
|
1346 |
|
1347 |
-
if( ! empty( $plugin_upgrade_fw_data && is_array( $plugin_upgrade_fw_data )
|
1348 |
foreach ( $plugin_upgrade_fw_data as $fw_version=> $core_files ){
|
1349 |
foreach ( $core_files as $core_file ){
|
1350 |
if( file_exists( $core_file ) ){
|
1344 |
}
|
1345 |
}
|
1346 |
|
1347 |
+
if( ! empty( $plugin_upgrade_fw_data ) && is_array( $plugin_upgrade_fw_data ) ){
|
1348 |
foreach ( $plugin_upgrade_fw_data as $fw_version=> $core_files ){
|
1349 |
foreach ( $core_files as $core_file ){
|
1350 |
if( file_exists( $core_file ) ){
|
plugin-fw/yit-plugin.php
CHANGED
@@ -39,6 +39,7 @@ include_once( 'lib/yit-debug.php');
|
|
39 |
include_once( 'lib/yith-dashboard.php' );
|
40 |
include_once( 'lib/privacy/yit-privacy.php' );
|
41 |
include_once( 'lib/privacy/yit-privacy-plugin-abstract.php' );
|
|
|
42 |
|
43 |
/* === Gutenberg Support === */
|
44 |
if( class_exists( 'WP_Block_Type_Registry' ) ){
|
39 |
include_once( 'lib/yith-dashboard.php' );
|
40 |
include_once( 'lib/privacy/yit-privacy.php' );
|
41 |
include_once( 'lib/privacy/yit-privacy-plugin-abstract.php' );
|
42 |
+
include_once( 'lib/promo/yith-promo.php' );
|
43 |
|
44 |
/* === Gutenberg Support === */
|
45 |
if( class_exists( 'WP_Block_Type_Registry' ) ){
|