Version Description
Released May 30 - 2018
- New: Support to WooCommerce 3.4.0.
- New: Support to WordPress 4.9.6.
- Update: Plugin Core.
- Fix: Product image zoom in Quick View modal.
- Fix: Removed redirect to single product page after add to cart.
- Fix: WPML compatibility issue.
Download this release
Release Info
Developer | yithemes |
Plugin | YITH WooCommerce Quick View |
Version | 1.3.1 |
Comparing to | |
See all releases |
Code changes from version 1.3.0 to 1.3.1
- README.txt +179 -167
- assets/css/yith-quick-view.css +154 -154
- assets/js/frontend.js +184 -177
- assets/js/frontend.min.js +8 -8
- includes/class.yith-wcqv-admin.php +238 -238
- includes/class.yith-wcqv-frontend.php +358 -306
- includes/class.yith-wcqv.php +156 -156
- init.php +126 -124
- plugin-fw/assets/css/yit-plugin-panel.css +2 -66
- plugin-fw/assets/css/yith-fields.css +42 -12
- plugin-fw/assets/js/multisite-updater.js +75 -79
- plugin-fw/assets/js/multisite-updater.min.js +7 -4
- plugin-fw/assets/js/yit-plugin-panel.js +0 -31
- plugin-fw/assets/js/yit-plugin-panel.min.js +7 -5
- plugin-fw/init.php +2 -2
- plugin-fw/lib/privacy/yit-privacy-plugin-abstract.php +29 -0
- plugin-fw/lib/privacy/yit-privacy.php +79 -0
- plugin-fw/lib/yit-metabox.php +5 -1
- plugin-fw/lib/yit-plugin-panel-wc.php +5 -2
- plugin-fw/lib/yit-plugin-panel.php +13 -18
- plugin-fw/lib/yit-plugin-subpanel.php +0 -1
- plugin-fw/lib/yit-upgrade.php +76 -36
- plugin-fw/lib/yit-video.php +3 -1
- plugin-fw/licence/lib/yit-licence.php +2 -2
- plugin-fw/licence/lib/yit-plugin-licence.php +1 -1
- plugin-fw/templates/fields/onoff.php +6 -1
- plugin-fw/templates/fields/radio.php +33 -0
- plugin-fw/templates/panel/videobox.php +0 -83
- plugin-fw/templates/privacy/html-policy-content.php +37 -0
- plugin-fw/templates/upgrade/changelog.php +51 -0
- plugin-fw/templates/upgrade/error.php +147 -0
- plugin-fw/yit-plugin.php +2 -0
- plugin-options/premium-options.php +9 -9
- plugin-options/settings-options.php +89 -89
- templates/admin/premium.php +372 -372
- templates/yith-quick-view-content.php +28 -28
- templates/yith-quick-view.php +29 -29
- uninstall.php +13 -13
- wpml-config.xml +4 -4
README.txt
CHANGED
@@ -1,167 +1,179 @@
|
|
1 |
-
=== Plugin Name ===
|
2 |
-
Contributors: yithemes
|
3 |
-
Tags: woocommerce, quick view, woocommerce quick view, products quick view
|
4 |
-
Requires at least: 4.0
|
5 |
-
Tested up to: 4.9.
|
6 |
-
Stable tag: 1.3.
|
7 |
-
License: GPLv2 or later
|
8 |
-
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
-
|
10 |
-
This plugin adds the possibility to have a quick preview of the products right from product list
|
11 |
-
|
12 |
-
== Description ==
|
13 |
-
Sometimes the halfway is better: what if you are looking to a product in a list and its image is still too small?
|
14 |
-
|
15 |
-
You have to open its product page, waiting for its loading and finally observe what you are interested into.
|
16 |
-
So why don't use a simple way to look immediately at the product's distinctiveness? Here it is what Quick View can offer you.
|
17 |
-
|
18 |
-
People are more attracted to what they can see clearly. And often the classic product lists are not enough to understand the real value of a product.
|
19 |
-
That's when Quick View strikes successfully! Your clients will be free to look in a better way your products, reading also a small description with all the most important features and qualities you want to underline.
|
20 |
-
In this way, they will be more focused on what they really want and they will proceed easily to the purchase step.
|
21 |
-
|
22 |
-
**Main features:**
|
23 |
-
|
24 |
-
* Add a button in product loop to open a modal window with the product summary using ajax
|
25 |
-
* Choose to enable the prettyPhoto lightbox for images in quick view
|
26 |
-
* Customize style of modal
|
27 |
-
|
28 |
-
|
29 |
-
Full documentation is available [here](http://yithemes.com/docs-plugins/yith-woocommerce-quick-view/).
|
30 |
-
|
31 |
-
== Installation ==
|
32 |
-
|
33 |
-
1. Unzip the downloaded zip file.
|
34 |
-
2. Upload the plugin folder into the `wp-content/plugins/` directory of your WordPress site.
|
35 |
-
3. Activate `YITH WooCommerce Quick View` from Plugins page.
|
36 |
-
|
37 |
-
== Screenshots ==
|
38 |
-
|
39 |
-
1. The plugin admin page.
|
40 |
-
2. The quick view button in shop page.
|
41 |
-
3. The quick view modal.
|
42 |
-
|
43 |
-
== Changelog ==
|
44 |
-
|
45 |
-
= 1.3.
|
46 |
-
|
47 |
-
* New: Support to WooCommerce 3.
|
48 |
-
* New: Support to WordPress 4.9.
|
49 |
-
* Update: Plugin Core.
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
*
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
*
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
* New:
|
77 |
-
*
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
* New: Support to WooCommerce 2.6
|
86 |
-
*
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
*
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
*
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
*
|
108 |
-
*
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
*
|
119 |
-
*
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
*
|
128 |
-
* Update
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
*
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
*
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
*
|
143 |
-
|
144 |
-
= 1.0.
|
145 |
-
|
146 |
-
*
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
*
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
==
|
162 |
-
|
163 |
-
=
|
164 |
-
|
165 |
-
*
|
166 |
-
|
167 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== Plugin Name ===
|
2 |
+
Contributors: yithemes
|
3 |
+
Tags: woocommerce, quick view, woocommerce quick view, products quick view
|
4 |
+
Requires at least: 4.0
|
5 |
+
Tested up to: 4.9.6
|
6 |
+
Stable tag: 1.3.1
|
7 |
+
License: GPLv2 or later
|
8 |
+
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
+
|
10 |
+
This plugin adds the possibility to have a quick preview of the products right from product list
|
11 |
+
|
12 |
+
== Description ==
|
13 |
+
Sometimes the halfway is better: what if you are looking to a product in a list and its image is still too small?
|
14 |
+
|
15 |
+
You have to open its product page, waiting for its loading and finally observe what you are interested into.
|
16 |
+
So why don't use a simple way to look immediately at the product's distinctiveness? Here it is what Quick View can offer you.
|
17 |
+
|
18 |
+
People are more attracted to what they can see clearly. And often the classic product lists are not enough to understand the real value of a product.
|
19 |
+
That's when Quick View strikes successfully! Your clients will be free to look in a better way your products, reading also a small description with all the most important features and qualities you want to underline.
|
20 |
+
In this way, they will be more focused on what they really want and they will proceed easily to the purchase step.
|
21 |
+
|
22 |
+
**Main features:**
|
23 |
+
|
24 |
+
* Add a button in product loop to open a modal window with the product summary using ajax
|
25 |
+
* Choose to enable the prettyPhoto lightbox for images in quick view
|
26 |
+
* Customize style of modal
|
27 |
+
|
28 |
+
|
29 |
+
Full documentation is available [here](http://yithemes.com/docs-plugins/yith-woocommerce-quick-view/).
|
30 |
+
|
31 |
+
== Installation ==
|
32 |
+
|
33 |
+
1. Unzip the downloaded zip file.
|
34 |
+
2. Upload the plugin folder into the `wp-content/plugins/` directory of your WordPress site.
|
35 |
+
3. Activate `YITH WooCommerce Quick View` from Plugins page.
|
36 |
+
|
37 |
+
== Screenshots ==
|
38 |
+
|
39 |
+
1. The plugin admin page.
|
40 |
+
2. The quick view button in shop page.
|
41 |
+
3. The quick view modal.
|
42 |
+
|
43 |
+
== Changelog ==
|
44 |
+
|
45 |
+
= 1.3.1 = Released May 30 - 2018
|
46 |
+
|
47 |
+
* New: Support to WooCommerce 3.4.0.
|
48 |
+
* New: Support to WordPress 4.9.6.
|
49 |
+
* Update: Plugin Core.
|
50 |
+
* Fix: Product image zoom in Quick View modal.
|
51 |
+
* Fix: Removed redirect to single product page after add to cart.
|
52 |
+
* Fix: WPML compatibility issue.
|
53 |
+
|
54 |
+
= 1.3.0 = Released Feb 01 - 2018
|
55 |
+
|
56 |
+
* New: Support to WooCommerce 3.3.0.
|
57 |
+
* New: Support to WordPress 4.9.2.
|
58 |
+
* Update: Plugin Core.
|
59 |
+
|
60 |
+
= 1.2.2 = Released Oct 11 - 2017
|
61 |
+
|
62 |
+
* New: Support to WooCommerce 3.2.0 RC2.
|
63 |
+
* New: Support to WordPress 4.8.2.
|
64 |
+
* Fix: Compatibility issue with YITH WooCommerce Product Bundles.
|
65 |
+
* Update: Plugin Core.
|
66 |
+
|
67 |
+
= 1.2.1 = Released Apr 05 - 2017
|
68 |
+
|
69 |
+
* Fix: Compatibility issue with YITH WooCommerce Wishlist.
|
70 |
+
* Update: Plugin Core.
|
71 |
+
|
72 |
+
= 1.2.0 = Released Mar 31 - 2017
|
73 |
+
|
74 |
+
* New: Support to WordPress 4.7.3.
|
75 |
+
* New: Support to WooCommerce 3.0.0 RC2.
|
76 |
+
* New: Shortcode [yith_quick_view product_id="" label=""] for print "quick view" button of specified product.
|
77 |
+
* Update: Plugin Core.
|
78 |
+
|
79 |
+
= 1.1.4 = Released Oct 24 - 2016
|
80 |
+
|
81 |
+
* Fix: Status code 404 for "Quick View" on single product page
|
82 |
+
|
83 |
+
= 1.1.3 = Released Oct 20 - 2016
|
84 |
+
|
85 |
+
* New: Support to WooCommerce 2.6.5
|
86 |
+
* New: Support to WordPress 4.6.1
|
87 |
+
* Update: Plugin Core.
|
88 |
+
* Fix: Responsive style.
|
89 |
+
* Fix: Add inline css using WordPress function wp_add_inline_style.
|
90 |
+
|
91 |
+
= 1.1.2 = Released Jun 10 - 2016
|
92 |
+
|
93 |
+
* New: Added minimized js files. Plugin loads full files version if the constant "SCRIPT_DEBUG" is defined and is true.
|
94 |
+
* New: Support to WooCommerce 2.6 RC1
|
95 |
+
* Update: Plugin Core
|
96 |
+
|
97 |
+
= 1.1.1 = Released Apr 18 - 2016
|
98 |
+
|
99 |
+
* New: Compatibility with WordPress 4.5
|
100 |
+
* Update: Plugin Core
|
101 |
+
|
102 |
+
= 1.1.0 = Released Oct 30 - 2015
|
103 |
+
|
104 |
+
* New: Compatibility with YITH WooCommerce Wishlist
|
105 |
+
* New: Compatibility with YITH WooCommerce Badge Management
|
106 |
+
* New: Italian Language
|
107 |
+
* Update: Language file .pot. Changed textdomain to yith-wcqv to yith-woocommerce-quick-view
|
108 |
+
* Update: Plugin Core
|
109 |
+
|
110 |
+
= 1.0.8 = Released Aug 24 - 2015
|
111 |
+
|
112 |
+
* Fix: Main template issue
|
113 |
+
|
114 |
+
= 1.0.7 = Released Aug 21 - 2015
|
115 |
+
|
116 |
+
* New: Compatibility with Wordpress 4.3
|
117 |
+
* New: WPML config xml
|
118 |
+
* Update: Language file .pot
|
119 |
+
* Fix: Default variation select
|
120 |
+
|
121 |
+
= 1.0.6 = Released Aug 12 - 2015
|
122 |
+
|
123 |
+
* Update: Plugin Core
|
124 |
+
|
125 |
+
= 1.0.5 = Released Aug 11 - 2015
|
126 |
+
|
127 |
+
* New: Compatibility with WooCommerce 2.4
|
128 |
+
* Update: Plugin Core
|
129 |
+
* Update: Language file
|
130 |
+
|
131 |
+
= 1.0.4 = Released May 18 - 2015
|
132 |
+
|
133 |
+
* New option for enable quick view also in mobile device
|
134 |
+
* Compatibility with Wordpress 4.2.2
|
135 |
+
* Minor bug fix
|
136 |
+
* Update Plugin Core
|
137 |
+
* Update Language file
|
138 |
+
|
139 |
+
= 1.0.3 = Released Mar 11 - 2015
|
140 |
+
|
141 |
+
* Minor bug fix
|
142 |
+
* Update Plugin Core
|
143 |
+
|
144 |
+
= 1.0.2 = Released Mar 06 - 2015
|
145 |
+
|
146 |
+
* New: Action yith_quick_view_custom_style_scripts
|
147 |
+
* New: Filter 'yith_quick_view_loader_gif
|
148 |
+
|
149 |
+
= 1.0.1 = Released Feb 26 - 2015
|
150 |
+
|
151 |
+
* Minor bug fix
|
152 |
+
|
153 |
+
= 1.0.0 = Released Feb 17 - 2015
|
154 |
+
|
155 |
+
* Initial release
|
156 |
+
|
157 |
+
== Suggestions ==
|
158 |
+
|
159 |
+
If you have suggestions about how to improve YITH WooCommerce Quick View, you can [write us](mailto:plugins@yithemes.com "Your Inspiration Themes") so we can bundle them into YITH WooCommerce Quick View.
|
160 |
+
|
161 |
+
== Translators ==
|
162 |
+
|
163 |
+
= Available Languages =
|
164 |
+
* English
|
165 |
+
* Italian
|
166 |
+
|
167 |
+
If you can't find this plugin in your language and want to translate it, use the dedicated tool at [Translating WordPress](https://translate.wordpress.org/locale/it/default/wp-plugins/yith-woocommerce-quick-view "Translating WordPress").
|
168 |
+
Or, if you have created your own language pack, or have an update for an existing one, you can send it as an email attachment from our [Contacts page](http://yithemes.com/contact/ "Your Inspiration Themes") and we will bundle into YITH WooCommerce Quick View.
|
169 |
+
|
170 |
+
== Upgrade notice ==
|
171 |
+
|
172 |
+
= 1.3.1 = Released May 30 - 2018
|
173 |
+
|
174 |
+
* New: Support to WooCommerce 3.4.0.
|
175 |
+
* New: Support to WordPress 4.9.6.
|
176 |
+
* Update: Plugin Core.
|
177 |
+
* Fix: Product image zoom in Quick View modal.
|
178 |
+
* Fix: Removed redirect to single product page after add to cart.
|
179 |
+
* Fix: WPML compatibility issue.
|
assets/css/yith-quick-view.css
CHANGED
@@ -1,155 +1,155 @@
|
|
1 |
-
/*=======================
|
2 |
-
* MODAL POPUP STYLE
|
3 |
-
========================*/
|
4 |
-
|
5 |
-
html.yith-quick-view-is-open,
|
6 |
-
html.yith-quick-view-is-open body {
|
7 |
-
overflow: hidden;
|
8 |
-
}
|
9 |
-
|
10 |
-
#yith-quick-view-modal {
|
11 |
-
position: fixed;
|
12 |
-
visibility: hidden;
|
13 |
-
top: 0;
|
14 |
-
left: 0;
|
15 |
-
right: 0;
|
16 |
-
bottom: 0;
|
17 |
-
z-index: 1400;
|
18 |
-
opacity: 0;
|
19 |
-
text-align: center;
|
20 |
-
-webkit-transition: all 0.3s;
|
21 |
-
-moz-transition: all 0.3s;
|
22 |
-
transition: all 0.3s;
|
23 |
-
}
|
24 |
-
|
25 |
-
#yith-quick-view-modal:before {
|
26 |
-
content: '';
|
27 |
-
display: inline-block;
|
28 |
-
vertical-align: middle;
|
29 |
-
height: 100%;
|
30 |
-
width: 0;
|
31 |
-
}
|
32 |
-
|
33 |
-
#yith-quick-view-modal .yith-quick-view-overlay {
|
34 |
-
position: absolute;
|
35 |
-
top: 0;
|
36 |
-
right: 0;
|
37 |
-
bottom: 0;
|
38 |
-
left: 0;
|
39 |
-
background: rgba( 0, 0, 0, 0.8);
|
40 |
-
}
|
41 |
-
|
42 |
-
#yith-quick-view-modal .yith-wcqv-wrapper {
|
43 |
-
display: inline-block;
|
44 |
-
vertical-align: middle;
|
45 |
-
visibility: hidden;
|
46 |
-
-webkit-backface-visibility: hidden;
|
47 |
-
-moz-backface-visibility: hidden;
|
48 |
-
backface-visibility: hidden;
|
49 |
-
text-align: left;
|
50 |
-
height: 600px;
|
51 |
-
width: 1000px;
|
52 |
-
}
|
53 |
-
|
54 |
-
#yith-quick-view-modal .yith-wcqv-main {
|
55 |
-
-webkit-transform: translateY(20%);
|
56 |
-
-moz-transform: translateY(20%);
|
57 |
-
-ms-transform: translateY(20%);
|
58 |
-
transform: translateY(20%);
|
59 |
-
opacity: 0;
|
60 |
-
height: 100%;
|
61 |
-
-webkit-transition: all 0.3s;
|
62 |
-
-moz-transition: all 0.3s;
|
63 |
-
transition: all 0.3s;
|
64 |
-
-webkit-box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.2);
|
65 |
-
box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.2);
|
66 |
-
}
|
67 |
-
|
68 |
-
#yith-quick-view-modal.open,
|
69 |
-
#yith-quick-view-modal.open .yith-wcqv-wrapper {
|
70 |
-
visibility: visible;
|
71 |
-
opacity: 1;
|
72 |
-
}
|
73 |
-
|
74 |
-
#yith-quick-view-modal #yith-quick-view-content {
|
75 |
-
height: 100%;
|
76 |
-
}
|
77 |
-
|
78 |
-
#yith-quick-view-modal .yith-wcqv-main:after,
|
79 |
-
#yith-quick-view-modal .yith-wcqv-main:before {
|
80 |
-
content: '';
|
81 |
-
display: table;
|
82 |
-
clear: both;
|
83 |
-
}
|
84 |
-
#yith-quick-view-modal.open .yith-wcqv-main {
|
85 |
-
-webkit-transform: translateY(0);
|
86 |
-
-moz-transform: translateY(0);
|
87 |
-
-ms-transform: translateY(0);
|
88 |
-
transform: translateY(0);
|
89 |
-
opacity: 1;
|
90 |
-
height: 100%;
|
91 |
-
overflow-y: scroll;
|
92 |
-
position: relative;
|
93 |
-
}
|
94 |
-
#yith-quick-view-close {
|
95 |
-
border: 1px solid;
|
96 |
-
position: absolute;
|
97 |
-
top: 5px;
|
98 |
-
right: 5px;
|
99 |
-
width: 20px;
|
100 |
-
height: 20px;
|
101 |
-
text-align: center;
|
102 |
-
line-height: 18px;
|
103 |
-
z-index: 2;
|
104 |
-
opacity: 0.5;
|
105 |
-
}
|
106 |
-
#yith-quick-view-close:hover {
|
107 |
-
opacity: 1;
|
108 |
-
transition: all 0.2s ease;
|
109 |
-
-webkit-transition: all 0.2s ease;
|
110 |
-
-moz-transition: all 0.2s ease;
|
111 |
-
-ms-transition: all 0.2s ease;
|
112 |
-
}
|
113 |
-
#yith-quick-view-content div.images {
|
114 |
-
width: 40%;
|
115 |
-
float: left;
|
116 |
-
opacity: 1 !important;
|
117 |
-
}
|
118 |
-
#yith-quick-view-content div.summary {
|
119 |
-
margin: 0;
|
120 |
-
padding: 15px;
|
121 |
-
width: 60%;
|
122 |
-
float: left;
|
123 |
-
}
|
124 |
-
#yith-quick-view-content div.woocommerce-product-rating:after,
|
125 |
-
#yith-quick-view-content div.woocommerce-product-rating:before {
|
126 |
-
content: '';
|
127 |
-
display: table;
|
128 |
-
clear: both;
|
129 |
-
}
|
130 |
-
#yith-quick-view-content div.woocommerce-product-rating a.woocommerce-review-link {
|
131 |
-
display: none;
|
132 |
-
}
|
133 |
-
#yith-quick-view-content .onsale {
|
134 |
-
top: 5px;
|
135 |
-
right: auto;
|
136 |
-
left: 5px;
|
137 |
-
}
|
138 |
-
|
139 |
-
li.product .yith-wcqv-button .blockUI.blockOverlay:before {
|
140 |
-
background: none;
|
141 |
-
}
|
142 |
-
|
143 |
-
@media( max-width: 480px ) {
|
144 |
-
#yith-quick-view-content div.images,
|
145 |
-
#yith-quick-view-content div.summary {
|
146 |
-
width: 100%;
|
147 |
-
float: none;
|
148 |
-
}
|
149 |
-
#yith-quick-view-content div.summary {
|
150 |
-
margin: 0;
|
151 |
-
padding: 15px;
|
152 |
-
width: 100%;
|
153 |
-
float: left;
|
154 |
-
}
|
155 |
}
|
1 |
+
/*=======================
|
2 |
+
* MODAL POPUP STYLE
|
3 |
+
========================*/
|
4 |
+
|
5 |
+
html.yith-quick-view-is-open,
|
6 |
+
html.yith-quick-view-is-open body {
|
7 |
+
overflow: hidden;
|
8 |
+
}
|
9 |
+
|
10 |
+
#yith-quick-view-modal {
|
11 |
+
position: fixed;
|
12 |
+
visibility: hidden;
|
13 |
+
top: 0;
|
14 |
+
left: 0;
|
15 |
+
right: 0;
|
16 |
+
bottom: 0;
|
17 |
+
z-index: 1400;
|
18 |
+
opacity: 0;
|
19 |
+
text-align: center;
|
20 |
+
-webkit-transition: all 0.3s;
|
21 |
+
-moz-transition: all 0.3s;
|
22 |
+
transition: all 0.3s;
|
23 |
+
}
|
24 |
+
|
25 |
+
#yith-quick-view-modal:before {
|
26 |
+
content: '';
|
27 |
+
display: inline-block;
|
28 |
+
vertical-align: middle;
|
29 |
+
height: 100%;
|
30 |
+
width: 0;
|
31 |
+
}
|
32 |
+
|
33 |
+
#yith-quick-view-modal .yith-quick-view-overlay {
|
34 |
+
position: absolute;
|
35 |
+
top: 0;
|
36 |
+
right: 0;
|
37 |
+
bottom: 0;
|
38 |
+
left: 0;
|
39 |
+
background: rgba( 0, 0, 0, 0.8);
|
40 |
+
}
|
41 |
+
|
42 |
+
#yith-quick-view-modal .yith-wcqv-wrapper {
|
43 |
+
display: inline-block;
|
44 |
+
vertical-align: middle;
|
45 |
+
visibility: hidden;
|
46 |
+
-webkit-backface-visibility: hidden;
|
47 |
+
-moz-backface-visibility: hidden;
|
48 |
+
backface-visibility: hidden;
|
49 |
+
text-align: left;
|
50 |
+
height: 600px;
|
51 |
+
width: 1000px;
|
52 |
+
}
|
53 |
+
|
54 |
+
#yith-quick-view-modal .yith-wcqv-main {
|
55 |
+
-webkit-transform: translateY(20%);
|
56 |
+
-moz-transform: translateY(20%);
|
57 |
+
-ms-transform: translateY(20%);
|
58 |
+
transform: translateY(20%);
|
59 |
+
opacity: 0;
|
60 |
+
height: 100%;
|
61 |
+
-webkit-transition: all 0.3s;
|
62 |
+
-moz-transition: all 0.3s;
|
63 |
+
transition: all 0.3s;
|
64 |
+
-webkit-box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.2);
|
65 |
+
box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.2);
|
66 |
+
}
|
67 |
+
|
68 |
+
#yith-quick-view-modal.open,
|
69 |
+
#yith-quick-view-modal.open .yith-wcqv-wrapper {
|
70 |
+
visibility: visible;
|
71 |
+
opacity: 1;
|
72 |
+
}
|
73 |
+
|
74 |
+
#yith-quick-view-modal #yith-quick-view-content {
|
75 |
+
height: 100%;
|
76 |
+
}
|
77 |
+
|
78 |
+
#yith-quick-view-modal .yith-wcqv-main:after,
|
79 |
+
#yith-quick-view-modal .yith-wcqv-main:before {
|
80 |
+
content: '';
|
81 |
+
display: table;
|
82 |
+
clear: both;
|
83 |
+
}
|
84 |
+
#yith-quick-view-modal.open .yith-wcqv-main {
|
85 |
+
-webkit-transform: translateY(0);
|
86 |
+
-moz-transform: translateY(0);
|
87 |
+
-ms-transform: translateY(0);
|
88 |
+
transform: translateY(0);
|
89 |
+
opacity: 1;
|
90 |
+
height: 100%;
|
91 |
+
overflow-y: scroll;
|
92 |
+
position: relative;
|
93 |
+
}
|
94 |
+
#yith-quick-view-close {
|
95 |
+
border: 1px solid;
|
96 |
+
position: absolute;
|
97 |
+
top: 5px;
|
98 |
+
right: 5px;
|
99 |
+
width: 20px;
|
100 |
+
height: 20px;
|
101 |
+
text-align: center;
|
102 |
+
line-height: 18px;
|
103 |
+
z-index: 2;
|
104 |
+
opacity: 0.5;
|
105 |
+
}
|
106 |
+
#yith-quick-view-close:hover {
|
107 |
+
opacity: 1;
|
108 |
+
transition: all 0.2s ease;
|
109 |
+
-webkit-transition: all 0.2s ease;
|
110 |
+
-moz-transition: all 0.2s ease;
|
111 |
+
-ms-transition: all 0.2s ease;
|
112 |
+
}
|
113 |
+
#yith-quick-view-content div.images {
|
114 |
+
width: 40%;
|
115 |
+
float: left;
|
116 |
+
opacity: 1 !important;
|
117 |
+
}
|
118 |
+
#yith-quick-view-content div.summary {
|
119 |
+
margin: 0;
|
120 |
+
padding: 15px;
|
121 |
+
width: 60%;
|
122 |
+
float: left;
|
123 |
+
}
|
124 |
+
#yith-quick-view-content div.woocommerce-product-rating:after,
|
125 |
+
#yith-quick-view-content div.woocommerce-product-rating:before {
|
126 |
+
content: '';
|
127 |
+
display: table;
|
128 |
+
clear: both;
|
129 |
+
}
|
130 |
+
#yith-quick-view-content div.woocommerce-product-rating a.woocommerce-review-link {
|
131 |
+
display: none;
|
132 |
+
}
|
133 |
+
#yith-quick-view-content .onsale {
|
134 |
+
top: 5px;
|
135 |
+
right: auto;
|
136 |
+
left: 5px;
|
137 |
+
}
|
138 |
+
|
139 |
+
li.product .yith-wcqv-button .blockUI.blockOverlay:before {
|
140 |
+
background: none;
|
141 |
+
}
|
142 |
+
|
143 |
+
@media( max-width: 480px ) {
|
144 |
+
#yith-quick-view-content div.images,
|
145 |
+
#yith-quick-view-content div.summary {
|
146 |
+
width: 100%;
|
147 |
+
float: none;
|
148 |
+
}
|
149 |
+
#yith-quick-view-content div.summary {
|
150 |
+
margin: 0;
|
151 |
+
padding: 15px;
|
152 |
+
width: 100%;
|
153 |
+
float: left;
|
154 |
+
}
|
155 |
}
|
assets/js/frontend.js
CHANGED
@@ -1,178 +1,185 @@
|
|
1 |
-
/**
|
2 |
-
* frontend.js
|
3 |
-
*
|
4 |
-
* @author Your Inspiration Themes
|
5 |
-
* @package YITH WooCommerce Quick View
|
6 |
-
* @version 1.0.0
|
7 |
-
*/
|
8 |
-
|
9 |
-
jQuery(document).ready(function($){
|
10 |
-
"use strict";
|
11 |
-
|
12 |
-
if( typeof yith_qv === 'undefined' ) {
|
13 |
-
return;
|
14 |
-
}
|
15 |
-
|
16 |
-
var qv_modal = $(document).find( '#yith-quick-view-modal' ),
|
17 |
-
qv_overlay = qv_modal.find( '.yith-quick-view-overlay'),
|
18 |
-
qv_content = qv_modal.find( '#yith-quick-view-content' ),
|
19 |
-
qv_close = qv_modal.find( '#yith-quick-view-close' ),
|
20 |
-
qv_wrapper = qv_modal.find( '.yith-wcqv-wrapper'),
|
21 |
-
qv_wrapper_w = qv_wrapper.width(),
|
22 |
-
qv_wrapper_h = qv_wrapper.height(),
|
23 |
-
center_modal = function() {
|
24 |
-
|
25 |
-
var window_w = $(window).width(),
|
26 |
-
window_h = $(window).height(),
|
27 |
-
width = ( ( window_w - 60 ) > qv_wrapper_w ) ? qv_wrapper_w : ( window_w - 60 ),
|
28 |
-
height = ( ( window_h - 120 ) > qv_wrapper_h ) ? qv_wrapper_h : ( window_h - 120 );
|
29 |
-
|
30 |
-
qv_wrapper.css({
|
31 |
-
'left' : (( window_w/2 ) - ( width/2 )),
|
32 |
-
'top' : (( window_h/2 ) - ( height/2 )),
|
33 |
-
'width' : width + 'px',
|
34 |
-
'height' : height + 'px'
|
35 |
-
});
|
36 |
-
};
|
37 |
-
|
38 |
-
|
39 |
-
/*==================
|
40 |
-
*MAIN BUTTON OPEN
|
41 |
-
==================*/
|
42 |
-
|
43 |
-
$.fn.yith_quick_view = function() {
|
44 |
-
|
45 |
-
$(document).off( 'click', '.yith-wcqv-button' ).on( 'click', '.yith-wcqv-button', function(e){
|
46 |
-
e.preventDefault();
|
47 |
-
|
48 |
-
var t = $(this),
|
49 |
-
product_id = t.data( 'product_id' ),
|
50 |
-
is_blocked = false;
|
51 |
-
|
52 |
-
if ( typeof yith_qv.loader !== 'undefined' ) {
|
53 |
-
is_blocked = true;
|
54 |
-
t.block({
|
55 |
-
message: null,
|
56 |
-
overlayCSS : {
|
57 |
-
background: '#fff url(' + yith_qv.loader + ') no-repeat center',
|
58 |
-
opacity : 0.5,
|
59 |
-
cursor : 'none'
|
60 |
-
}
|
61 |
-
});
|
62 |
-
|
63 |
-
if( ! qv_modal.hasClass( 'loading' ) ) {
|
64 |
-
qv_modal.addClass('loading');
|
65 |
-
}
|
66 |
-
|
67 |
-
// stop loader
|
68 |
-
$(document).trigger( 'qv_loading' );
|
69 |
-
}
|
70 |
-
ajax_call( t, product_id, is_blocked );
|
71 |
-
});
|
72 |
-
};
|
73 |
-
|
74 |
-
/*================
|
75 |
-
* MAIN AJAX CALL
|
76 |
-
================*/
|
77 |
-
|
78 |
-
var ajax_call = function( t, product_id, is_blocked ) {
|
79 |
-
|
80 |
-
$.ajax({
|
81 |
-
url: yith_qv.ajaxurl,
|
82 |
-
data: {
|
83 |
-
action: 'yith_load_product_quick_view',
|
84 |
-
product_id: product_id
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
form_variation.
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
form_variation.trigger( '
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
});
|
1 |
+
/**
|
2 |
+
* frontend.js
|
3 |
+
*
|
4 |
+
* @author Your Inspiration Themes
|
5 |
+
* @package YITH WooCommerce Quick View
|
6 |
+
* @version 1.0.0
|
7 |
+
*/
|
8 |
+
|
9 |
+
jQuery(document).ready(function($){
|
10 |
+
"use strict";
|
11 |
+
|
12 |
+
if( typeof yith_qv === 'undefined' ) {
|
13 |
+
return;
|
14 |
+
}
|
15 |
+
|
16 |
+
var qv_modal = $(document).find( '#yith-quick-view-modal' ),
|
17 |
+
qv_overlay = qv_modal.find( '.yith-quick-view-overlay'),
|
18 |
+
qv_content = qv_modal.find( '#yith-quick-view-content' ),
|
19 |
+
qv_close = qv_modal.find( '#yith-quick-view-close' ),
|
20 |
+
qv_wrapper = qv_modal.find( '.yith-wcqv-wrapper'),
|
21 |
+
qv_wrapper_w = qv_wrapper.width(),
|
22 |
+
qv_wrapper_h = qv_wrapper.height(),
|
23 |
+
center_modal = function() {
|
24 |
+
|
25 |
+
var window_w = $(window).width(),
|
26 |
+
window_h = $(window).height(),
|
27 |
+
width = ( ( window_w - 60 ) > qv_wrapper_w ) ? qv_wrapper_w : ( window_w - 60 ),
|
28 |
+
height = ( ( window_h - 120 ) > qv_wrapper_h ) ? qv_wrapper_h : ( window_h - 120 );
|
29 |
+
|
30 |
+
qv_wrapper.css({
|
31 |
+
'left' : (( window_w/2 ) - ( width/2 )),
|
32 |
+
'top' : (( window_h/2 ) - ( height/2 )),
|
33 |
+
'width' : width + 'px',
|
34 |
+
'height' : height + 'px'
|
35 |
+
});
|
36 |
+
};
|
37 |
+
|
38 |
+
|
39 |
+
/*==================
|
40 |
+
*MAIN BUTTON OPEN
|
41 |
+
==================*/
|
42 |
+
|
43 |
+
$.fn.yith_quick_view = function() {
|
44 |
+
|
45 |
+
$(document).off( 'click', '.yith-wcqv-button' ).on( 'click', '.yith-wcqv-button', function(e){
|
46 |
+
e.preventDefault();
|
47 |
+
|
48 |
+
var t = $(this),
|
49 |
+
product_id = t.data( 'product_id' ),
|
50 |
+
is_blocked = false;
|
51 |
+
|
52 |
+
if ( typeof yith_qv.loader !== 'undefined' ) {
|
53 |
+
is_blocked = true;
|
54 |
+
t.block({
|
55 |
+
message: null,
|
56 |
+
overlayCSS : {
|
57 |
+
background: '#fff url(' + yith_qv.loader + ') no-repeat center',
|
58 |
+
opacity : 0.5,
|
59 |
+
cursor : 'none'
|
60 |
+
}
|
61 |
+
});
|
62 |
+
|
63 |
+
if( ! qv_modal.hasClass( 'loading' ) ) {
|
64 |
+
qv_modal.addClass('loading');
|
65 |
+
}
|
66 |
+
|
67 |
+
// stop loader
|
68 |
+
$(document).trigger( 'qv_loading' );
|
69 |
+
}
|
70 |
+
ajax_call( t, product_id, is_blocked );
|
71 |
+
});
|
72 |
+
};
|
73 |
+
|
74 |
+
/*================
|
75 |
+
* MAIN AJAX CALL
|
76 |
+
================*/
|
77 |
+
|
78 |
+
var ajax_call = function( t, product_id, is_blocked ) {
|
79 |
+
|
80 |
+
$.ajax({
|
81 |
+
url: yith_qv.ajaxurl,
|
82 |
+
data: {
|
83 |
+
action: 'yith_load_product_quick_view',
|
84 |
+
product_id: product_id,
|
85 |
+
lang: yith_qv.lang
|
86 |
+
},
|
87 |
+
dataType: 'html',
|
88 |
+
type: 'POST',
|
89 |
+
success: function (data) {
|
90 |
+
|
91 |
+
qv_content.html(data);
|
92 |
+
|
93 |
+
// quantity fields for WC 2.2
|
94 |
+
if (yith_qv.is2_2) {
|
95 |
+
qv_content.find('div.quantity:not(.buttons_added), td.quantity:not(.buttons_added)').addClass('buttons_added').append('<input type="button" value="+" class="plus" />').prepend('<input type="button" value="-" class="minus" />');
|
96 |
+
}
|
97 |
+
|
98 |
+
// Variation Form
|
99 |
+
var form_variation = qv_content.find('.variations_form');
|
100 |
+
form_variation.each( function() {
|
101 |
+
$( this ).wc_variation_form();
|
102 |
+
// add Color and Label Integration
|
103 |
+
if( typeof $.fn.yith_wccl !== 'undefined' ) {
|
104 |
+
$(this).yith_wccl();
|
105 |
+
}
|
106 |
+
});
|
107 |
+
form_variation.trigger( 'check_variations' );
|
108 |
+
form_variation.trigger( 'reset_image' );
|
109 |
+
|
110 |
+
// Init prettyPhoto
|
111 |
+
if (typeof $.fn.prettyPhoto !== 'undefined') {
|
112 |
+
qv_content.find("a[data-rel^='prettyPhoto'], a.zoom").prettyPhoto({
|
113 |
+
hook: 'data-rel',
|
114 |
+
social_tools: false,
|
115 |
+
theme: 'pp_woocommerce',
|
116 |
+
horizontal_padding: 20,
|
117 |
+
opacity: 0.8,
|
118 |
+
deeplinking: false
|
119 |
+
});
|
120 |
+
}
|
121 |
+
|
122 |
+
if( typeof $.fn.wc_product_gallery !== 'undefined' ) {
|
123 |
+
qv_content.find('.woocommerce-product-gallery').each(function () {
|
124 |
+
$(this).wc_product_gallery();
|
125 |
+
});
|
126 |
+
}
|
127 |
+
|
128 |
+
if (!qv_modal.hasClass('open')) {
|
129 |
+
qv_modal.removeClass('loading').addClass('open');
|
130 |
+
if (is_blocked)
|
131 |
+
t.unblock();
|
132 |
+
}
|
133 |
+
|
134 |
+
// stop loader
|
135 |
+
$(document).trigger('qv_loader_stop');
|
136 |
+
|
137 |
+
}
|
138 |
+
});
|
139 |
+
};
|
140 |
+
|
141 |
+
/*===================
|
142 |
+
* CLOSE QUICK VIEW
|
143 |
+
===================*/
|
144 |
+
|
145 |
+
var close_modal_qv = function() {
|
146 |
+
|
147 |
+
// Close box by click overlay
|
148 |
+
qv_overlay.on( 'click', function(e){
|
149 |
+
close_qv();
|
150 |
+
});
|
151 |
+
// Close box with esc key
|
152 |
+
$(document).keyup(function(e){
|
153 |
+
if( e.keyCode === 27 )
|
154 |
+
close_qv();
|
155 |
+
});
|
156 |
+
// Close box by click close button
|
157 |
+
qv_close.on( 'click', function(e) {
|
158 |
+
e.preventDefault();
|
159 |
+
close_qv();
|
160 |
+
});
|
161 |
+
|
162 |
+
var close_qv = function() {
|
163 |
+
qv_modal.removeClass('open').removeClass('loading');
|
164 |
+
|
165 |
+
setTimeout(function () {
|
166 |
+
qv_content.html('');
|
167 |
+
}, 1000);
|
168 |
+
}
|
169 |
+
};
|
170 |
+
|
171 |
+
close_modal_qv();
|
172 |
+
|
173 |
+
|
174 |
+
center_modal();
|
175 |
+
$( window ).on( 'resize', center_modal );
|
176 |
+
|
177 |
+
// START
|
178 |
+
$.fn.yith_quick_view();
|
179 |
+
|
180 |
+
$( document ).on( 'yith_infs_adding_elem yith-wcan-ajax-filtered', function(){
|
181 |
+
// RESTART
|
182 |
+
$.fn.yith_quick_view();
|
183 |
+
});
|
184 |
+
|
185 |
});
|
assets/js/frontend.min.js
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
-
/**
|
2 |
-
* frontend.js
|
3 |
-
*
|
4 |
-
* @author Your Inspiration Themes
|
5 |
-
* @package YITH WooCommerce Quick View
|
6 |
-
* @version 1.0.0
|
7 |
-
*/
|
8 |
-
jQuery(document).ready(function(
|
1 |
+
/**
|
2 |
+
* frontend.js
|
3 |
+
*
|
4 |
+
* @author Your Inspiration Themes
|
5 |
+
* @package YITH WooCommerce Quick View
|
6 |
+
* @version 1.0.0
|
7 |
+
*/
|
8 |
+
jQuery(document).ready(function(e){"use strict";if("undefined"!=typeof yith_qv){var a=e(document).find("#yith-quick-view-modal"),t=a.find(".yith-quick-view-overlay"),c=a.find("#yith-quick-view-content"),n=a.find("#yith-quick-view-close"),d=a.find(".yith-wcqv-wrapper"),u=d.width(),r=d.height(),i=function(){var t=e(window).width(),i=e(window).height(),n=u<t-60?u:t-60,o=r<i-120?r:i-120;d.css({left:t/2-n/2,top:i/2-o/2,width:n+"px",height:o+"px"})};e.fn.yith_quick_view=function(){e(document).off("click",".yith-wcqv-button").on("click",".yith-wcqv-button",function(t){t.preventDefault();var i=e(this),n=i.data("product_id"),o=!1;void 0!==yith_qv.loader&&(o=!0,i.block({message:null,overlayCSS:{background:"#fff url("+yith_qv.loader+") no-repeat center",opacity:.5,cursor:"none"}}),a.hasClass("loading")||a.addClass("loading"),e(document).trigger("qv_loading")),l(i,n,o)})};var l=function(n,t,o){e.ajax({url:yith_qv.ajaxurl,data:{action:"yith_load_product_quick_view",product_id:t,lang:yith_qv.lang},dataType:"html",type:"POST",success:function(t){c.html(t),yith_qv.is2_2&&c.find("div.quantity:not(.buttons_added), td.quantity:not(.buttons_added)").addClass("buttons_added").append('<input type="button" value="+" class="plus" />').prepend('<input type="button" value="-" class="minus" />');var i=c.find(".variations_form");i.each(function(){e(this).wc_variation_form(),void 0!==e.fn.yith_wccl&&e(this).yith_wccl()}),i.trigger("check_variations"),i.trigger("reset_image"),void 0!==e.fn.prettyPhoto&&c.find("a[data-rel^='prettyPhoto'], a.zoom").prettyPhoto({hook:"data-rel",social_tools:!1,theme:"pp_woocommerce",horizontal_padding:20,opacity:.8,deeplinking:!1}),void 0!==e.fn.wc_product_gallery&&c.find(".woocommerce-product-gallery").each(function(){e(this).wc_product_gallery()}),a.hasClass("open")||(a.removeClass("loading").addClass("open"),o&&n.unblock()),e(document).trigger("qv_loader_stop")}})};!function(){t.on("click",function(t){i()}),e(document).keyup(function(t){27===t.keyCode&&i()}),n.on("click",function(t){t.preventDefault(),i()});var i=function(){a.removeClass("open").removeClass("loading"),setTimeout(function(){c.html("")},1e3)}}(),i(),e(window).on("resize",i),e.fn.yith_quick_view(),e(document).on("yith_infs_adding_elem yith-wcan-ajax-filtered",function(){e.fn.yith_quick_view()})}});
|
includes/class.yith-wcqv-admin.php
CHANGED
@@ -1,239 +1,239 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Admin class
|
4 |
-
*
|
5 |
-
* @author Yithemes
|
6 |
-
* @package YITH WooCommerce Quick View
|
7 |
-
* @version 1.1.1
|
8 |
-
*/
|
9 |
-
|
10 |
-
if ( ! defined( 'YITH_WCQV' ) ) {
|
11 |
-
exit;
|
12 |
-
} // Exit if accessed directly
|
13 |
-
|
14 |
-
if ( ! class_exists( 'YITH_WCQV_Admin' ) ) {
|
15 |
-
/**
|
16 |
-
* Admin class.
|
17 |
-
* The class manage all the admin behaviors.
|
18 |
-
*
|
19 |
-
* @since 1.0.0
|
20 |
-
*/
|
21 |
-
class YITH_WCQV_Admin {
|
22 |
-
|
23 |
-
/**
|
24 |
-
* Single instance of the class
|
25 |
-
*
|
26 |
-
* @var \YITH_WCQV_Admin
|
27 |
-
* @since 1.0.0
|
28 |
-
*/
|
29 |
-
protected static $instance;
|
30 |
-
|
31 |
-
/**
|
32 |
-
* Plugin options
|
33 |
-
*
|
34 |
-
* @var array
|
35 |
-
* @access public
|
36 |
-
* @since 1.0.0
|
37 |
-
*/
|
38 |
-
public $options = array();
|
39 |
-
|
40 |
-
/**
|
41 |
-
* Plugin version
|
42 |
-
*
|
43 |
-
* @var string
|
44 |
-
* @since 1.0.0
|
45 |
-
*/
|
46 |
-
public $version = YITH_WCQV_VERSION;
|
47 |
-
|
48 |
-
/**
|
49 |
-
* @var $_panel Panel Object
|
50 |
-
*/
|
51 |
-
protected $_panel;
|
52 |
-
|
53 |
-
/**
|
54 |
-
* @var $_premium string Premium tab template file name
|
55 |
-
*/
|
56 |
-
protected $_premium = 'premium.php';
|
57 |
-
|
58 |
-
/**
|
59 |
-
* @var string Premium version landing link
|
60 |
-
*/
|
61 |
-
protected $_premium_landing = 'https://yithemes.com/themes/plugins/yith-woocommerce-quick-view/';
|
62 |
-
|
63 |
-
/**
|
64 |
-
* @var string Quick View panel page
|
65 |
-
*/
|
66 |
-
protected $_panel_page = 'yith_wcqv_panel';
|
67 |
-
|
68 |
-
/**
|
69 |
-
* Various links
|
70 |
-
*
|
71 |
-
* @var string
|
72 |
-
* @access public
|
73 |
-
* @since 1.0.0
|
74 |
-
*/
|
75 |
-
public $doc_url = '
|
76 |
-
|
77 |
-
/**
|
78 |
-
* Returns single instance of the class
|
79 |
-
*
|
80 |
-
* @return \YITH_WCQV_Admin
|
81 |
-
* @since 1.0.0
|
82 |
-
*/
|
83 |
-
public static function get_instance(){
|
84 |
-
if( is_null( self::$instance ) ){
|
85 |
-
self::$instance = new self();
|
86 |
-
}
|
87 |
-
|
88 |
-
return self::$instance;
|
89 |
-
}
|
90 |
-
|
91 |
-
/**
|
92 |
-
* Constructor
|
93 |
-
*
|
94 |
-
* @access public
|
95 |
-
* @since 1.0.0
|
96 |
-
*/
|
97 |
-
public function __construct() {
|
98 |
-
|
99 |
-
// Add panel options
|
100 |
-
add_action( 'admin_menu', array( $this, 'register_panel' ), 5) ;
|
101 |
-
|
102 |
-
//Add action links
|
103 |
-
add_filter( 'plugin_action_links_' . plugin_basename( YITH_WCQV_DIR . '/' . basename( YITH_WCQV_FILE ) ), array( $this, 'action_links') );
|
104 |
-
add_filter( 'plugin_row_meta', array( $this, 'plugin_row_meta' ), 10, 4 );
|
105 |
-
|
106 |
-
add_action( 'yith_quick_view_premium', array( $this, 'premium_tab' ) );
|
107 |
-
|
108 |
-
// YITH WCQV Loaded
|
109 |
-
do_action( 'yith_wcqv_loaded' );
|
110 |
-
|
111 |
-
}
|
112 |
-
|
113 |
-
|
114 |
-
/**
|
115 |
-
* Action Links
|
116 |
-
*
|
117 |
-
* add the action links to plugin admin page
|
118 |
-
*
|
119 |
-
* @param $links | links plugin array
|
120 |
-
*
|
121 |
-
* @return mixed Array
|
122 |
-
* @since 1.0
|
123 |
-
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
124 |
-
* @return mixed
|
125 |
-
* @use plugin_action_links_{$plugin_file_name}
|
126 |
-
*/
|
127 |
-
public function action_links( $links ) {
|
128 |
-
|
129 |
-
$links[] = '<a href="' . admin_url( "admin.php?page={$this->_panel_page}" ) . '">' . __( 'Settings', 'yith-woocommerce-quick-view' ) . '</a>';
|
130 |
-
$links[] = '<a href="' . $this->get_premium_landing_uri() . '" target="_blank">' . __( 'Premium Version', 'yith-woocommerce-quick-view' ) . '</a>';
|
131 |
-
|
132 |
-
return $links;
|
133 |
-
}
|
134 |
-
|
135 |
-
/**
|
136 |
-
* Add a panel under YITH Plugins tab
|
137 |
-
*
|
138 |
-
* @return void
|
139 |
-
* @since 1.0
|
140 |
-
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
141 |
-
* @use /Yit_Plugin_Panel class
|
142 |
-
* @see plugin-fw/lib/yit-plugin-panel.php
|
143 |
-
*/
|
144 |
-
public function register_panel() {
|
145 |
-
|
146 |
-
if ( ! empty( $this->_panel ) ) {
|
147 |
-
return;
|
148 |
-
}
|
149 |
-
|
150 |
-
$admin_tabs = array(
|
151 |
-
'settings' => __( 'Settings', 'yith-woocommerce-quick-view' ),
|
152 |
-
'premium' => __( 'Premium Version', 'yith-woocommerce-quick-view' ),
|
153 |
-
);
|
154 |
-
|
155 |
-
$args = array(
|
156 |
-
'create_menu_page' => true,
|
157 |
-
'parent_slug' => '',
|
158 |
-
'page_title' => __( 'Quick View', 'yith-woocommerce-quick-view' ),
|
159 |
-
'menu_title' => __( 'Quick View', 'yith-woocommerce-quick-view' ),
|
160 |
-
'capability' => 'manage_options',
|
161 |
-
'parent' => '',
|
162 |
-
'parent_page' => 'yit_plugin_panel',
|
163 |
-
'page' => $this->_panel_page,
|
164 |
-
'admin-tabs' => $admin_tabs,
|
165 |
-
'options-path' => YITH_WCQV_DIR . '/plugin-options'
|
166 |
-
);
|
167 |
-
|
168 |
-
|
169 |
-
/* === Fixed: not updated theme === */
|
170 |
-
if( ! class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
|
171 |
-
require_once( 'plugin-fw/lib/yit-plugin-panel-wc.php' );
|
172 |
-
}
|
173 |
-
|
174 |
-
$this->_panel = new YIT_Plugin_Panel_WooCommerce( $args );
|
175 |
-
}
|
176 |
-
|
177 |
-
/**
|
178 |
-
* Premium Tab Template
|
179 |
-
*
|
180 |
-
* Load the premium tab template on admin page
|
181 |
-
*
|
182 |
-
* @return void
|
183 |
-
* @since 1.0
|
184 |
-
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
185 |
-
* @return void
|
186 |
-
*/
|
187 |
-
public function premium_tab() {
|
188 |
-
$premium_tab_template = YITH_WCQV_TEMPLATE_PATH . '/admin/' . $this->_premium;
|
189 |
-
if( file_exists( $premium_tab_template ) ) {
|
190 |
-
include_once($premium_tab_template);
|
191 |
-
}
|
192 |
-
|
193 |
-
}
|
194 |
-
|
195 |
-
/**
|
196 |
-
* plugin_row_meta
|
197 |
-
*
|
198 |
-
* add the action links to plugin admin page
|
199 |
-
*
|
200 |
-
* @param $plugin_meta
|
201 |
-
* @param $plugin_file
|
202 |
-
* @param $plugin_data
|
203 |
-
* @param $status
|
204 |
-
*
|
205 |
-
* @return Array
|
206 |
-
* @since 1.0
|
207 |
-
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
208 |
-
* @use plugin_row_meta
|
209 |
-
*/
|
210 |
-
public function plugin_row_meta( $plugin_meta, $plugin_file, $plugin_data, $status ) {
|
211 |
-
|
212 |
-
if ( defined( 'YITH_WCQV_FREE_INIT' ) && YITH_WCQV_FREE_INIT == $plugin_file ) {
|
213 |
-
$plugin_meta[] = '<a href="' . $this->doc_url . '" target="_blank">' . __( 'Plugin Documentation', 'yith-woocommerce-quick-view' ) . '</a>';
|
214 |
-
}
|
215 |
-
return $plugin_meta;
|
216 |
-
}
|
217 |
-
|
218 |
-
/**
|
219 |
-
* Get the premium landing uri
|
220 |
-
*
|
221 |
-
* @since 1.0.0
|
222 |
-
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
223 |
-
* @return string The premium landing link
|
224 |
-
*/
|
225 |
-
public function get_premium_landing_uri(){
|
226 |
-
return defined( 'YITH_REFER_ID' ) ? $this->_premium_landing . '?refer_id=' . YITH_REFER_ID : $this->_premium_landing.'?refer_id=1030585';
|
227 |
-
}
|
228 |
-
|
229 |
-
}
|
230 |
-
}
|
231 |
-
/**
|
232 |
-
* Unique access to instance of YITH_WCQV_Admin class
|
233 |
-
*
|
234 |
-
* @return \YITH_WCQV_Admin
|
235 |
-
* @since 1.0.0
|
236 |
-
*/
|
237 |
-
function YITH_WCQV_Admin(){
|
238 |
-
return YITH_WCQV_Admin::get_instance();
|
239 |
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Admin class
|
4 |
+
*
|
5 |
+
* @author Yithemes
|
6 |
+
* @package YITH WooCommerce Quick View
|
7 |
+
* @version 1.1.1
|
8 |
+
*/
|
9 |
+
|
10 |
+
if ( ! defined( 'YITH_WCQV' ) ) {
|
11 |
+
exit;
|
12 |
+
} // Exit if accessed directly
|
13 |
+
|
14 |
+
if ( ! class_exists( 'YITH_WCQV_Admin' ) ) {
|
15 |
+
/**
|
16 |
+
* Admin class.
|
17 |
+
* The class manage all the admin behaviors.
|
18 |
+
*
|
19 |
+
* @since 1.0.0
|
20 |
+
*/
|
21 |
+
class YITH_WCQV_Admin {
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Single instance of the class
|
25 |
+
*
|
26 |
+
* @var \YITH_WCQV_Admin
|
27 |
+
* @since 1.0.0
|
28 |
+
*/
|
29 |
+
protected static $instance;
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Plugin options
|
33 |
+
*
|
34 |
+
* @var array
|
35 |
+
* @access public
|
36 |
+
* @since 1.0.0
|
37 |
+
*/
|
38 |
+
public $options = array();
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Plugin version
|
42 |
+
*
|
43 |
+
* @var string
|
44 |
+
* @since 1.0.0
|
45 |
+
*/
|
46 |
+
public $version = YITH_WCQV_VERSION;
|
47 |
+
|
48 |
+
/**
|
49 |
+
* @var $_panel Panel Object
|
50 |
+
*/
|
51 |
+
protected $_panel;
|
52 |
+
|
53 |
+
/**
|
54 |
+
* @var $_premium string Premium tab template file name
|
55 |
+
*/
|
56 |
+
protected $_premium = 'premium.php';
|
57 |
+
|
58 |
+
/**
|
59 |
+
* @var string Premium version landing link
|
60 |
+
*/
|
61 |
+
protected $_premium_landing = 'https://yithemes.com/themes/plugins/yith-woocommerce-quick-view/';
|
62 |
+
|
63 |
+
/**
|
64 |
+
* @var string Quick View panel page
|
65 |
+
*/
|
66 |
+
protected $_panel_page = 'yith_wcqv_panel';
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Various links
|
70 |
+
*
|
71 |
+
* @var string
|
72 |
+
* @access public
|
73 |
+
* @since 1.0.0
|
74 |
+
*/
|
75 |
+
public $doc_url = 'https://docs.yithemes.com/yith-woocommerce-quick-view/';
|
76 |
+
|
77 |
+
/**
|
78 |
+
* Returns single instance of the class
|
79 |
+
*
|
80 |
+
* @return \YITH_WCQV_Admin
|
81 |
+
* @since 1.0.0
|
82 |
+
*/
|
83 |
+
public static function get_instance(){
|
84 |
+
if( is_null( self::$instance ) ){
|
85 |
+
self::$instance = new self();
|
86 |
+
}
|
87 |
+
|
88 |
+
return self::$instance;
|
89 |
+
}
|
90 |
+
|
91 |
+
/**
|
92 |
+
* Constructor
|
93 |
+
*
|
94 |
+
* @access public
|
95 |
+
* @since 1.0.0
|
96 |
+
*/
|
97 |
+
public function __construct() {
|
98 |
+
|
99 |
+
// Add panel options
|
100 |
+
add_action( 'admin_menu', array( $this, 'register_panel' ), 5) ;
|
101 |
+
|
102 |
+
//Add action links
|
103 |
+
add_filter( 'plugin_action_links_' . plugin_basename( YITH_WCQV_DIR . '/' . basename( YITH_WCQV_FILE ) ), array( $this, 'action_links') );
|
104 |
+
add_filter( 'plugin_row_meta', array( $this, 'plugin_row_meta' ), 10, 4 );
|
105 |
+
|
106 |
+
add_action( 'yith_quick_view_premium', array( $this, 'premium_tab' ) );
|
107 |
+
|
108 |
+
// YITH WCQV Loaded
|
109 |
+
do_action( 'yith_wcqv_loaded' );
|
110 |
+
|
111 |
+
}
|
112 |
+
|
113 |
+
|
114 |
+
/**
|
115 |
+
* Action Links
|
116 |
+
*
|
117 |
+
* add the action links to plugin admin page
|
118 |
+
*
|
119 |
+
* @param $links | links plugin array
|
120 |
+
*
|
121 |
+
* @return mixed Array
|
122 |
+
* @since 1.0
|
123 |
+
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
124 |
+
* @return mixed
|
125 |
+
* @use plugin_action_links_{$plugin_file_name}
|
126 |
+
*/
|
127 |
+
public function action_links( $links ) {
|
128 |
+
|
129 |
+
$links[] = '<a href="' . admin_url( "admin.php?page={$this->_panel_page}" ) . '">' . __( 'Settings', 'yith-woocommerce-quick-view' ) . '</a>';
|
130 |
+
$links[] = '<a href="' . $this->get_premium_landing_uri() . '" target="_blank">' . __( 'Premium Version', 'yith-woocommerce-quick-view' ) . '</a>';
|
131 |
+
|
132 |
+
return $links;
|
133 |
+
}
|
134 |
+
|
135 |
+
/**
|
136 |
+
* Add a panel under YITH Plugins tab
|
137 |
+
*
|
138 |
+
* @return void
|
139 |
+
* @since 1.0
|
140 |
+
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
141 |
+
* @use /Yit_Plugin_Panel class
|
142 |
+
* @see plugin-fw/lib/yit-plugin-panel.php
|
143 |
+
*/
|
144 |
+
public function register_panel() {
|
145 |
+
|
146 |
+
if ( ! empty( $this->_panel ) ) {
|
147 |
+
return;
|
148 |
+
}
|
149 |
+
|
150 |
+
$admin_tabs = array(
|
151 |
+
'settings' => __( 'Settings', 'yith-woocommerce-quick-view' ),
|
152 |
+
'premium' => __( 'Premium Version', 'yith-woocommerce-quick-view' ),
|
153 |
+
);
|
154 |
+
|
155 |
+
$args = array(
|
156 |
+
'create_menu_page' => true,
|
157 |
+
'parent_slug' => '',
|
158 |
+
'page_title' => __( 'Quick View', 'yith-woocommerce-quick-view' ),
|
159 |
+
'menu_title' => __( 'Quick View', 'yith-woocommerce-quick-view' ),
|
160 |
+
'capability' => 'manage_options',
|
161 |
+
'parent' => '',
|
162 |
+
'parent_page' => 'yit_plugin_panel',
|
163 |
+
'page' => $this->_panel_page,
|
164 |
+
'admin-tabs' => $admin_tabs,
|
165 |
+
'options-path' => YITH_WCQV_DIR . '/plugin-options'
|
166 |
+
);
|
167 |
+
|
168 |
+
|
169 |
+
/* === Fixed: not updated theme === */
|
170 |
+
if( ! class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
|
171 |
+
require_once( 'plugin-fw/lib/yit-plugin-panel-wc.php' );
|
172 |
+
}
|
173 |
+
|
174 |
+
$this->_panel = new YIT_Plugin_Panel_WooCommerce( $args );
|
175 |
+
}
|
176 |
+
|
177 |
+
/**
|
178 |
+
* Premium Tab Template
|
179 |
+
*
|
180 |
+
* Load the premium tab template on admin page
|
181 |
+
*
|
182 |
+
* @return void
|
183 |
+
* @since 1.0
|
184 |
+
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
185 |
+
* @return void
|
186 |
+
*/
|
187 |
+
public function premium_tab() {
|
188 |
+
$premium_tab_template = YITH_WCQV_TEMPLATE_PATH . '/admin/' . $this->_premium;
|
189 |
+
if( file_exists( $premium_tab_template ) ) {
|
190 |
+
include_once($premium_tab_template);
|
191 |
+
}
|
192 |
+
|
193 |
+
}
|
194 |
+
|
195 |
+
/**
|
196 |
+
* plugin_row_meta
|
197 |
+
*
|
198 |
+
* add the action links to plugin admin page
|
199 |
+
*
|
200 |
+
* @param $plugin_meta
|
201 |
+
* @param $plugin_file
|
202 |
+
* @param $plugin_data
|
203 |
+
* @param $status
|
204 |
+
*
|
205 |
+
* @return Array
|
206 |
+
* @since 1.0
|
207 |
+
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
208 |
+
* @use plugin_row_meta
|
209 |
+
*/
|
210 |
+
public function plugin_row_meta( $plugin_meta, $plugin_file, $plugin_data, $status ) {
|
211 |
+
|
212 |
+
if ( defined( 'YITH_WCQV_FREE_INIT' ) && YITH_WCQV_FREE_INIT == $plugin_file ) {
|
213 |
+
$plugin_meta[] = '<a href="' . $this->doc_url . '" target="_blank">' . __( 'Plugin Documentation', 'yith-woocommerce-quick-view' ) . '</a>';
|
214 |
+
}
|
215 |
+
return $plugin_meta;
|
216 |
+
}
|
217 |
+
|
218 |
+
/**
|
219 |
+
* Get the premium landing uri
|
220 |
+
*
|
221 |
+
* @since 1.0.0
|
222 |
+
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
223 |
+
* @return string The premium landing link
|
224 |
+
*/
|
225 |
+
public function get_premium_landing_uri(){
|
226 |
+
return defined( 'YITH_REFER_ID' ) ? $this->_premium_landing . '?refer_id=' . YITH_REFER_ID : $this->_premium_landing.'?refer_id=1030585';
|
227 |
+
}
|
228 |
+
|
229 |
+
}
|
230 |
+
}
|
231 |
+
/**
|
232 |
+
* Unique access to instance of YITH_WCQV_Admin class
|
233 |
+
*
|
234 |
+
* @return \YITH_WCQV_Admin
|
235 |
+
* @since 1.0.0
|
236 |
+
*/
|
237 |
+
function YITH_WCQV_Admin(){
|
238 |
+
return YITH_WCQV_Admin::get_instance();
|
239 |
}
|
includes/class.yith-wcqv-frontend.php
CHANGED
@@ -1,306 +1,358 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Frontend class
|
4 |
-
*
|
5 |
-
* @author Yithemes
|
6 |
-
* @package YITH WooCommerce Quick View
|
7 |
-
* @version 1.1.1
|
8 |
-
*/
|
9 |
-
|
10 |
-
if ( ! defined( 'YITH_WCQV' ) ) {
|
11 |
-
exit;
|
12 |
-
} // Exit if accessed directly
|
13 |
-
|
14 |
-
if( ! class_exists( 'YITH_WCQV_Frontend' ) ) {
|
15 |
-
/**
|
16 |
-
* Admin class.
|
17 |
-
* The class manage all the Frontend behaviors.
|
18 |
-
*
|
19 |
-
* @since 1.0.0
|
20 |
-
*/
|
21 |
-
class YITH_WCQV_Frontend {
|
22 |
-
|
23 |
-
/**
|
24 |
-
* Single instance of the class
|
25 |
-
*
|
26 |
-
* @var \YITH_WCQV_Frontend
|
27 |
-
* @since 1.0.0
|
28 |
-
*/
|
29 |
-
protected static $instance;
|
30 |
-
|
31 |
-
/**
|
32 |
-
* Plugin version
|
33 |
-
*
|
34 |
-
* @var string
|
35 |
-
* @since 1.0.0
|
36 |
-
*/
|
37 |
-
public $version = YITH_WCQV_VERSION;
|
38 |
-
|
39 |
-
/**
|
40 |
-
* Returns single instance of the class
|
41 |
-
*
|
42 |
-
* @return \YITH_WCQV_Frontend
|
43 |
-
* @since 1.0.0
|
44 |
-
*/
|
45 |
-
public static function get_instance(){
|
46 |
-
if( is_null( self::$instance ) ){
|
47 |
-
self::$instance = new self();
|
48 |
-
}
|
49 |
-
|
50 |
-
return self::$instance;
|
51 |
-
}
|
52 |
-
|
53 |
-
/**
|
54 |
-
* Constructor
|
55 |
-
*
|
56 |
-
* @access public
|
57 |
-
* @since 1.0.0
|
58 |
-
*/
|
59 |
-
public function __construct() {
|
60 |
-
|
61 |
-
// custom styles and javascripts
|
62 |
-
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles_scripts' ) );
|
63 |
-
|
64 |
-
// quick view ajax
|
65 |
-
add_action( 'wp_ajax_yith_load_product_quick_view', array( $this, 'yith_load_product_quick_view_ajax' ) );
|
66 |
-
add_action( 'wp_ajax_nopriv_yith_load_product_quick_view', array( $this, 'yith_load_product_quick_view_ajax' ) );
|
67 |
-
|
68 |
-
// add button
|
69 |
-
add_action( 'woocommerce_after_shop_loop_item', array( $this, 'yith_add_quick_view_button' ), 15 );
|
70 |
-
add_action( 'yith_wcwl_table_after_product_name', array( $this, 'yith_add_quick_view_button' ), 15, 0 );
|
71 |
-
|
72 |
-
// load modal template
|
73 |
-
add_action( 'wp_footer', array( $this, 'yith_quick_view' ) );
|
74 |
-
|
75 |
-
// load action for product template
|
76 |
-
$this->yith_quick_view_action_template();
|
77 |
-
|
78 |
-
add_shortcode( 'yith_quick_view', array( $this, 'quick_view_shortcode' ) );
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
*
|
84 |
-
*
|
85 |
-
* @
|
86 |
-
* @
|
87 |
-
* @
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
$
|
99 |
-
$
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
#yith-quick-view-
|
104 |
-
#yith-quick-view-close
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
*
|
112 |
-
*
|
113 |
-
* @
|
114 |
-
* @param string $
|
115 |
-
* @param
|
116 |
-
* @return
|
117 |
-
* @
|
118 |
-
* @
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
*
|
142 |
-
*
|
143 |
-
* @
|
144 |
-
* @
|
145 |
-
* @
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
*
|
262 |
-
*
|
263 |
-
* @
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
return
|
295 |
-
}
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Frontend class
|
4 |
+
*
|
5 |
+
* @author Yithemes
|
6 |
+
* @package YITH WooCommerce Quick View
|
7 |
+
* @version 1.1.1
|
8 |
+
*/
|
9 |
+
|
10 |
+
if ( ! defined( 'YITH_WCQV' ) ) {
|
11 |
+
exit;
|
12 |
+
} // Exit if accessed directly
|
13 |
+
|
14 |
+
if( ! class_exists( 'YITH_WCQV_Frontend' ) ) {
|
15 |
+
/**
|
16 |
+
* Admin class.
|
17 |
+
* The class manage all the Frontend behaviors.
|
18 |
+
*
|
19 |
+
* @since 1.0.0
|
20 |
+
*/
|
21 |
+
class YITH_WCQV_Frontend {
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Single instance of the class
|
25 |
+
*
|
26 |
+
* @var \YITH_WCQV_Frontend
|
27 |
+
* @since 1.0.0
|
28 |
+
*/
|
29 |
+
protected static $instance;
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Plugin version
|
33 |
+
*
|
34 |
+
* @var string
|
35 |
+
* @since 1.0.0
|
36 |
+
*/
|
37 |
+
public $version = YITH_WCQV_VERSION;
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Returns single instance of the class
|
41 |
+
*
|
42 |
+
* @return \YITH_WCQV_Frontend
|
43 |
+
* @since 1.0.0
|
44 |
+
*/
|
45 |
+
public static function get_instance(){
|
46 |
+
if( is_null( self::$instance ) ){
|
47 |
+
self::$instance = new self();
|
48 |
+
}
|
49 |
+
|
50 |
+
return self::$instance;
|
51 |
+
}
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Constructor
|
55 |
+
*
|
56 |
+
* @access public
|
57 |
+
* @since 1.0.0
|
58 |
+
*/
|
59 |
+
public function __construct() {
|
60 |
+
|
61 |
+
// custom styles and javascripts
|
62 |
+
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles_scripts' ) );
|
63 |
+
|
64 |
+
// quick view ajax
|
65 |
+
add_action( 'wp_ajax_yith_load_product_quick_view', array( $this, 'yith_load_product_quick_view_ajax' ) );
|
66 |
+
add_action( 'wp_ajax_nopriv_yith_load_product_quick_view', array( $this, 'yith_load_product_quick_view_ajax' ) );
|
67 |
+
|
68 |
+
// add button
|
69 |
+
add_action( 'woocommerce_after_shop_loop_item', array( $this, 'yith_add_quick_view_button' ), 15 );
|
70 |
+
add_action( 'yith_wcwl_table_after_product_name', array( $this, 'yith_add_quick_view_button' ), 15, 0 );
|
71 |
+
|
72 |
+
// load modal template
|
73 |
+
add_action( 'wp_footer', array( $this, 'yith_quick_view' ) );
|
74 |
+
|
75 |
+
// load action for product template
|
76 |
+
$this->yith_quick_view_action_template();
|
77 |
+
|
78 |
+
add_shortcode( 'yith_quick_view', array( $this, 'quick_view_shortcode' ) );
|
79 |
+
add_filter( 'woocommerce_add_to_cart_form_action', array( $this, 'avoid_redirect_to_single_page'), 10, 1 );
|
80 |
+
}
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Enqueue styles and scripts
|
84 |
+
*
|
85 |
+
* @access public
|
86 |
+
* @return void
|
87 |
+
* @since 1.0.0
|
88 |
+
* @author Francesco Licandro <francesco.licandro@yithemes.com>
|
89 |
+
*/
|
90 |
+
public function enqueue_styles_scripts() {
|
91 |
+
|
92 |
+
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
|
93 |
+
|
94 |
+
wp_register_script( 'yith-wcqv-frontend', YITH_WCQV_ASSETS_URL . '/js/frontend'.$suffix.'.js', array('jquery'), $this->version, true);
|
95 |
+
wp_enqueue_script( 'yith-wcqv-frontend' );
|
96 |
+
wp_enqueue_style( 'yith-quick-view', YITH_WCQV_ASSETS_URL . '/css/yith-quick-view.css' );
|
97 |
+
|
98 |
+
$background_modal = get_option( 'yith-wcqv-background-modal' );
|
99 |
+
$close_color = get_option( 'yith-wcqv-close-color' );
|
100 |
+
$close_color_hover = get_option( 'yith-wcqv-close-color-hover' );
|
101 |
+
|
102 |
+
$inline_style = "
|
103 |
+
#yith-quick-view-modal .yith-wcqv-main{background:{$background_modal};}
|
104 |
+
#yith-quick-view-close{color:{$close_color};}
|
105 |
+
#yith-quick-view-close:hover{color:{$close_color_hover};}";
|
106 |
+
|
107 |
+
wp_add_inline_style( 'yith-quick-view', $inline_style );
|
108 |
+
}
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Add quick view button in wc product loop
|
112 |
+
*
|
113 |
+
* @access public
|
114 |
+
* @param integer|string $product_id The product id
|
115 |
+
* @param string $label The button label
|
116 |
+
* @param boolean $return
|
117 |
+
* @return string|void
|
118 |
+
* @since 1.0.0
|
119 |
+
* @author Francesco Licandro <francesco.licandro@yithemes.com>
|
120 |
+
*/
|
121 |
+
public function yith_add_quick_view_button( $product_id = 0, $label = '', $return = false ) {
|
122 |
+
|
123 |
+
global $product;
|
124 |
+
|
125 |
+
// get product id
|
126 |
+
! $product_id && $product_id = yit_get_prop( $product, 'id', true );
|
127 |
+
// get label
|
128 |
+
! $label && $label = $this->get_button_label();
|
129 |
+
|
130 |
+
$button = '<a href="#" class="button yith-wcqv-button" data-product_id="' . $product_id . '">' . $label . '</a>';
|
131 |
+
$button = apply_filters( 'yith_add_quick_view_button_html', $button, $label, $product );
|
132 |
+
|
133 |
+
if( $return ) {
|
134 |
+
return $button;
|
135 |
+
}
|
136 |
+
|
137 |
+
echo $button;
|
138 |
+
}
|
139 |
+
|
140 |
+
/**
|
141 |
+
* Enqueue scripts and pass variable to js used in quick view
|
142 |
+
*
|
143 |
+
* @access public
|
144 |
+
* @return bool
|
145 |
+
* @since 1.0.0
|
146 |
+
* @author Francesco Licandro <francesco.licandro@yithemes.com>
|
147 |
+
*/
|
148 |
+
public function yith_woocommerce_quick_view() {
|
149 |
+
|
150 |
+
wp_enqueue_script( 'wc-add-to-cart-variation' );
|
151 |
+
if( version_compare( WC()->version, '3.0.0', '>=' ) ) {
|
152 |
+
if( current_theme_supports('wc-product-gallery-zoom') ) {
|
153 |
+
wp_enqueue_script('zoom');
|
154 |
+
}
|
155 |
+
if( current_theme_supports('wc-product-gallery-lightbox') ) {
|
156 |
+
wp_enqueue_script('photoswipe-ui-default');
|
157 |
+
wp_enqueue_style('photoswipe-default-skin');
|
158 |
+
if( has_action('wp_footer', 'woocommerce_photoswipe') === FALSE ) {
|
159 |
+
add_action('wp_footer', 'woocommerce_photoswipe', 15);
|
160 |
+
}
|
161 |
+
}
|
162 |
+
wp_enqueue_script('wc-single-product');
|
163 |
+
}
|
164 |
+
|
165 |
+
// enqueue wc color e label variation style
|
166 |
+
wp_enqueue_script( 'yith_wccl_frontend' );
|
167 |
+
wp_enqueue_style( 'yith_wccl_frontend' );
|
168 |
+
|
169 |
+
$lightbox_en = get_option( 'yith-wcqv-enable-lightbox' ) == 'yes' ? true : false;
|
170 |
+
|
171 |
+
// if enabled load prettyPhoto css
|
172 |
+
if( $lightbox_en ) {
|
173 |
+
|
174 |
+
$assets_path = str_replace( array( 'http:', 'https:' ), '', WC()->plugin_url() ) . '/assets/';
|
175 |
+
|
176 |
+
wp_enqueue_script( 'prettyPhoto', $assets_path . 'js/prettyPhoto/jquery.prettyPhoto.min.js', array( 'jquery' ), '3.1.5', true );
|
177 |
+
wp_enqueue_style( 'woocommerce_prettyPhoto_css', $assets_path . 'css/prettyPhoto.css' );
|
178 |
+
}
|
179 |
+
|
180 |
+
$version = version_compare( preg_replace( '/-beta-([0-9]+)/', '', WC()->version ), '2.3.0', '<' );
|
181 |
+
|
182 |
+
// loader gif
|
183 |
+
$loader = apply_filters( 'yith_quick_view_loader_gif', YITH_WCQV_ASSETS_URL . '/image/qv-loader.gif' );
|
184 |
+
|
185 |
+
// Allow user to load custom style and scripts
|
186 |
+
do_action( 'yith_quick_view_custom_style_scripts' );
|
187 |
+
|
188 |
+
wp_localize_script( 'yith-wcqv-frontend', 'yith_qv', array (
|
189 |
+
'ajaxurl' => admin_url( 'admin-ajax.php', 'relative' ),
|
190 |
+
'loader' => $loader,
|
191 |
+
'is2_2' => $version,
|
192 |
+
'lang' => defined( 'ICL_LANGUAGE_CODE' ) ? ICL_LANGUAGE_CODE : ''
|
193 |
+
)
|
194 |
+
);
|
195 |
+
|
196 |
+
return true;
|
197 |
+
}
|
198 |
+
|
199 |
+
/**
|
200 |
+
* Ajax action to load product in quick view
|
201 |
+
*
|
202 |
+
* @access public
|
203 |
+
* @return void
|
204 |
+
* @since 1.0.0
|
205 |
+
* @author Francesco Licandro <francesco.licandro@yithemes.com>
|
206 |
+
*/
|
207 |
+
public function yith_load_product_quick_view_ajax() {
|
208 |
+
|
209 |
+
if ( ! isset( $_REQUEST['product_id'] ) ) {
|
210 |
+
die();
|
211 |
+
}
|
212 |
+
|
213 |
+
global $sitepress;
|
214 |
+
|
215 |
+
$product_id = intval( $_REQUEST['product_id'] );
|
216 |
+
|
217 |
+
/**
|
218 |
+
* WPML Suppot: Localize Ajax Call
|
219 |
+
*/
|
220 |
+
$lang = isset( $_REQUEST['lang'] ) ? $_REQUEST['lang'] : '';
|
221 |
+
if( defined( 'ICL_LANGUAGE_CODE' ) && $lang && isset( $sitepress ) ) {
|
222 |
+
$sitepress->switch_lang( $lang, true );
|
223 |
+
}
|
224 |
+
|
225 |
+
// set the main wp query for the product
|
226 |
+
wp( 'p=' . $product_id . '&post_type=product' );
|
227 |
+
|
228 |
+
// remove product thumbnails gallery
|
229 |
+
remove_action( 'woocommerce_product_thumbnails', 'woocommerce_show_product_thumbnails', 20 );
|
230 |
+
|
231 |
+
// change template for variable products
|
232 |
+
if ( isset( $GLOBALS['yith_wccl'] ) ) {
|
233 |
+
$GLOBALS['yith_wccl']->obj = new YITH_WCCL_Frontend( YITH_WCCL_VERSION );
|
234 |
+
$GLOBALS['yith_wccl']->obj->override();
|
235 |
+
}
|
236 |
+
|
237 |
+
ob_start();
|
238 |
+
|
239 |
+
// load content template
|
240 |
+
wc_get_template( 'yith-quick-view-content.php', array(), '', YITH_WCQV_DIR . 'templates/' );
|
241 |
+
|
242 |
+
echo ob_get_clean();
|
243 |
+
|
244 |
+
die();
|
245 |
+
}
|
246 |
+
|
247 |
+
/**
|
248 |
+
* Load quick view template
|
249 |
+
*
|
250 |
+
* @access public
|
251 |
+
* @return void
|
252 |
+
* @since 1.0.0
|
253 |
+
* @author Francesco Licandro <francesco.licandro@yithemes.com>
|
254 |
+
*/
|
255 |
+
public function yith_quick_view() {
|
256 |
+
$this->yith_woocommerce_quick_view();
|
257 |
+
wc_get_template( 'yith-quick-view.php', array(), '', YITH_WCQV_DIR . 'templates/' );
|
258 |
+
}
|
259 |
+
|
260 |
+
/**
|
261 |
+
* Load wc action for quick view product template
|
262 |
+
*
|
263 |
+
* @access public
|
264 |
+
* @return void
|
265 |
+
* @since 1.0.0
|
266 |
+
* @author Francesco Licandro <francesco.licandro@yithemes.com>
|
267 |
+
*/
|
268 |
+
public function yith_quick_view_action_template() {
|
269 |
+
|
270 |
+
// Image
|
271 |
+
add_action( 'yith_wcqv_product_image', 'woocommerce_show_product_sale_flash', 10 );
|
272 |
+
add_action( 'yith_wcqv_product_image', 'woocommerce_show_product_images', 20 );
|
273 |
+
|
274 |
+
// Summary
|
275 |
+
add_action( 'yith_wcqv_product_summary', 'woocommerce_template_single_title', 5 );
|
276 |
+
add_action( 'yith_wcqv_product_summary', 'woocommerce_template_single_rating', 10 );
|
277 |
+
add_action( 'yith_wcqv_product_summary', 'woocommerce_template_single_price', 15 );
|
278 |
+
add_action( 'yith_wcqv_product_summary', 'woocommerce_template_single_excerpt', 20 );
|
279 |
+
add_action( 'yith_wcqv_product_summary', 'woocommerce_template_single_add_to_cart', 25 );
|
280 |
+
add_action( 'yith_wcqv_product_summary', 'woocommerce_template_single_meta', 30 );
|
281 |
+
}
|
282 |
+
|
283 |
+
/**
|
284 |
+
* Get Quick View button label
|
285 |
+
*
|
286 |
+
* @author Francesco Licandro
|
287 |
+
* @since 1.2.0
|
288 |
+
* @return string
|
289 |
+
*/
|
290 |
+
public function get_button_label(){
|
291 |
+
$label = get_option( 'yith-wcqv-button-label' );
|
292 |
+
$label = call_user_func( '__' , $label, 'yith-woocommerce-quick-view' );
|
293 |
+
|
294 |
+
return apply_filters( 'yith_wcqv_button_label', esc_html( $label ) );
|
295 |
+
}
|
296 |
+
|
297 |
+
/**
|
298 |
+
* Quick View shortcode button
|
299 |
+
*
|
300 |
+
* @access public
|
301 |
+
* @since 1.0.7
|
302 |
+
* @param array $atts
|
303 |
+
* @return string
|
304 |
+
* @author Francesco Licandro
|
305 |
+
*/
|
306 |
+
public function quick_view_shortcode( $atts ) {
|
307 |
+
|
308 |
+
$atts = shortcode_atts(array(
|
309 |
+
'product_id' => 0,
|
310 |
+
'label' => ''
|
311 |
+
), $atts );
|
312 |
+
|
313 |
+
extract( $atts );
|
314 |
+
|
315 |
+
if( ! intval( $product_id ) ) {
|
316 |
+
return '';
|
317 |
+
}
|
318 |
+
|
319 |
+
return $this->yith_add_quick_view_button( $product_id, $label, true );
|
320 |
+
}
|
321 |
+
|
322 |
+
/**
|
323 |
+
* Check if is quick view
|
324 |
+
*
|
325 |
+
* @access public
|
326 |
+
* @return bool
|
327 |
+
* @since 1.3.1
|
328 |
+
* @author Francesco Licandro <francesco.licandro@yithemes.com>
|
329 |
+
*/
|
330 |
+
public function yith_is_quick_view() {
|
331 |
+
return ( defined('DOING_AJAX') && DOING_AJAX && isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'yith_load_product_quick_view' ) ? true : false;
|
332 |
+
}
|
333 |
+
|
334 |
+
/**
|
335 |
+
* Avoid redirect to single product page on add to cart action in quick view
|
336 |
+
*
|
337 |
+
* @since 1.3.1
|
338 |
+
* @author Francesco Licandro
|
339 |
+
* @param string $value
|
340 |
+
* @return string
|
341 |
+
*/
|
342 |
+
public function avoid_redirect_to_single_page( $value ){
|
343 |
+
if( $this->yith_is_quick_view() ) {
|
344 |
+
return '';
|
345 |
+
}
|
346 |
+
return $value;
|
347 |
+
}
|
348 |
+
}
|
349 |
+
}
|
350 |
+
/**
|
351 |
+
* Unique access to instance of YITH_WCQV_Frontend class
|
352 |
+
*
|
353 |
+
* @return \YITH_WCQV_Frontend
|
354 |
+
* @since 1.0.0
|
355 |
+
*/
|
356 |
+
function YITH_WCQV_Frontend(){
|
357 |
+
return YITH_WCQV_Frontend::get_instance();
|
358 |
+
}
|
includes/class.yith-wcqv.php
CHANGED
@@ -1,157 +1,157 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Main class
|
4 |
-
*
|
5 |
-
* @author Yithemes
|
6 |
-
* @package YITH WooCommerce Quick View
|
7 |
-
* @version 1.0.0
|
8 |
-
*/
|
9 |
-
|
10 |
-
|
11 |
-
if ( ! defined( 'YITH_WCQV' ) ) {
|
12 |
-
exit;
|
13 |
-
} // Exit if accessed directly
|
14 |
-
|
15 |
-
if ( ! class_exists( 'YITH_WCQV' ) ) {
|
16 |
-
/**
|
17 |
-
* YITH WooCommerce Quick View
|
18 |
-
*
|
19 |
-
* @since 1.0.0
|
20 |
-
*/
|
21 |
-
class YITH_WCQV {
|
22 |
-
|
23 |
-
/**
|
24 |
-
* Single instance of the class
|
25 |
-
*
|
26 |
-
* @var \YITH_WCQV
|
27 |
-
* @since 1.0.0
|
28 |
-
*/
|
29 |
-
protected static $instance;
|
30 |
-
|
31 |
-
/**
|
32 |
-
* Plugin version
|
33 |
-
*
|
34 |
-
* @var string
|
35 |
-
* @since 1.0.0
|
36 |
-
*/
|
37 |
-
public $version = YITH_WCQV_VERSION;
|
38 |
-
|
39 |
-
/**
|
40 |
-
* Plugin object
|
41 |
-
*
|
42 |
-
* @var string
|
43 |
-
* @since 1.0.0
|
44 |
-
*/
|
45 |
-
public $obj = null;
|
46 |
-
|
47 |
-
/**
|
48 |
-
* Returns single instance of the class
|
49 |
-
*
|
50 |
-
* @return \YITH_WCQV
|
51 |
-
* @since 1.0.0
|
52 |
-
*/
|
53 |
-
public static function get_instance(){
|
54 |
-
if( is_null( self::$instance ) ){
|
55 |
-
self::$instance = new self();
|
56 |
-
}
|
57 |
-
|
58 |
-
return self::$instance;
|
59 |
-
}
|
60 |
-
|
61 |
-
/**
|
62 |
-
* Constructor
|
63 |
-
*
|
64 |
-
* @return mixed| YITH_WCQV_Admin | YITH_WCQV_Frontend
|
65 |
-
* @since 1.0.0
|
66 |
-
*/
|
67 |
-
public function __construct() {
|
68 |
-
|
69 |
-
// Load Plugin Framework
|
70 |
-
add_action( 'after_setup_theme', array( $this, 'plugin_fw_loader' ), 1 );
|
71 |
-
|
72 |
-
$action = array(
|
73 |
-
'woocommerce_get_refreshed_fragments',
|
74 |
-
'woocommerce_apply_coupon',
|
75 |
-
'woocommerce_remove_coupon',
|
76 |
-
'woocommerce_update_shipping_method',
|
77 |
-
'woocommerce_update_order_review',
|
78 |
-
'woocommerce_add_to_cart',
|
79 |
-
'woocommerce_checkout'
|
80 |
-
);
|
81 |
-
|
82 |
-
// Exit if is woocommerce ajax
|
83 |
-
if( defined( 'DOING_AJAX') && DOING_AJAX && isset( $_REQUEST['action'] ) && in_array( $_REQUEST['action'], $action ) ) {
|
84 |
-
return;
|
85 |
-
}
|
86 |
-
|
87 |
-
if ( $this->is_admin() ) {
|
88 |
-
// load admin classes
|
89 |
-
require_once( 'class.yith-wcqv-admin.php' );
|
90 |
-
YITH_WCQV_Admin();
|
91 |
-
}
|
92 |
-
|
93 |
-
if( $this->load_frontend() ) {
|
94 |
-
// load frontend classes
|
95 |
-
require_once( 'class.yith-wcqv-frontend.php' );
|
96 |
-
YITH_WCQV_Frontend();
|
97 |
-
}
|
98 |
-
}
|
99 |
-
|
100 |
-
/**
|
101 |
-
* Check if context is admin
|
102 |
-
*
|
103 |
-
* @author Francesco Licandro
|
104 |
-
* @since 1.2.0
|
105 |
-
* @return boolean
|
106 |
-
*/
|
107 |
-
public function is_admin(){
|
108 |
-
$is_ajax = ( defined( 'DOING_AJAX') && DOING_AJAX && isset( $_REQUEST['context'] ) && $_REQUEST['context'] == 'frontend' );
|
109 |
-
return apply_filters( 'yith_wcqv_is_admin', is_admin() && ! $is_ajax );
|
110 |
-
}
|
111 |
-
|
112 |
-
/**
|
113 |
-
* Check if load or not frontend
|
114 |
-
*
|
115 |
-
* @author Francesco Licandro
|
116 |
-
* @since 1.2.0
|
117 |
-
* @return boolean
|
118 |
-
*/
|
119 |
-
public function load_frontend(){
|
120 |
-
// Class frontend
|
121 |
-
$enable = get_option( 'yith-wcqv-enable', 'yes' ) == 'yes';
|
122 |
-
$enable_on_mobile = get_option( 'yith-wcqv-enable-mobile', 'yes' ) == 'yes';
|
123 |
-
$is_mobile = wp_is_mobile();
|
124 |
-
|
125 |
-
return apply_filters( 'yith_wcqv_load_frontend', ( ! $is_mobile && $enable ) || ( $is_mobile && $enable_on_mobile ) );
|
126 |
-
}
|
127 |
-
|
128 |
-
|
129 |
-
/**
|
130 |
-
* Load Plugin Framework
|
131 |
-
*
|
132 |
-
* @since 1.0
|
133 |
-
* @access public
|
134 |
-
* @return void
|
135 |
-
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
136 |
-
*/
|
137 |
-
public function plugin_fw_loader() {
|
138 |
-
if ( ! defined( 'YIT_CORE_PLUGIN' ) ) {
|
139 |
-
global $plugin_fw_data;
|
140 |
-
if( ! empty( $plugin_fw_data ) ){
|
141 |
-
$plugin_fw_file = array_shift( $plugin_fw_data );
|
142 |
-
require_once( $plugin_fw_file );
|
143 |
-
}
|
144 |
-
}
|
145 |
-
}
|
146 |
-
}
|
147 |
-
}
|
148 |
-
|
149 |
-
/**
|
150 |
-
* Unique access to instance of YITH_WCQV class
|
151 |
-
*
|
152 |
-
* @return \YITH_WCQV
|
153 |
-
* @since 1.0.0
|
154 |
-
*/
|
155 |
-
function YITH_WCQV(){
|
156 |
-
return YITH_WCQV::get_instance();
|
157 |
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Main class
|
4 |
+
*
|
5 |
+
* @author Yithemes
|
6 |
+
* @package YITH WooCommerce Quick View
|
7 |
+
* @version 1.0.0
|
8 |
+
*/
|
9 |
+
|
10 |
+
|
11 |
+
if ( ! defined( 'YITH_WCQV' ) ) {
|
12 |
+
exit;
|
13 |
+
} // Exit if accessed directly
|
14 |
+
|
15 |
+
if ( ! class_exists( 'YITH_WCQV' ) ) {
|
16 |
+
/**
|
17 |
+
* YITH WooCommerce Quick View
|
18 |
+
*
|
19 |
+
* @since 1.0.0
|
20 |
+
*/
|
21 |
+
class YITH_WCQV {
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Single instance of the class
|
25 |
+
*
|
26 |
+
* @var \YITH_WCQV
|
27 |
+
* @since 1.0.0
|
28 |
+
*/
|
29 |
+
protected static $instance;
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Plugin version
|
33 |
+
*
|
34 |
+
* @var string
|
35 |
+
* @since 1.0.0
|
36 |
+
*/
|
37 |
+
public $version = YITH_WCQV_VERSION;
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Plugin object
|
41 |
+
*
|
42 |
+
* @var string
|
43 |
+
* @since 1.0.0
|
44 |
+
*/
|
45 |
+
public $obj = null;
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Returns single instance of the class
|
49 |
+
*
|
50 |
+
* @return \YITH_WCQV
|
51 |
+
* @since 1.0.0
|
52 |
+
*/
|
53 |
+
public static function get_instance(){
|
54 |
+
if( is_null( self::$instance ) ){
|
55 |
+
self::$instance = new self();
|
56 |
+
}
|
57 |
+
|
58 |
+
return self::$instance;
|
59 |
+
}
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Constructor
|
63 |
+
*
|
64 |
+
* @return mixed| YITH_WCQV_Admin | YITH_WCQV_Frontend
|
65 |
+
* @since 1.0.0
|
66 |
+
*/
|
67 |
+
public function __construct() {
|
68 |
+
|
69 |
+
// Load Plugin Framework
|
70 |
+
add_action( 'after_setup_theme', array( $this, 'plugin_fw_loader' ), 1 );
|
71 |
+
|
72 |
+
$action = array(
|
73 |
+
'woocommerce_get_refreshed_fragments',
|
74 |
+
'woocommerce_apply_coupon',
|
75 |
+
'woocommerce_remove_coupon',
|
76 |
+
'woocommerce_update_shipping_method',
|
77 |
+
'woocommerce_update_order_review',
|
78 |
+
'woocommerce_add_to_cart',
|
79 |
+
'woocommerce_checkout'
|
80 |
+
);
|
81 |
+
|
82 |
+
// Exit if is woocommerce ajax
|
83 |
+
if( defined( 'DOING_AJAX') && DOING_AJAX && isset( $_REQUEST['action'] ) && in_array( $_REQUEST['action'], $action ) ) {
|
84 |
+
return;
|
85 |
+
}
|
86 |
+
|
87 |
+
if ( $this->is_admin() ) {
|
88 |
+
// load admin classes
|
89 |
+
require_once( 'class.yith-wcqv-admin.php' );
|
90 |
+
YITH_WCQV_Admin();
|
91 |
+
}
|
92 |
+
|
93 |
+
if( $this->load_frontend() ) {
|
94 |
+
// load frontend classes
|
95 |
+
require_once( 'class.yith-wcqv-frontend.php' );
|
96 |
+
YITH_WCQV_Frontend();
|
97 |
+
}
|
98 |
+
}
|
99 |
+
|
100 |
+
/**
|
101 |
+
* Check if context is admin
|
102 |
+
*
|
103 |
+
* @author Francesco Licandro
|
104 |
+
* @since 1.2.0
|
105 |
+
* @return boolean
|
106 |
+
*/
|
107 |
+
public function is_admin(){
|
108 |
+
$is_ajax = ( defined( 'DOING_AJAX') && DOING_AJAX && isset( $_REQUEST['context'] ) && $_REQUEST['context'] == 'frontend' );
|
109 |
+
return apply_filters( 'yith_wcqv_is_admin', is_admin() && ! $is_ajax );
|
110 |
+
}
|
111 |
+
|
112 |
+
/**
|
113 |
+
* Check if load or not frontend
|
114 |
+
*
|
115 |
+
* @author Francesco Licandro
|
116 |
+
* @since 1.2.0
|
117 |
+
* @return boolean
|
118 |
+
*/
|
119 |
+
public function load_frontend(){
|
120 |
+
// Class frontend
|
121 |
+
$enable = get_option( 'yith-wcqv-enable', 'yes' ) == 'yes';
|
122 |
+
$enable_on_mobile = get_option( 'yith-wcqv-enable-mobile', 'yes' ) == 'yes';
|
123 |
+
$is_mobile = wp_is_mobile();
|
124 |
+
|
125 |
+
return apply_filters( 'yith_wcqv_load_frontend', ( ! $is_mobile && $enable ) || ( $is_mobile && $enable_on_mobile ) );
|
126 |
+
}
|
127 |
+
|
128 |
+
|
129 |
+
/**
|
130 |
+
* Load Plugin Framework
|
131 |
+
*
|
132 |
+
* @since 1.0
|
133 |
+
* @access public
|
134 |
+
* @return void
|
135 |
+
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
136 |
+
*/
|
137 |
+
public function plugin_fw_loader() {
|
138 |
+
if ( ! defined( 'YIT_CORE_PLUGIN' ) ) {
|
139 |
+
global $plugin_fw_data;
|
140 |
+
if( ! empty( $plugin_fw_data ) ){
|
141 |
+
$plugin_fw_file = array_shift( $plugin_fw_data );
|
142 |
+
require_once( $plugin_fw_file );
|
143 |
+
}
|
144 |
+
}
|
145 |
+
}
|
146 |
+
}
|
147 |
+
}
|
148 |
+
|
149 |
+
/**
|
150 |
+
* Unique access to instance of YITH_WCQV class
|
151 |
+
*
|
152 |
+
* @return \YITH_WCQV
|
153 |
+
* @since 1.0.0
|
154 |
+
*/
|
155 |
+
function YITH_WCQV(){
|
156 |
+
return YITH_WCQV::get_instance();
|
157 |
}
|
init.php
CHANGED
@@ -1,125 +1,127 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Plugin Name: YITH WooCommerce Quick View
|
4 |
-
* Plugin URI: https://yithemes.com/themes/plugins/yith-woocommerce-quick-view
|
5 |
-
* Description: YITH WooCommerce Quick View allows your users to have a quick look about products.
|
6 |
-
* Version: 1.3.
|
7 |
-
* Author: YITHEMES
|
8 |
-
* Author URI: https://yithemes.com/
|
9 |
-
* Text Domain: yith-woocommerce-quick-view
|
10 |
-
* Domain Path: /languages/
|
11 |
-
*
|
12 |
-
*
|
13 |
-
*
|
14 |
-
* @
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
if ( !
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
|
|
|
|
125 |
add_action( 'plugins_loaded', 'yith_wcqv_install', 11 );
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Plugin Name: YITH WooCommerce Quick View
|
4 |
+
* Plugin URI: https://yithemes.com/themes/plugins/yith-woocommerce-quick-view
|
5 |
+
* Description: YITH WooCommerce Quick View allows your users to have a quick look about products.
|
6 |
+
* Version: 1.3.1
|
7 |
+
* Author: YITHEMES
|
8 |
+
* Author URI: https://yithemes.com/
|
9 |
+
* Text Domain: yith-woocommerce-quick-view
|
10 |
+
* Domain Path: /languages/
|
11 |
+
* WC requires at least: 2.5.0
|
12 |
+
* WC tested up to: 3.4.0
|
13 |
+
*
|
14 |
+
* @author Yithemes
|
15 |
+
* @package YITH WooCommerce Quick View
|
16 |
+
* @version 1.3.1
|
17 |
+
*/
|
18 |
+
/* Copyright 2015 Your Inspiration Themes (email : plugins@yithemes.com)
|
19 |
+
|
20 |
+
This program is free software; you can redistribute it and/or modify
|
21 |
+
it under the terms of the GNU General Public License, version 2, as
|
22 |
+
published by the Free Software Foundation.
|
23 |
+
|
24 |
+
This program is distributed in the hope that it will be useful,
|
25 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
26 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
27 |
+
GNU General Public License for more details.
|
28 |
+
|
29 |
+
You should have received a copy of the GNU General Public License
|
30 |
+
along with this program; if not, write to the Free Software
|
31 |
+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
32 |
+
*/
|
33 |
+
|
34 |
+
if ( !defined( 'ABSPATH' ) ) { exit; } // Exit if accessed directly
|
35 |
+
|
36 |
+
if ( ! function_exists( 'is_plugin_active' ) ) {
|
37 |
+
require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
38 |
+
}
|
39 |
+
|
40 |
+
function yith_wcqv_install_woocommerce_admin_notice() {
|
41 |
+
?>
|
42 |
+
<div class="error">
|
43 |
+
<p><?php _e( 'YITH WooCommerce Quick View is enabled but not effective. It requires WooCommerce in order to work.', 'yith-woocommerce-quick-view' ); ?></p>
|
44 |
+
</div>
|
45 |
+
<?php
|
46 |
+
}
|
47 |
+
|
48 |
+
|
49 |
+
function yith_wcqv_install_free_admin_notice() {
|
50 |
+
?>
|
51 |
+
<div class="error">
|
52 |
+
<p><?php _e( 'You can\'t activate the free version of YITH WooCommerce Quick View while you are using the premium one.', 'yith-woocommerce-quick-view' ); ?></p>
|
53 |
+
</div>
|
54 |
+
<?php
|
55 |
+
}
|
56 |
+
|
57 |
+
if ( ! function_exists( 'yith_plugin_registration_hook' ) ) {
|
58 |
+
require_once 'plugin-fw/yit-plugin-registration-hook.php';
|
59 |
+
}
|
60 |
+
register_activation_hook( __FILE__, 'yith_plugin_registration_hook' );
|
61 |
+
|
62 |
+
|
63 |
+
if ( ! defined( 'YITH_WCQV_VERSION' ) ){
|
64 |
+
define( 'YITH_WCQV_VERSION', '1.3.1' );
|
65 |
+
}
|
66 |
+
|
67 |
+
if ( ! defined( 'YITH_WCQV_FREE_INIT' ) ) {
|
68 |
+
define( 'YITH_WCQV_FREE_INIT', plugin_basename( __FILE__ ) );
|
69 |
+
}
|
70 |
+
|
71 |
+
if ( ! defined( 'YITH_WCQV' ) ) {
|
72 |
+
define( 'YITH_WCQV', true );
|
73 |
+
}
|
74 |
+
|
75 |
+
if ( ! defined( 'YITH_WCQV_FILE' ) ) {
|
76 |
+
define( 'YITH_WCQV_FILE', __FILE__ );
|
77 |
+
}
|
78 |
+
|
79 |
+
if ( ! defined( 'YITH_WCQV_URL' ) ) {
|
80 |
+
define( 'YITH_WCQV_URL', plugin_dir_url( __FILE__ ) );
|
81 |
+
}
|
82 |
+
|
83 |
+
if ( ! defined( 'YITH_WCQV_DIR' ) ) {
|
84 |
+
define( 'YITH_WCQV_DIR', plugin_dir_path( __FILE__ ) );
|
85 |
+
}
|
86 |
+
|
87 |
+
if ( ! defined( 'YITH_WCQV_TEMPLATE_PATH' ) ) {
|
88 |
+
define( 'YITH_WCQV_TEMPLATE_PATH', YITH_WCQV_DIR . 'templates' );
|
89 |
+
}
|
90 |
+
|
91 |
+
if ( ! defined( 'YITH_WCQV_ASSETS_URL' ) ) {
|
92 |
+
define( 'YITH_WCQV_ASSETS_URL', YITH_WCQV_URL . 'assets' );
|
93 |
+
}
|
94 |
+
|
95 |
+
/* Plugin Framework Version Check */
|
96 |
+
if( ! function_exists( 'yit_maybe_plugin_fw_loader' ) && file_exists( YITH_WCQV_DIR . 'plugin-fw/init.php' ) ) {
|
97 |
+
require_once( YITH_WCQV_DIR . 'plugin-fw/init.php' );
|
98 |
+
}
|
99 |
+
yit_maybe_plugin_fw_loader( YITH_WCQV_DIR );
|
100 |
+
|
101 |
+
function yith_wcqv_init() {
|
102 |
+
|
103 |
+
load_plugin_textdomain( 'yith-woocommerce-quick-view', false, dirname( plugin_basename( __FILE__ ) ). '/languages/' );
|
104 |
+
|
105 |
+
// Load required classes and functions
|
106 |
+
require_once('includes/class.yith-wcqv.php');
|
107 |
+
|
108 |
+
// Let's start the game!
|
109 |
+
YITH_WCQV();
|
110 |
+
}
|
111 |
+
add_action( 'yith_wcqv_init', 'yith_wcqv_init' );
|
112 |
+
|
113 |
+
|
114 |
+
function yith_wcqv_install() {
|
115 |
+
|
116 |
+
if ( ! function_exists( 'WC' ) ) {
|
117 |
+
add_action( 'admin_notices', 'yith_wcqv_install_woocommerce_admin_notice' );
|
118 |
+
}
|
119 |
+
elseif ( defined( 'YITH_WCQV_PREMIUM' ) ) {
|
120 |
+
add_action( 'admin_notices', 'yith_wcqv_install_free_admin_notice' );
|
121 |
+
deactivate_plugins( plugin_basename( __FILE__ ) );
|
122 |
+
}
|
123 |
+
else {
|
124 |
+
do_action( 'yith_wcqv_init' );
|
125 |
+
}
|
126 |
+
}
|
127 |
add_action( 'plugins_loaded', 'yith_wcqv_install', 11 );
|
plugin-fw/assets/css/yit-plugin-panel.css
CHANGED
@@ -46,72 +46,8 @@
|
|
46 |
}
|
47 |
|
48 |
#plugin-fw-wc h3, #yith-plugin-fw-panel h3 {
|
49 |
-
padding
|
50 |
-
|
51 |
-
}
|
52 |
-
|
53 |
-
/* === VIDEO BOX === */
|
54 |
-
.yith-videobox-wrapper {
|
55 |
-
padding-top : 20px;
|
56 |
-
}
|
57 |
-
|
58 |
-
.yith-videobox-wrapper h3 {
|
59 |
-
padding : 0px 10px 10px;
|
60 |
-
border-bottom : 1px solid #eee;
|
61 |
-
}
|
62 |
-
|
63 |
-
.yith-videobox-wrapper .postbox {
|
64 |
-
display : inline-block;
|
65 |
-
}
|
66 |
-
|
67 |
-
.yith-videobox-wrapper .yith_videobox .column {
|
68 |
-
width : 45%;
|
69 |
-
float : left;
|
70 |
-
padding-right : 2.5%;
|
71 |
-
border-right : 1px solid #ebebeb;
|
72 |
-
padding-bottom : 2em;
|
73 |
-
}
|
74 |
-
|
75 |
-
.yith-videobox-wrapper .yith_videobox .column.two {
|
76 |
-
margin-right : 0;
|
77 |
-
padding-right : 0;
|
78 |
-
padding-left : 2.5%;
|
79 |
-
border : 0;
|
80 |
-
max-width : 49%;
|
81 |
-
}
|
82 |
-
|
83 |
-
.yith-videobox-wrapper .yith_videobox h2 {
|
84 |
-
font-size : 16px;
|
85 |
-
margin-bottom : 20px;
|
86 |
-
}
|
87 |
-
|
88 |
-
.yith-videobox-wrapper .yith-video-link {
|
89 |
-
width : 100%;
|
90 |
-
max-width : 200px;
|
91 |
-
float : left;
|
92 |
-
margin : 0 1.5em 1.5em 0;
|
93 |
-
}
|
94 |
-
|
95 |
-
.yith-videobox-wrapper .yith-video-link {
|
96 |
-
width : 100%;
|
97 |
-
max-width : 200px;
|
98 |
-
float : left;
|
99 |
-
margin : 0 1.5em 1.5em 0;
|
100 |
-
}
|
101 |
-
|
102 |
-
.yith-videobox-wrapper .yith-image-frame img {
|
103 |
-
max-width : 100%;
|
104 |
-
height : auto;
|
105 |
-
}
|
106 |
-
|
107 |
-
.yith-videobox-wrapper .yith-video-link img {
|
108 |
-
max-width : 100%;
|
109 |
-
height : auto;
|
110 |
-
}
|
111 |
-
|
112 |
-
.yith-videobox-wrapper .yith-video-iframe {
|
113 |
-
display : none;
|
114 |
-
|
115 |
}
|
116 |
|
117 |
/* === Plugins Upgrader === */
|
46 |
}
|
47 |
|
48 |
#plugin-fw-wc h3, #yith-plugin-fw-panel h3 {
|
49 |
+
padding : 0 0 0 10px;
|
50 |
+
margin : 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
}
|
52 |
|
53 |
/* === Plugins Upgrader === */
|
plugin-fw/assets/css/yith-fields.css
CHANGED
@@ -7,6 +7,11 @@
|
|
7 |
clear : both;
|
8 |
}
|
9 |
|
|
|
|
|
|
|
|
|
|
|
10 |
.yith-disabled {
|
11 |
opacity : 0.3;
|
12 |
pointer-events : none;
|
@@ -32,8 +37,11 @@
|
|
32 |
|
33 |
.yith-plugin-fw input[type=email],
|
34 |
.yith-plugin-fw input[type=number],
|
35 |
-
.yith-plugin-fw input[type=text]:not(.select2-search__field)
|
36 |
.yith-plugin-fw select,
|
|
|
|
|
|
|
37 |
.woocommerce .yith-plugin-fw table.form-table select {
|
38 |
width : 400px;
|
39 |
max-width : 100%;
|
@@ -41,14 +49,29 @@
|
|
41 |
padding : 5px;
|
42 |
}
|
43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
.woocommerce .yith-plugin-fw table.form-table input[type=text].colorpick,
|
45 |
.yith-plugin-fw input[type=text].colorpick {
|
46 |
-
width
|
|
|
|
|
|
|
47 |
}
|
48 |
|
49 |
-
.
|
50 |
-
|
51 |
-
|
|
|
|
|
52 |
}
|
53 |
|
54 |
.yith-plugin-fw textarea {
|
@@ -57,12 +80,6 @@
|
|
57 |
padding : 5px;
|
58 |
}
|
59 |
|
60 |
-
.yith-plugin-fw input[type=email],
|
61 |
-
.yith-plugin-fw input[type=number],
|
62 |
-
.yith-plugin-fw input[type=text]:not(.select2-search__field) {
|
63 |
-
padding : 5px 10px;
|
64 |
-
}
|
65 |
-
|
66 |
/* ------------- ICONS ------------- */
|
67 |
.yit-icons-manager-wrapper {
|
68 |
width : 100%;
|
@@ -175,6 +192,10 @@ ul.yit-icons-manager-list li.active {
|
|
175 |
}
|
176 |
|
177 |
/* ------- OnOff ------- */
|
|
|
|
|
|
|
|
|
178 |
.yith-plugin-fw-onoff-container input {
|
179 |
display : none;
|
180 |
}
|
@@ -218,6 +239,15 @@ ul.yit-icons-manager-list li.active {
|
|
218 |
max-height : 200px;
|
219 |
}
|
220 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
221 |
/* ------- Sidebar Layout ------- */
|
222 |
.yith-plugin-fw-sidebar-layout input[type="radio"] {
|
223 |
display : none;
|
@@ -324,7 +354,7 @@ ul.yit-icons-manager-list li.active {
|
|
324 |
}
|
325 |
|
326 |
.yith-plugin-fw-textarea-editor-field-wrapper textarea.wp-editor-area,
|
327 |
-
.woocommerce table.form-table .yith-plugin-fw-textarea-editor-field-wrapper textarea.wp-editor-area{
|
328 |
width : 100%;
|
329 |
}
|
330 |
|
7 |
clear : both;
|
8 |
}
|
9 |
|
10 |
+
.yith-plugin-fw span.description.inline {
|
11 |
+
display : inline-block;
|
12 |
+
margin : 0 0 0 5px;
|
13 |
+
}
|
14 |
+
|
15 |
.yith-disabled {
|
16 |
opacity : 0.3;
|
17 |
pointer-events : none;
|
37 |
|
38 |
.yith-plugin-fw input[type=email],
|
39 |
.yith-plugin-fw input[type=number],
|
40 |
+
.yith-plugin-fw input[type=text]:not(.select2-search__field),
|
41 |
.yith-plugin-fw select,
|
42 |
+
.woocommerce .yith-plugin-fw table.form-table input[type=email],
|
43 |
+
.woocommerce .yith-plugin-fw table.form-table input[type=number],
|
44 |
+
.woocommerce .yith-plugin-fw table.form-table input[type=text]:not(.select2-search__field),
|
45 |
.woocommerce .yith-plugin-fw table.form-table select {
|
46 |
width : 400px;
|
47 |
max-width : 100%;
|
49 |
padding : 5px;
|
50 |
}
|
51 |
|
52 |
+
.woocommerce .yith-plugin-fw table.form-table input[type=text].wp-color-picker,
|
53 |
+
.woocommerce .yith-plugin-fw table.form-table input[type=text].yith-plugin-fw-colorpicker,
|
54 |
+
.yith-plugin-fw input[type=text].wp-color-picker,
|
55 |
+
.yith-plugin-fw input[type=text].yith-plugin-fw-colorpicker {
|
56 |
+
width : 6em;
|
57 |
+
max-width : none;
|
58 |
+
height : auto;
|
59 |
+
padding : 3px 5px;
|
60 |
+
}
|
61 |
+
|
62 |
.woocommerce .yith-plugin-fw table.form-table input[type=text].colorpick,
|
63 |
.yith-plugin-fw input[type=text].colorpick {
|
64 |
+
width : 6em;
|
65 |
+
max-width : none;
|
66 |
+
height : auto;
|
67 |
+
padding : 6px;
|
68 |
}
|
69 |
|
70 |
+
.yith-plugin-fw input.select2-search__field,
|
71 |
+
.yith-plugin-fw .select2-container .select2-search--inline .select2-search__field,
|
72 |
+
.woocommerce .yith-plugin-fw input.select2-search__field,
|
73 |
+
.woocommerce .yith-plugin-fw table.form-table input.select2-search__field {
|
74 |
+
padding : 3px;
|
75 |
}
|
76 |
|
77 |
.yith-plugin-fw textarea {
|
80 |
padding : 5px;
|
81 |
}
|
82 |
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
/* ------------- ICONS ------------- */
|
84 |
.yit-icons-manager-wrapper {
|
85 |
width : 100%;
|
192 |
}
|
193 |
|
194 |
/* ------- OnOff ------- */
|
195 |
+
.yith-plugin-fw-onoff-container {
|
196 |
+
display : inline-block;
|
197 |
+
}
|
198 |
+
|
199 |
.yith-plugin-fw-onoff-container input {
|
200 |
display : none;
|
201 |
}
|
239 |
max-height : 200px;
|
240 |
}
|
241 |
|
242 |
+
/* ------- Radio ------- */
|
243 |
+
.yith-plugin-fw-radio input[type=radio] {
|
244 |
+
margin : 0 3px 0 0;
|
245 |
+
}
|
246 |
+
|
247 |
+
.yith-plugin-fw-radio__row {
|
248 |
+
margin-bottom : 8px;
|
249 |
+
}
|
250 |
+
|
251 |
/* ------- Sidebar Layout ------- */
|
252 |
.yith-plugin-fw-sidebar-layout input[type="radio"] {
|
253 |
display : none;
|
354 |
}
|
355 |
|
356 |
.yith-plugin-fw-textarea-editor-field-wrapper textarea.wp-editor-area,
|
357 |
+
.woocommerce table.form-table .yith-plugin-fw-textarea-editor-field-wrapper textarea.wp-editor-area {
|
358 |
width : 100%;
|
359 |
}
|
360 |
|
plugin-fw/assets/js/multisite-updater.js
CHANGED
@@ -6,18 +6,18 @@
|
|
6 |
* It is also available through the world-wide-web at this URL:
|
7 |
* http://www.gnu.org/licenses/gpl-3.0.txt
|
8 |
*/
|
9 |
-
(function ($) {
|
10 |
|
11 |
-
|
12 |
-
update
|
13 |
-
|
14 |
-
registered
|
15 |
-
activated
|
16 |
|
17 |
-
if( count == 0 || count == ''){
|
18 |
var update_row = '<span class="update-plugins"><span class="plugin-count"></span></span>';
|
19 |
-
count
|
20 |
-
plugins_menu_item.find( '.wp-menu-name').append( update_row );
|
21 |
}
|
22 |
|
23 |
/**
|
@@ -38,51 +38,47 @@
|
|
38 |
*
|
39 |
* @return void
|
40 |
*/
|
41 |
-
function update_plugins_row( registered, activated, count, localize ){
|
42 |
-
for( var init in registered ){
|
43 |
-
var plugin = registered[init];
|
44 |
-
for( var headers in plugin ){
|
45 |
|
46 |
-
if( headers == 'slug' || version_compare( plugin[headers].Version, plugin[headers].Latest, '>=' ) ) {
|
47 |
continue;
|
48 |
}
|
49 |
|
50 |
-
count = parseInt(count) + 1;
|
51 |
-
$(".plugin-count").empty().html(count);
|
52 |
|
53 |
-
var regex
|
54 |
-
info
|
55 |
-
name
|
56 |
-
id
|
57 |
-
row
|
58 |
|
59 |
-
$(row).addClass("update");
|
60 |
|
61 |
var html = '<tr class="plugin-update-tr">' +
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
|
66 |
-
if( typeof activated[init] == "undefined" ) {
|
67 |
|
68 |
html = html +
|
69 |
-
|
70 |
-
|
71 |
} else {
|
72 |
html = html +
|
73 |
-
|
74 |
-
}
|
75 |
-
|
76 |
-
if( typeof localize.changelogs[init] != 'undefined' ){
|
77 |
-
html = html + localize.changelogs[init];
|
78 |
}
|
79 |
|
80 |
html = html +
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
|
85 |
-
$(html).insertAfter(row);
|
86 |
}
|
87 |
}
|
88 |
}
|
@@ -96,7 +92,7 @@
|
|
96 |
*
|
97 |
* @see php.js library http://phpjs.org/
|
98 |
*/
|
99 |
-
function version_compare(v1, v2, operator) {
|
100 |
// discuss at: http://phpjs.org/functions/version_compare/
|
101 |
// original by: Philippe Jausions (http://pear.php.net/user/jausions)
|
102 |
// original by: Aidan Lister (http://aidanlister.com/)
|
@@ -113,21 +109,21 @@
|
|
113 |
// example 4: version_compare('4.1.0.52','4.01.0.51');
|
114 |
// returns 4: 1
|
115 |
|
116 |
-
this.php_js
|
117 |
this.php_js.ENV = this.php_js.ENV || {};
|
118 |
// END REDUNDANT
|
119 |
// Important: compare must be initialized at 0.
|
120 |
-
var i
|
121 |
-
x
|
122 |
-
compare
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
vm
|
131 |
'dev' : -6,
|
132 |
'alpha': -5,
|
133 |
'a' : -5,
|
@@ -139,54 +135,54 @@
|
|
139 |
'p' : 1,
|
140 |
'pl' : 1
|
141 |
},
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
prepVersion = function (v) {
|
152 |
v = ('' + v)
|
153 |
-
.replace(/[_\-+]/g, '.');
|
154 |
-
v = v.replace(/([^.\d]+)/g, '.$1.')
|
155 |
-
.replace(/\.{2,}/g, '.');
|
156 |
-
return (!v.length ? [-8] : v.split('.'));
|
157 |
};
|
158 |
// This converts a version component to a number.
|
159 |
// Empty component becomes 0.
|
160 |
// Non-numerical component becomes a negative number.
|
161 |
// Numerical component becomes itself as an integer.
|
162 |
-
numVersion = function (v) {
|
163 |
-
return !v ? 0 : (isNaN(v) ? vm[v] || -7 : parseInt(v, 10));
|
164 |
};
|
165 |
-
v1
|
166 |
-
v2
|
167 |
-
x
|
168 |
-
for (i = 0; i < x; i++) {
|
169 |
-
if (v1[i] == v2[i]) {
|
170 |
continue;
|
171 |
}
|
172 |
-
v1[i] = numVersion(v1[i]);
|
173 |
-
v2[i] = numVersion(v2[i]);
|
174 |
-
if (v1[i] < v2[i]) {
|
175 |
compare = -1;
|
176 |
break;
|
177 |
-
} else if (v1[i] > v2[i]) {
|
178 |
compare = 1;
|
179 |
break;
|
180 |
}
|
181 |
}
|
182 |
-
if (!operator) {
|
183 |
return compare;
|
184 |
}
|
185 |
|
186 |
// Important: operator is CASE-SENSITIVE.
|
187 |
// "No operator" seems to be treated as "<."
|
188 |
// Any other values seem to make the function return null.
|
189 |
-
switch (operator) {
|
190 |
case '>':
|
191 |
case 'gt':
|
192 |
return (compare > 0);
|
@@ -217,6 +213,6 @@
|
|
217 |
$( 'body' ).on( 'click', '.yit-changelog-button', function () {
|
218 |
$( '#TB_window' ).remove();
|
219 |
} );
|
220 |
-
|
221 |
|
222 |
-
|
|
6 |
* It is also available through the world-wide-web at this URL:
|
7 |
* http://www.gnu.org/licenses/gpl-3.0.txt
|
8 |
*/
|
9 |
+
(function ( $ ) {
|
10 |
|
11 |
+
var plugins_menu_item = $( '#menu-plugins' ),
|
12 |
+
update = plugins_menu_item.find( '.update-plugins' ),
|
13 |
+
count = update.find( ".update-count" ).text(),
|
14 |
+
registered = plugins.registered,
|
15 |
+
activated = plugins.activated;
|
16 |
|
17 |
+
if ( count == 0 || count == '' ) {
|
18 |
var update_row = '<span class="update-plugins"><span class="plugin-count"></span></span>';
|
19 |
+
count = 0;
|
20 |
+
plugins_menu_item.find( '.wp-menu-name' ).append( update_row );
|
21 |
}
|
22 |
|
23 |
/**
|
38 |
*
|
39 |
* @return void
|
40 |
*/
|
41 |
+
function update_plugins_row( registered, activated, count, localize ) {
|
42 |
+
for ( var init in registered ) {
|
43 |
+
var plugin = registered[ init ];
|
44 |
+
for ( var headers in plugin ) {
|
45 |
|
46 |
+
if ( headers == 'slug' || version_compare( plugin[ headers ].Version, plugin[ headers ].Latest, '>=' ) ) {
|
47 |
continue;
|
48 |
}
|
49 |
|
50 |
+
count = parseInt( count ) + 1;
|
51 |
+
$( ".plugin-count" ).empty().html( count );
|
52 |
|
53 |
+
var regex = new RegExp( ' ', 'g' ),
|
54 |
+
info = plugin[ headers ],
|
55 |
+
name = '' + info.Name,
|
56 |
+
id = name.replace( regex, '-' ).trim(),
|
57 |
+
row = '*[data-slug="' + id.toLowerCase() + '"]';
|
58 |
|
59 |
+
$( row ).addClass( "update" );
|
60 |
|
61 |
var html = '<tr class="plugin-update-tr">' +
|
62 |
+
'<td colspan="3" class="plugin-update colspanchange">' +
|
63 |
+
'<div class="update-message">' + localize.strings.new_version.replace( '%plugin_name%', name ) +
|
64 |
+
'<a class="thickbox open-plugin-details-modal" href="' + localize.details_url[ init ] + '">' + localize.strings.latest.replace( '%latest%', plugin[ headers ].Latest ) + '</a>';
|
65 |
|
66 |
+
if ( typeof activated[ init ] == "undefined" ) {
|
67 |
|
68 |
html = html +
|
69 |
+
' <em>' + localize.strings.unavailable + '</em>' +
|
70 |
+
localize.strings.activate.replace( '%activate_link%', localize.licence_activation_url ).replace( '%plugin_name%', name );
|
71 |
} else {
|
72 |
html = html +
|
73 |
+
'. <a href="' + localize.update_url[ init ] + '">' + localize.strings.update_now + '</a>';
|
|
|
|
|
|
|
|
|
74 |
}
|
75 |
|
76 |
html = html +
|
77 |
+
'</div>' +
|
78 |
+
'</td>' +
|
79 |
+
'</tr>';
|
80 |
|
81 |
+
$( html ).insertAfter( row );
|
82 |
}
|
83 |
}
|
84 |
}
|
92 |
*
|
93 |
* @see php.js library http://phpjs.org/
|
94 |
*/
|
95 |
+
function version_compare( v1, v2, operator ) {
|
96 |
// discuss at: http://phpjs.org/functions/version_compare/
|
97 |
// original by: Philippe Jausions (http://pear.php.net/user/jausions)
|
98 |
// original by: Aidan Lister (http://aidanlister.com/)
|
109 |
// example 4: version_compare('4.1.0.52','4.01.0.51');
|
110 |
// returns 4: 1
|
111 |
|
112 |
+
this.php_js = this.php_js || {};
|
113 |
this.php_js.ENV = this.php_js.ENV || {};
|
114 |
// END REDUNDANT
|
115 |
// Important: compare must be initialized at 0.
|
116 |
+
var i = 0,
|
117 |
+
x = 0,
|
118 |
+
compare = 0,
|
119 |
+
// vm maps textual PHP versions to negatives so they're less than 0.
|
120 |
+
// PHP currently defines these as CASE-SENSITIVE. It is important to
|
121 |
+
// leave these as negatives so that they can come before numerical versions
|
122 |
+
// and as if no letters were there to begin with.
|
123 |
+
// (1alpha is < 1 and < 1.1 but > 1dev1)
|
124 |
+
// If a non-numerical value can't be mapped to this table, it receives
|
125 |
+
// -7 as its value.
|
126 |
+
vm = {
|
127 |
'dev' : -6,
|
128 |
'alpha': -5,
|
129 |
'a' : -5,
|
135 |
'p' : 1,
|
136 |
'pl' : 1
|
137 |
},
|
138 |
+
// This function will be called to prepare each version argument.
|
139 |
+
// It replaces every _, -, and + with a dot.
|
140 |
+
// It surrounds any nonsequence of numbers/dots with dots.
|
141 |
+
// It replaces sequences of dots with a single dot.
|
142 |
+
// version_compare('4..0', '4.0') == 0
|
143 |
+
// Important: A string of 0 length needs to be converted into a value
|
144 |
+
// even less than an unexisting value in vm (-7), hence [-8].
|
145 |
+
// It's also important to not strip spaces because of this.
|
146 |
+
// version_compare('', ' ') == 1
|
147 |
+
prepVersion = function ( v ) {
|
148 |
v = ('' + v)
|
149 |
+
.replace( /[_\-+]/g, '.' );
|
150 |
+
v = v.replace( /([^.\d]+)/g, '.$1.' )
|
151 |
+
.replace( /\.{2,}/g, '.' );
|
152 |
+
return (!v.length ? [ -8 ] : v.split( '.' ));
|
153 |
};
|
154 |
// This converts a version component to a number.
|
155 |
// Empty component becomes 0.
|
156 |
// Non-numerical component becomes a negative number.
|
157 |
// Numerical component becomes itself as an integer.
|
158 |
+
numVersion = function ( v ) {
|
159 |
+
return !v ? 0 : (isNaN( v ) ? vm[ v ] || -7 : parseInt( v, 10 ));
|
160 |
};
|
161 |
+
v1 = prepVersion( v1 );
|
162 |
+
v2 = prepVersion( v2 );
|
163 |
+
x = Math.max( v1.length, v2.length );
|
164 |
+
for ( i = 0; i < x; i++ ) {
|
165 |
+
if ( v1[ i ] == v2[ i ] ) {
|
166 |
continue;
|
167 |
}
|
168 |
+
v1[ i ] = numVersion( v1[ i ] );
|
169 |
+
v2[ i ] = numVersion( v2[ i ] );
|
170 |
+
if ( v1[ i ] < v2[ i ] ) {
|
171 |
compare = -1;
|
172 |
break;
|
173 |
+
} else if ( v1[ i ] > v2[ i ] ) {
|
174 |
compare = 1;
|
175 |
break;
|
176 |
}
|
177 |
}
|
178 |
+
if ( !operator ) {
|
179 |
return compare;
|
180 |
}
|
181 |
|
182 |
// Important: operator is CASE-SENSITIVE.
|
183 |
// "No operator" seems to be treated as "<."
|
184 |
// Any other values seem to make the function return null.
|
185 |
+
switch ( operator ) {
|
186 |
case '>':
|
187 |
case 'gt':
|
188 |
return (compare > 0);
|
213 |
$( 'body' ).on( 'click', '.yit-changelog-button', function () {
|
214 |
$( '#TB_window' ).remove();
|
215 |
} );
|
|
|
216 |
|
217 |
+
|
218 |
+
})( jQuery );
|
plugin-fw/assets/js/multisite-updater.min.js
CHANGED
@@ -1,4 +1,7 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
(function(
|
4 |
-
|
|
|
|
|
|
1 |
+
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(a,f,b){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var h=a[e];if(f.call(b,h,e,a))return{i:e,v:h}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,f,b){a!=Array.prototype&&a!=Object.prototype&&(a[f]=b.value)};
|
2 |
+
$jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(a,f,b,d){if(f){b=$jscomp.global;a=a.split(".");for(d=0;d<a.length-1;d++){var e=a[d];e in b||(b[e]={});b=b[e]}a=a[a.length-1];d=b[a];f=f(d);f!=d&&null!=f&&$jscomp.defineProperty(b,a,{configurable:!0,writable:!0,value:f})}};
|
3 |
+
$jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(a,b){return $jscomp.findInternal(this,a,b).v}},"es6","es3");
|
4 |
+
(function(a){function f(a,b,d){this.php_js=this.php_js||{};this.php_js.ENV=this.php_js.ENV||{};var c=0,f=0,g=0,e={dev:-6,alpha:-5,a:-5,beta:-4,b:-4,RC:-3,rc:-3,"#":-2,p:1,pl:1};c=function(a){a=(""+a).replace(/[_\-+]/g,".");a=a.replace(/([^.\d]+)/g,".$1.").replace(/\.{2,}/g,".");return a.length?a.split("."):[-8]};numVersion=function(a){return a?isNaN(a)?e[a]||-7:parseInt(a,10):0};a=c(a);b=c(b);f=Math.max(a.length,b.length);for(c=0;c<f;c++)if(a[c]!=b[c])if(a[c]=numVersion(a[c]),b[c]=numVersion(b[c]),
|
5 |
+
a[c]<b[c]){g=-1;break}else if(a[c]>b[c]){g=1;break}if(!d)return g;switch(d){case ">":case "gt":return 0<g;case ">=":case "ge":return 0<=g;case "<=":case "le":return 0>=g;case "==":case "=":case "eq":return 0===g;case "<>":case "!=":case "ne":return 0!==g;case "":case "<":case "lt":return 0>g;default:return null}}var b=a("#menu-plugins"),d=b.find(".update-plugins").find(".update-count").text(),e=plugins.registered,h=plugins.activated;if(0==d||""==d)d=0,b.find(".wp-menu-name").append('<span class="update-plugins"><span class="plugin-count"></span></span>');
|
6 |
+
(function(b,d,e,c){for(var h in b){var g=b[h],k;for(k in g)if("slug"!=k&&!f(g[k].Version,g[k].Latest,">=")){e=parseInt(e)+1;a(".plugin-count").empty().html(e);var m=""+g[k].Name,n='*[data-slug="'+m.replace(/ /g,"-").trim().toLowerCase()+'"]';a(n).addClass("update");var l='<tr class="plugin-update-tr"><td colspan="3" class="plugin-update colspanchange"><div class="update-message">'+c.strings.new_version.replace("%plugin_name%",m)+'<a class="thickbox open-plugin-details-modal" href="'+c.details_url[h]+
|
7 |
+
'">'+c.strings.latest.replace("%latest%",g[k].Latest)+"</a>";l="undefined"==typeof d[h]?l+" <em>"+c.strings.unavailable+"</em>"+c.strings.activate.replace("%activate_link%",c.licence_activation_url).replace("%plugin_name%",m):l+'. <a href="'+c.update_url[h]+'">'+c.strings.update_now+"</a>";l+="</div></td></tr>";a(l).insertAfter(n)}}})(e,h,d,plugins);a("body").on("click",".yit-changelog-button",function(){a("#TB_window").remove()})})(jQuery);
|
plugin-fw/assets/js/yit-plugin-panel.js
CHANGED
@@ -125,37 +125,6 @@
|
|
125 |
} ).disableSelection();
|
126 |
} );
|
127 |
|
128 |
-
$( document ).ready( function () {
|
129 |
-
|
130 |
-
$( '.yith-video-link' ).click( function ( event ) {
|
131 |
-
event.preventDefault();
|
132 |
-
var target = $( this ).data( 'video-id' );
|
133 |
-
|
134 |
-
$( '.' + target ).dialog( {
|
135 |
-
dialogClass : 'wp-dialog yit-dialog yit-video-dialog',
|
136 |
-
modal : true,
|
137 |
-
closeOnEscape: true,
|
138 |
-
width : 'auto',
|
139 |
-
resizable : false,
|
140 |
-
draggable : false,
|
141 |
-
create : function ( event, ui ) {
|
142 |
-
$( this ).css( "maxWidth", "853px" );
|
143 |
-
},
|
144 |
-
open : function ( event, ui ) {
|
145 |
-
|
146 |
-
$( '.ui-widget-overlay' ).bind( 'click', function () {
|
147 |
-
$( this ).siblings( '.ui-dialog' ).find( '.ui-dialog-content' ).dialog( 'close' );
|
148 |
-
} );
|
149 |
-
|
150 |
-
}
|
151 |
-
|
152 |
-
} );
|
153 |
-
|
154 |
-
$( '.ui-dialog :button' ).blur();
|
155 |
-
|
156 |
-
} );
|
157 |
-
} );
|
158 |
-
|
159 |
//google analytics generation
|
160 |
$( document ).ready( function () {
|
161 |
$( '.google-analytic-generate' ).click( function () {
|
125 |
} ).disableSelection();
|
126 |
} );
|
127 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
//google analytics generation
|
129 |
$( document ).ready( function () {
|
130 |
$( '.google-analytic-generate' ).click( function () {
|
plugin-fw/assets/js/yit-plugin-panel.min.js
CHANGED
@@ -1,5 +1,7 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
(
|
|
|
|
1 |
+
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(a,e,b){a instanceof String&&(a=String(a));for(var c=a.length,d=0;d<c;d++){var g=a[d];if(e.call(b,g,d,a))return{i:d,v:g}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,e,b){a!=Array.prototype&&a!=Object.prototype&&(a[e]=b.value)};
|
2 |
+
$jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(a,e,b,c){if(e){b=$jscomp.global;a=a.split(".");for(c=0;c<a.length-1;c++){var d=a[c];d in b||(b[d]={});b=b[d]}a=a[a.length-1];c=b[a];e=e(c);e!=c&&null!=e&&$jscomp.defineProperty(b,a,{configurable:!0,writable:!0,value:e})}};
|
3 |
+
$jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(a,b){return $jscomp.findInternal(this,a,b).v}},"es6","es3");
|
4 |
+
(function(a){function e(b,c,d,e){var f=!0;if("string"==typeof c){":radio"==c.substr(0,6)&&(c+=":checked");var h=a(c).val();"checkbox"==a(c).attr("type")&&(h=a(c).is(":checked")?"yes":"no");d=d.split(",");for(c=0;c<d.length;c++)if(h!=d[c])f=!1;else{f=!0;break}}d=a(b);b=a(b+"-container").closest("tr");1>b.length&&(b=d.closest(".yith-plugin-fw-panel-wc-row"));e=e.split("-");for(var g in e)if(h=e[g],f)switch(h){case "disable":b.removeClass("yith-disabled");d.attr("disabled",!1);break;case "hideme":d.show();
|
5 |
+
break;default:b.show()}else switch(h){case "disable":b.addClass("yith-disabled");d.attr("disabled",!0);break;case "hideme":d.hide();break;default:b.hide()}}a("[data-dep-target]").each(function(){var b=a(this),c="#"+b.data("dep-target"),d="#"+b.data("dep-id"),g=b.data("dep-value"),f=b.data("dep-type");e(c,d,g.toString(),f);a(d).on("change",function(){e(c,d,g.toString(),f)}).change()});a(".rm_connectedlist").each(function(){var b=a(this).find("ul"),c=a(this).find(":hidden");b.sortable({connectWith:b,
|
6 |
+
update:function(d,e){var f={};b.each(function(){var b={};a(this).children().each(function(){b[a(this).data("option")]=a(this).text()});f[a(this).data("list")]=b});c.val(JSON.stringify(f).replace(/[\\"']/g,"\\$&").replace(/\u0000/g,"\\0"))}}).disableSelection()});a(document).ready(function(){a(".google-analytic-generate").click(function(){var b=a("#"+a(this).data("textarea")).data("codemirrorInstance"),c=a("#"+a(this).data("input")).val(),d=a(this).data("basename");b.replaceRange("(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement( o ),\nm=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\n})(window,document,'script','//www.google-analytics.com/analytics.js','ga');\n\n"+
|
7 |
+
("ga('create', '"+c+"', '"+d+"');\n")+"ga('send', 'pageview');\n",b.getCursor("start"),b.getCursor("end"))})});a(".yith-plugin-fw-panel .woo-nav-tab-wrapper").removeClass("woo-nav-tab-wrapper").addClass("yith-nav-tab-wrapper")})(jQuery);
|
plugin-fw/init.php
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Framework Name: YIT Plugin Framework
|
4 |
-
* Version: 3.0.
|
5 |
* Author: Yithemes
|
6 |
* Text Domain: yith-plugin-fw
|
7 |
* Domain Path: /languages/
|
8 |
*
|
9 |
* @author Your Inspiration Themes
|
10 |
-
* @version 3.0.
|
11 |
*/
|
12 |
/**
|
13 |
* This file belongs to the YIT Plugin Framework.
|
1 |
<?php
|
2 |
/**
|
3 |
* Framework Name: YIT Plugin Framework
|
4 |
+
* Version: 3.0.16
|
5 |
* Author: Yithemes
|
6 |
* Text Domain: yith-plugin-fw
|
7 |
* Domain Path: /languages/
|
8 |
*
|
9 |
* @author Your Inspiration Themes
|
10 |
+
* @version 3.0.16
|
11 |
*/
|
12 |
/**
|
13 |
* This file belongs to the YIT Plugin Framework.
|
plugin-fw/lib/privacy/yit-privacy-plugin-abstract.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
!defined( 'ABSPATH' ) && exit; // Exit if accessed directly
|
3 |
+
|
4 |
+
if ( !class_exists( 'YITH_Privacy_Plugin_Abstract' ) ) {
|
5 |
+
class YITH_Privacy_Plugin_Abstract {
|
6 |
+
private $_name;
|
7 |
+
|
8 |
+
public function __construct( $name ) {
|
9 |
+
$this->_name = $name;
|
10 |
+
$this->init();
|
11 |
+
}
|
12 |
+
|
13 |
+
protected function init() {
|
14 |
+
add_filter( 'yith_plugin_fw_privacy_guide_content', array( $this, 'add_message_in_section' ), 10, 2 );
|
15 |
+
}
|
16 |
+
|
17 |
+
public function add_message_in_section( $html, $section ) {
|
18 |
+
if ( $message = $this->get_privacy_message( $section ) ) {
|
19 |
+
$html .= "<p class='privacy-policy-tutorial'><strong>{$this->_name}</strong></p>";
|
20 |
+
$html .= $message;
|
21 |
+
}
|
22 |
+
return $html;
|
23 |
+
}
|
24 |
+
|
25 |
+
public function get_privacy_message( $section ) {
|
26 |
+
return '';
|
27 |
+
}
|
28 |
+
}
|
29 |
+
}
|
plugin-fw/lib/privacy/yit-privacy.php
ADDED
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
!defined( 'ABSPATH' ) && exit; // Exit if accessed directly
|
3 |
+
|
4 |
+
if ( !class_exists( 'YITH_Privacy' ) ) {
|
5 |
+
/**
|
6 |
+
* Class YITH_Privacy
|
7 |
+
* Privacy Class
|
8 |
+
*
|
9 |
+
* @author Leanza Francesco <leanzafrancesco@gmail.com>
|
10 |
+
*/
|
11 |
+
class YITH_Privacy {
|
12 |
+
private static $_instance;
|
13 |
+
|
14 |
+
private $_title;
|
15 |
+
|
16 |
+
public static function get_instance() {
|
17 |
+
return !is_null( self::$_instance ) ? self::$_instance : self::$_instance = new self();
|
18 |
+
}
|
19 |
+
|
20 |
+
/**
|
21 |
+
* YITH_Privacy constructor.
|
22 |
+
*/
|
23 |
+
private function __construct() {
|
24 |
+
$this->_title = apply_filters( 'yith_plugin_fw_privacy_policy_guide_title', _x( 'YITH Plugins', 'Privacy Policy Guide Title', 'yith-plugin-fw' ) );
|
25 |
+
add_action( 'admin_init', array( $this, 'add_privacy_message' ) );
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Adds the privacy message on YITH privacy page.
|
30 |
+
*/
|
31 |
+
public function add_privacy_message() {
|
32 |
+
if ( function_exists( 'wp_add_privacy_policy_content' ) ) {
|
33 |
+
$content = $this->get_privacy_message();
|
34 |
+
|
35 |
+
if ( $content ) {
|
36 |
+
wp_add_privacy_policy_content( $this->_title, $this->get_privacy_message() );
|
37 |
+
}
|
38 |
+
}
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* get the privacy message
|
43 |
+
*
|
44 |
+
* @return string
|
45 |
+
*/
|
46 |
+
public function get_privacy_message() {
|
47 |
+
$privacy_content_path = YIT_CORE_PLUGIN_TEMPLATE_PATH . '/privacy/html-policy-content.php';
|
48 |
+
ob_start();
|
49 |
+
$sections = $this->get_sections();
|
50 |
+
if ( file_exists( $privacy_content_path ) )
|
51 |
+
include $privacy_content_path;
|
52 |
+
|
53 |
+
return apply_filters( 'yith_wcbk_privacy_policy_content', ob_get_clean() );
|
54 |
+
}
|
55 |
+
|
56 |
+
public function get_sections() {
|
57 |
+
return apply_filters( 'yith_wcbk_privacy_policy_content_sections', array(
|
58 |
+
'general' => array(
|
59 |
+
'tutorial' => _x( 'This sample language includes the basics around what personal data your store may be collecting, storing and sharing, as well as who may have access to that data. Depending on what settings are enabled and which additional plugins are used, the specific information shared by your store will vary. We recommend consulting with a lawyer when deciding what information to disclose on your privacy policy.', 'Privacy Policy Content', 'yith-plugin-fw' ),
|
60 |
+
'description' => '',
|
61 |
+
),
|
62 |
+
'collect_and_store' => array(
|
63 |
+
'title' => _x( 'What we collect and store', 'Privacy Policy Content', 'yith-plugin-fw' )
|
64 |
+
),
|
65 |
+
'has_access' => array(
|
66 |
+
'title' => _x( 'Who on our team has access', 'Privacy Policy Content', 'yith-plugin-fw' )
|
67 |
+
),
|
68 |
+
'share' => array(
|
69 |
+
'title' => _x( 'What we share with others', 'Privacy Policy Content', 'yith-plugin-fw' ),
|
70 |
+
),
|
71 |
+
'payments' => array(
|
72 |
+
'title' => _x( 'Payments', 'Privacy Policy Content', 'yith-plugin-fw' )
|
73 |
+
),
|
74 |
+
) );
|
75 |
+
}
|
76 |
+
}
|
77 |
+
}
|
78 |
+
|
79 |
+
YITH_Privacy::get_instance();
|
plugin-fw/lib/yit-metabox.php
CHANGED
@@ -520,7 +520,11 @@ if ( !class_exists( 'YIT_Metabox' ) ) {
|
|
520 |
if ( in_array( $field[ 'type' ], array( 'onoff', 'checkbox' ) ) ) {
|
521 |
update_post_meta( $post_id, $field[ 'id' ], '1' );
|
522 |
} else {
|
523 |
-
|
|
|
|
|
|
|
|
|
524 |
}
|
525 |
} elseif ( in_array( $field[ 'type' ], array( 'onoff', 'checkbox' ) ) ) {
|
526 |
update_post_meta( $post_id, $field[ 'id' ], '0' );
|
520 |
if ( in_array( $field[ 'type' ], array( 'onoff', 'checkbox' ) ) ) {
|
521 |
update_post_meta( $post_id, $field[ 'id' ], '1' );
|
522 |
} else {
|
523 |
+
$value = $_POST[ 'yit_metaboxes' ][ $field[ 'id' ] ];
|
524 |
+
if ( !empty( $field[ 'yith-sanitize-callback' ] ) && is_callable( $field[ 'yith-sanitize-callback' ] ) ) {
|
525 |
+
$value = call_user_func( $field[ 'yith-sanitize-callback' ], $value );
|
526 |
+
}
|
527 |
+
add_post_meta( $post_id, $field[ 'id' ], $value, true ) || update_post_meta( $post_id, $field[ 'id' ], $value );
|
528 |
}
|
529 |
} elseif ( in_array( $field[ 'type' ], array( 'onoff', 'checkbox' ) ) ) {
|
530 |
update_post_meta( $post_id, $field[ 'id' ], '0' );
|
plugin-fw/lib/yit-plugin-panel-wc.php
CHANGED
@@ -93,7 +93,6 @@ if ( !class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
|
|
93 |
if ( !static::$_actions_initialized ) {
|
94 |
/* Add VideoBox and InfoBox */
|
95 |
add_action( 'woocommerce_admin_field_boxinfo', array( __CLASS__, 'add_infobox' ), 10, 1 );
|
96 |
-
add_action( 'woocommerce_admin_field_videobox', array( __CLASS__, 'add_videobox' ), 10, 1 );
|
97 |
|
98 |
/* Add YITH Fields */
|
99 |
add_action( 'woocommerce_admin_field_yith-field', array( __CLASS__, 'add_yith_field' ), 10, 1 );
|
@@ -521,9 +520,13 @@ if ( !class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
|
|
521 |
$value = yith_plugin_fw_is_true( $raw_value ) ? 'yes' : 'no';
|
522 |
}
|
523 |
|
524 |
-
if ( isset( $option[ 'yith-type' ] ) && in_array( $option[ 'yith-type' ], array( 'textarea-editor', 'textarea-codemirror' ) ) ) {
|
525 |
$value = $raw_value;
|
526 |
}
|
|
|
|
|
|
|
|
|
527 |
}
|
528 |
|
529 |
return $value;
|
93 |
if ( !static::$_actions_initialized ) {
|
94 |
/* Add VideoBox and InfoBox */
|
95 |
add_action( 'woocommerce_admin_field_boxinfo', array( __CLASS__, 'add_infobox' ), 10, 1 );
|
|
|
96 |
|
97 |
/* Add YITH Fields */
|
98 |
add_action( 'woocommerce_admin_field_yith-field', array( __CLASS__, 'add_yith_field' ), 10, 1 );
|
520 |
$value = yith_plugin_fw_is_true( $raw_value ) ? 'yes' : 'no';
|
521 |
}
|
522 |
|
523 |
+
if ( isset( $option[ 'yith-type' ] ) && in_array( $option[ 'yith-type' ], array( 'textarea', 'textarea-editor', 'textarea-codemirror' ) ) ) {
|
524 |
$value = $raw_value;
|
525 |
}
|
526 |
+
|
527 |
+
if ( !empty( $option[ 'yith-sanitize-callback' ] ) && is_callable( $option[ 'yith-sanitize-callback' ] ) ) {
|
528 |
+
$value = call_user_func( $option[ 'yith-sanitize-callback' ], $value );
|
529 |
+
}
|
530 |
}
|
531 |
|
532 |
return $value;
|
plugin-fw/lib/yit-plugin-panel.php
CHANGED
@@ -274,6 +274,11 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
|
|
274 |
if ( isset( $option[ 'type' ] ) && in_array( $option[ 'type' ], array( 'checkbox', 'onoff' ) ) ) {
|
275 |
$value = yith_plugin_fw_is_true( $value ) ? 'yes' : 'no';
|
276 |
}
|
|
|
|
|
|
|
|
|
|
|
277 |
$valid_input[ $option[ 'id' ] ] = $value;
|
278 |
}
|
279 |
}
|
@@ -363,7 +368,6 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
|
|
363 |
return;
|
364 |
}
|
365 |
?>
|
366 |
-
<?php $this->print_video_box(); ?>
|
367 |
<?php
|
368 |
$panel_content_class = apply_filters( 'yit_admin_panel_content_class', 'yit-admin-panel-content-wrap' );
|
369 |
?>
|
@@ -605,8 +609,11 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
|
|
605 |
return $this->_main_array_options;
|
606 |
}
|
607 |
|
|
|
|
|
608 |
foreach ( $this->settings[ 'admin-tabs' ] as $item => $v ) {
|
609 |
-
$path = $
|
|
|
610 |
if ( file_exists( $path ) ) {
|
611 |
$this->_main_array_options = array_merge( $this->_main_array_options, include $path );
|
612 |
}
|
@@ -854,36 +861,24 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
|
|
854 |
/**
|
855 |
* Show a box panel with specific content in two columns as a new woocommerce type
|
856 |
*
|
|
|
|
|
857 |
* @param array $args
|
858 |
*
|
859 |
* @return void
|
860 |
-
* @since 1.0
|
861 |
-
* @author Emanuela Castorina <emanuela.castorina@yithemes.com>
|
862 |
*/
|
863 |
public static function add_videobox( $args = array() ) {
|
864 |
-
|
865 |
-
extract( $args );
|
866 |
-
require_once( YIT_CORE_PLUGIN_TEMPLATE_PATH . '/panel/videobox.php' );
|
867 |
-
}
|
868 |
}
|
869 |
|
870 |
/**
|
871 |
* Fire the action to print the custom tab
|
872 |
*
|
|
|
873 |
* @return void
|
874 |
-
* @since 1.0
|
875 |
-
* @author Antonino Scarfì <antonino.scarfi@yithemes.com>
|
876 |
*/
|
877 |
public function print_video_box() {
|
878 |
-
$file = $this->settings[ 'options-path' ] . '/video-box.php';
|
879 |
-
|
880 |
-
if ( !file_exists( $file ) ) {
|
881 |
-
return;
|
882 |
-
}
|
883 |
-
|
884 |
-
$args = include_once( $file );
|
885 |
|
886 |
-
$this->add_videobox( $args );
|
887 |
}
|
888 |
|
889 |
/**
|
274 |
if ( isset( $option[ 'type' ] ) && in_array( $option[ 'type' ], array( 'checkbox', 'onoff' ) ) ) {
|
275 |
$value = yith_plugin_fw_is_true( $value ) ? 'yes' : 'no';
|
276 |
}
|
277 |
+
|
278 |
+
if ( !empty( $option[ 'yith-sanitize-callback' ] ) && is_callable( $option[ 'yith-sanitize-callback' ] ) ) {
|
279 |
+
$value = call_user_func( $option[ 'yith-sanitize-callback' ], $value );
|
280 |
+
}
|
281 |
+
|
282 |
$valid_input[ $option[ 'id' ] ] = $value;
|
283 |
}
|
284 |
}
|
368 |
return;
|
369 |
}
|
370 |
?>
|
|
|
371 |
<?php
|
372 |
$panel_content_class = apply_filters( 'yit_admin_panel_content_class', 'yit-admin-panel-content-wrap' );
|
373 |
?>
|
609 |
return $this->_main_array_options;
|
610 |
}
|
611 |
|
612 |
+
$options_path = $this->settings[ 'options-path' ];
|
613 |
+
|
614 |
foreach ( $this->settings[ 'admin-tabs' ] as $item => $v ) {
|
615 |
+
$path = $options_path . '/' . $item . '-options.php';
|
616 |
+
$path = apply_filters( 'yith_plugin_panel_item_options_path', $path, $options_path, $item, $this );
|
617 |
if ( file_exists( $path ) ) {
|
618 |
$this->_main_array_options = array_merge( $this->_main_array_options, include $path );
|
619 |
}
|
861 |
/**
|
862 |
* Show a box panel with specific content in two columns as a new woocommerce type
|
863 |
*
|
864 |
+
* @deprecated 3.0.12 Do nothing! Method left to prevent Fatal Error if called directly
|
865 |
+
*
|
866 |
* @param array $args
|
867 |
*
|
868 |
* @return void
|
|
|
|
|
869 |
*/
|
870 |
public static function add_videobox( $args = array() ) {
|
871 |
+
|
|
|
|
|
|
|
872 |
}
|
873 |
|
874 |
/**
|
875 |
* Fire the action to print the custom tab
|
876 |
*
|
877 |
+
* @deprecated 3.0.12 Do nothing! Method left to prevent Fatal Error if called directly
|
878 |
* @return void
|
|
|
|
|
879 |
*/
|
880 |
public function print_video_box() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
881 |
|
|
|
882 |
}
|
883 |
|
884 |
/**
|
plugin-fw/lib/yit-plugin-subpanel.php
CHANGED
@@ -139,7 +139,6 @@ if ( !class_exists( 'YIT_Plugin_SubPanel' ) ) {
|
|
139 |
return;
|
140 |
}
|
141 |
?>
|
142 |
-
<?php $this->print_video_box(); ?>
|
143 |
<?php
|
144 |
$panel_content_class = apply_filters( 'yit_admin_panel_content_class', 'yit-admin-panel-content-wrap' );
|
145 |
?>
|
139 |
return;
|
140 |
}
|
141 |
?>
|
|
|
142 |
<?php
|
143 |
$panel_content_class = apply_filters( 'yit_admin_panel_content_class', 'yit-admin-panel-content-wrap' );
|
144 |
?>
|
plugin-fw/lib/yit-upgrade.php
CHANGED
@@ -62,6 +62,40 @@ if ( !class_exists( 'YIT_Upgrade' ) ) {
|
|
62 |
$this->_package_url = defined( 'YIT_LICENCE_DEBUG_LOCALHOST' ) ? YIT_LICENCE_DEBUG_LOCALHOST : 'http://dev.yithemes.com';
|
63 |
add_filter( 'block_local_requests', '__return_false' );
|
64 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
}
|
66 |
|
67 |
/**
|
@@ -89,36 +123,49 @@ if ( !class_exists( 'YIT_Upgrade' ) ) {
|
|
89 |
'slug' => $plugin_slug,
|
90 |
);
|
91 |
|
92 |
-
|
93 |
-
if (
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
$
|
102 |
-
if (
|
103 |
-
$
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
if ( $plugin_remote_info ) {
|
109 |
-
$info[ 'Latest' ] = (string) $plugin_remote_info->latest;
|
110 |
-
$info[ 'changelog' ] = (string) $plugin_remote_info->changelog;
|
111 |
YIT_Plugin_Licence()->check( $plugin_slug, false );
|
112 |
-
set_transient( $transient, $info, DAY_IN_SECONDS );
|
113 |
-
} else {
|
114 |
-
error_log( sprintf( 'SimpleXML error in %s:%s [plugin slug: %s]',
|
115 |
-
__FILE__, __FUNCTION__, $plugin_slug ) );
|
116 |
}
|
|
|
|
|
|
|
|
|
|
|
117 |
}
|
|
|
|
|
118 |
}
|
119 |
|
120 |
-
|
121 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
add_action( 'admin_enqueue_scripts', array( $this, 'multisite_updater_script' ) );
|
123 |
}
|
124 |
}
|
@@ -132,7 +179,6 @@ if ( !class_exists( 'YIT_Upgrade' ) ) {
|
|
132 |
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
133 |
*/
|
134 |
public function multisite_updater_script() {
|
135 |
-
|
136 |
$update_url = $changelogs = $details_url = array();
|
137 |
$strings = array(
|
138 |
'new_version' => __( 'There is a new version of %plugin_name% available.', 'yith-plugin-fw' ),
|
@@ -145,10 +191,7 @@ if ( !class_exists( 'YIT_Upgrade' ) ) {
|
|
145 |
|
146 |
foreach ( $this->_plugins as $init => $info ) {
|
147 |
$update_url[ $init ] = wp_nonce_url( self_admin_url( 'update.php?action=upgrade-plugin-multisite&plugin=' ) . $init, 'upgrade-plugin-multisite_' . $init );
|
148 |
-
$
|
149 |
-
$details_url[ $init ] = '#TB_inline' . esc_url( add_query_arg( array( 'width' => 722, 'height' => 914, 'inlineId' => $changelog_id ), '' ) );
|
150 |
-
$plugin_changelog = isset( $this->_plugins[ $init ][ 'info' ][ 'changelog' ] ) ? $this->_plugins[ $init ][ 'info' ][ 'changelog' ] : '';
|
151 |
-
$changelogs[ $init ] = $this->in_theme_update_message( $this->_plugins[ $init ], $plugin_changelog, $changelog_id, false );
|
152 |
}
|
153 |
|
154 |
$localize_script_args = array(
|
@@ -158,7 +201,6 @@ if ( !class_exists( 'YIT_Upgrade' ) ) {
|
|
158 |
'update_url' => $update_url,
|
159 |
'details_url' => $details_url,
|
160 |
'strings' => $strings,
|
161 |
-
'changelogs' => $changelogs
|
162 |
);
|
163 |
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
|
164 |
yit_enqueue_script( 'yit-multisite-updater', YIT_CORE_PLUGIN_URL . '/assets/js/multisite-updater' . $suffix . '.js', array( 'jquery' ), false, true );
|
@@ -432,7 +474,7 @@ if ( !class_exists( 'YIT_Upgrade' ) ) {
|
|
432 |
$r = $current->response[ $init ];
|
433 |
|
434 |
$changelog_id = str_replace( array( '/', '.php', '.' ), array( '-', '', '-' ), $init );
|
435 |
-
$details_url = '
|
436 |
|
437 |
/**
|
438 |
* @see wp_plugin_update_rows() in wp-single\wp-admin\includes\update.php
|
@@ -493,14 +535,12 @@ if ( !class_exists( 'YIT_Upgrade' ) ) {
|
|
493 |
foreach ( $this->_plugins as $init => $plugin ) {
|
494 |
remove_action( "after_plugin_row_{$init}", 'wp_plugin_update_row', 10 );
|
495 |
add_action( "after_plugin_row_{$init}", array( $this, 'plugin_update_row' ) );
|
496 |
-
add_action( "in_theme_update_message-{$init}", array( $this, 'in_theme_update_message' ), 10, 3 );
|
497 |
}
|
498 |
}
|
499 |
|
500 |
public function in_theme_update_message( $plugin, $changelog, $changelog_id, $echo = true ) {
|
501 |
-
|
502 |
-
$res
|
503 |
-
= "<div id='{$changelog_id}' class='yit-plugin-changelog-wrapper'>
|
504 |
<div class='yit-plugin-changelog'>
|
505 |
<h2 class='yit-plugin-changelog-title'>{$plugin['info']['Name']} - Changelog</h2>
|
506 |
<p>{$changelog}</p>
|
62 |
$this->_package_url = defined( 'YIT_LICENCE_DEBUG_LOCALHOST' ) ? YIT_LICENCE_DEBUG_LOCALHOST : 'http://dev.yithemes.com';
|
63 |
add_filter( 'block_local_requests', '__return_false' );
|
64 |
}
|
65 |
+
|
66 |
+
add_action( 'install_plugins_pre_plugin-information', array( $this, 'show_changelog_for_premium_plugins' ) );
|
67 |
+
add_action( 'wp_ajax_yith_plugin_fw_get_premium_changelog', array( $this, 'show_changelog_for_premium_plugins' ) );
|
68 |
+
}
|
69 |
+
|
70 |
+
/**
|
71 |
+
* show changelog for premium plugins
|
72 |
+
*
|
73 |
+
* @since 3.0.14
|
74 |
+
*/
|
75 |
+
public function show_changelog_for_premium_plugins() {
|
76 |
+
if ( isset( $_GET[ 'plugin' ] ) && isset( $_GET[ 'section' ] ) && 'changelog' === $_GET[ 'section' ] ) {
|
77 |
+
$plugin_init = $_GET[ 'plugin' ];
|
78 |
+
if ( isset( $this->_plugins[ $plugin_init ] ) ) {
|
79 |
+
// this is YITH Premium Plugin
|
80 |
+
if ( !empty( $this->_plugins[ $plugin_init ][ 'info' ][ 'changelog' ] ) ) {
|
81 |
+
$plugin_name = $this->_plugins[ $plugin_init ][ 'info' ][ 'Name' ];
|
82 |
+
$changelog = $this->_plugins[ $plugin_init ][ 'info' ][ 'changelog' ];
|
83 |
+
$template = YIT_CORE_PLUGIN_TEMPLATE_PATH . '/upgrade/changelog.php';
|
84 |
+
if ( file_exists( $template ) ) {
|
85 |
+
include( $template );
|
86 |
+
}
|
87 |
+
die();
|
88 |
+
}
|
89 |
+
$error = __( 'An unexpected error occurred, please try again later. Thanks!', 'yith-plugin-fw' );
|
90 |
+
$template = YIT_CORE_PLUGIN_TEMPLATE_PATH . '/upgrade/error.php';
|
91 |
+
if ( file_exists( $template ) ) {
|
92 |
+
include( $template );
|
93 |
+
} else {
|
94 |
+
echo "<p>$error</p>";
|
95 |
+
}
|
96 |
+
die();
|
97 |
+
}
|
98 |
+
}
|
99 |
}
|
100 |
|
101 |
/**
|
123 |
'slug' => $plugin_slug,
|
124 |
);
|
125 |
|
126 |
+
$transient = 'yith_register_' . md5( $plugin_slug );
|
127 |
+
if ( apply_filters( 'yith_register_delete_transient', false ) ) {
|
128 |
+
delete_transient( $transient );
|
129 |
+
}
|
130 |
+
$info = get_transient( $transient );
|
131 |
+
if ( false === $info || apply_filters( 'yith_register_delete_transient', false ) ) {
|
132 |
+
$xml = str_replace( '%plugin_slug%', $plugin_slug, $this->_xml );
|
133 |
+
$remote_xml = wp_remote_get( $xml );
|
134 |
+
|
135 |
+
$error = false;
|
136 |
+
if ( !is_wp_error( $remote_xml ) && isset( $remote_xml[ 'response' ][ 'code' ] ) && '200' == $remote_xml[ 'response' ][ 'code' ] ) {
|
137 |
+
$plugin_remote_info = @simplexml_load_string( $remote_xml[ 'body' ] );
|
138 |
+
if ( $plugin_remote_info ) {
|
139 |
+
$info[ 'Latest' ] = (string) $plugin_remote_info->latest;
|
140 |
+
$info[ 'changelog' ] = (string) $plugin_remote_info->changelog;
|
141 |
+
if ( is_multisite() && current_user_can( 'update_plugins' ) ) {
|
|
|
|
|
|
|
142 |
YIT_Plugin_Licence()->check( $plugin_slug, false );
|
|
|
|
|
|
|
|
|
143 |
}
|
144 |
+
set_transient( $transient, $info, DAY_IN_SECONDS );
|
145 |
+
} else {
|
146 |
+
$error = true;
|
147 |
+
error_log( sprintf( 'SimpleXML error in %s:%s [plugin slug: %s]',
|
148 |
+
__FILE__, __FUNCTION__, $plugin_slug ) );
|
149 |
}
|
150 |
+
} else {
|
151 |
+
$error = true;
|
152 |
}
|
153 |
|
154 |
+
if ( $error ) {
|
155 |
+
// If error, set empty value in the transient to prevent multiple requests
|
156 |
+
$info = array( 'Latest' => '', 'changelog' => '' );
|
157 |
+
set_transient( $transient, $info, HOUR_IN_SECONDS );
|
158 |
+
}
|
159 |
+
}
|
160 |
+
|
161 |
+
$this->_plugins[ $plugin_init ][ 'info' ][ 'Latest' ] = $info[ 'Latest' ];
|
162 |
+
$this->_plugins[ $plugin_init ][ 'info' ][ 'changelog' ] = $info[ 'changelog' ];
|
163 |
+
|
164 |
+
/* === HOOKS === */
|
165 |
+
if ( !is_multisite() || is_plugin_active_for_network( $plugin_init ) ) {
|
166 |
+
add_action( 'load-plugins.php', array( $this, 'remove_wp_plugin_update_row' ), 25 );
|
167 |
+
add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update' ) );
|
168 |
+
} else if ( is_multisite() && current_user_can( 'update_plugins' ) ) {
|
169 |
add_action( 'admin_enqueue_scripts', array( $this, 'multisite_updater_script' ) );
|
170 |
}
|
171 |
}
|
179 |
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
180 |
*/
|
181 |
public function multisite_updater_script() {
|
|
|
182 |
$update_url = $changelogs = $details_url = array();
|
183 |
$strings = array(
|
184 |
'new_version' => __( 'There is a new version of %plugin_name% available.', 'yith-plugin-fw' ),
|
191 |
|
192 |
foreach ( $this->_plugins as $init => $info ) {
|
193 |
$update_url[ $init ] = wp_nonce_url( self_admin_url( 'update.php?action=upgrade-plugin-multisite&plugin=' ) . $init, 'upgrade-plugin-multisite_' . $init );
|
194 |
+
$details_url[ $init ] = admin_url( 'admin-ajax.php?action=yith_plugin_fw_get_premium_changelog&tab=plugin-information&plugin=' . $init . '§ion=changelog&TB_iframe=true&width=640&height=662' );
|
|
|
|
|
|
|
195 |
}
|
196 |
|
197 |
$localize_script_args = array(
|
201 |
'update_url' => $update_url,
|
202 |
'details_url' => $details_url,
|
203 |
'strings' => $strings,
|
|
|
204 |
);
|
205 |
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
|
206 |
yit_enqueue_script( 'yit-multisite-updater', YIT_CORE_PLUGIN_URL . '/assets/js/multisite-updater' . $suffix . '.js', array( 'jquery' ), false, true );
|
474 |
$r = $current->response[ $init ];
|
475 |
|
476 |
$changelog_id = str_replace( array( '/', '.php', '.' ), array( '-', '', '-' ), $init );
|
477 |
+
$details_url = self_admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $init . '§ion=changelog&TB_iframe=true&width=640&height=662' );
|
478 |
|
479 |
/**
|
480 |
* @see wp_plugin_update_rows() in wp-single\wp-admin\includes\update.php
|
535 |
foreach ( $this->_plugins as $init => $plugin ) {
|
536 |
remove_action( "after_plugin_row_{$init}", 'wp_plugin_update_row', 10 );
|
537 |
add_action( "after_plugin_row_{$init}", array( $this, 'plugin_update_row' ) );
|
538 |
+
//add_action( "in_theme_update_message-{$init}", array( $this, 'in_theme_update_message' ), 10, 3 );
|
539 |
}
|
540 |
}
|
541 |
|
542 |
public function in_theme_update_message( $plugin, $changelog, $changelog_id, $echo = true ) {
|
543 |
+
$res = "<div id='{$changelog_id}' class='yit-plugin-changelog-wrapper'>
|
|
|
|
|
544 |
<div class='yit-plugin-changelog'>
|
545 |
<h2 class='yit-plugin-changelog-title'>{$plugin['info']['Name']} - Changelog</h2>
|
546 |
<p>{$changelog}</p>
|
plugin-fw/lib/yit-video.php
CHANGED
@@ -135,6 +135,7 @@ if ( ! class_exists( 'YIT_Video' ) ) {
|
|
135 |
public static function video_id_by_url( $url ) {
|
136 |
$parsed = parse_url( esc_url( $url ) );
|
137 |
|
|
|
138 |
if ( ! isset( $parsed['host'] ) ) {
|
139 |
return false;
|
140 |
}
|
@@ -150,7 +151,8 @@ if ( ! class_exists( 'YIT_Video' ) ) {
|
|
150 |
|
151 |
case 'www.vimeo.com' :
|
152 |
case 'vimeo.com' :
|
153 |
-
preg_match( '/http(s)?:\/\/(\w+.)?vimeo\.com\/(
|
|
|
154 |
$id = trim( $matches[4], '/' );
|
155 |
return "vimeo:$id";
|
156 |
|
135 |
public static function video_id_by_url( $url ) {
|
136 |
$parsed = parse_url( esc_url( $url ) );
|
137 |
|
138 |
+
|
139 |
if ( ! isset( $parsed['host'] ) ) {
|
140 |
return false;
|
141 |
}
|
151 |
|
152 |
case 'www.vimeo.com' :
|
153 |
case 'vimeo.com' :
|
154 |
+
preg_match( '/http(s)?:\/\/(\w+.)?vimeo\.com\/(.*\/)?([0-9]+)/', $url, $matches );
|
155 |
+
|
156 |
$id = trim( $matches[4], '/' );
|
157 |
return "vimeo:$id";
|
158 |
|
plugin-fw/licence/lib/yit-licence.php
CHANGED
@@ -198,8 +198,8 @@ if ( !class_exists( 'YIT_Licence' ) ) {
|
|
198 |
)
|
199 |
);
|
200 |
|
201 |
-
/* Enqueue Scripts only in Licence Activation page */
|
202 |
-
if ( strpos( get_current_screen()->id, 'yith_plugins_activation' ) !== false ) {
|
203 |
wp_enqueue_script( 'yit-licence' );
|
204 |
wp_enqueue_style( 'yit-theme-licence' );
|
205 |
}
|
198 |
)
|
199 |
);
|
200 |
|
201 |
+
/* Enqueue Scripts only in Licence Activation page of plugins and themes */
|
202 |
+
if ( strpos( get_current_screen()->id, 'yith_plugins_activation' ) !== false || strpos( get_current_screen()->id, 'yit_panel_license' ) !== false ) {
|
203 |
wp_enqueue_script( 'yit-licence' );
|
204 |
wp_enqueue_style( 'yit-theme-licence' );
|
205 |
}
|
plugin-fw/licence/lib/yit-plugin-licence.php
CHANGED
@@ -105,7 +105,7 @@ if ( !class_exists( 'YIT_Plugin_Licence' ) ) {
|
|
105 |
<div class="notice notice-error">
|
106 |
<p><strong>Warning!</strong> You didn't set license key for the following products:
|
107 |
<?php echo $product_list ?>
|
108 |
-
which means you're missing out on updates and support. <a href='<?php echo $activation_url ?>'>Enter your license key</a
|
109 |
</div>
|
110 |
<?php
|
111 |
}
|
105 |
<div class="notice notice-error">
|
106 |
<p><strong>Warning!</strong> You didn't set license key for the following products:
|
107 |
<?php echo $product_list ?>
|
108 |
+
which means you're missing out on updates and support. <a href='<?php echo $activation_url ?>'>Enter your license key</a>, please.</p>
|
109 |
</div>
|
110 |
<?php
|
111 |
}
|
plugin-fw/templates/fields/onoff.php
CHANGED
@@ -18,4 +18,9 @@ extract( $field );
|
|
18 |
<div class="yith-plugin-fw-onoff-container">
|
19 |
<input type="checkbox" id="<?php echo $id ?>" name="<?php echo $name ?>" value="<?php echo esc_attr( $value ) ?>" <?php checked( yith_plugin_fw_is_true( $value ) ) ?> class="on_off" <?php if ( isset( $std ) ) : ?>data-std="<?php echo $std ?>"<?php endif ?> />
|
20 |
<span class="yith-plugin-fw-onoff"> </span>
|
21 |
-
</div>
|
|
|
|
|
|
|
|
|
|
18 |
<div class="yith-plugin-fw-onoff-container">
|
19 |
<input type="checkbox" id="<?php echo $id ?>" name="<?php echo $name ?>" value="<?php echo esc_attr( $value ) ?>" <?php checked( yith_plugin_fw_is_true( $value ) ) ?> class="on_off" <?php if ( isset( $std ) ) : ?>data-std="<?php echo $std ?>"<?php endif ?> />
|
20 |
<span class="yith-plugin-fw-onoff"> </span>
|
21 |
+
</div>
|
22 |
+
<?php
|
23 |
+
if ( isset( $field[ 'desc-inline' ] ) ) {
|
24 |
+
echo "<span class='description inline'>" . $field[ 'desc-inline' ] . "</span>";
|
25 |
+
}
|
26 |
+
?>
|
plugin-fw/templates/fields/radio.php
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
/** @since 3.0.13 */
|
14 |
+
|
15 |
+
!defined( 'ABSPATH' ) && exit; // Exit if accessed directly
|
16 |
+
|
17 |
+
extract( $field );
|
18 |
+
|
19 |
+
$class = isset( $class ) ? $class : '';
|
20 |
+
$class = 'yith-plugin-fw-radio ' . $class;
|
21 |
+
?>
|
22 |
+
<div class="<?php echo $class ?>" id="<?php echo $id ?>"
|
23 |
+
<?php echo $custom_attributes ?>
|
24 |
+
<?php if ( isset( $data ) ) echo yith_plugin_fw_html_data_to_string( $data ); ?> value="<?php echo $value ?>">
|
25 |
+
<?php foreach ( $options as $key => $label ) :
|
26 |
+
$radio_id = sanitize_key( $id . '-' . $key );
|
27 |
+
?>
|
28 |
+
<div class="yith-plugin-fw-radio__row">
|
29 |
+
<input type="radio" id="<?php echo $radio_id ?>" name="<?php echo $name ?>" value="<?php echo esc_attr( $key ) ?>" <?php checked( $key, $value ); ?> />
|
30 |
+
<label for="<?php echo $radio_id ?>"><?php echo $label ?></label>
|
31 |
+
</div>
|
32 |
+
<?php endforeach; ?>
|
33 |
+
</div>
|
plugin-fw/templates/panel/videobox.php
DELETED
@@ -1,83 +0,0 @@
|
|
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 ( ! defined( 'ABSPATH' ) ) {
|
12 |
-
exit;
|
13 |
-
} // Exit if accessed directly
|
14 |
-
|
15 |
-
/**
|
16 |
-
* Example to call this template
|
17 |
-
*
|
18 |
-
* 'section_general_settings_videobox' => array(
|
19 |
-
* 'name' => __( 'Title of box', 'yith-plugin-fw' ),
|
20 |
-
* 'type' => 'videobox',
|
21 |
-
* 'default' => array(
|
22 |
-
* 'plugin_name' => __( 'Plugin Name', 'yith-plugin-fw' ),
|
23 |
-
* 'title_first_column' => __( 'Title first column', 'yith-plugin-fw' ),
|
24 |
-
* 'description_first_column' => __('Lorem ipsum ... ', 'yith-plugin-fw'),
|
25 |
-
* 'video' => array(
|
26 |
-
* 'video_id' => 'vimeo_code',
|
27 |
-
* 'video_image_url' => '#',
|
28 |
-
* 'video_description' => __( 'Lorem ipsum dolor sit amet....', 'yith-plugin-fw' ),
|
29 |
-
* ),
|
30 |
-
* 'title_second_column' => __( 'Title first column', 'yith-plugin-fw' ),
|
31 |
-
* 'description_second_column' => __('Lorem ipsum dolor sit amet.... ', 'yith-plugin-fw'),
|
32 |
-
* 'button' => array(
|
33 |
-
* 'href' => 'http://www.yithemes.com',
|
34 |
-
* 'title' => 'Get Support and Pro Features'
|
35 |
-
* )
|
36 |
-
* ),
|
37 |
-
* 'id' => 'yith_wcas_general_videobox'
|
38 |
-
* ),
|
39 |
-
*/
|
40 |
-
?>
|
41 |
-
<div id="normal-sortables" class="meta-box-sortables yith-videobox-wrapper">
|
42 |
-
<div id="<?php echo $id ?>" class="postbox">
|
43 |
-
<h3><span><?php echo $name ?></span></h3>
|
44 |
-
<div class="inside">
|
45 |
-
<div class="yith_videobox">
|
46 |
-
<div class="column"><h2><?php echo $default['title_first_column'] ?></h2>
|
47 |
-
<?php if ( isset( $default['video'] ) && !empty( $default['video'] ) ): ?>
|
48 |
-
<a class="yith-video-link" href="#" data-video-id="yith-video-iframe">
|
49 |
-
<img src="<?php echo $default['video']['video_image_url'] ?>">
|
50 |
-
</a>
|
51 |
-
|
52 |
-
<p class="yit-video-description">
|
53 |
-
<?php echo $default['video']['video_description'] ?>
|
54 |
-
</p>
|
55 |
-
|
56 |
-
<p class="yith-video-iframe">
|
57 |
-
<iframe src="//player.vimeo.com/video/<?php echo $default['video']['video_id'] ?>?title=0&byline=0&portrait=0" width="853" height="480" frameborder="0"></iframe>
|
58 |
-
</p>
|
59 |
-
<?php endif ?>
|
60 |
-
<?php if ( isset( $default['image'] ) && !empty( $default['image'] ) ): ?>
|
61 |
-
<a href="<?php echo $default['image']['image_link'] ?>" target="_blank" class="yith-image-frame">
|
62 |
-
<img src="<?php echo $default['image']['image_url'] ?>">
|
63 |
-
</a>
|
64 |
-
<?php endif ?>
|
65 |
-
<?php if ( isset( $default['description_first_column'] ) && $default['description_first_column'] != '' ): ?>
|
66 |
-
<p><?php echo $default['description_first_column'] ?></p>
|
67 |
-
<?php endif ?>
|
68 |
-
</div>
|
69 |
-
<div class="column two">
|
70 |
-
<h2><?php echo $default['title_second_column'] ?>?</h2>
|
71 |
-
|
72 |
-
<p><?php echo $default['description_second_column'] ?></p>
|
73 |
-
|
74 |
-
<?php if ( isset( $default['button'] ) && !empty( $default['button'] ) ): ?>
|
75 |
-
<p>
|
76 |
-
<a class="button-primary" href="<?php echo $default['button']['href'] ?>" target="_blank"><?php echo $default['button']['title'] ?></a>
|
77 |
-
</p>
|
78 |
-
<?php endif ?>
|
79 |
-
</div>
|
80 |
-
</div>
|
81 |
-
</div>
|
82 |
-
</div>
|
83 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
plugin-fw/templates/privacy/html-policy-content.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @var array $sections
|
4 |
+
*/
|
5 |
+
?>
|
6 |
+
<div class="wp-suggested-text">
|
7 |
+
<?php do_action( 'yith_plugin_fw_privacy_guide_content_before' ); ?>
|
8 |
+
|
9 |
+
<?php
|
10 |
+
foreach ( $sections as $key => $section ) {
|
11 |
+
$action = "yith_plugin_fw_privacy_guide_content_{$key}";
|
12 |
+
$content = apply_filters( 'yith_plugin_fw_privacy_guide_content', '', $key );
|
13 |
+
|
14 |
+
if ( has_action( $action ) || !empty( $section[ 'tutorial' ] ) || !empty( $section[ 'description' ] ) || $content ) {
|
15 |
+
if ( !empty( $section[ 'title' ] ) ) {
|
16 |
+
echo "<h2>{$section['title']}</h2>";
|
17 |
+
}
|
18 |
+
|
19 |
+
if ( !empty( $section[ 'tutorial' ] ) ) {
|
20 |
+
echo "<p class='privacy-policy-tutorial'>{$section['tutorial']}</p>";
|
21 |
+
}
|
22 |
+
|
23 |
+
if ( !empty( $section[ 'description' ] ) ) {
|
24 |
+
echo "<p>{$section['description']}</p>";
|
25 |
+
}
|
26 |
+
|
27 |
+
if ( !empty( $content ) ) {
|
28 |
+
echo $content;
|
29 |
+
}
|
30 |
+
}
|
31 |
+
|
32 |
+
do_action( $action );
|
33 |
+
}
|
34 |
+
?>
|
35 |
+
|
36 |
+
<?php do_action( 'yith_plugin_fw_privacy_guide_content_after' ); ?>
|
37 |
+
</div>
|
plugin-fw/templates/upgrade/changelog.php
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 string $plugin_name
|
11 |
+
* @var string $changelog
|
12 |
+
*
|
13 |
+
*/
|
14 |
+
?>
|
15 |
+
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
|
16 |
+
<head>
|
17 |
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
18 |
+
<meta name="viewport" content="width=device-width">
|
19 |
+
<meta name="robots" content="noindex,follow">
|
20 |
+
<title><?php echo $plugin_name ?> - Changelog</title>
|
21 |
+
<style type="text/css">
|
22 |
+
body {
|
23 |
+
background : #ffffff;
|
24 |
+
color : #444;
|
25 |
+
font-family : -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
26 |
+
font-size : 13px;
|
27 |
+
line-height : 1.4em;
|
28 |
+
padding : 10px;
|
29 |
+
}
|
30 |
+
|
31 |
+
h2.yith-plugin-changelog-title {
|
32 |
+
text-transform : uppercase;
|
33 |
+
font-size : 17px;
|
34 |
+
}
|
35 |
+
|
36 |
+
ul {
|
37 |
+
list-style : none;
|
38 |
+
padding : 0;
|
39 |
+
}
|
40 |
+
|
41 |
+
li {
|
42 |
+
display : list-item;
|
43 |
+
margin-bottom : 6px;
|
44 |
+
}
|
45 |
+
</style>
|
46 |
+
</head>
|
47 |
+
<body>
|
48 |
+
<h2 class='yith-plugin-changelog-title'><?php echo $plugin_name ?> - Changelog</h2>
|
49 |
+
<div class='yith-plugin-changelog'><?php echo $changelog ?></div>
|
50 |
+
</body>
|
51 |
+
</html>
|
plugin-fw/templates/upgrade/error.php
ADDED
@@ -0,0 +1,147 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 string $plugin_name
|
11 |
+
* @var string $changelog
|
12 |
+
*
|
13 |
+
*/
|
14 |
+
?>
|
15 |
+
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
|
16 |
+
<head>
|
17 |
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
18 |
+
<meta name="viewport" content="width=device-width">
|
19 |
+
<meta name="robots" content="noindex,follow">
|
20 |
+
<title>WordPress › Error</title>
|
21 |
+
<style type="text/css">
|
22 |
+
html {
|
23 |
+
background : #f1f1f1;
|
24 |
+
}
|
25 |
+
|
26 |
+
.container {
|
27 |
+
background : #fff;
|
28 |
+
color : #444;
|
29 |
+
font-family : -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
30 |
+
margin : 2em auto;
|
31 |
+
padding : 1em 2em;
|
32 |
+
max-width : 700px;
|
33 |
+
-webkit-box-shadow : 0 1px 3px rgba(0, 0, 0, 0.13);
|
34 |
+
box-shadow : 0 1px 3px rgba(0, 0, 0, 0.13);
|
35 |
+
}
|
36 |
+
|
37 |
+
h1 {
|
38 |
+
border-bottom : 1px solid #dadada;
|
39 |
+
clear : both;
|
40 |
+
color : #666;
|
41 |
+
font-size : 24px;
|
42 |
+
margin : 30px 0 0 0;
|
43 |
+
padding : 0;
|
44 |
+
padding-bottom : 7px;
|
45 |
+
}
|
46 |
+
|
47 |
+
#error {
|
48 |
+
margin-top : 50px;
|
49 |
+
}
|
50 |
+
|
51 |
+
#error p {
|
52 |
+
font-size : 14px;
|
53 |
+
line-height : 1.5;
|
54 |
+
margin : 25px 0 20px;
|
55 |
+
}
|
56 |
+
|
57 |
+
#error code {
|
58 |
+
font-family : Consolas, Monaco, monospace;
|
59 |
+
}
|
60 |
+
|
61 |
+
ul li {
|
62 |
+
margin-bottom : 10px;
|
63 |
+
font-size : 14px;
|
64 |
+
}
|
65 |
+
|
66 |
+
a {
|
67 |
+
color : #0073aa;
|
68 |
+
}
|
69 |
+
|
70 |
+
a:hover,
|
71 |
+
a:active {
|
72 |
+
color : #00a0d2;
|
73 |
+
}
|
74 |
+
|
75 |
+
a:focus {
|
76 |
+
color : #124964;
|
77 |
+
-webkit-box-shadow : 0 0 0 1px #5b9dd9,
|
78 |
+
0 0 2px 1px rgba(30, 140, 190, .8);
|
79 |
+
box-shadow : 0 0 0 1px #5b9dd9,
|
80 |
+
0 0 2px 1px rgba(30, 140, 190, .8);
|
81 |
+
outline : none;
|
82 |
+
}
|
83 |
+
|
84 |
+
.button {
|
85 |
+
background : #f7f7f7;
|
86 |
+
border : 1px solid #ccc;
|
87 |
+
color : #555;
|
88 |
+
display : inline-block;
|
89 |
+
text-decoration : none;
|
90 |
+
font-size : 13px;
|
91 |
+
line-height : 26px;
|
92 |
+
height : 28px;
|
93 |
+
margin : 0;
|
94 |
+
padding : 0 10px 1px;
|
95 |
+
cursor : pointer;
|
96 |
+
-webkit-border-radius : 3px;
|
97 |
+
-webkit-appearance : none;
|
98 |
+
border-radius : 3px;
|
99 |
+
white-space : nowrap;
|
100 |
+
-webkit-box-sizing : border-box;
|
101 |
+
-moz-box-sizing : border-box;
|
102 |
+
box-sizing : border-box;
|
103 |
+
|
104 |
+
-webkit-box-shadow : 0 1px 0 #ccc;
|
105 |
+
box-shadow : 0 1px 0 #ccc;
|
106 |
+
vertical-align : top;
|
107 |
+
}
|
108 |
+
|
109 |
+
.button.button-large {
|
110 |
+
height : 30px;
|
111 |
+
line-height : 28px;
|
112 |
+
padding : 0 12px 2px;
|
113 |
+
}
|
114 |
+
|
115 |
+
.button:hover,
|
116 |
+
.button:focus {
|
117 |
+
background : #fafafa;
|
118 |
+
border-color : #999;
|
119 |
+
color : #23282d;
|
120 |
+
}
|
121 |
+
|
122 |
+
.button:focus {
|
123 |
+
border-color : #5b9dd9;
|
124 |
+
-webkit-box-shadow : 0 0 3px rgba(0, 115, 170, .8);
|
125 |
+
box-shadow : 0 0 3px rgba(0, 115, 170, .8);
|
126 |
+
outline : none;
|
127 |
+
}
|
128 |
+
|
129 |
+
.button:active {
|
130 |
+
background : #eee;
|
131 |
+
border-color : #999;
|
132 |
+
-webkit-box-shadow : inset 0 2px 5px -3px rgba(0, 0, 0, 0.5);
|
133 |
+
box-shadow : inset 0 2px 5px -3px rgba(0, 0, 0, 0.5);
|
134 |
+
-webkit-transform : translateY(1px);
|
135 |
+
-ms-transform : translateY(1px);
|
136 |
+
transform : translateY(1px);
|
137 |
+
}
|
138 |
+
|
139 |
+
</style>
|
140 |
+
</head>
|
141 |
+
<body>
|
142 |
+
<div id="error" class="container">
|
143 |
+
<p><?php echo $error ?></p>
|
144 |
+
</div>
|
145 |
+
|
146 |
+
</body>
|
147 |
+
</html>
|
plugin-fw/yit-plugin.php
CHANGED
@@ -37,6 +37,8 @@ include_once( 'lib/yit-pointers.php');
|
|
37 |
include_once( 'lib/yit-icons.php');
|
38 |
include_once( 'lib/yit-assets.php');
|
39 |
include_once( 'lib/yit-debug.php');
|
|
|
|
|
40 |
|
41 |
// load from theme folder...
|
42 |
load_textdomain( 'yith-plugin-fw', get_template_directory() . '/core/plugin-fw/yith-plugin-fw-' . apply_filters( 'plugin_locale', get_locale(), 'yith-plugin-fw' ) . '.mo' )
|
37 |
include_once( 'lib/yit-icons.php');
|
38 |
include_once( 'lib/yit-assets.php');
|
39 |
include_once( 'lib/yit-debug.php');
|
40 |
+
include_once( 'lib/privacy/yit-privacy.php' );
|
41 |
+
include_once( 'lib/privacy/yit-privacy-plugin-abstract.php' );
|
42 |
|
43 |
// load from theme folder...
|
44 |
load_textdomain( 'yith-plugin-fw', get_template_directory() . '/core/plugin-fw/yith-plugin-fw-' . apply_filters( 'plugin_locale', get_locale(), 'yith-plugin-fw' ) . '.mo' )
|
plugin-options/premium-options.php
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
return array(
|
4 |
-
'premium' => array(
|
5 |
-
'home' => array(
|
6 |
-
'type' => 'custom_tab',
|
7 |
-
'action' => 'yith_quick_view_premium',
|
8 |
-
)
|
9 |
-
)
|
10 |
);
|
1 |
+
<?php
|
2 |
+
|
3 |
+
return array(
|
4 |
+
'premium' => array(
|
5 |
+
'home' => array(
|
6 |
+
'type' => 'custom_tab',
|
7 |
+
'action' => 'yith_quick_view_premium',
|
8 |
+
)
|
9 |
+
)
|
10 |
);
|
plugin-options/settings-options.php
CHANGED
@@ -1,90 +1,90 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
$settings = array(
|
4 |
-
|
5 |
-
'settings' => array(
|
6 |
-
|
7 |
-
'general-options' => array(
|
8 |
-
'title' => __( 'General Options', 'yith-woocommerce-quick-view' ),
|
9 |
-
'type' => 'title',
|
10 |
-
'desc' => '',
|
11 |
-
'id' => 'yith-wcqv-general-options'
|
12 |
-
),
|
13 |
-
|
14 |
-
'enable-quick-view' => array(
|
15 |
-
'id' => 'yith-wcqv-enable',
|
16 |
-
'name' => __( 'Enable Quick View', 'yith-woocommerce-quick-view' ),
|
17 |
-
'type' => 'checkbox',
|
18 |
-
'default' => 'yes'
|
19 |
-
),
|
20 |
-
|
21 |
-
'enable-quick-view-mobile' => array(
|
22 |
-
'id' => 'yith-wcqv-enable-mobile',
|
23 |
-
'name' => __( 'Enable Quick View on mobile', 'yith-woocommerce-quick-view' ),
|
24 |
-
'desc' => __( 'Enable quick view features on mobile device too', 'yith-woocommerce-quick-view' ),
|
25 |
-
'type' => 'checkbox',
|
26 |
-
'default' => 'yes'
|
27 |
-
),
|
28 |
-
|
29 |
-
'quick-view-label' => array(
|
30 |
-
'id' => 'yith-wcqv-button-label',
|
31 |
-
'name' => __( 'Quick View Button Label', 'yith-woocommerce-quick-view' ),
|
32 |
-
'desc' => __( 'Label for the quick view button in the WooCommerce loop.', 'yith-woocommerce-quick-view' ),
|
33 |
-
'type' => 'text',
|
34 |
-
'default' => __( 'Quick View', 'yith-woocommerce-quick-view' ),
|
35 |
-
),
|
36 |
-
|
37 |
-
'enable-lightbox' => array(
|
38 |
-
'id' => 'yith-wcqv-enable-lightbox',
|
39 |
-
'name' => __( 'Enable Lightbox', 'yith-woocommerce-quick-view' ),
|
40 |
-
'desc' => __( 'Enable lightbox. Product images will open in a lightbox.', 'yith-woocommerce-quick-view' ),
|
41 |
-
'type' => 'checkbox',
|
42 |
-
'default' => 'yes'
|
43 |
-
),
|
44 |
-
|
45 |
-
'general-options-end' => array(
|
46 |
-
'type' => 'sectionend',
|
47 |
-
'id' => 'yith-wcqv-general-options'
|
48 |
-
),
|
49 |
-
|
50 |
-
'style-options' => array(
|
51 |
-
'title' => __( 'Style Options', 'yith-woocommerce-quick-view' ),
|
52 |
-
'desc' => '',
|
53 |
-
'type' => 'title',
|
54 |
-
'id' => 'yith-wcqv-style-options'
|
55 |
-
),
|
56 |
-
|
57 |
-
'background-color-modal' => array(
|
58 |
-
'name' => __( 'Modal Window Background Color', 'yith-woocommerce-quick-view' ),
|
59 |
-
'type' => 'color',
|
60 |
-
'desc' => '',
|
61 |
-
'id' => 'yith-wcqv-background-modal',
|
62 |
-
'default' => '#ffffff'
|
63 |
-
),
|
64 |
-
|
65 |
-
'close-button-color' => array(
|
66 |
-
'name' => __( 'Closing Button Color', 'yith-woocommerce-quick-view' ),
|
67 |
-
'type' => 'color',
|
68 |
-
'desc' => '',
|
69 |
-
'id' => 'yith-wcqv-close-color',
|
70 |
-
'default' => '#cdcdcd'
|
71 |
-
),
|
72 |
-
|
73 |
-
'close-button-color-hover' => array(
|
74 |
-
'name' => __( 'Closing Button Hover Color', 'yith-woocommerce-quick-view' ),
|
75 |
-
'type' => 'color',
|
76 |
-
'desc' => '',
|
77 |
-
'id' => 'yith-wcqv-close-color-hover',
|
78 |
-
'default' => '#ff0000'
|
79 |
-
),
|
80 |
-
|
81 |
-
'style-options-end' => array(
|
82 |
-
'type' => 'sectionend',
|
83 |
-
'id' => 'yith-wcqv-style-options'
|
84 |
-
),
|
85 |
-
|
86 |
-
|
87 |
-
)
|
88 |
-
);
|
89 |
-
|
90 |
return apply_filters( 'yith_wcqv_panel_settings_options', $settings );
|
1 |
+
<?php
|
2 |
+
|
3 |
+
$settings = array(
|
4 |
+
|
5 |
+
'settings' => array(
|
6 |
+
|
7 |
+
'general-options' => array(
|
8 |
+
'title' => __( 'General Options', 'yith-woocommerce-quick-view' ),
|
9 |
+
'type' => 'title',
|
10 |
+
'desc' => '',
|
11 |
+
'id' => 'yith-wcqv-general-options'
|
12 |
+
),
|
13 |
+
|
14 |
+
'enable-quick-view' => array(
|
15 |
+
'id' => 'yith-wcqv-enable',
|
16 |
+
'name' => __( 'Enable Quick View', 'yith-woocommerce-quick-view' ),
|
17 |
+
'type' => 'checkbox',
|
18 |
+
'default' => 'yes'
|
19 |
+
),
|
20 |
+
|
21 |
+
'enable-quick-view-mobile' => array(
|
22 |
+
'id' => 'yith-wcqv-enable-mobile',
|
23 |
+
'name' => __( 'Enable Quick View on mobile', 'yith-woocommerce-quick-view' ),
|
24 |
+
'desc' => __( 'Enable quick view features on mobile device too', 'yith-woocommerce-quick-view' ),
|
25 |
+
'type' => 'checkbox',
|
26 |
+
'default' => 'yes'
|
27 |
+
),
|
28 |
+
|
29 |
+
'quick-view-label' => array(
|
30 |
+
'id' => 'yith-wcqv-button-label',
|
31 |
+
'name' => __( 'Quick View Button Label', 'yith-woocommerce-quick-view' ),
|
32 |
+
'desc' => __( 'Label for the quick view button in the WooCommerce loop.', 'yith-woocommerce-quick-view' ),
|
33 |
+
'type' => 'text',
|
34 |
+
'default' => __( 'Quick View', 'yith-woocommerce-quick-view' ),
|
35 |
+
),
|
36 |
+
|
37 |
+
'enable-lightbox' => array(
|
38 |
+
'id' => 'yith-wcqv-enable-lightbox',
|
39 |
+
'name' => __( 'Enable Lightbox', 'yith-woocommerce-quick-view' ),
|
40 |
+
'desc' => __( 'Enable lightbox. Product images will open in a lightbox.', 'yith-woocommerce-quick-view' ),
|
41 |
+
'type' => 'checkbox',
|
42 |
+
'default' => 'yes'
|
43 |
+
),
|
44 |
+
|
45 |
+
'general-options-end' => array(
|
46 |
+
'type' => 'sectionend',
|
47 |
+
'id' => 'yith-wcqv-general-options'
|
48 |
+
),
|
49 |
+
|
50 |
+
'style-options' => array(
|
51 |
+
'title' => __( 'Style Options', 'yith-woocommerce-quick-view' ),
|
52 |
+
'desc' => '',
|
53 |
+
'type' => 'title',
|
54 |
+
'id' => 'yith-wcqv-style-options'
|
55 |
+
),
|
56 |
+
|
57 |
+
'background-color-modal' => array(
|
58 |
+
'name' => __( 'Modal Window Background Color', 'yith-woocommerce-quick-view' ),
|
59 |
+
'type' => 'color',
|
60 |
+
'desc' => '',
|
61 |
+
'id' => 'yith-wcqv-background-modal',
|
62 |
+
'default' => '#ffffff'
|
63 |
+
),
|
64 |
+
|
65 |
+
'close-button-color' => array(
|
66 |
+
'name' => __( 'Closing Button Color', 'yith-woocommerce-quick-view' ),
|
67 |
+
'type' => 'color',
|
68 |
+
'desc' => '',
|
69 |
+
'id' => 'yith-wcqv-close-color',
|
70 |
+
'default' => '#cdcdcd'
|
71 |
+
),
|
72 |
+
|
73 |
+
'close-button-color-hover' => array(
|
74 |
+
'name' => __( 'Closing Button Hover Color', 'yith-woocommerce-quick-view' ),
|
75 |
+
'type' => 'color',
|
76 |
+
'desc' => '',
|
77 |
+
'id' => 'yith-wcqv-close-color-hover',
|
78 |
+
'default' => '#ff0000'
|
79 |
+
),
|
80 |
+
|
81 |
+
'style-options-end' => array(
|
82 |
+
'type' => 'sectionend',
|
83 |
+
'id' => 'yith-wcqv-style-options'
|
84 |
+
),
|
85 |
+
|
86 |
+
|
87 |
+
)
|
88 |
+
);
|
89 |
+
|
90 |
return apply_filters( 'yith_wcqv_panel_settings_options', $settings );
|
templates/admin/premium.php
CHANGED
@@ -1,373 +1,373 @@
|
|
1 |
-
<style>
|
2 |
-
.section{
|
3 |
-
overflow-x: hidden;
|
4 |
-
}
|
5 |
-
|
6 |
-
.section{
|
7 |
-
margin-left: -20px;
|
8 |
-
margin-right: -20px;
|
9 |
-
font-family: "Raleway",san-serif;
|
10 |
-
}
|
11 |
-
.section h1{
|
12 |
-
text-align: center;
|
13 |
-
text-transform: uppercase;
|
14 |
-
color: #808a97;
|
15 |
-
font-size: 35px;
|
16 |
-
font-weight: 700;
|
17 |
-
line-height: normal;
|
18 |
-
display: inline-block;
|
19 |
-
width: 100%;
|
20 |
-
margin: 50px 0 0;
|
21 |
-
}
|
22 |
-
.section:nth-child(even){
|
23 |
-
background-color: #fff;
|
24 |
-
}
|
25 |
-
.section:nth-child(odd){
|
26 |
-
background-color: #f1f1f1;
|
27 |
-
}
|
28 |
-
.section .section-title img{
|
29 |
-
display: table-cell;
|
30 |
-
vertical-align: middle;
|
31 |
-
width: auto;
|
32 |
-
margin-right: 15px;
|
33 |
-
}
|
34 |
-
.section h2,
|
35 |
-
.section h3 {
|
36 |
-
display: inline-block;
|
37 |
-
vertical-align: middle;
|
38 |
-
padding: 0;
|
39 |
-
font-size: 24px;
|
40 |
-
font-weight: 700;
|
41 |
-
color: #808a97;
|
42 |
-
text-transform: uppercase;
|
43 |
-
}
|
44 |
-
|
45 |
-
.section .section-title h2{
|
46 |
-
display: table-cell;
|
47 |
-
vertical-align: middle;
|
48 |
-
line-height: 27px;
|
49 |
-
}
|
50 |
-
|
51 |
-
.section-title{
|
52 |
-
display: table;
|
53 |
-
}
|
54 |
-
|
55 |
-
.section h3 {
|
56 |
-
font-size: 14px;
|
57 |
-
line-height: 28px;
|
58 |
-
margin-bottom: 0;
|
59 |
-
display: block;
|
60 |
-
}
|
61 |
-
|
62 |
-
.section p{
|
63 |
-
font-size: 13px;
|
64 |
-
margin: 25px 0;
|
65 |
-
}
|
66 |
-
.section ul li{
|
67 |
-
margin-bottom: 4px;
|
68 |
-
}
|
69 |
-
.landing-container{
|
70 |
-
max-width: 750px;
|
71 |
-
margin-left: auto;
|
72 |
-
margin-right: auto;
|
73 |
-
padding: 50px 0 30px;
|
74 |
-
}
|
75 |
-
.landing-container:after{
|
76 |
-
display: block;
|
77 |
-
clear: both;
|
78 |
-
content: '';
|
79 |
-
}
|
80 |
-
.landing-container .col-1,
|
81 |
-
.landing-container .col-2{
|
82 |
-
float: left;
|
83 |
-
box-sizing: border-box;
|
84 |
-
padding: 0 15px;
|
85 |
-
}
|
86 |
-
.landing-container .col-1 img{
|
87 |
-
width: 100%;
|
88 |
-
}
|
89 |
-
.landing-container .col-1{
|
90 |
-
width: 55%;
|
91 |
-
}
|
92 |
-
.landing-container .col-2{
|
93 |
-
width: 45%;
|
94 |
-
}
|
95 |
-
.premium-cta{
|
96 |
-
background-color: #808a97;
|
97 |
-
color: #fff;
|
98 |
-
border-radius: 6px;
|
99 |
-
padding: 20px 15px;
|
100 |
-
}
|
101 |
-
.premium-cta:after{
|
102 |
-
content: '';
|
103 |
-
display: block;
|
104 |
-
clear: both;
|
105 |
-
}
|
106 |
-
.premium-cta p{
|
107 |
-
margin: 7px 0;
|
108 |
-
font-size: 14px;
|
109 |
-
font-weight: 500;
|
110 |
-
display: inline-block;
|
111 |
-
width: 60%;
|
112 |
-
}
|
113 |
-
.premium-cta a.button{
|
114 |
-
border-radius: 6px;
|
115 |
-
height: 60px;
|
116 |
-
float: right;
|
117 |
-
background: url(<?php echo YITH_WCQV_ASSETS_URL?>/image/upgrade.png) #ff643f no-repeat 13px 13px;
|
118 |
-
border-color: #ff643f;
|
119 |
-
box-shadow: none;
|
120 |
-
outline: none;
|
121 |
-
color: #fff;
|
122 |
-
position: relative;
|
123 |
-
padding: 9px 50px 9px 70px;
|
124 |
-
}
|
125 |
-
.premium-cta a.button:hover,
|
126 |
-
.premium-cta a.button:active,
|
127 |
-
.premium-cta a.button:focus{
|
128 |
-
color: #fff;
|
129 |
-
background: url(<?php echo YITH_WCQV_ASSETS_URL?>/image/upgrade.png) #971d00 no-repeat 13px 13px;
|
130 |
-
border-color: #971d00;
|
131 |
-
box-shadow: none;
|
132 |
-
outline: none;
|
133 |
-
}
|
134 |
-
.premium-cta a.button:focus{
|
135 |
-
top: 1px;
|
136 |
-
}
|
137 |
-
.premium-cta a.button span{
|
138 |
-
line-height: 13px;
|
139 |
-
}
|
140 |
-
.premium-cta a.button .highlight{
|
141 |
-
display: block;
|
142 |
-
font-size: 20px;
|
143 |
-
font-weight: 700;
|
144 |
-
line-height: 20px;
|
145 |
-
}
|
146 |
-
.premium-cta .highlight{
|
147 |
-
text-transform: uppercase;
|
148 |
-
background: none;
|
149 |
-
font-weight: 800;
|
150 |
-
color: #fff;
|
151 |
-
}
|
152 |
-
|
153 |
-
@media (max-width: 768px) {
|
154 |
-
.section{margin: 0}
|
155 |
-
.premium-cta p{
|
156 |
-
width: 100%;
|
157 |
-
}
|
158 |
-
.premium-cta{
|
159 |
-
text-align: center;
|
160 |
-
}
|
161 |
-
.premium-cta a.button{
|
162 |
-
float: none;
|
163 |
-
}
|
164 |
-
.section .section-title h2{
|
165 |
-
display: block;
|
166 |
-
margin-top: 15px;
|
167 |
-
}
|
168 |
-
}
|
169 |
-
|
170 |
-
@media (max-width: 480px){
|
171 |
-
.wrap{
|
172 |
-
margin-right: 0;
|
173 |
-
}
|
174 |
-
.section{
|
175 |
-
margin: 0;
|
176 |
-
}
|
177 |
-
.landing-container .col-1,
|
178 |
-
.landing-container .col-2{
|
179 |
-
width: 100%;
|
180 |
-
padding: 0 15px;
|
181 |
-
}
|
182 |
-
.section-odd .col-1 {
|
183 |
-
float: left;
|
184 |
-
margin-right: -100%;
|
185 |
-
}
|
186 |
-
.section-odd .col-2 {
|
187 |
-
float: right;
|
188 |
-
margin-top: 100%;
|
189 |
-
}
|
190 |
-
.section-even .landing-container .col-1{
|
191 |
-
margin-bottom: 26px;
|
192 |
-
}
|
193 |
-
}
|
194 |
-
|
195 |
-
@media (max-width: 320px){
|
196 |
-
.premium-cta a.button{
|
197 |
-
padding: 9px 20px 9px 70px;
|
198 |
-
}
|
199 |
-
|
200 |
-
.section .section-title img{
|
201 |
-
display: none;
|
202 |
-
}
|
203 |
-
}
|
204 |
-
</style>
|
205 |
-
<div class="landing">
|
206 |
-
<div class="section section-cta section-odd">
|
207 |
-
<div class="landing-container">
|
208 |
-
<div class="premium-cta">
|
209 |
-
<p>
|
210 |
-
<?php echo sprintf( __('Upgrade to %1$spremium version%2$s of %1$sYITH WooCommerce Quick View%2$s to benefit from all features!','ywqa'),'<span class="highlight">','</span>' );?>
|
211 |
-
</p>
|
212 |
-
<a href="<?php echo YITH_WCQV_Admin()->get_premium_landing_uri() ?>" target="_blank" class="premium-cta-button button btn">
|
213 |
-
<span class="highlight"><?php _e('UPGRADE','yith-woocommerce-quick-view');?></span>
|
214 |
-
<span><?php _e('to the premium version','yith-woocommerce-quick-view');?></span>
|
215 |
-
</a>
|
216 |
-
</div>
|
217 |
-
</div>
|
218 |
-
</div>
|
219 |
-
<div class="section section-even clear" style="background: url(<?php echo YITH_WCQV_ASSETS_URL ?>/image/01-bg.png) no-repeat #fff; background-position: 85% 75%">
|
220 |
-
<h1><?php _e('Premium Features','yith-woocommerce-quick-view');?></h1>
|
221 |
-
<div class="landing-container">
|
222 |
-
<div class="col-1">
|
223 |
-
<img src="<?php echo YITH_WCQV_ASSETS_URL ?>/image/01.png" alt="<?php _e('Button type','yith-woocommerce-quick-view') ?>" />
|
224 |
-
</div>
|
225 |
-
<div class="col-2">
|
226 |
-
<div class="section-title">
|
227 |
-
<img src="<?php echo YITH_WCQV_ASSETS_URL ?>/image/01-icon.png" alt="Review Title"/>
|
228 |
-
<h2><?php _e('BUTTON TYPE','yith-woocommerce-quick-view');?></h2>
|
229 |
-
</div>
|
230 |
-
<p><?php echo sprintf( __('Choose between the button or a custom icon to access the %1$sQuick View%2$s: you can choose to place it after the "Add To Cart" button or inside the thumbnail of the product.','yith-woocommerce-quick-view'),'<b>','</b>' );?></p>
|
231 |
-
</div>
|
232 |
-
</div>
|
233 |
-
</div>
|
234 |
-
<div class="section section-odd clear" style="background: url(<?php echo YITH_WCQV_ASSETS_URL ?>/image/02-bg.png) no-repeat #f1f1f1; background-position: 15% 100%">
|
235 |
-
<div class="landing-container">
|
236 |
-
<div class="col-2">
|
237 |
-
<div class="section-title">
|
238 |
-
<img src="<?php echo YITH_WCQV_ASSETS_URL ?>/image/02-icon.png" alt="<?php _e('Product Navigation','yith-woocommerce-quick-view');?>" />
|
239 |
-
<h2><?php _e('Product Navigation','yith-woocommerce-quick-view'); ?> </h2>
|
240 |
-
</div>
|
241 |
-
<p><?php echo sprintf( __('The navigation in the "Quick View" allows browsing among %1$sproducts%2$s displayed in it. The navigation arrows show on mousehover the image of the next/previous product.','yith-woocommerce-quick-view'),'<b>','</b>' );?></p>
|
242 |
-
</div>
|
243 |
-
<div class="col-1">
|
244 |
-
<img src="<?php echo YITH_WCQV_ASSETS_URL ?>/image/02.png" alt="<?php _e('Product Navigation','yith-woocommerce-quick-view');?>" />
|
245 |
-
</div>
|
246 |
-
</div>
|
247 |
-
</div>
|
248 |
-
<div class="section section-even clear" style="background: url(<?php echo YITH_WCQV_ASSETS_URL ?>/image/03-bg.png) no-repeat #fff; background-position: 85% 100%">
|
249 |
-
<div class="landing-container">
|
250 |
-
<div class="col-1">
|
251 |
-
<img src="<?php echo YITH_WCQV_ASSETS_URL ?>/image/03.png" alt="Icon 03" />
|
252 |
-
</div>
|
253 |
-
<div class="col-2">
|
254 |
-
<div class="section-title">
|
255 |
-
<img src="<?php echo YITH_WCQV_ASSETS_URL ?>/image/03-icon.png" alt="<?php _e('Content to display','yith-woocommerce-quick-view') ?>" />
|
256 |
-
<h2><?php _e('Content to display','yith-woocommerce-quick-view') ?></h2>
|
257 |
-
</div>
|
258 |
-
<p><?php echo sprintf( __('The display of the product information in the "Quick View" are managed by %1$sadministrators%2$s who can decide whether to show everything or only a part of it.','yith-woocommerce-quick-view'),'<b>','</b>' );?></p>
|
259 |
-
</div>
|
260 |
-
</div>
|
261 |
-
</div>
|
262 |
-
<div class="section section-odd clear" style="background: url(<?php echo YITH_WCQV_ASSETS_URL ?>/image/07-bg.png) no-repeat #f1f1f1; background-position: 15% 100%">
|
263 |
-
<div class="landing-container">
|
264 |
-
<div class="col-2">
|
265 |
-
<div class="section-title">
|
266 |
-
<img src="<?php echo YITH_WCQV_ASSETS_URL ?>/image/07-icon.png" alt="icon 04" />
|
267 |
-
<h2><?php _e('Quick View Type','yith-woocommerce-quick-view');?> </h2>
|
268 |
-
</div>
|
269 |
-
<p><?php echo sprintf( __('Quick view has two different displaying modes: the first one opens it as a %1$smodal window%2$s, the other one opens it in the page itself with a %1$scascading effect%2$s above content page.','yith-woocommerce-quick-view'),'<b>','</b>' );?></p>
|
270 |
-
</div>
|
271 |
-
<div class="col-1">
|
272 |
-
<img src="<?php echo YITH_WCQV_ASSETS_URL ?>/image/07.png" alt="<?php _e('Quick view type','yith-woocommerce-quick-view');?>" />
|
273 |
-
</div>
|
274 |
-
</div>
|
275 |
-
</div>
|
276 |
-
<div class="section section-even clear" style="background: url(<?php echo YITH_WCQV_ASSETS_URL ?>/image/08-bg.png) no-repeat #fff; background-position: 85% 100%">
|
277 |
-
<div class="landing-container">
|
278 |
-
<div class="col-1">
|
279 |
-
<img src="<?php echo YITH_WCQV_ASSETS_URL ?>/image/08.png" alt="View details" />
|
280 |
-
</div>
|
281 |
-
<div class="col-2">
|
282 |
-
<div class="section-title">
|
283 |
-
<img src="<?php echo YITH_WCQV_ASSETS_URL ?>/image/08-icon.png" alt="Vote the review" />
|
284 |
-
<h2><?php _e('"View details" button','yith-woocommerce-quick-view');?></h2>
|
285 |
-
</div>
|
286 |
-
<p><?php echo sprintf( __('An additional button that allows users to access product detail page directly from quick view window just with a click of the mouse.','yith-woocommerce-quick-view'),'<b>','</b>' );?></p>
|
287 |
-
</div>
|
288 |
-
</div>
|
289 |
-
</div>
|
290 |
-
<div class="section section-odd clear" style="background: url(<?php echo YITH_WCQV_ASSETS_URL ?>/image/04-bg.png) no-repeat #f1f1f1; background-position: 15% 100%">
|
291 |
-
<div class="landing-container">
|
292 |
-
<div class="col-2">
|
293 |
-
<div class="section-title">
|
294 |
-
<img src="<?php echo YITH_WCQV_ASSETS_URL ?>/image/04-icon.png" alt="Number" />
|
295 |
-
<h2><?php _e('Type of product images','yith-woocommerce-quick-view');?></h2>
|
296 |
-
</div>
|
297 |
-
<p><?php echo sprintf( __('Each product can have more than one image: choose whether to hide or show them with the %1$sslider%2$s effect or in the classic %1$sWooCommerce%2$s display.','yith-woocommerce-quick-view'),'<b>','</b>' );?></p>
|
298 |
-
</div>
|
299 |
-
<div class="col-1">
|
300 |
-
<img src="<?php echo YITH_WCQV_ASSETS_URL ?>/image/04.png" alt="Icon 04" />
|
301 |
-
</div>
|
302 |
-
</div>
|
303 |
-
</div>
|
304 |
-
<div class="section section-even clear" style="background: url(<?php echo YITH_WCQV_ASSETS_URL ?>/image/05-bg.png) no-repeat #fff; background-position: 85% 100%">
|
305 |
-
<div class="landing-container">
|
306 |
-
<div class="col-1">
|
307 |
-
<img src="<?php echo YITH_WCQV_ASSETS_URL ?>/image/05.png" alt="Share" />
|
308 |
-
</div>
|
309 |
-
<div class="col-2">
|
310 |
-
<div class="section-title">
|
311 |
-
<img src="<?php echo YITH_WCQV_ASSETS_URL?>/image/05-icon.png" alt="icon 05" />
|
312 |
-
<h2><?php _e('SHARE','yith-woocommerce-quick-view');?></h2>
|
313 |
-
</div>
|
314 |
-
<p><?php echo sprintf( __('%1$sQuick View is also social-friendly!%2$s Activating this option, you will be able to share the Quick View on Facebook, Twitter, Pinterest, Google+, or sending an email.','yith-woocommerce-quick-view'),'<b>','</b>' );?></p>
|
315 |
-
</div>
|
316 |
-
</div>
|
317 |
-
</div>
|
318 |
-
<div class="section section-odd clear" style="background: url(<?php echo YITH_WCQV_ASSETS_URL ?>/image/06-bg.png) no-repeat #f1f1f1; background-position: 15% 100%">
|
319 |
-
<div class="landing-container">
|
320 |
-
<div class="col-2">
|
321 |
-
<div class="section-title">
|
322 |
-
<img src="<?php echo YITH_WCQV_ASSETS_URL ?>/image/06-icon.png" alt="Icon 06" />
|
323 |
-
<h2><?php _e('Style Options','yith-woocommerce-quick-view');?></h2>
|
324 |
-
</div>
|
325 |
-
<p><?php echo sprintf( __('A rich option panel to change the colors of the %1$s"Quick View"%2$s button and of everything that is within the modal window generated.','yith-woocommerce-quick-view'),'<b>','</b>' );?></p>
|
326 |
-
</div>
|
327 |
-
<div class="col-1">
|
328 |
-
<img src="<?php echo YITH_WCQV_ASSETS_URL ?>/image/06.png" alt="<?php _e('Style Options','yith-woocommerce-quick-view') ?>" />
|
329 |
-
</div>
|
330 |
-
</div>
|
331 |
-
</div>
|
332 |
-
<div class="section section-even clear" style="background: url(<?php echo YITH_WCQV_ASSETS_URL ?>/image/09-bg.png) no-repeat #fff; background-position: 85% 100%">
|
333 |
-
<div class="landing-container">
|
334 |
-
<div class="col-1">
|
335 |
-
<img src="<?php echo YITH_WCQV_ASSETS_URL ?>/image/09.png" alt="" />
|
336 |
-
</div>
|
337 |
-
<div class="col-2">
|
338 |
-
<div class="section-title">
|
339 |
-
<img src="<?php echo YITH_WCQV_ASSETS_URL?>/image/09-icon.png" alt="icon 09" />
|
340 |
-
<h2><?php _e('SHORTCODE','yith-woocommerce-quick-view');?></h2>
|
341 |
-
</div>
|
342 |
-
<p><?php echo sprintf( __('The shortcode of plugin is a $1$srapid$2$s and $1$seasy$2$s solution: you can add a button in any spot of the page to allow your users to see the quick view of a specific product in your store.','yith-woocommerce-quick-view'),'<b>','</b>' );?></p>
|
343 |
-
</div>
|
344 |
-
</div>
|
345 |
-
</div>
|
346 |
-
<div class="section section-odd clear" style="background: url(<?php echo YITH_WCQV_ASSETS_URL ?>/image/09-bg.png) no-repeat #f1f1f1; background-position: 15% 100%">
|
347 |
-
<div class="landing-container">
|
348 |
-
<div class="col-2">
|
349 |
-
<div class="section-title">
|
350 |
-
<img src="<?php echo YITH_WCQV_ASSETS_URL ?>/image/09-icon.png" alt="Icon 10" />
|
351 |
-
<h2><?php _e('Compatibility with other YITH\'s plugins','yith-woocommerce-quick-view');?></h2>
|
352 |
-
</div>
|
353 |
-
<p><?php echo sprintf( __('Thanks to the compatibility with %1$sYITH WooCommerce Zoom Magnifier, YITH WooCommerce Badge Management%2$s and %1$sYITH WooCommerce Wishlist%2$s, you will be free to enrich further the content of your quick view.%3$s Zoom the product image, show a badge, or add the button to open the quick view in all products available in your users\' wishlists. With YITH\'s plugins you make the difference.','yith-woocommerce-quick-view'),'<b>','</b>','<br>' );?></p>
|
354 |
-
</div>
|
355 |
-
<div class="col-1">
|
356 |
-
<img src="<?php echo YITH_WCQV_ASSETS_URL ?>/image/10.png" alt="" />
|
357 |
-
</div>
|
358 |
-
</div>
|
359 |
-
</div>
|
360 |
-
<div class="section section-cta section-odd">
|
361 |
-
<div class="landing-container">
|
362 |
-
<div class="premium-cta">
|
363 |
-
<p>
|
364 |
-
<?php echo sprintf( __('Upgrade to %1$spremium version%2$s of %1$sYITH WooCommerce Quick View%2$s to benefit from all features!','ywqa'),'<span class="highlight">','</span>' );?>
|
365 |
-
</p>
|
366 |
-
<a href="<?php echo YITH_WCQV_Admin()->get_premium_landing_uri() ?>" target="_blank" class="premium-cta-button button btn">
|
367 |
-
<span class="highlight"><?php _e('UPGRADE','yith-woocommerce-quick-view');?></span>
|
368 |
-
<span><?php _e('to the premium version','yith-woocommerce-quick-view');?></span>
|
369 |
-
</a>
|
370 |
-
</div>
|
371 |
-
</div>
|
372 |
-
</div>
|
373 |
</div>
|
1 |
+
<style>
|
2 |
+
.section{
|
3 |
+
overflow-x: hidden;
|
4 |
+
}
|
5 |
+
|
6 |
+
.section{
|
7 |
+
margin-left: -20px;
|
8 |
+
margin-right: -20px;
|
9 |
+
font-family: "Raleway",san-serif;
|
10 |
+
}
|
11 |
+
.section h1{
|
12 |
+
text-align: center;
|
13 |
+
text-transform: uppercase;
|
14 |
+
color: #808a97;
|
15 |
+
font-size: 35px;
|
16 |
+
font-weight: 700;
|
17 |
+
line-height: normal;
|
18 |
+
display: inline-block;
|
19 |
+
width: 100%;
|
20 |
+
margin: 50px 0 0;
|
21 |
+
}
|
22 |
+
.section:nth-child(even){
|
23 |
+
background-color: #fff;
|
24 |
+
}
|
25 |
+
.section:nth-child(odd){
|
26 |
+
background-color: #f1f1f1;
|
27 |
+
}
|
28 |
+
.section .section-title img{
|
29 |
+
display: table-cell;
|
30 |
+
vertical-align: middle;
|
31 |
+
width: auto;
|
32 |
+
margin-right: 15px;
|
33 |
+
}
|
34 |
+
.section h2,
|
35 |
+
.section h3 {
|
36 |
+
display: inline-block;
|
37 |
+
vertical-align: middle;
|
38 |
+
padding: 0;
|
39 |
+
font-size: 24px;
|
40 |
+
font-weight: 700;
|
41 |
+
color: #808a97;
|
42 |
+
text-transform: uppercase;
|
43 |
+
}
|
44 |
+
|
45 |
+
.section .section-title h2{
|
46 |
+
display: table-cell;
|
47 |
+
vertical-align: middle;
|
48 |
+
line-height: 27px;
|
49 |
+
}
|
50 |
+
|
51 |
+
.section-title{
|
52 |
+
display: table;
|
53 |
+
}
|
54 |
+
|
55 |
+
.section h3 {
|
56 |
+
font-size: 14px;
|
57 |
+
line-height: 28px;
|
58 |
+
margin-bottom: 0;
|
59 |
+
display: block;
|
60 |
+
}
|
61 |
+
|
62 |
+
.section p{
|
63 |
+
font-size: 13px;
|
64 |
+
margin: 25px 0;
|
65 |
+
}
|
66 |
+
.section ul li{
|
67 |
+
margin-bottom: 4px;
|
68 |
+
}
|
69 |
+
.landing-container{
|
70 |
+
max-width: 750px;
|
71 |
+
margin-left: auto;
|
72 |
+
margin-right: auto;
|
73 |
+
padding: 50px 0 30px;
|
74 |
+
}
|
75 |
+
.landing-container:after{
|
76 |
+
display: block;
|
77 |
+
clear: both;
|
78 |
+
content: '';
|
79 |
+
}
|
80 |
+
.landing-container .col-1,
|
81 |
+
.landing-container .col-2{
|
82 |
+
float: left;
|
83 |
+
box-sizing: border-box;
|
84 |
+
padding: 0 15px;
|
85 |
+
}
|
86 |
+
.landing-container .col-1 img{
|
87 |
+
width: 100%;
|
88 |
+
}
|
89 |
+
.landing-container .col-1{
|
90 |
+
width: 55%;
|
91 |
+
}
|
92 |
+
.landing-container .col-2{
|
93 |
+
width: 45%;
|
94 |
+
}
|
95 |
+
.premium-cta{
|
96 |
+
background-color: #808a97;
|
97 |
+
color: #fff;
|
98 |
+
border-radius: 6px;
|
99 |
+
padding: 20px 15px;
|
100 |
+
}
|
101 |
+
.premium-cta:after{
|
102 |
+
content: '';
|
103 |
+
display: block;
|
104 |
+
clear: both;
|
105 |
+
}
|
106 |
+
.premium-cta p{
|
107 |
+
margin: 7px 0;
|
108 |
+
font-size: 14px;
|
109 |
+
font-weight: 500;
|
110 |
+
display: inline-block;
|
111 |
+
width: 60%;
|
112 |
+
}
|
113 |
+
.premium-cta a.button{
|
114 |
+
border-radius: 6px;
|
115 |
+
height: 60px;
|
116 |
+
float: right;
|
117 |
+
background: url(<?php echo YITH_WCQV_ASSETS_URL?>/image/upgrade.png) #ff643f no-repeat 13px 13px;
|
118 |
+
border-color: #ff643f;
|
119 |
+
box-shadow: none;
|
120 |
+
outline: none;
|
121 |
+
color: #fff;
|
122 |
+
position: relative;
|
123 |
+
padding: 9px 50px 9px 70px;
|
124 |
+
}
|
125 |
+
.premium-cta a.button:hover,
|
126 |
+
.premium-cta a.button:active,
|
127 |
+
.premium-cta a.button:focus{
|
128 |
+
color: #fff;
|
129 |
+
background: url(<?php echo YITH_WCQV_ASSETS_URL?>/image/upgrade.png) #971d00 no-repeat 13px 13px;
|
130 |
+
border-color: #971d00;
|
131 |
+
box-shadow: none;
|
132 |
+
outline: none;
|
133 |
+
}
|
134 |
+
.premium-cta a.button:focus{
|
135 |
+
top: 1px;
|
136 |
+
}
|
137 |
+
.premium-cta a.button span{
|
138 |
+
line-height: 13px;
|
139 |
+
}
|
140 |
+
.premium-cta a.button .highlight{
|
141 |
+
display: block;
|
142 |
+
font-size: 20px;
|
143 |
+
font-weight: 700;
|
144 |
+
line-height: 20px;
|
145 |
+
}
|
146 |
+
.premium-cta .highlight{
|
147 |
+
text-transform: uppercase;
|
148 |
+
background: none;
|
149 |
+
font-weight: 800;
|
150 |
+
color: #fff;
|
151 |
+
}
|
152 |
+
|
153 |
+
@media (max-width: 768px) {
|
154 |
+
.section{margin: 0}
|
155 |
+
.premium-cta p{
|
156 |
+
width: 100%;
|
157 |
+
}
|
158 |
+
.premium-cta{
|
159 |
+
text-align: center;
|
160 |
+
}
|
161 |
+
.premium-cta a.button{
|
162 |
+
float: none;
|
163 |
+
}
|
164 |
+
.section .section-title h2{
|
165 |
+
display: block;
|
166 |
+
margin-top: 15px;
|
167 |
+
}
|
168 |
+
}
|
169 |
+
|
170 |
+
@media (max-width: 480px){
|
171 |
+
.wrap{
|
172 |
+
margin-right: 0;
|
173 |
+
}
|
174 |
+
.section{
|
175 |
+
margin: 0;
|
176 |
+
}
|
177 |
+
.landing-container .col-1,
|
178 |
+
.landing-container .col-2{
|
179 |
+
width: 100%;
|
180 |
+
padding: 0 15px;
|
181 |
+
}
|
182 |
+
.section-odd .col-1 {
|
183 |
+
float: left;
|
184 |
+
margin-right: -100%;
|
185 |
+
}
|
186 |
+
.section-odd .col-2 {
|
187 |
+
float: right;
|
188 |
+
margin-top: 100%;
|
189 |
+
}
|
190 |
+
.section-even .landing-container .col-1{
|
191 |
+
margin-bottom: 26px;
|
192 |
+
}
|
193 |
+
}
|
194 |
+
|
195 |
+
@media (max-width: 320px){
|
196 |
+
.premium-cta a.button{
|
197 |
+
padding: 9px 20px 9px 70px;
|
198 |
+
}
|
199 |
+
|
200 |
+
.section .section-title img{
|
201 |
+
display: none;
|
202 |
+
}
|
203 |
+
}
|
204 |
+
</style>
|
205 |
+
<div class="landing">
|
206 |
+
<div class="section section-cta section-odd">
|
207 |
+
<div class="landing-container">
|
208 |
+
<div class="premium-cta">
|
209 |
+
<p>
|
210 |
+
<?php echo sprintf( __('Upgrade to %1$spremium version%2$s of %1$sYITH WooCommerce Quick View%2$s to benefit from all features!','ywqa'),'<span class="highlight">','</span>' );?>
|
211 |
+
</p>
|
212 |
+
<a href="<?php echo YITH_WCQV_Admin()->get_premium_landing_uri() ?>" target="_blank" class="premium-cta-button button btn">
|
213 |
+
<span class="highlight"><?php _e('UPGRADE','yith-woocommerce-quick-view');?></span>
|
214 |
+
<span><?php _e('to the premium version','yith-woocommerce-quick-view');?></span>
|
215 |
+
</a>
|
216 |
+
</div>
|
217 |
+
</div>
|
218 |
+
</div>
|
219 |
+
<div class="section section-even clear" style="background: url(<?php echo YITH_WCQV_ASSETS_URL ?>/image/01-bg.png) no-repeat #fff; background-position: 85% 75%">
|
220 |
+
<h1><?php _e('Premium Features','yith-woocommerce-quick-view');?></h1>
|
221 |
+
<div class="landing-container">
|
222 |
+
<div class="col-1">
|
223 |
+
<img src="<?php echo YITH_WCQV_ASSETS_URL ?>/image/01.png" alt="<?php _e('Button type','yith-woocommerce-quick-view') ?>" />
|
224 |
+
</div>
|
225 |
+
<div class="col-2">
|
226 |
+
<div class="section-title">
|
227 |
+
<img src="<?php echo YITH_WCQV_ASSETS_URL ?>/image/01-icon.png" alt="Review Title"/>
|
228 |
+
<h2><?php _e('BUTTON TYPE','yith-woocommerce-quick-view');?></h2>
|
229 |
+
</div>
|
230 |
+
<p><?php echo sprintf( __('Choose between the button or a custom icon to access the %1$sQuick View%2$s: you can choose to place it after the "Add To Cart" button or inside the thumbnail of the product.','yith-woocommerce-quick-view'),'<b>','</b>' );?></p>
|
231 |
+
</div>
|
232 |
+
</div>
|
233 |
+
</div>
|
234 |
+
<div class="section section-odd clear" style="background: url(<?php echo YITH_WCQV_ASSETS_URL ?>/image/02-bg.png) no-repeat #f1f1f1; background-position: 15% 100%">
|
235 |
+
<div class="landing-container">
|
236 |
+
<div class="col-2">
|
237 |
+
<div class="section-title">
|
238 |
+
<img src="<?php echo YITH_WCQV_ASSETS_URL ?>/image/02-icon.png" alt="<?php _e('Product Navigation','yith-woocommerce-quick-view');?>" />
|
239 |
+
<h2><?php _e('Product Navigation','yith-woocommerce-quick-view'); ?> </h2>
|
240 |
+
</div>
|
241 |
+
<p><?php echo sprintf( __('The navigation in the "Quick View" allows browsing among %1$sproducts%2$s displayed in it. The navigation arrows show on mousehover the image of the next/previous product.','yith-woocommerce-quick-view'),'<b>','</b>' );?></p>
|
242 |
+
</div>
|
243 |
+
<div class="col-1">
|
244 |
+
<img src="<?php echo YITH_WCQV_ASSETS_URL ?>/image/02.png" alt="<?php _e('Product Navigation','yith-woocommerce-quick-view');?>" />
|
245 |
+
</div>
|
246 |
+
</div>
|
247 |
+
</div>
|
248 |
+
<div class="section section-even clear" style="background: url(<?php echo YITH_WCQV_ASSETS_URL ?>/image/03-bg.png) no-repeat #fff; background-position: 85% 100%">
|
249 |
+
<div class="landing-container">
|
250 |
+
<div class="col-1">
|
251 |
+
<img src="<?php echo YITH_WCQV_ASSETS_URL ?>/image/03.png" alt="Icon 03" />
|
252 |
+
</div>
|
253 |
+
<div class="col-2">
|
254 |
+
<div class="section-title">
|
255 |
+
<img src="<?php echo YITH_WCQV_ASSETS_URL ?>/image/03-icon.png" alt="<?php _e('Content to display','yith-woocommerce-quick-view') ?>" />
|
256 |
+
<h2><?php _e('Content to display','yith-woocommerce-quick-view') ?></h2>
|
257 |
+
</div>
|
258 |
+
<p><?php echo sprintf( __('The display of the product information in the "Quick View" are managed by %1$sadministrators%2$s who can decide whether to show everything or only a part of it.','yith-woocommerce-quick-view'),'<b>','</b>' );?></p>
|
259 |
+
</div>
|
260 |
+
</div>
|
261 |
+
</div>
|
262 |
+
<div class="section section-odd clear" style="background: url(<?php echo YITH_WCQV_ASSETS_URL ?>/image/07-bg.png) no-repeat #f1f1f1; background-position: 15% 100%">
|
263 |
+
<div class="landing-container">
|
264 |
+
<div class="col-2">
|
265 |
+
<div class="section-title">
|
266 |
+
<img src="<?php echo YITH_WCQV_ASSETS_URL ?>/image/07-icon.png" alt="icon 04" />
|
267 |
+
<h2><?php _e('Quick View Type','yith-woocommerce-quick-view');?> </h2>
|
268 |
+
</div>
|
269 |
+
<p><?php echo sprintf( __('Quick view has two different displaying modes: the first one opens it as a %1$smodal window%2$s, the other one opens it in the page itself with a %1$scascading effect%2$s above content page.','yith-woocommerce-quick-view'),'<b>','</b>' );?></p>
|
270 |
+
</div>
|
271 |
+
<div class="col-1">
|
272 |
+
<img src="<?php echo YITH_WCQV_ASSETS_URL ?>/image/07.png" alt="<?php _e('Quick view type','yith-woocommerce-quick-view');?>" />
|
273 |
+
</div>
|
274 |
+
</div>
|
275 |
+
</div>
|
276 |
+
<div class="section section-even clear" style="background: url(<?php echo YITH_WCQV_ASSETS_URL ?>/image/08-bg.png) no-repeat #fff; background-position: 85% 100%">
|
277 |
+
<div class="landing-container">
|
278 |
+
<div class="col-1">
|
279 |
+
<img src="<?php echo YITH_WCQV_ASSETS_URL ?>/image/08.png" alt="View details" />
|
280 |
+
</div>
|
281 |
+
<div class="col-2">
|
282 |
+
<div class="section-title">
|
283 |
+
<img src="<?php echo YITH_WCQV_ASSETS_URL ?>/image/08-icon.png" alt="Vote the review" />
|
284 |
+
<h2><?php _e('"View details" button','yith-woocommerce-quick-view');?></h2>
|
285 |
+
</div>
|
286 |
+
<p><?php echo sprintf( __('An additional button that allows users to access product detail page directly from quick view window just with a click of the mouse.','yith-woocommerce-quick-view'),'<b>','</b>' );?></p>
|
287 |
+
</div>
|
288 |
+
</div>
|
289 |
+
</div>
|
290 |
+
<div class="section section-odd clear" style="background: url(<?php echo YITH_WCQV_ASSETS_URL ?>/image/04-bg.png) no-repeat #f1f1f1; background-position: 15% 100%">
|
291 |
+
<div class="landing-container">
|
292 |
+
<div class="col-2">
|
293 |
+
<div class="section-title">
|
294 |
+
<img src="<?php echo YITH_WCQV_ASSETS_URL ?>/image/04-icon.png" alt="Number" />
|
295 |
+
<h2><?php _e('Type of product images','yith-woocommerce-quick-view');?></h2>
|
296 |
+
</div>
|
297 |
+
<p><?php echo sprintf( __('Each product can have more than one image: choose whether to hide or show them with the %1$sslider%2$s effect or in the classic %1$sWooCommerce%2$s display.','yith-woocommerce-quick-view'),'<b>','</b>' );?></p>
|
298 |
+
</div>
|
299 |
+
<div class="col-1">
|
300 |
+
<img src="<?php echo YITH_WCQV_ASSETS_URL ?>/image/04.png" alt="Icon 04" />
|
301 |
+
</div>
|
302 |
+
</div>
|
303 |
+
</div>
|
304 |
+
<div class="section section-even clear" style="background: url(<?php echo YITH_WCQV_ASSETS_URL ?>/image/05-bg.png) no-repeat #fff; background-position: 85% 100%">
|
305 |
+
<div class="landing-container">
|
306 |
+
<div class="col-1">
|
307 |
+
<img src="<?php echo YITH_WCQV_ASSETS_URL ?>/image/05.png" alt="Share" />
|
308 |
+
</div>
|
309 |
+
<div class="col-2">
|
310 |
+
<div class="section-title">
|
311 |
+
<img src="<?php echo YITH_WCQV_ASSETS_URL?>/image/05-icon.png" alt="icon 05" />
|
312 |
+
<h2><?php _e('SHARE','yith-woocommerce-quick-view');?></h2>
|
313 |
+
</div>
|
314 |
+
<p><?php echo sprintf( __('%1$sQuick View is also social-friendly!%2$s Activating this option, you will be able to share the Quick View on Facebook, Twitter, Pinterest, Google+, or sending an email.','yith-woocommerce-quick-view'),'<b>','</b>' );?></p>
|
315 |
+
</div>
|
316 |
+
</div>
|
317 |
+
</div>
|
318 |
+
<div class="section section-odd clear" style="background: url(<?php echo YITH_WCQV_ASSETS_URL ?>/image/06-bg.png) no-repeat #f1f1f1; background-position: 15% 100%">
|
319 |
+
<div class="landing-container">
|
320 |
+
<div class="col-2">
|
321 |
+
<div class="section-title">
|
322 |
+
<img src="<?php echo YITH_WCQV_ASSETS_URL ?>/image/06-icon.png" alt="Icon 06" />
|
323 |
+
<h2><?php _e('Style Options','yith-woocommerce-quick-view');?></h2>
|
324 |
+
</div>
|
325 |
+
<p><?php echo sprintf( __('A rich option panel to change the colors of the %1$s"Quick View"%2$s button and of everything that is within the modal window generated.','yith-woocommerce-quick-view'),'<b>','</b>' );?></p>
|
326 |
+
</div>
|
327 |
+
<div class="col-1">
|
328 |
+
<img src="<?php echo YITH_WCQV_ASSETS_URL ?>/image/06.png" alt="<?php _e('Style Options','yith-woocommerce-quick-view') ?>" />
|
329 |
+
</div>
|
330 |
+
</div>
|
331 |
+
</div>
|
332 |
+
<div class="section section-even clear" style="background: url(<?php echo YITH_WCQV_ASSETS_URL ?>/image/09-bg.png) no-repeat #fff; background-position: 85% 100%">
|
333 |
+
<div class="landing-container">
|
334 |
+
<div class="col-1">
|
335 |
+
<img src="<?php echo YITH_WCQV_ASSETS_URL ?>/image/09.png" alt="" />
|
336 |
+
</div>
|
337 |
+
<div class="col-2">
|
338 |
+
<div class="section-title">
|
339 |
+
<img src="<?php echo YITH_WCQV_ASSETS_URL?>/image/09-icon.png" alt="icon 09" />
|
340 |
+
<h2><?php _e('SHORTCODE','yith-woocommerce-quick-view');?></h2>
|
341 |
+
</div>
|
342 |
+
<p><?php echo sprintf( __('The shortcode of plugin is a $1$srapid$2$s and $1$seasy$2$s solution: you can add a button in any spot of the page to allow your users to see the quick view of a specific product in your store.','yith-woocommerce-quick-view'),'<b>','</b>' );?></p>
|
343 |
+
</div>
|
344 |
+
</div>
|
345 |
+
</div>
|
346 |
+
<div class="section section-odd clear" style="background: url(<?php echo YITH_WCQV_ASSETS_URL ?>/image/09-bg.png) no-repeat #f1f1f1; background-position: 15% 100%">
|
347 |
+
<div class="landing-container">
|
348 |
+
<div class="col-2">
|
349 |
+
<div class="section-title">
|
350 |
+
<img src="<?php echo YITH_WCQV_ASSETS_URL ?>/image/09-icon.png" alt="Icon 10" />
|
351 |
+
<h2><?php _e('Compatibility with other YITH\'s plugins','yith-woocommerce-quick-view');?></h2>
|
352 |
+
</div>
|
353 |
+
<p><?php echo sprintf( __('Thanks to the compatibility with %1$sYITH WooCommerce Zoom Magnifier, YITH WooCommerce Badge Management%2$s and %1$sYITH WooCommerce Wishlist%2$s, you will be free to enrich further the content of your quick view.%3$s Zoom the product image, show a badge, or add the button to open the quick view in all products available in your users\' wishlists. With YITH\'s plugins you make the difference.','yith-woocommerce-quick-view'),'<b>','</b>','<br>' );?></p>
|
354 |
+
</div>
|
355 |
+
<div class="col-1">
|
356 |
+
<img src="<?php echo YITH_WCQV_ASSETS_URL ?>/image/10.png" alt="" />
|
357 |
+
</div>
|
358 |
+
</div>
|
359 |
+
</div>
|
360 |
+
<div class="section section-cta section-odd">
|
361 |
+
<div class="landing-container">
|
362 |
+
<div class="premium-cta">
|
363 |
+
<p>
|
364 |
+
<?php echo sprintf( __('Upgrade to %1$spremium version%2$s of %1$sYITH WooCommerce Quick View%2$s to benefit from all features!','ywqa'),'<span class="highlight">','</span>' );?>
|
365 |
+
</p>
|
366 |
+
<a href="<?php echo YITH_WCQV_Admin()->get_premium_landing_uri() ?>" target="_blank" class="premium-cta-button button btn">
|
367 |
+
<span class="highlight"><?php _e('UPGRADE','yith-woocommerce-quick-view');?></span>
|
368 |
+
<span><?php _e('to the premium version','yith-woocommerce-quick-view');?></span>
|
369 |
+
</a>
|
370 |
+
</div>
|
371 |
+
</div>
|
372 |
+
</div>
|
373 |
</div>
|
templates/yith-quick-view-content.php
CHANGED
@@ -1,29 +1,29 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
* This file belongs to the YIT 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 |
-
while ( have_posts() ) : the_post(); ?>
|
12 |
-
|
13 |
-
<div class="product">
|
14 |
-
|
15 |
-
<div id="product-<?php the_ID(); ?>" <?php post_class('product'); ?>>
|
16 |
-
|
17 |
-
<?php do_action( 'yith_wcqv_product_image' ); ?>
|
18 |
-
|
19 |
-
<div class="summary entry-summary">
|
20 |
-
<div class="summary-content">
|
21 |
-
<?php do_action( 'yith_wcqv_product_summary' ); ?>
|
22 |
-
</div>
|
23 |
-
</div>
|
24 |
-
|
25 |
-
</div>
|
26 |
-
|
27 |
-
</div>
|
28 |
-
|
29 |
<?php endwhile; // end of the loop.
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* This file belongs to the YIT 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 |
+
while ( have_posts() ) : the_post(); ?>
|
12 |
+
|
13 |
+
<div class="product">
|
14 |
+
|
15 |
+
<div id="product-<?php the_ID(); ?>" <?php post_class('product'); ?>>
|
16 |
+
|
17 |
+
<?php do_action( 'yith_wcqv_product_image' ); ?>
|
18 |
+
|
19 |
+
<div class="summary entry-summary">
|
20 |
+
<div class="summary-content">
|
21 |
+
<?php do_action( 'yith_wcqv_product_summary' ); ?>
|
22 |
+
</div>
|
23 |
+
</div>
|
24 |
+
|
25 |
+
</div>
|
26 |
+
|
27 |
+
</div>
|
28 |
+
|
29 |
<?php endwhile; // end of the loop.
|
templates/yith-quick-view.php
CHANGED
@@ -1,30 +1,30 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
* This file belongs to the YIT 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 |
-
|
12 |
-
<div id="yith-quick-view-modal">
|
13 |
-
|
14 |
-
<div class="yith-quick-view-overlay"></div>
|
15 |
-
|
16 |
-
<div class="yith-wcqv-wrapper">
|
17 |
-
|
18 |
-
<div class="yith-wcqv-main">
|
19 |
-
|
20 |
-
<div class="yith-wcqv-head">
|
21 |
-
<a href="#" id="yith-quick-view-close" class="yith-wcqv-close">X</a>
|
22 |
-
</div>
|
23 |
-
|
24 |
-
<div id="yith-quick-view-content" class="woocommerce single-product"></div>
|
25 |
-
|
26 |
-
</div>
|
27 |
-
|
28 |
-
</div>
|
29 |
-
|
30 |
</div>
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* This file belongs to the YIT 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 |
+
|
12 |
+
<div id="yith-quick-view-modal">
|
13 |
+
|
14 |
+
<div class="yith-quick-view-overlay"></div>
|
15 |
+
|
16 |
+
<div class="yith-wcqv-wrapper">
|
17 |
+
|
18 |
+
<div class="yith-wcqv-main">
|
19 |
+
|
20 |
+
<div class="yith-wcqv-head">
|
21 |
+
<a href="#" id="yith-quick-view-close" class="yith-wcqv-close">X</a>
|
22 |
+
</div>
|
23 |
+
|
24 |
+
<div id="yith-quick-view-content" class="woocommerce single-product"></div>
|
25 |
+
|
26 |
+
</div>
|
27 |
+
|
28 |
+
</div>
|
29 |
+
|
30 |
</div>
|
uninstall.php
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Uninstall plugin
|
4 |
-
*
|
5 |
-
* @author Your Inspiration Themes
|
6 |
-
* @package YITH WooCommerce Quick View
|
7 |
-
* @version 1.0.0
|
8 |
-
*/
|
9 |
-
|
10 |
-
// If uninstall not called from WordPress exit
|
11 |
-
if( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
|
12 |
-
exit;
|
13 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Uninstall plugin
|
4 |
+
*
|
5 |
+
* @author Your Inspiration Themes
|
6 |
+
* @package YITH WooCommerce Quick View
|
7 |
+
* @version 1.0.0
|
8 |
+
*/
|
9 |
+
|
10 |
+
// If uninstall not called from WordPress exit
|
11 |
+
if( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
|
12 |
+
exit;
|
13 |
+
}
|
wpml-config.xml
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
-
<wpml-config>
|
2 |
-
<admin-texts>
|
3 |
-
<key name="yith-wcqv-button-label" />
|
4 |
-
</admin-texts>
|
5 |
</wpml-config>
|
1 |
+
<wpml-config>
|
2 |
+
<admin-texts>
|
3 |
+
<key name="yith-wcqv-button-label" />
|
4 |
+
</admin-texts>
|
5 |
</wpml-config>
|