Version Description
- Updated: All YITH plugins to latest version
Download this release
Release Info
Developer | yithemes |
Plugin | ![]() |
Version | 1.0.8 |
Comparing to | |
See all releases |
Code changes from version 1.0.7 to 1.0.8
- README.txt +6 -2
- init.php +1 -1
- languages/yith-jetpack.pot +41 -43
- modules/yith-woocommerce-advanced-reviews/class.yith-woocommerce-advanced-reviews.php +1639 -1637
- modules/yith-woocommerce-advanced-reviews/init.php +2 -2
- modules/yith-woocommerce-ajax-navigation/assets/css/admin.css +6 -1
- modules/yith-woocommerce-ajax-navigation/assets/js/yith-wcan-admin.js +2 -16
- modules/yith-woocommerce-ajax-navigation/includes/class.yith-wcan-admin.php +0 -28
- modules/yith-woocommerce-ajax-navigation/init.php +2 -2
- modules/yith-woocommerce-ajax-navigation/languages/yith_wc_ajxnav-it_IT.mo +0 -0
- modules/yith-woocommerce-ajax-navigation/languages/yith_wc_ajxnav-it_IT.po +37 -37
- modules/yith-woocommerce-ajax-navigation/languages/yith_wc_ajxnav-tr_TR.mo +0 -0
- modules/yith-woocommerce-ajax-navigation/languages/yith_wc_ajxnav-tr_TR.po +34 -29
- modules/yith-woocommerce-ajax-navigation/languages/yith_wc_ajxnav.pot +12 -12
- modules/yith-woocommerce-ajax-navigation/widgets/class.yith-wcan-navigation-widget.php +3 -3
- modules/yith-woocommerce-ajax-navigation/widgets/class.yith-wcan-reset-navigation-widget.php +1 -1
- modules/yith-woocommerce-catalog-mode/class.yith-woocommerce-catalog-mode.php +8 -1
- modules/yith-woocommerce-catalog-mode/init.php +4 -4
- modules/yith-woocommerce-catalog-mode/plugin-options/settings-options.php +1 -1
- modules/yith-woocommerce-colors-labels-variations/assets/js/frontend.js +2 -0
- modules/yith-woocommerce-colors-labels-variations/assets/js/frontend.min.js +1 -1
- modules/yith-woocommerce-colors-labels-variations/changelog.txt +6 -0
- modules/yith-woocommerce-colors-labels-variations/class.yith-wccl-frontend.php +36 -0
- modules/yith-woocommerce-colors-labels-variations/init.php +3 -3
- modules/yith-woocommerce-colors-labels-variations/templates/single-product/add-to-cart/variable-wccl.php +12 -1
- modules/yith-woocommerce-product-vendors/includes/class.yith-vendors-admin.php +10 -40
- modules/yith-woocommerce-product-vendors/init.php +2 -2
- modules/yith-woocommerce-quick-view/init.php +3 -3
- modules/yith-woocommerce-quick-view/templates/yith-quick-view-content.php +2 -2
- modules/yith-woocommerce-review-reminder/class.yith-woocommerce-review-reminder.php +26 -69
- modules/yith-woocommerce-review-reminder/includes/admin/class-yith-custom-table.php +48 -28
- modules/yith-woocommerce-review-reminder/init.php +86 -6
- modules/yith-woocommerce-review-reminder/plugin-options/mail-options.php +8 -13
- modules/yith-woocommerce-review-reminder/templates/admin/premium.php +52 -25
- modules/yith-woocommerce-zoom-magnifier/assets/css/frontend.css +6 -0
- modules/yith-woocommerce-zoom-magnifier/assets/images/yith-woocommerce-zoom-magnifier-video.jpg +0 -0
- modules/yith-woocommerce-zoom-magnifier/assets/js/frontend.js +1 -1
- modules/yith-woocommerce-zoom-magnifier/assets/js/yith_magnifier.js +16 -11
- modules/yith-woocommerce-zoom-magnifier/assets/js/yith_magnifier.min.js +1 -1
- modules/yith-woocommerce-zoom-magnifier/class.yith-wcmg-admin.php +163 -165
- modules/yith-woocommerce-zoom-magnifier/class.yith-wcmg-frontend.php +145 -146
- modules/yith-woocommerce-zoom-magnifier/class.yith-wcmg.php +1 -1
- modules/yith-woocommerce-zoom-magnifier/functions.yith-wcmg.php +56 -45
- modules/yith-woocommerce-zoom-magnifier/init.php +3 -3
- modules/yith-woocommerce-zoom-magnifier/languages/ywzm-it_IT.mo +0 -0
- modules/yith-woocommerce-zoom-magnifier/languages/ywzm-it_IT.po +167 -88
- modules/yith-woocommerce-zoom-magnifier/languages/ywzm.pot +70 -64
- modules/yith-woocommerce-zoom-magnifier/lib/class.yith-woocommerce-zoom-magnifier.php +1 -1
- modules/yith-woocommerce-zoom-magnifier/lib/class.yith-ywzm-custom-types.php +177 -207
- modules/yith-woocommerce-zoom-magnifier/lib/class.yith-ywzm-plugin-fw-loader.php +1 -1
- modules/yith-woocommerce-zoom-magnifier/plugin-options/general-options.php +50 -49
- modules/yith-woocommerce-zoom-magnifier/templates/admin/premium.php +13 -15
- modules/yith-woocommerce-zoom-magnifier/templates/single-product/product-thumbnails-magnifier.php +4 -0
- modules/yith-woocommerce-zoom-magnifier/yit-common/yith-panel.php +3 -9
- plugin-fw/assets/js/yit-cpt-unlimited.js +1 -1
- plugin-fw/assets/js/yit-cpt-unlimited.min.js +1 -1
- plugin-fw/lib/yit-cpt-unlimited.php +1 -1
- plugin-fw/lib/yit-video.php +12 -4
- plugin-fw/yit-functions.php +5 -0
- templates/yith-single-plugin.php +1 -1
- yith-jetpack.php +130 -11
README.txt
CHANGED
@@ -4,7 +4,7 @@ Contributors: yithemes
|
|
4 |
Tags: woocommerce,jetpack,woocommerce jetpack, essential, kit, plugins, plugin, product, e-commerce, ecommerce, commerce, shop, yith, yit, yithemes,yith woocommerce colors and labels variations, colors and labels variations,colors and labels variations jetpack,yith woocommerce zoom magnifier,zoom magnifier,zoom magnifier jetpack,yith woocommerce wishlist,wishlist,wishlist jetpack,yith woocommerce compare,compare,compare jetpack,yith woocommerce ajax product filter,ajax product filter,ajax product filter jetpack,yith woocommerce ajax search,ajax search,ajax search jetpack,yith woocommerce catalog mode,catalog mode,catalog mode jetpack,yith woocommerce order tracking,order tracking,order tracking jetpack, yith woocommerce advanced reviews,advanced reviews,advanced reviews jetpack,yith woocommerce badges management,badges management,badges management jetpack,yith woocommerce cart messages,cart messages,cart messages jetpack,yith woocommerce review reminder,review reminder,review reminder jetpack,yith woocommerce quick view,quick view,quick view jetpack,yith live chat,live chat,live chat jetpack,yith woocommerce eu vat,eu vat,eu vat jetpack,yith woocommerce mailchimp,mailchimp,mailchimp jetpack,yith woocommerce stripe,stripe, stripe jetpack,yith infinite scrolling,infinite scrolling,infinite scrolling jetpack,yith woocommerce request a quote,request a quote,request a quote jetpack,yith woocommerce waiting list,waiting list,waiting list jetpack,yith woocommerce tab manager,tab manager,tab manager jetpack,yith woocommerce multi vendor,multi vendor,multi vendor jetpack,product vendor,products vendor,products vendor jetpack, booster for woocommerce
|
5 |
Requires at least: 3.5.1
|
6 |
Tested up to: 4.2.4
|
7 |
-
Stable tag: 1.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -150,6 +150,10 @@ YITH Essential Kit for WooCommerce #1 will add a new submenu called "YITH Essent
|
|
150 |
|
151 |
== Changelog ==
|
152 |
|
|
|
|
|
|
|
|
|
153 |
= 1.0.7 =
|
154 |
|
155 |
* Updated: YITH WooCommerce Badge Mangement
|
@@ -187,5 +191,5 @@ YITH Essential Kit for WooCommerce #1 will add a new submenu called "YITH Essent
|
|
187 |
|
188 |
== Upgrade Notice ==
|
189 |
|
190 |
-
Last Stable Tag 1.0.
|
191 |
|
4 |
Tags: woocommerce,jetpack,woocommerce jetpack, essential, kit, plugins, plugin, product, e-commerce, ecommerce, commerce, shop, yith, yit, yithemes,yith woocommerce colors and labels variations, colors and labels variations,colors and labels variations jetpack,yith woocommerce zoom magnifier,zoom magnifier,zoom magnifier jetpack,yith woocommerce wishlist,wishlist,wishlist jetpack,yith woocommerce compare,compare,compare jetpack,yith woocommerce ajax product filter,ajax product filter,ajax product filter jetpack,yith woocommerce ajax search,ajax search,ajax search jetpack,yith woocommerce catalog mode,catalog mode,catalog mode jetpack,yith woocommerce order tracking,order tracking,order tracking jetpack, yith woocommerce advanced reviews,advanced reviews,advanced reviews jetpack,yith woocommerce badges management,badges management,badges management jetpack,yith woocommerce cart messages,cart messages,cart messages jetpack,yith woocommerce review reminder,review reminder,review reminder jetpack,yith woocommerce quick view,quick view,quick view jetpack,yith live chat,live chat,live chat jetpack,yith woocommerce eu vat,eu vat,eu vat jetpack,yith woocommerce mailchimp,mailchimp,mailchimp jetpack,yith woocommerce stripe,stripe, stripe jetpack,yith infinite scrolling,infinite scrolling,infinite scrolling jetpack,yith woocommerce request a quote,request a quote,request a quote jetpack,yith woocommerce waiting list,waiting list,waiting list jetpack,yith woocommerce tab manager,tab manager,tab manager jetpack,yith woocommerce multi vendor,multi vendor,multi vendor jetpack,product vendor,products vendor,products vendor jetpack, booster for woocommerce
|
5 |
Requires at least: 3.5.1
|
6 |
Tested up to: 4.2.4
|
7 |
+
Stable tag: 1.0.8
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
150 |
|
151 |
== Changelog ==
|
152 |
|
153 |
+
= 1.0.8 =
|
154 |
+
|
155 |
+
* Updated: All YITH plugins to latest version
|
156 |
+
|
157 |
= 1.0.7 =
|
158 |
|
159 |
* Updated: YITH WooCommerce Badge Mangement
|
191 |
|
192 |
== Upgrade Notice ==
|
193 |
|
194 |
+
Last Stable Tag 1.0.8
|
195 |
|
init.php
CHANGED
@@ -7,7 +7,7 @@ Text Domain: yith-jetpack
|
|
7 |
Domain Path: /languages/
|
8 |
Author: YIThemes
|
9 |
Author URI: http://yithemes.com/
|
10 |
-
Version: 1.0.
|
11 |
*/
|
12 |
|
13 |
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
Domain Path: /languages/
|
8 |
Author: YIThemes
|
9 |
Author URI: http://yithemes.com/
|
10 |
+
Version: 1.0.8
|
11 |
*/
|
12 |
|
13 |
if ( ! defined( 'ABSPATH' ) ) {
|
languages/yith-jetpack.pot
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: YIT Framework\n"
|
4 |
-
"POT-Creation-Date: 2015-
|
5 |
-
"PO-Revision-Date: 2015-
|
6 |
"Last-Translator: Giustino Borzacchiello <giustinob@gmail.com>\n"
|
7 |
"Language-Team: \n"
|
8 |
"Language: en\n"
|
@@ -19,159 +19,157 @@ msgstr ""
|
|
19 |
"X-Poedit-SearchPathExcluded-0: plugin-fw\n"
|
20 |
"X-Poedit-SearchPathExcluded-1: modules\n"
|
21 |
|
22 |
-
#: templates/yith-list-plugins.php:
|
23 |
msgid "Module <strong>activated</strong>."
|
24 |
msgstr ""
|
25 |
|
26 |
-
#: templates/yith-list-plugins.php:30
|
27 |
-
msgid "Module <strong>deactivated</strong>."
|
28 |
-
msgstr ""
|
29 |
-
|
30 |
#: templates/yith-list-plugins.php:34
|
31 |
-
msgid "
|
32 |
msgstr ""
|
33 |
|
34 |
#: templates/yith-list-plugins.php:38
|
35 |
-
msgid "Modules <strong>
|
36 |
msgstr ""
|
37 |
|
38 |
#: templates/yith-list-plugins.php:42
|
39 |
-
msgid "
|
40 |
msgstr ""
|
41 |
|
42 |
-
#: templates/yith-list-plugins.php:
|
43 |
msgid ""
|
44 |
"Here you can activate or deactive some of our plugins to enhance your e-"
|
45 |
"commerce site."
|
46 |
msgstr ""
|
47 |
|
48 |
-
#: templates/yith-list-plugins.php:
|
|
|
49 |
msgid "Activate all"
|
50 |
-
msgstr ""
|
51 |
|
52 |
-
#: templates/yith-list-plugins.php:
|
53 |
msgid "Deactivate all"
|
54 |
msgstr ""
|
55 |
|
56 |
-
#: templates/yith-list-plugins.php:
|
57 |
msgid "All"
|
58 |
msgstr ""
|
59 |
|
60 |
-
#: templates/yith-list-plugins.php:
|
61 |
msgid "Active"
|
62 |
msgstr ""
|
63 |
|
64 |
-
#: templates/yith-list-plugins.php:
|
65 |
msgid "Inactive"
|
66 |
msgstr ""
|
67 |
|
68 |
-
#: templates/yith-single-plugin.php:
|
69 |
#, fuzzy, php-format
|
70 |
msgid "By %s"
|
71 |
msgstr ""
|
72 |
"Note: Delivery and taxes are estimated%s and will be updated during checkout "
|
73 |
"based on your billing and shipping information."
|
74 |
|
75 |
-
#: templates/yith-single-plugin.php:
|
76 |
#, php-format
|
77 |
msgid "Deactivate %s now"
|
78 |
msgstr ""
|
79 |
|
80 |
-
#: templates/yith-single-plugin.php:
|
81 |
msgid "Deactivate"
|
82 |
msgstr ""
|
83 |
|
84 |
-
#: templates/yith-single-plugin.php:
|
85 |
#, php-format
|
86 |
msgid "activate %s now"
|
87 |
msgstr ""
|
88 |
|
89 |
-
#: templates/yith-single-plugin.php:
|
|
|
90 |
msgid "Activate"
|
91 |
-
msgstr ""
|
92 |
|
93 |
-
#: templates/yith-single-plugin.php:
|
94 |
#, php-format
|
95 |
msgid "More information about %s"
|
96 |
msgstr ""
|
97 |
|
98 |
-
#: templates/yith-single-plugin.php:
|
99 |
msgid "More Details"
|
100 |
msgstr ""
|
101 |
|
102 |
-
#: templates/yith-single-plugin.php:
|
103 |
msgid "Premium Installed"
|
104 |
msgstr ""
|
105 |
|
106 |
-
#: templates/yith-single-plugin.php:
|
107 |
msgid "Premium Version"
|
108 |
msgstr ""
|
109 |
|
110 |
-
#: templates/yith-single-plugin.php:
|
111 |
#, php-format
|
112 |
msgid "Premium Version of %s"
|
113 |
msgstr ""
|
114 |
|
115 |
-
#: templates/yith-single-plugin.php:
|
116 |
msgid "M j, Y @ H:i"
|
117 |
msgstr ""
|
118 |
|
119 |
-
#: templates/yith-single-plugin.php:
|
120 |
msgid "Last Updated:"
|
121 |
msgstr ""
|
122 |
|
123 |
-
#: templates/yith-single-plugin.php:
|
124 |
#, php-format
|
125 |
msgid "%s ago"
|
126 |
msgstr ""
|
127 |
|
128 |
-
#: templates/yith-single-plugin.php:
|
129 |
msgctxt "Active plugin installs"
|
130 |
msgid "1+ Million"
|
131 |
msgstr ""
|
132 |
|
133 |
-
#: templates/yith-single-plugin.php:
|
134 |
msgctxt "Downloaded"
|
135 |
msgid "1+ Million"
|
136 |
msgstr ""
|
137 |
|
138 |
-
#: templates/yith-single-plugin.php:
|
139 |
#, php-format
|
140 |
msgid "%s Download, %s Active Installs"
|
141 |
msgstr ""
|
142 |
|
143 |
-
#: yith-jetpack.php:
|
144 |
msgid "Plugins List"
|
145 |
msgstr ""
|
146 |
|
147 |
-
#: yith-jetpack.php:
|
148 |
msgid "YIT Plugins"
|
149 |
msgstr ""
|
150 |
|
151 |
-
#: yith-jetpack.php:
|
152 |
#, php-format
|
153 |
msgid ""
|
154 |
"There are new plugins available on <b>%s</b>, <a href=\"%s\">take a look at "
|
155 |
"them</a> !"
|
156 |
msgstr ""
|
157 |
|
158 |
-
#: yith-jetpack.php:
|
159 |
msgid "The module is not valid."
|
160 |
msgstr ""
|
161 |
|
162 |
-
#: yith-jetpack.php:
|
163 |
-
#: yith-jetpack.php:
|
164 |
msgid "Back to modules"
|
165 |
msgstr ""
|
166 |
|
167 |
-
#: yith-jetpack.php:
|
168 |
msgid "The module is already activated."
|
169 |
msgstr ""
|
170 |
|
171 |
-
#: yith-jetpack.php:
|
172 |
msgid "Activation of the module is not possible."
|
173 |
msgstr ""
|
174 |
|
175 |
-
#: yith-jetpack.php:
|
176 |
msgid "The module is already deactivated."
|
177 |
msgstr ""
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: YIT Framework\n"
|
4 |
+
"POT-Creation-Date: 2015-09-09 10:27+0100\n"
|
5 |
+
"PO-Revision-Date: 2015-09-09 10:27+0100\n"
|
6 |
"Last-Translator: Giustino Borzacchiello <giustinob@gmail.com>\n"
|
7 |
"Language-Team: \n"
|
8 |
"Language: en\n"
|
19 |
"X-Poedit-SearchPathExcluded-0: plugin-fw\n"
|
20 |
"X-Poedit-SearchPathExcluded-1: modules\n"
|
21 |
|
22 |
+
#: templates/yith-list-plugins.php:31
|
23 |
msgid "Module <strong>activated</strong>."
|
24 |
msgstr ""
|
25 |
|
|
|
|
|
|
|
|
|
26 |
#: templates/yith-list-plugins.php:34
|
27 |
+
msgid "Module <strong>deactivated</strong>."
|
28 |
msgstr ""
|
29 |
|
30 |
#: templates/yith-list-plugins.php:38
|
31 |
+
msgid "Modules <strong>activated</strong>."
|
32 |
msgstr ""
|
33 |
|
34 |
#: templates/yith-list-plugins.php:42
|
35 |
+
msgid "Modules <strong>deactivated</strong>."
|
36 |
msgstr ""
|
37 |
|
38 |
+
#: templates/yith-list-plugins.php:48
|
39 |
msgid ""
|
40 |
"Here you can activate or deactive some of our plugins to enhance your e-"
|
41 |
"commerce site."
|
42 |
msgstr ""
|
43 |
|
44 |
+
#: templates/yith-list-plugins.php:53
|
45 |
+
#, fuzzy
|
46 |
msgid "Activate all"
|
47 |
+
msgstr "TUTTI PARI PARI"
|
48 |
|
49 |
+
#: templates/yith-list-plugins.php:54
|
50 |
msgid "Deactivate all"
|
51 |
msgstr ""
|
52 |
|
53 |
+
#: templates/yith-list-plugins.php:63
|
54 |
msgid "All"
|
55 |
msgstr ""
|
56 |
|
57 |
+
#: templates/yith-list-plugins.php:64
|
58 |
msgid "Active"
|
59 |
msgstr ""
|
60 |
|
61 |
+
#: templates/yith-list-plugins.php:65
|
62 |
msgid "Inactive"
|
63 |
msgstr ""
|
64 |
|
65 |
+
#: templates/yith-single-plugin.php:54
|
66 |
#, fuzzy, php-format
|
67 |
msgid "By %s"
|
68 |
msgstr ""
|
69 |
"Note: Delivery and taxes are estimated%s and will be updated during checkout "
|
70 |
"based on your billing and shipping information."
|
71 |
|
72 |
+
#: templates/yith-single-plugin.php:59
|
73 |
#, php-format
|
74 |
msgid "Deactivate %s now"
|
75 |
msgstr ""
|
76 |
|
77 |
+
#: templates/yith-single-plugin.php:59
|
78 |
msgid "Deactivate"
|
79 |
msgstr ""
|
80 |
|
81 |
+
#: templates/yith-single-plugin.php:71
|
82 |
#, php-format
|
83 |
msgid "activate %s now"
|
84 |
msgstr ""
|
85 |
|
86 |
+
#: templates/yith-single-plugin.php:71
|
87 |
+
#, fuzzy
|
88 |
msgid "Activate"
|
89 |
+
msgstr "TUTTI PARI PARI"
|
90 |
|
91 |
+
#: templates/yith-single-plugin.php:78
|
92 |
#, php-format
|
93 |
msgid "More information about %s"
|
94 |
msgstr ""
|
95 |
|
96 |
+
#: templates/yith-single-plugin.php:78
|
97 |
msgid "More Details"
|
98 |
msgstr ""
|
99 |
|
100 |
+
#: templates/yith-single-plugin.php:84
|
101 |
msgid "Premium Installed"
|
102 |
msgstr ""
|
103 |
|
104 |
+
#: templates/yith-single-plugin.php:88
|
105 |
msgid "Premium Version"
|
106 |
msgstr ""
|
107 |
|
108 |
+
#: templates/yith-single-plugin.php:92
|
109 |
#, php-format
|
110 |
msgid "Premium Version of %s"
|
111 |
msgstr ""
|
112 |
|
113 |
+
#: templates/yith-single-plugin.php:95
|
114 |
msgid "M j, Y @ H:i"
|
115 |
msgstr ""
|
116 |
|
117 |
+
#: templates/yith-single-plugin.php:130
|
118 |
msgid "Last Updated:"
|
119 |
msgstr ""
|
120 |
|
121 |
+
#: templates/yith-single-plugin.php:131
|
122 |
#, php-format
|
123 |
msgid "%s ago"
|
124 |
msgstr ""
|
125 |
|
126 |
+
#: templates/yith-single-plugin.php:142
|
127 |
msgctxt "Active plugin installs"
|
128 |
msgid "1+ Million"
|
129 |
msgstr ""
|
130 |
|
131 |
+
#: templates/yith-single-plugin.php:149
|
132 |
msgctxt "Downloaded"
|
133 |
msgid "1+ Million"
|
134 |
msgstr ""
|
135 |
|
136 |
+
#: templates/yith-single-plugin.php:154
|
137 |
#, php-format
|
138 |
msgid "%s Download, %s Active Installs"
|
139 |
msgstr ""
|
140 |
|
141 |
+
#: yith-jetpack.php:100
|
142 |
msgid "Plugins List"
|
143 |
msgstr ""
|
144 |
|
145 |
+
#: yith-jetpack.php:405
|
146 |
msgid "YIT Plugins"
|
147 |
msgstr ""
|
148 |
|
149 |
+
#: yith-jetpack.php:438
|
150 |
#, php-format
|
151 |
msgid ""
|
152 |
"There are new plugins available on <b>%s</b>, <a href=\"%s\">take a look at "
|
153 |
"them</a> !"
|
154 |
msgstr ""
|
155 |
|
156 |
+
#: yith-jetpack.php:488 yith-jetpack.php:520
|
157 |
msgid "The module is not valid."
|
158 |
msgstr ""
|
159 |
|
160 |
+
#: yith-jetpack.php:488 yith-jetpack.php:493 yith-jetpack.php:497
|
161 |
+
#: yith-jetpack.php:520 yith-jetpack.php:525 yith-jetpack.php:529
|
162 |
msgid "Back to modules"
|
163 |
msgstr ""
|
164 |
|
165 |
+
#: yith-jetpack.php:493
|
166 |
msgid "The module is already activated."
|
167 |
msgstr ""
|
168 |
|
169 |
+
#: yith-jetpack.php:497 yith-jetpack.php:529
|
170 |
msgid "Activation of the module is not possible."
|
171 |
msgstr ""
|
172 |
|
173 |
+
#: yith-jetpack.php:525
|
174 |
msgid "The module is already deactivated."
|
175 |
msgstr ""
|
modules/yith-woocommerce-advanced-reviews/class.yith-woocommerce-advanced-reviews.php
CHANGED
@@ -1,1734 +1,1736 @@
|
|
1 |
<?php
|
2 |
-
if (
|
3 |
-
|
4 |
}
|
5 |
|
6 |
-
if (
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
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 |
-
|
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 |
-
|
295 |
-
|
296 |
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
|
302 |
-
|
303 |
-
|
304 |
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
|
326 |
-
|
327 |
|
328 |
-
|
329 |
-
|
330 |
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
select avg(meta_value)
|
481 |
from {$wpdb->prefix}postmeta pm
|
482 |
where meta_key = '{$this->meta_key_rating}' and post_id in
|
483 |
(select post_id from {$wpdb->prefix}postmeta where meta_key = '{$this->meta_key_product_id}' and meta_value = %d and post_id IN
|
484 |
-
(select post_id from {$wpdb->prefix}postmeta where meta_key = '{$this->meta_key_approved}' and meta_value = 1))", $product_id
|
485 |
|
486 |
-
|
487 |
|
488 |
-
|
489 |
-
|
490 |
|
491 |
-
|
492 |
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
|
497 |
-
|
498 |
|
499 |
-
|
500 |
|
501 |
-
|
502 |
|
503 |
-
|
504 |
-
|
505 |
-
<div class="star-rating" title="' . sprintf(
|
506 |
-
<span style="width:' . (
|
507 |
</div>
|
508 |
-
<span class="ywar_review_count">' . sprintf(
|
509 |
</div>';
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
|
|
|
|
777 |
|
778 |
// Set other options for Custom Post Type
|
779 |
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
// Features this CPT supports in Post Editor
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
|
810 |
// Registering your Custom Post Type
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
|
906 |
-
|
907 |
-
|
908 |
-
|
909 |
-
|
910 |
-
|
911 |
-
|
912 |
-
|
913 |
-
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
-
|
918 |
-
|
919 |
-
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
|
943 |
-
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
|
966 |
-
|
967 |
-
|
968 |
-
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
|
992 |
-
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
-
|
1002 |
-
|
1003 |
-
|
1004 |
-
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
1008 |
-
|
1009 |
-
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
1032 |
-
|
1033 |
-
|
1034 |
-
|
1035 |
-
|
1036 |
-
|
1037 |
-
|
1038 |
-
|
1039 |
-
|
1040 |
-
|
1041 |
-
|
1042 |
-
|
1043 |
-
|
1044 |
-
|
1045 |
-
|
1046 |
-
|
1047 |
-
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
1060 |
-
|
1061 |
-
|
1062 |
-
|
1063 |
-
|
1064 |
-
|
1065 |
-
|
1066 |
-
|
1067 |
-
|
1068 |
-
|
1069 |
-
|
1070 |
-
|
1071 |
-
|
1072 |
-
|
1073 |
-
|
1074 |
-
|
1075 |
-
|
1076 |
-
|
1077 |
-
|
1078 |
-
|
1079 |
-
|
1080 |
-
|
1081 |
-
|
1082 |
-
|
1083 |
-
|
1084 |
-
|
1085 |
-
|
1086 |
-
|
1087 |
-
|
1088 |
-
|
1089 |
-
|
1090 |
-
|
1091 |
-
|
1092 |
-
|
1093 |
-
|
1094 |
-
|
1095 |
-
|
1096 |
-
|
1097 |
-
|
1098 |
-
|
1099 |
-
|
1100 |
-
|
1101 |
-
|
1102 |
-
|
1103 |
-
|
1104 |
-
|
1105 |
-
|
1106 |
-
|
1107 |
-
|
1108 |
-
|
1109 |
-
|
1110 |
-
|
1111 |
-
|
1112 |
-
|
1113 |
-
|
1114 |
-
|
1115 |
-
|
1116 |
-
|
1117 |
-
|
1118 |
-
|
1119 |
-
|
1120 |
-
|
1121 |
-
|
1122 |
-
|
1123 |
-
|
1124 |
-
|
1125 |
-
|
1126 |
-
|
1127 |
-
|
1128 |
-
|
1129 |
-
|
1130 |
-
|
1131 |
-
|
1132 |
-
|
1133 |
-
|
1134 |
-
|
1135 |
-
|
1136 |
-
|
1137 |
-
|
1138 |
-
|
1139 |
-
|
1140 |
-
|
1141 |
-
|
1142 |
-
|
1143 |
-
|
1144 |
-
|
1145 |
-
|
1146 |
-
|
1147 |
-
|
1148 |
-
|
1149 |
-
|
1150 |
-
|
1151 |
-
|
1152 |
-
|
1153 |
-
|
1154 |
-
|
1155 |
-
|
1156 |
-
|
1157 |
-
|
1158 |
-
|
1159 |
-
|
1160 |
-
|
1161 |
-
|
1162 |
-
|
1163 |
-
|
1164 |
-
|
1165 |
-
|
1166 |
-
|
1167 |
-
|
1168 |
-
|
1169 |
-
|
1170 |
-
|
1171 |
-
|
1172 |
-
|
1173 |
-
|
1174 |
-
|
1175 |
-
|
1176 |
-
|
1177 |
-
|
1178 |
-
|
1179 |
-
|
1180 |
-
|
1181 |
-
|
1182 |
-
|
1183 |
-
|
1184 |
-
|
1185 |
-
|
1186 |
-
|
1187 |
-
|
1188 |
-
|
1189 |
-
<label for="rating">' . __(
|
1190 |
<select name="rating" id="rating">
|
1191 |
-
<option value="">' . __(
|
1192 |
-
<option value="5">' . __(
|
1193 |
-
<option value="4">' . __(
|
1194 |
-
<option value="3">' . __(
|
1195 |
-
<option value="2">' . __(
|
1196 |
-
<option value="1" ' . $selected . '>' . __(
|
1197 |
-
|
1198 |
-
|
1199 |
-
|
1200 |
-
|
1201 |
-
|
1202 |
-
|
1203 |
-
<label for="uploadFile" > ' . __(
|
1204 |
-
<input type = "button" value = "' . __(
|
1205 |
<input type = "file" name = "uploadFile[]" id = "uploadFile" accept = "image/*" multiple = "2" />
|
1206 |
</p>
|
1207 |
<p>
|
1208 |
<ul id = "uploadFileList" ></ul>
|
1209 |
</p> ';
|
1210 |
-
|
1211 |
-
|
1212 |
-
|
1213 |
-
|
1214 |
-
|
1215 |
-
|
1216 |
-
|
1217 |
-
|
1218 |
-
|
1219 |
-
|
1220 |
-
|
1221 |
-
|
1222 |
-
|
1223 |
-
|
1224 |
-
|
1225 |
-
|
1226 |
-
|
1227 |
-
|
1228 |
-
|
1229 |
-
|
1230 |
-
|
1231 |
-
|
1232 |
-
|
1233 |
-
|
1234 |
-
|
1235 |
-
|
1236 |
-
|
1237 |
-
|
1238 |
-
|
1239 |
-
|
1240 |
-
|
1241 |
-
|
1242 |
-
|
1243 |
-
|
1244 |
-
|
1245 |
-
|
1246 |
-
|
1247 |
-
|
1248 |
-
|
1249 |
-
|
1250 |
-
|
1251 |
-
|
1252 |
-
|
1253 |
-
|
1254 |
-
|
1255 |
-
|
1256 |
-
|
1257 |
-
|
1258 |
-
|
1259 |
-
|
1260 |
-
|
1261 |
-
|
1262 |
-
|
1263 |
-
|
1264 |
-
|
1265 |
-
|
1266 |
-
|
1267 |
-
|
1268 |
-
|
1269 |
-
|
1270 |
-
|
1271 |
-
|
1272 |
-
|
1273 |
-
|
1274 |
-
|
1275 |
-
|
1276 |
-
|
1277 |
-
|
1278 |
-
|
1279 |
-
|
1280 |
-
|
1281 |
-
|
1282 |
-
|
1283 |
-
|
1284 |
-
|
1285 |
-
|
1286 |
-
|
1287 |
-
|
1288 |
-
|
1289 |
-
|
1290 |
-
|
1291 |
-
|
1292 |
-
|
1293 |
-
|
1294 |
-
|
1295 |
-
|
1296 |
-
|
1297 |
-
|
1298 |
-
|
1299 |
-
|
1300 |
-
|
1301 |
-
|
1302 |
-
|
1303 |
-
|
1304 |
-
|
1305 |
-
|
1306 |
-
|
1307 |
-
|
1308 |
-
|
1309 |
-
|
1310 |
-
|
1311 |
-
|
1312 |
-
|
1313 |
-
|
1314 |
-
|
1315 |
-
|
1316 |
-
|
1317 |
-
|
1318 |
-
|
1319 |
-
|
1320 |
-
|
1321 |
-
|
1322 |
-
|
1323 |
-
|
1324 |
-
|
1325 |
-
|
1326 |
-
|
1327 |
-
|
1328 |
-
|
1329 |
-
|
1330 |
-
|
1331 |
-
|
1332 |
-
|
1333 |
-
|
1334 |
-
|
1335 |
-
|
1336 |
-
|
1337 |
-
|
1338 |
-
|
1339 |
-
|
1340 |
-
|
1341 |
-
|
1342 |
-
|
1343 |
-
|
1344 |
-
|
1345 |
-
|
1346 |
-
|
1347 |
-
|
1348 |
-
|
1349 |
-
|
1350 |
-
|
1351 |
-
|
1352 |
-
|
1353 |
-
|
1354 |
-
|
1355 |
-
|
1356 |
-
|
1357 |
-
|
1358 |
-
|
1359 |
-
|
1360 |
-
|
1361 |
-
|
1362 |
-
|
1363 |
-
|
1364 |
-
|
1365 |
-
|
1366 |
-
|
1367 |
-
|
1368 |
-
|
1369 |
-
|
1370 |
-
|
1371 |
-
|
1372 |
-
|
1373 |
-
|
1374 |
-
|
1375 |
-
|
1376 |
-
|
1377 |
-
|
1378 |
-
|
1379 |
-
|
1380 |
-
|
1381 |
-
|
1382 |
-
|
1383 |
-
|
1384 |
-
|
1385 |
-
|
1386 |
-
|
1387 |
-
|
1388 |
-
|
1389 |
-
|
1390 |
-
|
1391 |
-
|
1392 |
-
|
1393 |
-
|
1394 |
-
|
1395 |
-
|
1396 |
-
|
1397 |
-
|
1398 |
-
|
1399 |
-
|
1400 |
-
|
1401 |
-
|
1402 |
-
|
1403 |
-
|
1404 |
-
|
1405 |
-
|
1406 |
-
|
1407 |
-
|
1408 |
-
|
1409 |
-
|
1410 |
-
|
1411 |
-
|
1412 |
-
|
1413 |
-
|
1414 |
-
|
1415 |
-
|
1416 |
-
|
1417 |
-
|
1418 |
-
|
1419 |
-
|
1420 |
-
|
1421 |
-
|
1422 |
-
|
1423 |
-
|
1424 |
-
|
1425 |
-
|
1426 |
-
|
1427 |
|
1428 |
.add-new-h2 {
|
1429 |
display:none;
|
1430 |
}
|
1431 |
|
1432 |
</style>';
|
1433 |
-
|
1434 |
-
|
1435 |
-
|
1436 |
-
|
1437 |
-
|
1438 |
-
|
1439 |
-
|
1440 |
-
|
1441 |
-
|
1442 |
-
|
1443 |
-
|
1444 |
-
|
1445 |
-
|
1446 |
-
|
1447 |
-
|
1448 |
-
|
1449 |
-
|
1450 |
-
|
1451 |
-
|
1452 |
-
|
1453 |
-
|
1454 |
-
|
1455 |
-
|
1456 |
-
|
1457 |
-
|
1458 |
-
|
1459 |
-
|
1460 |
-
|
1461 |
-
|
1462 |
-
|
1463 |
-
|
1464 |
-
|
1465 |
-
|
1466 |
-
|
1467 |
-
|
1468 |
-
|
1469 |
-
|
1470 |
-
|
1471 |
-
|
1472 |
-
|
1473 |
-
|
1474 |
-
|
1475 |
-
|
1476 |
-
|
1477 |
-
|
1478 |
-
|
1479 |
-
|
1480 |
-
|
1481 |
-
|
1482 |
-
|
1483 |
-
|
1484 |
-
|
1485 |
-
|
1486 |
-
|
1487 |
-
|
1488 |
-
|
1489 |
-
|
1490 |
-
|
1491 |
-
|
1492 |
-
|
1493 |
-
|
1494 |
-
|
1495 |
-
|
1496 |
-
|
1497 |
-
|
1498 |
-
|
1499 |
-
|
1500 |
-
|
1501 |
-
|
1502 |
-
|
1503 |
-
|
1504 |
-
|
1505 |
-
|
1506 |
-
|
1507 |
-
|
1508 |
-
|
1509 |
-
|
1510 |
-
|
1511 |
-
|
1512 |
-
|
1513 |
-
|
1514 |
-
|
1515 |
-
|
1516 |
-
|
1517 |
-
|
1518 |
-
|
1519 |
-
|
1520 |
-
|
1521 |
-
|
1522 |
-
|
1523 |
-
|
1524 |
-
|
1525 |
-
|
1526 |
-
|
1527 |
-
|
1528 |
-
|
1529 |
-
|
1530 |
-
|
1531 |
-
|
1532 |
-
|
1533 |
-
|
1534 |
-
|
1535 |
-
|
1536 |
-
|
1537 |
-
|
1538 |
-
|
1539 |
-
|
1540 |
-
|
1541 |
-
|
1542 |
-
|
1543 |
-
|
1544 |
-
|
1545 |
-
|
1546 |
-
|
1547 |
-
|
1548 |
-
|
1549 |
-
|
1550 |
-
|
1551 |
-
|
1552 |
-
|
1553 |
-
|
1554 |
-
|
1555 |
-
|
1556 |
-
|
1557 |
-
|
1558 |
-
|
1559 |
-
|
1560 |
-
|
1561 |
-
|
1562 |
-
|
1563 |
-
|
1564 |
-
|
1565 |
-
|
1566 |
-
|
1567 |
-
|
1568 |
-
|
1569 |
-
|
1570 |
-
|
1571 |
-
|
1572 |
-
|
1573 |
-
|
1574 |
-
|
1575 |
-
|
1576 |
-
|
1577 |
-
|
1578 |
-
|
1579 |
-
|
1580 |
-
|
1581 |
-
|
1582 |
-
|
1583 |
-
|
1584 |
-
|
1585 |
-
|
1586 |
-
|
1587 |
-
|
1588 |
-
|
1589 |
-
|
1590 |
-
|
1591 |
-
|
1592 |
-
|
1593 |
-
|
1594 |
-
|
1595 |
-
|
1596 |
FROM {$wpdb->prefix}comments as co left join {$wpdb->prefix}commentmeta as cm
|
1597 |
on co.comment_ID = cm.comment_id
|
1598 |
where ((co.comment_approved = '0') or (co.comment_approved = '1')) and cm.meta_key = 'rating'";
|
1599 |
|
1600 |
-
|
1601 |
-
|
1602 |
-
|
1603 |
-
|
1604 |
-
|
1605 |
-
|
1606 |
-
|
1607 |
-
|
1608 |
-
|
1609 |
-
|
1610 |
-
|
1611 |
-
|
1612 |
-
|
1613 |
-
|
1614 |
-
|
1615 |
-
|
1616 |
-
|
1617 |
-
|
1618 |
-
|
1619 |
-
|
1620 |
-
|
1621 |
-
|
1622 |
-
|
1623 |
-
|
1624 |
-
|
1625 |
-
|
1626 |
-
|
1627 |
-
|
1628 |
-
|
1629 |
-
|
1630 |
-
|
1631 |
-
|
1632 |
-
|
1633 |
-
|
1634 |
-
|
1635 |
-
|
1636 |
-
|
1637 |
-
|
1638 |
-
|
1639 |
-
|
1640 |
-
|
1641 |
-
|
1642 |
-
|
1643 |
-
|
1644 |
-
|
1645 |
-
|
1646 |
-
|
1647 |
-
|
1648 |
-
|
1649 |
-
|
1650 |
-
|
1651 |
-
|
1652 |
-
|
1653 |
-
|
1654 |
-
|
1655 |
-
|
1656 |
-
|
1657 |
-
|
1658 |
-
|
1659 |
-
|
1660 |
-
|
1661 |
-
|
1662 |
-
|
1663 |
-
|
1664 |
-
|
1665 |
-
|
1666 |
-
|
1667 |
-
|
1668 |
-
|
1669 |
-
|
1670 |
-
|
1671 |
-
|
1672 |
-
|
1673 |
-
|
1674 |
-
|
1675 |
-
|
1676 |
-
|
1677 |
-
|
1678 |
-
|
1679 |
-
|
1680 |
-
|
1681 |
-
|
1682 |
-
|
1683 |
-
|
1684 |
-
|
1685 |
-
|
1686 |
-
|
1687 |
-
|
1688 |
-
|
1689 |
-
|
1690 |
-
|
1691 |
-
|
1692 |
-
|
1693 |
-
|
1694 |
-
|
1695 |
-
|
1696 |
-
|
1697 |
-
|
1698 |
-
|
1699 |
-
|
1700 |
-
|
1701 |
-
|
1702 |
-
|
1703 |
-
|
1704 |
-
|
1705 |
-
|
1706 |
-
|
1707 |
-
|
1708 |
-
|
1709 |
-
|
1710 |
-
|
1711 |
-
|
1712 |
-
|
1713 |
-
|
1714 |
-
|
1715 |
-
|
1716 |
-
|
1717 |
-
|
1718 |
-
|
1719 |
-
|
1720 |
-
|
1721 |
-
|
1722 |
-
|
1723 |
-
|
1724 |
-
|
1725 |
-
|
1726 |
-
|
1727 |
-
|
1728 |
-
|
1729 |
-
|
1730 |
-
|
1731 |
-
|
1732 |
-
|
1733 |
-
|
1734 |
}
|
1 |
<?php
|
2 |
+
if (!defined('ABSPATH')) {
|
3 |
+
exit; // Exit if accessed directly
|
4 |
}
|
5 |
|
6 |
+
if (!class_exists('YITH_WooCommerce_Advanced_Reviews')) {
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Implements features of FREE version of YWAR plugin
|
10 |
+
*
|
11 |
+
* @class YITH_WooCommerce_Advanced_Reviews
|
12 |
+
* @package Yithemes
|
13 |
+
* @since 1.0.0
|
14 |
+
* @author Your Inspiration Themes
|
15 |
+
*/
|
16 |
+
class YITH_WooCommerce_Advanced_Reviews {
|
17 |
+
/**
|
18 |
+
* @var $_panel Panel Object
|
19 |
+
*/
|
20 |
+
protected $_panel;
|
21 |
+
|
22 |
+
/**
|
23 |
+
* @var $_premium string Premium tab template file name
|
24 |
+
*/
|
25 |
+
protected $_premium = 'premium.php';
|
26 |
+
|
27 |
+
/**
|
28 |
+
* @var string Premium version landing link
|
29 |
+
*/
|
30 |
+
protected $_premium_landing = 'http://yithemes.com/themes/plugins/yith-woocommerce-advanced-reviews/';
|
31 |
+
|
32 |
+
/**
|
33 |
+
* @var string Plugin official documentation
|
34 |
+
*/
|
35 |
+
protected $_official_documentation = 'http://yithemes.com/docs-plugins/yith-woocommerce-advanced-reviews/';
|
36 |
+
|
37 |
+
/**
|
38 |
+
* @var string Advanced Reviews panel page
|
39 |
+
*/
|
40 |
+
protected $_panel_page = 'yith_ywar_panel';
|
41 |
+
|
42 |
+
/**
|
43 |
+
* @var $enable_title Let users to add a title when writing a review
|
44 |
+
*/
|
45 |
+
protected $enable_title = 0;
|
46 |
+
|
47 |
+
/**
|
48 |
+
* @var $enable_attachments Let users to add attachments when submit a review
|
49 |
+
*/
|
50 |
+
protected $enable_attachments = 0;
|
51 |
+
|
52 |
+
/**
|
53 |
+
* @var $attachments_limit Set the maximum number of attachments a users can add when submit a review
|
54 |
+
*/
|
55 |
+
protected $attachments_limit = 0;
|
56 |
+
|
57 |
+
public $post_type_name = "ywar_reviews";
|
58 |
+
|
59 |
+
public $items_for_page = 10;
|
60 |
+
|
61 |
+
public $meta_key_rating = "_ywar_rating";
|
62 |
+
public $meta_key_product_id = "_ywar_product_id";
|
63 |
+
public $meta_key_imported = "_ywar_imported";
|
64 |
+
public $meta_key_approved = "_ywar_approved";
|
65 |
+
public $meta_key_thumb_ids = "_ywar_thumb_ids";
|
66 |
+
public $meta_key_comment_id = "_ywar_comment_id";
|
67 |
+
|
68 |
+
/**
|
69 |
+
* @var string meta_key used for saving data about segnalation of inappropriate content from users
|
70 |
+
*/
|
71 |
+
public $meta_key_inappropriate_list = "_ywar_inappropriate_list";
|
72 |
+
|
73 |
+
/**
|
74 |
+
* @var string meta_key used for saving data about inappropriate reviews
|
75 |
+
*/
|
76 |
+
public $meta_key_inappropriate_count = "_ywar_inappropriate_count";
|
77 |
+
|
78 |
+
/**
|
79 |
+
* @var string meta_key used for saving data about inappropriate reviews
|
80 |
+
*/
|
81 |
+
public $meta_key_featured = "_ywar_featured";
|
82 |
+
|
83 |
+
/**
|
84 |
+
* @var string meta_key used for saving data about upvotes
|
85 |
+
*/
|
86 |
+
public $meta_key_upvotes_count = "_ywar_upvotes_count";
|
87 |
+
|
88 |
+
/**
|
89 |
+
* @var string meta_key used for saving data about downvotes
|
90 |
+
*/
|
91 |
+
public $meta_key_downvotes_count = "_ywar_downvotes_count";
|
92 |
+
|
93 |
+
/**
|
94 |
+
* @var string meta_key used for saving data about reviews votes
|
95 |
+
*/
|
96 |
+
public $meta_key_votes = "_ywar_votes";
|
97 |
+
|
98 |
+
/**
|
99 |
+
* @var string meta_key used for saving data about replies status
|
100 |
+
*/
|
101 |
+
public $meta_key_stop_reply = "_ywar_stop_reply";
|
102 |
+
|
103 |
+
/**
|
104 |
+
* @var string meta_key used for saving review's user id
|
105 |
+
*/
|
106 |
+
public $meta_key_review_user_id = "_ywar_review_user_id";
|
107 |
+
|
108 |
+
/**
|
109 |
+
* @var string meta_key used for saving review's author
|
110 |
+
*/
|
111 |
+
public $meta_key_review_author = "_ywar_review_author";
|
112 |
+
|
113 |
+
/**
|
114 |
+
* @var string meta_key used for saving review author's email
|
115 |
+
*/
|
116 |
+
public $meta_key_review_author_email = "_ywar_review_author_email";
|
117 |
+
|
118 |
+
/**
|
119 |
+
* @var string meta_key used for saving review author's url
|
120 |
+
*/
|
121 |
+
public $meta_key_review_author_url = "_ywar_review_author_url";
|
122 |
+
|
123 |
+
/**
|
124 |
+
* @var string meta_key used for saving review author's IP
|
125 |
+
*/
|
126 |
+
public $meta_key_review_author_IP = "_ywar_review_author_IP";
|
127 |
+
|
128 |
+
public $custom_column_review = "review-text";
|
129 |
|
130 |
+
public $custom_column_rating = "review-rating";
|
131 |
|
132 |
+
public $custom_column_date = "review-date";
|
133 |
|
134 |
+
public $custom_column_author = "review-author";
|
135 |
|
136 |
+
public $custom_column_product = "product";
|
137 |
|
138 |
+
/**
|
139 |
+
* @var string action name for "approve" review
|
140 |
+
*/
|
141 |
+
protected $approve_review_action = "approve-review";
|
142 |
|
143 |
+
/**
|
144 |
+
* @var string action name for "untrash" review
|
145 |
+
*/
|
146 |
+
protected $untrash_review_action = "untrash";
|
147 |
|
148 |
+
/**
|
149 |
+
* @var string action name for "unapprove" review
|
150 |
+
*/
|
151 |
+
protected $unapprove_review_action = "unapprove-review";
|
152 |
|
153 |
+
/**
|
154 |
+
* Single instance of the class
|
155 |
+
*
|
156 |
+
* @since 1.0.0
|
157 |
+
*/
|
158 |
+
protected static $instance;
|
159 |
|
160 |
+
/**
|
161 |
+
* Returns single instance of the class
|
162 |
+
*
|
163 |
+
* @since 1.0.0
|
164 |
+
*/
|
165 |
+
public static function get_instance() {
|
166 |
+
if (is_null(self::$instance)) {
|
167 |
+
self::$instance = new self();
|
168 |
+
}
|
169 |
|
170 |
+
return self::$instance;
|
171 |
+
}
|
172 |
|
173 |
+
/**
|
174 |
+
* Constructor
|
175 |
+
*
|
176 |
+
* Initialize plugin and registers actions and filters to be used
|
177 |
+
*
|
178 |
+
* @since 1.0
|
179 |
+
* @author Lorenzo Giuffrida
|
180 |
+
*/
|
181 |
+
protected function __construct() {
|
182 |
+
if (!function_exists('WC')) {
|
183 |
+
return;
|
184 |
+
}
|
185 |
|
186 |
+
add_action('admin_menu', array($this, 'add_menu_item'));
|
187 |
|
188 |
+
add_action('init', array($this, 'initialize_settings'));
|
189 |
|
190 |
+
//region ******* YIT Plugin Framework *********
|
191 |
|
192 |
+
// Load Plugin Framework
|
193 |
+
add_action('after_setup_theme', array($this, 'plugin_fw_loader'), 1);
|
194 |
|
195 |
|
196 |
+
// Add row meta
|
197 |
+
add_filter('plugin_row_meta', array($this, 'plugin_row_meta'), 10, 4);
|
198 |
|
199 |
+
// Add stylesheets and scripts files
|
200 |
+
add_action('admin_menu', array($this, 'register_panel'), 5);
|
201 |
|
202 |
+
// register plugin pointer
|
203 |
+
add_action('admin_init', array($this, 'register_pointer'));
|
204 |
|
205 |
+
// verify import reviews action request
|
206 |
+
add_action("admin_init", array($this, "check_import_actions"));
|
207 |
|
208 |
|
209 |
+
//Add action links
|
210 |
+
add_filter('plugin_action_links_' . plugin_basename(YITH_YWAR_DIR . '/' . basename(YITH_YWAR_FILE)), array(
|
211 |
+
$this,
|
212 |
+
'action_links'
|
213 |
+
));
|
214 |
|
215 |
+
add_action('yith_advanced_reviews_premium', array($this, 'premium_tab'));
|
216 |
|
217 |
+
//endregion
|
218 |
|
219 |
+
//region *********** Add stylesheets and scripts files ************
|
220 |
|
221 |
+
add_action('wp_enqueue_scripts', array($this, 'enqueue_scripts'));
|
222 |
+
add_action('wp_enqueue_scripts', array($this, 'enqueue_styles'));
|
223 |
+
add_action('admin_enqueue_scripts', array($this, 'enqueue_admin_styles_scripts'));
|
224 |
|
225 |
+
//endregion
|
226 |
|
227 |
+
//region *********** Advanced reviews post type functionalities
|
228 |
|
229 |
+
add_action('init', array($this, 'register_post_type'));
|
230 |
|
231 |
|
232 |
+
//endregion
|
233 |
|
234 |
+
//region *********** Review table
|
235 |
|
236 |
+
add_filter('yith_advanced_reviews_row_actions', array($this, 'add_review_actions'), 10, 2);
|
237 |
|
238 |
+
add_filter('post_class', array($this, 'add_review_table_class'), 10, 3);
|
239 |
|
240 |
+
/**
|
241 |
+
* intercept approve and unapprove actions
|
242 |
+
*/
|
243 |
+
add_action("admin_action_{$this->approve_review_action}", array($this, 'update_review_attributes'));
|
244 |
+
add_action("admin_action_{$this->unapprove_review_action}", array($this, 'update_review_attributes'));
|
245 |
+
add_action("admin_action_{$this->untrash_review_action}", array($this, 'update_review_attributes'));
|
246 |
|
247 |
+
//endregion ******************************************
|
248 |
|
249 |
+
// Load reviews template
|
250 |
+
add_filter('comments_template', array(
|
251 |
+
$this,
|
252 |
+
'show_advanced_reviews_template'
|
253 |
+
), 99);
|
254 |
|
255 |
+
// Save additional comment fields on comment submit
|
256 |
+
add_action('comment_post', array($this, 'submit_review'));
|
257 |
|
258 |
+
// redirect to product page on comment submitted
|
259 |
+
add_filter('comment_post_redirect', array($this, 'redirect_after_submit_review'), 10, 2);
|
260 |
|
261 |
+
add_filter('woocommerce_product_review_comment_form_args', array(
|
262 |
+
$this,
|
263 |
+
'add_fields_to_comment_form'
|
264 |
+
));
|
265 |
|
266 |
+
// Add custom fields "Title" on top of comment form
|
267 |
+
add_action('comment_form_logged_in_after', array($this, 'add_custom_fields_on_comment_form'));
|
268 |
+
add_action('comment_form_after_fields', array($this, 'add_custom_fields_on_comment_form'));
|
269 |
|
270 |
+
add_filter('yith_advanced_reviews_review_content', array($this, 'show_expanded_review_content'));
|
271 |
|
272 |
+
add_filter('woocommerce_product_tabs', array($this, 'update_tab_reviews_count'), 20);
|
273 |
|
274 |
+
/**
|
275 |
+
* Add summary bars for product rating
|
276 |
+
*/
|
277 |
+
add_action('yith_advanced_reviews_before_reviews', array($this, 'load_reviews_summary'));
|
278 |
|
279 |
+
// Show details with average rating for the current product
|
280 |
+
add_action('ywar_summary_prepend', array($this, 'add_reviews_average_info'));
|
281 |
|
282 |
+
add_filter('wc_get_template', array($this, 'wc_get_template'), 99, 5);
|
283 |
|
284 |
+
add_filter('woocommerce_product_get_rating_html', array($this, 'get_product_rating_html'), 99, 2);
|
285 |
|
286 |
+
//region ***************** Show, edit and save back-end review metabox
|
287 |
+
// Add a new metabox for editing and saving title comment in meta_comment table
|
288 |
+
add_action('add_meta_boxes', array($this, 'add_plugin_metabox'), 1);
|
289 |
|
290 |
+
// save the custom fields
|
291 |
+
add_action('save_post', array($this, 'save_plugin_metabox'), 1, 2);
|
292 |
|
293 |
+
add_action('admin_menu', array($this, 'remove_unwanted_custom_post_type_features'), 5);
|
294 |
+
add_action('admin_head', array($this, 'hide_unwanted_custom_post_type_features'));
|
295 |
+
//endregion
|
296 |
|
297 |
+
add_action('woocommerce_admin_field_ywar_import_previous_reviews', array(
|
298 |
+
$this,
|
299 |
+
'show_import_reviews_button'
|
300 |
+
), 10, 1);
|
301 |
|
302 |
+
add_action('wp_ajax_convert_reviews', array($this, 'convert_reviews_callback'));
|
303 |
+
}
|
304 |
|
305 |
+
/**
|
306 |
+
* Add the Commissions menu item in dashboard menu
|
307 |
+
*
|
308 |
+
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
309 |
+
* @since 1.0
|
310 |
+
* @return void
|
311 |
+
* @see wp-admin\includes\plugin.php -> add_menu_page()
|
312 |
+
*/
|
313 |
+
public function add_menu_item() {
|
314 |
|
315 |
+
$args = apply_filters('yith_wc_product_vendors_commissions_menu_items', array(
|
316 |
+
'page_title' => __('Reviews', 'ywar'),
|
317 |
+
'menu_title' => __('Reviews', 'ywar'),
|
318 |
+
'capability' => 'edit_products',
|
319 |
+
'menu_slug' => __('Reviews', 'ywar'),
|
320 |
+
'function' => array($this, 'show_reviews_table'),
|
321 |
+
'icon' => 'dashicons-star-filled',
|
322 |
+
'position' => 8 /* After WC Products */
|
323 |
+
)
|
324 |
+
);
|
325 |
|
326 |
+
extract($args);
|
327 |
|
328 |
+
add_menu_page($page_title, $menu_title, $capability, $menu_slug, $function, $icon, $position);
|
329 |
+
}
|
330 |
|
331 |
+
/**
|
332 |
+
* Show the reviews table
|
333 |
+
*
|
334 |
+
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
335 |
+
* @since 1.0
|
336 |
+
* @return void
|
337 |
+
* @fire yith_vendors_commissions_template hooks
|
338 |
+
*/
|
339 |
+
public function show_reviews_table() {
|
340 |
+
if (!class_exists('WP_Posts_List_Table')) {
|
341 |
+
require_once(ABSPATH . 'wp-admin/includes/class-wp-posts-list-table.php');
|
342 |
+
}
|
343 |
+
|
344 |
+
require_once(YITH_YWAR_DIR . 'lib/class.yith-advanced-reviews-list-table.php');
|
345 |
+
|
346 |
+
$product_reviews = new YITH_Advanced_Reviews_List_Table();
|
347 |
+
$product_reviews->prepare_items();
|
348 |
+
|
349 |
+
wc_get_template('ywar-product-reviews-table.php', array('product_reviews' => $product_reviews), YITH_YWAR_TEMPLATES_DIR, YITH_YWAR_TEMPLATES_DIR);
|
350 |
+
}
|
351 |
+
|
352 |
+
/**
|
353 |
+
* Intercept review action url and do the requested job
|
354 |
+
*/
|
355 |
+
public function update_review_attributes() {
|
356 |
+
|
357 |
+
if (!isset($_GET["review_id"])) {
|
358 |
+
return;
|
359 |
+
}
|
360 |
+
|
361 |
+
$review_id = $_GET["review_id"];
|
362 |
+
|
363 |
+
$current_filter = current_filter();
|
364 |
+
|
365 |
+
switch ($current_filter) {
|
366 |
+
case "admin_action_{$this->approve_review_action}" :
|
367 |
+
update_post_meta($review_id, $this->meta_key_approved, 1);
|
368 |
+
|
369 |
+
break;
|
370 |
+
|
371 |
+
case "admin_action_{$this->unapprove_review_action}" :
|
372 |
+
update_post_meta($review_id, $this->meta_key_approved, 0);
|
373 |
+
|
374 |
+
break;
|
375 |
+
|
376 |
+
case "admin_action_{$this->untrash_review_action}" :
|
377 |
+
$my_post = array(
|
378 |
+
'ID' => $review_id,
|
379 |
+
'post_status' => 'publish'
|
380 |
+
);
|
381 |
+
|
382 |
+
// Update the post into the database
|
383 |
+
wp_update_post($my_post);
|
384 |
+
|
385 |
+
break;
|
386 |
+
}
|
387 |
+
|
388 |
+
wp_redirect(esc_url_raw(remove_query_arg(array('action', 'action2'), $_SERVER['HTTP_REFERER'])));
|
389 |
+
}
|
390 |
+
|
391 |
+
public function add_review_table_class($classes, $class, $post_id) {
|
392 |
+
|
393 |
+
if ($this->post_type_name != get_post_type($post_id)) {
|
394 |
+
return $classes;
|
395 |
+
}
|
396 |
+
|
397 |
+
unset($classes["review-unapproved"]);
|
398 |
+
unset($classes["review-approved"]);
|
399 |
+
|
400 |
+
$approve = get_post_meta($post_id, $this->meta_key_approved, true);
|
401 |
+
|
402 |
+
if (1 == $approve) {
|
403 |
+
$classes[] = "review-approved";
|
404 |
+
} elseif (0 == $approve) {
|
405 |
+
$classes[] = "review-unapproved";
|
406 |
+
}
|
407 |
+
|
408 |
+
return apply_filters('yith_advanced_reviews_table_class', $classes, $post_id);
|
409 |
+
}
|
410 |
+
|
411 |
+
/**
|
412 |
+
* Build a url to be using as action url in row actions
|
413 |
+
*
|
414 |
+
* @param $action action to be performed
|
415 |
+
* @param $post_id review id
|
416 |
+
*
|
417 |
+
* @return string|void the url used to send an "approve" action for a specific review
|
418 |
+
*/
|
419 |
+
public function review_action_url($action, $post_id) {
|
420 |
+
return admin_url("admin.php?action=$action&post_type={$this->post_type_name}&review_id=$post_id");
|
421 |
+
}
|
422 |
+
|
423 |
+
/**
|
424 |
+
* Build an "untrash" action url
|
425 |
+
*
|
426 |
+
* @param $review the review on which the action is performed
|
427 |
+
*
|
428 |
+
* @return string|void action url
|
429 |
+
*/
|
430 |
+
public function untrash_review_url($review) {
|
431 |
+
return $this->review_action_url($this->untrash_review_action, $review->ID);
|
432 |
+
}
|
433 |
+
|
434 |
+
/**
|
435 |
+
* Build an "approve" action url
|
436 |
+
*
|
437 |
+
* @param $review the review on which the action is performed
|
438 |
+
*
|
439 |
+
* @return string|void action url
|
440 |
+
*/
|
441 |
+
public function approve_review_url($review) {
|
442 |
+
return $this->review_action_url($this->approve_review_action, $review->ID);
|
443 |
+
}
|
444 |
+
|
445 |
+
/**
|
446 |
+
* Build an "unapprove" action url
|
447 |
+
*
|
448 |
+
* @param $review the review on which the action is performed
|
449 |
+
*
|
450 |
+
* @return string|void action url
|
451 |
+
*/
|
452 |
+
public function unapprove_review_url($review) {
|
453 |
+
return $this->review_action_url($this->unapprove_review_action, $review->ID);
|
454 |
+
}
|
455 |
+
|
456 |
+
public function add_review_actions($actions, $post) {
|
457 |
+
|
458 |
+
if ($post->post_type != $this->post_type_name) {
|
459 |
+
return $actions;
|
460 |
+
}
|
461 |
+
|
462 |
+
$approved = get_post_meta($post->ID, $this->meta_key_approved, true);
|
463 |
+
|
464 |
+
unset($actions['view']);
|
465 |
+
unset($actions['inline hide-if-no-js']);
|
466 |
+
|
467 |
+
if (!$approved) {
|
468 |
+
$actions['approve-review'] = '<a href="' . $this->approve_review_url($post) . '" title="' . esc_attr(__('Approve review', 'ywar')) . '" rel="permalink">' . __('Approve', 'ywar') . '</a>';
|
469 |
+
} elseif ($approved) {
|
470 |
+
$actions['unapprove-review'] = '<a href="' . $this->unapprove_review_url($post) . '" title="' . esc_attr(__('Unapprove review', 'ywar')) . '" rel="permalink">' . __('Unapprove', 'ywar') . '</a>';
|
471 |
+
}
|
472 |
+
|
473 |
+
return apply_filters('yith_advanced_reviews_review_actions', $actions, $post);
|
474 |
+
}
|
475 |
+
|
476 |
+
public function get_average_rating($product_id) {
|
477 |
+
global $wpdb;
|
478 |
+
|
479 |
+
$query = $wpdb->prepare("
|
480 |
select avg(meta_value)
|
481 |
from {$wpdb->prefix}postmeta pm
|
482 |
where meta_key = '{$this->meta_key_rating}' and post_id in
|
483 |
(select post_id from {$wpdb->prefix}postmeta where meta_key = '{$this->meta_key_product_id}' and meta_value = %d and post_id IN
|
484 |
+
(select post_id from {$wpdb->prefix}postmeta where meta_key = '{$this->meta_key_approved}' and meta_value = 1))", $product_id);
|
485 |
|
486 |
+
$count = $wpdb->get_var($query);
|
487 |
|
488 |
+
return number_format($count, 2);
|
489 |
+
}
|
490 |
|
491 |
+
public function add_reviews_average_info($product) {
|
492 |
|
493 |
+
if (get_option('woocommerce_enable_review_rating') === 'no') {
|
494 |
+
return;
|
495 |
+
}
|
496 |
|
497 |
+
global $product;
|
498 |
|
499 |
+
$average = $this->get_average_rating($product->id);
|
500 |
|
501 |
+
$count = count($this->get_product_reviews_by_rating($product->id));
|
502 |
|
503 |
+
if ($count > 0) {
|
504 |
+
echo '<div class="woocommerce-product-rating">
|
505 |
+
<div class="star-rating" title="' . sprintf(__('Rated %s out of 5', 'ywar'), $average) . '">
|
506 |
+
<span style="width:' . (($average / 5) * 100) . '%"></span>
|
507 |
</div>
|
508 |
+
<span class="ywar_review_count">' . sprintf("%d %s", $count, _n(" review", " reviews", $count, 'ywar')) . '</span><span class="review-rating-value"> ' . esc_html($average) . ' ' . __("out of 5 stars", 'ywar') . '</span>
|
509 |
</div>';
|
510 |
+
}
|
511 |
+
}
|
512 |
+
|
513 |
+
//region *********** YIT Plugin Framework ****************
|
514 |
+
|
515 |
+
|
516 |
+
/**
|
517 |
+
* Enqueue css file
|
518 |
+
*
|
519 |
+
* @since 1.0
|
520 |
+
* @access public
|
521 |
+
* @return void
|
522 |
+
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
523 |
+
*/
|
524 |
+
public function plugin_fw_loader() {
|
525 |
+
if (!defined('YIT') || !defined('YIT_CORE_PLUGIN')) {
|
526 |
+
require_once('plugin-fw/yit-plugin.php');
|
527 |
+
}
|
528 |
+
}
|
529 |
+
|
530 |
+
/**
|
531 |
+
* plugin_row_meta
|
532 |
+
*
|
533 |
+
* add the action links to plugin admin page
|
534 |
+
*
|
535 |
+
* @param $plugin_meta
|
536 |
+
* @param $plugin_file
|
537 |
+
* @param $plugin_data
|
538 |
+
* @param $status
|
539 |
+
*
|
540 |
+
* @return Array
|
541 |
+
* @since 1.0
|
542 |
+
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
543 |
+
* @use plugin_row_meta
|
544 |
+
*/
|
545 |
+
public function plugin_row_meta($plugin_meta, $plugin_file, $plugin_data, $status) {
|
546 |
+
if ((defined('YITH_YWAR_INIT') && (YITH_YWAR_INIT == $plugin_file)) ||
|
547 |
+
(defined('YITH_YWAR_FREE_INIT') && (YITH_YWAR_FREE_INIT == $plugin_file))
|
548 |
+
) {
|
549 |
+
$plugin_meta[] = '<a href="' . $this->_official_documentation . '" target="_blank">' . __('Plugin Documentation', 'ywar') . '</a>';
|
550 |
+
}
|
551 |
+
|
552 |
+
return $plugin_meta;
|
553 |
+
}
|
554 |
+
|
555 |
+
/**
|
556 |
+
* Action Links
|
557 |
+
*
|
558 |
+
* add the action links to plugin admin page
|
559 |
+
*
|
560 |
+
* @param $links | links plugin array
|
561 |
+
*
|
562 |
+
* @return mixed Array
|
563 |
+
* @since 1.0
|
564 |
+
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
565 |
+
* @return mixed
|
566 |
+
* @use plugin_action_links_{$plugin_file_name}
|
567 |
+
*/
|
568 |
+
public function action_links($links) {
|
569 |
+
|