YITH WooCommerce Zoom Magnifier - Version 1.3.17

Version Description

Download this release

Release Info

Developer yithemes
Plugin Icon 128x128 YITH WooCommerce Zoom Magnifier
Version 1.3.17
Comparing to
See all releases

Code changes from version 1.3.16 to 1.3.17

Files changed (54) hide show
  1. README.txt +7 -2
  2. assets/css/frontend.css +63 -31
  3. assets/js/yith_magnifier.js +946 -853
  4. assets/js/yith_magnifier.min.js +1 -1
  5. assets/js/ywzm_frontend.js +212 -8
  6. assets/js/ywzm_frontend.min.js +1 -1
  7. class.yith-wcmg-frontend.php +32 -31
  8. init.php +6 -4
  9. plugin-fw/.gitignore +15 -0
  10. plugin-fw/.jshintrc +26 -0
  11. plugin-fw/assets/css/admin.css +111 -97
  12. plugin-fw/assets/css/yit-plugin-panel.css +154 -16
  13. plugin-fw/assets/css/yith-fields.css +367 -153
  14. plugin-fw/assets/js/yit-plugin-panel.js +39 -4
  15. plugin-fw/assets/js/yit-plugin-panel.min.js +1 -1
  16. plugin-fw/assets/js/yith-colorpicker.min.js +1 -1
  17. plugin-fw/assets/js/yith-fields.js +82 -13
  18. plugin-fw/assets/js/yith-fields.min.js +1 -1
  19. plugin-fw/assets/js/yith-gutenberg.js +1 -0
  20. plugin-fw/assets/js/yith-gutenberg.min.js +1 -1
  21. plugin-fw/assets/js/yith-system-info.js +17 -11
  22. plugin-fw/assets/js/yith-system-info.min.js +1 -1
  23. plugin-fw/init.php +2 -2
  24. plugin-fw/languages/yith-plugin-fw-el.mo +0 -0
  25. plugin-fw/languages/yith-plugin-fw-el.po +236 -135
  26. plugin-fw/languages/yith-plugin-fw-es_ES.mo +0 -0
  27. plugin-fw/languages/yith-plugin-fw-es_ES.po +242 -138
  28. plugin-fw/languages/yith-plugin-fw-it_IT.mo +0 -0
  29. plugin-fw/languages/yith-plugin-fw-it_IT.po +235 -142
  30. plugin-fw/languages/yith-plugin-fw-nl_NL.mo +0 -0
  31. plugin-fw/languages/yith-plugin-fw-nl_NL.po +241 -135
  32. plugin-fw/languages/yith-plugin-fw.pot +194 -108
  33. plugin-fw/lib/privacy/yit-privacy.php +2 -2
  34. plugin-fw/lib/yit-assets.php +105 -91
  35. plugin-fw/lib/yit-plugin-panel-wc.php +109 -35
  36. plugin-fw/lib/yit-plugin-panel.php +1354 -1307
  37. plugin-fw/lib/yith-system-status.php +286 -78
  38. plugin-fw/package.json +2 -2
  39. plugin-fw/templates/fields/dimensions.php +123 -0
  40. plugin-fw/templates/fields/inline-fields.php +60 -0
  41. plugin-fw/templates/fields/onoff.php +3 -3
  42. plugin-fw/templates/fields/radio.php +1 -1
  43. plugin-fw/templates/fields/select-images.php +7 -6
  44. plugin-fw/templates/fields/textarea-editor.php +3 -1
  45. plugin-fw/templates/fields/toggle-element-fixed.php +11 -3
  46. plugin-fw/templates/fields/toggle-element.php +6 -1
  47. plugin-fw/templates/fields/upload.php +1 -1
  48. plugin-fw/templates/metaboxes/tab.php +5 -5
  49. plugin-fw/templates/panel/woocommerce/woocommerce-form.php +4 -2
  50. plugin-fw/templates/sysinfo/system-information-panel.php +147 -169
  51. plugin-fw/yit-functions.php +65 -13
  52. plugin-options/premium-options.php +2 -2
  53. templates/single-product/product-image-magnifier.php +6 -2
  54. templates/single-product/product-thumbnails-magnifier.php +45 -35
README.txt CHANGED
@@ -3,8 +3,8 @@
3
  Contributors: yithemes
4
  Tags: zoom, magnifier, slider, carousel, woocommerce
5
  Requires at least: 4.0
6
- Tested up to: 5.4
7
- Stable tag: 1.3.16
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
  Documentation: https://docs.yithemes.com/yith-woocommerce-zoom-magnifier/
@@ -52,6 +52,11 @@ YITH WooCommerce Zoom Magnifier will add a new tab called "Zoom Magnifier" in "Y
52
 
53
  == Changelog ==
54
 
 
 
 
 
 
55
  = Version 1.3.16 - Released: Mar 27, 2020 =
56
 
57
  * New: support for WooCommerce 4.0
3
  Contributors: yithemes
4
  Tags: zoom, magnifier, slider, carousel, woocommerce
5
  Requires at least: 4.0
6
+ Tested up to: 5.5
7
+ Stable tag: 1.3.17
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
  Documentation: https://docs.yithemes.com/yith-woocommerce-zoom-magnifier/
52
 
53
  == Changelog ==
54
 
55
+ = Version 1.3.17 - Released: Sept 17, 2020 =
56
+
57
+ * New: support for WooCommerce 4.5
58
+ * Update: Plugin-fw
59
+
60
  = Version 1.3.16 - Released: Mar 27, 2020 =
61
 
62
  * New: support for WooCommerce 4.0
assets/css/frontend.css CHANGED
@@ -1,65 +1,97 @@
1
  /* gallery */
2
  .yith_magnifier_gallery {
3
- margin: 0;
4
- padding: 0;
 
5
  }
6
 
7
  .yith_magnifier_gallery li {
8
- position: relative;
9
- float: left;
10
- display: block;
 
11
  }
12
 
13
  .yith_magnifier_gallery li.last {
14
- margin-right: 0;
15
  }
16
 
17
  .yith_magnifier_gallery li a {
18
- width: 100% !important;
19
- display: block;
20
- margin-top: 10px;
21
- height: auto !important;
22
  }
23
 
24
  /* next/prev */
25
  .single-product.woocommerce .thumbnails {
26
- position: relative;
 
27
  }
28
 
29
  .single-product.woocommerce .thumbnails #slider-prev,
30
  .single-product.woocommerce .thumbnails #slider-next {
31
- display: none !important;
32
- cursor: pointer;
33
- width: 27px;
34
- height: 26px;
35
- background: url('../images/slider-arrow.png') no-repeat left center;
36
- position: absolute;
37
- top: 48%;
38
- margin-top: -2px;
39
  }
40
 
41
  .single-product.woocommerce .thumbnails #slider-prev {
42
- background-position: left center;
43
- left: 0px;
44
  }
45
 
46
  .single-product.woocommerce .thumbnails #slider-next {
47
- background-position: right center;
48
- right: 0px;
49
  }
50
 
51
  .single-product.woocommerce .thumbnails:hover #slider-prev,
52
  .single-product.woocommerce .thumbnails:hover #slider-next {
53
- display: block !important;
54
  }
55
 
56
  span.onsale {
57
- z-index: 10000
58
  }
59
 
60
- div.pp_woocommerce a.pp_expand {
61
- display: inline;
62
- bottom: 10px;
63
- top: initial;
64
- left: 10px;
65
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  /* gallery */
2
  .yith_magnifier_gallery {
3
+ margin: 0;
4
+ padding: 0;
5
+ text-align: center;
6
  }
7
 
8
  .yith_magnifier_gallery li {
9
+ position: relative;
10
+ display: inline-block;
11
+ vertical-align: center;
12
+ top: 0;
13
  }
14
 
15
  .yith_magnifier_gallery li.last {
16
+ /*margin-right: 0; */
17
  }
18
 
19
  .yith_magnifier_gallery li a {
20
+ width: 100% !important;
21
+ display: block;
22
+ margin-top: 10px;
23
+ height: auto !important;
24
  }
25
 
26
  /* next/prev */
27
  .single-product.woocommerce .thumbnails {
28
+ position: relative;
29
+ overflow: hidden;
30
  }
31
 
32
  .single-product.woocommerce .thumbnails #slider-prev,
33
  .single-product.woocommerce .thumbnails #slider-next {
34
+ display: none !important;
35
+ cursor: pointer;
36
+ width: 27px;
37
+ height: 26px;
38
+ background: url('../images/slider-arrow.png') no-repeat left center;
39
+ position: absolute;
40
+ top: 50%;
41
+ transform: translateY( -50% );
42
  }
43
 
44
  .single-product.woocommerce .thumbnails #slider-prev {
45
+ background-position: left center;
46
+ left: 0px;
47
  }
48
 
49
  .single-product.woocommerce .thumbnails #slider-next {
50
+ background-position: right center;
51
+ right: 0px;
52
  }
53
 
54
  .single-product.woocommerce .thumbnails:hover #slider-prev,
55
  .single-product.woocommerce .thumbnails:hover #slider-next {
56
+ display: block !important;
57
  }
58
 
59
  span.onsale {
60
+ z-index: 10000
61
  }
62
 
63
+ div.pp_woocommerce a.yith_expand {
64
+ display: inline;
65
+ bottom: 10px;
66
+ top: initial;
67
+ left: 10px;
68
+ background-color: rgb(68, 68, 68);
69
+ box-sizing: border-box;
70
+ cursor: pointer;
71
+ font-size: 25px;
72
+ position: absolute;
73
+ text-align: left;
74
+ text-decoration: none;
75
+ text-indent: -10000px;
76
+ z-index: 20000;
77
+ border-radius: 100%;
78
+ height: 25px;
79
+ width: 25px;
80
+ text-shadow: 0 1px 2px rgba(0, 0, 0, .5);
81
+ line-height: 1em;
82
+ transition: all ease-in-out .2s;
83
+ color: #fff !important;
84
+ }
85
+
86
+ a.yith_expand:before {
87
+ font-family: WooCommerce;
88
+ content: "\e005";
89
+ display: block;
90
+ position: absolute;
91
+ top: 0;
92
+ left: 0;
93
+ right: 0;
94
+ bottom: 0;
95
+ text-align: center;
96
+ text-indent: 0;
97
+ }
assets/js/yith_magnifier.js CHANGED
@@ -1,853 +1,946 @@
1
- /**
2
- * YITH Magnifier
3
- *
4
- * @version 0.1
5
- * @author Your Inspiration Themes Team <info@yithemes.com>
6
- *
7
- * MIT License.
8
- */
9
-
10
- ;
11
- (function (window, $, undefined) {
12
- 'use strict';
13
-
14
- //include imagesLoaded plugin
15
- if ($.fn.imagesLoaded === undefined) {
16
- /*!
17
- * jQuery imagesLoaded plugin v2.1.1
18
- * http://github.com/desandro/imagesloaded
19
- *
20
- * MIT License. by Paul Irish et al.
21
- */
22
-
23
- /*jshint curly: true, eqeqeq: true, noempty: true, strict: true, undef: true, browser: true */
24
- /*global jQuery: false */
25
-
26
- ;
27
- (function ($, undefined) {
28
- 'use strict';
29
-
30
- // blank image data-uri bypasses webkit log warning (thx doug jones)
31
- var BLANK = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==';
32
-
33
- $.fn.imagesLoaded = function (callback) {
34
- var $this = this,
35
- deferred = $.isFunction($.Deferred) ? $.Deferred() : 0,
36
- hasNotify = $.isFunction(deferred.notify),
37
- $images = $this.find('img').add($this.filter('img')),
38
- loaded = [],
39
- proper = [],
40
- broken = [];
41
-
42
- // Register deferred callbacks
43
- if ($.isPlainObject(callback)) {
44
- $.each(callback, function (key, value) {
45
- if (key === 'callback') {
46
- callback = value;
47
- } else if (deferred) {
48
- deferred[key](value);
49
- }
50
- });
51
- }
52
-
53
- function doneLoading() {
54
- var $proper = $(proper),
55
- $broken = $(broken);
56
-
57
- if (deferred) {
58
- if (broken.length) {
59
- deferred.reject($images, $proper, $broken);
60
- } else {
61
- deferred.resolve($images);
62
- }
63
- }
64
-
65
- if ($.isFunction(callback)) {
66
- callback.call($this, $images, $proper, $broken);
67
- }
68
- }
69
-
70
- function imgLoadedHandler(event) {
71
- imgLoaded(event.target, event.type === 'error');
72
- }
73
-
74
- function imgLoaded(img, isBroken) {
75
- // don't proceed if BLANK image, or image is already loaded
76
- if (img.src === BLANK || $.inArray(img, loaded) !== -1) {
77
- return;
78
- }
79
-
80
- // store element in loaded images array
81
- loaded.push(img);
82
-
83
- // keep track of broken and properly loaded images
84
- if (isBroken) {
85
- broken.push(img);
86
- } else {
87
- proper.push(img);
88
- }
89
-
90
- // cache image and its state for future calls
91
- $.data(img, 'imagesLoaded', {isBroken: isBroken, src: img.src});
92
-
93
- // trigger deferred progress method if present
94
- if (hasNotify) {
95
- deferred.notifyWith($(img), [isBroken, $images, $(proper), $(broken)]);
96
- }
97
-
98
- // call doneLoading and clean listeners if all images are loaded
99
- if ($images.length === loaded.length) {
100
- setTimeout(doneLoading);
101
- $images.unbind('.imagesLoaded', imgLoadedHandler);
102
- }
103
- }
104
-
105
- // if no images, trigger immediately
106
- if (!$images.length) {
107
- doneLoading();
108
- } else {
109
- $images.bind('load.imagesLoaded error.imagesLoaded', imgLoadedHandler)
110
- .each(function (i, el) {
111
- var src = el.src;
112
-
113
- // find out if this image has been already checked for status
114
- // if it was, and src has not changed, call imgLoaded on it
115
- var cached = $.data(el, 'imagesLoaded');
116
- if (cached && cached.src === src) {
117
- imgLoaded(el, cached.isBroken);
118
- return;
119
- }
120
-
121
- // if complete is true and browser supports natural sizes, try
122
- // to check for image status manually
123
- if (el.complete && el.naturalWidth !== undefined) {
124
- imgLoaded(el, el.naturalWidth === 0 || el.naturalHeight === 0);
125
- return;
126
- }
127
-
128
- // cached images don't fire load sometimes, so we reset src, but only when
129
- // dealing with IE, or image is complete (loaded) and failed manual check
130
- // webkit hack from http://groups.google.com/group/jquery-dev/browse_thread/thread/eee6ab7b2da50e1f
131
- if (el.readyState || el.complete) {
132
- el.src = BLANK;
133
- el.src = src;
134
- }
135
- });
136
- }
137
-
138
- return deferred ? deferred.promise($this) : $this;
139
- };
140
-
141
- })(jQuery);
142
- }
143
-
144
- $.yith_magnifier = function (options, element) {
145
- this.t = element;
146
- this.element = $(element);
147
- this._init(options);
148
- };
149
-
150
- $.yith_magnifier.defaults = {
151
- zoomWidth: 'auto',
152
- zoomHeight: 'auto',
153
- position: 'right',
154
- tint: false,
155
- tintOpacity: 0.5,
156
- lensOpacity: 0.5,
157
- softFocus: false,
158
- smoothMove: 3,
159
- showTitle: true,
160
- titleOpacity: 0.5,
161
- adjustX: 0,
162
- adjustY: 0,
163
-
164
- phoneBehavior: 'inside', //allowed values: inside, disable, default
165
- loadingLabel: 'Loading...',
166
-
167
- enableSlider: true,
168
- slider: 'carouFredSel',
169
- sliderOptions: {},
170
-
171
- from_gallery : 'no',
172
-
173
- onLoad: function () {
174
- return false;
175
- },
176
- onEnter: function () {
177
- return false
178
- },
179
- onLeave: function () {
180
- return false
181
- },
182
- onMove: function () {
183
- return false
184
- },
185
- onClick: function () {
186
- return false;
187
- },
188
-
189
- elements: {
190
- zoom: $('.yith_magnifier_zoom'),
191
- zoomImage: $('.yith_magnifier_zoom img').first(),
192
- gallery: $('.yith_magnifier_gallery li a')
193
- }
194
- };
195
-
196
- $.yith_magnifier.prototype = {
197
- /**
198
- * Let's start the magnifier
199
- *
200
- * @param {Object} options
201
- *
202
- * @private
203
- */
204
- _init: function (options) {
205
- var self = this;
206
-
207
- $(document).trigger('yith_magnifier_before_init');
208
-
209
- $.each($.yith_magnifier.defaults.elements, function (i, v) {
210
- var el = $.yith_magnifier.defaults.elements;
211
- el[i] = $(v, self);
212
- });
213
- self.options = $.extend(true, {}, $.yith_magnifier.defaults, options);
214
- self.isPhone = self._isPhone();
215
-
216
- self._loading();
217
-
218
- self.element.imagesLoaded(function () {
219
- self.options.onLoad();
220
- self._initZoom();
221
- self._initGallery();
222
- });
223
-
224
- $(document).trigger('yith_magnifier_after_init');
225
- },
226
-
227
-
228
- /**
229
- * Init gallery handlers
230
- *
231
- * @private
232
- *
233
- */
234
- _initGallery: function () {
235
- var self = this;
236
- var elements = self.options.elements;
237
-
238
- var gallery = elements.gallery;
239
- var zoom = elements.zoom;
240
- var zoomImage = elements.zoomImage;
241
-
242
- if (gallery.length > 0) {
243
- gallery.on('click', function (e) {
244
- e.preventDefault();
245
-
246
- self.options.from_gallery = 'yes';
247
-
248
- var t = $(this);
249
- self.destroy();
250
-
251
- zoom.attr('href', this.href);
252
- zoomImage.attr('src', t.data('small'))
253
- .attr('srcset', t.data('small'))
254
- .attr('src-orig', t.data('small'))
255
- .attr('title', '')
256
- .attr('title', t.attr('title'));
257
-
258
- $.data(self.t, 'yith_magnifier', new $.yith_magnifier(self.options, self.element));
259
- });
260
-
261
- //gallery.filter(':first').trigger('click');
262
-
263
- if (self.options.enableSlider) {
264
- gallery.closest('ul').trigger('yith_magnifier_slider_destroy');
265
- gallery.closest('ul')[self.options.slider](self.options.sliderOptions);
266
- }
267
-
268
- } else {
269
- gallery.on('click', function (e) {
270
- e.preventDefault();
271
- return false;
272
- })
273
- }
274
- },
275
-
276
- /**
277
- * Show a loading icon while image isn't properly loaded
278
- *
279
- * @private
280
- */
281
- _loading: function () {
282
- if (this.options.disableRightClick) {
283
- $(document).on('contextmenu', function (e) {
284
- return false;
285
- });
286
- }
287
-
288
- if (this.mouseTrap === undefined) {
289
- var w = this.options.elements.zoom.width();
290
-
291
- if (this.options.loadingLabel) {
292
- $('<div class="yith_magnifier_loading">' + this.options.loadingLabel + '</div>').css({
293
- 'width': w,
294
- 'text-align': 'center',
295
- opacity: .5
296
- }).appendTo(this.options.elements.zoom.parent());
297
- }
298
- }
299
- },
300
-
301
- /**
302
- * Initialize the zoom images
303
- *
304
- * @private
305
- */
306
- _initZoom: function () {
307
- var self = this;
308
-
309
- self.zoom = self.options.elements.zoom;
310
- self.zoomImage = self.options.elements.zoomImage;
311
-
312
- //wrap the zoom image with a div
313
- var zoom_wrap_css_class = "yith_magnifier_zoom_wrap";
314
-
315
-
316
- if (self.options.zoom_wrap_additional_css) {
317
- if ( !$('.' + zoom_wrap_css_class).length ) {
318
-
319
- zoom_wrap_css_class += " " + self.options.zoom_wrap_additional_css;
320
- }
321
- }
322
-
323
- self.zoom.wrap('<div class="' + zoom_wrap_css_class + '"></div>');
324
-
325
- self.IMG_zoomImage = new Image();
326
-
327
- var product_id = $( '.woocommerce-variation-add-to-cart .variation_id' ).val();
328
- if ( $.isNumeric( product_id ) && product_id != 0 && self.options.from_gallery == 'no' ){
329
-
330
- var data = {
331
- action : 'yith_wc_zoom_magnifier_get_main_image',
332
- product_id : product_id,
333
- context : 'frontend'
334
- }
335
-
336
- $.ajax({
337
- data : data,
338
- url : yith_wc_zoom_magnifier_storage_object.ajax_url,
339
- type : 'post',
340
- error : function ( response ) {
341
- console.log( 'ERROR - Yith_WC_Zoom_Magnifier' );
342
- console.log( response );
343
- },
344
- success : function ( response ) {
345
- self.IMG_zoomImage.src = response.url;
346
-
347
- self.IMG_smallImage = new Image();
348
- self.IMG_smallImage.src = self.zoomImage.attr('src');
349
-
350
- // set new gallery
351
- if( response.gallery ) {
352
-
353
- if ($('.yith_magnifier_gallery').length)
354
- $('.yith_magnifier_gallery').closest('.thumbnails').replaceWith( response.gallery );
355
- else
356
- $( '.images').append( response.gallery );
357
-
358
- self.options.elements.gallery = $('.yith_magnifier_gallery li a' );
359
- }
360
-
361
- if ($.browser && $.browser.msie && $.browser.version == 8) {
362
- $(self.IMG_zoomImage).load(function () {
363
- self._initGallery();
364
- self._initTrap();
365
- });
366
- } else {
367
-
368
- $([self.IMG_zoomImage, self.IMG_smallImage]).imagesLoaded(function () {
369
- self._initGallery();
370
- self._initTrap();
371
- });
372
- }
373
-
374
- $(document).trigger('yith_magnifier_after_init_zoom');
375
-
376
- }
377
- });
378
-
379
- }
380
- else{
381
- self.IMG_zoomImage.src = self.zoom.attr('href');
382
-
383
- self.IMG_smallImage = new Image();
384
- self.IMG_smallImage.src = self.zoomImage.attr('src');
385
-
386
- if ($.browser && $.browser.msie && $.browser.version == 8) {
387
- $(self.IMG_zoomImage).load(function () {
388
-
389
- self._initTrap();
390
- });
391
- } else {
392
-
393
- $([self.IMG_zoomImage, self.IMG_smallImage]).imagesLoaded(function () {
394
-
395
- self._initTrap();
396
- });
397
- }
398
-
399
- $(document).trigger('yith_magnifier_after_init_zoom')
400
-
401
- }
402
-
403
- },
404
-
405
- /**
406
- * Create the mouse trap
407
- *
408
- * @private
409
- */
410
- _initTrap: function () {
411
- var self = this;
412
- var zoomImg = self.IMG_zoomImage,
413
- thumbImg = self.IMG_smallImage;
414
-
415
- self.mx = 0;
416
- self.my = 0;
417
- self.controlTimer = 0;
418
- self.lens = null;
419
- self.tint = null;
420
- self.softFocus = null;
421
- self.zoomDiv = null;
422
- self.cw = 0;
423
- self.ch = 0;
424
- self.zw = 0;
425
- self.destU = 0;
426
- self.destV = 0;
427
- self.currU = 0;
428
- self.currV = 0;
429
- self.mouseTrap = null;
430
-
431
- var zoom = self.options.elements.zoom;
432
- var zoomImage = self.options.elements.zoomImage;
433
-
434
- //remove loading div
435
- //this.zoom.parent().siblings('.yith_magnifier_loading').remove();
436
- $('.yith_magnifier_loading').remove();
437
-
438
- if (this.element.find('.yith_magnifier_mousetrap')) {
439
- this.element.find('.yith_magnifier_mousetrap').remove();
440
- }
441
-
442
- this.mouseTrap = $('<div class="yith_magnifier_mousetrap" />').css({
443
- width: '100%', //zoomImage.outerWidth(),
444
- height: '100%', //zoomImage.outerHeight(),
445
- top: 0,
446
- left: 0
447
- }).appendTo(zoom.parent());
448
-
449
- // Detect device type, normal mouse or touchy(ipad android) by albanx
450
- var touchy = ("ontouchstart" in document.documentElement) ? true : false;
451
- var event_move = 'touchmove mousemove';
452
- var event_end = 'touchend mouseleave';
453
- var event_ent = 'touchstart mouseenter';
454
- var event_click = 'touchstart click';
455
-
456
- this.mouseTrap.on(event_move, this, function (e) {
457
- self.options.onMove();
458
-
459
- self.mx = ( typeof(e.originalEvent.touches) != 'undefined' ) ? e.originalEvent.touches[0].pageX : e.pageX;
460
- self.my = ( typeof(e.originalEvent.touches) != 'undefined' ) ? e.originalEvent.touches[0].pageY : e.pageY;
461
-
462
- }).on(event_end, this, function (e) {
463
-
464
- clearTimeout(self.controlTimer);
465
- //event.data.removeBits();
466
- if (self.lens) {
467
- self.lens.fadeOut(299);
468
- }
469
- if (self.tint) {
470
- self.tint.fadeOut(299);
471
- }
472
- if (self.softFocus) {
473
- self.softFocus.fadeOut(299);
474
- }
475
- self.zoomDiv.fadeOut(300, function () {
476
- self._onLeave();
477
- });
478
-
479
- return false;
480
-
481
- }).on(event_click, this, function (e) {
482
- self.options.onClick();
483
- }).on(event_ent, this, function (e) {
484
- self.options.onEnter();
485
-
486
- if (touchy) {
487
- e.preventDefault();
488
- }
489
-
490
- self.mx = ( typeof(e.originalEvent.touches) != 'undefined' ) ? e.originalEvent.touches[0].pageX : e.pageX;
491
- self.my = ( typeof(e.originalEvent.touches) != 'undefined' ) ? e.originalEvent.touches[0].pageY : e.pageY;
492
-
493
- self.zw = e.data;
494
- if (self.zoomDiv) {
495
- self.zoomDiv.stop(true, false);
496
- self.zoomDiv.remove();
497
- }
498
-
499
- var xPos = self.options.adjustX,
500
- yPos = self.options.adjustY;
501
-
502
- var siw = zoomImage.outerWidth();
503
- var sih = zoomImage.outerHeight();
504
-
505
- var w = self.options.zoomWidth;
506
- var h = self.options.zoomHeight;
507
-
508
- if (self.options.zoomWidth == 'auto') {
509
- w = siw;
510
- }
511
-
512
- if (self.options.zoomHeight == 'auto') {
513
- h = sih;
514
- }
515
-
516
- var appendTo = zoom.parent();
517
- switch (self.options.position) {
518
- case 'top':
519
- yPos -= h;
520
- break;
521
- case 'right':
522
- xPos += siw;
523
- break;
524
- case 'bottom':
525
- yPos += sih;
526
- break;
527
- case 'left':
528
- xPos -= w;
529
- break;
530
- case 'inside':
531
- w = siw;
532
- h = sih;
533
- break;
534
-
535
- // All other values, try and find an id in the dom to attach to.
536
- default:
537
- appendTo = $('#' + self.options.position);
538
- // If dom element doesn't exit, just use 'right' position as default.
539
- if (!appendTo.length) {
540
- appendTo = zoom;
541
- xPos += siw; //+ opts.adjustX;
542
- yPos += sih; // + opts.adjustY;
543
- } else {
544
- w = appendTo.innerWidth();
545
- h = appendTo.innerHeight();
546
- }
547
- }
548
-
549
- if (self.isPhone && self.options.phoneBehavior == 'inside') {
550
- w = siw;
551
- h = sih;
552
- xPos = 0;
553
- yPos = 0;
554
- }
555
-
556
- self.zoomDiv = $('<div class="yith_magnifier_zoom_magnifier" />').css({
557
- left: xPos,
558
- top: yPos,
559
- width: w,
560
- height: h,
561
- 'background-repeat': 'no-repeat',
562
- backgroundImage: 'url(' + zoomImg.src + ')'
563
- }).appendTo(appendTo);
564
-
565
- // Add the title from title tag.
566
- if (zoomImage.attr('title') && self.options.showTitle) {
567
- $('<div class="yith_magnifier_title">' + zoomImage.attr('title') + '</div>').appendTo(self.zoomDiv);
568
- }
569
-
570
- if (self.isPhone) {
571
- if (self.options.phoneBehavior != 'disable') {
572
- self.zoomDiv.fadeIn(500);
573
- } else {
574
- self.lens.fadeOut(299);
575
- }
576
- } else {
577
- self.zoomDiv.fadeIn(500);
578
- }
579
-
580
- if (self.lens) {
581
- self.lens.remove();
582
- self.lens = null;
583
- }
584
-
585
- if (zoomImg.width <= 1) {
586
- self.cw = (zoomImage.outerWidth() / zoomImg.naturalWidth) * self.zoomDiv.width();
587
- } else {
588
- self.cw = (zoomImage.outerWidth() / zoomImg.width) * self.zoomDiv.width();
589
- }
590
-
591
- if (zoomImg.height <= 1) {
592
- self.ch = (zoomImage.outerHeight() / zoomImg.naturalHeight) * self.zoomDiv.height();
593
- } else {
594
- self.ch = (zoomImage.outerHeight() / zoomImg.height) * self.zoomDiv.height();
595
- }
596
-
597
- // Attach mouse, initially invisible to prevent first frame glitch
598
- self.lens = $('<div class="yith_magnifier_lens" />').css({
599
- width: self.cw,
600
- height: self.ch
601
- }).appendTo(zoom);
602
-
603
- self.mouseTrap.css('cursor', self.lens.css('cursor'));
604
-
605
- var noTrans = false;
606
-
607
-
608
- // Init tint layer if needed. (Not relevant if using inside mode)
609
- if (self.options.tint) {
610
- //self.lens.css('background', 'url("' + zoomImage.attr('src') + '")');
611
- self.tint = $('<div />').css({
612
- display: 'none',
613
- position: 'absolute',
614
- left: 0,
615
- top: 0,
616
- width: zoomImage.outerWidth(),
617
- height: zoomImage.outerHeight(),
618
- backgroundColor: self.options.tint,
619
- opacity: self.options.tintOpacity
620
- }).appendTo(zoom);
621
-
622
-
623
- self.lens.append($('<img />', {
624
- src: zoomImage.attr('src')
625
- }));
626
-
627
- noTrans = true;
628
- self.tint.fadeIn(500);
629
- }
630
-
631
- if (self.options.softFocus) {
632
- //self.lens.css('background', 'url("' + zoomImage.attr('src') + '")');
633
- self.softFocus = $('<div />').css({
634
- position: 'absolute',
635
- display: 'none',
636
- top: '1px',
637
- left: '1px',
638
- width: zoomImage.outerWidth(),
639
- height: zoomImage.outerHeight(),
640
- //background: 'url("' + zoomImage.attr('src') + '")',
641
- //backgroundSize: '100%',
642
- opacity: .5
643
- }).appendTo(zoom);
644
-
645
- self.softFocus.append($('<img />', {
646
- src: zoomImage.attr('src')
647
- }));
648
-
649
- if (self.lens.find('img').length == 0) {
650
- self.lens.append($('<img />', {
651
- src: zoomImage.attr('src')
652
- }));
653
- }
654
-
655
- noTrans = true;
656
- self.softFocus.fadeIn(500);
657
- }
658
-
659
-
660
- if (!noTrans) {
661
- self.lens.css('opacity', self.options.lensOpacity);
662
- }
663
- if (self.options.position !== 'inside') {
664
- self.lens.fadeIn(500);
665
- }
666
-
667
- // Start processing.
668
- self.zw._controlLoop();
669
-
670
- return; // Don't return false here otherwise opera will not detect change of the mouse pointer type.
671
- });
672
- },
673
-
674
- /**
675
- *
676
- *
677
- * @private
678
- */
679
- _controlLoop: function () {
680
- var self = this;
681
-
682
- if (this.lens) {
683
- var x = (this.mx - this.zoomImage.offset().left - (this.cw * 0.5)) >> 0;
684
- var y = (this.my - this.zoomImage.offset().top - (this.ch * 0.5)) >> 0;
685
-
686
- if (x < 0) {
687
- x = 0;
688
- } else if (x > (this.zoomImage.outerWidth() - this.cw)) {
689
- x = (this.zoomImage.outerWidth() - this.cw);
690
- }
691
-
692
- if (y < 0) {
693
- y = 0;
694
- } else if (y > (this.zoomImage.outerHeight() - this.ch)) {
695
- y = (this.zoomImage.outerHeight() - this.ch);
696
- }
697
-
698
- this.lens.css({
699
- left: x - 2,
700
- top: y - 1
701
- });
702
-
703
- //this.lens.css('background-position', (-x) + 'px ' + (-y) + 'px');
704
-
705
-
706
- this.lens.find('img').css({
707
- width: this.zoomImage.outerWidth(),
708
- height: this.zoomImage.outerHeight(),
709
- marginLeft: (-x) + 'px ',
710
- marginTop: (-y) + 'px'
711
- });
712
-
713
-
714
- if (this.IMG_zoomImage.width <= 1) {
715
- this.destU = (((x) / this.zoomImage.outerWidth()) * this.IMG_zoomImage.naturalWidth) >> 0;
716
- } else {
717
- this.destU = (((x) / this.zoomImage.outerWidth()) * this.IMG_zoomImage.width) >> 0;
718
- }
719
-
720
- if (this.IMG_zoomImage.height <= 1) {
721
- this.destV = (((y) / this.zoomImage.outerHeight()) * this.IMG_zoomImage.naturalHeight) >> 0;
722
- } else {
723
- this.destV = (((y) / this.zoomImage.outerHeight()) * this.IMG_zoomImage.height) >> 0;
724
- }
725
-
726
-
727
- this.currU += (this.destU - this.currU) / this.options.smoothMove;
728
- this.currV += (this.destV - this.currV) / this.options.smoothMove;
729
-
730
- this.zoomDiv.css('background-position', (-(this.currU >> 0) + 'px ') + (-(this.currV >> 0) + 'px'));
731
- }
732
-
733
- this.controlTimer = setTimeout(function () {
734
- self._controlLoop();
735
- }, 30);
736
- },
737
-
738
- /**
739
- * This method is called when the mouse leave the image
740
- *
741
- * @private
742
- */
743
- _onLeave: function () {
744
- this.options.onLeave();
745
-
746
- if (this.zoomDiv) {
747
- this.zoomDiv.remove();
748
- this.zoomDiv = null;
749
- }
750
-
751
- this._removeElements();
752
- },
753
-
754
- /**
755
- * Remove lens, tint and softfocus
756
- *
757
- * @private
758
- */
759
- _removeElements: function () {
760
- if (this.lens) {
761
- this.lens.remove();
762
- this.lens = null;
763
- }
764
-
765
- if (this.tint) {
766
- this.tint.remove();
767
- this.tint = null;
768
- }
769
-
770
- if (this.softFocus) {
771
- this.softFocus.remove();
772
- this.softFocus = null;
773
- }
774
-
775
- if (this.element.find('.yith_magnifier_loading').length > 0) {
776
- this.element.find('.yith_magnifier_loading').remove();
777
- }
778
- },
779
-
780
- /**
781
- * Detect if user is using a phone device (eg iPhone)
782
- *
783
- * @private
784
- */
785
- _isPhone: function () {
786
- var userAgent = navigator.userAgent.toLowerCase();
787
-
788
- return ( userAgent.match(/iphone/i) || userAgent.match(/ipod/i) || userAgent.match(/android/i) );
789
- },
790
-
791
- /**
792
- * Destroy the instance
793
- *
794
- */
795
- destroy: function () {
796
- if (this.zoom) {
797
- this.zoom.unwrap();
798
- }
799
-
800
- if (this.mouseTrap) {
801
- this.mouseTrap.unbind();
802
- this.mouseTrap.remove();
803
- this.mouseTrap = null;
804
- }
805
-
806
- if (this.zoomDiv) {
807
- this.zoomDiv.remove();
808
- this.zoomDiv = null;
809
- }
810
-
811
- if (this.options.disableRightClick) {
812
- $(document).unbind();
813
- }
814
-
815
- this._removeElements();
816
- this.options.elements.gallery.unbind();
817
- this.element.removeData('yith_magnifier');
818
- }
819
- };
820
-
821
- $.fn.yith_magnifier = function (options) {
822
-
823
- if (typeof options === 'string') {
824
- var args = Array.prototype.slice.call(arguments, 1);
825
-
826
- this.each(function () {
827
- var instance = $.data(this, 'yith_magnifier');
828
- if (!instance) {
829
- $.error("cannot call methods on yith_magnifier prior to initialization; " +
830
- "attempted to call method '" + options + "'");
831
- return;
832
- }
833
- if (!$.isFunction(instance[options]) || options.charAt(0) === "_") {
834
- $.error("no such method '" + options + "' for yith_magnifier instance");
835
- return;
836
- }
837
- instance[options].apply(instance, args);
838
- });
839
- } else {
840
- this.each(function () {
841
- var instance = $.data(this, 'yith_magnifier');
842
- if (!instance) {
843
- $.data(this, 'yith_magnifier', new $.yith_magnifier(options, this));
844
- } else {
845
- $.error('yith_magnifier already istantiated.');
846
- }
847
- });
848
- }
849
- return this;
850
- };
851
-
852
-
853
- })(window, jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * YITH Magnifier
3
+ *
4
+ * @version 0.1
5
+ * @author Your Inspiration Themes Team <info@yithemes.com>
6
+ *
7
+ * MIT License.
8
+ */
9
+
10
+ ;
11
+ (function (window, $, undefined) {
12
+ 'use strict';
13
+
14
+ //include imagesLoaded plugin
15
+ if ($.fn.imagesLoaded === undefined) {
16
+ /*!
17
+ * jQuery imagesLoaded plugin v2.1.1
18
+ * http://github.com/desandro/imagesloaded
19
+ *
20
+ * MIT License. by Paul Irish et al.
21
+ */
22
+
23
+ /*jshint curly: true, eqeqeq: true, noempty: true, strict: true, undef: true, browser: true */
24
+ /*global jQuery: false */
25
+
26
+ ;
27
+ (function ($, undefined) {
28
+ 'use strict';
29
+
30
+ // blank image data-uri bypasses webkit log warning (thx doug jones)
31
+ var BLANK = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==';
32
+
33
+ $.fn.imagesLoaded = function (callback) {
34
+ var $this = this,
35
+ deferred = $.isFunction($.Deferred) ? $.Deferred() : 0,
36
+ hasNotify = $.isFunction(deferred.notify),
37
+ $images = $this.find('img').add($this.filter('img')),
38
+ loaded = [],
39
+ proper = [],
40
+ broken = [];
41
+
42
+ // Register deferred callbacks
43
+ if ($.isPlainObject(callback)) {
44
+ $.each(callback, function (key, value) {
45
+ if (key === 'callback') {
46
+ callback = value;
47
+ } else if (deferred) {
48
+ deferred[key](value);
49
+ }
50
+ });
51
+ }
52
+
53
+ function doneLoading() {
54
+ var $proper = $(proper),
55
+ $broken = $(broken);
56
+
57
+ if (deferred) {
58
+ if (broken.length) {
59
+ deferred.reject($images, $proper, $broken);
60
+ } else {
61
+ deferred.resolve($images);
62
+ }
63
+ }
64
+
65
+ if ($.isFunction(callback)) {
66
+ callback.call($this, $images, $proper, $broken);
67
+ }
68
+ }
69
+
70
+ function imgLoadedHandler(event) {
71
+ imgLoaded(event.target, event.type === 'error');
72
+ }
73
+
74
+ function imgLoaded(img, isBroken) {
75
+ // don't proceed if BLANK image, or image is already loaded
76
+ if (img.src === BLANK || $.inArray(img, loaded) !== -1) {
77
+ return;
78
+ }
79
+
80
+ // store element in loaded images array
81
+ loaded.push(img);
82
+
83
+ // keep track of broken and properly loaded images
84
+ if (isBroken) {
85
+ broken.push(img);
86
+ } else {
87
+ proper.push(img);
88
+ }
89
+
90
+ // cache image and its state for future calls
91
+ $.data(img, 'imagesLoaded', {isBroken: isBroken, src: img.src});
92
+
93
+ // trigger deferred progress method if present
94
+ if (hasNotify) {
95
+ deferred.notifyWith($(img), [isBroken, $images, $(proper), $(broken)]);
96
+ }
97
+
98
+ // call doneLoading and clean listeners if all images are loaded
99
+ if ($images.length === loaded.length) {
100
+ setTimeout(doneLoading);
101
+ $images.unbind('.imagesLoaded', imgLoadedHandler);
102
+ }
103
+ }
104
+
105
+ // if no images, trigger immediately
106
+ if (!$images.length) {
107
+ doneLoading();
108
+ } else {
109
+ $images.bind('load.imagesLoaded error.imagesLoaded', imgLoadedHandler)
110
+ .each(function (i, el) {
111
+ var src = el.src;
112
+
113
+ // find out if this image has been already checked for status
114
+ // if it was, and src has not changed, call imgLoaded on it
115
+ var cached = $.data(el, 'imagesLoaded');
116
+ if (cached && cached.src === src) {
117
+ imgLoaded(el, cached.isBroken);
118
+ return;
119
+ }
120
+
121
+ // if complete is true and browser supports natural sizes, try
122
+ // to check for image status manually
123
+ if (el.complete && el.naturalWidth !== undefined) {
124
+ imgLoaded(el, el.naturalWidth === 0 || el.naturalHeight === 0);
125
+ return;
126
+ }
127
+
128
+ // cached images don't fire load sometimes, so we reset src, but only when
129
+ // dealing with IE, or image is complete (loaded) and failed manual check
130
+ // webkit hack from http://groups.google.com/group/jquery-dev/browse_thread/thread/eee6ab7b2da50e1f
131
+ if (el.readyState || el.complete) {
132
+ el.src = BLANK;
133
+ el.src = src;
134
+ }
135
+ });
136
+ }
137
+
138
+ return deferred ? deferred.promise($this) : $this;
139
+ };
140
+
141
+ })(jQuery);
142
+ }
143
+
144
+ $.yith_magnifier = function (options, element) {
145
+ this.t = element;
146
+ this.element = $(element);
147
+ this._init(options);
148
+ };
149
+
150
+ $.yith_magnifier.defaults = {
151
+ zoomWidth: 'auto',
152
+ zoomHeight: 'auto',
153
+ position: 'right',
154
+ tint: false,
155
+ tintOpacity: 0.5,
156
+ lensOpacity: 0.5,
157
+ softFocus: false,
158
+ smoothMove: 3,
159
+ showTitle: true,
160
+ titleOpacity: 0.5,
161
+ adjustX: 0,
162
+ adjustY: 0,
163
+
164
+ phoneBehavior: 'inside', //allowed values: inside, disable, default
165
+ loadingLabel: 'Loading...',
166
+
167
+ enableSlider: true,
168
+ slider: 'carouFredSel',
169
+ sliderOptions: {},
170
+
171
+ from_gallery : 'no',
172
+
173
+ onLoad: function () {
174
+ return false;
175
+ },
176
+ onEnter: function () {
177
+ return false
178
+ },
179
+ onLeave: function () {
180
+ return false
181
+ },
182
+ onMove: function () {
183
+ return false
184
+ },
185
+ onClick: function () {
186
+ return false;
187
+ },
188
+
189
+ elements: {
190
+ zoom: $('.yith_magnifier_zoom'),
191
+ zoomImage: $('.yith_magnifier_zoom img').first(),
192
+ gallery: $('.yith_magnifier_gallery li a')
193
+ }
194
+ };
195
+
196
+ $.yith_magnifier.prototype = {
197
+ /**
198
+ * Let's start the magnifier
199
+ *
200
+ * @param {Object} options
201
+ *
202
+ * @private
203
+ */
204
+ _init: function (options) {
205
+ var self = this;
206
+
207
+ $(document).trigger('yith_magnifier_before_init');
208
+
209
+ $.each($.yith_magnifier.defaults.elements, function (i, v) {
210
+ var el = $.yith_magnifier.defaults.elements;
211
+ el[i] = $(v, self);
212
+ });
213
+ self.options = $.extend(true, {}, $.yith_magnifier.defaults, options);
214
+ self.isPhone = self._isPhone();
215
+
216
+ self._loading();
217
+
218
+ self.element.imagesLoaded(function () {
219
+ self.options.onLoad();
220
+ self._initZoom();
221
+ self._initGallery();
222
+ });
223
+
224
+ $(document).trigger('yith_magnifier_after_init');
225
+ },
226
+
227
+
228
+ /**
229
+ * Init gallery handlers
230
+ *
231
+ * @private
232
+ *
233
+ */
234
+ _initGallery: function () {
235
+
236
+ var self = this;
237
+ var elements = self.options.elements;
238
+
239
+ var gallery = elements.gallery;
240
+ var zoom = elements.zoom;
241
+ var zoomImage = elements.zoomImage;
242
+
243
+ if ( gallery.length > 0 ) {
244
+ gallery.on('click', function (e) {
245
+ e.preventDefault();
246
+
247
+ if ( $( '#yith_wczm_traffic_light' ).val() == 'free' ){
248
+
249
+ $( '#yith_wczm_traffic_light' ).val( 'blocked' );
250
+
251
+
252
+ self.options.from_gallery = 'yes';
253
+
254
+ var t = $(this);
255
+ self.destroy();
256
+
257
+ zoom.attr('href', this.href);
258
+
259
+ zoomImage.attr('src', t.data('small'))
260
+ .attr('srcset', t.data('small'))
261
+ .attr('src-orig', t.data('small'))
262
+ .attr('title', '')
263
+ .attr('title', t.attr('title'));
264
+ $.data(self.t, 'yith_magnifier', new $.yith_magnifier(self.options, self.element));
265
+
266
+ $( '#yith_wczm_traffic_light' ).val( 'free' );
267
+
268
+
269
+ }
270
+
271
+ });
272
+
273
+ //gallery.filter(':first').trigger('click');
274
+
275
+ if (self.options.enableSlider) {
276
+ gallery.closest('ul').trigger('yith_magnifier_slider_destroy');
277
+ //gallery.closest('ul')[self.options.slider](self.options.sliderOptions);
278
+ }
279
+
280
+ } else {
281
+ gallery.on('click', function (e) {
282
+ e.preventDefault();
283
+ return false;
284
+ })
285
+ }
286
+ },
287
+
288
+ /**
289
+ * Show a loading icon while image isn't properly loaded
290
+ *
291
+ * @private
292
+ */
293
+ _loading: function () {
294
+ if (this.options.disableRightClick) {
295
+ $(document).on('contextmenu', function (e) {
296
+ return false;
297
+ });
298
+ }
299
+
300
+ if (this.mouseTrap === undefined) {
301
+ var w = this.options.elements.zoom.width();
302
+
303
+ if (this.options.loadingLabel) {
304
+ $('<div class="yith_magnifier_loading">' + this.options.loadingLabel + '</div>').css({
305
+ 'width': w,
306
+ 'text-align': 'center',
307
+ opacity: .5
308
+ }).appendTo(this.options.elements.zoom.parent());
309
+ }
310
+ }
311
+ },
312
+
313
+ /**
314
+ * Initialize the zoom images
315
+ *
316
+ * @private
317
+ */
318
+ _initZoom: function () {
319
+
320
+ if ( $( '#yith_wczm_traffic_light' ).val() == 'free' ){
321
+
322
+ $( '#yith_wczm_traffic_light' ).val( 'blocked' );
323
+
324
+ var self = this;
325
+ self.zoom = self.options.elements.zoom;
326
+ self.zoomImage = self.options.elements.zoomImage;
327
+
328
+ var zoom_wrap_css_class = "yith_magnifier_zoom_wrap";
329
+
330
+ if (self.options.zoom_wrap_additional_css) {
331
+ if (!$('.' + zoom_wrap_css_class).length) {
332
+
333
+ zoom_wrap_css_class += " " + self.options.zoom_wrap_additional_css;
334
+ } else {
335
+ return;
336
+ }
337
+ }
338
+ self.zoom.wrap('<div class="' + zoom_wrap_css_class + '"></div>');
339
+
340
+ self.IMG_zoomImage = new Image();
341
+
342
+ var product_id = $( '.woocommerce-variation-add-to-cart .variation_id' ).val();
343
+
344
+ if ( $.isNumeric( product_id ) && product_id != 0 && self.options.from_gallery == 'no' && yith_wc_zoom_magnifier_storage_object.zoom_condition == '1' ){
345
+
346
+ var data = {
347
+ action : 'yith_wc_zoom_magnifier_get_main_image',
348
+ product_id : product_id,
349
+ context : 'frontend'
350
+ }
351
+
352
+ $.ajax({
353
+ data : data,
354
+ url : yith_wc_zoom_magnifier_storage_object.ajax_url,
355
+ type : 'post',
356
+ error : function ( response ) {
357
+ console.log( 'ERROR - Yith_WC_Zoom_Magnifier' );
358
+ console.log( response );
359
+ $( '#yith_wczm_traffic_light' ).val( 'free' );
360
+ },
361
+ success : function ( response ) {
362
+
363
+ self.zoom.attr( 'href', response.url );
364
+
365
+ self.IMG_zoomImage.src = response.url;
366
+
367
+ self.IMG_smallImage = new Image();
368
+ self.IMG_smallImage.src = self.zoomImage.attr('src');
369
+
370
+ // set new gallery
371
+ if( response.gallery ) {
372
+
373
+ if ($('.yith_magnifier_gallery').length)
374
+ $('.yith_magnifier_gallery').closest('.thumbnails').replaceWith( response.gallery );
375
+ else
376
+ $( '.images').append( response.gallery );
377
+
378
+ self.options.elements.gallery = $('.yith_magnifier_gallery li a' );
379
+ }
380
+
381
+ if ($.browser && $.browser.msie && $.browser.version == 8) {
382
+ $(self.IMG_zoomImage).load(function () {
383
+
384
+ self._initGallery();
385
+ self._initTrap();
386
+ });
387
+ } else {
388
+
389
+ $([self.IMG_zoomImage, self.IMG_smallImage]).imagesLoaded(function () {
390
+
391
+ self._initGallery();
392
+ self._initTrap();
393
+ });
394
+ }
395
+
396
+ $(document).on('click', 'a.yith_expand', function (e) {
397
+
398
+ e.preventDefault();
399
+
400
+ $().prettyPhoto({
401
+ social_tools : false,
402
+ theme : 'pp_woocommerce',
403
+ horizontal_padding: 20,
404
+ opacity : 0.8,
405
+ deeplinking : false,
406
+ callback : function () {
407
+ $(".yith_expand").css('display', 'inline');
408
+ }
409
+ });
410
+
411
+ $.prettyPhoto.open(self.zoom[0].href, '', '');
412
+ $(".yith_expand").css('display', 'none');
413
+ $(".pp_woocommerce .ppt").css({
414
+ 'height' : 0,
415
+ 'marginBottom': 0
416
+ });
417
+
418
+
419
+ });
420
+ $(document).trigger('yith_magnifier_after_init_zoom');
421
+ $( '#yith_wczm_traffic_light' ).val( 'free' );
422
+ }
423
+ });
424
+
425
+ }
426
+ else{
427
+
428
+ self.IMG_zoomImage.src = self.zoom.attr('href');
429
+
430
+ self.IMG_smallImage = new Image();
431
+ self.IMG_smallImage.src = self.zoomImage.attr('src');
432
+
433
+ if ($.browser && $.browser.msie && $.browser.version == 8) {
434
+ $(self.IMG_zoomImage).load(function () {
435
+
436
+ self._initTrap();
437
+ });
438
+ } else {
439
+
440
+ $([self.IMG_zoomImage, self.IMG_smallImage]).imagesLoaded(function () {
441
+
442
+ self._initTrap();
443
+ });
444
+ }
445
+
446
+ $(document).on('click', 'a.yith_expand', function (e) {
447
+
448
+ e.preventDefault();
449
+
450
+ $().prettyPhoto({
451
+ social_tools : false,
452
+ theme : 'pp_woocommerce',
453
+ horizontal_padding: 20,
454
+ opacity : 0.8,
455
+ deeplinking : false,
456
+ callback : function () {
457
+ $(".yith_expand").css('display', 'inline');
458
+ }
459
+ });
460
+
461
+ $.prettyPhoto.open(self.zoom[0].href, '', '');
462
+ $(".yith_expand").css('display', 'none');
463
+ $(".pp_woocommerce .ppt").css({
464
+ 'height' : 0,
465
+ 'marginBottom': 0
466
+ });
467
+
468
+
469
+ });
470
+ $(document).trigger('yith_magnifier_after_init_zoom');
471
+
472
+ $( '#yith_wczm_traffic_light' ).val( 'free' );
473
+
474
+ }
475
+
476
+ }
477
+
478
+ },
479
+
480
+ /**
481
+ * Create the mouse trap
482
+ *
483
+ * @private
484
+ */
485
+ _initTrap: function () {
486
+
487
+ var self = this;
488
+ var zoomImg = self.IMG_zoomImage,
489
+ thumbImg = self.IMG_smallImage;
490
+
491
+ self.mx = 0;
492
+ self.my = 0;
493
+ self.controlTimer = 0;
494
+ self.lens = null;
495
+ self.tint = null;
496
+ self.softFocus = null;
497
+ self.zoomDiv = null;
498
+ self.cw = 0;
499
+ self.ch = 0;
500
+ self.zw = 0;
501
+ self.destU = 0;
502
+ self.destV = 0;
503
+ self.currU = 0;
504
+ self.currV = 0;
505
+ self.mouseTrap = null;
506
+
507
+ var zoom = self.options.elements.zoom;
508
+ var zoomImage = self.options.elements.zoomImage;
509
+
510
+ //remove loading div
511
+ //this.zoom.parent().siblings('.yith_magnifier_loading').remove();
512
+ $('.yith_magnifier_loading').remove();
513
+
514
+ if (this.element.find('.yith_magnifier_mousetrap')) {
515
+ this.element.find('.yith_magnifier_mousetrap').remove();
516
+ }
517
+
518
+ this.mouseTrap = $('<div class="yith_magnifier_mousetrap pp_woocommerce" />').css({
519
+ width : '100%', //zoomImage.outerWidth(),
520
+ height: '100%', //zoomImage.outerHeight(),
521
+ top : 0,
522
+ left : 0
523
+ }).appendTo(zoom.parent());
524
+
525
+ if( typeof ywzm_data != 'undefined' ) {
526
+ $('<a href="#" class="yith_expand" title="' + ywzm_data.expand_label + '" style="display: inline;">Expand</a>').appendTo(this.mouseTrap);
527
+ }
528
+
529
+ if (self.isPhone && self.options.phoneBehavior == 'disable') {
530
+ return;
531
+ }
532
+
533
+ // Detect device type, normal mouse or touchy(ipad android) by albanx
534
+ var touchy = ("ontouchstart" in document.documentElement) ? true : false;
535
+ var event_move = 'touchmove mousemove';
536
+ var event_end = 'touchend mouseleave';
537
+ var event_ent = 'touchstart mouseenter';
538
+ var event_click = 'touchstart click';
539
+
540
+ this.mouseTrap.on(event_move, this, function (e) {
541
+
542
+ self.options.onMove();
543
+
544
+ self.mx = ( typeof(e.originalEvent.touches) != 'undefined' ) ? e.originalEvent.touches[0].pageX : e.pageX;
545
+ self.my = ( typeof(e.originalEvent.touches) != 'undefined' ) ? e.originalEvent.touches[0].pageY : e.pageY;
546
+
547
+ }).on(event_end, this, function (e) {
548
+
549
+ clearTimeout(self.controlTimer);
550
+ //event.data.removeBits();
551
+ if (self.lens) {
552
+ self.lens.fadeOut(299);
553
+ }
554
+ if (self.tint) {
555
+ self.tint.fadeOut(299);
556
+ }
557
+ if (self.softFocus) {
558
+ self.softFocus.fadeOut(299);
559
+ }
560
+ self.zoomDiv.fadeOut(300, function () {
561
+ self._onLeave();
562
+ });
563
+
564
+ return false;
565
+
566
+ }).on(event_click, this, function (e) {
567
+ self.options.onClick();
568
+ }).on(event_ent, this, function (e) {
569
+
570
+ if ( $( '#yith_wczm_traffic_light' ).val() == 'free' ){
571
+
572
+ self.options.onEnter();
573
+
574
+ if (touchy) {
575
+ e.preventDefault();
576
+ }
577
+
578
+ self.mx = ( typeof(e.originalEvent.touches) != 'undefined' ) ? e.originalEvent.touches[0].pageX : e.pageX;
579
+ self.my = ( typeof(e.originalEvent.touches) != 'undefined' ) ? e.originalEvent.touches[0].pageY : e.pageY;
580
+
581
+ self.zw = e.data;
582
+ if (self.zoomDiv) {
583
+ self.zoomDiv.stop(true, false);
584
+ self.zoomDiv.remove();
585
+ }
586
+
587
+ var xPos = self.options.adjustX,
588
+ yPos = self.options.adjustY;
589
+
590
+ var siw = zoomImage.outerWidth();
591
+ var sih = zoomImage.outerHeight();
592
+
593
+ var w = self.options.zoomWidth;
594
+ var h = self.options.zoomHeight;
595
+
596
+ if (self.options.zoomWidth == 'auto') {
597
+ w = siw;
598
+ }
599
+
600
+ if (self.options.zoomHeight == 'auto') {
601
+ h = sih;
602
+ }
603
+
604
+ var appendTo = zoom.parent();
605
+ switch (self.options.position) {
606
+ case 'top':
607
+ yPos -= h;
608
+ break;
609
+ case 'right':
610
+ xPos += siw;
611
+ break;
612
+ case 'bottom':
613
+ yPos += sih;
614
+ break;
615
+ case 'left':
616
+ xPos -= w;
617
+ break;
618
+ case 'inside':
619
+ w = siw;
620
+ h = sih;
621
+ break;
622
+
623
+ // All other values, try and find an id in the dom to attach to.
624
+ default:
625
+ appendTo = $('#' + self.options.position);
626
+ // If dom element doesn't exit, just use 'right' position as default.
627
+ if (!appendTo.length) {
628
+ appendTo = zoom;
629
+ xPos += siw; //+ opts.adjustX;
630
+ yPos += sih; // + opts.adjustY;
631
+ } else {
632
+ w = appendTo.innerWidth();
633
+ h = appendTo.innerHeight();
634
+ }
635
+ }
636
+
637
+ if (self.isPhone && self.options.phoneBehavior == 'inside') {
638
+ w = siw;
639
+ h = sih;
640
+ xPos = 0;
641
+ yPos = 0;
642
+ }
643
+
644
+ self.zoomDiv = $('<div class="yith_magnifier_zoom_magnifier" />').css({
645
+ left : xPos,
646
+ top : yPos,
647
+ width : w,
648
+ height : h,
649
+ 'background-repeat': 'no-repeat',
650
+ backgroundImage : 'url(' + zoomImg.src + ')'
651
+ }).appendTo(appendTo);
652
+
653
+
654
+ // Add the title from title tag.
655
+ if (zoomImage.attr('title') && self.options.showTitle) {
656
+ $('<div class="yith_magnifier_title">' + zoomImage.attr('title') + '</div>').appendTo(self.zoomDiv);
657
+ }
658
+
659
+ if (self.isPhone) {
660
+ if (self.options.phoneBehavior != 'disable') {
661
+ self.zoomDiv.fadeIn(500);
662
+ } else {
663
+ self.lens.fadeOut(299);
664
+ }
665
+ } else {
666
+ self.zoomDiv.fadeIn(500);
667
+ }
668
+
669
+ if (self.lens) {
670
+ self.lens.remove();
671
+ self.lens = null;
672
+ }
673
+
674
+ if (zoomImg.width <= 1) {
675
+ self.cw = (zoomImage.outerWidth() / zoomImg.naturalWidth) * self.zoomDiv.width();
676
+ } else {
677
+ self.cw = (zoomImage.outerWidth() / zoomImg.width) * self.zoomDiv.width();
678
+ }
679
+
680
+ if (zoomImg.height <= 1) {
681
+ self.ch = (zoomImage.outerHeight() / zoomImg.naturalHeight) * self.zoomDiv.height();
682
+ } else {
683
+ self.ch = (zoomImage.outerHeight() / zoomImg.height) * self.zoomDiv.height();
684
+ }
685
+
686
+ // Attach mouse, initially invisible to prevent first frame glitch
687
+ self.lens = $('<div class="yith_magnifier_lens" />').css({
688
+ width : self.cw,
689
+ height: self.ch
690
+ }).appendTo(zoom);
691
+
692
+ self.mouseTrap.css('cursor', self.lens.css('cursor'));
693
+
694
+ var noTrans = false;
695
+
696
+
697
+ // Init tint layer if needed. (Not relevant if using inside mode)
698
+ if (self.options.tint) {
699
+ //self.lens.css('background', 'url("' + zoomImage.attr('src') + '")');
700
+ self.tint = $('<div />').css({
701
+ display : 'none',
702
+ position : 'absolute',
703
+ left : 0,
704
+ top : 0,
705
+ width : zoomImage.outerWidth(),
706
+ height : zoomImage.outerHeight(),
707
+ backgroundColor: self.options.tint,
708
+ opacity : self.options.tintOpacity
709
+ }).appendTo(zoom);
710
+
711
+
712
+ self.lens.append($('<img />', {
713
+ src: zoomImage.attr('src')
714
+ }));
715
+
716
+ noTrans = true;
717
+ self.tint.fadeIn(500);
718
+ }
719
+
720
+ if (self.options.softFocus) {
721
+ //self.lens.css('background', 'url("' + zoomImage.attr('src') + '")');
722
+ self.softFocus = $('<div />').css({
723
+ position: 'absolute',
724
+ display : 'none',
725
+ top : '1px',
726
+ left : '1px',
727
+ width : zoomImage.outerWidth(),
728
+ height : zoomImage.outerHeight(),
729
+ //background: 'url("' + zoomImage.attr('src') + '")',
730
+ //backgroundSize: '100%',
731
+ opacity : .5
732
+ }).appendTo(zoom);
733
+
734
+ self.softFocus.append($('<img />', {
735
+ src: zoomImage.attr('src')
736
+ }));
737
+
738
+ if (self.lens.find('img').length == 0) {
739
+ self.lens.append($('<img />', {
740
+ src: zoomImage.attr('src')
741
+ }));
742
+ }
743
+
744
+ noTrans = true;
745
+ self.softFocus.fadeIn(500);
746
+ }
747
+
748
+
749
+ if (!noTrans) {
750
+ self.lens.css('opacity', self.options.lensOpacity);
751
+ }
752
+ if (self.options.position !== 'inside') {
753
+ self.lens.fadeIn(500);
754
+ }
755
+
756
+ // Start processing.
757
+ self.zw._controlLoop();
758
+
759
+ return; // Don't return false here otherwise opera will not detect change of the mouse pointer type.
760
+
761
+ }
762
+
763
+ });
764
+
765
+ },
766
+
767
+ /**
768
+ *
769
+ *
770
+ * @private
771
+ */
772
+ _controlLoop: function () {
773
+ var self = this;
774
+
775
+ if (this.lens) {
776
+ var x = (this.mx - this.zoomImage.offset().left - (this.cw * 0.5)) >> 0;
777
+ var y = (this.my - this.zoomImage.offset().top - (this.ch * 0.5)) >> 0;
778
+
779
+ if (x < 0) {
780
+ x = 0;
781
+ } else if (x > (this.zoomImage.outerWidth() - this.cw)) {
782
+ x = (this.zoomImage.outerWidth() - this.cw);
783
+ }
784
+
785
+ if (y < 0) {
786
+ y = 0;
787
+ } else if (y > (this.zoomImage.outerHeight() - this.ch)) {
788
+ y = (this.zoomImage.outerHeight() - this.ch);
789
+ }
790
+
791
+ this.lens.css({
792
+ left: x - 2,
793
+ top: y - 1
794
+ });
795
+
796
+ //this.lens.css('background-position', (-x) + 'px ' + (-y) + 'px');
797
+
798
+
799
+ this.lens.find('img').css({
800
+ width: this.zoomImage.outerWidth(),
801
+ height: this.zoomImage.outerHeight(),
802
+ marginLeft: (-x) + 'px ',
803
+ marginTop: (-y) + 'px'
804
+ });
805
+
806
+
807
+ if (this.IMG_zoomImage.width <= 1) {
808
+ this.destU = (((x) / this.zoomImage.outerWidth()) * this.IMG_zoomImage.naturalWidth) >> 0;
809
+ } else {
810
+ this.destU = (((x) / this.zoomImage.outerWidth()) * this.IMG_zoomImage.width) >> 0;
811
+ }
812
+
813
+ if (this.IMG_zoomImage.height <= 1) {
814
+ this.destV = (((y) / this.zoomImage.outerHeight()) * this.IMG_zoomImage.naturalHeight) >> 0;
815
+ } else {
816
+ this.destV = (((y) / this.zoomImage.outerHeight()) * this.IMG_zoomImage.height) >> 0;
817
+ }
818
+
819
+
820
+ this.currU += (this.destU - this.currU) / this.options.smoothMove;
821
+ this.currV += (this.destV - this.currV) / this.options.smoothMove;
822
+
823
+ this.zoomDiv.css('background-position', (-(this.currU >> 0) + 'px ') + (-(this.currV >> 0) + 'px'));
824
+ }
825
+
826
+ this.controlTimer = setTimeout(function () {
827
+ self._controlLoop();
828
+ }, 30);
829
+ },
830
+
831
+ /**
832
+ * This method is called when the mouse leave the image
833
+ *
834
+ * @private
835
+ */
836
+ _onLeave: function () {
837
+ this.options.onLeave();
838
+
839
+ if (this.zoomDiv) {
840
+ this.zoomDiv.remove();
841
+ this.zoomDiv = null;
842
+ }
843
+
844
+ this._removeElements();
845
+ },
846
+
847
+ /**
848
+ * Remove lens, tint and softfocus
849
+ *
850
+ * @private
851
+ */
852
+ _removeElements: function () {
853
+ if (this.lens) {
854
+ this.lens.remove();
855
+ this.lens = null;
856
+ }
857
+
858
+ if (this.tint) {
859
+ this.tint.remove();
860
+ this.tint = null;
861
+ }
862
+
863
+ if (this.softFocus) {
864
+ this.softFocus.remove();
865
+ this.softFocus = null;
866
+ }
867
+
868
+ if (this.element.find('.yith_magnifier_loading').length > 0) {
869
+ this.element.find('.yith_magnifier_loading').remove();
870
+ }
871
+ },
872
+
873
+ /**
874
+ * Detect if user is using a phone device (eg iPhone)
875
+ *
876
+ * @private
877
+ */
878
+ _isPhone: function () {
879
+ var userAgent = navigator.userAgent.toLowerCase();
880
+
881
+ return ( userAgent.match(/iphone/i) || userAgent.match(/ipod/i) || userAgent.match(/android/i) );
882
+ },
883
+
884
+ /**
885
+ * Destroy the instance
886
+ *
887
+ */
888
+ destroy: function () {
889
+ if (this.zoom) {
890
+ this.zoom.unwrap();
891
+ }
892
+
893
+ if (this.mouseTrap) {
894
+ this.mouseTrap.unbind();
895
+ this.mouseTrap.remove();
896
+ this.mouseTrap = null;
897
+ }
898
+
899
+ if (this.zoomDiv) {
900
+ this.zoomDiv.remove();
901
+ this.zoomDiv = null;
902
+ }
903
+
904
+ if (this.options.disableRightClick) {
905
+ $(document).unbind();
906
+ }
907
+
908
+ this._removeElements();
909
+ this.options.elements.gallery.unbind();
910
+ this.element.removeData('yith_magnifier');
911
+ }
912
+ };
913
+
914
+ $.fn.yith_magnifier = function (options) {
915
+
916
+ if (typeof options === 'string') {
917
+ var args = Array.prototype.slice.call(arguments, 1);
918
+
919
+ this.each(function () {
920
+ var instance = $.data(this, 'yith_magnifier');
921
+ if (!instance) {
922
+ $.error("cannot call methods on yith_magnifier prior to initialization; " +
923
+ "attempted to call method '" + options + "'");
924
+ return;
925
+ }
926
+ if (!$.isFunction(instance[options]) || options.charAt(0) === "_") {
927
+ $.error("no such method '" + options + "' for yith_magnifier instance");
928
+ return;
929
+ }
930
+ instance[options].apply(instance, args);
931
+ });
932
+ } else {
933
+ this.each(function () {
934
+ var instance = $.data(this, 'yith_magnifier');
935
+ if (!instance) {
936
+ $.data(this, 'yith_magnifier', new $.yith_magnifier(options, this));
937
+ } else {
938
+ $.error('yith_magnifier already istantiated.');
939
+ }
940
+ });
941
+ }
942
+ return this;
943
+ };
944
+
945
+
946
+ })(window, jQuery);
assets/js/yith_magnifier.min.js CHANGED
@@ -1 +1 @@
1
- !function(t,i,o){"use strict";void 0===i.fn.imagesLoaded&&function(t,i){var o="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";t.fn.imagesLoaded=function(i){var e=this,n=t.isFunction(t.Deferred)?t.Deferred():0,s=t.isFunction(n.notify),a=e.find("img").add(e.filter("img")),r=[],m=[],h=[];function l(){var o=t(m),s=t(h);n&&(h.length?n.reject(a,o,s):n.resolve(a)),t.isFunction(i)&&i.call(e,a,o,s)}function c(t){g(t.target,"error"===t.type)}function g(i,e){i.src!==o&&-1===t.inArray(i,r)&&(r.push(i),e?h.push(i):m.push(i),t.data(i,"imagesLoaded",{isBroken:e,src:i.src}),s&&n.notifyWith(t(i),[e,a,t(m),t(h)]),a.length===r.length&&(setTimeout(l),a.unbind(".imagesLoaded",c)))}return t.isPlainObject(i)&&t.each(i,function(t,o){"callback"===t?i=o:n&&n[t](o)}),a.length?a.bind("load.imagesLoaded error.imagesLoaded",c).each(function(i,e){var n=e.src,s=t.data(e,"imagesLoaded");s&&s.src===n?g(e,s.isBroken):e.complete&&void 0!==e.naturalWidth?g(e,0===e.naturalWidth||0===e.naturalHeight):(e.readyState||e.complete)&&(e.src=o,e.src=n)}):l(),n?n.promise(e):e}}(jQuery),i.yith_magnifier=function(t,o){this.t=o,this.element=i(o),this._init(t)},i.yith_magnifier.defaults={zoomWidth:"auto",zoomHeight:"auto",position:"right",tint:!1,tintOpacity:.5,lensOpacity:.5,softFocus:!1,smoothMove:3,showTitle:!0,titleOpacity:.5,adjustX:0,adjustY:0,phoneBehavior:"inside",loadingLabel:"Loading...",enableSlider:!0,slider:"carouFredSel",sliderOptions:{},from_gallery:"no",onLoad:function(){return!1},onEnter:function(){return!1},onLeave:function(){return!1},onMove:function(){return!1},onClick:function(){return!1},elements:{zoom:i(".yith_magnifier_zoom"),zoomImage:i(".yith_magnifier_zoom img").first(),gallery:i(".yith_magnifier_gallery li a")}},i.yith_magnifier.prototype={_init:function(t){var o=this;i(document).trigger("yith_magnifier_before_init"),i.each(i.yith_magnifier.defaults.elements,function(t,e){i.yith_magnifier.defaults.elements[t]=i(e,o)}),o.options=i.extend(!0,{},i.yith_magnifier.defaults,t),o.isPhone=o._isPhone(),o._loading(),o.element.imagesLoaded(function(){o.options.onLoad(),o._initZoom(),o._initGallery()}),i(document).trigger("yith_magnifier_after_init")},_initGallery:function(){var t=this,o=t.options.elements,e=o.gallery,n=o.zoom,s=o.zoomImage;e.length>0?(e.on("click",function(o){o.preventDefault(),t.options.from_gallery="yes";var e=i(this);t.destroy(),n.attr("href",this.href),s.attr("src",e.data("small")).attr("srcset",e.data("small")).attr("src-orig",e.data("small")).attr("title","").attr("title",e.attr("title")),i.data(t.t,"yith_magnifier",new i.yith_magnifier(t.options,t.element))}),t.options.enableSlider&&(e.closest("ul").trigger("yith_magnifier_slider_destroy"),e.closest("ul")[t.options.slider](t.options.sliderOptions))):e.on("click",function(t){return t.preventDefault(),!1})},_loading:function(){if(this.options.disableRightClick&&i(document).on("contextmenu",function(t){return!1}),void 0===this.mouseTrap){var t=this.options.elements.zoom.width();this.options.loadingLabel&&i('<div class="yith_magnifier_loading">'+this.options.loadingLabel+"</div>").css({width:t,"text-align":"center",opacity:.5}).appendTo(this.options.elements.zoom.parent())}},_initZoom:function(){var t=this;t.zoom=t.options.elements.zoom,t.zoomImage=t.options.elements.zoomImage;var o="yith_magnifier_zoom_wrap";t.options.zoom_wrap_additional_css&&(i("."+o).length||(o+=" "+t.options.zoom_wrap_additional_css)),t.zoom.wrap('<div class="'+o+'"></div>'),t.IMG_zoomImage=new Image;var e=i(".woocommerce-variation-add-to-cart .variation_id").val();if(i.isNumeric(e)&&0!=e&&"no"==t.options.from_gallery){var n={action:"yith_wc_zoom_magnifier_get_main_image",product_id:e,context:"frontend"};i.ajax({data:n,url:yith_wc_zoom_magnifier_storage_object.ajax_url,type:"post",error:function(t){console.log("ERROR - Yith_WC_Zoom_Magnifier"),console.log(t)},success:function(o){t.IMG_zoomImage.src=o.url,t.IMG_smallImage=new Image,t.IMG_smallImage.src=t.zoomImage.attr("src"),o.gallery&&(i(".yith_magnifier_gallery").length?i(".yith_magnifier_gallery").closest(".thumbnails").replaceWith(o.gallery):i(".images").append(o.gallery),t.options.elements.gallery=i(".yith_magnifier_gallery li a")),i.browser&&i.browser.msie&&8==i.browser.version?i(t.IMG_zoomImage).load(function(){t._initGallery(),t._initTrap()}):i([t.IMG_zoomImage,t.IMG_smallImage]).imagesLoaded(function(){t._initGallery(),t._initTrap()}),i(document).trigger("yith_magnifier_after_init_zoom")}})}else t.IMG_zoomImage.src=t.zoom.attr("href"),t.IMG_smallImage=new Image,t.IMG_smallImage.src=t.zoomImage.attr("src"),i.browser&&i.browser.msie&&8==i.browser.version?i(t.IMG_zoomImage).load(function(){t._initTrap()}):i([t.IMG_zoomImage,t.IMG_smallImage]).imagesLoaded(function(){t._initTrap()}),i(document).trigger("yith_magnifier_after_init_zoom")},_initTrap:function(){var t=this,o=t.IMG_zoomImage;t.IMG_smallImage;t.mx=0,t.my=0,t.controlTimer=0,t.lens=null,t.tint=null,t.softFocus=null,t.zoomDiv=null,t.cw=0,t.ch=0,t.zw=0,t.destU=0,t.destV=0,t.currU=0,t.currV=0,t.mouseTrap=null;var e=t.options.elements.zoom,n=t.options.elements.zoomImage;i(".yith_magnifier_loading").remove(),this.element.find(".yith_magnifier_mousetrap")&&this.element.find(".yith_magnifier_mousetrap").remove(),this.mouseTrap=i('<div class="yith_magnifier_mousetrap" />').css({width:"100%",height:"100%",top:0,left:0}).appendTo(e.parent());var s="ontouchstart"in document.documentElement;this.mouseTrap.on("touchmove mousemove",this,function(i){t.options.onMove(),t.mx=void 0!==i.originalEvent.touches?i.originalEvent.touches[0].pageX:i.pageX,t.my=void 0!==i.originalEvent.touches?i.originalEvent.touches[0].pageY:i.pageY}).on("touchend mouseleave",this,function(i){return clearTimeout(t.controlTimer),t.lens&&t.lens.fadeOut(299),t.tint&&t.tint.fadeOut(299),t.softFocus&&t.softFocus.fadeOut(299),t.zoomDiv.fadeOut(300,function(){t._onLeave()}),!1}).on("touchstart click",this,function(i){t.options.onClick()}).on("touchstart mouseenter",this,function(a){t.options.onEnter(),s&&a.preventDefault(),t.mx=void 0!==a.originalEvent.touches?a.originalEvent.touches[0].pageX:a.pageX,t.my=void 0!==a.originalEvent.touches?a.originalEvent.touches[0].pageY:a.pageY,t.zw=a.data,t.zoomDiv&&(t.zoomDiv.stop(!0,!1),t.zoomDiv.remove());var r=t.options.adjustX,m=t.options.adjustY,h=n.outerWidth(),l=n.outerHeight(),c=t.options.zoomWidth,g=t.options.zoomHeight;"auto"==t.options.zoomWidth&&(c=h),"auto"==t.options.zoomHeight&&(g=l);var u=e.parent();switch(t.options.position){case"top":m-=g;break;case"right":r+=h;break;case"bottom":m+=l;break;case"left":r-=c;break;case"inside":c=h,g=l;break;default:(u=i("#"+t.options.position)).length?(c=u.innerWidth(),g=u.innerHeight()):(u=e,r+=h,m+=l)}t.isPhone&&"inside"==t.options.phoneBehavior&&(c=h,g=l,r=0,m=0),t.zoomDiv=i('<div class="yith_magnifier_zoom_magnifier" />').css({left:r,top:m,width:c,height:g,"background-repeat":"no-repeat",backgroundImage:"url("+o.src+")"}).appendTo(u),n.attr("title")&&t.options.showTitle&&i('<div class="yith_magnifier_title">'+n.attr("title")+"</div>").appendTo(t.zoomDiv),t.isPhone?"disable"!=t.options.phoneBehavior?t.zoomDiv.fadeIn(500):t.lens.fadeOut(299):t.zoomDiv.fadeIn(500),t.lens&&(t.lens.remove(),t.lens=null),o.width<=1?t.cw=n.outerWidth()/o.naturalWidth*t.zoomDiv.width():t.cw=n.outerWidth()/o.width*t.zoomDiv.width(),o.height<=1?t.ch=n.outerHeight()/o.naturalHeight*t.zoomDiv.height():t.ch=n.outerHeight()/o.height*t.zoomDiv.height(),t.lens=i('<div class="yith_magnifier_lens" />').css({width:t.cw,height:t.ch}).appendTo(e),t.mouseTrap.css("cursor",t.lens.css("cursor"));var d=!1;t.options.tint&&(t.tint=i("<div />").css({display:"none",position:"absolute",left:0,top:0,width:n.outerWidth(),height:n.outerHeight(),backgroundColor:t.options.tint,opacity:t.options.tintOpacity}).appendTo(e),t.lens.append(i("<img />",{src:n.attr("src")})),d=!0,t.tint.fadeIn(500)),t.options.softFocus&&(t.softFocus=i("<div />").css({position:"absolute",display:"none",top:"1px",left:"1px",width:n.outerWidth(),height:n.outerHeight(),opacity:.5}).appendTo(e),t.softFocus.append(i("<img />",{src:n.attr("src")})),0==t.lens.find("img").length&&t.lens.append(i("<img />",{src:n.attr("src")})),d=!0,t.softFocus.fadeIn(500)),d||t.lens.css("opacity",t.options.lensOpacity),"inside"!==t.options.position&&t.lens.fadeIn(500),t.zw._controlLoop()})},_controlLoop:function(){var t=this;if(this.lens){var i=this.mx-this.zoomImage.offset().left-.5*this.cw>>0,o=this.my-this.zoomImage.offset().top-.5*this.ch>>0;i<0?i=0:i>this.zoomImage.outerWidth()-this.cw&&(i=this.zoomImage.outerWidth()-this.cw),o<0?o=0:o>this.zoomImage.outerHeight()-this.ch&&(o=this.zoomImage.outerHeight()-this.ch),this.lens.css({left:i-2,top:o-1}),this.lens.find("img").css({width:this.zoomImage.outerWidth(),height:this.zoomImage.outerHeight(),marginLeft:-i+"px ",marginTop:-o+"px"}),this.IMG_zoomImage.width<=1?this.destU=i/this.zoomImage.outerWidth()*this.IMG_zoomImage.naturalWidth>>0:this.destU=i/this.zoomImage.outerWidth()*this.IMG_zoomImage.width>>0,this.IMG_zoomImage.height<=1?this.destV=o/this.zoomImage.outerHeight()*this.IMG_zoomImage.naturalHeight>>0:this.destV=o/this.zoomImage.outerHeight()*this.IMG_zoomImage.height>>0,this.currU+=(this.destU-this.currU)/this.options.smoothMove,this.currV+=(this.destV-this.currV)/this.options.smoothMove,this.zoomDiv.css("background-position",-(this.currU>>0)+"px "+-(this.currV>>0)+"px")}this.controlTimer=setTimeout(function(){t._controlLoop()},30)},_onLeave:function(){this.options.onLeave(),this.zoomDiv&&(this.zoomDiv.remove(),this.zoomDiv=null),this._removeElements()},_removeElements:function(){this.lens&&(this.lens.remove(),this.lens=null),this.tint&&(this.tint.remove(),this.tint=null),this.softFocus&&(this.softFocus.remove(),this.softFocus=null),this.element.find(".yith_magnifier_loading").length>0&&this.element.find(".yith_magnifier_loading").remove()},_isPhone:function(){var t=navigator.userAgent.toLowerCase();return t.match(/iphone/i)||t.match(/ipod/i)||t.match(/android/i)},destroy:function(){this.zoom&&this.zoom.unwrap(),this.mouseTrap&&(this.mouseTrap.unbind(),this.mouseTrap.remove(),this.mouseTrap=null),this.zoomDiv&&(this.zoomDiv.remove(),this.zoomDiv=null),this.options.disableRightClick&&i(document).unbind(),this._removeElements(),this.options.elements.gallery.unbind(),this.element.removeData("yith_magnifier")}},i.fn.yith_magnifier=function(t){if("string"==typeof t){var o=Array.prototype.slice.call(arguments,1);this.each(function(){var e=i.data(this,"yith_magnifier");e?i.isFunction(e[t])&&"_"!==t.charAt(0)?e[t].apply(e,o):i.error("no such method '"+t+"' for yith_magnifier instance"):i.error("cannot call methods on yith_magnifier prior to initialization; attempted to call method '"+t+"'")})}else this.each(function(){i.data(this,"yith_magnifier")?i.error("yith_magnifier already istantiated."):i.data(this,"yith_magnifier",new i.yith_magnifier(t,this))});return this}}(window,jQuery);
1
+ !function(t,i,o){"use strict";void 0===i.fn.imagesLoaded&&function(t,i){var o="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";t.fn.imagesLoaded=function(i){var e=this,n=t.isFunction(t.Deferred)?t.Deferred():0,a=t.isFunction(n.notify),s=e.find("img").add(e.filter("img")),r=[],h=[],m=[];function l(){var o=t(h),a=t(m);n&&(m.length?n.reject(s,o,a):n.resolve(s)),t.isFunction(i)&&i.call(e,s,o,a)}function c(t){g(t.target,"error"===t.type)}function g(i,e){i.src!==o&&-1===t.inArray(i,r)&&(r.push(i),e?m.push(i):h.push(i),t.data(i,"imagesLoaded",{isBroken:e,src:i.src}),a&&n.notifyWith(t(i),[e,s,t(h),t(m)]),s.length===r.length&&(setTimeout(l),s.unbind(".imagesLoaded",c)))}return t.isPlainObject(i)&&t.each(i,function(t,o){"callback"===t?i=o:n&&n[t](o)}),s.length?s.bind("load.imagesLoaded error.imagesLoaded",c).each(function(i,e){var n=e.src,a=t.data(e,"imagesLoaded");a&&a.src===n?g(e,a.isBroken):e.complete&&void 0!==e.naturalWidth?g(e,0===e.naturalWidth||0===e.naturalHeight):(e.readyState||e.complete)&&(e.src=o,e.src=n)}):l(),n?n.promise(e):e}}(jQuery),i.yith_magnifier=function(t,o){this.t=o,this.element=i(o),this._init(t)},i.yith_magnifier.defaults={zoomWidth:"auto",zoomHeight:"auto",position:"right",tint:!1,tintOpacity:.5,lensOpacity:.5,softFocus:!1,smoothMove:3,showTitle:!0,titleOpacity:.5,adjustX:0,adjustY:0,phoneBehavior:"inside",loadingLabel:"Loading...",enableSlider:!0,slider:"carouFredSel",sliderOptions:{},from_gallery:"no",onLoad:function(){return!1},onEnter:function(){return!1},onLeave:function(){return!1},onMove:function(){return!1},onClick:function(){return!1},elements:{zoom:i(".yith_magnifier_zoom"),zoomImage:i(".yith_magnifier_zoom img").first(),gallery:i(".yith_magnifier_gallery li a")}},i.yith_magnifier.prototype={_init:function(t){var o=this;i(document).trigger("yith_magnifier_before_init"),i.each(i.yith_magnifier.defaults.elements,function(t,e){i.yith_magnifier.defaults.elements[t]=i(e,o)}),o.options=i.extend(!0,{},i.yith_magnifier.defaults,t),o.isPhone=o._isPhone(),o._loading(),o.element.imagesLoaded(function(){o.options.onLoad(),o._initZoom(),o._initGallery()}),i(document).trigger("yith_magnifier_after_init")},_initGallery:function(){var t=this,o=t.options.elements,e=o.gallery,n=o.zoom,a=o.zoomImage;e.length>0?(e.on("click",function(o){if(o.preventDefault(),"free"==i("#yith_wczm_traffic_light").val()){i("#yith_wczm_traffic_light").val("blocked"),t.options.from_gallery="yes";var e=i(this);t.destroy(),n.attr("href",this.href),a.attr("src",e.data("small")).attr("srcset",e.data("small")).attr("src-orig",e.data("small")).attr("title","").attr("title",e.attr("title")),i.data(t.t,"yith_magnifier",new i.yith_magnifier(t.options,t.element)),i("#yith_wczm_traffic_light").val("free")}}),t.options.enableSlider&&e.closest("ul").trigger("yith_magnifier_slider_destroy")):e.on("click",function(t){return t.preventDefault(),!1})},_loading:function(){if(this.options.disableRightClick&&i(document).on("contextmenu",function(t){return!1}),void 0===this.mouseTrap){var t=this.options.elements.zoom.width();this.options.loadingLabel&&i('<div class="yith_magnifier_loading">'+this.options.loadingLabel+"</div>").css({width:t,"text-align":"center",opacity:.5}).appendTo(this.options.elements.zoom.parent())}},_initZoom:function(){if("free"==i("#yith_wczm_traffic_light").val()){i("#yith_wczm_traffic_light").val("blocked");var t=this;t.zoom=t.options.elements.zoom,t.zoomImage=t.options.elements.zoomImage;var o="yith_magnifier_zoom_wrap";if(t.options.zoom_wrap_additional_css){if(i("."+o).length)return;o+=" "+t.options.zoom_wrap_additional_css}t.zoom.wrap('<div class="'+o+'"></div>'),t.IMG_zoomImage=new Image;var e=i(".woocommerce-variation-add-to-cart .variation_id").val();if(i.isNumeric(e)&&0!=e&&"no"==t.options.from_gallery&&"1"==yith_wc_zoom_magnifier_storage_object.zoom_condition){var n={action:"yith_wc_zoom_magnifier_get_main_image",product_id:e,context:"frontend"};i.ajax({data:n,url:yith_wc_zoom_magnifier_storage_object.ajax_url,type:"post",error:function(t){console.log("ERROR - Yith_WC_Zoom_Magnifier"),console.log(t),i("#yith_wczm_traffic_light").val("free")},success:function(o){t.zoom.attr("href",o.url),t.IMG_zoomImage.src=o.url,t.IMG_smallImage=new Image,t.IMG_smallImage.src=t.zoomImage.attr("src"),o.gallery&&(i(".yith_magnifier_gallery").length?i(".yith_magnifier_gallery").closest(".thumbnails").replaceWith(o.gallery):i(".images").append(o.gallery),t.options.elements.gallery=i(".yith_magnifier_gallery li a")),i.browser&&i.browser.msie&&8==i.browser.version?i(t.IMG_zoomImage).load(function(){t._initGallery(),t._initTrap()}):i([t.IMG_zoomImage,t.IMG_smallImage]).imagesLoaded(function(){t._initGallery(),t._initTrap()}),i(document).on("click","a.yith_expand",function(o){o.preventDefault(),i().prettyPhoto({social_tools:!1,theme:"pp_woocommerce",horizontal_padding:20,opacity:.8,deeplinking:!1,callback:function(){i(".yith_expand").css("display","inline")}}),i.prettyPhoto.open(t.zoom[0].href,"",""),i(".yith_expand").css("display","none"),i(".pp_woocommerce .ppt").css({height:0,marginBottom:0})}),i(document).trigger("yith_magnifier_after_init_zoom"),i("#yith_wczm_traffic_light").val("free")}})}else t.IMG_zoomImage.src=t.zoom.attr("href"),t.IMG_smallImage=new Image,t.IMG_smallImage.src=t.zoomImage.attr("src"),i.browser&&i.browser.msie&&8==i.browser.version?i(t.IMG_zoomImage).load(function(){t._initTrap()}):i([t.IMG_zoomImage,t.IMG_smallImage]).imagesLoaded(function(){t._initTrap()}),i(document).on("click","a.yith_expand",function(o){o.preventDefault(),i().prettyPhoto({social_tools:!1,theme:"pp_woocommerce",horizontal_padding:20,opacity:.8,deeplinking:!1,callback:function(){i(".yith_expand").css("display","inline")}}),i.prettyPhoto.open(t.zoom[0].href,"",""),i(".yith_expand").css("display","none"),i(".pp_woocommerce .ppt").css({height:0,marginBottom:0})}),i(document).trigger("yith_magnifier_after_init_zoom"),i("#yith_wczm_traffic_light").val("free")}},_initTrap:function(){var t=this,o=t.IMG_zoomImage;t.IMG_smallImage;t.mx=0,t.my=0,t.controlTimer=0,t.lens=null,t.tint=null,t.softFocus=null,t.zoomDiv=null,t.cw=0,t.ch=0,t.zw=0,t.destU=0,t.destV=0,t.currU=0,t.currV=0,t.mouseTrap=null;var e=t.options.elements.zoom,n=t.options.elements.zoomImage;if(i(".yith_magnifier_loading").remove(),this.element.find(".yith_magnifier_mousetrap")&&this.element.find(".yith_magnifier_mousetrap").remove(),this.mouseTrap=i('<div class="yith_magnifier_mousetrap pp_woocommerce" />').css({width:"100%",height:"100%",top:0,left:0}).appendTo(e.parent()),"undefined"!=typeof ywzm_data&&i('<a href="#" class="yith_expand" title="'+ywzm_data.expand_label+'" style="display: inline;">Expand</a>').appendTo(this.mouseTrap),!t.isPhone||"disable"!=t.options.phoneBehavior){var a="ontouchstart"in document.documentElement;this.mouseTrap.on("touchmove mousemove",this,function(i){t.options.onMove(),t.mx=void 0!==i.originalEvent.touches?i.originalEvent.touches[0].pageX:i.pageX,t.my=void 0!==i.originalEvent.touches?i.originalEvent.touches[0].pageY:i.pageY}).on("touchend mouseleave",this,function(i){return clearTimeout(t.controlTimer),t.lens&&t.lens.fadeOut(299),t.tint&&t.tint.fadeOut(299),t.softFocus&&t.softFocus.fadeOut(299),t.zoomDiv.fadeOut(300,function(){t._onLeave()}),!1}).on("touchstart click",this,function(i){t.options.onClick()}).on("touchstart mouseenter",this,function(s){if("free"==i("#yith_wczm_traffic_light").val()){t.options.onEnter(),a&&s.preventDefault(),t.mx=void 0!==s.originalEvent.touches?s.originalEvent.touches[0].pageX:s.pageX,t.my=void 0!==s.originalEvent.touches?s.originalEvent.touches[0].pageY:s.pageY,t.zw=s.data,t.zoomDiv&&(t.zoomDiv.stop(!0,!1),t.zoomDiv.remove());var r=t.options.adjustX,h=t.options.adjustY,m=n.outerWidth(),l=n.outerHeight(),c=t.options.zoomWidth,g=t.options.zoomHeight;"auto"==t.options.zoomWidth&&(c=m),"auto"==t.options.zoomHeight&&(g=l);var d=e.parent();switch(t.options.position){case"top":h-=g;break;case"right":r+=m;break;case"bottom":h+=l;break;case"left":r-=c;break;case"inside":c=m,g=l;break;default:(d=i("#"+t.options.position)).length?(c=d.innerWidth(),g=d.innerHeight()):(d=e,r+=m,h+=l)}t.isPhone&&"inside"==t.options.phoneBehavior&&(c=m,g=l,r=0,h=0),t.zoomDiv=i('<div class="yith_magnifier_zoom_magnifier" />').css({left:r,top:h,width:c,height:g,"background-repeat":"no-repeat",backgroundImage:"url("+o.src+")"}).appendTo(d),n.attr("title")&&t.options.showTitle&&i('<div class="yith_magnifier_title">'+n.attr("title")+"</div>").appendTo(t.zoomDiv),t.isPhone?"disable"!=t.options.phoneBehavior?t.zoomDiv.fadeIn(500):t.lens.fadeOut(299):t.zoomDiv.fadeIn(500),t.lens&&(t.lens.remove(),t.lens=null),o.width<=1?t.cw=n.outerWidth()/o.naturalWidth*t.zoomDiv.width():t.cw=n.outerWidth()/o.width*t.zoomDiv.width(),o.height<=1?t.ch=n.outerHeight()/o.naturalHeight*t.zoomDiv.height():t.ch=n.outerHeight()/o.height*t.zoomDiv.height(),t.lens=i('<div class="yith_magnifier_lens" />').css({width:t.cw,height:t.ch}).appendTo(e),t.mouseTrap.css("cursor",t.lens.css("cursor"));var u=!1;return t.options.tint&&(t.tint=i("<div />").css({display:"none",position:"absolute",left:0,top:0,width:n.outerWidth(),height:n.outerHeight(),backgroundColor:t.options.tint,opacity:t.options.tintOpacity}).appendTo(e),t.lens.append(i("<img />",{src:n.attr("src")})),u=!0,t.tint.fadeIn(500)),t.options.softFocus&&(t.softFocus=i("<div />").css({position:"absolute",display:"none",top:"1px",left:"1px",width:n.outerWidth(),height:n.outerHeight(),opacity:.5}).appendTo(e),t.softFocus.append(i("<img />",{src:n.attr("src")})),0==t.lens.find("img").length&&t.lens.append(i("<img />",{src:n.attr("src")})),u=!0,t.softFocus.fadeIn(500)),u||t.lens.css("opacity",t.options.lensOpacity),"inside"!==t.options.position&&t.lens.fadeIn(500),void t.zw._controlLoop()}})}},_controlLoop:function(){var t=this;if(this.lens){var i=this.mx-this.zoomImage.offset().left-.5*this.cw>>0,o=this.my-this.zoomImage.offset().top-.5*this.ch>>0;i<0?i=0:i>this.zoomImage.outerWidth()-this.cw&&(i=this.zoomImage.outerWidth()-this.cw),o<0?o=0:o>this.zoomImage.outerHeight()-this.ch&&(o=this.zoomImage.outerHeight()-this.ch),this.lens.css({left:i-2,top:o-1}),this.lens.find("img").css({width:this.zoomImage.outerWidth(),height:this.zoomImage.outerHeight(),marginLeft:-i+"px ",marginTop:-o+"px"}),this.IMG_zoomImage.width<=1?this.destU=i/this.zoomImage.outerWidth()*this.IMG_zoomImage.naturalWidth>>0:this.destU=i/this.zoomImage.outerWidth()*this.IMG_zoomImage.width>>0,this.IMG_zoomImage.height<=1?this.destV=o/this.zoomImage.outerHeight()*this.IMG_zoomImage.naturalHeight>>0:this.destV=o/this.zoomImage.outerHeight()*this.IMG_zoomImage.height>>0,this.currU+=(this.destU-this.currU)/this.options.smoothMove,this.currV+=(this.destV-this.currV)/this.options.smoothMove,this.zoomDiv.css("background-position",-(this.currU>>0)+"px "+-(this.currV>>0)+"px")}this.controlTimer=setTimeout(function(){t._controlLoop()},30)},_onLeave:function(){this.options.onLeave(),this.zoomDiv&&(this.zoomDiv.remove(),this.zoomDiv=null),this._removeElements()},_removeElements:function(){this.lens&&(this.lens.remove(),this.lens=null),this.tint&&(this.tint.remove(),this.tint=null),this.softFocus&&(this.softFocus.remove(),this.softFocus=null),this.element.find(".yith_magnifier_loading").length>0&&this.element.find(".yith_magnifier_loading").remove()},_isPhone:function(){var t=navigator.userAgent.toLowerCase();return t.match(/iphone/i)||t.match(/ipod/i)||t.match(/android/i)},destroy:function(){this.zoom&&this.zoom.unwrap(),this.mouseTrap&&(this.mouseTrap.unbind(),this.mouseTrap.remove(),this.mouseTrap=null),this.zoomDiv&&(this.zoomDiv.remove(),this.zoomDiv=null),this.options.disableRightClick&&i(document).unbind(),this._removeElements(),this.options.elements.gallery.unbind(),this.element.removeData("yith_magnifier")}},i.fn.yith_magnifier=function(t){if("string"==typeof t){var o=Array.prototype.slice.call(arguments,1);this.each(function(){var e=i.data(this,"yith_magnifier");e?i.isFunction(e[t])&&"_"!==t.charAt(0)?e[t].apply(e,o):i.error("no such method '"+t+"' for yith_magnifier instance"):i.error("cannot call methods on yith_magnifier prior to initialization; attempted to call method '"+t+"'")})}else this.each(function(){i.data(this,"yith_magnifier")?i.error("yith_magnifier already istantiated."):i.data(this,"yith_magnifier",new i.yith_magnifier(t,this))});return this}}(window,jQuery);
assets/js/ywzm_frontend.js CHANGED
@@ -6,12 +6,15 @@
6
  */
7
  jQuery(document).ready(function ($) {
8
 
9
- var yith_wcmg = $('.images'),
10
- yith_wcmg_zoom = $('.yith_magnifier_zoom'),
11
- yith_wcmg_image = $('.yith_magnifier_zoom img').first(),
12
- yith_wcmg_default_zoom = yith_wcmg.find('.yith_magnifier_zoom').attr('href'),
13
- yith_wcmg_default_image = yith_wcmg.find('.yith_magnifier_zoom img').attr('src');
14
- yith_wcmg_default_gallery = yith_wcmg.find('.thumbnails');
 
 
 
15
 
16
  if (typeof yith_magnifier_options == 'undefined') {
17
  return false;
@@ -20,7 +23,6 @@ jQuery(document).ready(function ($) {
20
  yith_wcmg.yith_magnifier(yith_magnifier_options);
21
 
22
  $(document).on('found_variation', 'form.variations_form', function (event, variation) {
23
-
24
  var image_magnifier = variation.image_magnifier ? variation.image_magnifier : yith_wcmg_default_zoom;
25
 
26
  var image_src = yith_wcmg_default_image;
@@ -44,6 +46,7 @@ jQuery(document).ready(function ($) {
44
 
45
  yith_wcmg.yith_magnifier(yith_magnifier_options);
46
  }).on('reset_image', function (event) {
 
47
  yith_wcmg_zoom.attr('href', yith_wcmg_default_zoom);
48
  yith_wcmg_image.attr('src', yith_wcmg_default_image);
49
  yith_wcmg_image.attr('srcset', yith_wcmg_default_image);
@@ -58,5 +61,206 @@ jQuery(document).ready(function ($) {
58
  yith_wcmg.yith_magnifier(yith_magnifier_options);
59
  });
60
 
61
- $('form.variations_form .variations select').trigger('change');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62
  });
6
  */
7
  jQuery(document).ready(function ($) {
8
 
9
+ var yith_wcmg = $('.images');
10
+ var yith_wcmg_zoom = $('.yith_magnifier_zoom');
11
+ var yith_wcmg_image = $('.yith_magnifier_zoom img').first();
12
+
13
+ var yith_wcmg_default_zoom = yith_wcmg.find('.yith_magnifier_zoom').attr('href');
14
+ var yith_wcmg_default_image = yith_wcmg.find('.yith_magnifier_zoom img').attr('src');
15
+
16
+ var yith_wcmg_default_gallery = yith_wcmg.find('.thumbnails');
17
+
18
 
19
  if (typeof yith_magnifier_options == 'undefined') {
20
  return false;
23
  yith_wcmg.yith_magnifier(yith_magnifier_options);
24
 
25
  $(document).on('found_variation', 'form.variations_form', function (event, variation) {
 
26
  var image_magnifier = variation.image_magnifier ? variation.image_magnifier : yith_wcmg_default_zoom;
27
 
28
  var image_src = yith_wcmg_default_image;
46
 
47
  yith_wcmg.yith_magnifier(yith_magnifier_options);
48
  }).on('reset_image', function (event) {
49
+
50
  yith_wcmg_zoom.attr('href', yith_wcmg_default_zoom);
51
  yith_wcmg_image.attr('src', yith_wcmg_default_image);
52
  yith_wcmg_image.attr('srcset', yith_wcmg_default_image);
61
  yith_wcmg.yith_magnifier(yith_magnifier_options);
62
  });
63
 
64
+ if ( $( '.single-product.woocommerce div.product div.images ul.yith_magnifier_gallery' ).length ){
65
+
66
+ $('form.variations_form .variations select').trigger('change');
67
+
68
+ function yith_wc_zm_carousel(){
69
+
70
+ $( ".single-product.woocommerce div.product div.images div.thumbnails" ).css( 'width', $( ".single-product.woocommerce div.product div.images div.thumbnails" ).width() );
71
+
72
+ var yith_wc_zm_circular = $( '.single-product.woocommerce div.product div.images ul.yith_magnifier_gallery' ).data( 'circular' );
73
+ var yith_wc_zm_columns = $( '.single-product.woocommerce div.product div.images ul.yith_magnifier_gallery' ).data( 'columns' );
74
+
75
+ var slider_infinite = $( '.single-product.woocommerce div.product div.images ul.yith_magnifier_gallery' ).data( 'slider_infinite' );
76
+
77
+ // We retrieve the value of the width of a li and the margin to later on multiple it for the numeber of li's and set the width of the ul parent
78
+ var li_width = $( ".single-product.woocommerce div.product div.images .yith_magnifier_gallery li" ).width();
79
+ var li_margin_left = $( ".single-product.woocommerce div.product div.images .yith_magnifier_gallery li" ).css( 'margin-left' );
80
+
81
+ if ( typeof li_margin_left == 'undefined') {
82
+ var li_margin_left_num = 0;
83
+ } else {
84
+ var li_margin_left_num = li_margin_left.split( "px" ).shift();
85
+ }
86
+
87
+
88
+ // We create an array with all the possible positions and adjust all the li's with a width width px because they were created by % via PHP
89
+ // and we are goint to set the width of the ul which contains the li's
90
+ var yith_margins_array = [];
91
+ var yith_margins_option = 0;
92
+ yith_margins_array.push( yith_margins_option );
93
+
94
+ var loop = 1;
95
+ $( '.single-product.woocommerce div.product div.images ul.yith_magnifier_gallery li' ).each( function() {
96
+
97
+ $( this ).css( 'width', li_width + 'px' );
98
+ $( this ).css( 'margin-left', li_margin_left );
99
+ $( this ).css( 'margin-right', li_margin_left );
100
+ $( this ).show();
101
+
102
+ yith_margins_option = yith_margins_option + ( ( li_margin_left_num * 2 ) + li_width );
103
+
104
+ yith_margins_array.push( yith_margins_option );
105
+
106
+ loop++;
107
+
108
+ });
109
+
110
+ // set the width of the ul parent
111
+ var ul_w = yith_margins_option;
112
+ $( ".single-product.woocommerce div.product div.images .yith_magnifier_gallery" ).css( 'width', ul_w + 'px' );
113
+
114
+ $( "#slider-next" ).css( 'top', '50%' );
115
+ $( "#slider-next" ).css( 'transform', 'translateY( -50% )' );
116
+
117
+ $( "#slider-prev" ).css( 'top', '50%' );
118
+ $( "#slider-prev" ).css( 'transform', 'translateY( -50% )' );
119
+
120
+ var index_yith_margins_array = 0;
121
+
122
+ $( "body" ).on( "click", "#slider-next", function () {
123
+
124
+ if ( $( '.single-product.woocommerce div.product div.images .yith_magnifier_gallery li.last' ).next().is( 'li' ) ){
125
+
126
+ index_yith_margins_array++;
127
+ $( ".single-product.woocommerce div.product div.images ul.yith_magnifier_gallery" ).animate({
128
+ marginLeft: '-' + yith_margins_array[ index_yith_margins_array ] + 'px',
129
+ });
130
+
131
+ var next = $( '.single-product.woocommerce div.product div.images .yith_magnifier_gallery li.first' ).next();
132
+ $( '.single-product.woocommerce div.product div.images .yith_magnifier_gallery li.first' ).removeClass( 'first' );
133
+ next.addClass( 'first' );
134
+
135
+ next = $( '.single-product.woocommerce div.product div.images .yith_magnifier_gallery li.last' ).next();
136
+ $( '.single-product.woocommerce div.product div.images .yith_magnifier_gallery li.last' ).removeClass( 'last' );
137
+ next.addClass( 'last' );
138
+
139
+ }
140
+ else
141
+ if ( ( yith_wc_zm_circular == 'yes' ) && ! $( ".single-product.woocommerce div.product div.images ul.yith_magnifier_gallery" ).is(':animated') ){
142
+
143
+ index_yith_margins_array--;
144
+ $( ".single-product.woocommerce div.product div.images ul.yith_magnifier_gallery" ).css( 'margin-left', '-' + yith_margins_array[ index_yith_margins_array ] + 'px' );
145
+
146
+ var last = $( '.single-product.woocommerce div.product div.images .yith_magnifier_gallery li' ).first();
147
+ $( '.single-product.woocommerce div.product div.images .yith_magnifier_gallery li.last' ).after( last );
148
+
149
+ $( '.single-product.woocommerce div.product div.images .yith_magnifier_gallery li.last' ).removeClass( 'last' );
150
+ last.addClass( 'last' );
151
+
152
+ var first = $( '.single-product.woocommerce div.product div.images .yith_magnifier_gallery li.first' ).next();
153
+ $( '.single-product.woocommerce div.product div.images .yith_magnifier_gallery li.first' ).removeClass( 'first' );
154
+ first.addClass( 'first' );
155
+
156
+ index_yith_margins_array++;
157
+ $( ".single-product.woocommerce div.product div.images ul.yith_magnifier_gallery" ).animate({
158
+ marginLeft: '-' + yith_margins_array[ index_yith_margins_array ] + 'px',
159
+ });
160
+
161
+ }
162
+ else
163
+ if ( ( slider_infinite == 'yes' ) && ! $( ".single-product.woocommerce div.product div.images ul.yith_magnifier_gallery" ).is(':animated') ){
164
+
165
+ while( $( '.single-product.woocommerce div.product div.images .yith_magnifier_gallery li.first' ).prev().is( 'li' ) ){
166
+
167
+ var prev = $( '.single-product.woocommerce div.product div.images .yith_magnifier_gallery li.first' ).prev();
168
+ $( '.single-product.woocommerce div.product div.images .yith_magnifier_gallery li.first' ).removeClass( 'first' );
169
+ prev.addClass( 'first' );
170
+
171
+ prev = $( '.single-product.woocommerce div.product div.images .yith_magnifier_gallery li.last' ).prev();
172
+ $( '.single-product.woocommerce div.product div.images .yith_magnifier_gallery li.last' ).removeClass( 'last' );
173
+ prev.addClass( 'last' );
174
+
175
+ }
176
+
177
+ index_yith_margins_array = 0;
178
+ $( ".single-product.woocommerce div.product div.images ul.yith_magnifier_gallery" ).animate({
179
+ marginLeft: '-' + yith_margins_array[ index_yith_margins_array ] + 'px',
180
+ });
181
+ }
182
+
183
+ });
184
+
185
+ $( "body" ).on( "click", "#slider-prev", function () {
186
+
187
+ if ( $( '.single-product.woocommerce div.product div.images .yith_magnifier_gallery li.first' ).prev().is( 'li' ) ){
188
+
189
+ index_yith_margins_array--;
190
+ $( ".single-product.woocommerce div.product div.images ul.yith_magnifier_gallery" ).animate({
191
+ marginLeft: '-' + yith_margins_array[ index_yith_margins_array ] + 'px',
192
+ });
193
+
194
+ var prev = $( '.single-product.woocommerce div.product div.images .yith_magnifier_gallery li.first' ).prev();
195
+ $( '.single-product.woocommerce div.product div.images .yith_magnifier_gallery li.first' ).removeClass( 'first' );
196
+ prev.addClass( 'first' );
197
+
198
+ prev = $( '.single-product.woocommerce div.product div.images .yith_magnifier_gallery li.last' ).prev();
199
+ $( '.single-product.woocommerce div.product div.images .yith_magnifier_gallery li.last' ).removeClass( 'last' );
200
+ prev.addClass( 'last' );
201
+
202
+ }
203
+ else
204
+ if ( ( yith_wc_zm_circular == 'yes' ) && ! $( ".single-product.woocommerce div.product div.images ul.yith_magnifier_gallery" ).is(':animated') ) {
205
+
206
+ index_yith_margins_array++;
207
+ $(".single-product.woocommerce div.product div.images ul.yith_magnifier_gallery").css('margin-left', '-' + yith_margins_array[index_yith_margins_array] + 'px');
208
+
209
+ var first = $('.single-product.woocommerce div.product div.images .yith_magnifier_gallery li').last();
210
+ $('.single-product.woocommerce div.product div.images .yith_magnifier_gallery li.first').before(first);
211
+
212
+ $('.single-product.woocommerce div.product div.images .yith_magnifier_gallery li.first').removeClass('first');
213
+ first.addClass('first');
214
+
215
+ var last = $('.single-product.woocommerce div.product div.images .yith_magnifier_gallery li.last').prev();
216
+ $('.single-product.woocommerce div.product div.images .yith_magnifier_gallery li.last').removeClass('last');
217
+ last.addClass('last');
218
+
219
+ index_yith_margins_array--;
220
+ $(".single-product.woocommerce div.product div.images ul.yith_magnifier_gallery").animate({
221
+ marginLeft: '-' + yith_margins_array[index_yith_margins_array] + 'px',
222
+ });
223
+
224
+ }
225
+ else
226
+ if ( ( slider_infinite == 'yes' ) && ! $( ".single-product.woocommerce div.product div.images ul.yith_magnifier_gallery" ).is(':animated') ){
227
+
228
+ while( $( '.single-product.woocommerce div.product div.images .yith_magnifier_gallery li.last' ).next().is( 'li' ) ){
229
+
230
+ var next = $( '.single-product.woocommerce div.product div.images .yith_magnifier_gallery li.first' ).next();
231
+ $( '.single-product.woocommerce div.product div.images .yith_magnifier_gallery li.first' ).removeClass( 'first' );
232
+ next.addClass( 'first' );
233
+
234
+ next = $( '.single-product.woocommerce div.product div.images .yith_magnifier_gallery li.last' ).next();
235
+ $( '.single-product.woocommerce div.product div.images .yith_magnifier_gallery li.last' ).removeClass( 'last' );
236
+ next.addClass( 'last' );
237
+
238
+ }
239
+
240
+ index_yith_margins_array = yith_margins_array.length -1 -yith_wc_zm_columns;
241
+ $( ".single-product.woocommerce div.product div.images ul.yith_magnifier_gallery" ).animate({
242
+ marginLeft: '-' + yith_margins_array[ index_yith_margins_array ] + 'px',
243
+ });
244
+ }
245
+
246
+ });
247
+
248
+ }
249
+
250
+ function yith_wc_zm_auto_carousel(){
251
+
252
+ $( '#slider-next' ).click();
253
+
254
+ setTimeout( yith_wc_zm_auto_carousel, 3000);
255
+
256
+ }
257
+
258
+ yith_wc_zm_carousel();
259
+
260
+ var auto_carousel = $( '.single-product.woocommerce div.product div.images ul.yith_magnifier_gallery' ).data( 'auto_carousel' );
261
+
262
+ if ( auto_carousel == 'yes' )
263
+ setTimeout( yith_wc_zm_auto_carousel, 3000);
264
+ }
265
+
266
  });
assets/js/ywzm_frontend.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(document).ready(function(i){var e=i(".images"),n=i(".yith_magnifier_zoom"),m=i(".yith_magnifier_zoom img").first(),_=e.find(".yith_magnifier_zoom").attr("href"),f=e.find(".yith_magnifier_zoom img").attr("src");if(yith_wcmg_default_gallery=e.find(".thumbnails"),"undefined"==typeof yith_magnifier_options)return!1;e.yith_magnifier(yith_magnifier_options),i(document).on("found_variation","form.variations_form",function(i,t){var r=t.image_magnifier?t.image_magnifier:_,a=f;ywzm_data.wc_before_3_0?t.image_src&&(a=t.image_src):t.image.src&&(a=t.image.src),n.attr("href",r),m.attr("src",a),m.attr("srcset",a),m.attr("src-orig",a),e.data("yith_magnifier")&&e.yith_magnifier("destroy"),e.yith_magnifier(yith_magnifier_options)}).on("reset_image",function(i){n.attr("href",_),m.attr("src",f),m.attr("srcset",f),m.attr("src-orig",f),e.find(".thumbnails").replaceWith(yith_wcmg_default_gallery),e.data("yith_magnifier")&&e.yith_magnifier("destroy"),e.yith_magnifier(yith_magnifier_options)}),i("form.variations_form .variations select").trigger("change")});
1
+ jQuery(document).ready(function(i){var e=i(".images"),r=i(".yith_magnifier_zoom"),t=i(".yith_magnifier_zoom img").first(),a=e.find(".yith_magnifier_zoom").attr("href"),o=e.find(".yith_magnifier_zoom img").attr("src"),s=e.find(".thumbnails");if("undefined"==typeof yith_magnifier_options)return!1;if(e.yith_magnifier(yith_magnifier_options),i(document).on("found_variation","form.variations_form",function(i,s){var l=s.image_magnifier?s.image_magnifier:a,m=o;ywzm_data.wc_before_3_0?s.image_src&&(m=s.image_src):s.image.src&&(m=s.image.src),r.attr("href",l),t.attr("src",m),t.attr("srcset",m),t.attr("src-orig",m),e.data("yith_magnifier")&&e.yith_magnifier("destroy"),e.yith_magnifier(yith_magnifier_options)}).on("reset_image",function(i){r.attr("href",a),t.attr("src",o),t.attr("srcset",o),t.attr("src-orig",o),e.find(".thumbnails").replaceWith(s),e.data("yith_magnifier")&&e.yith_magnifier("destroy"),e.yith_magnifier(yith_magnifier_options)}),i(".single-product.woocommerce div.product div.images ul.yith_magnifier_gallery").length){i("form.variations_form .variations select").trigger("change"),function(){i(".single-product.woocommerce div.product div.images div.thumbnails").css("width",i(".single-product.woocommerce div.product div.images div.thumbnails").width());var e=i(".single-product.woocommerce div.product div.images ul.yith_magnifier_gallery").data("circular"),r=i(".single-product.woocommerce div.product div.images ul.yith_magnifier_gallery").data("columns"),t=i(".single-product.woocommerce div.product div.images ul.yith_magnifier_gallery").data("slider_infinite"),a=i(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li").width(),o=i(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li").css("margin-left");if(void 0===o)var s=0;else s=o.split("px").shift();var l=[],m=0;l.push(m),i(".single-product.woocommerce div.product div.images ul.yith_magnifier_gallery li").each(function(){i(this).css("width",a+"px"),i(this).css("margin-left",o),i(this).css("margin-right",o),i(this).show(),m+=2*s+a,l.push(m)});var d=m;i(".single-product.woocommerce div.product div.images .yith_magnifier_gallery").css("width",d+"px"),i("#slider-next").css("top","50%"),i("#slider-next").css("transform","translateY( -50% )"),i("#slider-prev").css("top","50%"),i("#slider-prev").css("transform","translateY( -50% )");var c=0;i("body").on("click","#slider-next",function(){if(i(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.last").next().is("li")){c++,i(".single-product.woocommerce div.product div.images ul.yith_magnifier_gallery").animate({marginLeft:"-"+l[c]+"px"});var r=i(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.first").next();i(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.first").removeClass("first"),r.addClass("first"),r=i(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.last").next(),i(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.last").removeClass("last"),r.addClass("last")}else if("yes"!=e||i(".single-product.woocommerce div.product div.images ul.yith_magnifier_gallery").is(":animated")){if("yes"==t&&!i(".single-product.woocommerce div.product div.images ul.yith_magnifier_gallery").is(":animated")){for(;i(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.first").prev().is("li");){var a=i(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.first").prev();i(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.first").removeClass("first"),a.addClass("first"),a=i(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.last").prev(),i(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.last").removeClass("last"),a.addClass("last")}c=0,i(".single-product.woocommerce div.product div.images ul.yith_magnifier_gallery").animate({marginLeft:"-"+l[c]+"px"})}}else{c--,i(".single-product.woocommerce div.product div.images ul.yith_magnifier_gallery").css("margin-left","-"+l[c]+"px");var o=i(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li").first();i(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.last").after(o),i(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.last").removeClass("last"),o.addClass("last");var s=i(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.first").next();i(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.first").removeClass("first"),s.addClass("first"),c++,i(".single-product.woocommerce div.product div.images ul.yith_magnifier_gallery").animate({marginLeft:"-"+l[c]+"px"})}}),i("body").on("click","#slider-prev",function(){if(i(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.first").prev().is("li")){c--,i(".single-product.woocommerce div.product div.images ul.yith_magnifier_gallery").animate({marginLeft:"-"+l[c]+"px"});var a=i(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.first").prev();i(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.first").removeClass("first"),a.addClass("first"),a=i(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.last").prev(),i(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.last").removeClass("last"),a.addClass("last")}else if("yes"!=e||i(".single-product.woocommerce div.product div.images ul.yith_magnifier_gallery").is(":animated")){if("yes"==t&&!i(".single-product.woocommerce div.product div.images ul.yith_magnifier_gallery").is(":animated")){for(;i(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.last").next().is("li");){var o=i(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.first").next();i(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.first").removeClass("first"),o.addClass("first"),o=i(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.last").next(),i(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.last").removeClass("last"),o.addClass("last")}c=l.length-1-r,i(".single-product.woocommerce div.product div.images ul.yith_magnifier_gallery").animate({marginLeft:"-"+l[c]+"px"})}}else{c++,i(".single-product.woocommerce div.product div.images ul.yith_magnifier_gallery").css("margin-left","-"+l[c]+"px");var s=i(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li").last();i(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.first").before(s),i(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.first").removeClass("first"),s.addClass("first");var m=i(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.last").prev();i(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.last").removeClass("last"),m.addClass("last"),c--,i(".single-product.woocommerce div.product div.images ul.yith_magnifier_gallery").animate({marginLeft:"-"+l[c]+"px"})}})}(),"yes"==i(".single-product.woocommerce div.product div.images ul.yith_magnifier_gallery").data("auto_carousel")&&setTimeout(function e(){i("#slider-next").click(),setTimeout(e,3e3)},3e3)}});
class.yith-wcmg-frontend.php CHANGED
@@ -19,8 +19,8 @@ if ( ! class_exists ( 'YITH_WCMG_Frontend' ) ) {
19
  * @since 1.0.0
20
  */
21
  class YITH_WCMG_Frontend {
22
-
23
-
24
  /**
25
  * Constructor
26
  *
@@ -41,16 +41,16 @@ if ( ! class_exists ( 'YITH_WCMG_Frontend' ) ) {
41
  remove_action ( 'woocommerce_product_thumbnails', 'woocommerce_show_product_thumbnails', 20 );
42
  add_action ( 'woocommerce_before_single_product_summary', array( $this, 'show_product_images' ), 20 );
43
  add_action ( 'woocommerce_product_thumbnails', array( $this, 'show_product_thumbnails' ), 20 );
44
-
45
  //custom styles and javascripts
46
  add_action ( 'wp_enqueue_scripts', array( $this, 'enqueue_styles_scripts' ) );
47
-
48
  //add attributes to product variations
49
  add_filter ( 'woocommerce_available_variation', array( $this, 'available_variation' ), 10, 3 );
50
  }
51
  }
52
-
53
-
54
  /**
55
  * Change product-single.php template
56
  *
@@ -59,13 +59,13 @@ if ( ! class_exists ( 'YITH_WCMG_Frontend' ) ) {
59
  * @since 1.0.0
60
  */
61
  public function show_product_images() {
62
-
63
  /** FIX WOO 2.1 */
64
  $wc_get_template = function_exists ( 'wc_get_template' ) ? 'wc_get_template' : 'woocommerce_get_template';
65
  $wc_get_template( 'single-product/product-image-magnifier.php', array(), '', YITH_YWZM_DIR . 'templates/' );
66
  }
67
-
68
-
69
  /**
70
  * Change product-thumbnails.php template
71
  *
@@ -74,14 +74,14 @@ if ( ! class_exists ( 'YITH_WCMG_Frontend' ) ) {
74
  * @since 1.0.0
75
  */
76
  public function show_product_thumbnails() {
77
-
78
  /** FIX WOO 2.1 */
79
  $wc_get_template = function_exists ( 'wc_get_template' ) ? 'wc_get_template' : 'woocommerce_get_template';
80
-
81
  $wc_get_template( 'single-product/product-thumbnails-magnifier.php', array(), '', YITH_YWZM_DIR . 'templates/' );
82
  }
83
-
84
-
85
  /**
86
  * Enqueue styles and scripts
87
  *
@@ -91,9 +91,9 @@ if ( ! class_exists ( 'YITH_WCMG_Frontend' ) ) {
91
  */
92
  public function enqueue_styles_scripts() {
93
  global $post;
94
-
95
  $suffix = defined ( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
96
-
97
  wp_register_script ( 'ywzm-magnifier-slider',
98
  YITH_WCMG_URL . 'assets/js/' . yit_load_js_file ( 'jquery.carouFredSel.js' ),
99
  array(
@@ -102,45 +102,46 @@ if ( ! class_exists ( 'YITH_WCMG_Frontend' ) ) {
102
  ),
103
  '6.2.1',
104
  true );
105
-
106
  wp_register_script ( 'ywzm-magnifier',
107
  YITH_WCMG_URL . 'assets/js/' . yit_load_js_file ( 'yith_magnifier.js' ),
108
  array( 'jquery' ),
109
- YITH_YWZM_VERSION,
110
  true );
111
 
112
  wp_localize_script( 'ywzm-magnifier', 'yith_wc_zoom_magnifier_storage_object', apply_filters( 'yith_wc_zoom_magnifier_front_magnifier_localize', array(
113
  'ajax_url' => admin_url( 'admin-ajax.php' ),
 
114
  ) ) );
115
-
116
  wp_register_script ( 'ywzm_frontend',
117
  YITH_WCMG_URL . 'assets/js/' . yit_load_js_file ( 'ywzm_frontend.js' ),
118
  array(
119
  'jquery',
120
  'ywzm-magnifier',
121
  ),
122
- YITH_YWZM_VERSION,
123
  true );
124
-
125
  wp_register_style ( 'ywzm-magnifier', YITH_WCMG_URL . 'assets/css/yith_magnifier.css' );
126
-
127
  if ( is_product () || ( ! empty( $post->post_content ) && strstr ( $post->post_content, '[product_page' ) ) ) {
128
-
129
  wp_localize_script ( 'ywzm_frontend',
130
  'ywzm_data', array(
131
  'wc_before_3_0' => version_compare ( WC ()->version, '3.0', '<' ),
132
  )
133
  );
134
-
135
  // Enqueue PrettyPhoto style and script
136
  $wc_assets_path = str_replace ( array( 'http:', 'https:' ), '', WC ()->plugin_url () ) . '/assets/';
137
-
138
  // Enqueue scripts
139
  wp_enqueue_script ( 'prettyPhoto', $wc_assets_path . 'js/prettyPhoto/jquery.prettyPhoto' . $suffix . '.js', array( 'jquery' ), '3.1.6', true );
140
  wp_enqueue_script ( 'ywzm-magnifier-slider' );
141
  wp_enqueue_script ( 'ywzm-magnifier' );
142
  wp_enqueue_script ( 'ywzm_frontend' );
143
-
144
  // Enqueue Style
145
  $css = file_exists ( get_stylesheet_directory () . '/woocommerce/yith_magnifier.css' ) ? get_stylesheet_directory_uri () . '/woocommerce/yith_magnifier.css' : YITH_WCMG_URL . 'assets/css/frontend.css';
146
  wp_enqueue_style ( 'ywzm-prettyPhoto', $wc_assets_path . 'css/prettyPhoto.css' );
@@ -148,8 +149,8 @@ if ( ! class_exists ( 'YITH_WCMG_Frontend' ) ) {
148
  wp_enqueue_style ( 'ywzm_frontend', $css );
149
  }
150
  }
151
-
152
-
153
  /**
154
  * Add attributes to product variations
155
  *
@@ -160,14 +161,14 @@ if ( ! class_exists ( 'YITH_WCMG_Frontend' ) ) {
160
  * @return mixed
161
  */
162
  public function available_variation( $data, $wc_prod, $variation ) {
163
-
164
  $attachment_id = get_post_thumbnail_id ( version_compare ( WC ()->version, '3.0', '<' ) ? $variation->get_variation_id () : $variation->get_id () );
165
  $attachment = wp_get_attachment_image_src ( $attachment_id, 'shop_magnifier' );
166
-
167
  $data['image_magnifier'] = $attachment ? current ( $attachment ) : '';
168
-
169
  return $data;
170
  }
171
-
172
  }
173
  }
19
  * @since 1.0.0
20
  */
21
  class YITH_WCMG_Frontend {
22
+
23
+
24
  /**
25
  * Constructor
26
  *
41
  remove_action ( 'woocommerce_product_thumbnails', 'woocommerce_show_product_thumbnails', 20 );
42
  add_action ( 'woocommerce_before_single_product_summary', array( $this, 'show_product_images' ), 20 );
43
  add_action ( 'woocommerce_product_thumbnails', array( $this, 'show_product_thumbnails' ), 20 );
44
+
45
  //custom styles and javascripts
46
  add_action ( 'wp_enqueue_scripts', array( $this, 'enqueue_styles_scripts' ) );
47
+
48
  //add attributes to product variations
49
  add_filter ( 'woocommerce_available_variation', array( $this, 'available_variation' ), 10, 3 );
50
  }
51
  }
52
+
53
+
54
  /**
55
  * Change product-single.php template
56
  *
59
  * @since 1.0.0
60
  */
61
  public function show_product_images() {
62
+
63
  /** FIX WOO 2.1 */
64
  $wc_get_template = function_exists ( 'wc_get_template' ) ? 'wc_get_template' : 'woocommerce_get_template';
65
  $wc_get_template( 'single-product/product-image-magnifier.php', array(), '', YITH_YWZM_DIR . 'templates/' );
66
  }
67
+
68
+
69
  /**
70
  * Change product-thumbnails.php template
71
  *
74
  * @since 1.0.0
75
  */
76
  public function show_product_thumbnails() {
77
+
78
  /** FIX WOO 2.1 */
79
  $wc_get_template = function_exists ( 'wc_get_template' ) ? 'wc_get_template' : 'woocommerce_get_template';
80
+
81
  $wc_get_template( 'single-product/product-thumbnails-magnifier.php', array(), '', YITH_YWZM_DIR . 'templates/' );
82
  }
83
+
84
+
85
  /**
86
  * Enqueue styles and scripts
87
  *
91
  */
92
  public function enqueue_styles_scripts() {
93
  global $post;
94
+
95
  $suffix = defined ( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
96
+
97
  wp_register_script ( 'ywzm-magnifier-slider',
98
  YITH_WCMG_URL . 'assets/js/' . yit_load_js_file ( 'jquery.carouFredSel.js' ),
99
  array(
102
  ),
103
  '6.2.1',
104
  true );
105
+
106
  wp_register_script ( 'ywzm-magnifier',
107
  YITH_WCMG_URL . 'assets/js/' . yit_load_js_file ( 'yith_magnifier.js' ),
108
  array( 'jquery' ),
109
+ YITH_YWZM_JS_VERSION,
110
  true );
111
 
112
  wp_localize_script( 'ywzm-magnifier', 'yith_wc_zoom_magnifier_storage_object', apply_filters( 'yith_wc_zoom_magnifier_front_magnifier_localize', array(
113
  'ajax_url' => admin_url( 'admin-ajax.php' ),
114
+ 'zoom_condition' => apply_filters('ywzm_zoom_init_condition', true ),
115
  ) ) );
116
+
117
  wp_register_script ( 'ywzm_frontend',
118
  YITH_WCMG_URL . 'assets/js/' . yit_load_js_file ( 'ywzm_frontend.js' ),
119
  array(
120
  'jquery',
121
  'ywzm-magnifier',
122
  ),
123
+ YITH_YWZM_JS_VERSION,
124
  true );
125
+
126
  wp_register_style ( 'ywzm-magnifier', YITH_WCMG_URL . 'assets/css/yith_magnifier.css' );
127
+
128
  if ( is_product () || ( ! empty( $post->post_content ) && strstr ( $post->post_content, '[product_page' ) ) ) {
129
+
130
  wp_localize_script ( 'ywzm_frontend',
131
  'ywzm_data', array(
132
  'wc_before_3_0' => version_compare ( WC ()->version, '3.0', '<' ),
133
  )
134
  );
135
+
136
  // Enqueue PrettyPhoto style and script
137
  $wc_assets_path = str_replace ( array( 'http:', 'https:' ), '', WC ()->plugin_url () ) . '/assets/';
138
+
139
  // Enqueue scripts
140
  wp_enqueue_script ( 'prettyPhoto', $wc_assets_path . 'js/prettyPhoto/jquery.prettyPhoto' . $suffix . '.js', array( 'jquery' ), '3.1.6', true );
141
  wp_enqueue_script ( 'ywzm-magnifier-slider' );
142
  wp_enqueue_script ( 'ywzm-magnifier' );
143
  wp_enqueue_script ( 'ywzm_frontend' );
144
+
145
  // Enqueue Style
146
  $css = file_exists ( get_stylesheet_directory () . '/woocommerce/yith_magnifier.css' ) ? get_stylesheet_directory_uri () . '/woocommerce/yith_magnifier.css' : YITH_WCMG_URL . 'assets/css/frontend.css';
147
  wp_enqueue_style ( 'ywzm-prettyPhoto', $wc_assets_path . 'css/prettyPhoto.css' );
149
  wp_enqueue_style ( 'ywzm_frontend', $css );
150
  }
151
  }
152
+
153
+
154
  /**
155
  * Add attributes to product variations
156
  *
161
  * @return mixed
162
  */
163
  public function available_variation( $data, $wc_prod, $variation ) {
164
+
165
  $attachment_id = get_post_thumbnail_id ( version_compare ( WC ()->version, '3.0', '<' ) ? $variation->get_variation_id () : $variation->get_id () );
166
  $attachment = wp_get_attachment_image_src ( $attachment_id, 'shop_magnifier' );
167
+
168
  $data['image_magnifier'] = $attachment ? current ( $attachment ) : '';
169
+
170
  return $data;
171
  }
172
+
173
  }
174
  }
init.php CHANGED
@@ -3,13 +3,13 @@
3
  * Plugin Name: YITH WooCommerce Zoom Magnifier
4
  * Plugin URI: https://yithemes.com/themes/plugins/yith-woocommerce-zoom-magnifier/
5
  * Description: <code><strong>YITH WooCommerce Zoom Magnifier</strong></code> allows you to add a zoom effect to product images and a thumbnail slider for the product image gallery. <a href="https://yithemes.com/" target="_blank">Get more plugins for your e-commerce shop on <strong>YITH</strong></a>.
6
- * Version: 1.3.16
7
  * Author: YITH
8
  * Author URI: https://yithemes.com/
9
  * Text Domain: yith-woocommerce-zoom-magnifier
10
  * Domain Path: /languages/
11
  * WC requires at least: 3.3.0
12
- * WC tested up to: 4.0
13
  **/
14
 
15
  /* Copyright 2013-2018 Your Inspiration Themes (email : plugins@yithemes.com)
@@ -78,7 +78,9 @@ register_activation_hook ( __FILE__, 'yith_plugin_registration_hook' );
78
 
79
  defined ( 'YITH_YWZM_FREE_INIT' ) || define ( 'YITH_YWZM_FREE_INIT', plugin_basename ( __FILE__ ) );
80
  defined ( 'YITH_YWZM_SLUG' ) || define ( 'YITH_YWZM_SLUG', 'yith-woocommerce-zoom-magnifier' );
81
- defined ( 'YITH_YWZM_VERSION' ) || define ( 'YITH_YWZM_VERSION', '1.3.16' );
 
 
82
  defined ( 'YITH_YWZM_FILE' ) || define ( 'YITH_YWZM_FILE', __FILE__ );
83
  defined ( 'YITH_YWZM_DIR' ) || define ( 'YITH_YWZM_DIR', plugin_dir_path ( __FILE__ ) );
84
  defined ( 'YITH_YWZM_URL' ) || define ( 'YITH_YWZM_URL', plugins_url ( '/', __FILE__ ) );
@@ -152,4 +154,4 @@ if ( ! function_exists ( 'yith_ywzm_install' ) ) {
152
  }
153
  }
154
 
155
- add_action ( 'plugins_loaded', 'yith_ywzm_install', 11 );
3
  * Plugin Name: YITH WooCommerce Zoom Magnifier
4
  * Plugin URI: https://yithemes.com/themes/plugins/yith-woocommerce-zoom-magnifier/
5
  * Description: <code><strong>YITH WooCommerce Zoom Magnifier</strong></code> allows you to add a zoom effect to product images and a thumbnail slider for the product image gallery. <a href="https://yithemes.com/" target="_blank">Get more plugins for your e-commerce shop on <strong>YITH</strong></a>.
6
+ * Version: 1.3.17
7
  * Author: YITH
8
  * Author URI: https://yithemes.com/
9
  * Text Domain: yith-woocommerce-zoom-magnifier
10
  * Domain Path: /languages/
11
  * WC requires at least: 3.3.0
12
+ * WC tested up to: 4.5
13
  **/
14
 
15
  /* Copyright 2013-2018 Your Inspiration Themes (email : plugins@yithemes.com)
78
 
79
  defined ( 'YITH_YWZM_FREE_INIT' ) || define ( 'YITH_YWZM_FREE_INIT', plugin_basename ( __FILE__ ) );
80
  defined ( 'YITH_YWZM_SLUG' ) || define ( 'YITH_YWZM_SLUG', 'yith-woocommerce-zoom-magnifier' );
81
+ defined ( 'YITH_YWZM_VERSION' ) || define ( 'YITH_YWZM_VERSION', '1.3.17' );
82
+ defined ( 'YITH_YWZM_JS_VERSION' ) || define ( 'YITH_YWZM_JS_VERSION', '1.3.100' );
83
+
84
  defined ( 'YITH_YWZM_FILE' ) || define ( 'YITH_YWZM_FILE', __FILE__ );
85
  defined ( 'YITH_YWZM_DIR' ) || define ( 'YITH_YWZM_DIR', plugin_dir_path ( __FILE__ ) );
86
  defined ( 'YITH_YWZM_URL' ) || define ( 'YITH_YWZM_URL', plugins_url ( '/', __FILE__ ) );
154
  }
155
  }
156
 
157
+ add_action ( 'plugins_loaded', 'yith_ywzm_install', 11 );
plugin-fw/.gitignore ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # OS X metadata
2
+ .DS_Store
3
+
4
+ # Editors
5
+ .idea/
6
+ settings.json
7
+ .vscode
8
+
9
+ # Node
10
+ node_modules/
11
+ package-lock.json
12
+
13
+ # Composer
14
+ vendor/
15
+ composer.lock
plugin-fw/.jshintrc ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "boss": true,
3
+ "curly": true,
4
+ "eqeqeq": true,
5
+ "eqnull": true,
6
+ "es3": true,
7
+ "expr": true,
8
+ "immed": true,
9
+ "noarg": true,
10
+ "onevar": true,
11
+ "trailing": true,
12
+ "undef": true,
13
+ "unused": true,
14
+
15
+ "browser": true,
16
+
17
+ "globals": {
18
+ "_": false,
19
+ "Backbone": false,
20
+ "jQuery": true,
21
+ "console": true,
22
+ "alert": true,
23
+ "JSON": false,
24
+ "wp": false
25
+ }
26
+ }
plugin-fw/assets/css/admin.css CHANGED
@@ -3,54 +3,54 @@
3
  ------------------------*/
4
  #wpadminbar .yith-debug-admin-bar div,
5
  #wpadminbar .yith-debug-admin-bar:hover div {
6
- background: #05789c !important;
7
- color: #fff !important;
8
  }
9
 
10
  #wpadminbar .yith-debug-admin-bar a,
11
  #wpadminbar .yith-debug-admin-bar strong {
12
- color: #fff !important;
13
  }
14
 
15
  #wpadminbar .yith-debug-admin-bar strong {
16
- font-weight: 600;
17
  }
18
 
19
  #wpadminbar .yith-debug-admin-bar-post-meta .ab-empty-item,
20
  #wpadminbar .yith-debug-admin-bar-option .ab-empty-item {
21
- display: none;
22
  }
23
 
24
  #wpadminbar #wp-admin-bar-yith-debug-admin-bar-post-meta-default,
25
  #wpadminbar #wp-admin-bar-yith-debug-admin-bar-option-default {
26
- padding: 0;
27
- max-height: 500px;
28
- overflow-y: auto;
29
  }
30
 
31
  #wpadminbar .yith-debug-admin-bar pre {
32
- padding: 10px;
33
- line-height: 1.5em;
34
  }
35
 
36
  .notice-yith {
37
- margin-left: 0;
38
- border-left-color: #acc327;
39
  }
40
 
41
  .notice-yith.notice-alt {
42
- background-color: #ecf7ed;
43
  }
44
 
45
  .yith-promo-banner-image-link {
46
- display: block;
47
- margin-bottom: 15px;
48
  }
49
 
50
  .yith-promo-banner-image {
51
- max-width: 100%;
52
- margin: 0 auto;
53
- display: block;
54
  }
55
 
56
  /*-----------------------
@@ -58,20 +58,20 @@
58
  ------------------------*/
59
 
60
  .yith-feeds-logo {
61
- display: table-cell;
62
- background: #005b7c;
63
- padding: 5px;
64
- border-radius: 50%;
65
- margin-right: 10px;
66
- vertical-align: text-bottom;
67
- width: 18px;
68
- height: auto;
69
- vertical-align: middle;
70
  }
71
 
72
  .yith-feeds-plugin-name {
73
- display: table-cell;
74
- vertical-align: middle;
75
  }
76
 
77
  /*-----------------------
@@ -79,118 +79,132 @@
79
  ------------------------*/
80
  @media screen and (min-width: 783px) {
81
 
82
- .auto-fold #adminmenu .yith-plugin-fw-menu-2-columns.wp-not-current-submenu .wp-submenu-head {
83
- width: 100%;
84
- }
85
 
86
- #adminmenu .yith-plugin-fw-menu-2-columns.wp-not-current-submenu .wp-submenu {
87
- min-width: 320px;
88
- display: flex;
89
- flex-flow: row wrap;
90
- }
91
 
92
- #adminmenu .yith-plugin-fw-menu-2-columns.wp-not-current-submenu .wp-submenu li:not(.wp-submenu-head) {
93
- width: 50%;
94
- border-left: 1px solid #555;
95
- box-sizing: border-box;
96
- }
97
 
98
- #adminmenu .yith-plugin-fw-menu-2-columns.wp-not-current-submenu .wp-submenu li:not(.wp-submenu-head):nth-child(2n) {
99
- border-left: none;
100
- }
101
 
102
- #adminmenu .yith-plugin-fw-menu-3-columns.wp-not-current-submenu .wp-submenu {
103
- min-width: 480px;
104
- display: flex;
105
- flex-flow: row wrap;
106
- }
107
 
108
- #adminmenu .yith-plugin-fw-menu-3-columns.wp-not-current-submenu .wp-submenu li:not(.wp-submenu-head) {
109
- width: calc(100% / 3);
110
- border-left: 1px solid #555;
111
- box-sizing: border-box;
112
- }
113
 
114
- #adminmenu .yith-plugin-fw-menu-3-columns.wp-not-current-submenu .wp-submenu li:not(.wp-submenu-head):nth-child(3n + 2) {
115
- border-left: none;
116
- }
117
  }
118
 
119
  /*---------------------------
120
  YITH System Information
121
  ----------------------------*/
122
  .yith-phpinfo img {
123
- float: right;
124
- border: 0;
 
 
 
 
 
 
 
 
 
125
  }
126
 
127
  #yith-system-alert span.yith-logo,
128
- .yith-system-info h1 span.yith-logo {
129
- border-radius: 50%;
130
- background: #265b7a;
131
- height: 30px;
132
- width: 30px;
133
- display: flex;
134
- text-align: center;
135
- margin: 0 10px 0 0;
136
- float: left;
137
- align-items: center;
138
- justify-content: center;
139
  }
140
 
141
  .yith-system-info table {
142
- margin: 20px 0;
143
  }
144
 
145
  .yith-system-info table th {
146
- font-weight: bold;
147
- width: 25%;
148
- padding: 20px 12px;
149
  }
150
 
151
  .yith-system-info table td {
152
- word-break: break-all;
153
- padding: 20px 12px;
154
  }
155
 
156
  .yith-system-info table td.requirement-value {
157
- font-size: 14px;
158
- vertical-align: middle;
159
- text-align: left;
160
- color: #5da726;
161
- line-height: 19px;
162
- width: 90px;
163
  }
164
 
165
  .yith-system-info table td.requirement-value.has-errors {
166
- color: #a00;
167
  }
168
 
169
  .yith-system-info table td.requirement-value.has-warnings {
170
- color: #ffa200;
171
  }
172
 
173
  .yith-system-info table td.requirement-messages ul {
174
- margin: 0;
175
- padding: 0 0 10px 0;
176
- list-style: none!important;
177
  }
178
 
179
  .yith-system-info table td.requirement-messages ul li {
180
- margin-bottom: 3px;
 
 
 
 
 
181
  }
182
 
183
- .yith-system-info table td.requirement-messages ul li span.error {
184
- color: #a00;
185
- font-weight: bold;
186
  }
187
 
188
- .yith-system-info table td.requirement-messages ul li span.warning {
189
- color: #a00;
190
- font-weight: bold;
191
  }
192
 
193
  .yith-system-info-menu {
194
- font-weight: bold;
195
- font-size: 11px !important;
196
  }
3
  ------------------------*/
4
  #wpadminbar .yith-debug-admin-bar div,
5
  #wpadminbar .yith-debug-admin-bar:hover div {
6
+ background: #05789c !important;
7
+ color: #fff !important;
8
  }
9
 
10
  #wpadminbar .yith-debug-admin-bar a,
11
  #wpadminbar .yith-debug-admin-bar strong {
12
+ color: #fff !important;
13
  }
14
 
15
  #wpadminbar .yith-debug-admin-bar strong {
16
+ font-weight: 600;
17
  }
18
 
19
  #wpadminbar .yith-debug-admin-bar-post-meta .ab-empty-item,
20
  #wpadminbar .yith-debug-admin-bar-option .ab-empty-item {
21
+ display: none;
22
  }
23
 
24
  #wpadminbar #wp-admin-bar-yith-debug-admin-bar-post-meta-default,
25
  #wpadminbar #wp-admin-bar-yith-debug-admin-bar-option-default {
26
+ padding: 0;
27
+ max-height: 500px;
28
+ overflow-y: auto;
29
  }
30
 
31
  #wpadminbar .yith-debug-admin-bar pre {
32
+ padding: 10px;
33
+ line-height: 1.5em;
34
  }
35
 
36
  .notice-yith {
37
+ margin-left: 0;
38
+ border-left-color: #acc327;
39
  }
40
 
41
  .notice-yith.notice-alt {
42
+ background-color: #ecf7ed;
43
  }
44
 
45
  .yith-promo-banner-image-link {
46
+ display: block;
47
+ margin-bottom: 15px;
48
  }
49
 
50
  .yith-promo-banner-image {
51
+ max-width: 100%;
52
+ margin: 0 auto;
53
+ display: block;
54
  }
55
 
56
  /*-----------------------
58
  ------------------------*/
59
 
60
  .yith-feeds-logo {
61
+ display: table-cell;
62
+ background: #005b7c;
63
+ padding: 5px;
64
+ border-radius: 50%;
65
+ margin-right: 10px;
66
+ vertical-align: text-bottom;
67
+ width: 18px;
68
+ height: auto;
69
+ vertical-align: middle;
70
  }
71
 
72
  .yith-feeds-plugin-name {
73
+ display: table-cell;
74
+ vertical-align: middle;
75
  }
76
 
77
  /*-----------------------
79
  ------------------------*/
80
  @media screen and (min-width: 783px) {
81
 
82
+ .auto-fold #adminmenu .yith-plugin-fw-menu-2-columns.wp-not-current-submenu .wp-submenu-head {
83
+ width: 100%;
84
+ }
85
 
86
+ #adminmenu .yith-plugin-fw-menu-2-columns.wp-not-current-submenu .wp-submenu {
87
+ min-width: 320px;
88
+ display: flex;
89
+ flex-flow: row wrap;
90
+ }
91
 
92
+ #adminmenu .yith-plugin-fw-menu-2-columns.wp-not-current-submenu .wp-submenu li:not(.wp-submenu-head) {
93
+ width: 50%;
94
+ border-left: 1px solid #555;
95
+ box-sizing: border-box;
96
+ }
97
 
98
+ #adminmenu .yith-plugin-fw-menu-2-columns.wp-not-current-submenu .wp-submenu li:not(.wp-submenu-head):nth-child(2n) {
99
+ border-left: none;
100
+ }
101
 
102
+ #adminmenu .yith-plugin-fw-menu-3-columns.wp-not-current-submenu .wp-submenu {
103
+ min-width: 480px;
104
+ display: flex;
105
+ flex-flow: row wrap;
106
+ }
107
 
108
+ #adminmenu .yith-plugin-fw-menu-3-columns.wp-not-current-submenu .wp-submenu li:not(.wp-submenu-head) {
109
+ width: calc(100% / 3);
110
+ border-left: 1px solid #555;
111
+ box-sizing: border-box;
112
+ }
113
 
114
+ #adminmenu .yith-plugin-fw-menu-3-columns.wp-not-current-submenu .wp-submenu li:not(.wp-submenu-head):nth-child(3n + 2) {
115
+ border-left: none;
116
+ }
117
  }
118
 
119
  /*---------------------------
120
  YITH System Information
121
  ----------------------------*/
122
  .yith-phpinfo img {
123
+ float: right;
124
+ border: 0;
125
+ }
126
+
127
+ .yith-system-info h2.yith-sysinfo-title {
128
+ color: #00729f;
129
+ font-size: 25px;
130
+ text-transform: uppercase;
131
+ font-weight: 800;
132
+ line-height: 25px;
133
+ padding: 20px 0;
134
  }
135
 
136
  #yith-system-alert span.yith-logo,
137
+ .yith-system-info h2 span.yith-logo {
138
+ border-radius: 50%;
139
+ background: #265b7a;
140
+ height: 30px;
141
+ width: 30px;
142
+ display: flex;
143
+ text-align: center;
144
+ margin: 0 10px 0 0;
145
+ float: left;
146
+ align-items: center;
147
+ justify-content: center;
148
  }
149
 
150
  .yith-system-info table {
151
+ margin: 20px 0;
152
  }
153
 
154
  .yith-system-info table th {
155
+ font-weight: bold;
156
+ width: 25%;
157
+ padding: 20px 12px;
158
  }
159
 
160
  .yith-system-info table td {
161
+ word-break: break-all;
162
+ padding: 20px 12px;
163
  }
164
 
165
  .yith-system-info table td.requirement-value {
166
+ font-size: 14px;
167
+ vertical-align: middle;
168
+ text-align: left;
169
+ color: #5da726;
170
+ line-height: 19px;
171
+ width: 90px;
172
  }
173
 
174
  .yith-system-info table td.requirement-value.has-errors {
175
+ color: #a00;
176
  }
177
 
178
  .yith-system-info table td.requirement-value.has-warnings {
179
+ color: #ffa200;
180
  }
181
 
182
  .yith-system-info table td.requirement-messages ul {
183
+ margin: 0;
184
+ padding: 0 0 10px 0;
185
+ list-style: none !important;
186
  }
187
 
188
  .yith-system-info table td.requirement-messages ul li {
189
+ margin-bottom: 3px;
190
+ }
191
+
192
+ .yith-system-info table td.requirement-messages span.error {
193
+ color: #a00;
194
+ font-weight: bold;
195
  }
196
 
197
+ .yith-system-info table td.requirement-messages span.warning {
198
+ color: #a00;
199
+ font-weight: bold;
200
  }
201
 
202
+ .yith-system-info table textarea.yith-system-info-debug {
203
+ width: 100%;
204
+ height: 400px;
205
  }
206
 
207
  .yith-system-info-menu {
208
+ font-weight: bold;
209
+ font-size: 11px !important;
210
  }
plugin-fw/assets/css/yit-plugin-panel.css CHANGED
@@ -51,6 +51,16 @@
51
  padding : 15px 0;
52
  }
53
 
 
 
 
 
 
 
 
 
 
 
54
  #plugin-fw-wc table.form-table th, #yith-plugin-fw-panel table.form-table th {
55
  padding : 20px;
56
  }
@@ -78,11 +88,14 @@
78
  .yith-plugin-fw-wp-page-wrapper .wrap {
79
  border : 1px solid #d8d8d8;
80
  border-top : 0;
81
- margin : 0 15px 0 0;
82
  background : #fff;
83
  padding : 20px;
84
  box-sizing : border-box;
85
  }
 
 
 
86
 
87
  #wpwrap .yith-plugin-fw-wp-page-wrapper .yith-plugin-ui h2.nav-tab-wrapper, #wpbody-content .yith-plugin-fw-wp-page-wrapper .yith-plugin-ui h2.nav-tab-wrapper {
88
  padding-bottom : 0;
@@ -94,7 +107,7 @@
94
 
95
  .yith-plugin-fw-wp-page-wrapper h1.nav-tab-wrapper, .yith-plugin-fw-wp-page-wrapper h2.nav-tab-wrapper, .yith-plugin-fw-wp-page-wrapper .nav-tab-wrapper {
96
  padding-top : 9px;
97
- padding-bottom : 0;
98
  }
99
 
100
  .yith-plugin-fw-wp-page-wrapper .wrap h1.wp-heading-inline {
@@ -124,7 +137,7 @@
124
  cursor : pointer;
125
  background-color : #375f6b;
126
  color : #fff;
127
- margin-left: 10px !important;
128
  }
129
 
130
  .yith-plugin-fw-wp-page-wrapper .wrap a.page-title-action:hover {
@@ -513,8 +526,15 @@
513
  margin-right : 15px;
514
  }
515
 
 
 
 
 
 
 
 
516
  .yit-admin-panel-content-wrap {
517
- width : 100%;
518
  display : block;
519
  }
520
 
@@ -549,30 +569,38 @@
549
  */
550
  .yith-plugin-ui .yith-plugin-fw-sub-tabs-nav {
551
  background : #fff;
552
- padding : 10px 20px;
553
  box-sizing : border-box;
554
- margin-right : 15px;
555
  border-left : 1px solid #d8d8d8;
556
  border-right : 1px solid #d8d8d8;
 
 
 
 
557
  }
558
-
559
  .yith-plugin-ui .yith-plugin-fw-sub-tabs-nav h3.nav-tab-wrapper {
560
  text-transform : uppercase;
561
  line-height : inherit;
562
  font-weight : 600;
 
 
 
 
 
 
 
563
  }
564
 
565
  .yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .nav-tab {
566
  line-height : 1.71428571;
567
  margin-left : 0;
568
  margin-right : 0;
569
- background-color : #fff;
570
  color : #336374;
571
  font-size : 13px;
572
- padding : 8px 20px 9px;
573
  border : 0;
574
- border-left : 1px solid #d8d8d8;
575
- border-top : 1px solid #d8d8d8;
576
  }
577
 
578
  .yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .nav-tab .yith-nav-sub-tab__title,
@@ -590,10 +618,6 @@
590
  color : inherit;
591
  }
592
 
593
- .yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .nav-tab:last-child {
594
- border-right : 1px solid #d8d8d8;
595
- }
596
-
597
  .yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .yith-nav-sub-tab--highlight {
598
  color : #fff;
599
  background : #2a8db0;
@@ -602,7 +626,121 @@
602
  .yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .nav-tab-active {
603
  color : #2a8db0;
604
  background : #fff;
605
- border-bottom : 1px solid #fff;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
606
  }
607
 
608
  /* === Responsive === */
51
  padding : 15px 0;
52
  }
53
 
54
+ .yith-plugin-ui .yith-plugin-fw-panel-custom-tab-container{
55
+ border: 1px solid #ddd;
56
+ border-top : 0;
57
+ }
58
+
59
+ .yith-plugin-ui .yith-plugin-fw-panel-custom-tab-container > h2 {
60
+ border : none;
61
+ padding : 15px 0;
62
+ }
63
+
64
  #plugin-fw-wc table.form-table th, #yith-plugin-fw-panel table.form-table th {
65
  padding : 20px;
66
  }
88
  .yith-plugin-fw-wp-page-wrapper .wrap {
89
  border : 1px solid #d8d8d8;
90
  border-top : 0;
91
+ margin: 0px 15px 0 0;
92
  background : #fff;
93
  padding : 20px;
94
  box-sizing : border-box;
95
  }
96
+ .yith-plugin-fw-wp-page-wrapper .wrap.subnav-wrap .wrap{
97
+ margin-top: -20px;
98
+ }
99
 
100
  #wpwrap .yith-plugin-fw-wp-page-wrapper .yith-plugin-ui h2.nav-tab-wrapper, #wpbody-content .yith-plugin-fw-wp-page-wrapper .yith-plugin-ui h2.nav-tab-wrapper {
101
  padding-bottom : 0;
107
 
108
  .yith-plugin-fw-wp-page-wrapper h1.nav-tab-wrapper, .yith-plugin-fw-wp-page-wrapper h2.nav-tab-wrapper, .yith-plugin-fw-wp-page-wrapper .nav-tab-wrapper {
109
  padding-top : 9px;
110
+ padding-bottom: 0;
111
  }
112
 
113
  .yith-plugin-fw-wp-page-wrapper .wrap h1.wp-heading-inline {
137
  cursor : pointer;
138
  background-color : #375f6b;
139
  color : #fff;
140
+ margin-left : 10px !important;
141
  }
142
 
143
  .yith-plugin-fw-wp-page-wrapper .wrap a.page-title-action:hover {
526
  margin-right : 15px;
527
  }
528
 
529
+ .yith-plugin-ui .yit-admin-panel-container {
530
+ position : relative;
531
+ margin-right : 15px;
532
+ margin-top: -3px;
533
+ z-index: 0;
534
+ border-top: 1px solid #dbdada;
535
+ }
536
  .yit-admin-panel-content-wrap {
537
+ width: auto;
538
  display : block;
539
  }
540
 
569
  */
570
  .yith-plugin-ui .yith-plugin-fw-sub-tabs-nav {
571
  background : #fff;
572
+ padding: 10px 14px 0px 20px;
573
  box-sizing : border-box;
574
+ margin-right: 15px;
575
  border-left : 1px solid #d8d8d8;
576
  border-right : 1px solid #d8d8d8;
577
+ margin-top: -2px;
578
+ }
579
+ .yith-plugin-ui .yith-plugin-fw-wp-page-wrapper .wrap{
580
+ margin-top: -29px;
581
  }
 
582
  .yith-plugin-ui .yith-plugin-fw-sub-tabs-nav h3.nav-tab-wrapper {
583
  text-transform : uppercase;
584
  line-height : inherit;
585
  font-weight : 600;
586
+ margin-right: 21px;
587
+ box-sizing: border-box;
588
+ background-color: #f1f1f1;
589
+ padding-top: 0;
590
+ border: 1px solid #ccc;
591
+ border-bottom: 0;
592
+ margin-top: 20px;
593
  }
594
 
595
  .yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .nav-tab {
596
  line-height : 1.71428571;
597
  margin-left : 0;
598
  margin-right : 0;
599
+ background-color: #f1f1f1;
600
  color : #336374;
601
  font-size : 13px;
602
+ padding: 8px 20px 9px;
603
  border : 0;
 
 
604
  }
605
 
606
  .yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .nav-tab .yith-nav-sub-tab__title,
618
  color : inherit;
619
  }
620
 
 
 
 
 
621
  .yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .yith-nav-sub-tab--highlight {
622
  color : #fff;
623
  background : #2a8db0;
626
  .yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .nav-tab-active {
627
  color : #2a8db0;
628
  background : #fff;
629
+ border-bottom: 2px solid #fff;
630
+ }
631
+ .yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .nav-tab:first-child{
632
+ border:0;
633
+ }
634
+
635
+ .yith-plugin-fw-wp-page-wrapper.yith-current-subtab-opened > .wrap {
636
+ /* padding-top: 0; */
637
+ }
638
+ .yith-plugin-fw-wp-page-wrapper .nav-tab-wrapper {
639
+ border-bottom: 2px solid #e9e9e9;
640
+ margin: 0;
641
+ padding-top: 9px;
642
+ padding-bottom: 0;
643
+ line-height: inherit;
644
+ }
645
+
646
+ div.nav-subtab-wrap {
647
+ position: absolute;
648
+ top: 100%;
649
+ left: 1px;
650
+ padding-top: 10px;
651
+ visibility: hidden; /* hides sub-menu */
652
+ }
653
+ ul.nav-subtab {
654
+ opacity: 0;
655
+ background-color: #fff;
656
+ transition: max-height 0.5s ease-in;
657
+ max-height: 0;
658
+ z-index: 100;
659
+ overflow: hidden;
660
+ border: 1px solid #f2f2f2;
661
+ padding: 14px 15px;
662
+ }
663
+ ul.yith-plugin-fw-tabs {
664
+ display: block;
665
+ margin: 0;
666
+ }
667
+
668
+ li.yith-plugin-fw-tab-element {
669
+ position: relative;
670
+ margin: 0;
671
+ padding: 0;
672
+ display: inline-block;
673
+ height: 37px;
674
+ overflow: visible;
675
+ z-index:10;
676
+ }
677
+ .yith-plugin-fw-panel-custom-tab-container {
678
+ margin-top: -2px;
679
+ }
680
+
681
+ li.yith-plugin-fw-tab-element:hover{
682
+ cursor:pointer;
683
+ }
684
+ li.nav-subtab-item{
685
+ padding: 3px 0 0;
686
+ }
687
+ li.nav-subtab-item a {
688
+ font-size: 12px;
689
+ text-decoration: none;
690
+ letter-spacing: 0.05em;
691
+ color: #336374;
692
+ }
693
+ li.nav-subtab-item a:hover{
694
+ color:#228fb6;
695
+ }
696
+
697
+ li.yith-plugin-fw-tab-element a:hover .nav-subtab-wrap,
698
+ li.yith-plugin-fw-tab-element:hover .nav-subtab-wrap {
699
+ visibility: visible; /* shows sub-menu */
700
+ }
701
+
702
+ li.yith-plugin-fw-tab-element a:hover ul.nav-subtab,
703
+ li.yith-plugin-fw-tab-element:hover ul.nav-subtab{
704
+ max-height: 200px;
705
+ -webkit-box-shadow: -2px 2px 10px rgba(0, 111, 101, 0.27);
706
+ -moz-box-shadow: -2px 2px 10px rgba(0, 111, 101, 0.27);
707
+ box-shadow: -2px 2px 10px rgba(0, 111, 101, 0.27);
708
+ opacity: 1;
709
+ transition-delay: 0s, 0s, 0.3s;
710
+ min-width: 180px;
711
+ }
712
+
713
+ li.yith-plugin-fw-tab-element a.nav-tab i {
714
+ margin-left: 10px;
715
+ font-size:12px;
716
+ }
717
+
718
+ li.yith-plugin-fw-tab-element a.nav-tab i:before {
719
+ color: #fff;
720
+ }
721
+
722
+ .yith-plugin-fw-panel .woocommerce-page{
723
+ margin-top:-2px;
724
+ }
725
+
726
+ .yith-plugin-ui .yith-plugin-fw-sub-tabs-nav ~ .yit-admin-panel-container {
727
+ margin-top: 0;
728
+ padding-top: 0;
729
+ }
730
+
731
+ .yith-plugin-ui .yith-plugin-fw-sub-tabs-nav ~ .yit-admin-panel-container,
732
+ .yith-plugin-ui .yith-plugin-fw-sub-tabs-nav ~ .wrap.subnav-wrap {
733
+ border: 1px solid #d8d8d8;
734
+ border-top: 0;
735
+ margin: -2px 15px 0 0;
736
+ background: #fff;
737
+ padding: 20px;
738
+ box-sizing: border-box;
739
+ }
740
+
741
+ .yith-plugin-ui .yith-plugin-fw-sub-tabs-nav ~ .wrap.subnav-wrap .wrap,
742
+ .yith-plugin-ui .yit-admin-panel-content-wrap.has-subnav {
743
+ margin: -20px 15px 0 0;
744
  }
745
 
746
  /* === Responsive === */
plugin-fw/assets/css/yith-fields.css CHANGED
@@ -22,14 +22,20 @@
22
  width : 100%;
23
  }
24
 
 
 
 
 
 
 
25
  .yith-plugin-fw-field-wrapper span.desc {
26
  display : block;
27
  width : 100%;
28
  }
29
 
30
  .yith-plugin-fw-title-field-wrapper h3.title {
31
- width : 100%;
32
- padding: 0 !important;
33
  }
34
 
35
  .the-metabox .yith-plugin-fw-title-field-wrapper h3.title {
@@ -37,15 +43,16 @@
37
  }
38
 
39
  .yith-plugin-fw span.color-alpha {
40
- height: 100%!important;
41
- width: 100% !important;
42
- border: 1px solid #d9d9d9;
43
- margin: -1px;
44
  }
45
 
46
- .yith-plugin-fw .wp-color-result-text{
47
- height: 100%;
48
  }
 
49
  .yith-plugin-fw input[type=email],
50
  .yith-plugin-fw input[type=number],
51
  .yith-plugin-fw input[type=text]:not(.select2-search__field),
@@ -55,11 +62,11 @@
55
  .yith-plugin-ui input[type=password],
56
  .woocommerce .yith-plugin-fw table.form-table input[type=text]:not(.select2-search__field),
57
  .woocommerce .yith-plugin-fw table.form-table select {
58
- width : 400px;
59
- max-width : 100%;
60
- height : 30px;
61
- padding : 5px;
62
- line-height: 1;
63
  }
64
 
65
  .woocommerce .yith-plugin-fw table.form-table input[type=text].wp-color-picker,
@@ -72,8 +79,8 @@
72
  padding : 3px 5px;
73
  }
74
 
75
- .wp-core-ui .yith-plugin-fw-colorpicker-field-wrapper button{
76
- border-color: #7e8993;
77
  }
78
 
79
  .woocommerce .yith-plugin-fw table.form-table input[type=text].colorpick,
@@ -279,17 +286,22 @@ ul.yit-icons-manager-list li.active {
279
 
280
  .yith-plugin-fw-checkbox-array__row {
281
  margin-bottom : 10px;
 
282
  }
283
 
284
  .yith-plugin-fw-checkbox-array__row label {
285
  display : inline-block !important;
286
  width : auto !important;
287
  float : none !important;
288
- margin : 0 !important;
289
  padding : 0 !important;
290
  font-weight : 400 !important;
291
  }
292
 
 
 
 
 
293
  /* ------- Sidebar Layout ------- */
294
  .yith-plugin-fw-sidebar-layout input[type="radio"] {
295
  display : none;
@@ -442,12 +454,12 @@ ul.yit-icons-manager-list li.active {
442
  WordPress 5.3 with old panel fixes
443
  ****************/
444
  .yith-plugin-fw-field-wrapper .select2-container .select2-selection--single {
445
- height: auto;
446
- line-height: 1;
447
  }
448
 
449
- .yith-plugin-fw-field-wrapper .select2-container .select2-selection--single .select2-selection__arrow{
450
- height: 100%;
451
  }
452
 
453
  /****************
@@ -480,157 +492,192 @@ YITH UI
480
  }
481
 
482
  .yith-icon-paypal-svgrepo-com:before {
483
- content: "\e91b";
484
  }
 
485
  .yith-icon-check-circle:before {
486
- content: "\e921";
487
- color: #757575;
488
  }
 
489
  .yith-icon-info-squared:before {
490
- content: "\e922";
491
- color: #757575;
492
  }
 
493
  .yith-icon-warning-triangle:before {
494
- content: "\e923";
495
- color: #757575;
496
  }
 
497
  .yith-icon-bank:before {
498
- content: "\e91c";
499
  }
 
500
  .yith-icon-accounting:before {
501
- content: "\e91d";
502
  }
 
503
  .yith-icon-bank-check:before {
504
- content: "\e91e";
505
  }
 
506
  .yith-icon-cash:before {
507
- content: "\e91f";
508
  }
 
509
  .yith-icon-credit-card:before {
510
- content: "\e920";
511
  }
 
512
  .yith-icon-calendar_add:before {
513
- content: "\e913";
514
- color: #757575;
515
  }
 
516
  .yith-icon-calendar_money:before {
517
- content: "\e914";
518
- color: #757575;
519
  }
 
520
  .yith-icon-calendar2:before {
521
- content: "\e915";
522
- color: #757575;
523
  }
 
524
  .yith-icon-people:before {
525
- content: "\e916";
526
- color: #757575;
527
  }
 
528
  .yith-icon-shield_money:before {
529
- content: "\e917";
530
- color: #757575;
531
  }
 
532
  .yith-icon-time_check:before {
533
- content: "\e918";
534
- color: #757575;
535
  }
 
536
  .yith-icon-world_settings:before {
537
- content: "\e919";
538
- color: #757575;
539
  }
 
540
  .yith-icon-arrow_eye_closed:before {
541
- content: "\e912";
542
- color: #757575;
543
  }
 
544
  .yith-icon-arrow_eye:before {
545
- content: "\e911";
546
- color: #757575;
547
  }
 
548
  .yith-icon-reset:before {
549
- content: "\e910";
550
- color: #757575;
551
  }
 
552
  .yith-icon-drag:before {
553
- content: "\e90f";
554
- color: #757575;
555
  }
 
556
  .yith-icon-trash:before {
557
- content: "\e90d";
558
- color: #757575;
559
  }
 
560
  .yith-icon-info:before {
561
- content: "\e90e";
562
- color: #757575;
563
  }
 
564
  .yith-icon-arrow_down:before {
565
- content: "\e900";
566
- color: #757575;
567
  }
 
568
  .yith-icon-arrow_left:before {
569
- content: "\e901";
570
- color: #757575;
571
  }
 
572
  .yith-icon-arrow_right:before {
573
- content: "\e902";
574
- color: #757575;
575
  }
 
576
  .yith-icon-arrow_up:before {
577
- content: "\e903";
578
- color: #757575;
579
  }
 
580
  .yith-icon-calendar:before {
581
- content: "\e904";
582
- color: #757575;
583
  }
 
584
  .yith-icon-check:before {
585
- content: "\e905";
586
- color: #757575;
587
  }
 
588
  .yith-icon-close:before {
589
- content: "\e906";
590
- color: #757575;
591
  }
 
592
  .yith-icon-edit:before {
593
- content: "\e907";
594
- color: #757575;
595
  }
 
596
  .yith-icon-magnifier:before {
597
- content: "\e908";
598
- color: #757575;
599
  }
 
600
  .yith-icon-pencil:before {
601
- content: "\e909";
602
- color: #757575;
603
  }
 
604
  .yith-icon-plus:before {
605
- content: "\e90a";
606
- color: #757575;
607
  }
 
608
  .yith-icon-update:before {
609
- content: "\e90b";
610
- color: #757575;
611
  }
 
612
  .yith-icon-upload:before {
613
- content: "\e90c";
614
- color: #757575;
615
  }
 
616
  .yith-icon-reply:before {
617
- content: "\e91a";
618
  }
619
 
620
  .yith-plugin-fw-banner {
621
- width : 100%;
622
- height: 45px;
623
- background : url('../images/banner-premium.png');
624
- display: flex;
625
- align-items: center;
626
- padding-right: -23px;
627
  }
628
 
629
  .yith-plugin-fw-banner h1 {
630
  text-transform : uppercase;
631
  color : #0c5777;
632
  font-size : 15px;
633
- padding: 0 0 0 110px;
634
  font-weight : 700;
635
  text-align : left;
636
  display : inline-block;
@@ -653,19 +700,20 @@ YITH UI
653
  box-shadow : none;
654
  }
655
 
656
- .yith-plugin-fw-rate{
657
- margin: 20px 0;
658
  }
659
 
660
- .yith-plugin-fw-rate .dashicons-star-filled{
661
- font-size: 12px;
662
- margin: 4px -4px;
663
- color: #0c5777;
664
  }
665
 
666
- .yith-plugin-fw-rate a{
667
- text-decoration: none;
668
  }
 
669
  .yith-plugin-ui a {
670
  outline : none;
671
  box-shadow : none;
@@ -687,6 +735,7 @@ YITH UI
687
  font-size : 15px;
688
  padding : 7px 20px;
689
  border : 0;
 
690
  }
691
 
692
  .yith-plugin-ui .nav-tab:first-child {
@@ -696,6 +745,10 @@ YITH UI
696
  .yith-plugin-ui .nav-tab.yith-premium {
697
  background-color : #be421c;
698
  }
 
 
 
 
699
 
700
  .yith-plugin-ui .nav-tab-active {
701
  background-color : #fff;
@@ -734,7 +787,7 @@ YITH UI
734
 
735
  .yith-plugin-ui span.description {
736
  color : #716269;
737
- font-size : 14px;
738
  font-style : normal;
739
  font-weight : 400;
740
  margin-top : 15px;
@@ -743,7 +796,7 @@ YITH UI
743
 
744
  #wpwrap .yith-plugin-ui h2.nav-tab-wrapper, #wpbody-content .yith-plugin-ui h2.nav-tab-wrapper {
745
  border : 0;
746
- border-bottom : 1px solid #ccc;
747
  margin-right : 15px;
748
  margin-bottom : 0;
749
  background-color : transparent;
@@ -784,9 +837,11 @@ YITH UI
784
  .yith-plugin-ui #plugin-fw-wc table.form-table th, #yith-plugin-fw-panel table.form-table th.titledesc, .yith-plugin-ui #plugin-fw-wc table.form-table td, #yith-plugin-fw-panel table.form-table td.forminp {
785
  padding : 30px 20px;
786
  }
 
787
  .yith-plugin-ui #plugin-fw-wc table.form-table tr.toggle-element-fixed td, #yith-plugin-fw-panel table.form-table tr.toggle-element-fixed td.forminp {
788
- padding: 0 20px 30px;
789
  }
 
790
  .yith-plugin-ui #plugin-fw-wc h2 + div {
791
  background : #fff;
792
  border-left : 1px solid #d9d9d9;
@@ -812,7 +867,7 @@ YITH UI
812
  font-size : 30px;
813
  font-weight : normal;
814
  display : block;
815
- margin-top : -5px;
816
  float : left;
817
  margin-right : 15px;
818
  }
@@ -863,11 +918,11 @@ YITH UI
863
  .yith-plugin-ui input[type=text]:not(.select2-search__field).wp-color-picker,
864
  .yith-plugin-ui table.form-table input[type=text].wp-color-picker,
865
  .woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=text].wp-color-picker {
866
- border: 0;
867
- height: 30px;
868
- max-width: 121px;
869
- font-size: 11px;
870
- padding: 0;
871
  }
872
 
873
  .yith-plugin-ui .search-box input[name="s"] {
@@ -1125,14 +1180,14 @@ YITH UI
1125
  .yith-plugin-ui .select2-container.select2-container--focus .select2-selection--single,
1126
  .yith-plugin-ui .select2-container.select2-container--focus .select2-selection--multiple,
1127
  .yith-plugin-ui .select2-container.select2-container--open .select2-selection--single,
1128
- .yith-plugin-ui .select2-container.select2-container--open .select2-selection--multiple{
1129
- margin : 0;
1130
- border : 0;
1131
  box-shadow : none;
1132
  }
1133
 
1134
- .yith-plugin-ui .select2-container .select2-selection--single .select2-selection__arrow{
1135
- background: none;
1136
  }
1137
 
1138
  /* old panel*/
@@ -1170,6 +1225,10 @@ span.select2.select2-container.select2-container--default.yith-plugin-fw-select2
1170
  font-size : 13px;
1171
  }
1172
 
 
 
 
 
1173
  .yith-plugin-ui .select2-container--default .select2-selection--single .select2-selection__arrow:before {
1174
  content : "\e900";
1175
  font-family : 'yith-icon' !important;
@@ -1230,9 +1289,7 @@ span.select2.select2-container.select2-container--default.yith-plugin-fw-select2
1230
  text-indent : -9999px;
1231
  }
1232
 
1233
-
1234
- .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:after,
1235
- .woocommerce .yith-plugin-ui .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:after,
1236
  .yith-plugin-ui .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:after {
1237
  float : right;
1238
  color : #fff;
@@ -1243,15 +1300,6 @@ span.select2.select2-container.select2-container--default.yith-plugin-fw-select2
1243
  text-indent : 0;
1244
  }
1245
 
1246
- .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:after {
1247
- color : #000;
1248
- }
1249
-
1250
- .yith-plugin-ui .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:after
1251
- .yith-plugin-fw-panel .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:after {
1252
- color : #000;
1253
- }
1254
-
1255
  .yith-plugin-ui .select2-container .select2-selection--multiple,
1256
  .yith-plugin-ui .select2-container--default.select2-container--focus .select2-selection--multiple {
1257
  border : 0;
@@ -1388,8 +1436,9 @@ span.select2.select2-container.select2-container--default.yith-plugin-fw-select2
1388
  .yith-plugin-ui .yith-plugin-fw-onoff-container input + span {
1389
  border : 1px solid #d8d8d8;
1390
  background-color : #fff;
1391
- width : 60px;
1392
  height : 24px;
 
1393
  }
1394
 
1395
  .yith-plugin-ui .yith-plugin-fw-onoff-container input + span:before {
@@ -1426,7 +1475,7 @@ span.select2.select2-container.select2-container--default.yith-plugin-fw-select2
1426
  .yith-plugin-ui .yith-plugin-fw-onoff-container input:checked + span:before,
1427
  .yith-plugin-ui.yith-plugin-fw-onoff-container input.onoffchecked + span:before {
1428
  background-color : #98aa36;
1429
- left : 41px;
1430
  }
1431
 
1432
  .yith-plugin-ui .yith-plugin-fw-onoff-container input:checked + span:after,
@@ -1602,8 +1651,8 @@ div#ui-datepicker-div.yith-plugin-fw-datepicker-div {
1602
 
1603
  .yith-plugin-ui .yith-plugin-fw-field-wrapper .wp-picker-input-wrap,
1604
  .yith-plugin-ui .yith-plugin-fw-field-wrapper .wp-picker-input-wrap > * {
1605
- display: inline-block !important;
1606
- vertical-align: middle;
1607
  }
1608
 
1609
  .yith-plugin-ui .yith-plugin-fw-field-wrapper .wp-picker-active .iris-picker,
@@ -1660,7 +1709,7 @@ div#ui-datepicker-div.yith-plugin-fw-datepicker-div {
1660
  }
1661
 
1662
  .yith-plugin-ui .wp-picker-default-custom:before {
1663
- content: "\e91a";
1664
  text-indent : 0;
1665
  font-family : 'yith-icon';
1666
  font-size : 20px;
@@ -1755,7 +1804,7 @@ div#ui-datepicker-div.yith-plugin-fw-datepicker-div {
1755
  cursor : grab;
1756
  }
1757
 
1758
- .yith-plugin-ui .yith-plugin-fw-slider-container .ui-slider-horizontal .ui-slider-handle:active:after{
1759
  cursor : grabbing;
1760
  }
1761
 
@@ -1787,9 +1836,11 @@ div#ui-datepicker-div.yith-plugin-fw-datepicker-div {
1787
  cursor : pointer;
1788
  transition : all ease 0.5s;
1789
  }
 
1790
  .yith-plugin-ui .yith-toggle-row.fixed {
1791
- margin: 0;
1792
  }
 
1793
  .yith-plugin-ui .yith-toggle-row.highlight {
1794
  transition : all ease 0.5s;
1795
  /*box-shadow: 0 0 7px rgb(81, 117, 129);*/
@@ -2004,8 +2055,8 @@ div#ui-datepicker-div.yith-plugin-fw-datepicker-div {
2004
  line-height : 33px;
2005
  }
2006
 
2007
- .yith-plugin-ui .bulkactions {
2008
- margin : 10px 0;
2009
  }
2010
 
2011
  .yith-plugin-ui .form-table td p.yith-section-description {
@@ -2062,6 +2113,7 @@ div#ui-datepicker-div.yith-plugin-fw-datepicker-div {
2062
  .yith-plugin-ui span.description {
2063
  margin-top : 10px;
2064
  line-height : 20px;
 
2065
  }
2066
 
2067
  .yith-plugin-fw-option-with-description {
@@ -2098,29 +2150,113 @@ div#ui-datepicker-div.yith-plugin-fw-datepicker-div {
2098
 
2099
  /** MULTI SELECT **/
2100
  .yith-plugin-ui .yith-plugin-fw-multi-select .yith-single-select {
2101
- display: inline-block;
2102
- width: 30%;
2103
- margin-right: 3%;
2104
- max-width: 400px;
2105
  }
 
2106
  .yith-plugin-ui .yith-plugin-fw-multi-select .yith-single-select label {
2107
- display: block;
2108
- font-size: 11px;
2109
- font-weight: 600;
2110
- margin: 0 0 10px 0;
2111
  }
 
2112
  .yith-plugin-ui .yith-plugin-fw-multi-select .yith-single-select select,
2113
  .yith-plugin-ui .yith-plugin-fw-multi-select .yith-single-select span.select2 {
2114
- width: 100% !important;
2115
- min-width: auto !important;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2116
  }
2117
 
 
 
 
 
 
 
 
2118
  /** OVERRIDE WOOCOMMERCE CLASSES FOR 5.3 */
2119
- .branch-5-3 .yith-plugin-fw .select2-container .select2-selection--single .select2-selection__arrow{
2120
- background:none;
2121
  }
2122
- .branch-5-3 .yith-plugin-fw .select2-container.select2-container--focus .select2-selection--single, .branch-5-3 .yith-plugin-fw .select2-container.select2-container--open .select2-selection--multiple, .branch-5-3 .yith-plugin-fw .select2-container.select2-container--open .select2-selection--single{
2123
- box-shadow: none;
 
2124
  }
2125
 
2126
  @media screen and (max-width : 1440px) {
@@ -2161,10 +2297,12 @@ div#ui-datepicker-div.yith-plugin-fw-datepicker-div {
2161
  .yith-plugin-fw-banner h1 {
2162
  line-height : 1.2em;
2163
  }
2164
- .yith-plugin-fw-banner h1{
2165
- font-size: 12px;
2166
- padding-right: 10px;
 
2167
  }
 
2168
  .yith-plugin-ui .yith-add-box,
2169
  .yith-plugin-ui .yith-toggle-row {
2170
  width : 100%;
@@ -2177,7 +2315,83 @@ div#ui-datepicker-div.yith-plugin-fw-datepicker-div {
2177
  }
2178
 
2179
  .yith-plugin-ui .wp-picker-container .wp-color-result.button {
2180
- padding: 0;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2181
  }
2182
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2183
  }
22
  width : 100%;
23
  }
24
 
25
+ .yith-plugin-fw-field-wrapper .yith-inline-fields > div {
26
+ display: inline-block;
27
+ vertical-align: middle;
28
+ margin-right: 5px;
29
+ }
30
+
31
  .yith-plugin-fw-field-wrapper span.desc {
32
  display : block;
33
  width : 100%;
34
  }
35
 
36
  .yith-plugin-fw-title-field-wrapper h3.title {
37
+ width : 100%;
38
+ padding : 0 !important;
39
  }
40
 
41
  .the-metabox .yith-plugin-fw-title-field-wrapper h3.title {
43
  }
44
 
45
  .yith-plugin-fw span.color-alpha {
46
+ height : 100% !important;
47
+ width : 100% !important;
48
+ border : 1px solid #d9d9d9;
49
+ margin : -1px;
50
  }
51
 
52
+ .yith-plugin-fw .wp-color-result-text {
53
+ height : 100%;
54
  }
55
+
56
  .yith-plugin-fw input[type=email],
57
  .yith-plugin-fw input[type=number],
58
  .yith-plugin-fw input[type=text]:not(.select2-search__field),
62
  .yith-plugin-ui input[type=password],
63
  .woocommerce .yith-plugin-fw table.form-table input[type=text]:not(.select2-search__field),
64
  .woocommerce .yith-plugin-fw table.form-table select {
65
+ width : 400px;
66
+ max-width : 100%;
67
+ height : 30px;
68
+ padding : 5px;
69
+ line-height : 1;
70
  }
71
 
72
  .woocommerce .yith-plugin-fw table.form-table input[type=text].wp-color-picker,
79
  padding : 3px 5px;
80
  }
81
 
82
+ .wp-core-ui .yith-plugin-fw-colorpicker-field-wrapper button {
83
+ border-color : #7e8993;
84
  }
85
 
86
  .woocommerce .yith-plugin-fw table.form-table input[type=text].colorpick,
286
 
287
  .yith-plugin-fw-checkbox-array__row {
288
  margin-bottom : 10px;
289
+ display:flex;
290
  }
291
 
292
  .yith-plugin-fw-checkbox-array__row label {
293
  display : inline-block !important;
294
  width : auto !important;
295
  float : none !important;
296
+ margin : 0 0 0 10px !important;
297
  padding : 0 !important;
298
  font-weight : 400 !important;
299
  }
300
 
301
+ .yith-plugin-fw-checkbox-array__row label small{
302
+ display:block;
303
+ line-height: 2em;
304
+ }
305
  /* ------- Sidebar Layout ------- */
306
  .yith-plugin-fw-sidebar-layout input[type="radio"] {
307
  display : none;
454
  WordPress 5.3 with old panel fixes
455
  ****************/
456
  .yith-plugin-fw-field-wrapper .select2-container .select2-selection--single {
457
+ height : auto;
458
+ line-height : 1;
459
  }
460
 
461
+ .yith-plugin-fw-field-wrapper .select2-container .select2-selection--single .select2-selection__arrow {
462
+ height : 100%;
463
  }
464
 
465
  /****************
492
  }
493
 
494
  .yith-icon-paypal-svgrepo-com:before {
495
+ content : "\e91b";
496
  }
497
+
498
  .yith-icon-check-circle:before {
499
+ content : "\e921";
500
+ color : #757575;
501
  }
502
+
503
  .yith-icon-info-squared:before {
504
+ content : "\e922";
505
+ color : #757575;
506
  }
507
+
508
  .yith-icon-warning-triangle:before {
509
+ content : "\e923";
510
+ color : #757575;
511
  }
512
+
513
  .yith-icon-bank:before {
514
+ content : "\e91c";
515
  }
516
+
517
  .yith-icon-accounting:before {
518
+ content : "\e91d";
519
  }
520
+
521
  .yith-icon-bank-check:before {
522
+ content : "\e91e";
523
  }
524
+
525
  .yith-icon-cash:before {
526
+ content : "\e91f";
527
  }
528
+
529
  .yith-icon-credit-card:before {
530
+ content : "\e920";
531
  }
532
+
533
  .yith-icon-calendar_add:before {
534
+ content : "\e913";
535
+ color : #757575;
536
  }
537
+
538
  .yith-icon-calendar_money:before {
539
+ content : "\e914";
540
+ color : #757575;
541
  }
542
+
543
  .yith-icon-calendar2:before {
544
+ content : "\e915";
545
+ color : #757575;
546
  }
547
+
548
  .yith-icon-people:before {
549
+ content : "\e916";
550
+ color : #757575;
551
  }
552
+
553
  .yith-icon-shield_money:before {
554
+ content : "\e917";
555
+ color : #757575;
556
  }
557
+
558
  .yith-icon-time_check:before {
559
+ content : "\e918";
560
+ color : #757575;
561
  }
562
+
563
  .yith-icon-world_settings:before {
564
+ content : "\e919";
565
+ color : #757575;
566
  }
567
+
568
  .yith-icon-arrow_eye_closed:before {
569
+ content : "\e912";
570
+ color : #757575;
571
  }
572
+
573
  .yith-icon-arrow_eye:before {
574
+ content : "\e911";
575
+ color : #757575;
576
  }
577
+
578
  .yith-icon-reset:before {
579
+ content : "\e910";
580
+ color : #757575;
581
  }
582
+
583
  .yith-icon-drag:before {
584
+ content : "\e90f";
585
+ color : #757575;
586
  }
587
+
588
  .yith-icon-trash:before {
589
+ content : "\e90d";
590
+ color : #757575;
591
  }
592
+
593
  .yith-icon-info:before {
594
+ content : "\e90e";
595
+ color : #757575;
596
  }
597
+
598
  .yith-icon-arrow_down:before {
599
+ content : "\e900";
600
+ color : #757575;
601
  }
602
+
603
  .yith-icon-arrow_left:before {
604
+ content : "\e901";
605
+ color : #757575;
606
  }
607
+
608
  .yith-icon-arrow_right:before {
609
+ content : "\e902";
610
+ color : #757575;
611
  }
612
+
613
  .yith-icon-arrow_up:before {
614
+ content : "\e903";
615
+ color : #757575;
616
  }
617
+
618
  .yith-icon-calendar:before {
619
+ content : "\e904";
620
+ color : #757575;
621
  }
622
+
623
  .yith-icon-check:before {
624
+ content : "\e905";
625
+ color : #757575;
626
  }
627
+
628
  .yith-icon-close:before {
629
+ content : "\e906";
630
+ color : #757575;
631
  }
632
+
633
  .yith-icon-edit:before {
634
+ content : "\e907";
635
+ color : #757575;
636
  }
637
+
638
  .yith-icon-magnifier:before {
639
+ content : "\e908";
640
+ color : #757575;
641
  }
642
+
643
  .yith-icon-pencil:before {
644
+ content : "\e909";
645
+ color : #757575;
646
  }
647
+
648
  .yith-icon-plus:before {
649
+ content : "\e90a";
650
+ color : #757575;
651
  }
652
+
653
  .yith-icon-update:before {
654
+ content : "\e90b";
655
+ color : #757575;
656
  }
657
+
658
  .yith-icon-upload:before {
659
+ content : "\e90c";
660
+ color : #757575;
661
  }
662
+
663
  .yith-icon-reply:before {
664
+ content : "\e91a";
665
  }
666
 
667
  .yith-plugin-fw-banner {
668
+ width : 100%;
669
+ height : 45px;
670
+ background : #cfd9dd url(../images/banner-premium.png) no-repeat;
671
+ display : flex;
672
+ align-items : center;
673
+ padding-right : -23px;
674
  }
675
 
676
  .yith-plugin-fw-banner h1 {
677
  text-transform : uppercase;
678
  color : #0c5777;
679
  font-size : 15px;
680
+ padding : 0 0 0 110px;
681
  font-weight : 700;
682
  text-align : left;
683
  display : inline-block;
700
  box-shadow : none;
701
  }
702
 
703
+ .yith-plugin-fw-rate {
704
+ margin : 20px 0;
705
  }
706
 
707
+ .yith-plugin-fw-rate .dashicons-star-filled {
708
+ font-size : 12px;
709
+ margin : 4px -4px;
710
+ color : #0c5777;
711
  }
712
 
713
+ .yith-plugin-fw-rate a {
714
+ text-decoration : none;
715
  }
716
+
717
  .yith-plugin-ui a {
718
  outline : none;
719
  box-shadow : none;
735
  font-size : 15px;
736
  padding : 7px 20px;
737
  border : 0;
738
+ transition: background-color 0.3s linear;
739
  }
740
 
741
  .yith-plugin-ui .nav-tab:first-child {
745
  .yith-plugin-ui .nav-tab.yith-premium {
746
  background-color : #be421c;
747
  }
748
+ .yith-plugin-ui .yith-nav-tab-wrapper .yith-plugin-fw-tab-element:hover > a.nav-tab:not(.nav-tab-active),
749
+ .yith-plugin-ui .yith-nav-tab-wrapper .nav-tab:not(.nav-tab-active):hover{
750
+ background-color:#207a92;
751
+ }
752
 
753
  .yith-plugin-ui .nav-tab-active {
754
  background-color : #fff;
787
 
788
  .yith-plugin-ui span.description {
789
  color : #716269;
790
+ font-size : 13px;
791
  font-style : normal;
792
  font-weight : 400;
793
  margin-top : 15px;
796
 
797
  #wpwrap .yith-plugin-ui h2.nav-tab-wrapper, #wpbody-content .yith-plugin-ui h2.nav-tab-wrapper {
798
  border : 0;
799
+ /* border-bottom : 1px solid #ccc; */
800
  margin-right : 15px;
801
  margin-bottom : 0;
802
  background-color : transparent;
837
  .yith-plugin-ui #plugin-fw-wc table.form-table th, #yith-plugin-fw-panel table.form-table th.titledesc, .yith-plugin-ui #plugin-fw-wc table.form-table td, #yith-plugin-fw-panel table.form-table td.forminp {
838
  padding : 30px 20px;
839
  }
840
+
841
  .yith-plugin-ui #plugin-fw-wc table.form-table tr.toggle-element-fixed td, #yith-plugin-fw-panel table.form-table tr.toggle-element-fixed td.forminp {
842
+ padding : 0 20px 30px;
843
  }
844
+
845
  .yith-plugin-ui #plugin-fw-wc h2 + div {
846
  background : #fff;
847
  border-left : 1px solid #d9d9d9;
867
  font-size : 30px;
868
  font-weight : normal;
869
  display : block;
870
+ margin-top : -12px;
871
  float : left;
872
  margin-right : 15px;
873
  }
918
  .yith-plugin-ui input[type=text]:not(.select2-search__field).wp-color-picker,
919
  .yith-plugin-ui table.form-table input[type=text].wp-color-picker,
920
  .woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=text].wp-color-picker {
921
+ border : 0;
922
+ height : 30px;
923
+ max-width : 121px;
924
+ font-size : 11px;
925
+ padding : 0;
926
  }
927
 
928
  .yith-plugin-ui .search-box input[name="s"] {
1180
  .yith-plugin-ui .select2-container.select2-container--focus .select2-selection--single,
1181
  .yith-plugin-ui .select2-container.select2-container--focus .select2-selection--multiple,
1182
  .yith-plugin-ui .select2-container.select2-container--open .select2-selection--single,
1183
+ .yith-plugin-ui .select2-container.select2-container--open .select2-selection--multiple {
1184
+ margin : 0;
1185
+ border : 0;
1186
  box-shadow : none;
1187
  }
1188
 
1189
+ .yith-plugin-ui .select2-container .select2-selection--single .select2-selection__arrow {
1190
+ background : none;
1191
  }
1192
 
1193
  /* old panel*/
1225
  font-size : 13px;
1226
  }
1227
 
1228
+ .wc-wp-version-gte-53 .yith-plugin-ui .select2-container .select2-selection--single .select2-selection__arrow{
1229
+ background-image: none;
1230
+ }
1231
+
1232
  .yith-plugin-ui .select2-container--default .select2-selection--single .select2-selection__arrow:before {
1233
  content : "\e900";
1234
  font-family : 'yith-icon' !important;
1289
  text-indent : -9999px;
1290
  }
1291
 
1292
+ .yith-plugin-fw-panel .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:after,
 
 
1293
  .yith-plugin-ui .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:after {
1294
  float : right;
1295
  color : #fff;
1300
  text-indent : 0;
1301
  }
1302
 
 
 
 
 
 
 
 
 
 
1303
  .yith-plugin-ui .select2-container .select2-selection--multiple,
1304
  .yith-plugin-ui .select2-container--default.select2-container--focus .select2-selection--multiple {
1305
  border : 0;
1436
  .yith-plugin-ui .yith-plugin-fw-onoff-container input + span {
1437
  border : 1px solid #d8d8d8;
1438
  background-color : #fff;
1439
+ width : 58px;
1440
  height : 24px;
1441
+ line-height :14px;
1442
  }
1443
 
1444
  .yith-plugin-ui .yith-plugin-fw-onoff-container input + span:before {
1475
  .yith-plugin-ui .yith-plugin-fw-onoff-container input:checked + span:before,
1476
  .yith-plugin-ui.yith-plugin-fw-onoff-container input.onoffchecked + span:before {
1477
  background-color : #98aa36;
1478
+ left: 38px;
1479
  }
1480
 
1481
  .yith-plugin-ui .yith-plugin-fw-onoff-container input:checked + span:after,
1651
 
1652
  .yith-plugin-ui .yith-plugin-fw-field-wrapper .wp-picker-input-wrap,
1653
  .yith-plugin-ui .yith-plugin-fw-field-wrapper .wp-picker-input-wrap > * {
1654
+ display : inline-block !important;
1655
+ vertical-align : middle;
1656
  }
1657
 
1658
  .yith-plugin-ui .yith-plugin-fw-field-wrapper .wp-picker-active .iris-picker,
1709
  }
1710
 
1711
  .yith-plugin-ui .wp-picker-default-custom:before {
1712
+ content : "\e91a";
1713
  text-indent : 0;
1714
  font-family : 'yith-icon';
1715
  font-size : 20px;
1804
  cursor : grab;
1805
  }
1806
 
1807
+ .yith-plugin-ui .yith-plugin-fw-slider-container .ui-slider-horizontal .ui-slider-handle:active:after {
1808
  cursor : grabbing;
1809
  }
1810
 
1836
  cursor : pointer;
1837
  transition : all ease 0.5s;
1838
  }
1839
+
1840
  .yith-plugin-ui .yith-toggle-row.fixed {
1841
+ margin : 0;
1842
  }
1843
+
1844
  .yith-plugin-ui .yith-toggle-row.highlight {
1845
  transition : all ease 0.5s;
1846
  /*box-shadow: 0 0 7px rgb(81, 117, 129);*/
2055
  line-height : 33px;
2056
  }
2057
 
2058
+ .yith-plugin-ui .tablenav {
2059
+ margin : 20px 0;
2060
  }
2061
 
2062
  .yith-plugin-ui .form-table td p.yith-section-description {
2113
  .yith-plugin-ui span.description {
2114
  margin-top : 10px;
2115
  line-height : 20px;
2116
+ max-width : 40%;
2117
  }
2118
 
2119
  .yith-plugin-fw-option-with-description {
2150
 
2151
  /** MULTI SELECT **/
2152
  .yith-plugin-ui .yith-plugin-fw-multi-select .yith-single-select {
2153
+ display : inline-block;
2154
+ width : 30%;
2155
+ margin-right : 3%;
2156
+ max-width : 400px;
2157
  }
2158
+
2159
  .yith-plugin-ui .yith-plugin-fw-multi-select .yith-single-select label {
2160
+ display : block;
2161
+ font-size : 11px;
2162
+ font-weight : 600;
2163
+ margin : 0 0 10px 0;
2164
  }
2165
+
2166
  .yith-plugin-ui .yith-plugin-fw-multi-select .yith-single-select select,
2167
  .yith-plugin-ui .yith-plugin-fw-multi-select .yith-single-select span.select2 {
2168
+ width : 100% !important;
2169
+ min-width : auto !important;
2170
+ }
2171
+
2172
+ /**
2173
+ * Dimensions
2174
+ */
2175
+
2176
+ .yith-plugin-fw-dimensions {
2177
+ max-width : 400px;
2178
+ }
2179
+
2180
+ .yith-plugin-fw-dimensions__units {
2181
+ text-align : right;
2182
+ text-transform : uppercase;
2183
+ }
2184
+
2185
+ .yith-plugin-fw-dimensions__unit {
2186
+ display : inline-block;
2187
+ padding : 5px 3px;
2188
+ cursor : pointer;
2189
+ font-weight : 700;
2190
+ }
2191
+
2192
+ .yith-plugin-fw-dimensions__unit--selected {
2193
+ text-decoration : underline;
2194
+ color : #007694;
2195
+ }
2196
+
2197
+ .yith-plugin-fw-dimensions__dimensions {
2198
+ display : flex;
2199
+ margin-top : 3px;
2200
+ }
2201
+
2202
+ .yith-plugin-fw-dimensions__dimension {
2203
+ text-align : center;
2204
+ }
2205
+
2206
+ .yith-plugin-fw-dimensions__dimension > input[type=number].yith-plugin-fw-dimensions__dimension__number {
2207
+ width : 100% !important;
2208
+ min-width : 0 !important;
2209
+ border-radius : 0 !important;
2210
+ border : 1px solid #d8d8d8 !important;
2211
+ border-left : none !important;
2212
+ height : 38px !important;
2213
+ text-align : center;
2214
+ }
2215
+
2216
+ .yith-plugin-fw-dimensions__dimension:first-child > input[type=number].yith-plugin-fw-dimensions__dimension__number {
2217
+ border-left : 1px solid #d8d8d8 !important;
2218
+ border-radius : 6px 0 0 6px !important;
2219
+ }
2220
+
2221
+ .yith-plugin-fw-dimensions__dimension:last-child > input[type=number].yith-plugin-fw-dimensions__dimension__number {
2222
+ border-radius : 0 6px 6px 0 !important;
2223
+ }
2224
+
2225
+ .yith-plugin-fw-dimensions__dimension__label {
2226
+ text-transform : uppercase;
2227
+ font-weight : 700;
2228
+ color : #91959b;
2229
+ font-size : .8em;
2230
+ }
2231
+
2232
+ .yith-plugin-fw-dimensions__linked {
2233
+ cursor : pointer;
2234
+ }
2235
+
2236
+ .yith-plugin-fw-dimensions__linked span {
2237
+ border : 1px solid #d8d8d8;
2238
+ border-left : none;
2239
+ height : 38px;
2240
+ border-radius : 0 6px 6px 0;
2241
+ box-sizing : border-box;
2242
+ padding : 8px 10px;
2243
+ width : 100%;
2244
  }
2245
 
2246
+ .yith-plugin-fw-dimensions--linked-active .yith-plugin-fw-dimensions__linked span {
2247
+ color : #fff;
2248
+ background : #007694;
2249
+ border-color : #007694;
2250
+ }
2251
+
2252
+
2253
  /** OVERRIDE WOOCOMMERCE CLASSES FOR 5.3 */
2254
+ .branch-5-3 .yith-plugin-fw .select2-container .select2-selection--single .select2-selection__arrow {
2255
+ background : none;
2256
  }
2257
+
2258
+ .branch-5-3 .yith-plugin-fw .select2-container.select2-container--focus .select2-selection--single, .branch-5-3 .yith-plugin-fw .select2-container.select2-container--open .select2-selection--multiple, .branch-5-3 .yith-plugin-fw .select2-container.select2-container--open .select2-selection--single {
2259
+ box-shadow : none;
2260
  }
2261
 
2262
  @media screen and (max-width : 1440px) {
2297
  .yith-plugin-fw-banner h1 {
2298
  line-height : 1.2em;
2299
  }
2300
+
2301
+ .yith-plugin-fw-banner h1 {
2302
+ font-size : 12px;
2303
+ padding-right : 10px;
2304
  }
2305
+
2306
  .yith-plugin-ui .yith-add-box,
2307
  .yith-plugin-ui .yith-toggle-row {
2308
  width : 100%;
2315
  }
2316
 
2317
  .yith-plugin-ui .wp-picker-container .wp-color-result.button {
2318
+ padding : 0;
2319
+ }
2320
+
2321
+ .yith-plugin-ui #plugin-fw-wc table.form-table th,
2322
+ #yith-plugin-fw-panel table.form-table th.titledesc,
2323
+ .yith-plugin-ui #plugin-fw-wc table.form-table td,
2324
+ #yith-plugin-fw-panel table.form-table td.forminp {
2325
+ padding: 20px 20px;
2326
+ }
2327
+
2328
+ .yith-plugin-ui #plugin-fw-wc table.form-table th.titledesc,
2329
+ #yith-plugin-fw-panel table.form-table th.titledesc {
2330
+ padding-bottom: 0;
2331
+ }
2332
+ }
2333
+
2334
+ @media (max-width: 480px) {
2335
+ .yith-plugin-ui .nav-tab {
2336
+ font-size: 12px;
2337
+ }
2338
+ .yith-plugin-ui h2 {
2339
+ padding: 20px 20px;
2340
+ }
2341
+ .yith-plugin-ui [type="radio"]:checked + label:before, .yith-plugin-ui [type="radio"]:not(:checked) + label:before {
2342
+ width: 14px;
2343
+ height: 14px;
2344
+ }
2345
+ .yith-plugin-ui [type="radio"]:checked + label:after, .yith-plugin-ui [type="radio"]:not(:checked) + label:after {
2346
+ width: 10px;
2347
+ height: 10px;
2348
+ top: 3px;
2349
+ left: 3px;
2350
+ }
2351
+ .yith-plugin-ui [type="radio"]:checked + label, .yith-plugin-ui [type="radio"]:not(:checked) + label {
2352
+ padding-left: 25px;
2353
  }
2354
 
2355
+ .yith-plugin-ui [type="radio"]:checked + label, .yith-plugin-ui [type="radio"]:not(:checked) + label {
2356
+ font-size: 13px;
2357
+ }
2358
+ .yith-plugin-ui span.description {
2359
+ font-size: 12px;
2360
+ }
2361
+ .yith-plugin-ui #plugin-fw-wc table.form-table th,
2362
+ #yith-plugin-fw-panel table.form-table th.titledesc,
2363
+ .yith-plugin-ui #plugin-fw-wc table.form-table td,
2364
+ #yith-plugin-fw-panel table.form-table td.forminp {
2365
+ padding: 15px 20px;
2366
+ }
2367
+
2368
+ .yith-plugin-ui .yith-plugin-fw-onoff-container input + span {
2369
+ width: 48px;
2370
+ height: 20px;
2371
+ }
2372
+ .yith-plugin-ui .yith-plugin-fw-onoff-container input + span:before {
2373
+ top: 3px;
2374
+ left: 3px;
2375
+ }
2376
+ .yith-plugin-ui .yith-plugin-fw-onoff-container input:checked + span:before, .yith-plugin-ui.yith-plugin-fw-onoff-container input.onoffchecked + span:before {
2377
+ left: 30px;
2378
+ }
2379
+ .yith-plugin-ui .yith-plugin-fw-onoff-container input:checked + span:after, .yith-plugin-ui.yith-plugin-fw-onoff-container input.onoffchecked + span:after {
2380
+ font-size: 11px;
2381
+ padding: 0px 6px;
2382
+ margin-top: 3px;
2383
+ }
2384
+ .yith-plugin-ui .yith-plugin-fw-onoff-container input + span:after {
2385
+ font-size: 11px;
2386
+ padding-left: 24px;
2387
+ margin-top: 3px;
2388
+ }
2389
+
2390
+ .yith-plugin-fw .select2-container .select2-selection--single .select2-selection__rendered {
2391
+ font-size: 14px;
2392
+ }
2393
+
2394
+ .yith-plugin-ui input {
2395
+ font-size: 14px;
2396
+ }
2397
  }
plugin-fw/assets/js/yit-plugin-panel.js CHANGED
@@ -15,13 +15,21 @@ jQuery( function ( $ ) {
15
  var field = '#' + t.data( 'dep-target' ),
16
  dep = '#' + t.data( 'dep-id' ),
17
  value = t.data( 'dep-value' ),
18
- type = t.data( 'dep-type' );
 
 
 
 
 
 
 
19
 
20
  dependencies_handler( field, dep, value.toString(), type );
21
 
22
- $( dep ).on( 'change', function () {
23
  dependencies_handler( field, dep, value.toString(), type );
24
- } ).change();
 
25
  } );
26
 
27
  //Handle dependencies.
@@ -44,6 +52,10 @@ jQuery( function ( $ ) {
44
  }
45
  }
46
 
 
 
 
 
47
  values = values.split( ',' );
48
 
49
  for ( var i = 0; i < values.length; i++ ) {
@@ -178,4 +190,27 @@ jQuery( function ( $ ) {
178
  wrap.prepend( notices );
179
  }
180
 
181
- } );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  var field = '#' + t.data( 'dep-target' ),
16
  dep = '#' + t.data( 'dep-id' ),
17
  value = t.data( 'dep-value' ),
18
+ type = t.data( 'dep-type' ),
19
+ event = 'change',
20
+ wrapper = $( dep + '-wrapper' ),
21
+ field_type = wrapper.data( 'type' );
22
+
23
+ if( field_type === 'select-images' ){
24
+ event = 'yith_select_images_value_changed';
25
+ }
26
 
27
  dependencies_handler( field, dep, value.toString(), type );
28
 
29
+ $( dep ).on( event, function () {
30
  dependencies_handler( field, dep, value.toString(), type );
31
+ } ).trigger( event );
32
+
33
  } );
34
 
35
  //Handle dependencies.
52
  }
53
  }
54
 
55
+ if( $( deps + '-wrapper' ).data( 'type' ) === 'select-images' ){
56
+ val = $( deps + '-wrapper' ).find( 'select' ).first().val();
57
+ }
58
+
59
  values = values.split( ',' );
60
 
61
  for ( var i = 0; i < values.length; i++ ) {
190
  wrap.prepend( notices );
191
  }
192
 
193
+
194
+ // TAB MENU AND SUB TABS
195
+ var active_subnav = $(document).find( '.yith-nav-sub-tab.nav-tab-active' );
196
+
197
+ if( active_subnav.length ){
198
+ // WP page
199
+ var mainWrapper = $(document).find( '.yith-plugin-fw-wp-page-wrapper' );
200
+ if( ! mainWrapper.length ){
201
+ mainWrapper = $(document).find( '#wpbody-content > .yith-plugin-ui' );
202
+ }
203
+
204
+ if( mainWrapper ){
205
+ // serach first for deafult wrap
206
+ var wrap = mainWrapper.find( '.yit-admin-panel-content-wrap' );
207
+ if( wrap.length ) {
208
+ wrap.addClass( 'has-subnav' );
209
+ }
210
+ else {
211
+ // try to wrap a generic wrap div in main wrapper
212
+ mainWrapper.find('.wrap').wrap('<div class="wrap subnav-wrap"></div>');
213
+ }
214
+ }
215
+ }
216
+ } );
plugin-fw/assets/js/yit-plugin-panel.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(function(a){function e(e,t,i,n){var s=!0;if("string"==typeof t){":radio"==t.substr(0,6)&&(t+=":checked");var r=a(t).val();if("checkbox"==a(t).attr("type"))r=a(t).is(":checked")?"yes":"no";i=i.split(",");for(var d=0;d<i.length;d++){if(r==i[d]){s=!0;break}s=!1}}var c=a(e),o=a(e+"-container").closest("tr");o.length<1&&(o=c.closest(".yith-plugin-fw-panel-wc-row"));var l,h=n.split("-");for(l in h){var f=h[l];if(s)switch(f){case"disable":o.removeClass("yith-disabled"),c.attr("disabled",!1);break;case"hideme":c.show();break;case"fadeInOut":case"fadeIn":o.show(500);break;case"fadeOut":o.show();break;default:o.show(),o.fadeTo("slow",1).addClass("fade-in")}else switch(f){case"disable":o.addClass("yith-disabled"),c.attr("disabled",!0);break;case"hideme":c.hide();break;case"fadeInOut":case"fadeOut":o.hide(500);break;case"fadeIn":o.hide();break;default:o.hasClass("fade-in")?o.fadeTo("slow",0,function(){a(this).hide().removeClass("fade-in")}):(o.hide(),o.css({opacity:"0"}))}}}a("[data-dep-target]").each(function(){var t=a(this),i="#"+t.data("dep-target"),n="#"+t.data("dep-id"),s=t.data("dep-value"),r=t.data("dep-type");e(i,n,s.toString(),r),a(n).on("change",function(){e(i,n,s.toString(),r)}).change()}),a(".rm_connectedlist").each(function(){var e=a(this).find("ul"),t=a(this).find(":hidden");e.sortable({connectWith:e,update:function(i,n){var s={};e.each(function(){var e={};a(this).children().each(function(){e[a(this).data("option")]=a(this).text()}),s[a(this).data("list")]=e}),t.val(JSON.stringify(s).replace(/[\\"']/g,"\\$&").replace(/\u0000/g,"\\0"))}}).disableSelection()}),a(document).ready(function(){a(".google-analytic-generate").click(function(){var e=a("#"+a(this).data("textarea")).data("codemirrorInstance"),t="(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n";t+="(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement( o ),\n",t+="m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\n",t+="})(window,document,'script','//www.google-analytics.com/analytics.js','ga');\n\n",t+="ga('create', '"+a("#"+a(this).data("input")).val()+"', '"+a(this).data("basename")+"');\n",t+="ga('send', 'pageview');\n",e.replaceRange(t,e.getCursor("start"),e.getCursor("end"))})}),a(".yith-plugin-fw-panel .woo-nav-tab-wrapper").removeClass("woo-nav-tab-wrapper").addClass("yith-nav-tab-wrapper");var t=a(".wrap.yith-plugin-ui").first(),i=a("div.updated, div.error, div.notice");i.addClass("inline"),t.length&&t.prepend(i)});
1
+ jQuery(function(a){function e(e,t,i,n){var s=!0;if("string"==typeof t){":radio"==t.substr(0,6)&&(t+=":checked");var r=a(t).val();if("checkbox"==a(t).attr("type"))r=a(t).is(":checked")?"yes":"no";"select-images"===a(t+"-wrapper").data("type")&&(r=a(t+"-wrapper").find("select").first().val()),i=i.split(",");for(var d=0;d<i.length;d++){if(r==i[d]){s=!0;break}s=!1}}var c=a(e),o=a(e+"-container").closest("tr");o.length<1&&(o=c.closest(".yith-plugin-fw-panel-wc-row"));var l,p=n.split("-");for(l in p){var h=p[l];if(s)switch(h){case"disable":o.removeClass("yith-disabled"),c.attr("disabled",!1);break;case"hideme":c.show();break;case"fadeInOut":case"fadeIn":o.show(500);break;case"fadeOut":o.show();break;default:o.show(),o.fadeTo("slow",1).addClass("fade-in")}else switch(h){case"disable":o.addClass("yith-disabled"),c.attr("disabled",!0);break;case"hideme":c.hide();break;case"fadeInOut":case"fadeOut":o.hide(500);break;case"fadeIn":o.hide();break;default:o.hasClass("fade-in")?o.fadeTo("slow",0,function(){a(this).hide().removeClass("fade-in")}):(o.hide(),o.css({opacity:"0"}))}}}a("[data-dep-target]").each(function(){var t=a(this),i="#"+t.data("dep-target"),n="#"+t.data("dep-id"),s=t.data("dep-value"),r=t.data("dep-type"),d="change";"select-images"===a(n+"-wrapper").data("type")&&(d="yith_select_images_value_changed"),e(i,n,s.toString(),r),a(n).on(d,function(){e(i,n,s.toString(),r)}).trigger(d)}),a(".rm_connectedlist").each(function(){var e=a(this).find("ul"),t=a(this).find(":hidden");e.sortable({connectWith:e,update:function(i,n){var s={};e.each(function(){var e={};a(this).children().each(function(){e[a(this).data("option")]=a(this).text()}),s[a(this).data("list")]=e}),t.val(JSON.stringify(s).replace(/[\\"']/g,"\\$&").replace(/\u0000/g,"\\0"))}}).disableSelection()}),a(document).ready(function(){a(".google-analytic-generate").click(function(){var e=a("#"+a(this).data("textarea")).data("codemirrorInstance"),t="(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n";t+="(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement( o ),\n",t+="m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\n",t+="})(window,document,'script','//www.google-analytics.com/analytics.js','ga');\n\n",t+="ga('create', '"+a("#"+a(this).data("input")).val()+"', '"+a(this).data("basename")+"');\n",t+="ga('send', 'pageview');\n",e.replaceRange(t,e.getCursor("start"),e.getCursor("end"))})}),a(".yith-plugin-fw-panel .woo-nav-tab-wrapper").removeClass("woo-nav-tab-wrapper").addClass("yith-nav-tab-wrapper");var t=a(".wrap.yith-plugin-ui").first(),i=a("div.updated, div.error, div.notice");if(i.addClass("inline"),t.length&&t.prepend(i),a(document).find(".yith-nav-sub-tab.nav-tab-active").length){var n=a(document).find(".yith-plugin-fw-wp-page-wrapper");if(n.length||(n=a(document).find("#wpbody-content > .yith-plugin-ui")),n)(t=n.find(".yit-admin-panel-content-wrap")).length?t.addClass("has-subnav"):n.find(".wrap").wrap('<div class="wrap subnav-wrap"></div>')}});
plugin-fw/assets/js/yith-colorpicker.min.js CHANGED
@@ -8,4 +8,4 @@
8
  * https://github.com/kallookoo/wp-color-picker-alpha
9
  * Licensed under the GPLv2 license or later.
10
  */
11
- !function(t){if(!t.wp.wpColorPicker.prototype._hasAlpha){var o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAAHnlligAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHJJREFUeNpi+P///4EDBxiAGMgCCCAGFB5AADGCRBgYDh48CCRZIJS9vT2QBAggFBkmBiSAogxFBiCAoHogAKIKAlBUYTELAiAmEtABEECk20G6BOmuIl0CIMBQ/IEMkO0myiSSraaaBhZcbkUOs0HuBwDplz5uFJ3Z4gAAAABJRU5ErkJggg==",r='<div class="wp-picker-holder" />',e='<div class="wp-picker-container" />',a='<input type="button" class="button button-small" />',i=void 0!==wpColorPickerL10n.current;if(i)var n='<a tabindex="0" class="wp-color-result" />';else{n='<button type="button" class="button wp-color-result" aria-expanded="false"><span class="wp-color-result-text"></span></button>';var l="<label></label>",s='<span class="screen-reader-text"></span>'}Color.fn.toString=function(){if(this._alpha<1)return this.toCSS("rgba",this._alpha).replace(/\s+/g,"");var t=parseInt(this._color,10).toString(16);return this.error?"":(t.length<6&&(t=("00000"+t).substr(-6)),"#"+t)},t.widget("wp.wpColorPicker",t.wp.wpColorPicker,{_hasAlpha:!0,_create:function(){if(t.support.iris){var p=this,c=p.element;if(t.extend(p.options,c.data()),"hue"===p.options.type)return p._createHueOnly();p.close=t.proxy(p.close,p),p.initialValue=c.val(),c.addClass("wp-color-picker"),i?(c.hide().wrap(e),p.wrap=c.parent(),p.toggler=t(n).insertBefore(c).css({backgroundColor:p.initialValue}).attr("title",wpColorPickerL10n.pick).attr("data-current",wpColorPickerL10n.current),p.pickerContainer=t(r).insertAfter(c),p.button=t(a).addClass("hidden")):(c.parent("label").length||(c.wrap(l),p.wrappingLabelText=t(s).insertBefore(c).text(wpColorPickerL10n.defaultLabel)),p.wrappingLabel=c.parent(),p.wrappingLabel.wrap(e),p.wrap=p.wrappingLabel.parent(),p.toggler=t(n).insertBefore(p.wrappingLabel).css({backgroundColor:p.initialValue}),p.toggler.find(".wp-color-result-text").text(wpColorPickerL10n.pick),p.pickerContainer=t(r).insertAfter(p.wrappingLabel),p.button=t(a)),p.options.defaultColor?(p.button.addClass("wp-picker-default").val(wpColorPickerL10n.defaultString),i||p.button.attr("aria-label",wpColorPickerL10n.defaultAriaLabel)):(p.button.addClass("wp-picker-clear").val(wpColorPickerL10n.clear),i||p.button.attr("aria-label",wpColorPickerL10n.clearAriaLabel)),i?c.wrap('<span class="wp-picker-input-wrap" />').after(p.button):(p.wrappingLabel.wrap('<span class="wp-picker-input-wrap hidden" />').after(p.button),p.inputWrapper=c.closest(".wp-picker-input-wrap")),c.iris({target:p.pickerContainer,hide:p.options.hide,width:p.options.width,mode:p.options.mode,palettes:p.options.palettes,change:function(r,e){p.options.alpha?(p.toggler.css({"background-image":"url("+o+")"}),i?p.toggler.html('<span class="color-alpha" />'):(p.toggler.css({position:"relative"}),0==p.toggler.find("span.color-alpha").length&&p.toggler.append('<span class="color-alpha" />')),p.toggler.find("span.color-alpha").css({width:"30px",height:"24px",position:"absolute",top:0,left:0,"border-top-left-radius":"2px","border-bottom-left-radius":"2px",background:e.color.toString()})):p.toggler.css({backgroundColor:e.color.toString()}),t.isFunction(p.options.change)&&p.options.change.call(this,r,e)}}),c.val(p.initialValue),p._addListeners(),p.options.hide||p.toggler.click()}},_addListeners:function(){var o=this;o.wrap.on("click.wpcolorpicker",function(t){t.stopPropagation()}),o.toggler.click(function(){o.toggler.hasClass("wp-picker-open")?o.close():o.open()}),o.element.on("change",function(r){(""===t(this).val()||o.element.hasClass("iris-error"))&&(o.options.alpha?(i&&o.toggler.removeAttr("style"),o.toggler.find("span.color-alpha").css("backgroundColor","")):o.toggler.css("backgroundColor",""),t.isFunction(o.options.clear)&&o.options.clear.call(this,r))}),o.button.on("click",function(r){t(this).hasClass("wp-picker-clear")?(o.element.val(""),o.options.alpha?(i&&o.toggler.removeAttr("style"),o.toggler.find("span.color-alpha").css("backgroundColor","")):o.toggler.css("backgroundColor",""),t.isFunction(o.options.clear)&&o.options.clear.call(this,r),o.element.trigger("change")):t(this).hasClass("wp-picker-default")&&o.element.val(o.options.defaultColor).change()})}}),t.widget("a8c.iris",t.a8c.iris,{_create:function(){if(this._super(),this.options.alpha=this.element.data("alpha")||!1,this.element.is(":input")||(this.options.alpha=!1),void 0!==this.options.alpha&&this.options.alpha){var o=this,r=o.element,e=t('<div class="iris-strip iris-slider iris-alpha-slider"><div class="iris-slider-offset iris-slider-offset-alpha"></div></div>').appendTo(o.picker.find(".iris-picker-inner")),a={aContainer:e,aSlider:e.find(".iris-slider-offset-alpha")};void 0!==r.data("custom-width")?o.options.customWidth=parseInt(r.data("custom-width"))||0:o.options.customWidth=100,o.options.defaultWidth=r.width(),(o._color._alpha<1||-1!=o._color.toString().indexOf("rgb"))&&r.width(parseInt(o.options.defaultWidth+o.options.customWidth)),t.each(a,function(t,r){o.controls[t]=r}),o.controls.square.css({"margin-right":"0"});var i=o.picker.width()-o.controls.square.width()-20,n=i/6,l=i/2-n;t.each(["aContainer","strip"],function(t,r){o.controls[r].width(l).css({"margin-left":n+"px"})}),o._initControls(),o._change()}},_initControls:function(){if(this._super(),this.options.alpha){var t=this;t.controls.aSlider.slider({orientation:"vertical",min:0,max:100,step:1,value:parseInt(100*t._color._alpha),slide:function(o,r){t._color._alpha=parseFloat(r.value/100),t._change.apply(t,arguments)}})}},_change:function(){this._super();var t=this,r=t.element;if(this.options.alpha){var e=t.controls,a=parseInt(100*t._color._alpha),i=t._color.toRgb(),n=["rgb("+i.r+","+i.g+","+i.b+") 0%","rgba("+i.r+","+i.g+","+i.b+", 0) 100%"],l=t.options.defaultWidth,s=t.options.customWidth,p=t.picker.closest(".wp-picker-container").find(".wp-color-result");e.aContainer.css({background:"linear-gradient(to bottom, "+n.join(", ")+"), url("+o+")"}),p.hasClass("wp-picker-open")&&(e.aSlider.slider("value",a),t._color._alpha<1?(e.strip.attr("style",e.strip.attr("style").replace(/rgba\(([0-9]+,)(\s+)?([0-9]+,)(\s+)?([0-9]+)(,(\s+)?[0-9\.]+)\)/g,"rgb($1$3$5)")),r.width(parseInt(l+s))):r.width(l))}(r.data("reset-alpha")||!1)&&t.picker.find(".iris-palette-container").on("click.palette",".iris-palette",function(){t._color._alpha=1,t.active="external",t._change()}),r.trigger("change")},_addInputListeners:function(t){var o=this,r=function(r){var e=new Color(t.val()),a=t.val();t.removeClass("iris-error"),e.error?""!==a&&t.addClass("iris-error"):e.toString()!==o._color.toString()&&("keyup"===r.type&&a.match(/^[0-9a-fA-F]{3}$/)||o._setOption("color",e.toString()))};t.on("change",r).on("keyup",o._debounce(r,100)),o.options.hide&&t.on("focus",function(){o.show()})}})}}(jQuery),jQuery(document).ready(function(t){t(".color-picker").wpColorPicker()});
8
  * https://github.com/kallookoo/wp-color-picker-alpha
9
  * Licensed under the GPLv2 license or later.
10
  */
11
+ !function(t){if(!t.wp.wpColorPicker.prototype._hasAlpha){var o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAAHnlligAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHJJREFUeNpi+P///4EDBxiAGMgCCCAGFB5AADGCRBgYDh48CCRZIJS9vT2QBAggFBkmBiSAogxFBiCAoHogAKIKAlBUYTELAiAmEtABEECk20G6BOmuIl0CIMBQ/IEMkO0myiSSraaaBhZcbkUOs0HuBwDplz5uFJ3Z4gAAAABJRU5ErkJggg==",i='<div class="wp-picker-holder" />',a='<div class="wp-picker-container" />',e='<input type="button" class="button button-small" />',r='<button type="button" class="button wp-color-result" aria-expanded="false"><span class="wp-color-result-text"></span></button>';Color.fn.toString=function(){if(this._alpha<1)return this.toCSS("rgba",this._alpha).replace(/\s+/g,"");var t=parseInt(this._color,10).toString(16);return this.error?"":(t.length<6&&(t=("00000"+t).substr(-6)),"#"+t)},t.widget("wp.wpColorPicker",t.wp.wpColorPicker,{_hasAlpha:!0,_create:function(){if(t.support.iris){var n=this,l=n.element;if(t.extend(n.options,l.data()),"hue"===n.options.type)return n._createHueOnly();n.close=t.proxy(n.close,n),n.initialValue=l.val(),l.addClass("wp-color-picker"),l.parent("label").length||(l.wrap("<label></label>"),n.wrappingLabelText=t('<span class="screen-reader-text"></span>').insertBefore(l).text(wpColorPickerL10n.defaultLabel)),n.wrappingLabel=l.parent(),n.wrappingLabel.wrap(a),n.wrap=n.wrappingLabel.parent(),n.toggler=t(r).insertBefore(n.wrappingLabel).css({backgroundColor:n.initialValue}),n.toggler.find(".wp-color-result-text").text(wpColorPickerL10n.pick),n.pickerContainer=t(i).insertAfter(n.wrappingLabel),n.button=t(e),n.options.defaultColor?(n.button.addClass("wp-picker-default").val(wpColorPickerL10n.defaultString),n.button.attr("aria-label",wpColorPickerL10n.defaultAriaLabel)):(n.button.addClass("wp-picker-clear").val(wpColorPickerL10n.clear),n.button.attr("aria-label",wpColorPickerL10n.clearAriaLabel)),n.wrappingLabel.wrap('<span class="wp-picker-input-wrap hidden" />').after(n.button),n.inputWrapper=l.closest(".wp-picker-input-wrap"),l.iris({target:n.pickerContainer,hide:n.options.hide,width:n.options.width,mode:n.options.mode,palettes:n.options.palettes,change:function(i,a){n.options.alpha?(n.toggler.css({"background-image":"url("+o+")"}),n.toggler.css({position:"relative"}),0==n.toggler.find("span.color-alpha").length&&n.toggler.append('<span class="color-alpha" />'),n.toggler.find("span.color-alpha").css({width:"30px",height:"24px",position:"absolute",top:0,left:0,"border-top-left-radius":"2px","border-bottom-left-radius":"2px",background:a.color.toString()})):n.toggler.css({backgroundColor:a.color.toString()}),t.isFunction(n.options.change)&&n.options.change.call(this,i,a)}}),l.val(n.initialValue),n._addListeners(),n.options.hide||n.toggler.click()}},_addListeners:function(){var o=this;o.wrap.on("click.wpcolorpicker",function(t){t.stopPropagation()}),o.toggler.click(function(){o.toggler.hasClass("wp-picker-open")?o.close():o.open()}),o.element.on("change",function(i){(""===t(this).val()||o.element.hasClass("iris-error"))&&(o.options.alpha?o.toggler.find("span.color-alpha").css("backgroundColor",""):o.toggler.css("backgroundColor",""),t.isFunction(o.options.clear)&&o.options.clear.call(this,i))}),o.button.on("click",function(i){t(this).hasClass("wp-picker-clear")?(o.element.val(""),o.options.alpha?o.toggler.find("span.color-alpha").css("backgroundColor",""):o.toggler.css("backgroundColor",""),t.isFunction(o.options.clear)&&o.options.clear.call(this,i),o.element.trigger("change")):t(this).hasClass("wp-picker-default")&&o.element.val(o.options.defaultColor).change()})}}),t.widget("a8c.iris",t.a8c.iris,{_create:function(){if(this._super(),this.options.alpha=this.element.data("alpha")||!1,this.element.is(":input")||(this.options.alpha=!1),void 0!==this.options.alpha&&this.options.alpha){var o=this,i=o.element,a=t('<div class="iris-strip iris-slider iris-alpha-slider"><div class="iris-slider-offset iris-slider-offset-alpha"></div></div>').appendTo(o.picker.find(".iris-picker-inner")),e={aContainer:a,aSlider:a.find(".iris-slider-offset-alpha")};void 0!==i.data("custom-width")?o.options.customWidth=parseInt(i.data("custom-width"))||0:o.options.customWidth=100,o.options.defaultWidth=i.width(),(o._color._alpha<1||-1!=o._color.toString().indexOf("rgb"))&&i.width(parseInt(o.options.defaultWidth+o.options.customWidth)),t.each(e,function(t,i){o.controls[t]=i}),o.controls.square.css({"margin-right":"0"});var r=o.picker.width()-o.controls.square.width()-20,n=r/6,l=r/2-n;t.each(["aContainer","strip"],function(t,i){o.controls[i].width(l).css({"margin-left":n+"px"})}),o._initControls(),o._change()}},_initControls:function(){if(this._super(),this.options.alpha){var t=this;t.controls.aSlider.slider({orientation:"vertical",min:0,max:100,step:1,value:parseInt(100*t._color._alpha),slide:function(o,i){t._color._alpha=parseFloat(i.value/100),t._change.apply(t,arguments)}})}},_change:function(){this._super();var t=this,i=t.element;if(this.options.alpha){var a=t.controls,e=parseInt(100*t._color._alpha),r=t._color.toRgb(),n=["rgb("+r.r+","+r.g+","+r.b+") 0%","rgba("+r.r+","+r.g+","+r.b+", 0) 100%"],l=t.options.defaultWidth,s=t.options.customWidth,p=t.picker.closest(".wp-picker-container").find(".wp-color-result");a.aContainer.css({background:"linear-gradient(to bottom, "+n.join(", ")+"), url("+o+")"}),p.hasClass("wp-picker-open")&&(a.aSlider.slider("value",e),t._color._alpha<1?(a.strip.attr("style",a.strip.attr("style").replace(/rgba\(([0-9]+,)(\s+)?([0-9]+,)(\s+)?([0-9]+)(,(\s+)?[0-9\.]+)\)/g,"rgb($1$3$5)")),i.width(parseInt(l+s))):i.width(l))}!!i.data("reset-alpha")&&t.picker.find(".iris-palette-container").on("click.palette",".iris-palette",function(){t._color._alpha=1,t.active="external",t._change()}),i.trigger("change")},_addInputListeners:function(t){var o=this,i=function(i){var a=new Color(t.val()),e=t.val();t.removeClass("iris-error"),a.error?""!==e&&t.addClass("iris-error"):a.toString()!==o._color.toString()&&("keyup"===i.type&&e.match(/^[0-9a-fA-F]{3}$/)||o._setOption("color",a.toString()))};t.on("change",i).on("keyup",o._debounce(i,100)),o.options.hide&&t.on("focus",function(){o.show()})}})}}(jQuery),jQuery(document).ready(function(t){t(".color-picker").wpColorPicker()});
plugin-fw/assets/js/yith-fields.js CHANGED
@@ -84,7 +84,7 @@
84
  // preview
85
  $upload.imgUrl.change( function () {
86
  var url = $( this ).val(),
87
- re = new RegExp( "(http|ftp|https)://[a-zA-Z0-9@?^=%&amp;:/~+#-_.]*.(gif|jpg|jpeg|png|ico)" ),
88
  preview = $( this ).parent().find( $upload.imgPreviewHandler ).first();
89
 
90
  if ( preview.length < 1 ) {
@@ -383,7 +383,7 @@
383
  select = wrapper.find( 'select' ).first();
384
 
385
  if ( select.length ) {
386
- select.val( key );
387
  items.removeClass( 'yith-plugin-fw-select-images__item--selected' );
388
  item.addClass( 'yith-plugin-fw-select-images__item--selected' );
389
  }
@@ -696,11 +696,22 @@
696
  toggle.saveToggleElement();
697
  } );
698
 
699
- // Radio
700
- $( document ).on( 'click', '.yith-plugin-fw-radio input[type=radio]', function () {
701
- $( this ).closest( '.yith-plugin-fw-radio' ).val( $( this ).val() ).trigger( 'change' );
702
- } );
 
 
 
 
 
 
 
 
 
 
703
 
 
704
  $( document ).on( 'click', '.yith-password-eye', function () {
705
  var $this = $( this ),
706
  inp = $( this ).closest( '.yith-password-wrapper' ).find( 'input' );
@@ -713,13 +724,6 @@
713
  }
714
  } );
715
 
716
- $( document.body ).on( 'yith-plugin-fw-init-radio', function () {
717
- $( '.yith-plugin-fw-radio:not(.yith-plugin-fw-radio--initialized)' ).each( function () {
718
- $( this ).val( $( this ).attr( 'value' ) );
719
- $( this ).addClass( 'yith-plugin-fw-radio--initialized' );
720
- } );
721
- } ).trigger( 'yith-plugin-fw-init-radio' );
722
-
723
  /**
724
  * Select2 - add class to stylize it with the new plugin-fw style
725
  */
@@ -728,5 +732,70 @@
728
  $( '.select2-results' ).closest( '.select2-container' ).addClass( 'yith-plugin-fw-select2-container' );
729
  }
730
  } );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
731
 
732
  } )( jQuery );
84
  // preview
85
  $upload.imgUrl.change( function () {
86
  var url = $( this ).val(),
87
+ re = new RegExp( "(http|ftp|https)://[a-zA-Z0-9@?^=%&amp;:/~+#-_.]*.(gif|jpg|jpeg|png|ico|svg)" ),
88
  preview = $( this ).parent().find( $upload.imgPreviewHandler ).first();
89
 
90
  if ( preview.length < 1 ) {
383
  select = wrapper.find( 'select' ).first();
384
 
385
  if ( select.length ) {
386
+ select.val( key ).trigger('yith_select_images_value_changed');
387
  items.removeClass( 'yith-plugin-fw-select-images__item--selected' );
388
  item.addClass( 'yith-plugin-fw-select-images__item--selected' );
389
  }
696
  toggle.saveToggleElement();
697
  } );
698
 
699
+ // Radio
700
+ $( document ).on( 'click', '.yith-plugin-fw-radio input[type=radio]', function () {
701
+ var _radioContainer = $( this ).closest( '.yith-plugin-fw-radio' ),
702
+ _value = $( this ).val();
703
+
704
+ _radioContainer.val( _value ).data( 'value', _value ).trigger( 'change' );
705
+ } );
706
+
707
+ $( document.body ).on( 'yith-plugin-fw-init-radio', function () {
708
+ $( '.yith-plugin-fw-radio:not(.yith-plugin-fw-radio--initialized)' ).each( function () {
709
+ $( this ).val( $( this ).data( 'value' ) );
710
+ $( this ).addClass( 'yith-plugin-fw-radio--initialized' );
711
+ } );
712
+ } ).trigger( 'yith-plugin-fw-init-radio' );
713
 
714
+ // Password Eye field
715
  $( document ).on( 'click', '.yith-password-eye', function () {
716
  var $this = $( this ),
717
  inp = $( this ).closest( '.yith-password-wrapper' ).find( 'input' );
724
  }
725
  } );
726
 
 
 
 
 
 
 
 
727
  /**
728
  * Select2 - add class to stylize it with the new plugin-fw style
729
  */
732
  $( '.select2-results' ).closest( '.select2-container' ).addClass( 'yith-plugin-fw-select2-container' );
733
  }
734
  } );
735
+ /**
736
+ * Dimensions
737
+ */
738
+ var fw_dimensions = {
739
+ selectors : {
740
+ wrapper : '.yith-plugin-fw-dimensions',
741
+ units : {
742
+ wrapper : '.yith-plugin-fw-dimensions__units',
743
+ single : '.yith-plugin-fw-dimensions__unit',
744
+ value : '.yith-plugin-fw-dimensions__unit__value',
745
+ selectedClass: 'yith-plugin-fw-dimensions__unit--selected'
746
+ },
747
+ linked : {
748
+ button : '.yith-plugin-fw-dimensions__linked',
749
+ value : '.yith-plugin-fw-dimensions__linked__value',
750
+ wrapperActiveClass: 'yith-plugin-fw-dimensions--linked-active'
751
+ },
752
+ dimensions: {
753
+ number: '.yith-plugin-fw-dimensions__dimension__number'
754
+ }
755
+ },
756
+ init : function () {
757
+ var self = fw_dimensions;
758
+ $( document ).on( 'click', self.selectors.units.single, self.unitChange );
759
+ $( document ).on( 'click', self.selectors.linked.button, self.linkedChange );
760
+ $( document ).on( 'change keyup', self.selectors.dimensions.number, self.numberChange );
761
+ },
762
+ unitChange : function ( e ) {
763
+ var unit = $( this ).closest( fw_dimensions.selectors.units.single ),
764
+ wrapper = unit.closest( fw_dimensions.selectors.units.wrapper ),
765
+ units = wrapper.find( fw_dimensions.selectors.units.single ),
766
+ valueField = wrapper.find( fw_dimensions.selectors.units.value ).first(),
767
+ value = unit.data( 'value' );
768
+
769
+ units.removeClass( fw_dimensions.selectors.units.selectedClass );
770
+ unit.addClass( fw_dimensions.selectors.units.selectedClass );
771
+ valueField.val( value );
772
+ },
773
+ linkedChange: function () {
774
+ var button = $( this ).closest( fw_dimensions.selectors.linked.button ),
775
+ mainWrapper = button.closest( fw_dimensions.selectors.wrapper ),
776
+ valueField = button.find( fw_dimensions.selectors.linked.value ),
777
+ value = valueField.val();
778
+
779
+ if ( 'yes' === value ) {
780
+ mainWrapper.removeClass( fw_dimensions.selectors.linked.wrapperActiveClass );
781
+ valueField.val( 'no' );
782
+ } else {
783
+ mainWrapper.addClass( fw_dimensions.selectors.linked.wrapperActiveClass );
784
+ valueField.val( 'yes' );
785
+
786
+ mainWrapper.find( fw_dimensions.selectors.dimensions.number ).first().trigger( 'change' );
787
+ }
788
+ },
789
+ numberChange: function ( e ) {
790
+ var number = $( this ).closest( fw_dimensions.selectors.dimensions.number ),
791
+ mainWrapper = number.closest( fw_dimensions.selectors.wrapper );
792
+ if ( mainWrapper.hasClass( fw_dimensions.selectors.linked.wrapperActiveClass ) ) {
793
+ var numbers = mainWrapper.find( fw_dimensions.selectors.dimensions.number );
794
+
795
+ numbers.val( number.val() );
796
+ }
797
+ }
798
+ };
799
+ fw_dimensions.init();
800
 
801
  } )( jQuery );
plugin-fw/assets/js/yith-fields.min.js CHANGED
@@ -1 +1 @@
1
- !function(e){e(document).on("yith_fields_init",function(){var t=e(".yith-plugin-fw-datepicker"),i=e(".yith-plugin-fw-colorpicker"),a={imgPreviewHandler:".yith-plugin-fw-upload-img-preview",uploadButtonHandler:".yith-plugin-fw-upload-button",imgUrlHandler:".yith-plugin-fw-upload-img-url",resetButtonHandler:".yith-plugin-fw-upload-button-reset",imgUrl:e(".yith-plugin-fw-upload-img-url")},l=e(".add_media"),n={sliderWrapper:e(".yith-plugin-fw .image-gallery ul.slides-wrapper"),buttonHandler:".yith-plugin-fw .image-gallery-button"},o=e(".yith-plugin-fw-sidebar-layout"),r=e(".yith-plugin-fw .yith-plugin-fw-slider-container .ui-slider-horizontal"),d=e(".codemirror"),s=e(".yit-icons-manager-wrapper");e(".yith-plugin-ui td.forminp-checkbox");t.each(function(){var t=e(this).data();t.showAnim=!1,t.beforeShow=function(e,t){t.dpDiv.addClass("yith-plugin-fw-datepicker-div")},t.onClose=function(e,t){t.dpDiv.removeClass("yith-plugin-fw-datepicker-div")},e(this).datepicker(t)}),i.wpColorPicker({palettes:!1,width:200,mode:"hsl",clear:function(){var t=e(this);t.val(t.data("default-color")),t.change()}}),i.each(function(){var t=e(this).data("variations-label"),i=e(this).closest(".yith-plugin-fw-colorpicker-field-wrapper"),a=e(this).closest(".yith-single-colorpicker"),l=i.find(".wp-picker-input-wrap"),n=a.find(".wp-picker-input-wrap");if(l.length&&i.find("a.wp-color-result").attr("title",t),a.length&&a.find("a.wp-color-result").attr("title",t),!l.find(".wp-picker-clear-custom").length){var o=e("<span/>").attr({"class":"wp-picker-default-custom"});l.find(".wp-picker-default").wrap(o)}n.find(".wp-picker-clear-custom").length||(o=e("<span/>").attr({"class":"wp-picker-default-custom"}),n.find(".wp-picker-default").wrap(o))}),"undefined"!=typeof wp&&"undefined"!=typeof wp.media&&(a.imgUrl.change(function(){var t=e(this).val(),i=new RegExp("(http|ftp|https)://[a-zA-Z0-9@?^=%&amp;:/~+#-_.]*.(gif|jpg|jpeg|png|ico)"),l=e(this).parent().find(a.imgPreviewHandler).first();l.length<1&&(l=e(this).parent().parent().find(a.imgPreviewHandler).first()),i.test(t)?l.html('<img src="'+t+'" style="max-width:100px; max-height:100px;" />'):l.html("")}).trigger("change"),e(document).on("click",a.uploadButtonHandler,function(t){t.preventDefault();var i,l=e(this).attr("id").replace(/-button$/,"");if(i)i.open();else{var n=[new wp.media.controller.Library({library:wp.media.query(),multiple:!1,title:"Choose Image",priority:20,filterable:"uploaded"})];(i=wp.media.frames.downloadable_file=wp.media({title:"Choose Image",library:{type:""},button:{text:"Choose Image"},multiple:!1,states:n})).on("select",function(){var t=i.state().get("selection").first().toJSON();e("#"+l).val(t.url),e("#"+l+"-yith-attachment-id")&&e("#"+l+"-yith-attachment-id").val(t.id),a.imgUrl.trigger("change")}),i.open()}}),e(document).on("click",a.resetButtonHandler,function(t){var i=e(this),l=i.attr("id"),n=i.attr("id").replace(/-button-reset$/,""),o=e("#"+l).data("default");e("#"+n).val(o),a.imgUrl.trigger("change")}));l.on("click",function(){}),"undefined"!=typeof wp&&"undefined"!=typeof wp.media&&(e(document).on("click",n.buttonHandler,function(t){var i=e(this),a=i.closest(".image-gallery"),l=a.find(".image_gallery_ids"),n=l.val(),o=a.find("ul.slides-wrapper"),r=wp.media.frames.image_gallery=wp.media({title:i.data("choose"),button:{text:i.data("update")},states:[new wp.media.controller.Library({title:i.data("choose"),filterable:"all",multiple:!0})]});r.on("select",function(){r.state().get("selection").map(function(e){(e=e.toJSON()).id&&(n=n?n+","+e.id:e.id,o.append('<li class="image" data-attachment_id="'+e.id+'"><img src="'+e.sizes.thumbnail.url+'"/><ul class="actions"><li><a href="#" class="delete" title="'+i.data("delete")+'">x</a></li></ul></li>'))}),l.val(n)}),r.open()}),n.sliderWrapper.each(function(){var t=e(this);t.sortable({items:"li.image",cursor:"move",scrollSensitivity:40,forcePlaceholderSize:!0,forceHelperSize:!1,helper:"clone",opacity:.65,start:function(e,t){t.item.css("background-color","#f6f6f6")},stop:function(e,t){t.item.removeAttr("style")},update:function(i,a){var l="";t.find("li.image").css("cursor","default").each(function(){var t=e(this).attr("data-attachment_id");l=l+t+","}),t.closest(".image-gallery").find(".image_gallery_ids").val(l)}})}),n.sliderWrapper.on("click","a.delete",function(){var t=e(this).closest(".image-gallery"),i=e(this).closest(".image-gallery ul.slides-wrapper"),a=t.find(".image_gallery_ids"),l="";e(this).closest("li.image").remove(),i.find("li.image").css("cursor","default").each(function(){var t=e(this).attr("data-attachment_id");l=l+t+","}),a.val(l)})),o.each(function(){e(this).find("img").on("click",function(){var t=e(this).closest(".yith-plugin-fw-sidebar-layout"),i=t.find(".yith-plugin-fw-sidebar-layout-sidebar-left-container"),a=t.find(".yith-plugin-fw-sidebar-layout-sidebar-right-container"),l=e(this).data("type");if(e(this).parent().children(":radio").attr("checked",!1),e(this).prev(":radio").attr("checked",!0),void 0!==l)switch(l){case"left":i.show(),a.hide();break;case"right":a.show(),i.hide();break;case"double":i.show(),a.show();break;default:i.hide(),a.hide()}})}),r.each(function(){var t=e(this).data("val"),i=e(this).data("min"),a=e(this).data("max"),l=e(this).data("step"),n=e(this).data("labels");e(this).slider({value:t,min:i,max:a,range:"min",step:l,create:function(){e(this).find(".ui-slider-handle").text(e(this).slider("value"))},slide:function(t,i){e(this).find("input").val(i.value),e(this).find(".ui-slider-handle").text(i.value),e(this).siblings(".feedback").find("strong").text(i.value+n)}})}),d.each(function(t,i){var a=CodeMirror.fromTextArea(i,{lineNumbers:1,mode:"javascript",showCursorWhenSelecting:!0});e(i).data("codemirrorInstance",a)}),e(document).on("click",".yith-plugin-fw-select-all",function(){e("#"+e(this).data("select-id")).find("option").prop("selected",!0).trigger("change")}),e(document).on("click",".yith-plugin-fw-deselect-all",function(){e("#"+e(this).data("select-id")).find("option").prop("selected",!1).trigger("change")}),s.each(function(){var t=e(this),i=t.find(".yit-icons-manager-icon-preview").first(),a=t.find(".yit-icons-manager-icon-text");t.on("click",".yit-icons-manager-list li",function(l){var n=e(l.target).closest("li"),o=n.data("font"),r=n.data("icon"),d=n.data("key"),s=n.data("name");i.attr("data-font",o),i.attr("data-icon",r),i.attr("data-key",d),i.attr("data-name",s),a.val(o+":"+s),t.find(".yit-icons-manager-list li").removeClass("active"),n.addClass("active")}),t.on("click",".yit-icons-manager-action-set-default",function(){t.find(".yit-icons-manager-list li.default").trigger("click")})}),e(document).on("click",".yith-plugin-fw-select-images__item",function(){var t=e(this),i=t.data("key"),a=t.closest(".yith-plugin-fw-select-images__wrapper"),l=a.find(".yith-plugin-fw-select-images__item"),n=a.find("select").first();n.length&&(n.val(i),l.removeClass("yith-plugin-fw-select-images__item--selected"),t.addClass("yith-plugin-fw-select-images__item--selected"))}),e(document.body).trigger("wc-enhanced-select-init"),e(document).find(".ui-sortable .yith-toggle-elements").sortable({cursor:"move",axis:"y",scrollSensitivity:40,forcePlaceholderSize:!0,helper:"clone",stop:function(t,i){var a=jQuery(".ui-sortable-handle"),l=0,n=new Array;for(l=0;l<a.length;l++)n[l]=e(a[l]).data("item_key");n.length>0&&e(this).closest(".toggle-element").saveToggleElement(null,n)}}),e(document.body).trigger("yith-framework-enhanced-select-init")}).trigger("yith_fields_init"),e(document).on("click",".yith-plugin-fw-onoff-container span",function(){var t=e(this).prev("input");t.prop("checked")?t.prop("checked",!1).attr("value","no").removeClass("onoffchecked"):t.prop("checked",!0).attr("value","yes").addClass("onoffchecked"),t.change()}),e.fn.saveToggleElement=function(t,i){var a=e(this),l="yith_plugin_fw_save_toggle_element",n=a.serializeToggleElement(),o=a.find(".yith-toggle_wrapper"),r=o.attr("id"),d=e.urlParam("tab");n.append("security",o.data("nonce")),void 0!==i&&i.length>0&&n.append("yith_toggle_elements_order_keys",i),a.closest(".metaboxes-tab.yith-plugin-ui").length?(l="yith_plugin_fw_save_toggle_element_metabox",post_id=e(this).closest("form#post").find("#post_ID").val(),yit_metaboxes_nonce=e(this).closest("form#post").find("#yit_metaboxes_nonce").val(),metabox_tab=e(this).closest(".tabs-panel").attr("id"),url=yith_framework_fw_fields.ajax_url+"?action="+l+"&post_ID="+post_id+"&yit_metaboxes_nonce="+yit_metaboxes_nonce+"&toggle_id="+r+"&metabox_tab="+metabox_tab):url=yith_framework_fw_fields.admin_url+"?action="+l+"&tab="+d+"&toggle_id="+r,e.ajax({type:"POST",url:url,data:n,contentType:!1,processData:!1,success:function(i){t&&t.removeClass("show"),e(document).trigger("yith_save_toggle_element_done",[i,a])}})},e.fn.serializeToggleElement=function(){var t=e(this),i=new FormData,a=e(t).find(":input").serializeArray();return e.each(a,function(e,t){el_name=t.name,i.append(t.name,t.value)}),i},e.fn.formatToggleTitle=function(){var t=e(this),i=t.find(":input"),a=t.find("span.title").data("title_format"),l=t.find(".subtitle").data("subtitle_format"),n=new RegExp("[^%%]+(?=[%%])","g");if(void 0!==a)var o=a.match(n);if(void 0!==l)var r=l.match(n);e.each(i,function(t,i){void 0!==e(i).attr("id")&&($field_id=e(i).attr("id"),$field_array=$field_id.split("_"),$field_array.pop(),$field_id=$field_array.join("_"),$field_val=e(i).val(),null!=o&&void 0!==o&&-1!==o.indexOf($field_id)&&(a=a.replace("%%"+$field_id+"%%",$field_val)),null!=r&&void 0!==r&&-1!==r.indexOf($field_id)&&(l=l.replace("%%"+$field_id+"%%",$field_val)))}),""!==a&&t.find("span.title").html(a),""!==l&&t.find(".subtitle").html(l),e(document).trigger("yith-toggle-element-item-title",[t])},e.urlParam=function(e){var t=new RegExp("[?&]"+e+"=([^&#]*)").exec(window.location.search);return null!==t&&(t[1]||0)},e(document).on("click",".yith-toggle-title",function(t){var i=e(t.target),a=i.closest(".yith-toggle-row"),l=a.find(".yith-toggle-content");if(i.hasClass("yith-plugin-fw-onoff")||i.hasClass("yith-icon-drag"))return!1;a.is(".yith-toggle-row-opened")?l.slideUp(400):l.slideDown(400),a.toggleClass("yith-toggle-row-opened")}),e(document).on("click",".yith-add-box-button",function(t){t.preventDefault();var i=e(this),a=i.data("box_id"),l=i.data("closed_label"),n=i.data("opened_label"),o=i.closest(".yith-toggle_wrapper").attr("id");template=wp.template("yith-toggle-element-add-box-content-"+o),""!==a&&(e("#"+a).html(template({index:"box_id"})).slideToggle(),""!==l&&(i.html()===l?i.html(n).removeClass("closed"):i.html(l).addClass("closed")),e(document).trigger("yith_fields_init"),e(document).trigger("yith-add-box-button-toggle",[i]))}),e(document).on("click",".yith-add-box-buttons .yith-save-button",function(t){t.preventDefault();var i=e(this).parents(".yith-add-box"),a=e(this).closest(".yith-toggle_wrapper").attr("id"),l=i.find(".spinner"),n=e(this).parents(".toggle-element"),o=i.find(":input"),r=n.find(".yith-toggle-row").length,d=e('<input type="hidden">');d.val(r),e(document).trigger("yith-toggle-change-counter",[d,i]),r=d.val();var s=wp.template("yith-toggle-element-item-"+a),c=e(s({index:r}));l.addClass("show"),e.each(o,function(t,i){void 0!==e(i).attr("id")&&($field_id=e(i).attr("id"),$field_val=e(i).val(),"radio"==e(i).attr("type")?($field_id=$field_id.replace("new_",""),$field_id=$field_id.replace("-"+$field_val,""),$field_id=$field_id+"_dataindex-"+$field_val):$field_id=$field_id.replace("new_","")+"_"+r,e(i).is(":checked")&&e(c).find("#"+$field_id).prop("checked",!0),(e(i).hasClass("yith-post-search")||e(i).hasClass("yith-term-search"))&&e(c).find("#"+$field_id).html(e("#"+e(i).attr("id")).html()),e(c).find("#"+$field_id).val($field_val))}),e(c).formatToggleTitle();var g=e('<input type="hidden">').val("yes");e(document).trigger("yith-toggle-element-item-before-add",[i,c,g]);setTimeout(function(){if("yes"===g.val()){e(n).find(".yith-toggle-elements").append(c),e(i).find(".yith-plugin-fw-datepicker").datepicker("destroy"),e(i).html(""),e(i).prev(".yith-add-box-button").trigger("click"),n.saveToggleElement();setTimeout(function(){e(n).find(".highlight").removeClass("highlight")},2e3),e(document).trigger("yith_fields_init")}},1e3)}),e(document).on("click",".yith-toggle-row .yith-save-button",function(t){t.preventDefault();var i=e(this).closest(".toggle-element"),a=e(this).closest(".yith-toggle-row"),l=a.find(".spinner");a.formatToggleTitle();var n=e('<input type="hidden">').val("yes");e(document).trigger("yith-toggle-element-item-before-update",[i,a,n]),"yes"===n.val()&&(l.addClass("show"),i.saveToggleElement(l))}),e(document).on("click",".yith-toggle-row .yith-delete-button",function(t){t.preventDefault();var i=e(this).closest(".toggle-element");e(this).closest(".yith-toggle-row").remove(),i.saveToggleElement()}),e(document).on("click",".yith-toggle-onoff",function(t){t.preventDefault(),e(this).closest(".toggle-element").saveToggleElement()}),e(document).on("click",".yith-plugin-fw-radio input[type=radio]",function(){e(this).closest(".yith-plugin-fw-radio").val(e(this).val()).trigger("change")}),e(document).on("click",".yith-password-eye",function(){var t=e(this),i=e(this).closest(".yith-password-wrapper").find("input");"password"===i.attr("type")?(i.attr("type","text"),t.addClass("yith-password-eye-closed")):(i.attr("type","password"),t.removeClass("yith-password-eye-closed"))}),e(document.body).on("yith-plugin-fw-init-radio",function(){e(".yith-plugin-fw-radio:not(.yith-plugin-fw-radio--initialized)").each(function(){e(this).val(e(this).attr("value")),e(this).addClass("yith-plugin-fw-radio--initialized")})}).trigger("yith-plugin-fw-init-radio"),e(document).on("select2:open",function(t){e(t.target).closest(".yith-plugin-ui").length&&e(".select2-results").closest(".select2-container").addClass("yith-plugin-fw-select2-container")})}(jQuery);
1
+ !function(e){e(document).on("yith_fields_init",function(){var t=e(".yith-plugin-fw-datepicker"),i=e(".yith-plugin-fw-colorpicker"),a={imgPreviewHandler:".yith-plugin-fw-upload-img-preview",uploadButtonHandler:".yith-plugin-fw-upload-button",imgUrlHandler:".yith-plugin-fw-upload-img-url",resetButtonHandler:".yith-plugin-fw-upload-button-reset",imgUrl:e(".yith-plugin-fw-upload-img-url")},n=e(".add_media"),l={sliderWrapper:e(".yith-plugin-fw .image-gallery ul.slides-wrapper"),buttonHandler:".yith-plugin-fw .image-gallery-button"},s=e(".yith-plugin-fw-sidebar-layout"),o=e(".yith-plugin-fw .yith-plugin-fw-slider-container .ui-slider-horizontal"),r=e(".codemirror"),d=e(".yit-icons-manager-wrapper");e(".yith-plugin-ui td.forminp-checkbox");t.each(function(){var t=e(this).data();t.showAnim=!1,t.beforeShow=function(e,t){t.dpDiv.addClass("yith-plugin-fw-datepicker-div")},t.onClose=function(e,t){t.dpDiv.removeClass("yith-plugin-fw-datepicker-div")},e(this).datepicker(t)}),i.wpColorPicker({palettes:!1,width:200,mode:"hsl",clear:function(){var t=e(this);t.val(t.data("default-color")),t.change()}}),i.each(function(){var t=e(this).data("variations-label"),i=e(this).closest(".yith-plugin-fw-colorpicker-field-wrapper"),a=e(this).closest(".yith-single-colorpicker"),n=i.find(".wp-picker-input-wrap"),l=a.find(".wp-picker-input-wrap");if(n.length&&i.find("a.wp-color-result").attr("title",t),a.length&&a.find("a.wp-color-result").attr("title",t),!n.find(".wp-picker-clear-custom").length){var s=e("<span/>").attr({"class":"wp-picker-default-custom"});n.find(".wp-picker-default").wrap(s)}l.find(".wp-picker-clear-custom").length||(s=e("<span/>").attr({"class":"wp-picker-default-custom"}),l.find(".wp-picker-default").wrap(s))}),"undefined"!=typeof wp&&"undefined"!=typeof wp.media&&(a.imgUrl.change(function(){var t=e(this).val(),i=new RegExp("(http|ftp|https)://[a-zA-Z0-9@?^=%&amp;:/~+#-_.]*.(gif|jpg|jpeg|png|ico|svg)"),n=e(this).parent().find(a.imgPreviewHandler).first();n.length<1&&(n=e(this).parent().parent().find(a.imgPreviewHandler).first()),i.test(t)?n.html('<img src="'+t+'" style="max-width:100px; max-height:100px;" />'):n.html("")}).trigger("change"),e(document).on("click",a.uploadButtonHandler,function(t){t.preventDefault();var i,n=e(this).attr("id").replace(/-button$/,"");if(i)i.open();else{var l=[new wp.media.controller.Library({library:wp.media.query(),multiple:!1,title:"Choose Image",priority:20,filterable:"uploaded"})];(i=wp.media.frames.downloadable_file=wp.media({title:"Choose Image",library:{type:""},button:{text:"Choose Image"},multiple:!1,states:l})).on("select",function(){var t=i.state().get("selection").first().toJSON();e("#"+n).val(t.url),e("#"+n+"-yith-attachment-id")&&e("#"+n+"-yith-attachment-id").val(t.id),a.imgUrl.trigger("change")}),i.open()}}),e(document).on("click",a.resetButtonHandler,function(t){var i=e(this),n=i.attr("id"),l=i.attr("id").replace(/-button-reset$/,""),s=e("#"+n).data("default");e("#"+l).val(s),a.imgUrl.trigger("change")}));n.on("click",function(){}),"undefined"!=typeof wp&&"undefined"!=typeof wp.media&&(e(document).on("click",l.buttonHandler,function(t){var i=e(this),a=i.closest(".image-gallery"),n=a.find(".image_gallery_ids"),l=n.val(),s=a.find("ul.slides-wrapper"),o=wp.media.frames.image_gallery=wp.media({title:i.data("choose"),button:{text:i.data("update")},states:[new wp.media.controller.Library({title:i.data("choose"),filterable:"all",multiple:!0})]});o.on("select",function(){o.state().get("selection").map(function(e){(e=e.toJSON()).id&&(l=l?l+","+e.id:e.id,s.append('<li class="image" data-attachment_id="'+e.id+'"><img src="'+e.sizes.thumbnail.url+'"/><ul class="actions"><li><a href="#" class="delete" title="'+i.data("delete")+'">x</a></li></ul></li>'))}),n.val(l)}),o.open()}),l.sliderWrapper.each(function(){var t=e(this);t.sortable({items:"li.image",cursor:"move",scrollSensitivity:40,forcePlaceholderSize:!0,forceHelperSize:!1,helper:"clone",opacity:.65,start:function(e,t){t.item.css("background-color","#f6f6f6")},stop:function(e,t){t.item.removeAttr("style")},update:function(i,a){var n="";t.find("li.image").css("cursor","default").each(function(){var t=e(this).attr("data-attachment_id");n=n+t+","}),t.closest(".image-gallery").find(".image_gallery_ids").val(n)}})}),l.sliderWrapper.on("click","a.delete",function(){var t=e(this).closest(".image-gallery"),i=e(this).closest(".image-gallery ul.slides-wrapper"),a=t.find(".image_gallery_ids"),n="";e(this).closest("li.image").remove(),i.find("li.image").css("cursor","default").each(function(){var t=e(this).attr("data-attachment_id");n=n+t+","}),a.val(n)})),s.each(function(){e(this).find("img").on("click",function(){var t=e(this).closest(".yith-plugin-fw-sidebar-layout"),i=t.find(".yith-plugin-fw-sidebar-layout-sidebar-left-container"),a=t.find(".yith-plugin-fw-sidebar-layout-sidebar-right-container"),n=e(this).data("type");if(e(this).parent().children(":radio").attr("checked",!1),e(this).prev(":radio").attr("checked",!0),void 0!==n)switch(n){case"left":i.show(),a.hide();break;case"right":a.show(),i.hide();break;case"double":i.show(),a.show();break;default:i.hide(),a.hide()}})}),o.each(function(){var t=e(this).data("val"),i=e(this).data("min"),a=e(this).data("max"),n=e(this).data("step"),l=e(this).data("labels");e(this).slider({value:t,min:i,max:a,range:"min",step:n,create:function(){e(this).find(".ui-slider-handle").text(e(this).slider("value"))},slide:function(t,i){e(this).find("input").val(i.value),e(this).find(".ui-slider-handle").text(i.value),e(this).siblings(".feedback").find("strong").text(i.value+l)}})}),r.each(function(t,i){var a=CodeMirror.fromTextArea(i,{lineNumbers:1,mode:"javascript",showCursorWhenSelecting:!0});e(i).data("codemirrorInstance",a)}),e(document).on("click",".yith-plugin-fw-select-all",function(){e("#"+e(this).data("select-id")).find("option").prop("selected",!0).trigger("change")}),e(document).on("click",".yith-plugin-fw-deselect-all",function(){e("#"+e(this).data("select-id")).find("option").prop("selected",!1).trigger("change")}),d.each(function(){var t=e(this),i=t.find(".yit-icons-manager-icon-preview").first(),a=t.find(".yit-icons-manager-icon-text");t.on("click",".yit-icons-manager-list li",function(n){var l=e(n.target).closest("li"),s=l.data("font"),o=l.data("icon"),r=l.data("key"),d=l.data("name");i.attr("data-font",s),i.attr("data-icon",o),i.attr("data-key",r),i.attr("data-name",d),a.val(s+":"+d),t.find(".yit-icons-manager-list li").removeClass("active"),l.addClass("active")}),t.on("click",".yit-icons-manager-action-set-default",function(){t.find(".yit-icons-manager-list li.default").trigger("click")})}),e(document).on("click",".yith-plugin-fw-select-images__item",function(){var t=e(this),i=t.data("key"),a=t.closest(".yith-plugin-fw-select-images__wrapper"),n=a.find(".yith-plugin-fw-select-images__item"),l=a.find("select").first();l.length&&(l.val(i).trigger("yith_select_images_value_changed"),n.removeClass("yith-plugin-fw-select-images__item--selected"),t.addClass("yith-plugin-fw-select-images__item--selected"))}),e(document.body).trigger("wc-enhanced-select-init"),e(document).find(".ui-sortable .yith-toggle-elements").sortable({cursor:"move",axis:"y",scrollSensitivity:40,forcePlaceholderSize:!0,helper:"clone",stop:function(t,i){var a=jQuery(".ui-sortable-handle"),n=0,l=new Array;for(n=0;n<a.length;n++)l[n]=e(a[n]).data("item_key");l.length>0&&e(this).closest(".toggle-element").saveToggleElement(null,l)}}),e(document.body).trigger("yith-framework-enhanced-select-init")}).trigger("yith_fields_init"),e(document).on("click",".yith-plugin-fw-onoff-container span",function(){var t=e(this).prev("input");t.prop("checked")?t.prop("checked",!1).attr("value","no").removeClass("onoffchecked"):t.prop("checked",!0).attr("value","yes").addClass("onoffchecked"),t.change()}),e.fn.saveToggleElement=function(t,i){var a=e(this),n="yith_plugin_fw_save_toggle_element",l=a.serializeToggleElement(),s=a.find(".yith-toggle_wrapper"),o=s.attr("id"),r=e.urlParam("tab");l.append("security",s.data("nonce")),void 0!==i&&i.length>0&&l.append("yith_toggle_elements_order_keys",i),a.closest(".metaboxes-tab.yith-plugin-ui").length?(n="yith_plugin_fw_save_toggle_element_metabox",post_id=e(this).closest("form#post").find("#post_ID").val(),yit_metaboxes_nonce=e(this).closest("form#post").find("#yit_metaboxes_nonce").val(),metabox_tab=e(this).closest(".tabs-panel").attr("id"),url=yith_framework_fw_fields.ajax_url+"?action="+n+"&post_ID="+post_id+"&yit_metaboxes_nonce="+yit_metaboxes_nonce+"&toggle_id="+o+"&metabox_tab="+metabox_tab):url=yith_framework_fw_fields.admin_url+"?action="+n+"&tab="+r+"&toggle_id="+o,e.ajax({type:"POST",url:url,data:l,contentType:!1,processData:!1,success:function(i){t&&t.removeClass("show"),e(document).trigger("yith_save_toggle_element_done",[i,a])}})},e.fn.serializeToggleElement=function(){var t=e(this),i=new FormData,a=e(t).find(":input").serializeArray();return e.each(a,function(e,t){el_name=t.name,i.append(t.name,t.value)}),i},e.fn.formatToggleTitle=function(){var t=e(this),i=t.find(":input"),a=t.find("span.title").data("title_format"),n=t.find(".subtitle").data("subtitle_format"),l=new RegExp("[^%%]+(?=[%%])","g");if(void 0!==a)var s=a.match(l);if(void 0!==n)var o=n.match(l);e.each(i,function(t,i){void 0!==e(i).attr("id")&&($field_id=e(i).attr("id"),$field_array=$field_id.split("_"),$field_array.pop(),$field_id=$field_array.join("_"),$field_val=e(i).val(),null!=s&&void 0!==s&&-1!==s.indexOf($field_id)&&(a=a.replace("%%"+$field_id+"%%",$field_val)),null!=o&&void 0!==o&&-1!==o.indexOf($field_id)&&(n=n.replace("%%"+$field_id+"%%",$field_val)))}),""!==a&&t.find("span.title").html(a),""!==n&&t.find(".subtitle").html(n),e(document).trigger("yith-toggle-element-item-title",[t])},e.urlParam=function(e){var t=new RegExp("[?&]"+e+"=([^&#]*)").exec(window.location.search);return null!==t&&(t[1]||0)},e(document).on("click",".yith-toggle-title",function(t){var i=e(t.target),a=i.closest(".yith-toggle-row"),n=a.find(".yith-toggle-content");if(i.hasClass("yith-plugin-fw-onoff")||i.hasClass("yith-icon-drag"))return!1;a.is(".yith-toggle-row-opened")?n.slideUp(400):n.slideDown(400),a.toggleClass("yith-toggle-row-opened")}),e(document).on("click",".yith-add-box-button",function(t){t.preventDefault();var i=e(this),a=i.data("box_id"),n=i.data("closed_label"),l=i.data("opened_label"),s=i.closest(".yith-toggle_wrapper").attr("id");template=wp.template("yith-toggle-element-add-box-content-"+s),""!==a&&(e("#"+a).html(template({index:"box_id"})).slideToggle(),""!==n&&(i.html()===n?i.html(l).removeClass("closed"):i.html(n).addClass("closed")),e(document).trigger("yith_fields_init"),e(document).trigger("yith-add-box-button-toggle",[i]))}),e(document).on("click",".yith-add-box-buttons .yith-save-button",function(t){t.preventDefault();var i=e(this).parents(".yith-add-box"),a=e(this).closest(".yith-toggle_wrapper").attr("id"),n=i.find(".spinner"),l=e(this).parents(".toggle-element"),s=i.find(":input"),o=l.find(".yith-toggle-row").length,r=e('<input type="hidden">');r.val(o),e(document).trigger("yith-toggle-change-counter",[r,i]),o=r.val();var d=wp.template("yith-toggle-element-item-"+a),c=e(d({index:o}));n.addClass("show"),e.each(s,function(t,i){void 0!==e(i).attr("id")&&($field_id=e(i).attr("id"),$field_val=e(i).val(),"radio"==e(i).attr("type")?($field_id=$field_id.replace("new_",""),$field_id=$field_id.replace("-"+$field_val,""),$field_id=$field_id+"_dataindex-"+$field_val):$field_id=$field_id.replace("new_","")+"_"+o,e(i).is(":checked")&&e(c).find("#"+$field_id).prop("checked",!0),(e(i).hasClass("yith-post-search")||e(i).hasClass("yith-term-search"))&&e(c).find("#"+$field_id).html(e("#"+e(i).attr("id")).html()),e(c).find("#"+$field_id).val($field_val))}),e(c).formatToggleTitle();var u=e('<input type="hidden">').val("yes");e(document).trigger("yith-toggle-element-item-before-add",[i,c,u]);setTimeout(function(){if("yes"===u.val()){e(l).find(".yith-toggle-elements").append(c),e(i).find(".yith-plugin-fw-datepicker").datepicker("destroy"),e(i).html(""),e(i).prev(".yith-add-box-button").trigger("click"),l.saveToggleElement();setTimeout(function(){e(l).find(".highlight").removeClass("highlight")},2e3),e(document).trigger("yith_fields_init")}},1e3)}),e(document).on("click",".yith-toggle-row .yith-save-button",function(t){t.preventDefault();var i=e(this).closest(".toggle-element"),a=e(this).closest(".yith-toggle-row"),n=a.find(".spinner");a.formatToggleTitle();var l=e('<input type="hidden">').val("yes");e(document).trigger("yith-toggle-element-item-before-update",[i,a,l]),"yes"===l.val()&&(n.addClass("show"),i.saveToggleElement(n))}),e(document).on("click",".yith-toggle-row .yith-delete-button",function(t){t.preventDefault();var i=e(this).closest(".toggle-element");e(this).closest(".yith-toggle-row").remove(),i.saveToggleElement()}),e(document).on("click",".yith-toggle-onoff",function(t){t.preventDefault(),e(this).closest(".toggle-element").saveToggleElement()}),e(document).on("click",".yith-plugin-fw-radio input[type=radio]",function(){var t=e(this).closest(".yith-plugin-fw-radio"),i=e(this).val();t.val(i).data("value",i).trigger("change")}),e(document.body).on("yith-plugin-fw-init-radio",function(){e(".yith-plugin-fw-radio:not(.yith-plugin-fw-radio--initialized)").each(function(){e(this).val(e(this).data("value")),e(this).addClass("yith-plugin-fw-radio--initialized")})}).trigger("yith-plugin-fw-init-radio"),e(document).on("click",".yith-password-eye",function(){var t=e(this),i=e(this).closest(".yith-password-wrapper").find("input");"password"===i.attr("type")?(i.attr("type","text"),t.addClass("yith-password-eye-closed")):(i.attr("type","password"),t.removeClass("yith-password-eye-closed"))}),e(document).on("select2:open",function(t){e(t.target).closest(".yith-plugin-ui").length&&e(".select2-results").closest(".select2-container").addClass("yith-plugin-fw-select2-container")});var t={selectors:{wrapper:".yith-plugin-fw-dimensions",units:{wrapper:".yith-plugin-fw-dimensions__units",single:".yith-plugin-fw-dimensions__unit",value:".yith-plugin-fw-dimensions__unit__value",selectedClass:"yith-plugin-fw-dimensions__unit--selected"},linked:{button:".yith-plugin-fw-dimensions__linked",value:".yith-plugin-fw-dimensions__linked__value",wrapperActiveClass:"yith-plugin-fw-dimensions--linked-active"},dimensions:{number:".yith-plugin-fw-dimensions__dimension__number"}},init:function(){var i=t;e(document).on("click",i.selectors.units.single,i.unitChange),e(document).on("click",i.selectors.linked.button,i.linkedChange),e(document).on("change keyup",i.selectors.dimensions.number,i.numberChange)},unitChange:function(i){var a=e(this).closest(t.selectors.units.single),n=a.closest(t.selectors.units.wrapper),l=n.find(t.selectors.units.single),s=n.find(t.selectors.units.value).first(),o=a.data("value");l.removeClass(t.selectors.units.selectedClass),a.addClass(t.selectors.units.selectedClass),s.val(o)},linkedChange:function(){var i=e(this).closest(t.selectors.linked.button),a=i.closest(t.selectors.wrapper),n=i.find(t.selectors.linked.value);"yes"===n.val()?(a.removeClass(t.selectors.linked.wrapperActiveClass),n.val("no")):(a.addClass(t.selectors.linked.wrapperActiveClass),n.val("yes"),a.find(t.selectors.dimensions.number).first().trigger("change"))},numberChange:function(i){var a=e(this).closest(t.selectors.dimensions.number),n=a.closest(t.selectors.wrapper);n.hasClass(t.selectors.linked.wrapperActiveClass)&&n.find(t.selectors.dimensions.number).val(a.val())}};t.init()}(jQuery);
plugin-fw/assets/js/yith-gutenberg.js CHANGED
@@ -3,6 +3,7 @@
3
  var __ = wp.i18n.__,
4
  el = wp.element.createElement,
5
  Fragment = wp.element.Fragment,
 
6
  registerBlockType = wp.blocks.registerBlockType,
7
  RichText = wp.editor.RichText,
8
  BlockControls = wp.editor.BlockControls,
3
  var __ = wp.i18n.__,
4
  el = wp.element.createElement,
5
  Fragment = wp.element.Fragment,
6
+ PanelBody = wp.components.PanelBody,
7
  registerBlockType = wp.blocks.registerBlockType,
8
  RichText = wp.editor.RichText,
9
  BlockControls = wp.editor.BlockControls,
plugin-fw/assets/js/yith-gutenberg.min.js CHANGED
@@ -1 +1 @@
1
- !function(e){wp.i18n.__;var t=wp.element.createElement,o=wp.element.Fragment,n=wp.blocks.registerBlockType,c=(wp.editor.RichText,wp.editor.BlockControls,wp.editor.InspectorControls),r=(wp.editor.AlignmentToolbar,wp.components,wp.element.RawHTML),a=wp.components.SelectControl,s=wp.components.ToggleControl,i=wp.components.CheckboxControl,l=wp.components.RangeControl,p=wp.components.ColorPicker,u=wp.components.RadioControl,d=wp.components.TextControl,h=wp.components.TextareaControl;const C=t("svg",{width:22,height:22},t("path",{d:"M 18.24 7.628 C 17.291 8.284 16.076 8.971 14.587 9.688 C 15.344 7.186 15.765 4.851 15.849 2.684 C 15.912 0.939 15.133 0.045 13.514 0.003 C 11.558 -0.06 10.275 1.033 9.665 3.284 C 10.007 3.137 10.359 3.063 10.723 3.063 C 11.021 3.063 11.267 3.184 11.459 3.426 C 11.651 3.668 11.736 3.947 11.715 4.262 C 11.695 5.082 11.276 5.961 10.46 6.896 C 9.644 7.833 8.918 8.3 8.282 8.3 C 7.837 8.3 7.625 7.922 7.646 7.165 C 7.667 6.765 7.804 5.955 8.056 4.735 C 8.287 3.579 8.403 2.801 8.403 2.401 C 8.403 1.707 8.224 1.144 7.867 0.713 C 7.509 0.282 6.994 0.098 6.321 0.161 C 5.858 0.203 5.175 0.624 4.27 1.422 C 3.596 2.035 2.923 2.644 2.25 3.254 L 2.976 4.106 C 3.564 3.664 3.922 3.443 4.048 3.443 C 4.448 3.443 4.637 3.717 4.617 4.263 C 4.617 4.306 4.427 4.968 4.049 6.251 C 3.671 7.534 3.471 8.491 3.449 9.122 C 3.407 9.985 3.565 10.647 3.924 11.109 C 4.367 11.677 5.106 11.919 6.142 11.835 C 7.366 11.751 8.591 11.298 9.816 10.479 C 10.323 10.142 10.808 9.753 11.273 9.311 C 11.105 10.153 10.905 10.868 10.673 11.457 C 8.402 12.487 6.762 13.37 5.752 14.107 C 4.321 15.137 3.554 16.241 3.449 17.419 C 3.259 19.459 4.29 20.479 6.541 20.479 C 8.055 20.479 9.517 19.554 10.926 17.703 C 12.125 16.126 13.166 14.022 14.049 11.394 C 15.578 10.635 16.87 9.892 17.928 9.164 C 17.894 9.409 18.319 7.308 18.24 7.628 Z M 7.393 16.095 C 7.056 16.095 6.898 15.947 6.919 15.653 C 6.961 15.106 7.908 14.38 9.759 13.476 C 8.791 15.221 8.002 16.095 7.393 16.095 Z"}));function g(o,n,c){var a="",s="";if("undefined"!=typeof n.callback&&"function"==typeof e[n.callback])a=e[n.callback](o,n);else{var i="["+n.shortcode_name;e.each(o.attributes,function(e,t){if("className"!=e){i+=" "+e+"=";var o=n.attributes[e].remove_quotes;i+=1==o?t:'"'+t+'"'}}),i+="]";var l=md5(i);s='<span class="yith_block_'+l+'">'+i+"</span>","edit"==c&&0!=n.do_shortcode&&function(t){var o=null;return e(document).trigger("yith_plugin_fw_gutenberg_before_do_shortcode",[i,t]),e.ajax({async:!0,url:yith_gutenberg_ajax.ajaxurl,method:"post",data:{action:"yith_plugin_fw_gutenberg_do_shortcode",shortcode:i},success:function(n){""!=(o=n)&&(e(".yith_block_"+t).html(o),e(document).trigger("yith_plugin_fw_gutenberg_success_do_shortcode",[i,t,o]))}}),e(document).trigger("yith_plugin_fw_gutenberg_after_do_shortcode",[i,t,o]),o}(l),a=t(r,null,s)}return a}function b(e,t,o,n){var c={};return"colorpicker"!=n&&"color"!=n||(e=e.hex),c[t]=e,o.setAttributes(c),o}e.each(yith_gutenberg,function(r,f){n("yith/"+r,{title:f.title,description:f.description,category:f.category,attributes:f.attributes,icon:"undefined"!=typeof f.icon?f.icon:C,keywords:f.keywords,edit:function(n){var r=new Array;return e.each(f.attributes,function(e,o){var c=null,C=o.blocktype;if(void 0!==C){switch(C){case"select":c=a;break;case"text":c=d;break;case"textarea":c=h;break;case"toggle":c=s;break;case"checkbox":c=i;break;case"number":case"range":c=l;break;case"color":case"colorpicker":c=p;break;case"radio":c=u}if(null!=c){var g=helpMessageUncheked="";"undefined"!=typeof o.helps&&"undefined"!=typeof o.helps.checked&&"undefined"!=typeof o.helps.unchecked?(g=o.helps.checked,helpMessageUncheked=o.helps.unchecked):"undefined"!=typeof o.help&&(g=helpMessageUncheked=o.help),r.push(t(c,{value:n.attributes[e],options:o.options,label:o.label,checked:n.attributes[e],selected:n.attributes[e],help:n.attributes[e]?g:helpMessageUncheked,disableAlpha:o.disableAlpha,min:o.min,max:o.max,multiple:o.multiple,onChange:function(t,o=e){n=b(t,o,n,C)},onChangeComplete:function(t,o=e){n=b(t,o,n,C)}}))}}}),sc=g(n,f,"edit"),[t(o,null,t(c,null,r),sc)]},save:function(e){return g(e,f,"save")}})})}(jQuery);
1
+ !function(e){wp.i18n.__;var t=wp.element.createElement,o=wp.element.Fragment,n=(wp.components.PanelBody,wp.blocks.registerBlockType),c=(wp.editor.RichText,wp.editor.BlockControls,wp.editor.InspectorControls),r=(wp.editor.AlignmentToolbar,wp.components,wp.element.RawHTML),a=wp.components.SelectControl,s=wp.components.ToggleControl,l=wp.components.CheckboxControl,i=wp.components.RangeControl,p=wp.components.ColorPicker,u=wp.components.RadioControl,d=wp.components.TextControl,h=wp.components.TextareaControl;const C=t("svg",{width:22,height:22},t("path",{d:"M 18.24 7.628 C 17.291 8.284 16.076 8.971 14.587 9.688 C 15.344 7.186 15.765 4.851 15.849 2.684 C 15.912 0.939 15.133 0.045 13.514 0.003 C 11.558 -0.06 10.275 1.033 9.665 3.284 C 10.007 3.137 10.359 3.063 10.723 3.063 C 11.021 3.063 11.267 3.184 11.459 3.426 C 11.651 3.668 11.736 3.947 11.715 4.262 C 11.695 5.082 11.276 5.961 10.46 6.896 C 9.644 7.833 8.918 8.3 8.282 8.3 C 7.837 8.3 7.625 7.922 7.646 7.165 C 7.667 6.765 7.804 5.955 8.056 4.735 C 8.287 3.579 8.403 2.801 8.403 2.401 C 8.403 1.707 8.224 1.144 7.867 0.713 C 7.509 0.282 6.994 0.098 6.321 0.161 C 5.858 0.203 5.175 0.624 4.27 1.422 C 3.596 2.035 2.923 2.644 2.25 3.254 L 2.976 4.106 C 3.564 3.664 3.922 3.443 4.048 3.443 C 4.448 3.443 4.637 3.717 4.617 4.263 C 4.617 4.306 4.427 4.968 4.049 6.251 C 3.671 7.534 3.471 8.491 3.449 9.122 C 3.407 9.985 3.565 10.647 3.924 11.109 C 4.367 11.677 5.106 11.919 6.142 11.835 C 7.366 11.751 8.591 11.298 9.816 10.479 C 10.323 10.142 10.808 9.753 11.273 9.311 C 11.105 10.153 10.905 10.868 10.673 11.457 C 8.402 12.487 6.762 13.37 5.752 14.107 C 4.321 15.137 3.554 16.241 3.449 17.419 C 3.259 19.459 4.29 20.479 6.541 20.479 C 8.055 20.479 9.517 19.554 10.926 17.703 C 12.125 16.126 13.166 14.022 14.049 11.394 C 15.578 10.635 16.87 9.892 17.928 9.164 C 17.894 9.409 18.319 7.308 18.24 7.628 Z M 7.393 16.095 C 7.056 16.095 6.898 15.947 6.919 15.653 C 6.961 15.106 7.908 14.38 9.759 13.476 C 8.791 15.221 8.002 16.095 7.393 16.095 Z"}));function g(o,n,c){var a="",s="";if("undefined"!=typeof n.callback&&"function"==typeof e[n.callback])a=e[n.callback](o,n);else{var l="["+n.shortcode_name;e.each(o.attributes,function(e,t){if("className"!=e){l+=" "+e+"=";var o=n.attributes[e].remove_quotes;l+=1==o?t:'"'+t+'"'}}),l+="]";var i=md5(l);s='<span class="yith_block_'+i+'">'+l+"</span>","edit"==c&&0!=n.do_shortcode&&function(t){var o=null;return e(document).trigger("yith_plugin_fw_gutenberg_before_do_shortcode",[l,t]),e.ajax({async:!0,url:yith_gutenberg_ajax.ajaxurl,method:"post",data:{action:"yith_plugin_fw_gutenberg_do_shortcode",shortcode:l},success:function(n){""!=(o=n)&&(e(".yith_block_"+t).html(o),e(document).trigger("yith_plugin_fw_gutenberg_success_do_shortcode",[l,t,o]))}}),e(document).trigger("yith_plugin_fw_gutenberg_after_do_shortcode",[l,t,o]),o}(i),a=t(r,null,s)}return a}function b(e,t,o,n){var c={};return"colorpicker"!=n&&"color"!=n||(e=e.hex),c[t]=e,o.setAttributes(c),o}e.each(yith_gutenberg,function(r,f){n("yith/"+r,{title:f.title,description:f.description,category:f.category,attributes:f.attributes,icon:"undefined"!=typeof f.icon?f.icon:C,keywords:f.keywords,edit:function(n){var r=new Array;return e.each(f.attributes,function(e,o){var c=null,C=o.blocktype;if(void 0!==C){switch(C){case"select":c=a;break;case"text":c=d;break;case"textarea":c=h;break;case"toggle":c=s;break;case"checkbox":c=l;break;case"number":case"range":c=i;break;case"color":case"colorpicker":c=p;break;case"radio":c=u}if(null!=c){var g=helpMessageUncheked="";"undefined"!=typeof o.helps&&"undefined"!=typeof o.helps.checked&&"undefined"!=typeof o.helps.unchecked?(g=o.helps.checked,helpMessageUncheked=o.helps.unchecked):"undefined"!=typeof o.help&&(g=helpMessageUncheked=o.help),r.push(t(c,{value:n.attributes[e],options:o.options,label:o.label,checked:n.attributes[e],selected:n.attributes[e],help:n.attributes[e]?g:helpMessageUncheked,disableAlpha:o.disableAlpha,min:o.min,max:o.max,multiple:o.multiple,onChange:function(t,o=e){n=b(t,o,n,C)},onChangeComplete:function(t,o=e){n=b(t,o,n,C)}}))}}}),sc=g(n,f,"edit"),[t(o,null,t(c,null,r),sc)]},save:function(e){return g(e,f,"save")}})})}(jQuery);
plugin-fw/assets/js/yith-system-info.js CHANGED
@@ -1,13 +1,19 @@
1
- (function ($) {
2
- $(document).on('click', '.notice-dismiss', function () {
3
- var t = $(this),
4
- wrapper_id = t.parent().attr('id');
 
 
 
 
5
 
6
- if (wrapper_id === 'yith-system-alert') {
7
- var cname = 'hide_yith_system_alert',
8
- cvalue = 'yes';
9
 
10
- document.cookie = cname + "=" + cvalue + ";path=/";
11
- }
12
- });
13
- })(jQuery);
 
 
1
+ jQuery(
2
+ function ( $ ) {
3
+ $( document ).on(
4
+ 'click',
5
+ '.notice-dismiss',
6
+ function () {
7
+ var t = $( this ),
8
+ wrapper_id = t.parent().attr( 'id' );
9
 
10
+ if ( wrapper_id === 'yith-system-alert' ) {
11
+ var cname = 'hide_yith_system_alert',
12
+ cvalue = 'yes';
13
 
14
+ document.cookie = cname + "=" + cvalue + ";path=/";
15
+ }
16
+ }
17
+ );
18
+ }
19
+ );
plugin-fw/assets/js/yith-system-info.min.js CHANGED
@@ -1 +1 @@
1
- !function(t){t(document).on("click",".notice-dismiss",function(){if("yith-system-alert"===t(this).parent().attr("id")){document.cookie="hide_yith_system_alert=yes;path=/"}})}(jQuery);
1
+ jQuery(function(t){t(document).on("click",".notice-dismiss",function(){if("yith-system-alert"===t(this).parent().attr("id")){document.cookie="hide_yith_system_alert=yes;path=/"}})});
plugin-fw/init.php CHANGED
@@ -1,13 +1,13 @@
1
  <?php
2
  /**
3
  * Framework Name: YIT Plugin Framework
4
- * Version: 3.4.14
5
  * Author: YITH
6
  * Text Domain: yith-plugin-fw
7
  * Domain Path: /languages/
8
  *
9
  * @author Your Inspiration Themes
10
- * @version 3.4.14
11
  */
12
  /**
13
  * This file belongs to the YIT Plugin Framework.
1
  <?php
2
  /**
3
  * Framework Name: YIT Plugin Framework
4
+ * Version: 3.4.29
5
  * Author: YITH
6
  * Text Domain: yith-plugin-fw
7
  * Domain Path: /languages/
8
  *
9
  * @author Your Inspiration Themes
10
+ * @version 3.4.29
11
  */
12
  /**
13
  * This file belongs to the YIT Plugin Framework.
plugin-fw/languages/yith-plugin-fw-el.mo CHANGED
Binary file
plugin-fw/languages/yith-plugin-fw-el.po CHANGED
@@ -4,8 +4,8 @@ msgid ""
4
  msgstr ""
5
  "Project-Id-Version: YITH Plugin Starter 1.0.0 Plugin FW\n"
6
  "Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
7
- "POT-Creation-Date: 2020-03-11 14:03:11+00:00\n"
8
- "PO-Revision-Date: 2020-03-18 18:44+0000\n"
9
  "Last-Translator: \n"
10
  "Language-Team: Your Inspiration Themes <info@yithemes.com>\n"
11
  "Language: el_GR\n"
@@ -22,6 +22,30 @@ msgstr ""
22
  "X-Textdomain-Support: yes\n"
23
  "X-Poedit-SearchPath-0: .\n"
24
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  #: lib/yit-cpt-unlimited.php:462 lib/yit-cpt-unlimited.php:576
26
  #: lib/yit-cpt-unlimited.php:721 lib/yit-cpt-unlimited.php:1636
27
  msgid "Add %s"
@@ -202,7 +226,7 @@ msgstr "Προσθήκη %s από εικόνες"
202
  msgid "Upload multiple files"
203
  msgstr "Ανέβασμα πολλαπλών αρχείων"
204
 
205
- #: lib/yit-plugin-panel-wc.php:399
206
  msgid "The changes you have made will be lost if you leave this page."
207
  msgstr ""
208
  "Οι αλλαγές που έχετε δημιουργήσει θα χαθούν αν αφήσετε αυτήν την σελίδα."
@@ -211,16 +235,16 @@ msgstr ""
211
  msgid "Plugin Settings"
212
  msgstr "Ρυθμίσεις Προσθέτου"
213
 
214
- #: lib/yit-plugin-panel.php:425 lib/yit-plugin-panel.php:428
215
  msgid "How to install premium version"
216
  msgstr "Πώς να εγκαταστήσετε την προηγμένη έκδοση"
217
 
218
- #: lib/yit-plugin-panel.php:572 lib/yit-plugin-subpanel.php:151
219
  #: templates/panel/woocommerce/woocommerce-form.php:14
220
  msgid "Save Changes"
221
  msgstr "Αποθήκευση Αλλαγών"
222
 
223
- #: lib/yit-plugin-panel.php:575 lib/yit-plugin-subpanel.php:154
224
  #: templates/panel/woocommerce/woocommerce-form.php:17
225
  msgid ""
226
  "If you continue with this action, you will reset all options in this page."
@@ -228,70 +252,70 @@ msgstr ""
228
  "Αν συνεχίσετε με αυτή την ενέργεια θα επαναφέρετε όλες τις επιλογές στη "
229
  "σελίδα."
230
 
231
- #: lib/yit-plugin-panel.php:577 lib/yit-plugin-subpanel.php:156
232
  msgid "Reset to default"
233
  msgstr "Επαναφορά σε προεπιλεγμένο"
234
 
235
- #: lib/yit-plugin-panel.php:578 lib/yit-plugin-subpanel.php:157
236
  #: templates/panel/woocommerce/woocommerce-form.php:21
237
  msgid "Are you sure?"
238
  msgstr "Είστε σίγουρος;"
239
 
240
- #: lib/yit-plugin-panel.php:776
241
  msgid ""
242
  "The element you have entered already exists. Please, enter another name."
243
  msgstr "Το στοιχείο που εισάγατε υπάρχει ήδη. Παρακαλώ, εισάγετε άλλο όνομα."
244
 
245
- #: lib/yit-plugin-panel.php:777
246
  msgid "Settings saved"
247
  msgstr "Ρυθμίσεις αποθηκεύτηκαν"
248
 
249
- #: lib/yit-plugin-panel.php:778
250
  msgid "Settings reset"
251
  msgstr "Επαναφορά ρυθμίσεων"
252
 
253
- #: lib/yit-plugin-panel.php:779
254
  msgid "Element deleted correctly."
255
  msgstr "Το στοιχείο διαγράφηκε επιτυχώς."
256
 
257
- #: lib/yit-plugin-panel.php:780 lib/yit-plugin-panel.php:781
258
  msgid "Element updated correctly."
259
  msgstr "Το στοιχείο αναβαθμίστηκε επιτυχώς."
260
 
261
- #: lib/yit-plugin-panel.php:782
262
  msgid "Database imported correctly."
263
  msgstr "Επιτυχής εισαγωγή βάσης δεδομένων."
264
 
265
- #: lib/yit-plugin-panel.php:783
266
  msgid "An error has occurred during import. Please try again."
267
  msgstr "Παρουσιάστηκε σφάλμα κατά την εισαγωγή. Παρακαλώ προσπαθήστε ξανά."
268
 
269
- #: lib/yit-plugin-panel.php:784
270
  msgid "The added file is not valid."
271
  msgstr "Το προστιθέμενο αρχείο δεν είναι έγκυρο."
272
 
273
- #: lib/yit-plugin-panel.php:785
274
  msgid "Sorry, import is disabled."
275
  msgstr "Συγνώμη, η εισαγωγή είναι απενεργοποιημένη."
276
 
277
- #: lib/yit-plugin-panel.php:786
278
  msgid "Sorting successful."
279
  msgstr "Διαλογή επιτυχής."
280
 
281
- #: lib/yit-plugin-panel.php:1234
282
  msgid "We need your support"
283
  msgstr "Χρειαζόμαστε την υποστήριξή σας"
284
 
285
- #: lib/yit-plugin-panel.php:1235
286
  msgid "to keep updating and improving the plugin. Please,"
287
  msgstr ""
288
  "για να διατηρήσετε την ενημέρωση και τη βελτίωση του πρόσθετου. Παρακαλώ,"
289
 
290
- #: lib/yit-plugin-panel.php:1237
291
  msgid "help us by leaving a five-star rating"
292
  msgstr "βοηθήστε μας αφήνοντας μια βαθμολογία πέντε αστέρων"
293
 
294
- #: lib/yit-plugin-panel.php:1238
295
  msgid ":) Thanks!"
296
  msgstr ":) Ευχαριστώ!"
297
 
@@ -364,81 +388,172 @@ msgstr ""
364
  "Παρουσιάστηκε σφάλμα, που πιθανότατα σημαίνει ότι έπεσε το τροφοδοτικό. "
365
  "Προσπαθήστε ξανά αργότερα."
366
 
367
- #: lib/yith-system-status.php:105
368
  msgid "WordPress Version"
369
  msgstr "Έκδοση WordPress"
370
 
371
- #: lib/yith-system-status.php:106
372
  msgid "WooCommerce Version"
373
  msgstr "Έκδοση WooCommerce"
374
 
375
- #: lib/yith-system-status.php:107
376
  msgid "Available Memory"
377
  msgstr "Διαθέσιμη Μνήμη"
378
 
379
- #: lib/yith-system-status.php:108
380
  msgid "PHP Version"
381
  msgstr "Έκδοση PHP"
382
 
383
- #: lib/yith-system-status.php:109
384
  msgid "TLS Version"
385
  msgstr "Έκδοση TLS"
386
 
387
- #: lib/yith-system-status.php:110
388
  msgid "WordPress Cron"
389
  msgstr "WordPress Cron"
390
 
391
- #: lib/yith-system-status.php:111
392
  msgid "SimpleXML"
393
  msgstr "SimpleXML"
394
 
395
- #: lib/yith-system-status.php:112
396
  msgid "MultiByte String"
397
  msgstr "MultiByte String"
398
 
399
- #: lib/yith-system-status.php:113
400
  msgid "ImageMagick Version"
401
  msgstr "Έκδοση ImageMagick"
402
 
403
- #: lib/yith-system-status.php:114
404
  msgid "GD Library"
405
  msgstr "Βιβλιοθήκη GD"
406
 
407
- #: lib/yith-system-status.php:115
408
  msgid "Iconv Module"
409
  msgstr "Άρθρωμα Iconv"
410
 
411
- #: lib/yith-system-status.php:116
412
  msgid "OPCache Save Comments"
413
  msgstr "OPCache Save Comments"
414
 
415
- #: lib/yith-system-status.php:117
416
  msgid "URL FOpen"
417
  msgstr "URL FOpen"
418
 
419
- #: lib/yith-system-status.php:135 lib/yith-system-status.php:136
420
  msgid "System Status"
421
  msgstr "Κατάσταση Συστήματος"
422
 
423
- #: lib/yith-system-status.php:179
424
  msgid "YITH Plugins"
425
  msgstr "Πρόσθετα YITH"
426
 
427
- #: lib/yith-system-status.php:180
428
  msgid "WooCommerce"
429
  msgstr "WooCommerce"
430
 
431
- #: lib/yith-system-status.php:297
432
  msgid "Warning!"
433
  msgstr "Προσοχή!"
434
 
435
- #: lib/yith-system-status.php:298
 
436
  msgid ""
437
- "The system check has detected some compatibility issues on your "
438
- "installation. %sClick here%s to know more"
439
  msgstr ""
440
  "Ο έλεγχος συστήματος έχει εντοπίσει κάποια προβλήματα συμβατότητας στην "
441
- "εγκατάστασή σας. %sΚάντε κλικ εδώ%s για να μάθετε περισσότερα"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
442
 
443
  #: templates/fields/ajax-customers.php:57
444
  msgid "Search Customers"
@@ -570,108 +685,54 @@ msgstr "(Default: <i %s></i> )"
570
  msgid "Reset Defaults"
571
  msgstr "Επαναφορά Προεπιλεγμένων"
572
 
573
- #: templates/sysinfo/system-information-panel.php:30
574
  msgid "YITH System Information"
575
  msgstr "Σύστημα Πληροφοριών YITH"
576
 
577
- #: templates/sysinfo/system-information-panel.php:38
578
- msgid "Site URL"
579
- msgstr "URL Ιστοσελίδας"
580
-
581
- #: templates/sysinfo/system-information-panel.php:46
582
- msgid "Output IP Address"
583
- msgstr "Διεύθυνση IP Παραγωγής"
584
-
585
- #: templates/sysinfo/system-information-panel.php:76
586
- msgid "Enabled"
587
- msgstr "Ενεργοποιημένο"
588
 
589
- #: templates/sysinfo/system-information-panel.php:76
590
- msgid "Disabled"
591
- msgstr "Απενεργοποιημένο"
592
 
593
- #: templates/sysinfo/system-information-panel.php:82
594
- msgid "N/A"
595
- msgstr "N/A"
 
596
 
597
  #: templates/sysinfo/system-information-panel.php:96
598
- msgid "%s needs %s enabled"
599
- msgstr "%s χρειάζεται %s ενεργοποιημένο"
600
-
601
- #: templates/sysinfo/system-information-panel.php:98
602
- msgid "%s needs at least %s of available memory"
603
- msgstr "%s χρειάζεται τουλάχιστον %s διαθέσιμης μνήμης"
604
-
605
- #: templates/sysinfo/system-information-panel.php:100
606
- #: templates/sysinfo/system-information-panel.php:149
607
- msgid ""
608
- "For optimal functioning of our plugins, we suggest setting at least %s of "
609
- "available memory"
610
- msgstr ""
611
- "Για την βέλτιστη λειτουργικότητα των προσθέτων μας, προτείνουμε να ορίσετε "
612
- "τουλάχιστον %s διαθέσιμης μνήμης"
613
-
614
- #: templates/sysinfo/system-information-panel.php:102
615
- #: templates/sysinfo/system-information-panel.php:137
616
- #: templates/sysinfo/system-information-panel.php:151
617
- msgid ""
618
- "Read more %s here%s or contact your hosting company in order to increase it."
619
- msgstr ""
620
- "Μάθετε περισσότερα %s εδώ%s ή επικοινωνήστε με την εταιρεία hosting σας για "
621
- "να το βελτιώσετε."
622
-
623
- #: templates/sysinfo/system-information-panel.php:105
624
- msgid "%s needs at least %s version"
625
- msgstr "%s χρειάζεται τουλάχιστον %s έκδοση"
626
-
627
- #: templates/sysinfo/system-information-panel.php:116
628
- msgid ""
629
- "Update it to the latest version in order to benefit of all new features and "
630
- "security updates."
631
- msgstr ""
632
- "Κάντε αναβάθμιση της τελευταίας έκδοσης για να επωφεληθείτε από τα νέα "
633
- "χαρακτηριστικά και τις αναβαθμίσεις προστασίας."
634
 
635
- #: templates/sysinfo/system-information-panel.php:122
636
- msgid "Contact your hosting company in order to update it."
637
- msgstr "Επικοινωνήστε με την εταιρεία hosting σας για να αναβαθμίσετε."
638
 
639
- #: templates/sysinfo/system-information-panel.php:126
640
- msgid "Remove %s from %s file"
641
- msgstr "Αφαίρεση %s από αρχείο %s"
642
 
643
- #: templates/sysinfo/system-information-panel.php:134
644
- msgid "Contact your hosting company in order to enable it."
645
- msgstr "Επικοινωνήστε με την εταιρεία hosting σας για να ενεργοποιήσετε."
646
 
647
- #: templates/sysinfo/system-information-panel.php:157
648
- msgid ""
649
- "We cannot determine which <b>TLS</b> version is installed because <b>cURL</"
650
- "b> module is disabled. Ask your hosting company to enable it."
651
- msgstr ""
652
- "Δεν μπορούμε να καθορίσουμε ποια έκδοση <b>TLS</b> έχει εγκατασταθεί γιατί "
653
- "το άρθρωμα <b>cURL</b> είναι απενεργοποιημένο. Ζητήστε από την εταιρεία "
654
- "hosting σας να το ενεργοποιήσει."
655
 
656
- #: templates/sysinfo/system-information-panel.php:160
657
- msgid ""
658
- "<b>ImageMagick</b> module is not installed. Ask your hosting company to "
659
- "install it."
660
- msgstr ""
661
- "Το άρθρωμα <b>ImageMagick</b> δεν έχει εγκατασταθεί. Ζητήστε από την "
662
- "εταιρεία hosting σας να το εγκαταστήσει."
663
 
664
- #: templates/sysinfo/system-information-panel.php:172
665
  msgid "Show full PHPInfo"
666
  msgstr "Πλήρης εμφάνιση PHPInfo"
667
 
668
- #: templates/sysinfo/system-information-panel.php:176
669
- msgid "Back to System panel"
670
- msgstr "Πίσω στο πάνελ Συστήματος"
671
-
672
- #: templates/sysinfo/system-information-panel.php:193
673
- msgid "Back to top"
674
- msgstr "Πίσω στην κορυφή"
675
 
676
  #: yit-plugin.php:194
677
  msgid "License"
@@ -755,15 +816,40 @@ msgctxt "[gutenberg]: Category Name"
755
  msgid "YITH"
756
  msgstr "YITH"
757
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
758
  #: templates/fields/onoff.php:24
759
- msgctxt "ON/OFF button: use MAX 3 characters!"
760
- msgid "ON"
761
- msgstr "ΕΝΕΡΓΟΠΟΙΗΣΗ"
762
 
763
  #: templates/fields/onoff.php:25
764
- msgctxt "ON/OFF button: use MAX 3 characters!"
765
- msgid "OFF"
766
- msgstr "ΑΠΕΝΕΡΓΟΠΟΙΗΣΗ"
767
 
768
  #: yit-plugin.php:83
769
  msgctxt "Plugin Row Meta"
@@ -789,3 +875,18 @@ msgstr "Premium έκδοση"
789
  msgctxt "Action links"
790
  msgid "Settings"
791
  msgstr "Ρυθμίσεις"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  msgstr ""
5
  "Project-Id-Version: YITH Plugin Starter 1.0.0 Plugin FW\n"
6
  "Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
7
+ "POT-Creation-Date: 2020-08-07 14:15:08+00:00\n"
8
+ "PO-Revision-Date: 2020-08-13 10:05+0100\n"
9
  "Last-Translator: \n"
10
  "Language-Team: Your Inspiration Themes <info@yithemes.com>\n"
11
  "Language: el_GR\n"
22
  "X-Textdomain-Support: yes\n"
23
  "X-Poedit-SearchPath-0: .\n"
24
 
25
+ #: lib/yit-assets.php:102
26
+ msgid "Clear"
27
+ msgstr "Καθαρισμός"
28
+
29
+ #: lib/yit-assets.php:103
30
+ msgid "Clear color"
31
+ msgstr "Καθαρισμός χρώματος"
32
+
33
+ #: lib/yit-assets.php:104
34
+ msgid "Default"
35
+ msgstr "Προεπιλεγμένο"
36
+
37
+ #: lib/yit-assets.php:105
38
+ msgid "Select default color"
39
+ msgstr "Επιλογή προεπιλεγμένου χρώματος"
40
+
41
+ #: lib/yit-assets.php:106
42
+ msgid "Select Color"
43
+ msgstr "Επιλογή Χρώματος"
44
+
45
+ #: lib/yit-assets.php:107
46
+ msgid "Color value"
47
+ msgstr "Αξία χρώματος"
48
+
49
  #: lib/yit-cpt-unlimited.php:462 lib/yit-cpt-unlimited.php:576
50
  #: lib/yit-cpt-unlimited.php:721 lib/yit-cpt-unlimited.php:1636
51
  msgid "Add %s"
226
  msgid "Upload multiple files"
227
  msgstr "Ανέβασμα πολλαπλών αρχείων"
228
 
229
+ #: lib/yit-plugin-panel-wc.php:426
230
  msgid "The changes you have made will be lost if you leave this page."
231
  msgstr ""
232
  "Οι αλλαγές που έχετε δημιουργήσει θα χαθούν αν αφήσετε αυτήν την σελίδα."
235
  msgid "Plugin Settings"
236
  msgstr "Ρυθμίσεις Προσθέτου"
237
 
238
+ #: lib/yit-plugin-panel.php:454 lib/yit-plugin-panel.php:457
239
  msgid "How to install premium version"
240
  msgstr "Πώς να εγκαταστήσετε την προηγμένη έκδοση"
241
 
242
+ #: lib/yit-plugin-panel.php:617 lib/yit-plugin-subpanel.php:151
243
  #: templates/panel/woocommerce/woocommerce-form.php:14
244
  msgid "Save Changes"
245
  msgstr "Αποθήκευση Αλλαγών"
246
 
247
+ #: lib/yit-plugin-panel.php:621 lib/yit-plugin-subpanel.php:154
248
  #: templates/panel/woocommerce/woocommerce-form.php:17
249
  msgid ""
250
  "If you continue with this action, you will reset all options in this page."
252
  "Αν συνεχίσετε με αυτή την ενέργεια θα επαναφέρετε όλες τις επιλογές στη "
253
  "σελίδα."
254
 
255
+ #: lib/yit-plugin-panel.php:624 lib/yit-plugin-subpanel.php:156
256
  msgid "Reset to default"
257
  msgstr "Επαναφορά σε προεπιλεγμένο"
258
 
259
+ #: lib/yit-plugin-panel.php:625 lib/yit-plugin-subpanel.php:157
260
  #: templates/panel/woocommerce/woocommerce-form.php:21
261
  msgid "Are you sure?"
262
  msgstr "Είστε σίγουρος;"
263
 
264
+ #: lib/yit-plugin-panel.php:823
265
  msgid ""
266
  "The element you have entered already exists. Please, enter another name."
267
  msgstr "Το στοιχείο που εισάγατε υπάρχει ήδη. Παρακαλώ, εισάγετε άλλο όνομα."
268
 
269
+ #: lib/yit-plugin-panel.php:824
270
  msgid "Settings saved"
271
  msgstr "Ρυθμίσεις αποθηκεύτηκαν"
272
 
273
+ #: lib/yit-plugin-panel.php:825
274
  msgid "Settings reset"
275
  msgstr "Επαναφορά ρυθμίσεων"
276
 
277
+ #: lib/yit-plugin-panel.php:826
278
  msgid "Element deleted correctly."
279
  msgstr "Το στοιχείο διαγράφηκε επιτυχώς."
280
 
281
+ #: lib/yit-plugin-panel.php:827 lib/yit-plugin-panel.php:828
282
  msgid "Element updated correctly."
283
  msgstr "Το στοιχείο αναβαθμίστηκε επιτυχώς."
284
 
285
+ #: lib/yit-plugin-panel.php:829
286
  msgid "Database imported correctly."
287
  msgstr "Επιτυχής εισαγωγή βάσης δεδομένων."
288
 
289
+ #: lib/yit-plugin-panel.php:830
290
  msgid "An error has occurred during import. Please try again."
291
  msgstr "Παρουσιάστηκε σφάλμα κατά την εισαγωγή. Παρακαλώ προσπαθήστε ξανά."
292
 
293
+ #: lib/yit-plugin-panel.php:831
294
  msgid "The added file is not valid."
295
  msgstr "Το προστιθέμενο αρχείο δεν είναι έγκυρο."
296
 
297
+ #: lib/yit-plugin-panel.php:832
298
  msgid "Sorry, import is disabled."
299
  msgstr "Συγνώμη, η εισαγωγή είναι απενεργοποιημένη."
300
 
301
+ #: lib/yit-plugin-panel.php:833
302
  msgid "Sorting successful."
303
  msgstr "Διαλογή επιτυχής."
304
 
305
+ #: lib/yit-plugin-panel.php:1281
306
  msgid "We need your support"
307
  msgstr "Χρειαζόμαστε την υποστήριξή σας"
308
 
309
+ #: lib/yit-plugin-panel.php:1282
310
  msgid "to keep updating and improving the plugin. Please,"
311
  msgstr ""
312
  "για να διατηρήσετε την ενημέρωση και τη βελτίωση του πρόσθετου. Παρακαλώ,"
313
 
314
+ #: lib/yit-plugin-panel.php:1284
315
  msgid "help us by leaving a five-star rating"
316
  msgstr "βοηθήστε μας αφήνοντας μια βαθμολογία πέντε αστέρων"
317
 
318
+ #: lib/yit-plugin-panel.php:1285
319
  msgid ":) Thanks!"
320
  msgstr ":) Ευχαριστώ!"
321
 
388
  "Παρουσιάστηκε σφάλμα, που πιθανότατα σημαίνει ότι έπεσε το τροφοδοτικό. "
389
  "Προσπαθήστε ξανά αργότερα."
390
 
391
+ #: lib/yith-system-status.php:111
392
  msgid "WordPress Version"
393
  msgstr "Έκδοση WordPress"
394
 
395
+ #: lib/yith-system-status.php:112
396
  msgid "WooCommerce Version"
397
  msgstr "Έκδοση WooCommerce"
398
 
399
+ #: lib/yith-system-status.php:113
400
  msgid "Available Memory"
401
  msgstr "Διαθέσιμη Μνήμη"
402
 
403
+ #: lib/yith-system-status.php:114
404
  msgid "PHP Version"
405
  msgstr "Έκδοση PHP"
406
 
407
+ #: lib/yith-system-status.php:115
408
  msgid "TLS Version"
409
  msgstr "Έκδοση TLS"
410
 
411
+ #: lib/yith-system-status.php:116
412
  msgid "WordPress Cron"
413
  msgstr "WordPress Cron"
414
 
415
+ #: lib/yith-system-status.php:117
416
  msgid "SimpleXML"
417
  msgstr "SimpleXML"
418
 
419
+ #: lib/yith-system-status.php:118
420
  msgid "MultiByte String"
421
  msgstr "MultiByte String"
422
 
423
+ #: lib/yith-system-status.php:119
424
  msgid "ImageMagick Version"
425
  msgstr "Έκδοση ImageMagick"
426
 
427
+ #: lib/yith-system-status.php:120
428
  msgid "GD Library"
429
  msgstr "Βιβλιοθήκη GD"
430
 
431
+ #: lib/yith-system-status.php:121
432
  msgid "Iconv Module"
433
  msgstr "Άρθρωμα Iconv"
434
 
435
+ #: lib/yith-system-status.php:122
436
  msgid "OPCache Save Comments"
437
  msgstr "OPCache Save Comments"
438
 
439
+ #: lib/yith-system-status.php:123
440
  msgid "URL FOpen"
441
  msgstr "URL FOpen"
442
 
443
+ #: lib/yith-system-status.php:141 lib/yith-system-status.php:142
444
  msgid "System Status"
445
  msgstr "Κατάσταση Συστήματος"
446
 
447
+ #: lib/yith-system-status.php:184
448
  msgid "YITH Plugins"
449
  msgstr "Πρόσθετα YITH"
450
 
451
+ #: lib/yith-system-status.php:192
452
  msgid "WooCommerce"
453
  msgstr "WooCommerce"
454
 
455
+ #: lib/yith-system-status.php:330
456
  msgid "Warning!"
457
  msgstr "Προσοχή!"
458
 
459
+ #. translators: %1$s open link tag, %2$s open link tag
460
+ #: lib/yith-system-status.php:334
461
  msgid ""
462
+ "The system check has detected some compatibility issues on your installation."
463
+ "%1$sClick here%2$s to know more"
464
  msgstr ""
465
  "Ο έλεγχος συστήματος έχει εντοπίσει κάποια προβλήματα συμβατότητας στην "
466
+ "εγκατάστασή σας.%1$sΚάντε κλικ εδώ%2$s για να μάθετε περισσότερα"
467
+
468
+ #: lib/yith-system-status.php:473
469
+ msgid "Enabled"
470
+ msgstr "Ενεργοποιημένο"
471
+
472
+ #: lib/yith-system-status.php:473
473
+ msgid "Disabled"
474
+ msgstr "Απενεργοποιημένο"
475
+
476
+ #: lib/yith-system-status.php:478
477
+ msgid "N/A"
478
+ msgstr "N/A"
479
+
480
+ #. translators: %1$s plugin name, %2$s requirement name
481
+ #: lib/yith-system-status.php:506
482
+ msgid "%1$s needs %2$s enabled"
483
+ msgstr "%1$s χρειάζεται %2$s ενεργοποιημένο"
484
+
485
+ #. translators: %1$s plugin name, %2$s required memory amount
486
+ #: lib/yith-system-status.php:509
487
+ msgid "%1$s needs at least %2$s of available memory"
488
+ msgstr "%1$s χρειάζεται τουλάχιστον %2$s διαθέσιμης μνήμης"
489
+
490
+ #. translators: %1$s plugin name, %2$s version number
491
+ #: lib/yith-system-status.php:512
492
+ msgid "%1$s needs at least %2$s version"
493
+ msgstr "%1$s χρειάζεται τουλάχιστον %2$s έκδοση"
494
+
495
+ #: lib/yith-system-status.php:537
496
+ msgid ""
497
+ "Update it to the latest version in order to benefit of all new features and "
498
+ "security updates."
499
+ msgstr ""
500
+ "Κάντε αναβάθμιση της τελευταίας έκδοσης για να επωφεληθείτε από τα νέα "
501
+ "χαρακτηριστικά και τις αναβαθμίσεις προστασίας."
502
+
503
+ #: lib/yith-system-status.php:541 lib/yith-system-status.php:547
504
+ msgid "Contact your hosting company in order to update it."
505
+ msgstr "Επικοινωνήστε με την εταιρεία hosting σας για να αναβαθμίσετε."
506
+
507
+ #: lib/yith-system-status.php:545
508
+ msgid "Contact your hosting company in order to install it."
509
+ msgstr "Επικοινωνήστε με την εταιρεία hosting σας για να το ενεργοποιήσετε."
510
+
511
+ #. translators: %1$s code, %2$s file name
512
+ #: lib/yith-system-status.php:552
513
+ msgid "Remove %1$s from %2$s file"
514
+ msgstr "Αφαίρεση %1$s από αρχείο %2$s"
515
+
516
+ #: lib/yith-system-status.php:560
517
+ msgid "Contact your hosting company in order to enable it."
518
+ msgstr "Επικοινωνήστε με την εταιρεία hosting σας για να ενεργοποιήσετε."
519
+
520
+ #. translators: %1$s opening link tag, %2$s closing link tag
521
+ #: lib/yith-system-status.php:564 lib/yith-system-status.php:588
522
+ msgid ""
523
+ "Read more %1$shere%2$s or contact your hosting company in order to increase "
524
+ "it."
525
+ msgstr ""
526
+ "Μάθετε περισσότερα %1$sεδώ%2$s ή επικοινωνήστε με την εταιρεία hosting σας "
527
+ "για να το βελτιώσετε."
528
+
529
+ #. translators: %s recommended memory amount
530
+ #: lib/yith-system-status.php:585
531
+ msgid ""
532
+ "For optimal functioning of our plugins, we suggest setting at least %s of "
533
+ "available memory"
534
+ msgstr ""
535
+ "Για την βέλτιστη λειτουργικότητα των προσθέτων μας, προτείνουμε να ορίσετε "
536
+ "τουλάχιστον %s διαθέσιμης μνήμης"
537
+
538
+ #. translators: %1$s TLS label, %2$s cURL label
539
+ #: lib/yith-system-status.php:593
540
+ msgid ""
541
+ "The system check cannot determine which %1$s version is installed because "
542
+ "%2$s module is disabled. Ask your hosting company to enable it."
543
+ msgstr ""
544
+ "Το σύστημα δεν μπορεί να καθορίσει ποια %1$s έκδοση έχει εγκατασταθεί γιατί "
545
+ "το %2$s άρθρωμα είναι απενεργοποιημένο. Ζητήστε από την εταιρεία hosting σας "
546
+ "να το ενεργοποιήσει."
547
+
548
+ #. translators: %1$s TLS label
549
+ #: lib/yith-system-status.php:596
550
+ msgid ""
551
+ "The system check cannot determine which %1$s version is installed due to a "
552
+ "connection issue between your site and our server."
553
+ msgstr ""
554
+ "Ο έλεγχος συστήματος δεν μπορεί να διευκρινήσει ποια έκδοση %1$s έχει "
555
+ "εγκατασταθεί λόγω προβλήματος σύνδεσης ανάμεσα στον ιστότοπο σας και τον "
556
+ "διακομιστή μας."
557
 
558
  #: templates/fields/ajax-customers.php:57
559
  msgid "Search Customers"
685
  msgid "Reset Defaults"
686
  msgstr "Επαναφορά Προεπιλεγμένων"
687
 
688
+ #: templates/sysinfo/system-information-panel.php:39
689
  msgid "YITH System Information"
690
  msgstr "Σύστημα Πληροφοριών YITH"
691
 
692
+ #: templates/sysinfo/system-information-panel.php:50
693
+ msgid "WP debug.log file"
694
+ msgstr "Αρχείο WP debug.log"
 
 
 
 
 
 
 
 
695
 
696
+ #: templates/sysinfo/system-information-panel.php:54
697
+ msgid "PHP error_log file"
698
+ msgstr "Αρχείο PHP error_log"
699
 
700
+ #: templates/sysinfo/system-information-panel.php:59
701
+ #: templates/sysinfo/system-information-panel.php:83
702
+ msgid "Back to System panel"
703
+ msgstr "Πίσω στο πάνελ Συστήματος"
704
 
705
  #: templates/sysinfo/system-information-panel.php:96
706
+ msgid "Back to top"
707
+ msgstr "Πίσω στην κορυφή"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
708
 
709
+ #: templates/sysinfo/system-information-panel.php:104
710
+ msgid "Site URL"
711
+ msgstr "URL Ιστοσελίδας"
712
 
713
+ #: templates/sysinfo/system-information-panel.php:112
714
+ msgid "Output IP Address"
715
+ msgstr "Διεύθυνση IP Παραγωγής"
716
 
717
+ #: templates/sysinfo/system-information-panel.php:120
718
+ msgid "Defined WP_CACHE"
719
+ msgstr "Καθορισμένο WP_CACHE"
720
 
721
+ #: templates/sysinfo/system-information-panel.php:123
722
+ msgid "Yes"
723
+ msgstr "Ναι"
 
 
 
 
 
724
 
725
+ #: templates/sysinfo/system-information-panel.php:123
726
+ msgid "No"
727
+ msgstr "Όχι"
 
 
 
 
728
 
729
+ #: templates/sysinfo/system-information-panel.php:159
730
  msgid "Show full PHPInfo"
731
  msgstr "Πλήρης εμφάνιση PHPInfo"
732
 
733
+ #: templates/sysinfo/system-information-panel.php:167
734
+ msgid "Show log files"
735
+ msgstr "Εμφάνιση αρχείων καταγραφής"
 
 
 
 
736
 
737
  #: yit-plugin.php:194
738
  msgid "License"
816
  msgid "YITH"
817
  msgstr "YITH"
818
 
819
+ #: templates/fields/dimensions.php:16
820
+ msgctxt "Position in the \"Dimensions\" field"
821
+ msgid "Top"
822
+ msgstr "Κορυφή"
823
+
824
+ #: templates/fields/dimensions.php:17
825
+ msgctxt "Position in the \"Dimensions\" field"
826
+ msgid "Right"
827
+ msgstr "Δεξιά"
828
+
829
+ #: templates/fields/dimensions.php:18
830
+ msgctxt "Position in the \"Dimensions\" field"
831
+ msgid "Bottom"
832
+ msgstr "Κάτω"
833
+
834
+ #: templates/fields/dimensions.php:19
835
+ msgctxt "Position in the \"Dimensions\" field"
836
+ msgid "Left"
837
+ msgstr "Αριστερά"
838
+
839
+ #: templates/fields/dimensions.php:117
840
+ msgctxt "Tooltip in the \"Dimensions\" field"
841
+ msgid "Link values together"
842
+ msgstr "Συνδέστε αξίες"
843
+
844
  #: templates/fields/onoff.php:24
845
+ msgctxt "YES/NO button: use MAX 3 characters!"
846
+ msgid "YES"
847
+ msgstr "ΝΑΙ"
848
 
849
  #: templates/fields/onoff.php:25
850
+ msgctxt "YES/NO button: use MAX 3 characters!"
851
+ msgid "NO"
852
+ msgstr "ΟΧΙ"
853
 
854
  #: yit-plugin.php:83
855
  msgctxt "Plugin Row Meta"
875
  msgctxt "Action links"
876
  msgid "Settings"
877
  msgstr "Ρυθμίσεις"
878
+
879
+ #~ msgid ""
880
+ #~ "<b>ImageMagick</b> module is not installed. Ask your hosting company to "
881
+ #~ "install it."
882
+ #~ msgstr ""
883
+ #~ "Το άρθρωμα <b>ImageMagick</b> δεν έχει εγκατασταθεί. Ζητήστε από την "
884
+ #~ "εταιρεία hosting σας να το εγκαταστήσει."
885
+
886
+ #~ msgctxt "ON/OFF button: use MAX 3 characters!"
887
+ #~ msgid "ON"
888
+ #~ msgstr "ΕΝΕΡΓΟΠΟΙΗΣΗ"
889
+
890
+ #~ msgctxt "ON/OFF button: use MAX 3 characters!"
891
+ #~ msgid "OFF"
892
+ #~ msgstr "ΑΠΕΝΕΡΓΟΠΟΙΗΣΗ"
plugin-fw/languages/yith-plugin-fw-es_ES.mo CHANGED
Binary file
plugin-fw/languages/yith-plugin-fw-es_ES.po CHANGED
@@ -4,15 +4,15 @@ msgid ""
4
  msgstr ""
5
  "Project-Id-Version: YITH Plugin Starter 1.0.0 Plugin FW\n"
6
  "Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
7
- "POT-Creation-Date: 2020-03-11 14:03:11+00:00\n"
8
- "PO-Revision-Date: 2020-01-14 10:23+0000\n"
9
  "Last-Translator: \n"
10
  "Language-Team: Your Inspiration Themes <info@yithemes.com>\n"
11
  "Language: es_ES\n"
12
  "MIME-Version: 1.0\n"
13
  "Content-Type: text/plain; charset=UTF-8\n"
14
  "Content-Transfer-Encoding: 8bit\n"
15
- "X-Generator: Poedit 1.8.12\n"
16
  "X-Poedit-KeywordsList: __;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;"
17
  "_nx_noop:1,2,3c;esc_attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;"
18
  "esc_html_x:1,2c\n"
@@ -22,6 +22,33 @@ msgstr ""
22
  "X-Textdomain-Support: yes\n"
23
  "X-Poedit-SearchPath-0: .\n"
24
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  #: lib/yit-cpt-unlimited.php:462 lib/yit-cpt-unlimited.php:576
26
  #: lib/yit-cpt-unlimited.php:721 lib/yit-cpt-unlimited.php:1636
27
  msgid "Add %s"
@@ -203,7 +230,7 @@ msgstr "Añadir %s desde imágenes"
203
  msgid "Upload multiple files"
204
  msgstr "Cargar archivos múltiples"
205
 
206
- #: lib/yit-plugin-panel-wc.php:399
207
  msgid "The changes you have made will be lost if you leave this page."
208
  msgstr "Los cambios que has hecho se perderán si abandonas esta página."
209
 
@@ -211,87 +238,87 @@ msgstr "Los cambios que has hecho se perderán si abandonas esta página."
211
  msgid "Plugin Settings"
212
  msgstr "Ajustes del plugin"
213
 
214
- #: lib/yit-plugin-panel.php:425 lib/yit-plugin-panel.php:428
215
  msgid "How to install premium version"
216
  msgstr "Cómo instalar la versión premium"
217
 
218
- #: lib/yit-plugin-panel.php:572 lib/yit-plugin-subpanel.php:151
219
  #: templates/panel/woocommerce/woocommerce-form.php:14
220
  msgid "Save Changes"
221
  msgstr "Guardar cambios"
222
 
223
- #: lib/yit-plugin-panel.php:575 lib/yit-plugin-subpanel.php:154
224
  #: templates/panel/woocommerce/woocommerce-form.php:17
225
  msgid ""
226
  "If you continue with this action, you will reset all options in this page."
227
  msgstr ""
228
  "Si sigues con esta acción, se reiniciarán todas las opciones en esta página."
229
 
230
- #: lib/yit-plugin-panel.php:577 lib/yit-plugin-subpanel.php:156
231
  msgid "Reset to default"
232
  msgstr "Restablecer a predeterminado"
233
 
234
- #: lib/yit-plugin-panel.php:578 lib/yit-plugin-subpanel.php:157
235
  #: templates/panel/woocommerce/woocommerce-form.php:21
236
  msgid "Are you sure?"
237
  msgstr "¿Estás seguro/a?"
238
 
239
- #: lib/yit-plugin-panel.php:776
240
  msgid ""
241
  "The element you have entered already exists. Please, enter another name."
242
  msgstr ""
243
  "El elemento que has introducido ya existe. Por favor, introduce otro nombre."
244
 
245
- #: lib/yit-plugin-panel.php:777
246
  msgid "Settings saved"
247
  msgstr "Ajustes guardados"
248
 
249
- #: lib/yit-plugin-panel.php:778
250
  msgid "Settings reset"
251
  msgstr "Ajustes reiniciados"
252
 
253
- #: lib/yit-plugin-panel.php:779
254
  msgid "Element deleted correctly."
255
  msgstr "Elemento borrado correctamente."
256
 
257
- #: lib/yit-plugin-panel.php:780 lib/yit-plugin-panel.php:781
258
  msgid "Element updated correctly."
259
  msgstr "Elemento actualizado correctamente."
260
 
261
- #: lib/yit-plugin-panel.php:782
262
  msgid "Database imported correctly."
263
  msgstr "Base de datos importada correctamente."
264
 
265
- #: lib/yit-plugin-panel.php:783
266
  msgid "An error has occurred during import. Please try again."
267
  msgstr ""
268
  "Ha ocurrido un error durante la importación. Por favor, inténtalo de nuevo."
269
 
270
- #: lib/yit-plugin-panel.php:784
271
  msgid "The added file is not valid."
272
  msgstr "El archivo añadido no es válido."
273
 
274
- #: lib/yit-plugin-panel.php:785
275
  msgid "Sorry, import is disabled."
276
  msgstr "Lo sentimos, la importación está deshabilitada."
277
 
278
- #: lib/yit-plugin-panel.php:786
279
  msgid "Sorting successful."
280
  msgstr "Clasificación fue realizada con éxito."
281
 
282
- #: lib/yit-plugin-panel.php:1234
283
  msgid "We need your support"
284
  msgstr "Necesitamos tu ayuda"
285
 
286
- #: lib/yit-plugin-panel.php:1235
287
  msgid "to keep updating and improving the plugin. Please,"
288
  msgstr "para seguir actualizando y mejora el plugin. Por favor,"
289
 
290
- #: lib/yit-plugin-panel.php:1237
291
  msgid "help us by leaving a five-star rating"
292
  msgstr "ayúdanos dejando una valoración de 5 estrellas"
293
 
294
- #: lib/yit-plugin-panel.php:1238
295
  msgid ":) Thanks!"
296
  msgstr ":) ¡Gracias!"
297
 
@@ -365,82 +392,177 @@ msgstr ""
365
  "Ha ocurrido un error, lo que probablemente significa que el feed está caído. "
366
  "Inténtalo de nuevo más tarde."
367
 
368
- #: lib/yith-system-status.php:105
369
  msgid "WordPress Version"
370
  msgstr "Versión de WordPress"
371
 
372
- #: lib/yith-system-status.php:106
373
  msgid "WooCommerce Version"
374
  msgstr "Versión de WooCommerce"
375
 
376
- #: lib/yith-system-status.php:107
377
  msgid "Available Memory"
378
  msgstr "Memoria disponible"
379
 
380
- #: lib/yith-system-status.php:108
381
  msgid "PHP Version"
382
  msgstr "Versión PHP"
383
 
384
- #: lib/yith-system-status.php:109
385
  msgid "TLS Version"
386
  msgstr "Versión TLS"
387
 
388
- #: lib/yith-system-status.php:110
389
  msgid "WordPress Cron"
390
  msgstr "Cron de WordPress"
391
 
392
- #: lib/yith-system-status.php:111
393
  msgid "SimpleXML"
394
  msgstr "SimpleXML"
395
 
396
- #: lib/yith-system-status.php:112
397
  msgid "MultiByte String"
398
  msgstr "Cadena MultiByte"
399
 
400
- #: lib/yith-system-status.php:113
401
  msgid "ImageMagick Version"
402
  msgstr "Versión ImageMagick"
403
 
404
- #: lib/yith-system-status.php:114
405
  msgid "GD Library"
406
  msgstr "Biblioteca GD"
407
 
408
- #: lib/yith-system-status.php:115
409
  msgid "Iconv Module"
410
  msgstr "Módulo Iconv"
411
 
412
- #: lib/yith-system-status.php:116
413
  msgid "OPCache Save Comments"
414
  msgstr "Guardar comentarios OPCache"
415
 
416
- #: lib/yith-system-status.php:117
417
  msgid "URL FOpen"
418
  msgstr "URL FOpen"
419
 
420
- #: lib/yith-system-status.php:135 lib/yith-system-status.php:136
421
  msgid "System Status"
422
  msgstr "Estado del sistema"
423
 
424
- #: lib/yith-system-status.php:179
425
  msgid "YITH Plugins"
426
  msgstr "Plugins de YITH"
427
 
428
- #: lib/yith-system-status.php:180
429
  msgid "WooCommerce"
430
  msgstr "WooCommerce"
431
 
432
- #: lib/yith-system-status.php:297
433
  msgid "Warning!"
434
  msgstr "¡Atención! "
435
 
436
- #: lib/yith-system-status.php:298
 
 
437
  msgid ""
438
- "The system check has detected some compatibility issues on your "
439
- "installation. %sClick here%s to know more"
440
  msgstr ""
441
  "La comprobación del sistema ha detectado algunos errores en tu instalación. "
442
  "%sHaz clic aquí%s para saber más"
443
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
444
  #: templates/fields/ajax-customers.php:57
445
  msgid "Search Customers"
446
  msgstr "Buscar clientes"
@@ -571,107 +693,55 @@ msgstr "(Por defecto: <i %s></i> )"
571
  msgid "Reset Defaults"
572
  msgstr "Ajustes predeterminados"
573
 
574
- #: templates/sysinfo/system-information-panel.php:30
575
  msgid "YITH System Information"
576
  msgstr "Información del sistema de YITH"
577
 
578
- #: templates/sysinfo/system-information-panel.php:38
579
- msgid "Site URL"
580
- msgstr "URL del sitio"
581
-
582
- #: templates/sysinfo/system-information-panel.php:46
583
- msgid "Output IP Address"
584
- msgstr "Salida Dirección IP"
585
-
586
- #: templates/sysinfo/system-information-panel.php:76
587
- msgid "Enabled"
588
- msgstr "Activado"
589
-
590
- #: templates/sysinfo/system-information-panel.php:76
591
- msgid "Disabled"
592
- msgstr "Desactivado"
593
-
594
- #: templates/sysinfo/system-information-panel.php:82
595
- msgid "N/A"
596
- msgstr "N/D"
597
-
598
- #: templates/sysinfo/system-information-panel.php:96
599
- msgid "%s needs %s enabled"
600
- msgstr "%s necesita %s enabled"
601
-
602
- #: templates/sysinfo/system-information-panel.php:98
603
- msgid "%s needs at least %s of available memory"
604
- msgstr "%s necesita al menos %s de memoria disponible"
605
-
606
- #: templates/sysinfo/system-information-panel.php:100
607
- #: templates/sysinfo/system-information-panel.php:149
608
- msgid ""
609
- "For optimal functioning of our plugins, we suggest setting at least %s of "
610
- "available memory"
611
  msgstr ""
612
- "Para el optimo funcionamiento de los plugins, sugerimos configurar al menos "
613
- "%s de memoria disponible"
614
 
615
- #: templates/sysinfo/system-information-panel.php:102
616
- #: templates/sysinfo/system-information-panel.php:137
617
- #: templates/sysinfo/system-information-panel.php:151
618
- msgid ""
619
- "Read more %s here%s or contact your hosting company in order to increase it."
620
  msgstr ""
621
- "Lee más %s aquí%s o contacta a tu compañía de hosting para incrementarlo."
622
 
623
- #: templates/sysinfo/system-information-panel.php:105
624
- msgid "%s needs at least %s version"
625
- msgstr "%s necesita al menos la versión %s"
626
-
627
- #: templates/sysinfo/system-information-panel.php:116
628
- msgid ""
629
- "Update it to the latest version in order to benefit of all new features and "
630
- "security updates."
631
- msgstr ""
632
- "Actualízalo a la última versión para beneficiarte de todas las nuevas "
633
- "características y actualizaciones de seguridad"
634
 
635
- #: templates/sysinfo/system-information-panel.php:122
636
- msgid "Contact your hosting company in order to update it."
637
- msgstr "Contacta a tu compañía de hosting para actualizarlo."
638
 
639
- #: templates/sysinfo/system-information-panel.php:126
640
- msgid "Remove %s from %s file"
641
- msgstr "Eliminar %s del archivo %s"
642
 
643
- #: templates/sysinfo/system-information-panel.php:134
644
- msgid "Contact your hosting company in order to enable it."
645
- msgstr "Contacta a tu compañía de hosting para activarlo."
646
 
647
- #: templates/sysinfo/system-information-panel.php:157
648
- msgid ""
649
- "We cannot determine which <b>TLS</b> version is installed because <b>cURL</"
650
- "b> module is disabled. Ask your hosting company to enable it."
651
  msgstr ""
652
- "No podemos determinar qué versión <b>TLS</b> está instalada porque <b>cURL</"
653
- "b> el módulo está desactivado. Solicita a tu compañía de hosting que lo "
654
- "active."
655
 
656
- #: templates/sysinfo/system-information-panel.php:160
657
- msgid ""
658
- "<b>ImageMagick</b> module is not installed. Ask your hosting company to "
659
- "install it."
660
  msgstr ""
661
- "<b>ImageMagick</b> el módulo no está instalado. Solicita a tu compañia de "
662
- "hosting que lo instale."
663
 
664
- #: templates/sysinfo/system-information-panel.php:172
 
 
 
 
 
665
  msgid "Show full PHPInfo"
666
  msgstr "Mostrar PHPInfo completa"
667
 
668
- #: templates/sysinfo/system-information-panel.php:176
669
- msgid "Back to System panel"
670
- msgstr "Volver al panel del Sistema"
671
-
672
- #: templates/sysinfo/system-information-panel.php:193
673
- msgid "Back to top"
674
- msgstr "Volver arriba"
675
 
676
  #: yit-plugin.php:194
677
  msgid "License"
@@ -755,15 +825,40 @@ msgctxt "[gutenberg]: Category Name"
755
  msgid "YITH"
756
  msgstr "YITH"
757
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
758
  #: templates/fields/onoff.php:24
759
- msgctxt "ON/OFF button: use MAX 3 characters!"
760
- msgid "ON"
761
- msgstr "ON"
762
 
763
  #: templates/fields/onoff.php:25
764
- msgctxt "ON/OFF button: use MAX 3 characters!"
765
- msgid "OFF"
766
- msgstr "OFF"
767
 
768
  #: yit-plugin.php:83
769
  msgctxt "Plugin Row Meta"
@@ -790,6 +885,21 @@ msgctxt "Action links"
790
  msgid "Settings"
791
  msgstr "Ajustes"
792
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
793
  #~ msgid "An unexpected error occurred, please try again later. Thanks!"
794
  #~ msgstr ""
795
  #~ "Ha ocurrido un error inesperado, por favor, inténtalo de nuevo más tarde. "
@@ -1126,9 +1236,6 @@ msgstr "Ajustes"
1126
  #~ msgid "Renew license"
1127
  #~ msgstr "Renovar licencia"
1128
 
1129
- #~ msgid "Select All"
1130
- #~ msgstr "Seleccionar todo"
1131
-
1132
  #~ msgid "Deselect All"
1133
  #~ msgstr "Deseleccionar todo"
1134
 
@@ -1197,9 +1304,6 @@ msgstr "Ajustes"
1197
  #~ msgid "Theme Icon"
1198
  #~ msgstr "Icono del tema"
1199
 
1200
- #~ msgid "None"
1201
- #~ msgstr "Ninguno"
1202
-
1203
  #~ msgid "Field Title"
1204
  #~ msgstr "Campo de título"
1205
 
4
  msgstr ""
5
  "Project-Id-Version: YITH Plugin Starter 1.0.0 Plugin FW\n"
6
  "Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
7
+ "POT-Creation-Date: 2020-08-07 14:15:08+00:00\n"
8
+ "PO-Revision-Date: 2020-04-06 10:45+0200\n"
9
  "Last-Translator: \n"
10
  "Language-Team: Your Inspiration Themes <info@yithemes.com>\n"
11
  "Language: es_ES\n"
12
  "MIME-Version: 1.0\n"
13
  "Content-Type: text/plain; charset=UTF-8\n"
14
  "Content-Transfer-Encoding: 8bit\n"
15
+ "X-Generator: Poedit 2.2.1\n"
16
  "X-Poedit-KeywordsList: __;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;"
17
  "_nx_noop:1,2,3c;esc_attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;"
18
  "esc_html_x:1,2c\n"
22
  "X-Textdomain-Support: yes\n"
23
  "X-Poedit-SearchPath-0: .\n"
24
 
25
+ #: lib/yit-assets.php:102
26
+ msgid "Clear"
27
+ msgstr ""
28
+
29
+ #: lib/yit-assets.php:103
30
+ msgid "Clear color"
31
+ msgstr ""
32
+
33
+ #: lib/yit-assets.php:104
34
+ #, fuzzy
35
+ msgid "Default"
36
+ msgstr "Establecer por defecto"
37
+
38
+ #: lib/yit-assets.php:105
39
+ #, fuzzy
40
+ msgid "Select default color"
41
+ msgstr "Establecer por defecto"
42
+
43
+ #: lib/yit-assets.php:106
44
+ #, fuzzy
45
+ msgid "Select Color"
46
+ msgstr "Seleccionar todo"
47
+
48
+ #: lib/yit-assets.php:107
49
+ msgid "Color value"
50
+ msgstr ""
51
+
52
  #: lib/yit-cpt-unlimited.php:462 lib/yit-cpt-unlimited.php:576
53
  #: lib/yit-cpt-unlimited.php:721 lib/yit-cpt-unlimited.php:1636
54
  msgid "Add %s"
230
  msgid "Upload multiple files"
231
  msgstr "Cargar archivos múltiples"
232
 
233
+ #: lib/yit-plugin-panel-wc.php:426
234
  msgid "The changes you have made will be lost if you leave this page."
235
  msgstr "Los cambios que has hecho se perderán si abandonas esta página."
236
 
238
  msgid "Plugin Settings"
239
  msgstr "Ajustes del plugin"
240
 
241
+ #: lib/yit-plugin-panel.php:454 lib/yit-plugin-panel.php:457
242
  msgid "How to install premium version"
243
  msgstr "Cómo instalar la versión premium"
244
 
245
+ #: lib/yit-plugin-panel.php:617 lib/yit-plugin-subpanel.php:151
246
  #: templates/panel/woocommerce/woocommerce-form.php:14
247
  msgid "Save Changes"
248
  msgstr "Guardar cambios"
249
 
250
+ #: lib/yit-plugin-panel.php:621 lib/yit-plugin-subpanel.php:154
251
  #: templates/panel/woocommerce/woocommerce-form.php:17
252
  msgid ""
253
  "If you continue with this action, you will reset all options in this page."
254
  msgstr ""
255
  "Si sigues con esta acción, se reiniciarán todas las opciones en esta página."
256
 
257
+ #: lib/yit-plugin-panel.php:624 lib/yit-plugin-subpanel.php:156
258
  msgid "Reset to default"
259
  msgstr "Restablecer a predeterminado"
260
 
261
+ #: lib/yit-plugin-panel.php:625 lib/yit-plugin-subpanel.php:157
262
  #: templates/panel/woocommerce/woocommerce-form.php:21
263
  msgid "Are you sure?"
264
  msgstr "¿Estás seguro/a?"
265
 
266
+ #: lib/yit-plugin-panel.php:823
267
  msgid ""
268
  "The element you have entered already exists. Please, enter another name."
269
  msgstr ""
270
  "El elemento que has introducido ya existe. Por favor, introduce otro nombre."
271
 
272
+ #: lib/yit-plugin-panel.php:824
273
  msgid "Settings saved"
274
  msgstr "Ajustes guardados"
275
 
276
+ #: lib/yit-plugin-panel.php:825
277
  msgid "Settings reset"
278
  msgstr "Ajustes reiniciados"
279
 
280
+ #: lib/yit-plugin-panel.php:826
281
  msgid "Element deleted correctly."
282
  msgstr "Elemento borrado correctamente."
283
 
284
+ #: lib/yit-plugin-panel.php:827 lib/yit-plugin-panel.php:828
285
  msgid "Element updated correctly."
286
  msgstr "Elemento actualizado correctamente."
287
 
288
+ #: lib/yit-plugin-panel.php:829
289
  msgid "Database imported correctly."
290
  msgstr "Base de datos importada correctamente."
291
 
292
+ #: lib/yit-plugin-panel.php:830
293
  msgid "An error has occurred during import. Please try again."
294
  msgstr ""
295
  "Ha ocurrido un error durante la importación. Por favor, inténtalo de nuevo."
296
 
297
+ #: lib/yit-plugin-panel.php:831
298
  msgid "The added file is not valid."
299
  msgstr "El archivo añadido no es válido."
300
 
301
+ #: lib/yit-plugin-panel.php:832
302
  msgid "Sorry, import is disabled."
303
  msgstr "Lo sentimos, la importación está deshabilitada."
304
 
305
+ #: lib/yit-plugin-panel.php:833
306
  msgid "Sorting successful."
307
  msgstr "Clasificación fue realizada con éxito."
308
 
309
+ #: lib/yit-plugin-panel.php:1281
310
  msgid "We need your support"
311
  msgstr "Necesitamos tu ayuda"
312
 
313
+ #: lib/yit-plugin-panel.php:1282
314
  msgid "to keep updating and improving the plugin. Please,"
315
  msgstr "para seguir actualizando y mejora el plugin. Por favor,"
316
 
317
+ #: lib/yit-plugin-panel.php:1284
318
  msgid "help us by leaving a five-star rating"
319
  msgstr "ayúdanos dejando una valoración de 5 estrellas"
320
 
321
+ #: lib/yit-plugin-panel.php:1285
322
  msgid ":) Thanks!"
323
  msgstr ":) ¡Gracias!"
324
 
392
  "Ha ocurrido un error, lo que probablemente significa que el feed está caído. "
393
  "Inténtalo de nuevo más tarde."
394
 
395
+ #: lib/yith-system-status.php:111
396
  msgid "WordPress Version"
397
  msgstr "Versión de WordPress"
398
 
399
+ #: lib/yith-system-status.php:112
400
  msgid "WooCommerce Version"
401
  msgstr "Versión de WooCommerce"
402
 
403
+ #: lib/yith-system-status.php:113
404
  msgid "Available Memory"
405
  msgstr "Memoria disponible"
406
 
407
+ #: lib/yith-system-status.php:114
408
  msgid "PHP Version"
409
  msgstr "Versión PHP"
410
 
411
+ #: lib/yith-system-status.php:115
412
  msgid "TLS Version"
413
  msgstr "Versión TLS"
414
 
415
+ #: lib/yith-system-status.php:116
416
  msgid "WordPress Cron"
417
  msgstr "Cron de WordPress"
418
 
419
+ #: lib/yith-system-status.php:117
420
  msgid "SimpleXML"
421
  msgstr "SimpleXML"
422
 
423
+ #: lib/yith-system-status.php:118
424
  msgid "MultiByte String"
425
  msgstr "Cadena MultiByte"
426
 
427
+ #: lib/yith-system-status.php:119
428
  msgid "ImageMagick Version"
429
  msgstr "Versión ImageMagick"
430
 
431
+ #: lib/yith-system-status.php:120
432
  msgid "GD Library"
433
  msgstr "Biblioteca GD"
434
 
435
+ #: lib/yith-system-status.php:121
436
  msgid "Iconv Module"
437
  msgstr "Módulo Iconv"
438
 
439
+ #: lib/yith-system-status.php:122
440
  msgid "OPCache Save Comments"
441
  msgstr "Guardar comentarios OPCache"
442
 
443
+ #: lib/yith-system-status.php:123
444
  msgid "URL FOpen"
445
  msgstr "URL FOpen"
446
 
447
+ #: lib/yith-system-status.php:141 lib/yith-system-status.php:142
448
  msgid "System Status"
449
  msgstr "Estado del sistema"
450
 
451
+ #: lib/yith-system-status.php:184
452
  msgid "YITH Plugins"
453
  msgstr "Plugins de YITH"
454
 
455
+ #: lib/yith-system-status.php:192
456
  msgid "WooCommerce"
457
  msgstr "WooCommerce"
458
 
459
+ #: lib/yith-system-status.php:330
460
  msgid "Warning!"
461
  msgstr "¡Atención! "
462
 
463
+ #. translators: %1$s open link tag, %2$s open link tag
464
+ #: lib/yith-system-status.php:334
465
+ #, fuzzy
466
  msgid ""
467
+ "The system check has detected some compatibility issues on your installation."
468
+ "%1$sClick here%2$s to know more"
469
  msgstr ""
470
  "La comprobación del sistema ha detectado algunos errores en tu instalación. "
471
  "%sHaz clic aquí%s para saber más"
472
 
473
+ #: lib/yith-system-status.php:473
474
+ msgid "Enabled"
475
+ msgstr "Activado"
476
+
477
+ #: lib/yith-system-status.php:473
478
+ msgid "Disabled"
479
+ msgstr "Desactivado"
480
+
481
+ #: lib/yith-system-status.php:478
482
+ msgid "N/A"
483
+ msgstr "N/D"
484
+
485
+ #. translators: %1$s plugin name, %2$s requirement name
486
+ #: lib/yith-system-status.php:506
487
+ #, fuzzy
488
+ msgid "%1$s needs %2$s enabled"
489
+ msgstr "%s necesita %s enabled"
490
+
491
+ #. translators: %1$s plugin name, %2$s required memory amount
492
+ #: lib/yith-system-status.php:509
493
+ #, fuzzy
494
+ msgid "%1$s needs at least %2$s of available memory"
495
+ msgstr "%s necesita al menos %s de memoria disponible"
496
+
497
+ #. translators: %1$s plugin name, %2$s version number
498
+ #: lib/yith-system-status.php:512
499
+ #, fuzzy
500
+ msgid "%1$s needs at least %2$s version"
501
+ msgstr "%s necesita al menos la versión %s"
502
+
503
+ #: lib/yith-system-status.php:537
504
+ msgid ""
505
+ "Update it to the latest version in order to benefit of all new features and "
506
+ "security updates."
507
+ msgstr ""
508
+ "Actualízalo a la última versión para beneficiarte de todas las nuevas "
509
+ "características y actualizaciones de seguridad"
510
+
511
+ #: lib/yith-system-status.php:541 lib/yith-system-status.php:547
512
+ msgid "Contact your hosting company in order to update it."
513
+ msgstr "Contacta a tu compañía de hosting para actualizarlo."
514
+
515
+ #: lib/yith-system-status.php:545
516
+ #, fuzzy
517
+ msgid "Contact your hosting company in order to install it."
518
+ msgstr "Contacta a tu compañía de hosting para activarlo."
519
+
520
+ #. translators: %1$s code, %2$s file name
521
+ #: lib/yith-system-status.php:552
522
+ #, fuzzy
523
+ msgid "Remove %1$s from %2$s file"
524
+ msgstr "Eliminar %s del archivo %s"
525
+
526
+ #: lib/yith-system-status.php:560
527
+ msgid "Contact your hosting company in order to enable it."
528
+ msgstr "Contacta a tu compañía de hosting para activarlo."
529
+
530
+ #. translators: %1$s opening link tag, %2$s closing link tag
531
+ #: lib/yith-system-status.php:564 lib/yith-system-status.php:588
532
+ #, fuzzy
533
+ msgid ""
534
+ "Read more %1$shere%2$s or contact your hosting company in order to increase "
535
+ "it."
536
+ msgstr ""
537
+ "Lee más %s aquí%s o contacta a tu compañía de hosting para incrementarlo."
538
+
539
+ #. translators: %s recommended memory amount
540
+ #: lib/yith-system-status.php:585
541
+ msgid ""
542
+ "For optimal functioning of our plugins, we suggest setting at least %s of "
543
+ "available memory"
544
+ msgstr ""
545
+ "Para el optimo funcionamiento de los plugins, sugerimos configurar al menos "
546
+ "%s de memoria disponible"
547
+
548
+ #. translators: %1$s TLS label, %2$s cURL label
549
+ #: lib/yith-system-status.php:593
550
+ #, fuzzy
551
+ msgid ""
552
+ "The system check cannot determine which %1$s version is installed because "
553
+ "%2$s module is disabled. Ask your hosting company to enable it."
554
+ msgstr ""
555
+ "No podemos determinar qué versión <b>TLS</b> está instalada porque <b>cURL</"
556
+ "b> el módulo está desactivado. Solicita a tu compañía de hosting que lo "
557
+ "active."
558
+
559
+ #. translators: %1$s TLS label
560
+ #: lib/yith-system-status.php:596
561
+ msgid ""
562
+ "The system check cannot determine which %1$s version is installed due to a "
563
+ "connection issue between your site and our server."
564
+ msgstr ""
565
+
566
  #: templates/fields/ajax-customers.php:57
567
  msgid "Search Customers"
568
  msgstr "Buscar clientes"
693
  msgid "Reset Defaults"
694
  msgstr "Ajustes predeterminados"
695
 
696
+ #: templates/sysinfo/system-information-panel.php:39
697
  msgid "YITH System Information"
698
  msgstr "Información del sistema de YITH"
699
 
700
+ #: templates/sysinfo/system-information-panel.php:50
701
+ msgid "WP debug.log file"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
702
  msgstr ""
 
 
703
 
704
+ #: templates/sysinfo/system-information-panel.php:54
705
+ msgid "PHP error_log file"
 
 
 
706
  msgstr ""
 
707
 
708
+ #: templates/sysinfo/system-information-panel.php:59
709
+ #: templates/sysinfo/system-information-panel.php:83
710
+ msgid "Back to System panel"
711
+ msgstr "Volver al panel del Sistema"
 
 
 
 
 
 
 
712
 
713
+ #: templates/sysinfo/system-information-panel.php:96
714
+ msgid "Back to top"
715
+ msgstr "Volver arriba"
716
 
717
+ #: templates/sysinfo/system-information-panel.php:104
718
+ msgid "Site URL"
719
+ msgstr "URL del sitio"
720
 
721
+ #: templates/sysinfo/system-information-panel.php:112
722
+ msgid "Output IP Address"
723
+ msgstr "Salida Dirección IP"
724
 
725
+ #: templates/sysinfo/system-information-panel.php:120
726
+ msgid "Defined WP_CACHE"
 
 
727
  msgstr ""
 
 
 
728
 
729
+ #: templates/sysinfo/system-information-panel.php:123
730
+ msgid "Yes"
 
 
731
  msgstr ""
 
 
732
 
733
+ #: templates/sysinfo/system-information-panel.php:123
734
+ #, fuzzy
735
+ msgid "No"
736
+ msgstr "Ninguno"
737
+
738
+ #: templates/sysinfo/system-information-panel.php:159
739
  msgid "Show full PHPInfo"
740
  msgstr "Mostrar PHPInfo completa"
741
 
742
+ #: templates/sysinfo/system-information-panel.php:167
743
+ msgid "Show log files"
744
+ msgstr ""
 
 
 
 
745
 
746
  #: yit-plugin.php:194
747
  msgid "License"
825
  msgid "YITH"
826
  msgstr "YITH"
827
 
828
+ #: templates/fields/dimensions.php:16
829
+ msgctxt "Position in the \"Dimensions\" field"
830
+ msgid "Top"
831
+ msgstr ""
832
+
833
+ #: templates/fields/dimensions.php:17
834
+ msgctxt "Position in the \"Dimensions\" field"
835
+ msgid "Right"
836
+ msgstr ""
837
+
838
+ #: templates/fields/dimensions.php:18
839
+ msgctxt "Position in the \"Dimensions\" field"
840
+ msgid "Bottom"
841
+ msgstr ""
842
+
843
+ #: templates/fields/dimensions.php:19
844
+ msgctxt "Position in the \"Dimensions\" field"
845
+ msgid "Left"
846
+ msgstr ""
847
+
848
+ #: templates/fields/dimensions.php:117
849
+ msgctxt "Tooltip in the \"Dimensions\" field"
850
+ msgid "Link values together"
851
+ msgstr ""
852
+
853
  #: templates/fields/onoff.php:24
854
+ msgctxt "YES/NO button: use MAX 3 characters!"
855
+ msgid "YES"
856
+ msgstr "SI"
857
 
858
  #: templates/fields/onoff.php:25
859
+ msgctxt "YES/NO button: use MAX 3 characters!"
860
+ msgid "NO"
861
+ msgstr "NO"
862
 
863
  #: yit-plugin.php:83
864
  msgctxt "Plugin Row Meta"
885
  msgid "Settings"
886
  msgstr "Ajustes"
887
 
888
+ #~ msgid ""
889
+ #~ "<b>ImageMagick</b> module is not installed. Ask your hosting company to "
890
+ #~ "install it."
891
+ #~ msgstr ""
892
+ #~ "<b>ImageMagick</b> el módulo no está instalado. Solicita a tu compañia de "
893
+ #~ "hosting que lo instale."
894
+
895
+ #~ msgctxt "ON/OFF button: use MAX 3 characters!"
896
+ #~ msgid "ON"
897
+ #~ msgstr "ON"
898
+
899
+ #~ msgctxt "ON/OFF button: use MAX 3 characters!"
900
+ #~ msgid "OFF"
901
+ #~ msgstr "OFF"
902
+
903
  #~ msgid "An unexpected error occurred, please try again later. Thanks!"
904
  #~ msgstr ""
905
  #~ "Ha ocurrido un error inesperado, por favor, inténtalo de nuevo más tarde. "
1236
  #~ msgid "Renew license"
1237
  #~ msgstr "Renovar licencia"
1238
 
 
 
 
1239
  #~ msgid "Deselect All"
1240
  #~ msgstr "Deseleccionar todo"
1241
 
1304
  #~ msgid "Theme Icon"
1305
  #~ msgstr "Icono del tema"
1306
 
 
 
 
1307
  #~ msgid "Field Title"
1308
  #~ msgstr "Campo de título"
1309
 
plugin-fw/languages/yith-plugin-fw-it_IT.mo CHANGED
Binary file
plugin-fw/languages/yith-plugin-fw-it_IT.po CHANGED
@@ -4,15 +4,15 @@ msgid ""
4
  msgstr ""
5
  "Project-Id-Version: YITH Plugin Starter 1.0.0 Plugin FW\n"
6
  "Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
7
- "POT-Creation-Date: 2020-03-11 14:03:11+00:00\n"
8
- "PO-Revision-Date: 2020-01-10 16:23+0100\n"
9
  "Last-Translator: \n"
10
  "Language-Team: YIThemes <plugins@yithemes.com>\n"
11
  "Language: it_IT\n"
12
  "MIME-Version: 1.0\n"
13
  "Content-Type: text/plain; charset=UTF-8\n"
14
  "Content-Transfer-Encoding: 8bit\n"
15
- "X-Generator: Poedit 2.2.3\n"
16
  "X-Poedit-KeywordsList: __;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;"
17
  "_nx_noop:1,2,3c;esc_attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;"
18
  "esc_html_x:1,2c\n"
@@ -22,6 +22,30 @@ msgstr ""
22
  "X-Textdomain-Support: yes\n"
23
  "X-Poedit-SearchPath-0: .\n"
24
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  #: lib/yit-cpt-unlimited.php:462 lib/yit-cpt-unlimited.php:576
26
  #: lib/yit-cpt-unlimited.php:721 lib/yit-cpt-unlimited.php:1636
27
  msgid "Add %s"
@@ -202,7 +226,7 @@ msgstr "Aggiungi %s dalla immagini"
202
  msgid "Upload multiple files"
203
  msgstr "Carica file multipli"
204
 
205
- #: lib/yit-plugin-panel-wc.php:399
206
  msgid "The changes you have made will be lost if you leave this page."
207
  msgstr "Perderai tutti i cambiamenti effettuati se lasci questa pagina."
208
 
@@ -210,16 +234,16 @@ msgstr "Perderai tutti i cambiamenti effettuati se lasci questa pagina."
210
  msgid "Plugin Settings"
211
  msgstr "Impostazioni plugin"
212
 
213
- #: lib/yit-plugin-panel.php:425 lib/yit-plugin-panel.php:428
214
  msgid "How to install premium version"
215
  msgstr "Come installare la versione premium"
216
 
217
- #: lib/yit-plugin-panel.php:572 lib/yit-plugin-subpanel.php:151
218
  #: templates/panel/woocommerce/woocommerce-form.php:14
219
  msgid "Save Changes"
220
  msgstr "Salva modifiche"
221
 
222
- #: lib/yit-plugin-panel.php:575 lib/yit-plugin-subpanel.php:154
223
  #: templates/panel/woocommerce/woocommerce-form.php:17
224
  msgid ""
225
  "If you continue with this action, you will reset all options in this page."
@@ -227,69 +251,69 @@ msgstr ""
227
  "Se prosegui con questa azione, tutte le opzioni di questa pagina saranno "
228
  "reimpostate."
229
 
230
- #: lib/yit-plugin-panel.php:577 lib/yit-plugin-subpanel.php:156
231
  msgid "Reset to default"
232
  msgstr "Ripristina configurazione predefinita"
233
 
234
- #: lib/yit-plugin-panel.php:578 lib/yit-plugin-subpanel.php:157
235
  #: templates/panel/woocommerce/woocommerce-form.php:21
236
  msgid "Are you sure?"
237
  msgstr "Sei sicuro?"
238
 
239
- #: lib/yit-plugin-panel.php:776
240
  msgid ""
241
  "The element you have entered already exists. Please, enter another name."
242
  msgstr "L'elemento inserito esiste già. Per favore, inserisci un altro nome."
243
 
244
- #: lib/yit-plugin-panel.php:777
245
  msgid "Settings saved"
246
  msgstr "Impostazioni salvate"
247
 
248
- #: lib/yit-plugin-panel.php:778
249
  msgid "Settings reset"
250
  msgstr "Impostazioni azzerate"
251
 
252
- #: lib/yit-plugin-panel.php:779
253
  msgid "Element deleted correctly."
254
  msgstr "Elemento rimosso correttamente."
255
 
256
- #: lib/yit-plugin-panel.php:780 lib/yit-plugin-panel.php:781
257
  msgid "Element updated correctly."
258
  msgstr "Elemento aggiornato correttamente."
259
 
260
- #: lib/yit-plugin-panel.php:782
261
  msgid "Database imported correctly."
262
  msgstr "Database importato correttamente."
263
 
264
- #: lib/yit-plugin-panel.php:783
265
  msgid "An error has occurred during import. Please try again."
266
  msgstr "Si è verificato un errore durante l'importazione. Prova di nuovo."
267
 
268
- #: lib/yit-plugin-panel.php:784
269
  msgid "The added file is not valid."
270
  msgstr "Il file aggiunto non è valido."
271
 
272
- #: lib/yit-plugin-panel.php:785
273
  msgid "Sorry, import is disabled."
274
  msgstr "Ci dispiace, l'importazione è disabilitata."
275
 
276
- #: lib/yit-plugin-panel.php:786
277
  msgid "Sorting successful."
278
  msgstr "Ordinamento effettuato con successo."
279
 
280
- #: lib/yit-plugin-panel.php:1234
281
  msgid "We need your support"
282
  msgstr "Abbiamo bisogno del tuo sostegno"
283
 
284
- #: lib/yit-plugin-panel.php:1235
285
  msgid "to keep updating and improving the plugin. Please,"
286
  msgstr "per poter continuare ad aggiornare e migliorare il plugin."
287
 
288
- #: lib/yit-plugin-panel.php:1237
289
  msgid "help us by leaving a five-star rating"
290
- msgstr "Puoi darci una mano lasciando una recensione a 5 stelle"
291
 
292
- #: lib/yit-plugin-panel.php:1238
293
  msgid ":) Thanks!"
294
  msgstr ":) Grazie!"
295
 
@@ -360,81 +384,171 @@ msgstr ""
360
  "Si è verificato un errore probabilmente causato dal feed non disponibile. "
361
  "Riprova più tardi."
362
 
363
- #: lib/yith-system-status.php:105
364
  msgid "WordPress Version"
365
  msgstr "Versione di WordPress"
366
 
367
- #: lib/yith-system-status.php:106
368
  msgid "WooCommerce Version"
369
  msgstr "Versione di WooCommerce"
370
 
371
- #: lib/yith-system-status.php:107
372
  msgid "Available Memory"
373
  msgstr "Memoria disponibile"
374
 
375
- #: lib/yith-system-status.php:108
376
  msgid "PHP Version"
377
  msgstr "Versione PHP"
378
 
379
- #: lib/yith-system-status.php:109
380
  msgid "TLS Version"
381
  msgstr "Versione TLS"
382
 
383
- #: lib/yith-system-status.php:110
384
  msgid "WordPress Cron"
385
  msgstr "Cron WordPress"
386
 
387
- #: lib/yith-system-status.php:111
388
  msgid "SimpleXML"
389
  msgstr "SimpleXML"
390
 
391
- #: lib/yith-system-status.php:112
392
  msgid "MultiByte String"
393
  msgstr "MultiByte String"
394
 
395
- #: lib/yith-system-status.php:113
396
  msgid "ImageMagick Version"
397
  msgstr "Versione di ImageMagick"
398
 
399
- #: lib/yith-system-status.php:114
400
  msgid "GD Library"
401
  msgstr "GD Library"
402
 
403
- #: lib/yith-system-status.php:115
404
  msgid "Iconv Module"
405
  msgstr "Iconv Module"
406
 
407
- #: lib/yith-system-status.php:116
408
  msgid "OPCache Save Comments"
409
  msgstr "OPCache Save Comments"
410
 
411
- #: lib/yith-system-status.php:117
412
  msgid "URL FOpen"
413
  msgstr "URL FOpen"
414
 
415
- #: lib/yith-system-status.php:135 lib/yith-system-status.php:136
416
  msgid "System Status"
417
  msgstr "Stato del sistema"
418
 
419
- #: lib/yith-system-status.php:179
420
  msgid "YITH Plugins"
421
  msgstr "Plugin YITH"
422
 
423
- #: lib/yith-system-status.php:180
424
  msgid "WooCommerce"
425
  msgstr "WooCommerce"
426
 
427
- #: lib/yith-system-status.php:297
428
  msgid "Warning!"
429
  msgstr "Attenzione!"
430
 
431
- #: lib/yith-system-status.php:298
 
432
  msgid ""
433
- "The system check has detected some compatibility issues on your "
434
- "installation. %sClick here%s to know more"
435
  msgstr ""
436
  "Il controllo di sistema ha individuato delle incompatibilità con la tua "
437
- "installazione. %sVedi qui%s per maggiori informazioni"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
438
 
439
  #: templates/fields/ajax-customers.php:57
440
  msgid "Search Customers"
@@ -566,115 +680,60 @@ msgstr "(Default: <i %s></i> )"
566
  msgid "Reset Defaults"
567
  msgstr "Ripristina impostazioni iniziali"
568
 
569
- #: templates/sysinfo/system-information-panel.php:30
570
  msgid "YITH System Information"
571
  msgstr "YITH System Information"
572
 
573
- #: templates/sysinfo/system-information-panel.php:38
574
- msgid "Site URL"
575
- msgstr "URL del sito"
576
-
577
- #: templates/sysinfo/system-information-panel.php:46
578
- msgid "Output IP Address"
579
- msgstr "Indirizzo IP di output"
580
 
581
- #: templates/sysinfo/system-information-panel.php:76
582
- msgid "Enabled"
583
- msgstr "Abilitato"
584
-
585
- #: templates/sysinfo/system-information-panel.php:76
586
- msgid "Disabled"
587
- msgstr "Disabilitato"
588
 
589
- #: templates/sysinfo/system-information-panel.php:82
590
- msgid "N/A"
591
- msgstr "N.D."
 
592
 
593
  #: templates/sysinfo/system-information-panel.php:96
594
- msgid "%s needs %s enabled"
595
- msgstr "%s necessita l'attivazione di %s"
596
-
597
- #: templates/sysinfo/system-information-panel.php:98
598
- msgid "%s needs at least %s of available memory"
599
- msgstr "%s necessita almeno %s di memoria disponibile"
600
-
601
- #: templates/sysinfo/system-information-panel.php:100
602
- #: templates/sysinfo/system-information-panel.php:149
603
- msgid ""
604
- "For optimal functioning of our plugins, we suggest setting at least %s of "
605
- "available memory"
606
- msgstr ""
607
- "Per il funzionamento ottimale dei nostri plugin consigliamo di impostare "
608
- "almeno %s della memoria disponibile"
609
-
610
- #: templates/sysinfo/system-information-panel.php:102
611
- #: templates/sysinfo/system-information-panel.php:137
612
- #: templates/sysinfo/system-information-panel.php:151
613
- msgid ""
614
- "Read more %s here%s or contact your hosting company in order to increase it."
615
- msgstr ""
616
- "Per maggiori informazioni %s leggi questo%s oppure contatta il tuo host per "
617
- "un upgrade."
618
-
619
- #: templates/sysinfo/system-information-panel.php:105
620
- msgid "%s needs at least %s version"
621
- msgstr "%s necessita almeno della versione %s"
622
-
623
- #: templates/sysinfo/system-information-panel.php:116
624
- msgid ""
625
- "Update it to the latest version in order to benefit of all new features and "
626
- "security updates."
627
- msgstr ""
628
- "Aggiorna all'ultima versione per beneficiare di tutte le nuove funzionalità "
629
- "e degli aggiornamenti di sicurezza."
630
 
631
- #: templates/sysinfo/system-information-panel.php:122
632
- msgid "Contact your hosting company in order to update it."
633
- msgstr "Contatta il tuo servizio hosting per aggiornarlo."
634
 
635
- #: templates/sysinfo/system-information-panel.php:126
636
- msgid "Remove %s from %s file"
637
- msgstr "Rimuovi %s dal file %s"
638
 
639
- #: templates/sysinfo/system-information-panel.php:134
640
- msgid "Contact your hosting company in order to enable it."
641
- msgstr "Per attivarlo contatta il tuo servizio di hosting."
642
 
643
- #: templates/sysinfo/system-information-panel.php:157
644
- msgid ""
645
- "We cannot determine which <b>TLS</b> version is installed because <b>cURL</"
646
- "b> module is disabled. Ask your hosting company to enable it."
647
- msgstr ""
648
- "Non ci è stato possibile determinare quale versione <b>TLS</b> è installata "
649
- "in quanto il modulo <b>cURL</b> è disattivato. Chiedi al tuo servizio "
650
- "hosting di attivarlo."
651
 
652
- #: templates/sysinfo/system-information-panel.php:160
653
- msgid ""
654
- "<b>ImageMagick</b> module is not installed. Ask your hosting company to "
655
- "install it."
656
- msgstr ""
657
- "Il modulo <b>ImageMagick</b> non è installato. Chiedi al tuo servizio di "
658
- "hosting di installarlo."
659
 
660
- #: templates/sysinfo/system-information-panel.php:172
661
  msgid "Show full PHPInfo"
662
  msgstr "Mostra tutto il contenuto di PHPInfo"
663
 
664
- #: templates/sysinfo/system-information-panel.php:176
665
- msgid "Back to System panel"
666
- msgstr "Torna al pannello di Sistema"
667
-
668
- #: templates/sysinfo/system-information-panel.php:193
669
- msgid "Back to top"
670
- msgstr "Torna su"
671
 
672
  #: yit-plugin.php:194
673
  msgid "License"
674
  msgstr "Chiave di licenza"
675
 
676
  #. Author of the plugin/theme
677
- #, fuzzy
678
  msgid "YITH"
679
  msgstr "YITH"
680
 
@@ -751,14 +810,39 @@ msgctxt "[gutenberg]: Category Name"
751
  msgid "YITH"
752
  msgstr "YITH"
753
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
754
  #: templates/fields/onoff.php:24
755
- msgctxt "ON/OFF button: use MAX 3 characters!"
756
- msgid "ON"
757
  msgstr "SÌ"
758
 
759
  #: templates/fields/onoff.php:25
760
- msgctxt "ON/OFF button: use MAX 3 characters!"
761
- msgid "OFF"
762
  msgstr "NO"
763
 
764
  #: yit-plugin.php:83
@@ -786,6 +870,21 @@ msgctxt "Action links"
786
  msgid "Settings"
787
  msgstr "Impostazioni"
788
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
789
  #~ msgid "An unexpected error occurred, please try again later. Thanks!"
790
  #~ msgstr "Si è verificato un errore inaspettato, riprova più tardi. Grazie!"
791
 
@@ -1108,9 +1207,6 @@ msgstr "Impostazioni"
1108
  #~ msgid "Renew license"
1109
  #~ msgstr "Rinnova la licenza"
1110
 
1111
- #~ msgid "Select All"
1112
- #~ msgstr "Seleziona tutto"
1113
-
1114
  #~ msgid "Deselect All"
1115
  #~ msgstr "Deseleziona tutto"
1116
 
@@ -1180,9 +1276,6 @@ msgstr "Impostazioni"
1180
  #~ msgid "Theme Icon"
1181
  #~ msgstr "Icona tema"
1182
 
1183
- #~ msgid "None"
1184
- #~ msgstr "Nessuno"
1185
-
1186
  #~ msgid "Field Title"
1187
  #~ msgstr "Titolo campo"
1188
 
4
  msgstr ""
5
  "Project-Id-Version: YITH Plugin Starter 1.0.0 Plugin FW\n"
6
  "Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
7
+ "POT-Creation-Date: 2020-08-07 14:15:08+00:00\n"
8
+ "PO-Revision-Date: 2020-08-10 19:15+0200\n"
9
  "Last-Translator: \n"
10
  "Language-Team: YIThemes <plugins@yithemes.com>\n"
11
  "Language: it_IT\n"
12
  "MIME-Version: 1.0\n"
13
  "Content-Type: text/plain; charset=UTF-8\n"
14
  "Content-Transfer-Encoding: 8bit\n"
15
+ "X-Generator: Poedit 2.3.1\n"
16
  "X-Poedit-KeywordsList: __;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;"
17
  "_nx_noop:1,2,3c;esc_attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;"
18
  "esc_html_x:1,2c\n"
22
  "X-Textdomain-Support: yes\n"
23
  "X-Poedit-SearchPath-0: .\n"
24
 
25
+ #: lib/yit-assets.php:102
26
+ msgid "Clear"
27
+ msgstr "Cancella"
28
+
29
+ #: lib/yit-assets.php:103
30
+ msgid "Clear color"
31
+ msgstr "Cancella colore"
32
+
33
+ #: lib/yit-assets.php:104
34
+ msgid "Default"
35
+ msgstr "Predefinito"
36
+
37
+ #: lib/yit-assets.php:105
38
+ msgid "Select default color"
39
+ msgstr "Imposta colore predefinito"
40
+
41
+ #: lib/yit-assets.php:106
42
+ msgid "Select Color"
43
+ msgstr "Seleziona colore"
44
+
45
+ #: lib/yit-assets.php:107
46
+ msgid "Color value"
47
+ msgstr "Colore"
48
+
49
  #: lib/yit-cpt-unlimited.php:462 lib/yit-cpt-unlimited.php:576
50
  #: lib/yit-cpt-unlimited.php:721 lib/yit-cpt-unlimited.php:1636
51
  msgid "Add %s"
226
  msgid "Upload multiple files"
227
  msgstr "Carica file multipli"
228
 
229
+ #: lib/yit-plugin-panel-wc.php:426
230
  msgid "The changes you have made will be lost if you leave this page."
231
  msgstr "Perderai tutti i cambiamenti effettuati se lasci questa pagina."
232
 
234
  msgid "Plugin Settings"
235
  msgstr "Impostazioni plugin"
236
 
237
+ #: lib/yit-plugin-panel.php:454 lib/yit-plugin-panel.php:457
238
  msgid "How to install premium version"
239
  msgstr "Come installare la versione premium"
240
 
241
+ #: lib/yit-plugin-panel.php:617 lib/yit-plugin-subpanel.php:151
242
  #: templates/panel/woocommerce/woocommerce-form.php:14
243
  msgid "Save Changes"
244
  msgstr "Salva modifiche"
245
 
246
+ #: lib/yit-plugin-panel.php:621 lib/yit-plugin-subpanel.php:154
247
  #: templates/panel/woocommerce/woocommerce-form.php:17
248
  msgid ""
249
  "If you continue with this action, you will reset all options in this page."
251
  "Se prosegui con questa azione, tutte le opzioni di questa pagina saranno "
252
  "reimpostate."
253
 
254
+ #: lib/yit-plugin-panel.php:624 lib/yit-plugin-subpanel.php:156
255
  msgid "Reset to default"
256
  msgstr "Ripristina configurazione predefinita"
257
 
258
+ #: lib/yit-plugin-panel.php:625 lib/yit-plugin-subpanel.php:157
259
  #: templates/panel/woocommerce/woocommerce-form.php:21
260
  msgid "Are you sure?"
261
  msgstr "Sei sicuro?"
262
 
263
+ #: lib/yit-plugin-panel.php:823
264
  msgid ""
265
  "The element you have entered already exists. Please, enter another name."
266
  msgstr "L'elemento inserito esiste già. Per favore, inserisci un altro nome."
267
 
268
+ #: lib/yit-plugin-panel.php:824
269
  msgid "Settings saved"
270
  msgstr "Impostazioni salvate"
271
 
272
+ #: lib/yit-plugin-panel.php:825
273
  msgid "Settings reset"
274
  msgstr "Impostazioni azzerate"
275
 
276
+ #: lib/yit-plugin-panel.php:826
277
  msgid "Element deleted correctly."
278
  msgstr "Elemento rimosso correttamente."
279
 
280
+ #: lib/yit-plugin-panel.php:827 lib/yit-plugin-panel.php:828
281
  msgid "Element updated correctly."
282
  msgstr "Elemento aggiornato correttamente."
283
 
284
+ #: lib/yit-plugin-panel.php:829
285
  msgid "Database imported correctly."
286
  msgstr "Database importato correttamente."
287
 
288
+ #: lib/yit-plugin-panel.php:830
289
  msgid "An error has occurred during import. Please try again."
290
  msgstr "Si è verificato un errore durante l'importazione. Prova di nuovo."
291
 
292
+ #: lib/yit-plugin-panel.php:831
293
  msgid "The added file is not valid."
294
  msgstr "Il file aggiunto non è valido."
295
 
296
+ #: lib/yit-plugin-panel.php:832
297
  msgid "Sorry, import is disabled."
298
  msgstr "Ci dispiace, l'importazione è disabilitata."
299
 
300
+ #: lib/yit-plugin-panel.php:833
301
  msgid "Sorting successful."
302
  msgstr "Ordinamento effettuato con successo."
303
 
304
+ #: lib/yit-plugin-panel.php:1281
305
  msgid "We need your support"
306
  msgstr "Abbiamo bisogno del tuo sostegno"
307
 
308
+ #: lib/yit-plugin-panel.php:1282
309
  msgid "to keep updating and improving the plugin. Please,"
310
  msgstr "per poter continuare ad aggiornare e migliorare il plugin."
311
 
312
+ #: lib/yit-plugin-panel.php:1284
313
  msgid "help us by leaving a five-star rating"
314
+ msgstr "puoi darci una mano lasciando una recensione a 5 stelle"
315
 
316
+ #: lib/yit-plugin-panel.php:1285
317
  msgid ":) Thanks!"
318
  msgstr ":) Grazie!"
319
 
384
  "Si è verificato un errore probabilmente causato dal feed non disponibile. "
385
  "Riprova più tardi."
386
 
387
+ #: lib/yith-system-status.php:111
388
  msgid "WordPress Version"
389
  msgstr "Versione di WordPress"
390
 
391
+ #: lib/yith-system-status.php:112
392
  msgid "WooCommerce Version"
393
  msgstr "Versione di WooCommerce"
394
 
395
+ #: lib/yith-system-status.php:113
396
  msgid "Available Memory"
397
  msgstr "Memoria disponibile"
398
 
399
+ #: lib/yith-system-status.php:114
400
  msgid "PHP Version"
401
  msgstr "Versione PHP"
402
 
403
+ #: lib/yith-system-status.php:115
404
  msgid "TLS Version"
405
  msgstr "Versione TLS"
406
 
407
+ #: lib/yith-system-status.php:116
408
  msgid "WordPress Cron"
409
  msgstr "Cron WordPress"
410
 
411
+ #: lib/yith-system-status.php:117
412
  msgid "SimpleXML"
413
  msgstr "SimpleXML"
414
 
415
+ #: lib/yith-system-status.php:118
416
  msgid "MultiByte String"
417
  msgstr "MultiByte String"
418
 
419
+ #: lib/yith-system-status.php:119
420
  msgid "ImageMagick Version"
421
  msgstr "Versione di ImageMagick"
422
 
423
+ #: lib/yith-system-status.php:120
424
  msgid "GD Library"
425
  msgstr "GD Library"
426
 
427
+ #: lib/yith-system-status.php:121
428
  msgid "Iconv Module"
429
  msgstr "Iconv Module"
430
 
431
+ #: lib/yith-system-status.php:122
432
  msgid "OPCache Save Comments"
433
  msgstr "OPCache Save Comments"
434
 
435
+ #: lib/yith-system-status.php:123
436
  msgid "URL FOpen"
437
  msgstr "URL FOpen"
438
 
439
+ #: lib/yith-system-status.php:141 lib/yith-system-status.php:142
440
  msgid "System Status"
441
  msgstr "Stato del sistema"
442
 
443
+ #: lib/yith-system-status.php:184
444
  msgid "YITH Plugins"
445
  msgstr "Plugin YITH"
446
 
447
+ #: lib/yith-system-status.php:192
448
  msgid "WooCommerce"
449
  msgstr "WooCommerce"
450
 
451
+ #: lib/yith-system-status.php:330
452
  msgid "Warning!"
453
  msgstr "Attenzione!"
454
 
455
+ #. translators: %1$s open link tag, %2$s open link tag
456
+ #: lib/yith-system-status.php:334
457
  msgid ""
458
+ "The system check has detected some compatibility issues on your installation."
459
+ "%1$sClick here%2$s to know more"
460
  msgstr ""
461
  "Il controllo di sistema ha individuato delle incompatibilità con la tua "
462
+ "installazione. %1$sVedi qui%2$s per maggiori dettagli"
463
+
464
+ #: lib/yith-system-status.php:473
465
+ msgid "Enabled"
466
+ msgstr "Abilitato"
467
+
468
+ #: lib/yith-system-status.php:473
469
+ msgid "Disabled"
470
+ msgstr "Disabilitato"
471
+
472
+ #: lib/yith-system-status.php:478
473
+ msgid "N/A"
474
+ msgstr "n.a."
475
+
476
+ #. translators: %1$s plugin name, %2$s requirement name
477
+ #: lib/yith-system-status.php:506
478
+ msgid "%1$s needs %2$s enabled"
479
+ msgstr "%1$s necessita dell'attivazione di %2$s"
480
+
481
+ #. translators: %1$s plugin name, %2$s required memory amount
482
+ #: lib/yith-system-status.php:509
483
+ msgid "%1$s needs at least %2$s of available memory"
484
+ msgstr "%1$s necessita di almeno %2$s di memoria disponibile"
485
+
486
+ #. translators: %1$s plugin name, %2$s version number
487
+ #: lib/yith-system-status.php:512
488
+ msgid "%1$s needs at least %2$s version"
489
+ msgstr "%1$s necessita almeno della versione %2$s"
490
+
491
+ #: lib/yith-system-status.php:537
492
+ msgid ""
493
+ "Update it to the latest version in order to benefit of all new features and "
494
+ "security updates."
495
+ msgstr ""
496
+ "Aggiorna all'ultima versione per beneficiare di tutte le nuove funzionalità "
497
+ "e degli aggiornamenti di sicurezza."
498
+
499
+ #: lib/yith-system-status.php:541 lib/yith-system-status.php:547
500
+ msgid "Contact your hosting company in order to update it."
501
+ msgstr "Contatta il tuo servizio hosting per aggiornarlo."
502
+
503
+ #: lib/yith-system-status.php:545
504
+ msgid "Contact your hosting company in order to install it."
505
+ msgstr "Per installarlo contatta il tuo servizio di hosting."
506
+
507
+ #. translators: %1$s code, %2$s file name
508
+ #: lib/yith-system-status.php:552
509
+ msgid "Remove %1$s from %2$s file"
510
+ msgstr "Rimuovi %1$s dal file %2$s"
511
+
512
+ #: lib/yith-system-status.php:560
513
+ msgid "Contact your hosting company in order to enable it."
514
+ msgstr "Per attivarlo contatta il tuo servizio di hosting."
515
+
516
+ #. translators: %1$s opening link tag, %2$s closing link tag
517
+ #: lib/yith-system-status.php:564 lib/yith-system-status.php:588
518
+ msgid ""
519
+ "Read more %1$shere%2$s or contact your hosting company in order to increase "
520
+ "it."
521
+ msgstr ""
522
+ "Per maggiori informazioni %1$sleggi questo%2$s oppure contatta il tuo host "
523
+ "per un upgrade."
524
+
525
+ #. translators: %s recommended memory amount
526
+ #: lib/yith-system-status.php:585
527
+ msgid ""
528
+ "For optimal functioning of our plugins, we suggest setting at least %s of "
529
+ "available memory"
530
+ msgstr ""
531
+ "Per il funzionamento ottimale dei nostri plugin consigliamo di impostare "
532
+ "almeno %s della memoria disponibile"
533
+
534
+ #. translators: %1$s TLS label, %2$s cURL label
535
+ #: lib/yith-system-status.php:593
536
+ msgid ""
537
+ "The system check cannot determine which %1$s version is installed because "
538
+ "%2$s module is disabled. Ask your hosting company to enable it."
539
+ msgstr ""
540
+ "Non ci è stato possibile determinare quale versione di %1$s è installata in "
541
+ "quanto il modulo %2$s è disattivato. Chiedi al tuo servizio hosting di "
542
+ "attivarlo."
543
+
544
+ #. translators: %1$s TLS label
545
+ #: lib/yith-system-status.php:596
546
+ msgid ""
547
+ "The system check cannot determine which %1$s version is installed due to a "
548
+ "connection issue between your site and our server."
549
+ msgstr ""
550
+ "Non ci è stato possibile determinare quale versione di %1$s è installata a "
551
+ "causa di un problema di connessione fra il tuo sito e il nostro server."
552
 
553
  #: templates/fields/ajax-customers.php:57
554
  msgid "Search Customers"
680
  msgid "Reset Defaults"
681
  msgstr "Ripristina impostazioni iniziali"
682
 
683
+ #: templates/sysinfo/system-information-panel.php:39
684
  msgid "YITH System Information"
685
  msgstr "YITH System Information"
686
 
687
+ #: templates/sysinfo/system-information-panel.php:50
688
+ msgid "WP debug.log file"
689
+ msgstr "WP debug.log file"
 
 
 
 
690
 
691
+ #: templates/sysinfo/system-information-panel.php:54
692
+ msgid "PHP error_log file"
693
+ msgstr "PHP error_log file"
 
 
 
 
694
 
695
+ #: templates/sysinfo/system-information-panel.php:59
696
+ #: templates/sysinfo/system-information-panel.php:83
697
+ msgid "Back to System panel"
698
+ msgstr "Torna al pannello di Sistema"
699
 
700
  #: templates/sysinfo/system-information-panel.php:96
701
+ msgid "Back to top"
702
+ msgstr "Torna su"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
703
 
704
+ #: templates/sysinfo/system-information-panel.php:104
705
+ msgid "Site URL"
706
+ msgstr "URL del sito"
707
 
708
+ #: templates/sysinfo/system-information-panel.php:112
709
+ msgid "Output IP Address"
710
+ msgstr "Indirizzo IP di output"
711
 
712
+ #: templates/sysinfo/system-information-panel.php:120
713
+ msgid "Defined WP_CACHE"
714
+ msgstr "Defined WP_CACHE"
715
 
716
+ #: templates/sysinfo/system-information-panel.php:123
717
+ msgid "Yes"
718
+ msgstr "Sì"
 
 
 
 
 
719
 
720
+ #: templates/sysinfo/system-information-panel.php:123
721
+ msgid "No"
722
+ msgstr "No"
 
 
 
 
723
 
724
+ #: templates/sysinfo/system-information-panel.php:159
725
  msgid "Show full PHPInfo"
726
  msgstr "Mostra tutto il contenuto di PHPInfo"
727
 
728
+ #: templates/sysinfo/system-information-panel.php:167
729
+ msgid "Show log files"
730
+ msgstr "Mostra i log"
 
 
 
 
731
 
732
  #: yit-plugin.php:194
733
  msgid "License"
734
  msgstr "Chiave di licenza"
735
 
736
  #. Author of the plugin/theme
 
737
  msgid "YITH"
738
  msgstr "YITH"
739
 
810
  msgid "YITH"
811
  msgstr "YITH"
812
 
813
+ #: templates/fields/dimensions.php:16
814
+ msgctxt "Position in the \"Dimensions\" field"
815
+ msgid "Top"
816
+ msgstr "In alto"
817
+
818
+ #: templates/fields/dimensions.php:17
819
+ msgctxt "Position in the \"Dimensions\" field"
820
+ msgid "Right"
821
+ msgstr "A destra"
822
+
823
+ #: templates/fields/dimensions.php:18
824
+ msgctxt "Position in the \"Dimensions\" field"
825
+ msgid "Bottom"
826
+ msgstr "In basso"
827
+
828
+ #: templates/fields/dimensions.php:19
829
+ msgctxt "Position in the \"Dimensions\" field"
830
+ msgid "Left"
831
+ msgstr "A sinistra"
832
+
833
+ #: templates/fields/dimensions.php:117
834
+ msgctxt "Tooltip in the \"Dimensions\" field"
835
+ msgid "Link values together"
836
+ msgstr "Collega i valori"
837
+
838
  #: templates/fields/onoff.php:24
839
+ msgctxt "YES/NO button: use MAX 3 characters!"
840
+ msgid "YES"
841
  msgstr "SÌ"
842
 
843
  #: templates/fields/onoff.php:25
844
+ msgctxt "YES/NO button: use MAX 3 characters!"
845
+ msgid "NO"
846
  msgstr "NO"
847
 
848
  #: yit-plugin.php:83
870
  msgid "Settings"
871
  msgstr "Impostazioni"
872
 
873
+ #~ msgid ""
874
+ #~ "<b>ImageMagick</b> module is not installed. Ask your hosting company to "
875
+ #~ "install it."
876
+ #~ msgstr ""
877
+ #~ "Il modulo <b>ImageMagick</b> non è installato. Chiedi al tuo servizio di "
878
+ #~ "hosting di installarlo."
879
+
880
+ #~ msgctxt "ON/OFF button: use MAX 3 characters!"
881
+ #~ msgid "ON"
882
+ #~ msgstr "SÌ"
883
+
884
+ #~ msgctxt "ON/OFF button: use MAX 3 characters!"
885
+ #~ msgid "OFF"
886
+ #~ msgstr "NO"
887
+
888
  #~ msgid "An unexpected error occurred, please try again later. Thanks!"
889
  #~ msgstr "Si è verificato un errore inaspettato, riprova più tardi. Grazie!"
890
 
1207
  #~ msgid "Renew license"
1208
  #~ msgstr "Rinnova la licenza"
1209
 
 
 
 
1210
  #~ msgid "Deselect All"
1211
  #~ msgstr "Deseleziona tutto"
1212
 
1276
  #~ msgid "Theme Icon"
1277
  #~ msgstr "Icona tema"
1278
 
 
 
 
1279
  #~ msgid "Field Title"
1280
  #~ msgstr "Titolo campo"
1281
 
plugin-fw/languages/yith-plugin-fw-nl_NL.mo CHANGED
Binary file
plugin-fw/languages/yith-plugin-fw-nl_NL.po CHANGED
@@ -4,15 +4,15 @@ msgid ""
4
  msgstr ""
5
  "Project-Id-Version: YITH Plugin Starter 1.0.0 Plugin FW\n"
6
  "Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
7
- "POT-Creation-Date: 2020-03-11 14:03:11+00:00\n"
8
- "PO-Revision-Date: 2020-01-14 10:29+0000\n"
9
  "Last-Translator: \n"
10
  "Language-Team: Your Inspiration Themes <info@yithemes.com>\n"
11
  "Language: nl\n"
12
  "MIME-Version: 1.0\n"
13
  "Content-Type: text/plain; charset=UTF-8\n"
14
  "Content-Transfer-Encoding: 8bit\n"
15
- "X-Generator: Poedit 1.8.12\n"
16
  "X-Poedit-KeywordsList: __;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;"
17
  "_nx_noop:1,2,3c;esc_attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;"
18
  "esc_html_x:1,2c;_x;_ex\n"
@@ -22,6 +22,33 @@ msgstr ""
22
  "X-Textdomain-Support: yes\n"
23
  "X-Poedit-SearchPath-0: .\n"
24
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  #: lib/yit-cpt-unlimited.php:462 lib/yit-cpt-unlimited.php:576
26
  #: lib/yit-cpt-unlimited.php:721 lib/yit-cpt-unlimited.php:1636
27
  msgid "Add %s"
@@ -206,7 +233,7 @@ msgstr "Voeg %s toe vanaf afbeeldingen"
206
  msgid "Upload multiple files"
207
  msgstr "Upload meerdere bestanden"
208
 
209
- #: lib/yit-plugin-panel-wc.php:399
210
  msgid "The changes you have made will be lost if you leave this page."
211
  msgstr "Als je deze pagina verlaat zullen alle wijzigingen verloren gaan."
212
 
@@ -214,84 +241,84 @@ msgstr "Als je deze pagina verlaat zullen alle wijzigingen verloren gaan."
214
  msgid "Plugin Settings"
215
  msgstr "Plugin instellingen"
216
 
217
- #: lib/yit-plugin-panel.php:425 lib/yit-plugin-panel.php:428
218
  msgid "How to install premium version"
219
  msgstr "Hoe installeer ik de premium versie"
220
 
221
- #: lib/yit-plugin-panel.php:572 lib/yit-plugin-subpanel.php:151
222
  #: templates/panel/woocommerce/woocommerce-form.php:14
223
  msgid "Save Changes"
224
  msgstr "Wijzigingen opslaan"
225
 
226
- #: lib/yit-plugin-panel.php:575 lib/yit-plugin-subpanel.php:154
227
  #: templates/panel/woocommerce/woocommerce-form.php:17
228
  msgid ""
229
  "If you continue with this action, you will reset all options in this page."
230
  msgstr "Als u deze actie voortzet, zult u alle opties op deze pagina resetten."
231
 
232
- #: lib/yit-plugin-panel.php:577 lib/yit-plugin-subpanel.php:156
233
  msgid "Reset to default"
234
  msgstr "Resetten naar standaard"
235
 
236
- #: lib/yit-plugin-panel.php:578 lib/yit-plugin-subpanel.php:157
237
  #: templates/panel/woocommerce/woocommerce-form.php:21
238
  msgid "Are you sure?"
239
  msgstr "Weet u het zeker?"
240
 
241
- #: lib/yit-plugin-panel.php:776
242
  msgid ""
243
  "The element you have entered already exists. Please, enter another name."
244
  msgstr "Het element dat u hebt ingevoerd bestaat al. Voer een andere naam in."
245
 
246
- #: lib/yit-plugin-panel.php:777
247
  msgid "Settings saved"
248
  msgstr "Instellingen opgeslagen"
249
 
250
- #: lib/yit-plugin-panel.php:778
251
  msgid "Settings reset"
252
  msgstr "Instellingen resetten"
253
 
254
- #: lib/yit-plugin-panel.php:779
255
  msgid "Element deleted correctly."
256
  msgstr "Element succesvol verwijderd."
257
 
258
- #: lib/yit-plugin-panel.php:780 lib/yit-plugin-panel.php:781
259
  msgid "Element updated correctly."
260
  msgstr "Element juist bijgewerkt."
261
 
262
- #: lib/yit-plugin-panel.php:782
263
  msgid "Database imported correctly."
264
  msgstr "Database juist geïmporteerd."
265
 
266
- #: lib/yit-plugin-panel.php:783
267
  msgid "An error has occurred during import. Please try again."
268
  msgstr "Er is een fout opgetreden tijdens importeren. Probeer opnieuw."
269
 
270
- #: lib/yit-plugin-panel.php:784
271
  msgid "The added file is not valid."
272
  msgstr "Het toegevoegde bestand is ongeldig."
273
 
274
- #: lib/yit-plugin-panel.php:785
275
  msgid "Sorry, import is disabled."
276
  msgstr "Sorry, importeren is uitgeschakeld."
277
 
278
- #: lib/yit-plugin-panel.php:786
279
  msgid "Sorting successful."
280
  msgstr "Sorteren succesvol."
281
 
282
- #: lib/yit-plugin-panel.php:1234
283
  msgid "We need your support"
284
  msgstr "We hebben uw hulp nodig"
285
 
286
- #: lib/yit-plugin-panel.php:1235
287
  msgid "to keep updating and improving the plugin. Please,"
288
  msgstr "om de plugin te blijven updaten en verbeteren. A.u.b.,"
289
 
290
- #: lib/yit-plugin-panel.php:1237
291
  msgid "help us by leaving a five-star rating"
292
  msgstr "help ons door een vijf-sterenbeoordeling achter te laten"
293
 
294
- #: lib/yit-plugin-panel.php:1238
295
  msgid ":) Thanks!"
296
  msgstr ":) Bedankt!"
297
 
@@ -362,82 +389,178 @@ msgstr ""
362
  "Er is een fout opgetreden, wat waarschijnlijk betekend dat de feed uit te "
363
  "lucht is. Probeer het later opnieuw."
364
 
365
- #: lib/yith-system-status.php:105
366
  msgid "WordPress Version"
367
  msgstr "WordPress Versie"
368
 
369
- #: lib/yith-system-status.php:106
370
  msgid "WooCommerce Version"
371
  msgstr "WooCommerce Versie"
372
 
373
- #: lib/yith-system-status.php:107
374
  msgid "Available Memory"
375
  msgstr "Beschikbaar geheugen"
376
 
377
- #: lib/yith-system-status.php:108
378
  msgid "PHP Version"
379
  msgstr "PHP Versie"
380
 
381
- #: lib/yith-system-status.php:109
382
  msgid "TLS Version"
383
  msgstr "TLS Versie"
384
 
385
- #: lib/yith-system-status.php:110
386
  msgid "WordPress Cron"
387
  msgstr "WordPress Cron"
388
 
389
- #: lib/yith-system-status.php:111
390
  msgid "SimpleXML"
391
  msgstr "SimpleXML"
392
 
393
- #: lib/yith-system-status.php:112
394
  msgid "MultiByte String"
395
  msgstr "MultiByte String"
396
 
397
- #: lib/yith-system-status.php:113
398
  msgid "ImageMagick Version"
399
  msgstr "ImageMagick Versie"
400
 
401
- #: lib/yith-system-status.php:114
402
  msgid "GD Library"
403
  msgstr "GD Library"
404
 
405
- #: lib/yith-system-status.php:115
406
  msgid "Iconv Module"
407
  msgstr "Iconv Module"
408
 
409
- #: lib/yith-system-status.php:116
410
  msgid "OPCache Save Comments"
411
  msgstr "OPCache Save Comments"
412
 
413
- #: lib/yith-system-status.php:117
414
  msgid "URL FOpen"
415
  msgstr "URL FOpen"
416
 
417
- #: lib/yith-system-status.php:135 lib/yith-system-status.php:136
418
  msgid "System Status"
419
  msgstr "Systeem Status"
420
 
421
- #: lib/yith-system-status.php:179
422
  msgid "YITH Plugins"
423
  msgstr "YITH Plugins"
424
 
425
- #: lib/yith-system-status.php:180
426
  msgid "WooCommerce"
427
  msgstr "WooCommerce"
428
 
429
- #: lib/yith-system-status.php:297
430
  msgid "Warning!"
431
  msgstr "Waarschuwing!"
432
 
433
- #: lib/yith-system-status.php:298
 
 
434
  msgid ""
435
- "The system check has detected some compatibility issues on your "
436
- "installation. %sClick here%s to know more"
437
  msgstr ""
438
  "Het systeem heeft enkele compatibiliteitsproblemen gevonden op uw "
439
  "installatie. %sKlik hier%s om meer te weten te komen"
440
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
441
  #: templates/fields/ajax-customers.php:57
442
  msgid "Search Customers"
443
  msgstr "Zoek klanten"
@@ -568,108 +691,54 @@ msgstr "(Default: <i %s></i> )"
568
  msgid "Reset Defaults"
569
  msgstr "Herstellen naar standaard"
570
 
571
- #: templates/sysinfo/system-information-panel.php:30
572
  msgid "YITH System Information"
573
  msgstr "YITH System Informatie"
574
 
575
- #: templates/sysinfo/system-information-panel.php:38
576
- msgid "Site URL"
577
- msgstr "Site URL"
578
-
579
- #: templates/sysinfo/system-information-panel.php:46
580
- msgid "Output IP Address"
581
- msgstr "Output IP Address"
582
-
583
- #: templates/sysinfo/system-information-panel.php:76
584
- msgid "Enabled"
585
- msgstr "Ingeschakeld"
586
-
587
- #: templates/sysinfo/system-information-panel.php:76
588
- msgid "Disabled"
589
- msgstr "Uitgeschakeld"
590
-
591
- #: templates/sysinfo/system-information-panel.php:82
592
- msgid "N/A"
593
- msgstr "N.V.T"
594
-
595
- #: templates/sysinfo/system-information-panel.php:96
596
- msgid "%s needs %s enabled"
597
- msgstr "%s heeft nodig %s ingeschakeld"
598
-
599
- #: templates/sysinfo/system-information-panel.php:98
600
- msgid "%s needs at least %s of available memory"
601
- msgstr "%s heeft ten minste %s beschikbaar geheugen nodig"
602
-
603
- #: templates/sysinfo/system-information-panel.php:100
604
- #: templates/sysinfo/system-information-panel.php:149
605
- msgid ""
606
- "For optimal functioning of our plugins, we suggest setting at least %s of "
607
- "available memory"
608
  msgstr ""
609
- "Voor het optimaal functioneren van de plugins, adviseren wij minstens %s "
610
- "beschikbaar geheugen te hebben"
611
 
612
- #: templates/sysinfo/system-information-panel.php:102
613
- #: templates/sysinfo/system-information-panel.php:137
614
- #: templates/sysinfo/system-information-panel.php:151
615
- msgid ""
616
- "Read more %s here%s or contact your hosting company in order to increase it."
617
  msgstr ""
618
- "Lees %s hier%s meer, of neem contact op met uw hostingmaatschappij om het te "
619
- "verhogen."
620
 
621
- #: templates/sysinfo/system-information-panel.php:105
622
- msgid "%s needs at least %s version"
623
- msgstr "%s heeft minstens %s versie nodig"
 
624
 
625
- #: templates/sysinfo/system-information-panel.php:116
626
- msgid ""
627
- "Update it to the latest version in order to benefit of all new features and "
628
- "security updates."
629
- msgstr ""
630
- "Bijwerken naar de nieuwste versie om te profiteren van alle nieuwe functies "
631
- "en beveiligingsupdates."
632
 
633
- #: templates/sysinfo/system-information-panel.php:122
634
- msgid "Contact your hosting company in order to update it."
635
- msgstr "Neem contact op met uw hostingmaatschappij om het bij te werken."
636
 
637
- #: templates/sysinfo/system-information-panel.php:126
638
- msgid "Remove %s from %s file"
639
- msgstr "Verwijder %s uit %s bestand"
640
 
641
- #: templates/sysinfo/system-information-panel.php:134
642
- msgid "Contact your hosting company in order to enable it."
643
- msgstr "Neem contact op met uw hostingmaatschappij om dit in te schakelen."
644
 
645
- #: templates/sysinfo/system-information-panel.php:157
646
- msgid ""
647
- "We cannot determine which <b>TLS</b> version is installed because <b>cURL</"
648
- "b> module is disabled. Ask your hosting company to enable it."
649
  msgstr ""
650
- "We kunnen niet bepalen welke <b>TLS</b> versie is geïnstalleerd omdat de "
651
- "<b>cURL</b> module is uitgeschakeld. Vraag uw hostingmaatschappij om het in "
652
- "te schakelen."
653
 
654
- #: templates/sysinfo/system-information-panel.php:160
655
- msgid ""
656
- "<b>ImageMagick</b> module is not installed. Ask your hosting company to "
657
- "install it."
658
  msgstr ""
659
- "<b>ImageMagick</b> module is niet geïnstalleerd. Vraag uw "
660
- "hositngmaatschappij om het te installeren."
661
 
662
- #: templates/sysinfo/system-information-panel.php:172
663
  msgid "Show full PHPInfo"
664
  msgstr "Toon volledige PHPInfo"
665
 
666
- #: templates/sysinfo/system-information-panel.php:176
667
- msgid "Back to System panel"
668
- msgstr "Terug naar systeempaneel"
669
-
670
- #: templates/sysinfo/system-information-panel.php:193
671
- msgid "Back to top"
672
- msgstr "Terug naar boven"
673
 
674
  #: yit-plugin.php:194
675
  msgid "License"
@@ -753,15 +822,40 @@ msgctxt "[gutenberg]: Category Name"
753
  msgid "YITH"
754
  msgstr "YITH"
755
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
756
  #: templates/fields/onoff.php:24
757
- msgctxt "ON/OFF button: use MAX 3 characters!"
758
- msgid "ON"
759
- msgstr "AAN"
760
 
761
  #: templates/fields/onoff.php:25
762
- msgctxt "ON/OFF button: use MAX 3 characters!"
763
- msgid "OFF"
764
- msgstr "UIT"
765
 
766
  #: yit-plugin.php:83
767
  msgctxt "Plugin Row Meta"
@@ -788,6 +882,21 @@ msgctxt "Action links"
788
  msgid "Settings"
789
  msgstr "Instellingen"
790
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
791
  #~ msgid "An unexpected error occurred, please try again later. Thanks!"
792
  #~ msgstr ""
793
  #~ "Een onverwachte fout heeft zich voorgedaan, probeer het later nog eens!"
@@ -1114,8 +1223,5 @@ msgstr "Instellingen"
1114
  #~ msgid "Renew license"
1115
  #~ msgstr "Licentie vernieuwen"
1116
 
1117
- #~ msgid "Select All"
1118
- #~ msgstr "Selecteer alles"
1119
-
1120
  #~ msgid "Deselect All"
1121
  #~ msgstr "Selectie ongedaan maken"
4
  msgstr ""
5
  "Project-Id-Version: YITH Plugin Starter 1.0.0 Plugin FW\n"
6
  "Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
7
+ "POT-Creation-Date: 2020-08-07 14:15:08+00:00\n"
8
+ "PO-Revision-Date: 2020-04-06 15:05+0200\n"
9
  "Last-Translator: \n"
10
  "Language-Team: Your Inspiration Themes <info@yithemes.com>\n"
11
  "Language: nl\n"
12
  "MIME-Version: 1.0\n"
13
  "Content-Type: text/plain; charset=UTF-8\n"
14
  "Content-Transfer-Encoding: 8bit\n"
15
+ "X-Generator: Poedit 2.2.1\n"
16
  "X-Poedit-KeywordsList: __;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;"
17
  "_nx_noop:1,2,3c;esc_attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;"
18
  "esc_html_x:1,2c;_x;_ex\n"
22
  "X-Textdomain-Support: yes\n"
23
  "X-Poedit-SearchPath-0: .\n"
24
 
25
+ #: lib/yit-assets.php:102
26
+ msgid "Clear"
27
+ msgstr ""
28
+
29
+ #: lib/yit-assets.php:103
30
+ msgid "Clear color"
31
+ msgstr ""
32
+
33
+ #: lib/yit-assets.php:104
34
+ #, fuzzy
35
+ msgid "Default"
36
+ msgstr "Instellen als standaard"
37
+
38
+ #: lib/yit-assets.php:105
39
+ #, fuzzy
40
+ msgid "Select default color"
41
+ msgstr "Instellen als standaard"
42
+
43
+ #: lib/yit-assets.php:106
44
+ #, fuzzy
45
+ msgid "Select Color"
46
+ msgstr "Selecteer alles"
47
+
48
+ #: lib/yit-assets.php:107
49
+ msgid "Color value"
50
+ msgstr ""
51
+
52
  #: lib/yit-cpt-unlimited.php:462 lib/yit-cpt-unlimited.php:576
53
  #: lib/yit-cpt-unlimited.php:721 lib/yit-cpt-unlimited.php:1636
54
  msgid "Add %s"
233
  msgid "Upload multiple files"
234
  msgstr "Upload meerdere bestanden"
235
 
236
+ #: lib/yit-plugin-panel-wc.php:426
237
  msgid "The changes you have made will be lost if you leave this page."
238
  msgstr "Als je deze pagina verlaat zullen alle wijzigingen verloren gaan."
239
 
241
  msgid "Plugin Settings"
242
  msgstr "Plugin instellingen"
243
 
244
+ #: lib/yit-plugin-panel.php:454 lib/yit-plugin-panel.php:457
245
  msgid "How to install premium version"
246
  msgstr "Hoe installeer ik de premium versie"
247
 
248
+ #: lib/yit-plugin-panel.php:617 lib/yit-plugin-subpanel.php:151
249
  #: templates/panel/woocommerce/woocommerce-form.php:14
250
  msgid "Save Changes"
251
  msgstr "Wijzigingen opslaan"
252
 
253
+ #: lib/yit-plugin-panel.php:621 lib/yit-plugin-subpanel.php:154
254
  #: templates/panel/woocommerce/woocommerce-form.php:17
255
  msgid ""
256
  "If you continue with this action, you will reset all options in this page."
257
  msgstr "Als u deze actie voortzet, zult u alle opties op deze pagina resetten."
258
 
259
+ #: lib/yit-plugin-panel.php:624 lib/yit-plugin-subpanel.php:156
260
  msgid "Reset to default"
261
  msgstr "Resetten naar standaard"
262
 
263
+ #: lib/yit-plugin-panel.php:625 lib/yit-plugin-subpanel.php:157
264
  #: templates/panel/woocommerce/woocommerce-form.php:21
265
  msgid "Are you sure?"
266
  msgstr "Weet u het zeker?"
267
 
268
+ #: lib/yit-plugin-panel.php:823
269
  msgid ""
270
  "The element you have entered already exists. Please, enter another name."
271
  msgstr "Het element dat u hebt ingevoerd bestaat al. Voer een andere naam in."
272
 
273
+ #: lib/yit-plugin-panel.php:824
274
  msgid "Settings saved"
275
  msgstr "Instellingen opgeslagen"
276
 
277
+ #: lib/yit-plugin-panel.php:825
278
  msgid "Settings reset"
279
  msgstr "Instellingen resetten"
280
 
281
+ #: lib/yit-plugin-panel.php:826
282
  msgid "Element deleted correctly."
283
  msgstr "Element succesvol verwijderd."
284
 
285
+ #: lib/yit-plugin-panel.php:827 lib/yit-plugin-panel.php:828
286
  msgid "Element updated correctly."
287
  msgstr "Element juist bijgewerkt."
288
 
289
+ #: lib/yit-plugin-panel.php:829
290
  msgid "Database imported correctly."
291
  msgstr "Database juist geïmporteerd."
292
 
293
+ #: lib/yit-plugin-panel.php:830
294
  msgid "An error has occurred during import. Please try again."
295
  msgstr "Er is een fout opgetreden tijdens importeren. Probeer opnieuw."
296
 
297
+ #: lib/yit-plugin-panel.php:831
298
  msgid "The added file is not valid."
299
  msgstr "Het toegevoegde bestand is ongeldig."
300
 
301
+ #: lib/yit-plugin-panel.php:832
302
  msgid "Sorry, import is disabled."
303
  msgstr "Sorry, importeren is uitgeschakeld."
304
 
305
+ #: lib/yit-plugin-panel.php:833
306
  msgid "Sorting successful."
307
  msgstr "Sorteren succesvol."
308
 
309
+ #: lib/yit-plugin-panel.php:1281
310
  msgid "We need your support"
311
  msgstr "We hebben uw hulp nodig"
312
 
313
+ #: lib/yit-plugin-panel.php:1282
314
  msgid "to keep updating and improving the plugin. Please,"
315
  msgstr "om de plugin te blijven updaten en verbeteren. A.u.b.,"
316
 
317
+ #: lib/yit-plugin-panel.php:1284
318
  msgid "help us by leaving a five-star rating"
319
  msgstr "help ons door een vijf-sterenbeoordeling achter te laten"
320
 
321
+ #: lib/yit-plugin-panel.php:1285
322
  msgid ":) Thanks!"
323
  msgstr ":) Bedankt!"
324
 
389
  "Er is een fout opgetreden, wat waarschijnlijk betekend dat de feed uit te "
390
  "lucht is. Probeer het later opnieuw."
391
 
392
+ #: lib/yith-system-status.php:111
393
  msgid "WordPress Version"
394
  msgstr "WordPress Versie"
395
 
396
+ #: lib/yith-system-status.php:112
397
  msgid "WooCommerce Version"
398
  msgstr "WooCommerce Versie"
399
 
400
+ #: lib/yith-system-status.php:113
401
  msgid "Available Memory"
402
  msgstr "Beschikbaar geheugen"
403
 
404
+ #: lib/yith-system-status.php:114
405
  msgid "PHP Version"
406
  msgstr "PHP Versie"
407
 
408
+ #: lib/yith-system-status.php:115
409
  msgid "TLS Version"
410
  msgstr "TLS Versie"
411
 
412
+ #: lib/yith-system-status.php:116
413
  msgid "WordPress Cron"
414
  msgstr "WordPress Cron"
415
 
416
+ #: lib/yith-system-status.php:117
417
  msgid "SimpleXML"
418
  msgstr "SimpleXML"
419
 
420
+ #: lib/yith-system-status.php:118
421
  msgid "MultiByte String"
422
  msgstr "MultiByte String"
423
 
424
+ #: lib/yith-system-status.php:119
425
  msgid "ImageMagick Version"
426
  msgstr "ImageMagick Versie"
427
 
428
+ #: lib/yith-system-status.php:120
429
  msgid "GD Library"
430
  msgstr "GD Library"
431
 
432
+ #: lib/yith-system-status.php:121
433
  msgid "Iconv Module"
434
  msgstr "Iconv Module"
435
 
436
+ #: lib/yith-system-status.php:122
437
  msgid "OPCache Save Comments"
438
  msgstr "OPCache Save Comments"
439
 
440
+ #: lib/yith-system-status.php:123
441
  msgid "URL FOpen"
442
  msgstr "URL FOpen"
443
 
444
+ #: lib/yith-system-status.php:141 lib/yith-system-status.php:142
445
  msgid "System Status"
446
  msgstr "Systeem Status"
447
 
448
+ #: lib/yith-system-status.php:184
449
  msgid "YITH Plugins"
450
  msgstr "YITH Plugins"
451
 
452
+ #: lib/yith-system-status.php:192
453
  msgid "WooCommerce"
454
  msgstr "WooCommerce"
455
 
456
+ #: lib/yith-system-status.php:330
457
  msgid "Warning!"
458
  msgstr "Waarschuwing!"
459
 
460
+ #. translators: %1$s open link tag, %2$s open link tag
461
+ #: lib/yith-system-status.php:334
462
+ #, fuzzy
463
  msgid ""
464
+ "The system check has detected some compatibility issues on your installation."
465
+ "%1$sClick here%2$s to know more"
466
  msgstr ""
467
  "Het systeem heeft enkele compatibiliteitsproblemen gevonden op uw "
468
  "installatie. %sKlik hier%s om meer te weten te komen"
469
 
470
+ #: lib/yith-system-status.php:473
471
+ msgid "Enabled"
472
+ msgstr "Ingeschakeld"
473
+
474
+ #: lib/yith-system-status.php:473
475
+ msgid "Disabled"
476
+ msgstr "Uitgeschakeld"
477
+
478
+ #: lib/yith-system-status.php:478
479
+ msgid "N/A"
480
+ msgstr "N.V.T"
481
+
482
+ #. translators: %1$s plugin name, %2$s requirement name
483
+ #: lib/yith-system-status.php:506
484
+ #, fuzzy
485
+ msgid "%1$s needs %2$s enabled"
486
+ msgstr "%s heeft nodig %s ingeschakeld"
487
+
488
+ #. translators: %1$s plugin name, %2$s required memory amount
489
+ #: lib/yith-system-status.php:509
490
+ #, fuzzy
491
+ msgid "%1$s needs at least %2$s of available memory"
492
+ msgstr "%s heeft ten minste %s beschikbaar geheugen nodig"
493
+
494
+ #. translators: %1$s plugin name, %2$s version number
495
+ #: lib/yith-system-status.php:512
496
+ #, fuzzy
497
+ msgid "%1$s needs at least %2$s version"
498
+ msgstr "%s heeft minstens %s versie nodig"
499
+
500
+ #: lib/yith-system-status.php:537
501
+ msgid ""
502
+ "Update it to the latest version in order to benefit of all new features and "
503
+ "security updates."
504
+ msgstr ""
505
+ "Bijwerken naar de nieuwste versie om te profiteren van alle nieuwe functies "
506
+ "en beveiligingsupdates."
507
+
508
+ #: lib/yith-system-status.php:541 lib/yith-system-status.php:547
509
+ msgid "Contact your hosting company in order to update it."
510
+ msgstr "Neem contact op met uw hostingmaatschappij om het bij te werken."
511
+
512
+ #: lib/yith-system-status.php:545
513
+ #, fuzzy
514
+ msgid "Contact your hosting company in order to install it."
515
+ msgstr "Neem contact op met uw hostingmaatschappij om dit in te schakelen."
516
+
517
+ #. translators: %1$s code, %2$s file name
518
+ #: lib/yith-system-status.php:552
519
+ #, fuzzy
520
+ msgid "Remove %1$s from %2$s file"
521
+ msgstr "Verwijder %s uit %s bestand"
522
+
523
+ #: lib/yith-system-status.php:560
524
+ msgid "Contact your hosting company in order to enable it."
525
+ msgstr "Neem contact op met uw hostingmaatschappij om dit in te schakelen."
526
+
527
+ #. translators: %1$s opening link tag, %2$s closing link tag
528
+ #: lib/yith-system-status.php:564 lib/yith-system-status.php:588
529
+ #, fuzzy
530
+ msgid ""
531
+ "Read more %1$shere%2$s or contact your hosting company in order to increase "
532
+ "it."
533
+ msgstr ""
534
+ "Lees %s hier%s meer, of neem contact op met uw hostingmaatschappij om het te "
535
+ "verhogen."
536
+
537
+ #. translators: %s recommended memory amount
538
+ #: lib/yith-system-status.php:585
539
+ msgid ""
540
+ "For optimal functioning of our plugins, we suggest setting at least %s of "
541
+ "available memory"
542
+ msgstr ""
543
+ "Voor het optimaal functioneren van de plugins, adviseren wij minstens %s "
544
+ "beschikbaar geheugen te hebben"
545
+
546
+ #. translators: %1$s TLS label, %2$s cURL label
547
+ #: lib/yith-system-status.php:593
548
+ #, fuzzy
549
+ msgid ""
550
+ "The system check cannot determine which %1$s version is installed because "
551
+ "%2$s module is disabled. Ask your hosting company to enable it."
552
+ msgstr ""
553
+ "We kunnen niet bepalen welke <b>TLS</b> versie is geïnstalleerd omdat de "
554
+ "<b>cURL</b> module is uitgeschakeld. Vraag uw hostingmaatschappij om het in "
555
+ "te schakelen."
556
+
557
+ #. translators: %1$s TLS label
558
+ #: lib/yith-system-status.php:596
559
+ msgid ""
560
+ "The system check cannot determine which %1$s version is installed due to a "
561
+ "connection issue between your site and our server."
562
+ msgstr ""
563
+
564
  #: templates/fields/ajax-customers.php:57
565
  msgid "Search Customers"
566
  msgstr "Zoek klanten"
691
  msgid "Reset Defaults"
692
  msgstr "Herstellen naar standaard"
693
 
694
+ #: templates/sysinfo/system-information-panel.php:39
695
  msgid "YITH System Information"
696
  msgstr "YITH System Informatie"
697
 
698
+ #: templates/sysinfo/system-information-panel.php:50
699
+ msgid "WP debug.log file"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
700
  msgstr ""
 
 
701
 
702
+ #: templates/sysinfo/system-information-panel.php:54
703
+ msgid "PHP error_log file"
 
 
 
704
  msgstr ""
 
 
705
 
706
+ #: templates/sysinfo/system-information-panel.php:59
707
+ #: templates/sysinfo/system-information-panel.php:83
708
+ msgid "Back to System panel"
709
+ msgstr "Terug naar systeempaneel"
710
 
711
+ #: templates/sysinfo/system-information-panel.php:96
712
+ msgid "Back to top"
713
+ msgstr "Terug naar boven"
 
 
 
 
714
 
715
+ #: templates/sysinfo/system-information-panel.php:104
716
+ msgid "Site URL"
717
+ msgstr "Site URL"
718
 
719
+ #: templates/sysinfo/system-information-panel.php:112
720
+ msgid "Output IP Address"
721
+ msgstr "Output IP Address"
722
 
723
+ #: templates/sysinfo/system-information-panel.php:120
724
+ msgid "Defined WP_CACHE"
725
+ msgstr ""
726
 
727
+ #: templates/sysinfo/system-information-panel.php:123
728
+ msgid "Yes"
 
 
729
  msgstr ""
 
 
 
730
 
731
+ #: templates/sysinfo/system-information-panel.php:123
732
+ msgid "No"
 
 
733
  msgstr ""
 
 
734
 
735
+ #: templates/sysinfo/system-information-panel.php:159
736
  msgid "Show full PHPInfo"
737
  msgstr "Toon volledige PHPInfo"
738
 
739
+ #: templates/sysinfo/system-information-panel.php:167
740
+ msgid "Show log files"
741
+ msgstr ""
 
 
 
 
742
 
743
  #: yit-plugin.php:194
744
  msgid "License"
822
  msgid "YITH"
823
  msgstr "YITH"
824
 
825
+ #: templates/fields/dimensions.php:16
826
+ msgctxt "Position in the \"Dimensions\" field"
827
+ msgid "Top"
828
+ msgstr ""
829
+
830
+ #: templates/fields/dimensions.php:17
831
+ msgctxt "Position in the \"Dimensions\" field"
832
+ msgid "Right"
833
+ msgstr ""
834
+
835
+ #: templates/fields/dimensions.php:18
836
+ msgctxt "Position in the \"Dimensions\" field"
837
+ msgid "Bottom"
838
+ msgstr ""
839
+
840
+ #: templates/fields/dimensions.php:19
841
+ msgctxt "Position in the \"Dimensions\" field"
842
+ msgid "Left"
843
+ msgstr ""
844
+
845
+ #: templates/fields/dimensions.php:117
846
+ msgctxt "Tooltip in the \"Dimensions\" field"
847
+ msgid "Link values together"
848
+ msgstr ""
849
+
850
  #: templates/fields/onoff.php:24
851
+ msgctxt "YES/NO button: use MAX 3 characters!"
852
+ msgid "YES"
853
+ msgstr "JA"
854
 
855
  #: templates/fields/onoff.php:25
856
+ msgctxt "YES/NO button: use MAX 3 characters!"
857
+ msgid "NO"
858
+ msgstr "NEE"
859
 
860
  #: yit-plugin.php:83
861
  msgctxt "Plugin Row Meta"
882
  msgid "Settings"
883
  msgstr "Instellingen"
884
 
885
+ #~ msgid ""
886
+ #~ "<b>ImageMagick</b> module is not installed. Ask your hosting company to "
887
+ #~ "install it."
888
+ #~ msgstr ""
889
+ #~ "<b>ImageMagick</b> module is niet geïnstalleerd. Vraag uw "
890
+ #~ "hositngmaatschappij om het te installeren."
891
+
892
+ #~ msgctxt "ON/OFF button: use MAX 3 characters!"
893
+ #~ msgid "ON"
894
+ #~ msgstr "AAN"
895
+
896
+ #~ msgctxt "ON/OFF button: use MAX 3 characters!"
897
+ #~ msgid "OFF"
898
+ #~ msgstr "UIT"
899
+
900
  #~ msgid "An unexpected error occurred, please try again later. Thanks!"
901
  #~ msgstr ""
902
  #~ "Een onverwachte fout heeft zich voorgedaan, probeer het later nog eens!"
1223
  #~ msgid "Renew license"
1224
  #~ msgstr "Licentie vernieuwen"
1225
 
 
 
 
1226
  #~ msgid "Deselect All"
1227
  #~ msgstr "Selectie ongedaan maken"
plugin-fw/languages/yith-plugin-fw.pot CHANGED
@@ -4,7 +4,7 @@ msgid ""
4
  msgstr ""
5
  "Project-Id-Version: \n"
6
  "Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
7
- "POT-Creation-Date: 2020-03-11 14:03:11+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -24,6 +24,30 @@ msgstr ""
24
  "X-Textdomain-Support: yes\n"
25
  "X-Generator: grunt-wp-i18n 1.0.3\n"
26
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  #: lib/yit-cpt-unlimited.php:462 lib/yit-cpt-unlimited.php:576
28
  #: lib/yit-cpt-unlimited.php:721 lib/yit-cpt-unlimited.php:1636
29
  msgid "Add %s"
@@ -198,7 +222,7 @@ msgstr ""
198
  msgid "Upload multiple files"
199
  msgstr ""
200
 
201
- #: lib/yit-plugin-panel-wc.php:399
202
  msgid "The changes you have made will be lost if you leave this page."
203
  msgstr ""
204
 
@@ -206,82 +230,82 @@ msgstr ""
206
  msgid "Plugin Settings"
207
  msgstr ""
208
 
209
- #: lib/yit-plugin-panel.php:425 lib/yit-plugin-panel.php:428
210
  msgid "How to install premium version"
211
  msgstr ""
212
 
213
- #: lib/yit-plugin-panel.php:572 lib/yit-plugin-subpanel.php:151
214
  #: templates/panel/woocommerce/woocommerce-form.php:14
215
  msgid "Save Changes"
216
  msgstr ""
217
 
218
- #: lib/yit-plugin-panel.php:575 lib/yit-plugin-subpanel.php:154
219
  #: templates/panel/woocommerce/woocommerce-form.php:17
220
  msgid "If you continue with this action, you will reset all options in this page."
221
  msgstr ""
222
 
223
- #: lib/yit-plugin-panel.php:577 lib/yit-plugin-subpanel.php:156
224
  msgid "Reset to default"
225
  msgstr ""
226
 
227
- #: lib/yit-plugin-panel.php:578 lib/yit-plugin-subpanel.php:157
228
  #: templates/panel/woocommerce/woocommerce-form.php:21
229
  msgid "Are you sure?"
230
  msgstr ""
231
 
232
- #: lib/yit-plugin-panel.php:776
233
  msgid "The element you have entered already exists. Please, enter another name."
234
  msgstr ""
235
 
236
- #: lib/yit-plugin-panel.php:777
237
  msgid "Settings saved"
238
  msgstr ""
239
 
240
- #: lib/yit-plugin-panel.php:778
241
  msgid "Settings reset"
242
  msgstr ""
243
 
244
- #: lib/yit-plugin-panel.php:779
245
  msgid "Element deleted correctly."
246
  msgstr ""
247
 
248
- #: lib/yit-plugin-panel.php:780 lib/yit-plugin-panel.php:781
249
  msgid "Element updated correctly."
250
  msgstr ""
251
 
252
- #: lib/yit-plugin-panel.php:782
253
  msgid "Database imported correctly."
254
  msgstr ""
255
 
256
- #: lib/yit-plugin-panel.php:783
257
  msgid "An error has occurred during import. Please try again."
258
  msgstr ""
259
 
260
- #: lib/yit-plugin-panel.php:784
261
  msgid "The added file is not valid."
262
  msgstr ""
263
 
264
- #: lib/yit-plugin-panel.php:785
265
  msgid "Sorry, import is disabled."
266
  msgstr ""
267
 
268
- #: lib/yit-plugin-panel.php:786
269
  msgid "Sorting successful."
270
  msgstr ""
271
 
272
- #: lib/yit-plugin-panel.php:1234
273
  msgid "We need your support"
274
  msgstr ""
275
 
276
- #: lib/yit-plugin-panel.php:1235
277
  msgid "to keep updating and improving the plugin. Please,"
278
  msgstr ""
279
 
280
- #: lib/yit-plugin-panel.php:1237
281
  msgid "help us by leaving a five-star rating"
282
  msgstr ""
283
 
284
- #: lib/yit-plugin-panel.php:1238
285
  msgid ":) Thanks!"
286
  msgstr ""
287
 
@@ -339,78 +363,157 @@ msgid ""
339
  "later."
340
  msgstr ""
341
 
342
- #: lib/yith-system-status.php:105
343
  msgid "WordPress Version"
344
  msgstr ""
345
 
346
- #: lib/yith-system-status.php:106
347
  msgid "WooCommerce Version"
348
  msgstr ""
349
 
350
- #: lib/yith-system-status.php:107
351
  msgid "Available Memory"
352
  msgstr ""
353
 
354
- #: lib/yith-system-status.php:108
355
  msgid "PHP Version"
356
  msgstr ""
357
 
358
- #: lib/yith-system-status.php:109
359
  msgid "TLS Version"
360
  msgstr ""
361
 
362
- #: lib/yith-system-status.php:110
363
  msgid "WordPress Cron"
364
  msgstr ""
365
 
366
- #: lib/yith-system-status.php:111
367
  msgid "SimpleXML"
368
  msgstr ""
369
 
370
- #: lib/yith-system-status.php:112
371
  msgid "MultiByte String"
372
  msgstr ""
373
 
374
- #: lib/yith-system-status.php:113
375
  msgid "ImageMagick Version"
376
  msgstr ""
377
 
378
- #: lib/yith-system-status.php:114
379
  msgid "GD Library"
380
  msgstr ""
381
 
382
- #: lib/yith-system-status.php:115
383
  msgid "Iconv Module"
384
  msgstr ""
385
 
386
- #: lib/yith-system-status.php:116
387
  msgid "OPCache Save Comments"
388
  msgstr ""
389
 
390
- #: lib/yith-system-status.php:117
391
  msgid "URL FOpen"
392
  msgstr ""
393
 
394
- #: lib/yith-system-status.php:135 lib/yith-system-status.php:136
395
  msgid "System Status"
396
  msgstr ""
397
 
398
- #: lib/yith-system-status.php:179
399
  msgid "YITH Plugins"
400
  msgstr ""
401
 
402
- #: lib/yith-system-status.php:180
403
  msgid "WooCommerce"
404
  msgstr ""
405
 
406
- #: lib/yith-system-status.php:297
407
  msgid "Warning!"
408
  msgstr ""
409
 
410
- #: lib/yith-system-status.php:298
 
411
  msgid ""
412
  "The system check has detected some compatibility issues on your "
413
- "installation. %sClick here%s to know more"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
414
  msgstr ""
415
 
416
  #: templates/fields/ajax-customers.php:57
@@ -543,95 +646,53 @@ msgstr ""
543
  msgid "Reset Defaults"
544
  msgstr ""
545
 
546
- #: templates/sysinfo/system-information-panel.php:30
547
  msgid "YITH System Information"
548
  msgstr ""
549
 
550
- #: templates/sysinfo/system-information-panel.php:38
551
- msgid "Site URL"
552
  msgstr ""
553
 
554
- #: templates/sysinfo/system-information-panel.php:46
555
- msgid "Output IP Address"
556
  msgstr ""
557
 
558
- #: templates/sysinfo/system-information-panel.php:76
559
- msgid "Enabled"
560
- msgstr ""
561
-
562
- #: templates/sysinfo/system-information-panel.php:76
563
- msgid "Disabled"
564
- msgstr ""
565
-
566
- #: templates/sysinfo/system-information-panel.php:82
567
- msgid "N/A"
568
  msgstr ""
569
 
570
  #: templates/sysinfo/system-information-panel.php:96
571
- msgid "%s needs %s enabled"
572
- msgstr ""
573
-
574
- #: templates/sysinfo/system-information-panel.php:98
575
- msgid "%s needs at least %s of available memory"
576
- msgstr ""
577
-
578
- #: templates/sysinfo/system-information-panel.php:100
579
- #: templates/sysinfo/system-information-panel.php:149
580
- msgid ""
581
- "For optimal functioning of our plugins, we suggest setting at least %s of "
582
- "available memory"
583
- msgstr ""
584
-
585
- #: templates/sysinfo/system-information-panel.php:102
586
- #: templates/sysinfo/system-information-panel.php:137
587
- #: templates/sysinfo/system-information-panel.php:151
588
- msgid "Read more %s here%s or contact your hosting company in order to increase it."
589
- msgstr ""
590
-
591
- #: templates/sysinfo/system-information-panel.php:105
592
- msgid "%s needs at least %s version"
593
- msgstr ""
594
-
595
- #: templates/sysinfo/system-information-panel.php:116
596
- msgid ""
597
- "Update it to the latest version in order to benefit of all new features and "
598
- "security updates."
599
  msgstr ""
600
 
601
- #: templates/sysinfo/system-information-panel.php:122
602
- msgid "Contact your hosting company in order to update it."
603
  msgstr ""
604
 
605
- #: templates/sysinfo/system-information-panel.php:126
606
- msgid "Remove %s from %s file"
607
  msgstr ""
608
 
609
- #: templates/sysinfo/system-information-panel.php:134
610
- msgid "Contact your hosting company in order to enable it."
611
  msgstr ""
612
 
613
- #: templates/sysinfo/system-information-panel.php:157
614
- msgid ""
615
- "We cannot determine which <b>TLS</b> version is installed because "
616
- "<b>cURL</b> module is disabled. Ask your hosting company to enable it."
617
  msgstr ""
618
 
619
- #: templates/sysinfo/system-information-panel.php:160
620
- msgid ""
621
- "<b>ImageMagick</b> module is not installed. Ask your hosting company to "
622
- "install it."
623
  msgstr ""
624
 
625
- #: templates/sysinfo/system-information-panel.php:172
626
  msgid "Show full PHPInfo"
627
  msgstr ""
628
 
629
- #: templates/sysinfo/system-information-panel.php:176
630
- msgid "Back to System panel"
631
- msgstr ""
632
-
633
- #: templates/sysinfo/system-information-panel.php:193
634
- msgid "Back to top"
635
  msgstr ""
636
 
637
  #: yit-plugin.php:194
@@ -708,14 +769,39 @@ msgctxt "[gutenberg]: Category Name"
708
  msgid "YITH"
709
  msgstr ""
710
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
711
  #: templates/fields/onoff.php:24
712
- msgctxt "ON/OFF button: use MAX 3 characters!"
713
- msgid "ON"
714
  msgstr ""
715
 
716
  #: templates/fields/onoff.php:25
717
- msgctxt "ON/OFF button: use MAX 3 characters!"
718
- msgid "OFF"
719
  msgstr ""
720
 
721
  #: yit-plugin.php:83
4
  msgstr ""
5
  "Project-Id-Version: \n"
6
  "Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
7
+ "POT-Creation-Date: 2020-08-07 14:15:08+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
24
  "X-Textdomain-Support: yes\n"
25
  "X-Generator: grunt-wp-i18n 1.0.3\n"
26
 
27
+ #: lib/yit-assets.php:102
28
+ msgid "Clear"
29
+ msgstr ""
30
+
31
+ #: lib/yit-assets.php:103
32
+ msgid "Clear color"
33
+ msgstr ""
34
+
35
+ #: lib/yit-assets.php:104
36
+ msgid "Default"
37
+ msgstr ""
38
+
39
+ #: lib/yit-assets.php:105
40
+ msgid "Select default color"
41
+ msgstr ""
42
+
43
+ #: lib/yit-assets.php:106
44
+ msgid "Select Color"
45
+ msgstr ""
46
+
47
+ #: lib/yit-assets.php:107
48
+ msgid "Color value"
49
+ msgstr ""
50
+
51
  #: lib/yit-cpt-unlimited.php:462 lib/yit-cpt-unlimited.php:576
52
  #: lib/yit-cpt-unlimited.php:721 lib/yit-cpt-unlimited.php:1636
53
  msgid "Add %s"
222
  msgid "Upload multiple files"
223
  msgstr ""
224
 
225
+ #: lib/yit-plugin-panel-wc.php:426
226
  msgid "The changes you have made will be lost if you leave this page."
227
  msgstr ""
228
 
230
  msgid "Plugin Settings"
231
  msgstr ""
232
 
233
+ #: lib/yit-plugin-panel.php:454 lib/yit-plugin-panel.php:457
234
  msgid "How to install premium version"
235
  msgstr ""
236
 
237
+ #: lib/yit-plugin-panel.php:617 lib/yit-plugin-subpanel.php:151
238
  #: templates/panel/woocommerce/woocommerce-form.php:14
239
  msgid "Save Changes"
240
  msgstr ""
241
 
242
+ #: lib/yit-plugin-panel.php:621 lib/yit-plugin-subpanel.php:154
243
  #: templates/panel/woocommerce/woocommerce-form.php:17
244
  msgid "If you continue with this action, you will reset all options in this page."
245
  msgstr ""
246
 
247
+ #: lib/yit-plugin-panel.php:624 lib/yit-plugin-subpanel.php:156
248
  msgid "Reset to default"
249
  msgstr ""
250
 
251
+ #: lib/yit-plugin-panel.php:625 lib/yit-plugin-subpanel.php:157
252
  #: templates/panel/woocommerce/woocommerce-form.php:21
253
  msgid "Are you sure?"
254
  msgstr ""
255
 
256
+ #: lib/yit-plugin-panel.php:823
257
  msgid "The element you have entered already exists. Please, enter another name."
258
  msgstr ""
259
 
260
+ #: lib/yit-plugin-panel.php:824
261
  msgid "Settings saved"
262
  msgstr ""
263
 
264
+ #: lib/yit-plugin-panel.php:825
265
  msgid "Settings reset"
266
  msgstr ""
267
 
268
+ #: lib/yit-plugin-panel.php:826
269
  msgid "Element deleted correctly."
270
  msgstr ""
271
 
272
+ #: lib/yit-plugin-panel.php:827 lib/yit-plugin-panel.php:828
273
  msgid "Element updated correctly."
274
  msgstr ""
275
 
276
+ #: lib/yit-plugin-panel.php:829
277
  msgid "Database imported correctly."
278
  msgstr ""
279
 
280
+ #: lib/yit-plugin-panel.php:830
281
  msgid "An error has occurred during import. Please try again."
282
  msgstr ""
283
 
284
+ #: lib/yit-plugin-panel.php:831
285
  msgid "The added file is not valid."
286
  msgstr ""
287
 
288
+ #: lib/yit-plugin-panel.php:832
289
  msgid "Sorry, import is disabled."
290
  msgstr ""
291
 
292
+ #: lib/yit-plugin-panel.php:833
293
  msgid "Sorting successful."
294
  msgstr ""
295
 
296
+ #: lib/yit-plugin-panel.php:1281
297
  msgid "We need your support"
298
  msgstr ""
299
 
300
+ #: lib/yit-plugin-panel.php:1282
301
  msgid "to keep updating and improving the plugin. Please,"
302
  msgstr ""
303
 
304
+ #: lib/yit-plugin-panel.php:1284
305
  msgid "help us by leaving a five-star rating"
306
  msgstr ""
307
 
308
+ #: lib/yit-plugin-panel.php:1285
309
  msgid ":) Thanks!"
310
  msgstr ""
311
 
363
  "later."
364
  msgstr ""
365
 
366
+ #: lib/yith-system-status.php:111
367
  msgid "WordPress Version"
368
  msgstr ""
369
 
370
+ #: lib/yith-system-status.php:112
371
  msgid "WooCommerce Version"
372
  msgstr ""
373
 
374
+ #: lib/yith-system-status.php:113
375
  msgid "Available Memory"
376
  msgstr ""
377
 
378
+ #: lib/yith-system-status.php:114
379
  msgid "PHP Version"
380
  msgstr ""
381
 
382
+ #: lib/yith-system-status.php:115
383
  msgid "TLS Version"
384
  msgstr ""
385
 
386
+ #: lib/yith-system-status.php:116
387
  msgid "WordPress Cron"
388
  msgstr ""
389
 
390
+ #: lib/yith-system-status.php:117
391
  msgid "SimpleXML"
392
  msgstr ""
393
 
394
+ #: lib/yith-system-status.php:118
395
  msgid "MultiByte String"
396
  msgstr ""
397
 
398
+ #: lib/yith-system-status.php:119
399
  msgid "ImageMagick Version"
400
  msgstr ""
401
 
402
+ #: lib/yith-system-status.php:120
403
  msgid "GD Library"
404
  msgstr ""
405
 
406
+ #: lib/yith-system-status.php:121
407
  msgid "Iconv Module"
408
  msgstr ""
409
 
410
+ #: lib/yith-system-status.php:122
411
  msgid "OPCache Save Comments"
412
  msgstr ""
413
 
414
+ #: lib/yith-system-status.php:123
415
  msgid "URL FOpen"
416
  msgstr ""
417
 
418
+ #: lib/yith-system-status.php:141 lib/yith-system-status.php:142
419
  msgid "System Status"
420
  msgstr ""
421
 
422
+ #: lib/yith-system-status.php:184
423
  msgid "YITH Plugins"
424
  msgstr ""
425
 
426
+ #: lib/yith-system-status.php:192
427
  msgid "WooCommerce"
428
  msgstr ""
429
 
430
+ #: lib/yith-system-status.php:330
431
  msgid "Warning!"
432
  msgstr ""
433
 
434
+ #: lib/yith-system-status.php:334
435
+ #. translators: %1$s open link tag, %2$s open link tag
436
  msgid ""
437
  "The system check has detected some compatibility issues on your "
438
+ "installation.%1$sClick here%2$s to know more"
439
+ msgstr ""
440
+
441
+ #: lib/yith-system-status.php:473
442
+ msgid "Enabled"
443
+ msgstr ""
444
+
445
+ #: lib/yith-system-status.php:473
446
+ msgid "Disabled"
447
+ msgstr ""
448
+
449
+ #: lib/yith-system-status.php:478
450
+ msgid "N/A"
451
+ msgstr ""
452
+
453
+ #: lib/yith-system-status.php:506
454
+ #. translators: %1$s plugin name, %2$s requirement name
455
+ msgid "%1$s needs %2$s enabled"
456
+ msgstr ""
457
+
458
+ #: lib/yith-system-status.php:509
459
+ #. translators: %1$s plugin name, %2$s required memory amount
460
+ msgid "%1$s needs at least %2$s of available memory"
461
+ msgstr ""
462
+
463
+ #: lib/yith-system-status.php:512
464
+ #. translators: %1$s plugin name, %2$s version number
465
+ msgid "%1$s needs at least %2$s version"
466
+ msgstr ""
467
+
468
+ #: lib/yith-system-status.php:537
469
+ msgid ""
470
+ "Update it to the latest version in order to benefit of all new features and "
471
+ "security updates."
472
+ msgstr ""
473
+
474
+ #: lib/yith-system-status.php:541 lib/yith-system-status.php:547
475
+ msgid "Contact your hosting company in order to update it."
476
+ msgstr ""
477
+
478
+ #: lib/yith-system-status.php:545
479
+ msgid "Contact your hosting company in order to install it."
480
+ msgstr ""
481
+
482
+ #: lib/yith-system-status.php:552
483
+ #. translators: %1$s code, %2$s file name
484
+ msgid "Remove %1$s from %2$s file"
485
+ msgstr ""
486
+
487
+ #: lib/yith-system-status.php:560
488
+ msgid "Contact your hosting company in order to enable it."
489
+ msgstr ""
490
+
491
+ #: lib/yith-system-status.php:564 lib/yith-system-status.php:588
492
+ #. translators: %1$s opening link tag, %2$s closing link tag
493
+ msgid ""
494
+ "Read more %1$shere%2$s or contact your hosting company in order to increase "
495
+ "it."
496
+ msgstr ""
497
+
498
+ #: lib/yith-system-status.php:585
499
+ #. translators: %s recommended memory amount
500
+ msgid ""
501
+ "For optimal functioning of our plugins, we suggest setting at least %s of "
502
+ "available memory"
503
+ msgstr ""
504
+
505
+ #: lib/yith-system-status.php:593
506
+ #. translators: %1$s TLS label, %2$s cURL label
507
+ msgid ""
508
+ "The system check cannot determine which %1$s version is installed because "
509
+ "%2$s module is disabled. Ask your hosting company to enable it."
510
+ msgstr ""
511
+
512
+ #: lib/yith-system-status.php:596
513
+ #. translators: %1$s TLS label
514
+ msgid ""
515
+ "The system check cannot determine which %1$s version is installed due to a "
516
+ "connection issue between your site and our server."
517
  msgstr ""
518
 
519
  #: templates/fields/ajax-customers.php:57
646
  msgid "Reset Defaults"
647
  msgstr ""
648
 
649
+ #: templates/sysinfo/system-information-panel.php:39
650
  msgid "YITH System Information"
651
  msgstr ""
652
 
653
+ #: templates/sysinfo/system-information-panel.php:50
654
+ msgid "WP debug.log file"
655
  msgstr ""
656
 
657
+ #: templates/sysinfo/system-information-panel.php:54
658
+ msgid "PHP error_log file"
659
  msgstr ""
660
 
661
+ #: templates/sysinfo/system-information-panel.php:59
662
+ #: templates/sysinfo/system-information-panel.php:83
663
+ msgid "Back to System panel"
 
 
 
 
 
 
 
664
  msgstr ""
665
 
666
  #: templates/sysinfo/system-information-panel.php:96
667
+ msgid "Back to top"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
668
  msgstr ""
669
 
670
+ #: templates/sysinfo/system-information-panel.php:104
671
+ msgid "Site URL"
672
  msgstr ""
673
 
674
+ #: templates/sysinfo/system-information-panel.php:112
675
+ msgid "Output IP Address"
676
  msgstr ""
677
 
678
+ #: templates/sysinfo/system-information-panel.php:120
679
+ msgid "Defined WP_CACHE"
680
  msgstr ""
681
 
682
+ #: templates/sysinfo/system-information-panel.php:123
683
+ msgid "Yes"
 
 
684
  msgstr ""
685
 
686
+ #: templates/sysinfo/system-information-panel.php:123
687
+ msgid "No"
 
 
688
  msgstr ""
689
 
690
+ #: templates/sysinfo/system-information-panel.php:159
691
  msgid "Show full PHPInfo"
692
  msgstr ""
693
 
694
+ #: templates/sysinfo/system-information-panel.php:167
695
+ msgid "Show log files"
 
 
 
 
696
  msgstr ""
697
 
698
  #: yit-plugin.php:194
769
  msgid "YITH"
770
  msgstr ""
771
 
772
+ #: templates/fields/dimensions.php:16
773
+ msgctxt "Position in the \"Dimensions\" field"
774
+ msgid "Top"
775
+ msgstr ""
776
+
777
+ #: templates/fields/dimensions.php:17
778
+ msgctxt "Position in the \"Dimensions\" field"
779
+ msgid "Right"
780
+ msgstr ""
781
+
782
+ #: templates/fields/dimensions.php:18
783
+ msgctxt "Position in the \"Dimensions\" field"
784
+ msgid "Bottom"
785
+ msgstr ""
786
+
787
+ #: templates/fields/dimensions.php:19
788
+ msgctxt "Position in the \"Dimensions\" field"
789
+ msgid "Left"
790
+ msgstr ""
791
+
792
+ #: templates/fields/dimensions.php:117
793
+ msgctxt "Tooltip in the \"Dimensions\" field"
794
+ msgid "Link values together"
795
+ msgstr ""
796
+
797
  #: templates/fields/onoff.php:24
798
+ msgctxt "YES/NO button: use MAX 3 characters!"
799
+ msgid "YES"
800
  msgstr ""
801
 
802
  #: templates/fields/onoff.php:25
803
+ msgctxt "YES/NO button: use MAX 3 characters!"
804
+ msgid "NO"
805
  msgstr ""
806
 
807
  #: yit-plugin.php:83
plugin-fw/lib/privacy/yit-privacy.php CHANGED
@@ -50,11 +50,11 @@ if ( !class_exists( 'YITH_Privacy' ) ) {
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' => '',
50
  if ( file_exists( $privacy_content_path ) )
51
  include $privacy_content_path;
52
 
53
+ return apply_filters( 'yith_plugin_fw_privacy_policy_content', ob_get_clean() );
54
  }
55
 
56
  public function get_sections() {
57
+ return apply_filters( 'yith_plugin_fw_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' => '',
plugin-fw/lib/yit-assets.php CHANGED
@@ -7,97 +7,111 @@
7
  * http://www.gnu.org/licenses/gpl-3.0.txt
8
  */
9
 
10
- !defined( 'ABSPATH' ) && exit; // Exit if accessed directly
11
-
12
- if ( !class_exists( 'YIT_Assets' ) ) {
13
- /**
14
- * YIT Assets
15
- *
16
- * @class YIT_Assets
17
- * @package YITH
18
- * @since 3.0.0
19
- * @author Leanza Francesco <leanzafrancesco@gmail.com>
20
- */
21
- class YIT_Assets {
22
- /** @var string */
23
- public $version = '1.0.0';
24
-
25
- /** @var YIT_Assets */
26
- private static $_instance;
27
-
28
- /** @return YIT_Assets */
29
- public static function instance() {
30
- return !is_null( self::$_instance ) ? self::$_instance : self::$_instance = new self();
31
- }
32
-
33
- /**
34
- * Constructor
35
- *
36
- * @since 1.0
37
- * @author Leanza Francesco <leanzafrancesco@gmail.com>
38
- */
39
- private function __construct() {
40
- $this->version = yith_plugin_fw_get_version();
41
- add_action( 'admin_enqueue_scripts', array( $this, 'register_styles_and_scripts' ) );
42
- }
43
-
44
- /**
45
- * Register styles and scripts
46
- */
47
- public function register_styles_and_scripts() {
48
- global $wp_scripts, $woocommerce;
49
-
50
- $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
51
-
52
- //scripts
53
- wp_register_script( 'yith-colorpicker', YIT_CORE_PLUGIN_URL . '/assets/js/yith-colorpicker.min.js', array( 'jquery', 'wp-color-picker' ), $this->version, true );
54
- wp_register_script( 'yith-plugin-fw-fields', YIT_CORE_PLUGIN_URL . '/assets/js/yith-fields' . $suffix . '.js', array( 'jquery', 'jquery-ui-datepicker', 'yith-colorpicker', 'codemirror', 'codemirror-javascript', 'jquery-ui-slider', 'jquery-ui-sortable' ), $this->version, true );
55
-
56
- wp_register_script( 'yit-metabox', YIT_CORE_PLUGIN_URL . '/assets/js/metabox' . $suffix . '.js', array( 'jquery', 'wp-color-picker', 'yith-plugin-fw-fields' ), $this->version, true );
57
- wp_register_script( 'yit-plugin-panel', YIT_CORE_PLUGIN_URL . '/assets/js/yit-plugin-panel' . $suffix . '.js', array( 'jquery', 'wp-color-picker', 'jquery-ui-sortable', 'yith-plugin-fw-fields' ), $this->version, true );
58
- wp_register_script( 'codemirror', YIT_CORE_PLUGIN_URL . '/assets/js/codemirror/codemirror.js', array( 'jquery' ), '3.15', true );
59
- wp_register_script( 'codemirror-javascript', YIT_CORE_PLUGIN_URL . '/assets/js/codemirror/javascript.js', array( 'jquery', 'codemirror' ), '3.15', true );
60
- wp_register_script( 'colorbox', YIT_CORE_PLUGIN_URL . '/assets/js/jquery.colorbox' . $suffix . '.js', array( 'jquery' ), '1.6.3', true );
61
- wp_register_script( 'yith_how_to', YIT_CORE_PLUGIN_URL . '/assets/js/how-to' . $suffix . '.js', array( 'jquery' ), $this->version, true );
62
- wp_register_script( 'yith-plugin-fw-wp-pages', YIT_CORE_PLUGIN_URL . '/assets/js/wp-pages' . $suffix . '.js', array( 'jquery' ), $this->version, false );
63
-
64
- //styles
65
- $jquery_version = isset( $wp_scripts->registered[ 'jquery-ui-core' ]->ver ) ? $wp_scripts->registered[ 'jquery-ui-core' ]->ver : '1.9.2';
66
- wp_register_style( 'codemirror', YIT_CORE_PLUGIN_URL . '/assets/css/codemirror/codemirror.css' );
67
- wp_register_style( 'yit-plugin-style', YIT_CORE_PLUGIN_URL . '/assets/css/yit-plugin-panel.css', array(), $this->version );
68
- wp_register_style( 'raleway-font', '//fonts.googleapis.com/css?family=Raleway:400,500,600,700,800,100,200,300,900' );
69
- wp_register_style( 'yit-jquery-ui-style', '//code.jquery.com/ui/' . $jquery_version . '/themes/smoothness/jquery-ui.css', array(), $jquery_version );
70
- wp_register_style( 'colorbox', YIT_CORE_PLUGIN_URL . '/assets/css/colorbox.css', array(), $this->version );
71
- wp_register_style( 'yit-upgrade-to-pro', YIT_CORE_PLUGIN_URL . '/assets/css/yit-upgrade-to-pro.css', array( 'colorbox' ), $this->version );
72
- wp_register_style( 'yit-plugin-metaboxes', YIT_CORE_PLUGIN_URL . '/assets/css/metaboxes.css', array(), $this->version );
73
- wp_register_style( 'yith-plugin-fw-fields', YIT_CORE_PLUGIN_URL . '/assets/css/yith-fields.css', false, $this->version );
74
-
75
- $wc_version_suffix = '';
76
- if ( function_exists( 'WC' ) || !empty( $woocommerce ) ) {
77
- $woocommerce_version = function_exists( 'WC' ) ? WC()->version : $woocommerce->version;
78
- $wc_version_suffix = version_compare( $woocommerce_version, '3.0.0', '>=' ) ? '' : '-wc-2.6';
79
-
80
- wp_register_style( 'woocommerce_admin_styles', $woocommerce->plugin_url() . '/assets/css/admin.css', array(), $woocommerce_version );
81
- } else {
82
- wp_register_script( 'select2', '//cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/js/select2.min.js', array( 'jquery' ), '4.0.3', true );
83
- wp_register_style( 'yith-select2-no-wc', YIT_CORE_PLUGIN_URL . '/assets/css/yith-select2-no-wc.css', false, $this->version );
84
- }
85
-
86
- wp_register_script( 'yith-enhanced-select', YIT_CORE_PLUGIN_URL . '/assets/js/yith-enhanced-select' . $wc_version_suffix . $suffix . '.js', array( 'jquery', 'select2' ), $this->version, true );
87
- wp_localize_script( 'yith-enhanced-select', 'yith_framework_enhanced_select_params', array(
88
- 'ajax_url' => admin_url( 'admin-ajax.php' ),
89
- 'search_posts_nonce' => wp_create_nonce( 'search-posts' ),
90
- 'search_terms_nonce' => wp_create_nonce( 'search-terms' ),
91
- 'search_customers_nonce' => wp_create_nonce( 'search-customers' ),
92
- ) );
93
-
94
- wp_localize_script( 'yith-plugin-fw-fields', 'yith_framework_fw_fields', array(
95
- 'admin_url' => admin_url( 'admin.php' ),
96
- 'ajax_url' => admin_url( 'admin-ajax.php' ),
97
- ) );
98
- wp_enqueue_style( 'yith-plugin-fw-admin', YIT_CORE_PLUGIN_URL . '/assets/css/admin.css', array(), $this->version );
99
- }
100
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
101
  }
102
 
103
  YIT_Assets::instance();
7
  * http://www.gnu.org/licenses/gpl-3.0.txt
8
  */
9
 
10
+ ! defined( 'ABSPATH' ) && exit; // Exit if accessed directly
11
+
12
+ if ( ! class_exists( 'YIT_Assets' ) ) {
13
+ /**
14
+ * YIT Assets
15
+ *
16
+ * @class YIT_Assets
17
+ * @package YITH
18
+ * @since 3.0.0
19
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
20
+ */
21
+ class YIT_Assets {
22
+ /** @var string */
23
+ public $version = '1.0.0';
24
+
25
+ /** @var YIT_Assets */
26
+ private static $_instance;
27
+
28
+ /** @return YIT_Assets */
29
+ public static function instance() {
30
+ return ! is_null( self::$_instance ) ? self::$_instance : self::$_instance = new self();
31
+ }
32
+
33
+ /**
34
+ * Constructor
35
+ *
36
+ * @since 1.0
37
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
38
+ */
39
+ private function __construct() {
40
+ $this->version = yith_plugin_fw_get_version();
41
+ add_action( 'admin_enqueue_scripts', array( $this, 'register_styles_and_scripts' ) );
42
+ }
43
+
44
+ /**
45
+ * Register styles and scripts
46
+ */
47
+ public function register_styles_and_scripts() {
48
+ global $wp_scripts, $woocommerce, $wp_version;
49
+
50
+ $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
51
+
52
+ //scripts
53
+ wp_register_script( 'yith-colorpicker', YIT_CORE_PLUGIN_URL . '/assets/js/yith-colorpicker.min.js', array( 'jquery', 'wp-color-picker' ), $this->version, true );
54
+ wp_register_script( 'yith-plugin-fw-fields', YIT_CORE_PLUGIN_URL . '/assets/js/yith-fields' . $suffix . '.js', array( 'jquery', 'jquery-ui-datepicker', 'yith-colorpicker', 'codemirror', 'codemirror-javascript', 'jquery-ui-slider', 'jquery-ui-sortable' ), $this->version, true );
55
+
56
+ wp_register_script( 'yit-metabox', YIT_CORE_PLUGIN_URL . '/assets/js/metabox' . $suffix . '.js', array( 'jquery', 'wp-color-picker', 'yith-plugin-fw-fields' ), $this->version, true );
57
+ wp_register_script( 'yit-plugin-panel', YIT_CORE_PLUGIN_URL . '/assets/js/yit-plugin-panel' . $suffix . '.js', array( 'jquery', 'wp-color-picker', 'jquery-ui-sortable', 'yith-plugin-fw-fields' ), $this->version, true );
58
+ wp_register_script( 'codemirror', YIT_CORE_PLUGIN_URL . '/assets/js/codemirror/codemirror.js', array( 'jquery' ), '3.15', true );
59
+ wp_register_script( 'codemirror-javascript', YIT_CORE_PLUGIN_URL . '/assets/js/codemirror/javascript.js', array( 'jquery', 'codemirror' ), '3.15', true );
60
+ wp_register_script( 'colorbox', YIT_CORE_PLUGIN_URL . '/assets/js/jquery.colorbox' . $suffix . '.js', array( 'jquery' ), '1.6.3', true );
61
+ wp_register_script( 'yith_how_to', YIT_CORE_PLUGIN_URL . '/assets/js/how-to' . $suffix . '.js', array( 'jquery' ), $this->version, true );
62
+ wp_register_script( 'yith-plugin-fw-wp-pages', YIT_CORE_PLUGIN_URL . '/assets/js/wp-pages' . $suffix . '.js', array( 'jquery' ), $this->version, false );
63
+
64
+ //styles
65
+ $jquery_version = isset( $wp_scripts->registered['jquery-ui-core']->ver ) ? $wp_scripts->registered['jquery-ui-core']->ver : '1.9.2';
66
+ wp_register_style( 'codemirror', YIT_CORE_PLUGIN_URL . '/assets/css/codemirror/codemirror.css' );
67
+ wp_register_style( 'yit-plugin-style', YIT_CORE_PLUGIN_URL . '/assets/css/yit-plugin-panel.css', array(), $this->version );
68
+ wp_register_style( 'raleway-font', '//fonts.googleapis.com/css?family=Raleway:400,500,600,700,800,100,200,300,900' );
69
+ wp_register_style( 'yit-jquery-ui-style', '//code.jquery.com/ui/' . $jquery_version . '/themes/smoothness/jquery-ui.css', array(), $jquery_version );
70
+ wp_register_style( 'colorbox', YIT_CORE_PLUGIN_URL . '/assets/css/colorbox.css', array(), $this->version );
71
+ wp_register_style( 'yit-upgrade-to-pro', YIT_CORE_PLUGIN_URL . '/assets/css/yit-upgrade-to-pro.css', array( 'colorbox' ), $this->version );
72
+ wp_register_style( 'yit-plugin-metaboxes', YIT_CORE_PLUGIN_URL . '/assets/css/metaboxes.css', array(), $this->version );
73
+ wp_register_style( 'yith-plugin-fw-fields', YIT_CORE_PLUGIN_URL . '/assets/css/yith-fields.css', false, $this->version );
74
+
75
+ $wc_version_suffix = '';
76
+ if ( function_exists( 'WC' ) || ! empty( $woocommerce ) ) {
77
+ $woocommerce_version = function_exists( 'WC' ) ? WC()->version : $woocommerce->version;
78
+ $wc_version_suffix = version_compare( $woocommerce_version, '3.0.0', '>=' ) ? '' : '-wc-2.6';
79
+
80
+ wp_register_style( 'woocommerce_admin_styles', $woocommerce->plugin_url() . '/assets/css/admin.css', array(), $woocommerce_version );
81
+ } else {
82
+ wp_register_script( 'select2', '//cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/js/select2.min.js', array( 'jquery' ), '4.0.3', true );
83
+ wp_register_style( 'yith-select2-no-wc', YIT_CORE_PLUGIN_URL . '/assets/css/yith-select2-no-wc.css', false, $this->version );
84
+ }
85
+
86
+ wp_register_script( 'yith-enhanced-select', YIT_CORE_PLUGIN_URL . '/assets/js/yith-enhanced-select' . $wc_version_suffix . $suffix . '.js', array( 'jquery', 'select2' ), $this->version, true );
87
+ wp_localize_script( 'yith-enhanced-select', 'yith_framework_enhanced_select_params', array(
88
+ 'ajax_url' => admin_url( 'admin-ajax.php' ),
89
+ 'search_posts_nonce' => wp_create_nonce( 'search-posts' ),
90
+ 'search_terms_nonce' => wp_create_nonce( 'search-terms' ),
91
+ 'search_customers_nonce' => wp_create_nonce( 'search-customers' ),
92
+ ) );
93
+
94
+ wp_localize_script( 'yith-plugin-fw-fields', 'yith_framework_fw_fields', array(
95
+ 'admin_url' => admin_url( 'admin.php' ),
96
+ 'ajax_url' => admin_url( 'admin-ajax.php' ),
97
+ ) );
98
+
99
+
100
+ // Localize Colorpicker to avoid issues with WordPress 5.5
101
+ if ( version_compare( $wp_version, '5.5-RC', '>=' ) ) {
102
+ wp_localize_script( 'yith-colorpicker', 'wpColorPickerL10n', array(
103
+ 'clear' => __( 'Clear' ),
104
+ 'clearAriaLabel' => __( 'Clear color' ),
105
+ 'defaultString' => __( 'Default' ),
106
+ 'defaultAriaLabel' => __( 'Select default color' ),
107
+ 'pick' => __( 'Select Color' ),
108
+ 'defaultLabel' => __( 'Color value' ),
109
+ ) );
110
+ }
111
+
112
+ wp_enqueue_style( 'yith-plugin-fw-admin', YIT_CORE_PLUGIN_URL . '/assets/css/admin.css', array(), $this->version );
113
+ }
114
+ }
115
  }
116
 
117
  YIT_Assets::instance();
plugin-fw/lib/yit-plugin-panel-wc.php CHANGED
@@ -94,8 +94,10 @@ if ( !class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
94
  add_action( 'yith_plugin_fw_get_field_after', array( $this, 'add_yith_ui' ) );
95
  add_action( 'yith_plugin_fw_before_woocommerce_panel', array( $this, 'add_plugin_banner' ), 10, 1 );
96
  add_action( 'admin_action_yith_plugin_fw_save_toggle_element', array( $this, 'save_toggle_element_options' ) );
 
97
 
98
- add_action( 'admin_enqueue_scripts', array( $this, 'init_wp_with_tabs' ), 11 );
 
99
 
100
  // init actions once to prevent multiple actions
101
  static::_init_actions();
@@ -136,7 +138,6 @@ if ( !class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
136
  * @author Antonio La Rocca <antonio.larocca@yithemes.com>
137
  */
138
  public function yit_panel() {
139
- $this->maybe_redirect_to_proper_wp_page();
140
  $additional_info = array(
141
  'current_tab' => $this->get_current_tab(),
142
  'current_sub_tab' => $this->get_current_sub_tab(),
@@ -212,12 +213,13 @@ if ( !class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
212
  public function get_current_tab() {
213
  global $pagenow;
214
  $tabs = $this->get_available_tabs();
 
215
 
216
- if ( $pagenow == 'admin.php' && isset( $_REQUEST[ 'tab' ] ) && in_array( $_REQUEST[ 'tab' ], $tabs ) ) {
217
- return $_REQUEST[ 'tab' ];
218
- } else {
219
- return $tabs[ 0 ];
220
  }
 
 
221
  }
222
 
223
  /**
@@ -302,12 +304,13 @@ if ( !class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
302
 
303
  $yit_options = $this->get_main_array_options();
304
  $option_key = $this->get_current_option_key();
 
305
 
306
  if ( version_compare( WC()->version, '2.4.0', '>=' ) ) {
307
  if ( !empty( $yit_options[ $option_key ] ) ) {
308
  foreach ( $yit_options[ $option_key ] as $option ) {
309
  if ( isset( $option[ 'id' ] ) && isset( $_POST[ $option[ 'id' ] ] ) && isset( $option[ 'type' ] ) && !in_array( $option[ 'type' ], self::$wc_type ) ) {
310
- $_POST[ $option[ 'id' ] ] = maybe_serialize( $_POST[ $option[ 'id' ] ] );
311
  }
312
  }
313
  }
@@ -327,7 +330,7 @@ if ( !class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
327
  }
328
  }
329
 
330
- woocommerce_update_options( $yit_options[ $option_key ] );
331
 
332
  do_action( 'yit_panel_wc_after_update' );
333
 
@@ -339,18 +342,43 @@ if ( !class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
339
 
340
  $yit_options = $this->get_main_array_options();
341
  $option_key = $this->get_current_option_key();
 
 
 
 
 
342
  foreach ( $yit_options[ $option_key ] as $id => $option ) {
343
- if ( isset( $option[ 'yith-type' ] ) && $option[ 'yith-type' ] == 'multi-colorpicker' && !empty( $option[ 'colorpickers' ] ) ) {
344
- $default = [];
345
- foreach ( $option[ 'colorpickers' ] as $colorpicker ) {
346
- $default[ $colorpicker[ 'id' ] ] = isset( $colorpicker[ 'default' ] ) ? $colorpicker[ 'default' ] : '';
347
- }
348
- update_option( $option[ 'id' ], $default );
349
- } elseif ( isset( $option[ 'default' ] ) ) {
350
- update_option( $option[ 'id' ], $option[ 'default' ] );
351
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
352
  }
353
 
 
 
 
 
 
 
354
  do_action( 'yit_panel_wc_after_reset' );
355
  }
356
  }
@@ -460,25 +488,26 @@ if ( !class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
460
  delete_option( 'yit_plugin_fw_panel_wc_default_options_set' );
461
  }
462
 
463
- /**
464
- * Add the WooCommerce body class in plugin panel page
465
- *
466
- * @param array $admin_body_classes The body classes
467
- * @return array Filtered body classes
468
- * @author Andrea Grillo <andrea.grillo@yithemes.com>
469
- * @since 2.0
470
- */
471
- public static function admin_body_class( $admin_body_classes ) {
472
- global $pagenow;
473
 
474
- $assets_screen_ids = (array) apply_filters( 'yith_plugin_fw_wc_panel_screen_ids_for_assets', array() );
475
 
 
 
 
 
476
 
477
- if ( ( 'admin.php' == $pagenow && ( strpos( get_current_screen()->id, 'yith-plugins_page' ) !== false || in_array( get_current_screen()->id, $assets_screen_ids ) ) ) )
478
- $admin_body_classes = substr_count( $admin_body_classes, self::$body_class ) == 0 ? $admin_body_classes . self::$body_class : $admin_body_classes;
479
-
480
- return 'admin.php' == $pagenow && substr_count( $admin_body_classes, 'woocommerce' ) == 0 ? $admin_body_classes .= ' woocommerce ' : $admin_body_classes;
481
- }
482
 
483
  /**
484
  * Maybe unserialize panel data
@@ -491,8 +520,8 @@ if ( !class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
491
  * @since 2.0
492
  */
493
  public function maybe_unserialize_panel_data( $value, $option, $raw_value ) {
494
- if ( !version_compare( WC()->version, '2.4.0', '>=' ) || !isset( $option[ 'type' ] ) || in_array( $option[ 'type' ], self::$wc_type ) ) {
495
- return $value;
496
  }
497
 
498
  $yit_options = $this->get_main_array_options();
@@ -618,6 +647,9 @@ if ( !class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
618
  }
619
  $field[ 'value' ] = $value;
620
 
 
 
 
621
  require( YIT_CORE_PLUGIN_TEMPLATE_PATH . '/panel/woocommerce/woocommerce-option-row.php' );
622
  }
623
  }
@@ -687,5 +719,47 @@ if ( !class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
687
 
688
  parent::print_tabs_nav( $args );
689
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
690
  }
691
  }
94
  add_action( 'yith_plugin_fw_get_field_after', array( $this, 'add_yith_ui' ) );
95
  add_action( 'yith_plugin_fw_before_woocommerce_panel', array( $this, 'add_plugin_banner' ), 10, 1 );
96
  add_action( 'admin_action_yith_plugin_fw_save_toggle_element', array( $this, 'save_toggle_element_options' ) );
97
+ add_filter( 'woocommerce_admin_settings_sanitize_option', array( $this, 'sanitize_onoff_value' ), 20, 3 );
98
 
99
+ add_action( 'admin_enqueue_scripts', array( $this, 'init_wp_with_tabs' ), 11 );
100
+ add_action( 'admin_init', array( $this, 'maybe_redirect_to_proper_wp_page' ) );
101
 
102
  // init actions once to prevent multiple actions
103
  static::_init_actions();
138
  * @author Antonio La Rocca <antonio.larocca@yithemes.com>
139
  */
140
  public function yit_panel() {
 
141
  $additional_info = array(
142
  'current_tab' => $this->get_current_tab(),
143
  'current_sub_tab' => $this->get_current_sub_tab(),
213
  public function get_current_tab() {
214
  global $pagenow;
215
  $tabs = $this->get_available_tabs();
216
+ $tab = $tabs[0];
217
 
218
+ if ( $pagenow == 'admin.php' && isset( $_REQUEST[ 'tab' ] ) && in_array( $_REQUEST[ 'tab' ], $tabs ) ) {
219
+ $tab = esc_html( $_REQUEST[ 'tab' ] );
 
 
220
  }
221
+
222
+ return apply_filters('yith_wc_plugin_panel_current_tab', $tab );
223
  }
224
 
225
  /**
304
 
305
  $yit_options = $this->get_main_array_options();
306
  $option_key = $this->get_current_option_key();
307
+ $yit_options = $this->check_for_save_single_option( $yit_options );
308
 
309
  if ( version_compare( WC()->version, '2.4.0', '>=' ) ) {
310
  if ( !empty( $yit_options[ $option_key ] ) ) {
311
  foreach ( $yit_options[ $option_key ] as $option ) {
312
  if ( isset( $option[ 'id' ] ) && isset( $_POST[ $option[ 'id' ] ] ) && isset( $option[ 'type' ] ) && !in_array( $option[ 'type' ], self::$wc_type ) ) {
313
+ $_POST[ $option[ 'id' ] ] = maybe_serialize( $_POST[ $option[ 'id' ] ] );
314
  }
315
  }
316
  }
330
  }
331
  }
332
 
333
+ woocommerce_update_options( $yit_options[ $option_key ] );
334
 
335
  do_action( 'yit_panel_wc_after_update' );
336
 
342
 
343
  $yit_options = $this->get_main_array_options();
344
  $option_key = $this->get_current_option_key();
345
+ $yit_options = $this->check_for_save_single_option( $yit_options );
346
+
347
+ // Collect an array of options to be saved as array and not as single option.
348
+ $array_options = array();
349
+
350
  foreach ( $yit_options[ $option_key ] as $id => $option ) {
351
+
352
+ // make sure option id is not an array
353
+ $matches = array();
354
+ isset( $option['id'] ) && preg_match('/(.*)\[(.*)\]/', $option['id'], $matches );
355
+
356
+ if( ! empty( $matches ) && isset( $option['default'] ) ) {
357
+ if( ! empty( $matches[2] ) ) {
358
+ $array_options[ $matches[1] ][ $matches[2] ] = $option[ 'default' ];
359
+ } else {
360
+ $array_options[ $matches[1] ][] = $option[ 'default' ];
361
+ }
362
+ }
363
+ else {
364
+ if ( isset( $option['yith-type'] ) && $option['yith-type'] == 'multi-colorpicker' && ! empty( $option['colorpickers'] ) ) {
365
+ $default = [];
366
+ foreach ( $option['colorpickers'] as $colorpicker ) {
367
+ $default[ $colorpicker['id'] ] = isset( $colorpicker['default'] ) ? $colorpicker['default'] : '';
368
+ }
369
+ update_option( $option['id'], $default );
370
+ } elseif ( isset( $option['default'] ) ) {
371
+ update_option( $option['id'], $option['default'] );
372
+ }
373
+ }
374
  }
375
 
376
+ // Save array options if any
377
+ foreach ( $array_options as $key => $value ) {
378
+ update_option( $key, $value );
379
+ }
380
+
381
+
382
  do_action( 'yit_panel_wc_after_reset' );
383
  }
384
  }
488
  delete_option( 'yit_plugin_fw_panel_wc_default_options_set' );
489
  }
490
 
491
+ /**
492
+ * Add the WooCommerce body class in plugin panel page
493
+ *
494
+ * @param string $admin_body_classes The body classes.
495
+ * @return string Filtered body classes
496
+ * @author Andrea Grillo <andrea.grillo@yithemes.com>
497
+ * @since 2.0
498
+ */
499
+ public static function admin_body_class( $admin_body_classes ) {
500
+ global $pagenow;
501
 
502
+ $assets_screen_ids = (array) apply_filters( 'yith_plugin_fw_wc_panel_screen_ids_for_assets', array() );
503
 
504
+ if ( ( 'admin.php' == $pagenow && ( strpos( get_current_screen()->id, 'yith-plugins_page' ) !== false || in_array( get_current_screen()->id, $assets_screen_ids ) ) ) ) {
505
+ $admin_body_classes = substr_count( $admin_body_classes, self::$body_class ) == 0 ? $admin_body_classes . self::$body_class : $admin_body_classes;
506
+ $admin_body_classes = substr_count( $admin_body_classes, 'woocommerce' ) == 0 ? $admin_body_classes . ' woocommerce ' : $admin_body_classes;
507
+ }
508
 
509
+ return $admin_body_classes;
510
+ }
 
 
 
511
 
512
  /**
513
  * Maybe unserialize panel data
520
  * @since 2.0
521
  */
522
  public function maybe_unserialize_panel_data( $value, $option, $raw_value ) {
523
+ if ( ! version_compare( WC()->version, '2.4.0', '>=' ) || !isset( $option[ 'type' ] ) || in_array( $option[ 'type' ], self::$wc_type ) ) {
524
+ return $value;
525
  }
526
 
527
  $yit_options = $this->get_main_array_options();
647
  }
648
  $field[ 'value' ] = $value;
649
 
650
+ // let's filter field data just before print
651
+ $field = apply_filters( 'yith_plugin_fw_wc_panel_field_data', $field );
652
+
653
  require( YIT_CORE_PLUGIN_TEMPLATE_PATH . '/panel/woocommerce/woocommerce-option-row.php' );
654
  }
655
  }
719
 
720
  parent::print_tabs_nav( $args );
721
  }
722
+
723
+ /**
724
+ * Sanitize OnOff Option
725
+ *
726
+ * @param $value mixed Option value
727
+ * @param $option mixed Option settings array
728
+ * @param $raw_value string Raw option value
729
+ * @return mixed Filtered return value
730
+ * @author Andrea Grillo <andrea.grillo@yithemes.com>
731
+ * @since 3.0.0
732
+ */
733
+ public static function sanitize_onoff_value( $value, $option, $raw_value ) {
734
+ if ( isset( $option[ 'type' ] ) && in_array( $option[ 'type' ], array( 'checkbox', 'onoff' ) ) ) {
735
+ $value = yith_plugin_fw_is_true( $raw_value ) ? 'yes' : 'no';
736
+
737
+ if ( !empty( $option[ 'yith-sanitize-callback' ] ) && is_callable( $option[ 'yith-sanitize-callback' ] ) ) {
738
+ $value = call_user_func( $option[ 'yith-sanitize-callback' ], $value );
739
+ }
740
+ }
741
+
742
+ return $value;
743
+ }
744
+
745
+ /**
746
+ * Check if need to save the toggle element to a single options instead of an array
747
+ *
748
+ * @param $yit_options mixed|array Original options array
749
+ *
750
+ * @return mixed|array New options array
751
+ * @author Andrea Grillo <andrea.grillo@yithemes.com>
752
+ * @since 3.0.0
753
+ */
754
+ public function check_for_save_single_option( $yit_options ){
755
+ foreach ( $yit_options as $key => $options_list ){
756
+ foreach ( $options_list as $value ){
757
+ if( ! empty( $value['yith-type'] ) && 'toggle-element-fixed' == $value['yith-type'] && isset( $value['save_single_options'] ) && true === $value['save_single_options'] ){
758
+ $yit_options[ $key ] = array_merge( $yit_options[ $key ] , $value['elements'] );
759
+ }
760
+ }
761
+ }
762
+ return $yit_options;
763
+ }
764
  }
765
  }
plugin-fw/lib/yit-plugin-panel.php CHANGED
@@ -7,1327 +7,1374 @@
7
  * http://www.gnu.org/licenses/gpl-3.0.txt
8
  */
9
 
10
- if ( !defined( 'ABSPATH' ) ) {
11
- exit;
12
  } // Exit if accessed directly
13
 
14
- if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
15
- /**
16
- * YIT Plugin Panel
17
- * Setting Page to Manage Plugins
18
- *
19
- * @class YIT_Plugin_Panel
20
- * @package YITH
21
- * @since 1.0
22
- * @author Your Inspiration Themes
23
- */
24
- class YIT_Plugin_Panel {
25
-
26
- /**
27
- * @var string version of class
28
- */
29
- public $version = '1.0.0';
30
-
31
- /**
32
- * @var array a setting list of parameters
33
- */
34
- public $settings = array();
35
-
36
- /**
37
- * @var array
38
- */
39
- protected $_tabs_path_files;
40
-
41
- /**
42
- * @var array
43
- */
44
- protected $_main_array_options;
45
-
46
- /**
47
- * @var array
48
- */
49
- protected $_tabs_hierarchy;
50
-
51
- /**
52
- * @var array
53
- */
54
- protected static $_panel_tabs_in_wp_pages = array();
55
-
56
- /**
57
- * @var array
58
- */
59
- public $links;
60
-
61
- /**
62
- * @var bool
63
- */
64
- protected static $_actions_initialized = false;
65
-
66
- /**
67
- * Constructor
68
- *
69
- * @param array $args
70
- * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
71
- * @since 1.0
72
- */
73
- public function __construct( $args = array() ) {
74
-
75
- if ( !empty( $args ) ) {
76
-
77
- $default_args = array(
78
- 'parent_slug' => 'edit.php?',
79
- 'page_title' => __( 'Plugin Settings', 'yith-plugin-fw' ),
80
- 'menu_title' => __( 'Settings', 'yith-plugin-fw' ),
81
- 'capability' => 'manage_options',
82
- 'icon_url' => '',
83
- 'position' => null
84
- );
85
-
86
- $args = apply_filters( 'yit_plugin_fw_panel_option_args', wp_parse_args( $args, $default_args ) );
87
- if ( isset( $args[ 'parent_page' ] ) && 'yit_plugin_panel' === $args[ 'parent_page' ] )
88
- $args[ 'parent_page' ] = 'yith_plugin_panel';
89
-
90
- $this->settings = $args;
91
- $this->_tabs_path_files = $this->get_tabs_path_files();
92
-
93
- if ( isset( $this->settings[ 'create_menu_page' ] ) && $this->settings[ 'create_menu_page' ] ) {
94
- $this->add_menu_page();
95
- }
96
-
97
- if ( !empty( $this->settings[ 'links' ] ) ) {
98
- $this->links = $this->settings[ 'links' ];
99
- }
100
-
101
- add_action( 'admin_init', array( $this, 'register_settings' ) );
102
- add_action( 'admin_menu', array( $this, 'add_setting_page' ), 20 );
103
- add_action( 'admin_menu', array( $this, 'add_premium_version_upgrade_to_menu' ), 100 );
104
- add_action( 'admin_bar_menu', array( $this, 'add_admin_bar_menu' ), 100 );
105
- add_action( 'admin_init', array( $this, 'add_fields' ) );
106
-
107
- add_action( 'admin_enqueue_scripts', array( $this, 'init_wp_with_tabs' ), 11 );
108
-
109
- // init actions once to prevent multiple actions
110
- static::_init_actions();
111
- }
112
-
113
- add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
 
114
 
115
  //yith-plugin-ui
116
  add_action( 'yith_plugin_fw_before_yith_panel', array( $this, 'add_plugin_banner' ), 10, 1 );
117
  add_action( 'wp_ajax_yith_plugin_fw_save_toggle_element', array( $this, 'save_toggle_element_options' ) );
118
-
119
- }
120
-
121
- /**
122
- * Init actions to show YITH Panel tabs in WP Pages
123
- *
124
- * @author Leanza Francesco <leanzafrancesco@gmail.com>
125
- * @since 3.4.0
126
- */
127
- public function init_wp_with_tabs() {
128
- if ( !current_user_can( $this->settings[ 'capability' ] ) ) {
129
- return;
130
- }
131
-
132
- global $pagenow, $post_type, $taxonomy;
133
- $tabs = false;
134
-
135
- if ( in_array( $pagenow, array( 'post.php', 'post-new.php', 'edit.php' ), true )
136
- && !in_array( $post_type, array( 'product', 'page', 'post' ) ) ) {
137
- $tabs = $this->get_post_type_tabs( $post_type );
138
- } else if ( in_array( $pagenow, array( 'edit-tags.php', 'term.php' ), true ) ) {
139
- $tabs = $this->get_taxonomy_tabs( $taxonomy );
140
- }
141
-
142
- if ( $tabs ) {
143
- // tabs_in_edit
144
- $current_tab_args = array(
145
- 'page' => $this->settings[ 'page' ],
146
- 'current_tab' => isset( $tabs[ 'tab' ] ) ? $tabs[ 'tab' ] : '',
147
- 'current_sub_tab' => isset( $tabs[ 'sub_tab' ] ) ? $tabs[ 'sub_tab' ] : ''
148
- );
149
-
150
- wp_enqueue_style( 'yit-plugin-style' );
151
- wp_enqueue_style( 'yith-plugin-fw-fields' );
152
- wp_enqueue_script( 'yith-plugin-fw-wp-pages' );
153
-
154
- if ( !self::$_panel_tabs_in_wp_pages ) {
155
- self::$_panel_tabs_in_wp_pages = $current_tab_args;
156
- add_action( 'all_admin_notices', array( $this, 'print_panel_tabs_in_wp_pages' ) );
157
- add_action( 'admin_footer', array( $this, 'print_panel_tabs_in_wp_pages_end' ) );
158
- add_filter( 'parent_file', array( $this, 'set_parent_file_to_handle_menu_for_wp_pages' ) );
159
- add_filter( 'submenu_file', array( $this, 'set_submenu_file_to_handle_menu_for_wp_pages' ), 10, 2 );
160
- }
161
- }
162
- }
163
-
164
- /**
165
- * Init actions once to prevent multiple actions
166
- *
167
- * @since 3.0.0
168
- * @author Leanza Francesco <leanzafrancesco@gmail.com>
169
- */
170
- protected static function _init_actions() {
171
- if ( !static::$_actions_initialized ) {
172
- add_filter( 'admin_body_class', array( __CLASS__, 'add_body_class' ) );
173
-
174
- // sort plugins by name in YITH Plugins menu
175
- add_action( 'admin_menu', array( __CLASS__, 'sort_plugins' ), 90 );
176
- add_filter( 'add_menu_classes', array( __CLASS__, 'add_menu_class_in_yith_plugin' ) );
177
-
178
-
179
- static::$_actions_initialized = true;
180
- }
181
- }
182
-
183
- protected function _maybe_init_vars() {
184
- if ( !isset( $this->_main_array_options ) && !isset( $this->_tabs_hierarchy ) ) {
185
- $options_path = $this->settings[ 'options-path' ];
186
- $this->_main_array_options = array();
187
- $this->_tabs_hierarchy = array();
188
-
189
- foreach ( $this->settings[ 'admin-tabs' ] as $item => $v ) {
190
- $path = trailingslashit( $options_path ) . $item . '-options.php';
191
- $path = apply_filters( 'yith_plugin_panel_item_options_path', $path, $options_path, $item, $this );
192
- if ( file_exists( $path ) ) {
193
- $_tab = include $path;
194
- $this->_main_array_options = array_merge( $this->_main_array_options, $_tab );
195
- $sub_tabs = $this->get_sub_tabs( $_tab );
196
- $current_tab_key = array_keys( $_tab )[ 0 ];
197
-
198
- $this->_tabs_hierarchy[ $current_tab_key ] = array_merge( array( 'parent' => '', 'has_sub_tabs' => !!$sub_tabs ), $this->get_tab_info_by_options( $_tab[ $current_tab_key ] ) );
199
-
200
- foreach ( $sub_tabs as $sub_item => $sub_options ) {
201
- if ( strpos( $sub_item, $item . '-' ) === 0 ) {
202
- $sub_item = substr( $sub_item, strlen( $item ) + 1 );
203
- }
204
- $sub_tab_path = $options_path . '/' . $item . '/' . $sub_item . '-options.php';
205
- $sub_tab_path = apply_filters( 'yith_plugin_panel_sub_tab_item_options_path', $sub_tab_path, $sub_tabs, $sub_item, $this );
206
-
207
- if ( file_exists( $sub_tab_path ) ) {
208
- $_sub_tab = include $sub_tab_path;
209
- $this->_main_array_options = array_merge( $this->_main_array_options, $_sub_tab );
210
-
211
- $current_sub_tab_key = array_keys( $_sub_tab )[ 0 ];
212
- $this->_tabs_hierarchy[ $current_sub_tab_key ] = array_merge( array( 'parent' => $current_tab_key ), $this->get_tab_info_by_options( $_sub_tab[ $current_sub_tab_key ] ) );
213
- }
214
- }
215
- }
216
- }
217
- }
218
- }
219
-
220
- /**
221
- * Add yith-plugin-fw-panel in body classes in Panel pages
222
- *
223
- * @param $admin_body_classes
224
- * @return string
225
- * @author Leanza Francesco <leanzafrancesco@gmail.com>
226
- * @since 3.0.0
227
- */
228
- public static function add_body_class( $admin_body_classes ) {
229
- global $pagenow;
230
- if ( ( 'admin.php' == $pagenow && strpos( get_current_screen()->id, 'yith-plugins_page' ) !== false ) )
231
- $admin_body_classes = substr_count( $admin_body_classes, ' yith-plugin-fw-panel ' ) == 0 ? $admin_body_classes . ' yith-plugin-fw-panel ' : $admin_body_classes;
232
-
233
- return $admin_body_classes;
234
- }
235
-
236
- /**
237
- * Add Menu page link
238
- *
239
- * @return void
240
- * @since 1.0
241
- * @author Andrea Grillo <andrea.grillo@yithemes.com>
242
- */
243
- public function add_menu_page() {
244
- global $admin_page_hooks;
245
-
246
- if ( !isset( $admin_page_hooks[ 'yith_plugin_panel' ] ) ) {
247
- $position = apply_filters( 'yit_plugins_menu_item_position', '62.32' );
248
- $capability = apply_filters( 'yit_plugin_panel_menu_page_capability', 'manage_options' );
249
- $show = apply_filters( 'yit_plugin_panel_menu_page_show', true );
250
-
251
- // YITH text must not be translated
252
- if ( !!$show ) {
253
- add_menu_page( 'yith_plugin_panel', 'YITH', $capability, 'yith_plugin_panel', null, yith_plugin_fw_get_default_logo(), $position );
254
- $admin_page_hooks[ 'yith_plugin_panel' ] = 'yith-plugins'; // prevent issues for backward compatibility
255
- }
256
- }
257
- }
258
-
259
- /**
260
- * Remove duplicate submenu
261
- * Submenu page hack: Remove the duplicate YIT Plugin link on subpages
262
- *
263
- * @return void
264
- * @since 1.0
265
- * @author Andrea Grillo <andrea.grillo@yithemes.com>
266
- */
267
- public function remove_duplicate_submenu_page() {
268
- /* === Duplicate Items Hack === */
269
- remove_submenu_page( 'yith_plugin_panel', 'yith_plugin_panel' );
270
- }
271
-
272
- /**
273
- * Enqueue script and styles in admin side
274
- * Add style and scripts to administrator
275
- *
276
- * @return void
277
- * @since 1.0
278
- * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
279
- * @author Leanza Francesco <leanzafrancesco@gmail.com>
280
- */
281
- public function admin_enqueue_scripts() {
282
- global $pagenow;
283
-
284
- // enqueue styles only in the current panel page
285
- if ( 'admin.php' === $pagenow && strpos( get_current_screen()->id, $this->settings[ 'page' ] ) !== false || apply_filters( 'yit_plugin_panel_asset_loading', false ) ) {
286
- wp_enqueue_media();
287
-
288
- wp_enqueue_style( 'yith-plugin-fw-fields' );
289
- wp_enqueue_style( 'yit-jquery-ui-style' );
290
- wp_enqueue_style( 'raleway-font' );
291
-
292
- wp_enqueue_script( 'jquery-ui' );
293
- wp_enqueue_script( 'jquery-ui-core' );
294
- wp_enqueue_script( 'jquery-ui-dialog' );
295
- wp_enqueue_script( 'yith_how_to' );
296
- wp_enqueue_script( 'yith-plugin-fw-fields' );
297
- }
298
-
299
- if ( ( 'admin.php' == $pagenow && yith_plugin_fw_is_panel() ) || apply_filters( 'yit_plugin_panel_asset_loading', false ) ) {
300
- wp_enqueue_media();
301
- wp_enqueue_style( 'yit-plugin-style' );
302
- wp_enqueue_script( 'yit-plugin-panel' );
303
- }
304
-
305
- if ( 'admin.php' == $pagenow && strpos( get_current_screen()->id, 'yith_upgrade_premium_version' ) !== false ) {
306
- wp_enqueue_style( 'yit-upgrade-to-pro' );
307
- wp_enqueue_script( 'colorbox' );
308
- }
309
-
310
- }
311
-
312
- /**
313
- * Register Settings
314
- * Generate wp-admin settings pages by registering your settings and using a few callbacks to control the output
315
- *
316
- * @return void
317
- * @since 1.0
318
- * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
319
- */
320
- public function register_settings() {
321
- register_setting( 'yit_' . $this->settings[ 'parent' ] . '_options', 'yit_' . $this->settings[ 'parent' ] . '_options', array( $this, 'options_validate' ) );
322
- }
323
-
324
- /**
325
- * Options Validate
326
- * a callback function called by Register Settings function
327
- *
328
- * @param $input
329
- * @return array validate input fields
330
- * @since 1.0
331
- * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
332
- */
333
- public function options_validate( $input ) {
334
-
335
- $option_key = !empty( $input[ 'option_key' ] ) ? $input[ 'option_key' ] : 'general';
336
-
337
- $yit_options = $this->get_main_array_options();
338
-
339
- // default
340
- $valid_input = $this->get_options();
341
-
342
- $submit = ( !empty( $input[ 'submit-general' ] ) ? true : false );
343
- $reset = ( !empty( $input[ 'reset-general' ] ) ? true : false );
344
-
345
- foreach ( $yit_options[ $option_key ] as $section => $data ) {
346
- foreach ( $data as $option ) {
347
- if ( isset( $option[ 'sanitize_call' ] ) && isset( $option[ 'id' ] ) ) { //yiw_debug($option, false);
348
- if ( is_array( $option[ 'sanitize_call' ] ) ) :
349
- foreach ( $option[ 'sanitize_call' ] as $callback ) {
350
- if ( is_array( $input[ $option[ 'id' ] ] ) ) {
351
- $valid_input[ $option[ 'id' ] ] = array_map( $callback, $input[ $option[ 'id' ] ] );
352
- } else {
353
- $valid_input[ $option[ 'id' ] ] = call_user_func( $callback, $input[ $option[ 'id' ] ] );
354
- }
355
- }
356
- else :
357
- if ( is_array( $input[ $option[ 'id' ] ] ) ) {
358
- $valid_input[ $option[ 'id' ] ] = array_map( $option[ 'sanitize_call' ], $input[ $option[ 'id' ] ] );
359
- } else {
360
- $valid_input[ $option[ 'id' ] ] = call_user_func( $option[ 'sanitize_call' ], $input[ $option[ 'id' ] ] );
361
- }
362
- endif;
363
- } else {
364
- if ( isset( $option[ 'id' ] ) ) {
365
- $value = isset( $input[ $option[ 'id' ] ] ) ? $input[ $option[ 'id' ] ] : false;
366
- if ( isset( $option[ 'type' ] ) && in_array( $option[ 'type' ], array( 'checkbox', 'onoff' ) ) ) {
367
- $value = yith_plugin_fw_is_true( $value ) ? 'yes' : 'no';
368
- }
369
-
370
- if ( !empty( $option[ 'yith-sanitize-callback' ] ) && is_callable( $option[ 'yith-sanitize-callback' ] ) ) {
371
- $value = call_user_func( $option[ 'yith-sanitize-callback' ], $value );
372
- }
373
-
374
- $valid_input[ $option[ 'id' ] ] = $value;
375
- }
376
- }
377
-
378
- }
379
- }
380
-
381
- return $valid_input;
382
- }
383
-
384
- /**
385
- * Add Setting SubPage
386
- * add Setting SubPage to wordpress administrator
387
- *
388
- * @return array validate input fields
389
- * @since 1.0
390
- * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
391
- */
392
- public function add_setting_page() {
393
- $this->settings[ 'icon_url' ] = isset( $this->settings[ 'icon_url' ] ) ? $this->settings[ 'icon_url' ] : '';
394
- $this->settings[ 'position' ] = isset( $this->settings[ 'position' ] ) ? $this->settings[ 'position' ] : null;
395
- $parent = $this->settings[ 'parent_slug' ] . $this->settings[ 'parent_page' ];
396
-
397
- if ( !empty( $parent ) ) {
398
- add_submenu_page( $parent, $this->settings[ 'page_title' ], $this->settings[ 'menu_title' ], $this->settings[ 'capability' ], $this->settings[ 'page' ], array( $this, 'yit_panel' ) );
399
- } else {
400
- add_menu_page( $this->settings[ 'page_title' ], $this->settings[ 'menu_title' ], $this->settings[ 'capability' ], $this->settings[ 'page' ], array( $this, 'yit_panel' ), $this->settings[ 'icon_url' ], $this->settings[ 'position' ] );
401
- }
402
- /* === Duplicate Items Hack === */
403
- $this->remove_duplicate_submenu_page();
404
- do_action( 'yit_after_add_settings_page' );
405
-
406
-
407
- }
408
-
409
- /**
410
- * Add Premium Version upgrade menu item
411
- *
412
- * @return void
413
- * @since 2.9.13
414
- * @author Andrea Grillo <andrea.grillo@yithemes.com>
415
- */
416
- public function add_premium_version_upgrade_to_menu() {
417
- /* === Add the How To menu item only if the customer haven't a premium version enabled === */
418
- if ( function_exists( 'YIT_Plugin_Licence' ) && !!YIT_Plugin_Licence()->get_products() ) {
419
- return;
420
- }
421
-
422
- global $submenu;
423
- if ( apply_filters( 'yit_show_upgrade_to_premium_version', isset( $submenu[ 'yith_plugin_panel' ] ) ) ) {
424
- $submenu[ 'yith_plugin_panel' ][ 'how_to' ] = array(
425
- sprintf( '%s%s%s', '<span id="yith-how-to-premium">', __( 'How to install premium version', 'yith-plugin-fw' ), '</span>' ),
426
- 'install_plugins',
427
- '//support.yithemes.com/hc/en-us/articles/217840988',
428
- __( 'How to install premium version', 'yith-plugin-fw' ),
429
- );
430
- }
431
- }
432
-
433
- /**
434
- * Print the tabs navigation
435
- *
436
- * @param array $args
437
- * @author Leanza Francesco <leanzafrancesco@gmail.com>
438
- * @since 3.4.0
439
- */
440
- public function print_tabs_nav( $args = array() ) {
441
- $defaults = array(
442
- 'current_tab' => $this->get_current_tab(),
443
- 'premium_class' => isset( $this->settings[ 'class' ] ) ? 'yith-premium' : 'premium',
444
- 'page' => $this->settings[ 'page' ],
445
- 'parent_page' => $this->settings[ 'parent_page' ],
446
- 'wrapper_class' => 'nav-tab-wrapper'
447
- );
448
- $args = wp_parse_args( $args, $defaults );
449
- /**
450
- * @var string $current_tab
451
- * @var string $premium_class
452
- * @var string $page
453
- * @var string $parent_page
454
- * @var string $wrapper_class
455
- */
456
- extract( $args );
457
-
458
- $tabs = '';
459
-
460
- foreach ( $this->settings[ 'admin-tabs' ] as $tab => $tab_value ) {
461
- $active_class = ( $current_tab == $tab ) ? ' nav-tab-active' : '';
462
- $active_class .= 'premium' == $tab ? ' ' . $premium_class : '';
463
- $active_class = apply_filters( 'yith_plugin_fw_panel_active_tab_class', $active_class, $current_tab, $tab );
464
-
465
- $first_sub_tab = $this->get_first_sub_tab_key( $tab );
466
- $sub_tab = !!$first_sub_tab ? $first_sub_tab : '';
467
-
468
- $url = $this->get_nav_url( $page, $tab, $sub_tab, $parent_page );
469
-
470
- $tabs .= '<a class="nav-tab' . $active_class . '" href="' . $url . '">' . $tab_value . '</a>';
471
- }
472
- ?>
473
- <h2 class="<?php echo $wrapper_class ?>">
474
- <?php echo $tabs ?>
475
- </h2>
476
- <?php
477
- $this->print_sub_tabs_nav( $args );
478
- }
479
-
480
- /**
481
- * @param string $page
482
- * @param string $tab
483
- * @param string $sub_tab
484
- * @param string $parent_page
485
- * @return string
486
- */
487
- public function get_nav_url( $page, $tab, $sub_tab = '', $parent_page = '' ) {
488
- $tab_hierarchy = $this->get_tabs_hierarchy();
489
- $key = !!$sub_tab ? $sub_tab : $tab;
490
-
491
- if ( isset( $tab_hierarchy[ $key ], $tab_hierarchy[ $key ][ 'type' ], $tab_hierarchy[ $key ][ 'post_type' ] ) && 'post_type' === $tab_hierarchy[ $key ][ 'type' ] ) {
492
- $url = admin_url( "edit.php?post_type={$tab_hierarchy[$key]['post_type']}" );
493
- } elseif ( isset( $tab_hierarchy[ $key ], $tab_hierarchy[ $key ][ 'type' ], $tab_hierarchy[ $key ][ 'taxonomy' ] ) && 'taxonomy' === $tab_hierarchy[ $key ][ 'type' ] ) {
494
- $url = admin_url( "edit-tags.php?taxonomy={$tab_hierarchy[$key]['taxonomy']}" );
495
- } else {
496
- $url = !!$parent_page ? "?{$parent_page}&" : '?';
497
- $url .= "page={$page}&tab={$tab}";
498
- $url .= !!$sub_tab ? "&sub_tab={$sub_tab}" : '';
499
- $url = admin_url( "admin.php{$url}" );
500
- }
501
-
502
- return apply_filters( 'yith_plugin_fw_panel_url', $url, $page, $tab, $sub_tab, $parent_page );
503
- }
504
-
505
- /**
506
- * Print the Sub-tabs navigation if the current tab has sub-tabs
507
- *
508
- * @param array $args
509
- * @author Leanza Francesco <leanzafrancesco@gmail.com>
510
- * @since 3.4.0
511
- */
512
- public function print_sub_tabs_nav( $args = array() ) {
513
- $defaults = array(
514
- 'current_tab' => $this->get_current_tab(),
515
- 'page' => $this->settings[ 'page' ],
516
- 'current_sub_tab' => $this->get_current_sub_tab(),
517
- );
518
- $args = wp_parse_args( $args, $defaults );
519
-
520
- /**
521
- * @var string $current_tab
522
- * @var string $page
523
- * @var string $current_sub_tab
524
- */
525
- extract( $args );
526
-
527
- $sub_tabs = $this->get_sub_tabs( $current_tab );
528
-
529
- if ( $sub_tabs && $current_sub_tab ) {
530
- include YIT_CORE_PLUGIN_TEMPLATE_PATH . '/panel/sub-tabs-nav.php';
531
- }
532
- }
533
-
534
- /**
535
- * Show a tabbed panel to setting page
536
- * a callback function called by add_setting_page => add_submenu_page
537
- *
538
- * @return void
539
- * @since 1.0
540
- * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
541
- */
542
- public function yit_panel() {
543
- $this->maybe_redirect_to_proper_wp_page();
544
- $yit_options = $this->get_main_array_options();
545
- $wrap_class = isset( $this->settings[ 'class' ] ) ? $this->settings[ 'class' ] : '';
546
-
547
- $option_key = $this->get_current_option_key();
548
- $custom_tab_action = $this->is_custom_tab( $yit_options, $option_key );
549
- ?>
550
- <div class="wrap <?php echo $wrap_class ?>">
551
- <div id="icon-themes" class="icon32"><br/></div>
552
- <?php
553
- do_action( 'yith_plugin_fw_before_yith_panel', $this->settings[ 'page' ] );
554
-
555
- $this->print_tabs_nav();
556
-
557
- if ( $custom_tab_action ) {
558
- $this->print_custom_tab( $custom_tab_action );
559
- return;
560
- }
561
-
562
- $panel_content_class = apply_filters( 'yit_admin_panel_content_class', 'yit-admin-panel-content-wrap' );
563
- ?>
564
- <div id="wrap" class="yith-plugin-fw plugin-option yit-admin-panel-container">
565
- <?php $this->message(); ?>
566
- <div class="<?php echo $panel_content_class; ?>">
567
- <h2><?php echo $this->get_tab_title() ?></h2>
568
- <?php if ( $this->is_show_form() ) : ?>
569
- <form id="yith-plugin-fw-panel" method="post" action="options.php">
570
- <?php do_settings_sections( 'yit' ); ?>
571
- <p>&nbsp;</p>
572
- <?php settings_fields( 'yit_' . $this->settings[ 'parent' ] . '_options' ); ?>
573
- <input type="hidden" name="<?php echo $this->get_name_field( 'option_key' ) ?>" value="<?php echo esc_attr( $option_key ) ?>"/>
574
- <input type="submit" class="button-primary" value="<?php _e( 'Save Changes', 'yith-plugin-fw' ) ?>" style="float:left;margin-right:10px;"/>
575
- </form>
576
- <form method="post">
577
- <?php $warning = __( 'If you continue with this action, you will reset all options in this page.', 'yith-plugin-fw' ) ?>
578
- <input type="hidden" name="yit-action" value="reset"/>
579
- <input type="submit" name="yit-reset" class="button-secondary" value="<?php _e( 'Reset to default', 'yith-plugin-fw' ) ?>"
580
- onclick="return confirm('<?php echo $warning . '\n' . __( 'Are you sure?', 'yith-plugin-fw' ) ?>');"/>
581
- </form>
582
- <p>&nbsp;</p>
583
- <?php endif ?>
584
- </div>
585
- </div>
586
- </div>
587
- <?php
588
- }
589
-
590
- /**
591
- * Check if is a custom tab
592
- *
593
- * @param array $options
594
- * @param string $option_key
595
- * @return bool
596
- */
597
- public function is_custom_tab( $options, $option_key ) {
598
- foreach ( $options[ $option_key ] as $section => $option ) {
599
- if ( isset( $option[ 'type' ] ) && isset( $option[ 'action' ] ) && 'custom_tab' == $option[ 'type' ] && !empty( $option[ 'action' ] ) ) {
600
- return $option[ 'action' ];
601
- } else {
602
- return false;
603
- }
604
- }
605
-
606
- return false;
607
- }
608
-
609
- public function get_tab_type_by_options( $tab_options ) {
610
- $first = !!$tab_options && is_array( $tab_options ) ? current( $tab_options ) : array();
611
- $type = isset( $first[ 'type' ] ) ? $first[ 'type' ] : 'options';
612
- $special_types = array( 'post_type', 'taxonomy', 'custom_tab', 'multi_tab' );
613
- return in_array( $type, $special_types ) ? $type : 'options';
614
  }
615
 
616
- public function get_tab_info_by_options( $tab_options ) {
617
- $type = $this->get_tab_type_by_options( $tab_options );
618
- $info = array( 'type' => $type );
619
- $first = !!$tab_options && is_array( $tab_options ) ? current( $tab_options ) : array();
620
- if ( 'post_type' === $type ) {
621
- $info[ 'post_type' ] = isset( $first[ 'post_type' ] ) ? $first[ 'post_type' ] : '';
622
- } else if ( 'taxonomy' === $type ) {
623
- $info[ 'taxonomy' ] = isset( $first[ 'taxonomy' ] ) ? $first[ 'taxonomy' ] : '';
624
- }
625
-
626
- return $info;
627
- }
628
-
629
- /**
630
- * Fire the action to print the custom tab
631
- *
632
- * @param string $action Action to fire
633
- * @return void
634
- * @since 1.0
635
- * @author Andrea Grillo <andrea.grillo@yithemes.com>
636
- * @author Leanza Francesco <leanzafrancesco@gmail.com>
637
- */
638
- public function print_custom_tab( $action ) {
639
- do_action( $action );
640
- }
641
-
642
- /**
643
- * Add sections and fields to setting panel
644
- * read all options and show sections and fields
645
- *
646
- * @return void
647
- * @since 1.0
648
- * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
649
- */
650
- public function add_fields() {
651
- $yit_options = $this->get_main_array_options();
652
- $option_key = $this->get_current_option_key();
653
-
654
- if ( !$option_key ) {
655
- return;
656
- }
657
- foreach ( $yit_options[ $option_key ] as $section => $data ) {
658
- add_settings_section( "yit_settings_{$option_key}_{$section}", $this->get_section_title( $section ), $this->get_section_description( $section ), 'yit' );
659
- foreach ( $data as $option ) {
660
- if ( isset( $option[ 'id' ] ) && isset( $option[ 'type' ] ) && isset( $option[ 'name' ] ) ) {
661
- add_settings_field( "yit_setting_" . $option[ 'id' ], $option[ 'name' ], array( $this, 'render_field' ), 'yit', "yit_settings_{$option_key}_{$section}", array( 'option' => $option, 'label_for' => $this->get_id_field( $option[ 'id' ] ) ) );
662
- }
663
- }
664
- }
665
- }
666
-
667
-
668
- /**
669
- * Add the tabs to admin bar menu
670
- * set all tabs of settings page on wp admin bar
671
- *
672
- * @return void|array return void when capability is false
673
- * @since 1.0
674
- * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
675
- */
676
- public function add_admin_bar_menu() {
677
-
678
- global $wp_admin_bar;
679
-
680
- if ( !current_user_can( 'manage_options' ) ) {
681
- return;
682
- }
683
-
684
- if ( !empty( $this->settings[ 'admin_tabs' ] ) ) {
685
- foreach ( $this->settings[ 'admin-tabs' ] as $item => $title ) {
686
-
687
- $wp_admin_bar->add_menu( array(
688
- 'parent' => $this->settings[ 'parent' ],
689
- 'title' => $title,
690
- 'id' => $this->settings[ 'parent' ] . '-' . $item,
691
- 'href' => admin_url( 'themes.php' ) . '?page=' . $this->settings[ 'parent_page' ] . '&tab=' . $item
692
- ) );
693
- }
694
- }
695
- }
696
-
697
-
698
- /**
699
- * Get current tab
700
- * get the id of tab showed, return general is the current tab is not defined
701
- *
702
- * @return string
703
- * @since 1.0
704
- * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
705
- */
706
- function get_current_tab() {
707
- $admin_tabs = array_keys( $this->settings[ 'admin-tabs' ] );
708
-
709
- if ( !isset( $_GET[ 'page' ] ) || $_GET[ 'page' ] != $this->settings[ 'page' ] ) {
710
- return false;
711
- }
712
- if ( isset( $_REQUEST[ 'yit_tab_options' ] ) ) {
713
- return $_REQUEST[ 'yit_tab_options' ];
714
- } elseif ( isset( $_GET[ 'tab' ] ) ) {
715
- return $_GET[ 'tab' ];
716
- } elseif ( isset( $admin_tabs[ 0 ] ) ) {
717
- return $admin_tabs[ 0 ];
718
- } else {
719
- return 'general';
720
- }
721
- }
722
-
723
- /**
724
- * Get the current sub-tab
725
- *
726
- * @return string the key of the sub-tab if exists, empty string otherwise
727
- * @author Leanza Francesco <leanzafrancesco@gmail.com>
728
- * @since 3.4.0
729
- */
730
- public function get_current_sub_tab() {
731
- $sub_tabs = $this->get_sub_tabs();
732
- $sub_tab = isset( $_REQUEST[ 'sub_tab' ] ) ? $_REQUEST[ 'sub_tab' ] : '';
733
-
734
- if ( $sub_tabs ) {
735
- if ( $sub_tab && !isset( $sub_tabs[ $sub_tab ] ) || !$sub_tab ) {
736
- $sub_tab = current( array_keys( $sub_tabs ) );
737
- }
738
- } else {
739
- $sub_tab = '';
740
- }
741
-
742
- return $sub_tab;
743
- }
744
-
745
- /**
746
- * Return the option key related to the current page
747
- * for sub-tabbed tabs, it will return the current sub-tab
748
- * fot normal tabs, it will return the current tab
749
- *
750
- * @return string the current sub-tab, if exists; the current tab otherwise
751
- * @author Leanza Francesco <leanzafrancesco@gmail.com>
752
- * @since 3.4.0
753
- */
754
- public function get_current_option_key() {
755
- $current_tab = $this->get_current_tab();
756
- $current_sub_tab = $this->get_current_sub_tab();
757
-
758
- if ( !$current_tab ) {
759
- return false;
760
- }
761
-
762
- return $current_sub_tab ? $current_sub_tab : $current_tab;
763
- }
764
-
765
-
766
- /**
767
- * Message
768
- * define an array of message and show the content od message if
769
- * is find in the query string
770
- *
771
- * @return void
772
- * @since 1.0
773
- * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
774
- */
775
- public function message() {
776
-
777
- $message = array(
778
- 'element_exists' => $this->get_message( '<strong>' . __( 'The element you have entered already exists. Please, enter another name.', 'yith-plugin-fw' ) . '</strong>', 'error', false ),
779
- 'saved' => $this->get_message( '<strong>' . __( 'Settings saved', 'yith-plugin-fw' ) . '.</strong>', 'updated', false ),
780
- 'reset' => $this->get_message( '<strong>' . __( 'Settings reset', 'yith-plugin-fw' ) . '.</strong>', 'updated', false ),
781
- 'delete' => $this->get_message( '<strong>' . __( 'Element deleted correctly.', 'yith-plugin-fw' ) . '</strong>', 'updated', false ),
782
- 'updated' => $this->get_message( '<strong>' . __( 'Element updated correctly.', 'yith-plugin-fw' ) . '</strong>', 'updated', false ),
783
- 'settings-updated' => $this->get_message( '<strong>' . __( 'Element updated correctly.', 'yith-plugin-fw' ) . '</strong>', 'updated', false ),
784
- 'imported' => $this->get_message( '<strong>' . __( 'Database imported correctly.', 'yith-plugin-fw' ) . '</strong>', 'updated', false ),
785
- 'no-imported' => $this->get_message( '<strong>' . __( 'An error has occurred during import. Please try again.', 'yith-plugin-fw' ) . '</strong>', 'error', false ),
786
- 'file-not-valid' => $this->get_message( '<strong>' . __( 'The added file is not valid.', 'yith-plugin-fw' ) . '</strong>', 'error', false ),
787
- 'cant-import' => $this->get_message( '<strong>' . __( 'Sorry, import is disabled.', 'yith-plugin-fw' ) . '</strong>', 'error', false ),
788
- 'ord' => $this->get_message( '<strong>' . __( 'Sorting successful.', 'yith-plugin-fw' ) . '</strong>', 'updated', false )
789
- );
790
-
791
- foreach ( $message as $key => $value ) {
792
- if ( isset( $_GET[ $key ] ) ) {
793
- echo $message[ $key ];
794
- }
795
- }
796
-
797
- }
798
-
799
- /**
800
- * Get Message
801
- * return html code of message
802
- *
803
- * @param $message
804
- * @param string $type can be 'error' or 'updated'
805
- * @param bool $echo
806
- * @return string
807
- * @since 1.0
808
- * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
809
- */
810
- public function get_message( $message, $type = 'error', $echo = true ) {
811
- $message = '<div id="message" class="' . $type . ' fade"><p>' . $message . '</p></div>';
812
- if ( $echo ) {
813
- echo $message;
814
- }
815
-
816
- return $message;
817
- }
818
-
819
-
820
- /**
821
- * Get Tab Path Files
822
- * return an array with file names of tabs
823
- *
824
- * @return array
825
- * @since 1.0
826
- * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
827
- */
828
- function get_tabs_path_files() {
829
-
830
- $option_files_path = $this->settings[ 'options-path' ] . '/';
831
-
832
- $tabs = array();
833
-
834
- foreach ( ( array ) glob( $option_files_path . '*.php' ) as $filename ) {
835
- preg_match( '/(.*)-options\.(.*)/', basename( $filename ), $filename_parts );
836
-
837
- if ( !isset( $filename_parts[ 1 ] ) ) {
838
- continue;
839
- }
840
-
841
- $tab = $filename_parts[ 1 ];
842
-
843
- $tabs[ $tab ] = $filename;
844
- }
845
-
846
- return $tabs;
847
- }
848
-
849
- /**
850
- * Get main array options
851
- * return an array with all options defined on options-files
852
- *
853
- * @return array
854
- * @since 1.0
855
- * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
856
- */
857
- function get_main_array_options() {
858
- $this->_maybe_init_vars();
859
-
860
- return $this->_main_array_options;
861
- }
862
-
863
- function get_tabs_hierarchy() {
864
- $this->_maybe_init_vars();
865
-
866
- return $this->_tabs_hierarchy;
867
- }
868
-
869
- /**
870
- * Return the sub-tabs array of a specific tab
871
- *
872
- * @param array|bool $_tab the tab; if not set it'll be the current tab
873
- * @since 3.4.0
874
- * @author Leanza Francesco <leanzafrancesco@gmail.com>
875
- * @return array sub-tabs array
876
- */
877
- public function get_sub_tabs( $_tab = false ) {
878
- if ( false === $_tab ) {
879
- $_tab = $this->get_current_tab();
880
- }
881
-
882
- if ( is_string( $_tab ) ) {
883
- $main_array_options = $this->get_main_array_options();
884
- $current_tab_options = isset( $main_array_options[ $_tab ] ) ? $main_array_options[ $_tab ] : array();
885
- if ( $current_tab_options ) {
886
- $_tab = array( $_tab => $current_tab_options );
887
- }
888
- }
889
-
890
- $_tab_options = !!$_tab && is_array( $_tab ) ? current( $_tab ) : false;
891
- $_first = !!$_tab_options && is_array( $_tab_options ) ? current( $_tab_options ) : false;
892
- if ( $_first && is_array( $_first ) && isset( $_first[ 'type' ] ) && 'multi_tab' === $_first[ 'type' ] && !empty( $_first[ 'sub-tabs' ] ) ) {
893
- return $_first[ 'sub-tabs' ];
894
- }
895
- return array();
896
- }
897
-
898
- public function get_first_sub_tab_key( $_tab = false ) {
899
- $key = false;
900
- if ( is_string( $_tab ) ) {
901
- $main_array_options = $this->get_main_array_options();
902
- $current_tab_options = isset( $main_array_options[ $_tab ] ) ? $main_array_options[ $_tab ] : array();
903
- if ( $current_tab_options ) {
904
- $_tab = array( $_tab => $current_tab_options );
905
- }
906
- }
907
-
908
- if ( ( $sub_tabs = $this->get_sub_tabs( $_tab ) ) ) {
909
- $key = current( array_keys( $sub_tabs ) );
910
- }
911
-
912
- return $key;
913
- }
914
-
915
-
916
- /**
917
- * Set an array with all default options
918
- * put default options in an array
919
- *
920
- * @return array
921
- * @since 1.0
922
- * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
923
- */
924
- public function get_default_options() {
925
- $yit_options = $this->get_main_array_options();
926
- $default_options = array();
927
-
928
- foreach ( $yit_options as $tab => $sections ) {
929
- foreach ( $sections as $section ) {
930
- foreach ( $section as $id => $value ) {
931
- if ( isset( $value[ 'std' ] ) && isset( $value[ 'id' ] ) ) {
932
- $default_options[ $value[ 'id' ] ] = $value[ 'std' ];
933
- }
934
- }
935
- }
936
- }
937
-
938
- unset( $yit_options );
939
-
940
- return $default_options;
941
- }
942
-
943
-
944
- /**
945
- * Get the title of the tab
946
- * return the title of tab
947
- *
948
- * @return string
949
- * @since 1.0
950
- * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
951
- */
952
- function get_tab_title() {
953
- $yit_options = $this->get_main_array_options();
954
- $option_key = $this->get_current_option_key();
955
-
956
- foreach ( $yit_options[ $option_key ] as $sections => $data ) {
957
- foreach ( $data as $option ) {
958
- if ( isset( $option[ 'type' ] ) && $option[ 'type' ] == 'title' ) {
959
- return $option[ 'name' ];
960
- }
961
- }
962
- }
963
- return '';
964
- }
965
-
966
- /**
967
- * Get the title of the section
968
- * return the title of section
969
- *
970
- * @param $section
971
- * @return string
972
- * @since 1.0
973
- * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
974
- */
975
- function get_section_title( $section ) {
976
- $yit_options = $this->get_main_array_options();
977
- $option_key = $this->get_current_option_key();
978
-
979
- foreach ( $yit_options[ $option_key ][ $section ] as $option ) {
980
- if ( isset( $option[ 'type' ] ) && $option[ 'type' ] == 'section' ) {
981
- return $option[ 'name' ];
982
- }
983
- }
984
- return '';
985
- }
986
-
987
- /**
988
- * Get the description of the section
989
- * return the description of section if is set
990
- *
991
- * @param $section
992
- * @return string
993
- * @since 1.0
994
- * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
995
- */
996
- function get_section_description( $section ) {
997
- $yit_options = $this->get_main_array_options();
998
- $option_key = $this->get_current_option_key();
999
-
1000
- foreach ( $yit_options[ $option_key ][ $section ] as $option ) {
1001
- if ( isset( $option[ 'type' ] ) && $option[ 'type' ] == 'section' && isset( $option[ 'desc' ] ) ) {
1002
- return '<p>' . $option[ 'desc' ] . '</p>';
1003
- }
1004
- }
1005
- return '';
1006
- }
1007
-
1008
-
1009
- /**
1010
- * Show form when necessary
1011
- * return true if 'showform' is not defined
1012
- *
1013
- * @return bool
1014
- * @since 1.0
1015
- * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
1016
- */
1017
- function is_show_form() {
1018
- $yit_options = $this->get_main_array_options();
1019
- $option_key = $this->get_current_option_key();
1020
-
1021
- foreach ( $yit_options[ $option_key ] as $sections => $data ) {
1022
- foreach ( $data as $option ) {
1023
- if ( !isset( $option[ 'type' ] ) || $option[ 'type' ] != 'title' ) {
1024
- continue;
1025
- }
1026
- if ( isset( $option[ 'showform' ] ) ) {
1027
- return $option[ 'showform' ];
1028
- } else {
1029
- return true;
1030
- }
1031
- }
1032
- }
1033
- }
1034
-
1035
- /**
1036
- * Get name field
1037
- * return a string with the name of the input field
1038
- *
1039
- * @param string $name
1040
- * @return string
1041
- * @since 1.0
1042
- * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
1043
- */
1044
- function get_name_field( $name = '' ) {
1045
- return 'yit_' . $this->settings[ 'parent' ] . '_options[' . $name . ']';
1046
- }
1047
-
1048
- /**
1049
- * Get id field
1050
- * return a string with the id of the input field
1051
- *
1052
- * @param string $id
1053
- * @return string
1054
- * @since 1.0
1055
- * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
1056
- */
1057
- function get_id_field( $id ) {
1058
- return 'yit_' . $this->settings[ 'parent' ] . '_options_' . $id;
1059
- }
1060
-
1061
-
1062
- /**
1063
- * Render the field showed in the setting page
1064
- * include the file of the option type, if file do not exists
1065
- * return a text area
1066
- *
1067
- * @param array $param
1068
- * @return void
1069
- * @since 1.0
1070
- * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
1071
- */
1072
- function render_field( $param ) {
1073
-
1074
- if ( !empty( $param ) && isset( $param [ 'option' ] ) ) {
1075
- $option = $param [ 'option' ];
1076
- $db_options = $this->get_options();
1077
-
1078
- $custom_attributes = array();
1079
-
1080
- if ( !empty( $option[ 'custom_attributes' ] ) && is_array( $option[ 'custom_attributes' ] ) ) {
1081
- foreach ( $option[ 'custom_attributes' ] as $attribute => $attribute_value ) {
1082
- $custom_attributes[] = esc_attr( $attribute ) . '="' . esc_attr( $attribute_value ) . '"';
1083
- }
1084
- }
1085
-
1086
- $custom_attributes = implode( ' ', $custom_attributes );
1087
- $std = isset( $option[ 'std' ] ) ? $option[ 'std' ] : '';
1088
- $db_value = ( isset( $db_options[ $option[ 'id' ] ] ) ) ? $db_options[ $option[ 'id' ] ] : $std;
1089
-
1090
- if ( isset( $option[ 'deps' ] ) )
1091
- $deps = $option[ 'deps' ];
1092
-
1093
- if ( 'on-off' === $option[ 'type' ] )
1094
- $option[ 'type' ] = 'onoff';
1095
-
1096
- if ( $field_template_path = yith_plugin_fw_get_field_template_path( $option ) ) {
1097
- $field_container_path = apply_filters( 'yith_plugin_fw_panel_field_container_template_path', YIT_CORE_PLUGIN_TEMPLATE_PATH . '/panel/panel-field-container.php', $option );
1098
- file_exists( $field_container_path ) && include( $field_container_path );
1099
- } else {
1100
- do_action( "yit_panel_{$option['type']}", $option, $db_value, $custom_attributes );
1101
- }
1102
- }
1103
- }
1104
-
1105
- /**
1106
- * Get options from db
1107
- * return the options from db, if the options aren't defined in the db,
1108
- * get the default options ad add the options in the db
1109
- *
1110
- * @return array
1111
- * @since 1.0
1112
- * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
1113
- */
1114
- public function get_options() {
1115
- $options = get_option( 'yit_' . $this->settings[ 'parent' ] . '_options' );
1116
- if ( $options === false || ( isset( $_REQUEST[ 'yit-action' ] ) && $_REQUEST[ 'yit-action' ] == 'reset' ) ) {
1117
- $options = $this->get_default_options();
1118
- }
1119
-
1120
- return $options;
1121
- }
1122
-
1123
- /**
1124
- * Show a box panel with specific content in two columns as a new woocommerce type
1125
- *
1126
- * @param array $args
1127
- * @return void
1128
- * @since 1.0
1129
- * @author Emanuela Castorina <emanuela.castorina@yithemes.com>
1130
- */
1131
- public static function add_infobox( $args = array() ) {
1132
- if ( !empty( $args ) ) {
1133
- extract( $args );
1134
- require_once( YIT_CORE_PLUGIN_TEMPLATE_PATH . '/panel/boxinfo.php' );
1135
- }
1136
- }
1137
-
1138
- /**
1139
- * Show a box panel with specific content in two columns as a new woocommerce type
1140
- *
1141
- * @param array $args
1142
- * @return void
1143
- * @deprecated 3.0.12 Do nothing! Method left to prevent Fatal Error if called directly
1144
- */
1145
- public static function add_videobox( $args = array() ) {
1146
-
1147
- }
1148
-
1149
- /**
1150
- * Fire the action to print the custom tab
1151
- *
1152
- * @return void
1153
- * @deprecated 3.0.12 Do nothing! Method left to prevent Fatal Error if called directly
1154
- */
1155
- public function print_video_box() {
1156
-
1157
- }
1158
-
1159
- /**
1160
- * sort plugins by name in YITH Plugins menu
1161
- *
1162
- * @since 3.0.0
1163
- * @author Leanza Francesco <leanzafrancesco@gmail.com>
1164
- */
1165
- public static function sort_plugins() {
1166
- global $submenu;
1167
- if ( !empty( $submenu[ 'yith_plugin_panel' ] ) ) {
1168
- $sorted_plugins = $submenu[ 'yith_plugin_panel' ];
1169
-
1170
- usort( $sorted_plugins, function ( $a, $b ) {
1171
- return strcmp( current( $a ), current( $b ) );
1172
- } );
1173
-
1174
- $submenu[ 'yith_plugin_panel' ] = $sorted_plugins;
1175
- }
1176
- }
1177
-
1178
- /**
1179
- * add menu class in YITH Plugins menu
1180
- *
1181
- * @since 3.0.0
1182
- * @author Leanza Francesco <leanzafrancesco@gmail.com>
1183
- */
1184
- public static function add_menu_class_in_yith_plugin( $menu ) {
1185
- global $submenu;
1186
-
1187
- if ( !empty( $submenu[ 'yith_plugin_panel' ] ) ) {
1188
- $item_count = count( $submenu[ 'yith_plugin_panel' ] );
1189
- $columns = absint( $item_count / 20 ) + 1;
1190
- $columns = max( 1, min( $columns, 3 ) );
1191
- $columns = apply_filters( 'yith_plugin_fw_yith_plugins_menu_columns', $columns, $item_count );
1192
-
1193
- if ( $columns > 1 ) {
1194
- $class = "yith-plugin-fw-menu-$columns-columns";
1195
- foreach ( $menu as $order => $top ) {
1196
- if ( 'yith_plugin_panel' === $top[ 2 ] ) {
1197
- $c = $menu[ $order ][ 4 ];
1198
- $menu[ $order ][ 4 ] = add_cssclass( $class, $c );
1199
- break;
1200
- }
1201
- }
1202
- }
1203
- }
1204
-
1205
- return $menu;
1206
- }
1207
-
1208
- /**
1209
- * Check if inside the admin tab there's the premium tab to
1210
- * check if the plugin is a free or not
1211
- *
1212
- * @author Emanuela Castorina
1213
- */
1214
- function is_free() {
1215
- return ( !empty( $this->settings[ 'admin-tabs' ] ) && isset( $this->settings[ 'admin-tabs' ][ 'premium' ] ) );
1216
- }
1217
-
1218
- /**
1219
- * Add plugin banner
1220
- */
1221
- public function add_plugin_banner( $page ) {
1222
-
1223
- if ( $page != $this->settings[ 'page' ] || !isset( $this->settings[ 'class' ] ) ) {
1224
- return;
1225
- }
1226
-
1227
- if ( $this->is_free() && isset( $this->settings[ 'plugin_slug' ] ) ):
1228
- $rate_link = apply_filters( 'yith_plugin_fw_rate_url', 'https://wordpress.org/support/plugin/' . $this->settings[ 'plugin_slug' ] . '/reviews/?rate=5#new-post' );
1229
- ?>
1230
- <h1 class="notice-container"></h1>
1231
- <div class="yith-plugin-fw-banner">
1232
- <h1><?php echo esc_html( $this->settings[ 'page_title' ] ) ?></h1>
1233
- </div>
1234
- <div class="yith-plugin-fw-rate">
1235
- <?php printf('<strong>%s</strong> %s <a href="%s" target="_blank"><u>%s</u> <span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span></a> %s',
1236
- __('We need your support','yith-plugin-fw'),
1237
- __('to keep updating and improving the plugin. Please,','yith-plugin-fw'),
1238
- $rate_link,
1239
- __('help us by leaving a five-star rating','yith-plugin-fw' ),
1240
- __(':) Thanks!','yith-plugin-fw' ) )?>
1241
- </div>
1242
- <?php else: ?>
1243
- <h1 class="notice-container"></h1>
1244
- <div class="yith-plugin-fw-banner">
1245
- <h1><?php echo esc_html( $this->settings[ 'page_title' ] ) ?></h1>
1246
- </div>
1247
- <?php endif ?>
1248
- <?php
1249
- }
1250
-
1251
- /**
1252
- * Add additional element after print the field.
1253
- *
1254
- * @since 3.2
1255
- * @author Emanuela Castorina
1256
- */
1257
- public function add_yith_ui( $field ) {
1258
- global $pagenow;
1259
-
1260
- $screen = function_exists('get_current_screen') ? get_current_screen() : false;
1261
-
1262
- if ( empty( $this->settings[ 'class' ] ) || !isset( $field[ 'type' ] ) ) {
1263
- return;
1264
- }
1265
- if ( 'admin.php' === $pagenow && $screen && strpos( $screen->id, $this->settings[ 'page' ] ) !== false ) {
1266
- switch ( $field[ 'type' ] ) {
1267
- case 'datepicker':
1268
- echo '<span class="yith-icon icon-calendar"></span>';
1269
- break;
1270
- default:
1271
- break;
1272
- }
1273
- }
1274
- }
1275
-
1276
-
1277
- public function get_post_type_tabs( $post_type ) {
1278
- $tabs = array();
1279
-
1280
- foreach ( $this->get_tabs_hierarchy() as $key => $info ) {
1281
- if ( isset( $info[ 'type' ], $info[ 'post_type' ] ) && 'post_type' === $info[ 'type' ] && $post_type === $info[ 'post_type' ] ) {
1282
- if ( !empty( $info[ 'parent' ] ) ) {
1283
- $tabs = array( 'tab' => $info[ 'parent' ], 'sub_tab' => $key );
1284
- } else {
1285
- $tabs = array( 'tab' => $key );
1286
- }
1287
- break;
1288
- }
1289
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1290
 
1291
  $panel_page = isset( $this->settings['page'] ) ? $this->settings['page'] : 'general';
1292
 
1293
  return apply_filters( "yith_plugin_fw_panel_{$panel_page}_get_post_type_tabs", $tabs, $post_type );
1294
- }
1295
-
1296
- public function get_taxonomy_tabs( $taxonomy ) {
1297
- $tabs = array();
1298
-
1299
- foreach ( $this->get_tabs_hierarchy() as $key => $info ) {
1300
- if ( isset( $info[ 'type' ], $info[ 'taxonomy' ] ) && 'taxonomy' === $info[ 'type' ] && $taxonomy === $info[ 'taxonomy' ] ) {
1301
- if ( !empty( $info[ 'parent' ] ) ) {
1302
- $tabs = array( 'tab' => $info[ 'parent' ], 'sub_tab' => $key );
1303
- } else {
1304
- $tabs = array( 'tab' => $key );
1305
- }
1306
- break;
1307
- }
1308
- }
1309
 
1310
  $panel_page = isset( $this->settings['page'] ) ? $this->settings['page'] : 'general';
1311
 
1312
  return apply_filters( "yith_plugin_fw_panel_{$panel_page}_get_taxonomy_tabs", $tabs, $taxonomy );
1313
- }
1314
-
1315
-
1316
- /**
1317
- * If the panel page is a WP Page, this will redirect you to the correct page
1318
- * useful when a Post Type (Taxonomy) is the first tab of your panel, so when you open your panel it'll open the Post Type (Taxonomy) list
1319
- *
1320
- * @since 3.4.0
1321
- * @author Leanza Francesco <leanzafrancesco@gmail.com>
1322
- */
1323
- public function maybe_redirect_to_proper_wp_page() {
1324
- if ( !isset( $_REQUEST[ 'yith-plugin-fw-panel-skip-redirect' ] ) ) {
1325
- $url = $this->get_nav_url( $this->settings[ 'page' ], $this->get_current_tab(), $this->get_current_sub_tab() );
1326
- if ( strpos( $url, 'edit.php' ) !== false || strpos( $url, 'edit-tags.php' ) !== false ) {
1327
- wp_safe_redirect( add_query_arg( array( 'yith-plugin-fw-panel-skip-redirect' => 1 ), $url ) );
1328
- exit;
1329
- }
1330
- }
 
 
1331
  }
1332
 
1333
  /**
@@ -1340,6 +1387,8 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
1340
  public function print_panel_tabs_in_wp_pages() {
1341
  if ( self::$_panel_tabs_in_wp_pages ) {
1342
  wp_enqueue_style( 'yit-plugin-style' );
 
 
1343
  $wrap_class = isset( $this->settings[ 'class' ] ) ? $this->settings[ 'class' ] : '';
1344
 
1345
  ?>
@@ -1387,6 +1436,4 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
1387
  return true;
1388
  }
1389
  }
1390
-
1391
-
1392
  }
7
  * http://www.gnu.org/licenses/gpl-3.0.txt
8
  */
9
 
10
+ if ( ! defined( 'ABSPATH' ) ) {
11
+ exit;
12
  } // Exit if accessed directly
13
 
14
+ if ( ! class_exists( 'YIT_Plugin_Panel' ) ) {
15
+ /**
16
+ * YIT Plugin Panel
17
+ * Setting Page to Manage Plugins
18
+ *
19
+ * @class YIT_Plugin_Panel
20
+ * @package YITH
21
+ * @since 1.0
22
+ * @author Your Inspiration Themes
23
+ */
24
+ class YIT_Plugin_Panel {
25
+
26
+ /**
27
+ * @var string version of class
28
+ */
29
+ public $version = '1.0.0';
30
+
31
+ /**
32
+ * @var array a setting list of parameters
33
+ */
34
+ public $settings = array();
35
+
36
+ /**
37
+ * @var array
38
+ */
39
+ protected $_tabs_path_files;
40
+
41
+ /**
42
+ * @var array
43
+ */
44
+ protected $_main_array_options;
45
+
46
+ /**
47
+ * @var array
48
+ */
49
+ protected $_tabs_hierarchy;
50
+
51
+ /**
52
+ * @var array
53
+ */
54
+ protected static $_panel_tabs_in_wp_pages = array();
55
+
56
+ /**
57
+ * @var array
58
+ */
59
+ public $links;
60
+
61
+ /**
62
+ * @var bool
63
+ */
64
+ protected static $_actions_initialized = false;
65
+
66
+ /**
67
+ * Constructor
68
+ *
69
+ * @param array $args
70
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
71
+ * @since 1.0
72
+ */
73
+ public function __construct( $args = array() ) {
74
+
75
+ if ( ! empty( $args ) ) {
76
+
77
+ $default_args = array(
78
+ 'parent_slug' => 'edit.php?',
79
+ 'page_title' => __( 'Plugin Settings', 'yith-plugin-fw' ),
80
+ 'menu_title' => __( 'Settings', 'yith-plugin-fw' ),
81
+ 'capability' => 'manage_options',
82
+ 'icon_url' => '',
83
+ 'position' => null,
84
+ );
85
+
86
+ $args = apply_filters( 'yit_plugin_fw_panel_option_args', wp_parse_args( $args, $default_args ) );
87
+ if ( isset( $args['parent_page'] ) && 'yit_plugin_panel' === $args['parent_page'] )
88
+ $args['parent_page'] = 'yith_plugin_panel';
89
+
90
+ $this->settings = $args;
91
+ $this->_tabs_path_files = $this->get_tabs_path_files();
92
+
93
+ if ( isset( $this->settings['create_menu_page'] ) && $this->settings['create_menu_page'] ) {
94
+ $this->add_menu_page();
95
+ }
96
+
97
+ if ( ! empty( $this->settings['links'] ) ) {
98
+ $this->links = $this->settings['links'];
99
+ }
100
+
101
+ add_action( 'admin_init', array( $this, 'register_settings' ) );
102
+ add_action( 'admin_menu', array( $this, 'add_setting_page' ), 20 );
103
+ add_action( 'admin_menu', array( $this, 'add_premium_version_upgrade_to_menu' ), 100 );
104
+ add_action( 'admin_bar_menu', array( $this, 'add_admin_bar_menu' ), 100 );
105
+ add_action( 'admin_init', array( $this, 'add_fields' ) );
106
+
107
+ add_action( 'admin_enqueue_scripts', array( $this, 'init_wp_with_tabs' ), 11 );
108
+ add_action( 'admin_init', array( $this, 'maybe_redirect_to_proper_wp_page' ) );
109
+
110
+ // init actions once to prevent multiple actions
111
+ static::_init_actions();
112
+ }
113
+
114
+ add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
115
 
116
  //yith-plugin-ui
117
  add_action( 'yith_plugin_fw_before_yith_panel', array( $this, 'add_plugin_banner' ), 10, 1 );
118
  add_action( 'wp_ajax_yith_plugin_fw_save_toggle_element', array( $this, 'save_toggle_element_options' ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
119
  }
120
 
121
+ /**
122
+ * Is this a custom post type page?
123
+ *
124
+ * @return bool
125
+ * @see YIT_Plugin_Panel::init_wp_with_tabs
126
+ * @since 3.4.17
127
+ */
128
+ protected function is_custom_post_type_page() {
129
+ global $pagenow, $post_type;
130
+ $excluded_post_types = array( 'product', 'page', 'post' );
131
+
132
+ return in_array( $pagenow, array( 'post.php', 'post-new.php', 'edit.php' ), true ) &&
133
+ ! in_array( $post_type, $excluded_post_types, true );
134
+ }
135
+
136
+ /**
137
+ * Is this a custom taxonomy page?
138
+ *
139
+ * @return bool
140
+ * @see YIT_Plugin_Panel::init_wp_with_tabs
141
+ * @since 3.4.17
142
+ */
143
+ protected function is_custom_taxonomy_page() {
144
+ global $pagenow, $taxonomy;
145
+ $excluded_taxonomies = array( 'category', 'post_tag', 'product_cat', 'product_tag' );
146
+
147
+ return in_array( $pagenow, array( 'edit-tags.php', 'term.php' ), true ) &&
148
+ ! in_array( $taxonomy, $excluded_taxonomies, true );
149
+ }
150
+
151
+ /**
152
+ * Init actions to show YITH Panel tabs in WP Pages
153
+ *
154
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
155
+ * @since 3.4.0
156
+ */
157
+ public function init_wp_with_tabs() {
158
+ if ( ! current_user_can( $this->settings['capability'] ) ) {
159
+ return;
160
+ }
161
+
162
+ global $post_type, $taxonomy;
163
+ $tabs = false;
164
+
165
+ if ( $this->is_custom_post_type_page() ) {
166
+ $tabs = $this->get_post_type_tabs( $post_type );
167
+ } else if ( $this->is_custom_taxonomy_page() ) {
168
+ $tabs = $this->get_taxonomy_tabs( $taxonomy );
169
+ }
170
+
171
+ if ( $tabs ) {
172
+ // tabs_in_edit
173
+ $current_tab_args = array(
174
+ 'page' => $this->settings['page'],
175
+ 'current_tab' => isset( $tabs['tab'] ) ? $tabs['tab'] : '',
176
+ 'current_sub_tab' => isset( $tabs['sub_tab'] ) ? $tabs['sub_tab'] : '',
177
+ );
178
+
179
+ wp_enqueue_style( 'yit-plugin-style' );
180
+ wp_enqueue_style( 'yith-plugin-fw-fields' );
181
+ wp_enqueue_script( 'yith-plugin-fw-wp-pages' );
182
+
183
+ if ( ! self::$_panel_tabs_in_wp_pages ) {
184
+ self::$_panel_tabs_in_wp_pages = $current_tab_args;
185
+ add_action( 'all_admin_notices', array( $this, 'print_panel_tabs_in_wp_pages' ) );
186
+ add_action( 'admin_footer', array( $this, 'print_panel_tabs_in_wp_pages_end' ) );
187
+ add_filter( 'parent_file', array( $this, 'set_parent_file_to_handle_menu_for_wp_pages' ) );
188
+ add_filter( 'submenu_file', array( $this, 'set_submenu_file_to_handle_menu_for_wp_pages' ), 10, 2 );
189
+ }
190
+ }
191
+ }
192
+
193
+ /**
194
+ * Init actions once to prevent multiple actions
195
+ *
196
+ * @since 3.0.0
197
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
198
+ */
199
+ protected static function _init_actions() {
200
+ if ( ! static::$_actions_initialized ) {
201
+ add_filter( 'admin_body_class', array( __CLASS__, 'add_body_class' ) );
202
+
203
+ // sort plugins by name in YITH Plugins menu
204
+ add_action( 'admin_menu', array( __CLASS__, 'sort_plugins' ), 90 );
205
+ add_filter( 'add_menu_classes', array( __CLASS__, 'add_menu_class_in_yith_plugin' ) );
206
+
207
+
208
+ static::$_actions_initialized = true;
209
+ }
210
+ }
211
+
212
+ protected function _maybe_init_vars() {
213
+ if ( ! isset( $this->_main_array_options ) && ! isset( $this->_tabs_hierarchy ) ) {
214
+ $options_path = $this->settings['options-path'];
215
+ $this->_main_array_options = array();
216
+ $this->_tabs_hierarchy = array();
217
+
218
+ foreach ( $this->settings['admin-tabs'] as $item => $v ) {
219
+ $path = trailingslashit( $options_path ) . $item . '-options.php';
220
+ $path = apply_filters( 'yith_plugin_panel_item_options_path', $path, $options_path, $item, $this );
221
+ if ( file_exists( $path ) ) {
222
+ $_tab = include $path;
223
+ $this->_main_array_options = array_merge( $this->_main_array_options, $_tab );
224
+ $sub_tabs = $this->get_sub_tabs( $_tab );
225
+ $current_tab_key = array_keys( $_tab )[0];
226
+
227
+ $this->_tabs_hierarchy[ $current_tab_key ] = array_merge( array( 'parent' => '', 'has_sub_tabs' => ! ! $sub_tabs ), $this->get_tab_info_by_options( $_tab[ $current_tab_key ] ) );
228
+
229
+ foreach ( $sub_tabs as $sub_item => $sub_options ) {
230
+ if ( strpos( $sub_item, $item . '-' ) === 0 ) {
231
+ $sub_item = substr( $sub_item, strlen( $item ) + 1 );
232
+ }
233
+ $sub_tab_path = $options_path . '/' . $item . '/' . $sub_item . '-options.php';
234
+ $sub_tab_path = apply_filters( 'yith_plugin_panel_sub_tab_item_options_path', $sub_tab_path, $sub_tabs, $sub_item, $this );
235
+
236
+ if ( file_exists( $sub_tab_path ) ) {
237
+ $_sub_tab = include $sub_tab_path;
238
+ $this->_main_array_options = array_merge( $this->_main_array_options, $_sub_tab );
239
+
240
+ $current_sub_tab_key = array_keys( $_sub_tab )[0];
241
+ $this->_tabs_hierarchy[ $current_sub_tab_key ] = array_merge( array( 'parent' => $current_tab_key ), $this->get_tab_info_by_options( $_sub_tab[ $current_sub_tab_key ] ) );
242
+ }
243
+ }
244
+ }
245
+ }
246
+ }
247
+ }
248
+
249
+ /**
250
+ * Add yith-plugin-fw-panel in body classes in Panel pages
251
+ *
252
+ * @param $admin_body_classes
253
+ * @return string
254
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
255
+ * @since 3.0.0
256
+ */
257
+ public static function add_body_class( $admin_body_classes ) {
258
+ global $pagenow;
259
+ if ( ( 'admin.php' == $pagenow && strpos( get_current_screen()->id, 'yith-plugins_page' ) !== false ) )
260
+ $admin_body_classes = substr_count( $admin_body_classes, ' yith-plugin-fw-panel ' ) == 0 ? $admin_body_classes . ' yith-plugin-fw-panel ' : $admin_body_classes;
261
+
262
+ return $admin_body_classes;
263
+ }
264
+
265
+ /**
266
+ * Add Menu page link
267
+ *
268
+ * @return void
269
+ * @since 1.0
270
+ * @author Andrea Grillo <andrea.grillo@yithemes.com>
271
+ */
272
+ public function add_menu_page() {
273
+ global $admin_page_hooks;
274
+
275
+ if ( ! isset( $admin_page_hooks['yith_plugin_panel'] ) ) {
276
+ $position = apply_filters( 'yit_plugins_menu_item_position', '62.32' );
277
+ $capability = apply_filters( 'yit_plugin_panel_menu_page_capability', 'manage_options' );
278
+ $show = apply_filters( 'yit_plugin_panel_menu_page_show', true );
279
+
280
+ // YITH text must not be translated
281
+ if ( ! ! $show ) {
282
+ add_menu_page( 'yith_plugin_panel', 'YITH', $capability, 'yith_plugin_panel', null, yith_plugin_fw_get_default_logo(), $position );
283
+ $admin_page_hooks['yith_plugin_panel'] = 'yith-plugins'; // prevent issues for backward compatibility
284
+ }
285
+ }
286
+ }
287
+
288
+ /**
289
+ * Remove duplicate submenu
290
+ * Submenu page hack: Remove the duplicate YIT Plugin link on subpages
291
+ *
292
+ * @return void
293
+ * @since 1.0
294
+ * @author Andrea Grillo <andrea.grillo@yithemes.com>
295
+ */
296
+ public function remove_duplicate_submenu_page() {
297
+ /* === Duplicate Items Hack === */
298
+ remove_submenu_page( 'yith_plugin_panel', 'yith_plugin_panel' );
299
+ }
300
+
301
+ /**
302
+ * Enqueue script and styles in admin side
303
+ * Add style and scripts to administrator
304
+ *
305
+ * @return void
306
+ * @since 1.0
307
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
308
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
309
+ */
310
+ public function admin_enqueue_scripts() {
311
+ global $pagenow;
312
+
313
+ // enqueue styles only in the current panel page
314
+ if ( 'admin.php' === $pagenow && strpos( get_current_screen()->id, $this->settings['page'] ) !== false || apply_filters( 'yit_plugin_panel_asset_loading', false ) ) {
315
+ wp_enqueue_media();
316
+
317
+ wp_enqueue_style( 'yith-plugin-fw-fields' );
318
+ wp_enqueue_style( 'yit-jquery-ui-style' );
319
+ wp_enqueue_style( 'raleway-font' );
320
+
321
+ wp_enqueue_script( 'jquery-ui' );
322
+ wp_enqueue_script( 'jquery-ui-core' );
323
+ wp_enqueue_script( 'jquery-ui-dialog' );
324
+ wp_enqueue_script( 'yith_how_to' );
325
+ wp_enqueue_script( 'yith-plugin-fw-fields' );
326
+ }
327
+
328
+ if ( ( 'admin.php' == $pagenow && yith_plugin_fw_is_panel() ) || apply_filters( 'yit_plugin_panel_asset_loading', false ) ) {
329
+ wp_enqueue_media();
330
+ wp_enqueue_style( 'yit-plugin-style' );
331
+ wp_enqueue_script( 'yit-plugin-panel' );
332
+ }
333
+
334
+ if ( 'admin.php' == $pagenow && strpos( get_current_screen()->id, 'yith_upgrade_premium_version' ) !== false ) {
335
+ wp_enqueue_style( 'yit-upgrade-to-pro' );
336
+ wp_enqueue_script( 'colorbox' );
337
+ }
338
+
339
+ }
340
+
341
+ /**
342
+ * Register Settings
343
+ * Generate wp-admin settings pages by registering your settings and using a few callbacks to control the output
344
+ *
345
+ * @return void
346
+ * @since 1.0
347
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
348
+ */
349
+ public function register_settings() {
350
+ register_setting( 'yit_' . $this->settings['parent'] . '_options', 'yit_' . $this->settings['parent'] . '_options', array( $this, 'options_validate' ) );
351
+ }
352
+
353
+ /**
354
+ * Options Validate
355
+ * a callback function called by Register Settings function
356
+ *
357
+ * @param $input
358
+ * @return array validate input fields
359
+ * @since 1.0
360
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
361
+ */
362
+ public function options_validate( $input ) {
363
+
364
+ $option_key = ! empty( $input['option_key'] ) ? $input['option_key'] : 'general';
365
+
366
+ $yit_options = $this->get_main_array_options();
367
+
368
+ // default
369
+ $valid_input = $this->get_options();
370
+
371
+ $submit = ( ! empty( $input['submit-general'] ) ? true : false );
372
+ $reset = ( ! empty( $input['reset-general'] ) ? true : false );
373
+
374
+ foreach ( $yit_options[ $option_key ] as $section => $data ) {
375
+ foreach ( $data as $option ) {
376
+ if ( isset( $option['sanitize_call'] ) && isset( $option['id'] ) ) { //yiw_debug($option, false);
377
+ if ( is_array( $option['sanitize_call'] ) ) :
378
+ foreach ( $option['sanitize_call'] as $callback ) {
379
+ if ( is_array( $input[ $option['id'] ] ) ) {
380
+ $valid_input[ $option['id'] ] = array_map( $callback, $input[ $option['id'] ] );
381
+ } else {
382
+ $valid_input[ $option['id'] ] = call_user_func( $callback, $input[ $option['id'] ] );
383
+ }
384
+ }
385
+ else :
386
+ if ( is_array( $input[ $option['id'] ] ) ) {
387
+ $valid_input[ $option['id'] ] = array_map( $option['sanitize_call'], $input[ $option['id'] ] );
388
+ } else {
389
+ $valid_input[ $option['id'] ] = call_user_func( $option['sanitize_call'], $input[ $option['id'] ] );
390
+ }
391
+ endif;
392
+ } else {
393
+ if ( isset( $option['id'] ) ) {
394
+ $value = isset( $input[ $option['id'] ] ) ? $input[ $option['id'] ] : false;
395
+ if ( isset( $option['type'] ) && in_array( $option['type'], array( 'checkbox', 'onoff' ) ) ) {
396
+ $value = yith_plugin_fw_is_true( $value ) ? 'yes' : 'no';
397
+ }
398
+
399
+ if ( ! empty( $option['yith-sanitize-callback'] ) && is_callable( $option['yith-sanitize-callback'] ) ) {
400
+ $value = call_user_func( $option['yith-sanitize-callback'], $value );
401
+ }
402
+
403
+ $valid_input[ $option['id'] ] = $value;
404
+ }
405
+ }
406
+
407
+ }
408
+ }
409
+
410
+ return $valid_input;
411
+ }
412
+
413
+ /**
414
+ * Add Setting SubPage
415
+ * add Setting SubPage to wordpress administrator
416
+ *
417
+ * @return array validate input fields
418
+ * @since 1.0
419
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
420
+ */
421
+ public function add_setting_page() {
422
+ $this->settings['icon_url'] = isset( $this->settings['icon_url'] ) ? $this->settings['icon_url'] : '';
423
+ $this->settings['position'] = isset( $this->settings['position'] ) ? $this->settings['position'] : null;
424
+ $parent = $this->settings['parent_slug'] . $this->settings['parent_page'];
425
+
426
+ if ( ! empty( $parent ) ) {
427
+ add_submenu_page( $parent, $this->settings['page_title'], $this->settings['menu_title'], $this->settings['capability'], $this->settings['page'], array( $this, 'yit_panel' ) );
428
+ } else {
429
+ add_menu_page( $this->settings['page_title'], $this->settings['menu_title'], $this->settings['capability'], $this->settings['page'], array( $this, 'yit_panel' ), $this->settings['icon_url'], $this->settings['position'] );
430
+ }
431
+ /* === Duplicate Items Hack === */
432
+ $this->remove_duplicate_submenu_page();
433
+ do_action( 'yit_after_add_settings_page' );
434
+
435
+
436
+ }
437
+
438
+ /**
439
+ * Add Premium Version upgrade menu item
440
+ *
441
+ * @return void
442
+ * @since 2.9.13
443
+ * @author Andrea Grillo <andrea.grillo@yithemes.com>
444
+ */
445
+ public function add_premium_version_upgrade_to_menu() {
446
+ /* === Add the How To menu item only if the customer haven't a premium version enabled === */
447
+ if ( function_exists( 'YIT_Plugin_Licence' ) && ! ! YIT_Plugin_Licence()->get_products() ) {
448
+ return;
449
+ }
450
+
451
+ global $submenu;
452
+ if ( apply_filters( 'yit_show_upgrade_to_premium_version', isset( $submenu['yith_plugin_panel'] ) ) ) {
453
+ $submenu['yith_plugin_panel']['how_to'] = array(
454
+ sprintf( '%s%s%s', '<span id="yith-how-to-premium">', __( 'How to install premium version', 'yith-plugin-fw' ), '</span>' ),
455
+ 'install_plugins',
456
+ '//support.yithemes.com/hc/en-us/articles/217840988',
457
+ __( 'How to install premium version', 'yith-plugin-fw' ),
458
+ );
459
+ }
460
+ }
461
+
462
+ /**
463
+ * Print the tabs navigation
464
+ *
465
+ * @param array $args
466
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
467
+ * @since 3.4.0
468
+ */
469
+ public function print_tabs_nav( $args = array() ) {
470
+ $defaults = array(
471
+ 'current_tab' => $this->get_current_tab(),
472
+ 'premium_class' => isset( $this->settings['class'] ) ? 'yith-premium' : 'premium',
473
+ 'page' => $this->settings['page'],
474
+ 'parent_page' => $this->settings['parent_page'],
475
+ 'wrapper_class' => 'nav-tab-wrapper',
476
+ );
477
+ $args = wp_parse_args( $args, $defaults );
478
+ /**
479
+ * @var string $current_tab
480
+ * @var string $premium_class
481
+ * @var string $page
482
+ * @var string $parent_page
483
+ * @var string $wrapper_class
484
+ */
485
+ extract( $args );
486
+
487
+ $tabs = '<ul class="yith-plugin-fw-tabs">';
488
+
489
+ foreach ( $this->settings['admin-tabs'] as $tab => $tab_value ) {
490
+ $active_class = ( $current_tab == $tab ) ? ' nav-tab-active' : '';
491
+ $active_class .= 'premium' == $tab ? ' ' . $premium_class : '';
492
+ $active_class = apply_filters( 'yith_plugin_fw_panel_active_tab_class', $active_class, $current_tab, $tab );
493
+
494
+ $first_sub_tab = $this->get_first_sub_tab_key( $tab );
495
+ $sub_tab = ! ! $first_sub_tab ? $first_sub_tab : '';
496
+ $sub_tabs = $this->get_sub_tabs( $tab );
497
+ $url = $this->get_nav_url( $page, $tab, $sub_tab, $parent_page );
498
+ $icon = ( $current_tab !== $tab && $sub_tabs ) ? '<i class="yith-icon yith-icon-arrow_down"></i>' : '';
499
+
500
+ $tabs .= '<li class="yith-plugin-fw-tab-element">';
501
+ $tabs .= '<a class="nav-tab' . $active_class . '" href="' . $url . '">' . $tab_value . $icon . '</a>';
502
+
503
+ if ( $current_tab !== $tab && $sub_tabs ) {
504
+ $tabs .= '<div class="nav-subtab-wrap"><ul class="nav-subtab">';
505
+ foreach ( $sub_tabs as $_key => $_tab ) {
506
+ $url = $this->get_nav_url( $page, $tab, $_key );
507
+ $tabs .= '<li class="nav-subtab-item"><a href="' . $url . '">' . $_tab['title'] . '</a></li>';
508
+ }
509
+ $tabs .= '</ul></div>';
510
+ }
511
+ $tabs .= '</li>';
512
+ }
513
+ $tabs .= '</ul>';
514
+ ?>
515
+ <h2 class="<?php echo $wrapper_class ?>">
516
+ <?php echo $tabs ?>
517
+ </h2>
518
+ <?php
519
+ $this->print_sub_tabs_nav( $args );
520
+ }
521
+
522
+ /**
523
+ * @param string $page
524
+ * @param string $tab
525
+ * @param string $sub_tab
526
+ * @param string $parent_page
527
+ * @return string
528
+ */
529
+ public function get_nav_url( $page, $tab, $sub_tab = '', $parent_page = '' ) {
530
+ $tab_hierarchy = $this->get_tabs_hierarchy();
531
+ $key = ! ! $sub_tab ? $sub_tab : $tab;
532
+
533
+ if ( isset( $tab_hierarchy[ $key ], $tab_hierarchy[ $key ]['type'], $tab_hierarchy[ $key ]['post_type'] ) && 'post_type' === $tab_hierarchy[ $key ]['type'] ) {
534
+ $url = admin_url( "edit.php?post_type={$tab_hierarchy[$key]['post_type']}" );
535
+ } elseif ( isset( $tab_hierarchy[ $key ], $tab_hierarchy[ $key ]['type'], $tab_hierarchy[ $key ]['taxonomy'] ) && 'taxonomy' === $tab_hierarchy[ $key ]['type'] ) {
536
+ $url = admin_url( "edit-tags.php?taxonomy={$tab_hierarchy[$key]['taxonomy']}" );
537
+ } else {
538
+ $url = ! ! $parent_page ? "?{$parent_page}&" : '?';
539
+ $url .= "page={$page}&tab={$tab}";
540
+ $url .= ! ! $sub_tab ? "&sub_tab={$sub_tab}" : '';
541
+ $url = admin_url( "admin.php{$url}" );
542
+ }
543
+
544
+ return apply_filters( 'yith_plugin_fw_panel_url', $url, $page, $tab, $sub_tab, $parent_page );
545
+ }
546
+
547
+ /**
548
+ * Print the Sub-tabs navigation if the current tab has sub-tabs
549
+ *
550
+ * @param array $args
551
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
552
+ * @since 3.4.0
553
+ */
554
+ public function print_sub_tabs_nav( $args = array() ) {
555
+ $defaults = array(
556
+ 'current_tab' => $this->get_current_tab(),
557
+ 'page' => $this->settings['page'],
558
+ 'current_sub_tab' => $this->get_current_sub_tab(),
559
+ );
560
+ $args = wp_parse_args( $args, $defaults );
561
+
562
+ /**
563
+ * @var string $current_tab
564
+ * @var string $page
565
+ * @var string $current_sub_tab
566
+ */
567
+ extract( $args );
568
+
569
+ $sub_tabs = $this->get_sub_tabs( $current_tab );
570
+
571
+ if ( $sub_tabs && $current_sub_tab ) {
572
+ include YIT_CORE_PLUGIN_TEMPLATE_PATH . '/panel/sub-tabs-nav.php';
573
+ }
574
+ }
575
+
576
+ /**
577
+ * Show a tabbed panel to setting page
578
+ * a callback function called by add_setting_page => add_submenu_page
579
+ *
580
+ * @return void
581
+ * @since 1.0
582
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
583
+ */
584
+ public function yit_panel() {
585
+ $yit_options = $this->get_main_array_options();
586
+ $wrap_class = isset( $this->settings['class'] ) ? $this->settings['class'] : '';
587
+
588
+ $option_key = $this->get_current_option_key();
589
+ $custom_tab_action = $this->is_custom_tab( $yit_options, $option_key );
590
+ ?>
591
+ <div class="wrap <?php echo $wrap_class ?>">
592
+ <div id="icon-themes" class="icon32"><br/></div>
593
+ <?php
594
+ do_action( 'yith_plugin_fw_before_yith_panel', $this->settings['page'] );
595
+
596
+ $this->print_tabs_nav();
597
+
598
+ if ( $custom_tab_action ) {
599
+ $this->print_custom_tab( $custom_tab_action );
600
+ return;
601
+ }
602
+
603
+ $panel_content_class = apply_filters( 'yit_admin_panel_content_class', 'yit-admin-panel-content-wrap' );
604
+ ?>
605
+ <div id="wrap" class="yith-plugin-fw plugin-option yit-admin-panel-container">
606
+ <?php $this->message(); ?>
607
+ <div class="<?php echo $panel_content_class; ?>">
608
+ <h2><?php echo $this->get_tab_title() ?></h2>
609
+ <?php if ( $this->is_show_form() ) : ?>
610
+ <form id="yith-plugin-fw-panel" method="post" action="options.php">
611
+ <?php do_settings_sections( 'yit' ); ?>
612
+ <p>&nbsp;</p>
613
+ <?php settings_fields( 'yit_' . $this->settings['parent'] . '_options' ); ?>
614
+ <input type="hidden" name="<?php echo $this->get_name_field( 'option_key' ) ?>"
615
+ value="<?php echo esc_attr( $option_key ) ?>"/>
616
+ <input type="submit" class="button-primary"
617
+ value="<?php _e( 'Save Changes', 'yith-plugin-fw' ) ?>"
618
+ style="float:left;margin-right:10px;"/>
619
+ </form>
620
+ <form method="post">
621
+ <?php $warning = __( 'If you continue with this action, you will reset all options in this page.', 'yith-plugin-fw' ) ?>
622
+ <input type="hidden" name="yit-action" value="reset"/>
623
+ <input type="submit" name="yit-reset" class="button-secondary"
624
+ value="<?php _e( 'Reset to default', 'yith-plugin-fw' ) ?>"
625
+ onclick="return confirm('<?php echo $warning . '\n' . __( 'Are you sure?', 'yith-plugin-fw' ) ?>');"/>
626
+ </form>
627
+ <p>&nbsp;</p>
628
+ <?php endif ?>
629
+ </div>
630
+ </div>
631
+ </div>
632
+ <?php
633
+ }
634
+
635
+ /**
636
+ * Check if is a custom tab
637
+ *
638
+ * @param array $options
639
+ * @param string $option_key
640
+ * @return bool
641
+ */
642
+ public function is_custom_tab( $options, $option_key ) {
643
+ foreach ( $options[ $option_key ] as $section => $option ) {
644
+ if ( isset( $option['type'] ) && isset( $option['action'] ) && 'custom_tab' == $option['type'] && ! empty( $option['action'] ) ) {
645
+ return $option['action'];
646
+ } else {
647
+ return false;
648
+ }
649
+ }
650
+
651
+ return false;
652
+ }
653
+
654
+ public function get_tab_type_by_options( $tab_options ) {
655
+ $first = ! ! $tab_options && is_array( $tab_options ) ? current( $tab_options ) : array();
656
+ $type = isset( $first['type'] ) ? $first['type'] : 'options';
657
+ $special_types = array( 'post_type', 'taxonomy', 'custom_tab', 'multi_tab' );
658
+ return in_array( $type, $special_types ) ? $type : 'options';
659
+ }
660
+
661
+ public function get_tab_info_by_options( $tab_options ) {
662
+ $type = $this->get_tab_type_by_options( $tab_options );
663
+ $info = array( 'type' => $type );
664
+ $first = ! ! $tab_options && is_array( $tab_options ) ? current( $tab_options ) : array();
665
+ if ( 'post_type' === $type ) {
666
+ $info['post_type'] = isset( $first['post_type'] ) ? $first['post_type'] : '';
667
+ } else if ( 'taxonomy' === $type ) {
668
+ $info['taxonomy'] = isset( $first['taxonomy'] ) ? $first['taxonomy'] : '';
669
+ }
670
+
671
+ return $info;
672
+ }
673
+
674
+ /**
675
+ * Fire the action to print the custom tab
676
+ *
677
+ * @param string $action Action to fire
678
+ * @return void
679
+ * @since 1.0
680
+ * @author Andrea Grillo <andrea.grillo@yithemes.com>
681
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
682
+ */
683
+ public function print_custom_tab( $action ) {
684
+ do_action( $action );
685
+ }
686
+
687
+ /**
688
+ * Add sections and fields to setting panel
689
+ * read all options and show sections and fields
690
+ *
691
+ * @return void
692
+ * @since 1.0
693
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
694
+ */
695
+ public function add_fields() {
696
+ $yit_options = $this->get_main_array_options();
697
+ $option_key = $this->get_current_option_key();
698
+
699
+ if ( ! $option_key ) {
700
+ return;
701
+ }
702
+ foreach ( $yit_options[ $option_key ] as $section => $data ) {
703
+ add_settings_section( "yit_settings_{$option_key}_{$section}", $this->get_section_title( $section ), $this->get_section_description( $section ), 'yit' );
704
+ foreach ( $data as $option ) {
705
+ if ( isset( $option['id'] ) && isset( $option['type'] ) && isset( $option['name'] ) ) {
706
+ add_settings_field( "yit_setting_" . $option['id'], $option['name'], array( $this, 'render_field' ), 'yit', "yit_settings_{$option_key}_{$section}", array( 'option' => $option, 'label_for' => $this->get_id_field( $option['id'] ) ) );
707
+ }
708
+ }
709
+ }
710
+ }
711
+
712
+
713
+ /**
714
+ * Add the tabs to admin bar menu
715
+ * set all tabs of settings page on wp admin bar
716
+ *
717
+ * @return void|array return void when capability is false
718
+ * @since 1.0
719
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
720
+ */
721
+ public function add_admin_bar_menu() {
722
+
723
+ global $wp_admin_bar;
724
+
725
+ if ( ! current_user_can( 'manage_options' ) ) {
726
+ return;
727
+ }
728
+
729
+ if ( ! empty( $this->settings['admin_tabs'] ) ) {
730
+ foreach ( $this->settings['admin-tabs'] as $item => $title ) {
731
+
732
+ $wp_admin_bar->add_menu( array(
733
+ 'parent' => $this->settings['parent'],
734
+ 'title' => $title,
735
+ 'id' => $this->settings['parent'] . '-' . $item,
736
+ 'href' => admin_url( 'themes.php' ) . '?page=' . $this->settings['parent_page'] . '&tab=' . $item,
737
+ ) );
738
+ }
739
+ }
740
+ }
741
+
742
+
743
+ /**
744
+ * Get current tab
745
+ * get the id of tab showed, return general is the current tab is not defined
746
+ *
747
+ * @return string
748
+ * @since 1.0
749
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
750
+ */
751
+ function get_current_tab() {
752
+ $admin_tabs = array_keys( $this->settings['admin-tabs'] );
753
+
754
+ if ( ! isset( $_GET['page'] ) || $_GET['page'] != $this->settings['page'] ) {
755
+ return false;
756
+ }
757
+ if ( isset( $_REQUEST['yit_tab_options'] ) ) {
758
+ return $_REQUEST['yit_tab_options'];
759
+ } elseif ( isset( $_GET['tab'] ) ) {
760
+ return $_GET['tab'];
761
+ } elseif ( isset( $admin_tabs[0] ) ) {
762
+ return $admin_tabs[0];
763
+ } else {
764
+ return 'general';
765
+ }
766
+ }
767
+
768
+ /**
769
+ * Get the current sub-tab
770
+ *
771
+ * @return string the key of the sub-tab if exists, empty string otherwise
772
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
773
+ * @since 3.4.0
774
+ */
775
+ public function get_current_sub_tab() {
776
+ $sub_tabs = $this->get_sub_tabs();
777
+ $sub_tab = isset( $_REQUEST['sub_tab'] ) ? $_REQUEST['sub_tab'] : '';
778
+
779
+ if ( $sub_tabs ) {
780
+ if ( $sub_tab && ! isset( $sub_tabs[ $sub_tab ] ) || ! $sub_tab ) {
781
+ $sub_tab = current( array_keys( $sub_tabs ) );
782
+ }
783
+ } else {
784
+ $sub_tab = '';
785
+ }
786
+
787
+ return $sub_tab;
788
+ }
789
+
790
+ /**
791
+ * Return the option key related to the current page
792
+ * for sub-tabbed tabs, it will return the current sub-tab
793
+ * fot normal tabs, it will return the current tab
794
+ *
795
+ * @return string the current sub-tab, if exists; the current tab otherwise
796
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
797
+ * @since 3.4.0
798
+ */
799
+ public function get_current_option_key() {
800
+ $current_tab = $this->get_current_tab();
801
+ $current_sub_tab = $this->get_current_sub_tab();
802
+
803
+ if ( ! $current_tab ) {
804
+ return false;
805
+ }
806
+
807
+ return $current_sub_tab ? $current_sub_tab : $current_tab;
808
+ }
809
+
810
+
811
+ /**
812
+ * Message
813
+ * define an array of message and show the content od message if
814
+ * is find in the query string
815
+ *
816
+ * @return void
817
+ * @since 1.0
818
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
819
+ */
820
+ public function message() {
821
+
822
+ $message = array(
823
+ 'element_exists' => $this->get_message( '<strong>' . __( 'The element you have entered already exists. Please, enter another name.', 'yith-plugin-fw' ) . '</strong>', 'error', false ),
824
+ 'saved' => $this->get_message( '<strong>' . __( 'Settings saved', 'yith-plugin-fw' ) . '.</strong>', 'updated', false ),
825
+ 'reset' => $this->get_message( '<strong>' . __( 'Settings reset', 'yith-plugin-fw' ) . '.</strong>', 'updated', false ),
826
+ 'delete' => $this->get_message( '<strong>' . __( 'Element deleted correctly.', 'yith-plugin-fw' ) . '</strong>', 'updated', false ),
827
+ 'updated' => $this->get_message( '<strong>' . __( 'Element updated correctly.', 'yith-plugin-fw' ) . '</strong>', 'updated', false ),
828
+ 'settings-updated' => $this->get_message( '<strong>' . __( 'Element updated correctly.', 'yith-plugin-fw' ) . '</strong>', 'updated', false ),
829
+ 'imported' => $this->get_message( '<strong>' . __( 'Database imported correctly.', 'yith-plugin-fw' ) . '</strong>', 'updated', false ),
830
+ 'no-imported' => $this->get_message( '<strong>' . __( 'An error has occurred during import. Please try again.', 'yith-plugin-fw' ) . '</strong>', 'error', false ),
831
+ 'file-not-valid' => $this->get_message( '<strong>' . __( 'The added file is not valid.', 'yith-plugin-fw' ) . '</strong>', 'error', false ),
832
+ 'cant-import' => $this->get_message( '<strong>' . __( 'Sorry, import is disabled.', 'yith-plugin-fw' ) . '</strong>', 'error', false ),
833
+ 'ord' => $this->get_message( '<strong>' . __( 'Sorting successful.', 'yith-plugin-fw' ) . '</strong>', 'updated', false ),
834
+ );
835
+
836
+ foreach ( $message as $key => $value ) {
837
+ if ( isset( $_GET[ $key ] ) ) {
838
+ echo $message[ $key ];
839
+ }
840
+ }
841
+
842
+ }
843
+
844
+ /**
845
+ * Get Message
846
+ * return html code of message
847
+ *
848
+ * @param $message
849
+ * @param string $type can be 'error' or 'updated'
850
+ * @param bool $echo
851
+ * @return string
852
+ * @since 1.0
853
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
854
+ */
855
+ public function get_message( $message, $type = 'error', $echo = true ) {
856
+ $message = '<div id="message" class="' . $type . ' fade"><p>' . $message . '</p></div>';
857
+ if ( $echo ) {
858
+ echo $message;
859
+ }
860
+
861
+ return $message;
862
+ }
863
+
864
+
865
+ /**
866
+ * Get Tab Path Files
867
+ * return an array with file names of tabs
868
+ *
869
+ * @return array
870
+ * @since 1.0
871
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
872
+ */
873
+ function get_tabs_path_files() {
874
+
875
+ $option_files_path = $this->settings['options-path'] . '/';
876
+
877
+ $tabs = array();
878
+
879
+ foreach ( ( array )glob( $option_files_path . '*.php' ) as $filename ) {
880
+ preg_match( '/(.*)-options\.(.*)/', basename( $filename ), $filename_parts );
881
+
882
+ if ( ! isset( $filename_parts[1] ) ) {
883
+ continue;
884
+ }
885
+
886
+ $tab = $filename_parts[1];
887
+
888
+ $tabs[ $tab ] = $filename;
889
+ }
890
+
891
+ return $tabs;
892
+ }
893
+
894
+ /**
895
+ * Get main array options
896
+ * return an array with all options defined on options-files
897
+ *
898
+ * @return array
899
+ * @since 1.0
900
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
901
+ */
902
+ function get_main_array_options() {
903
+ $this->_maybe_init_vars();
904
+
905
+ return $this->_main_array_options;
906
+ }
907
+
908
+ function get_tabs_hierarchy() {
909
+ $this->_maybe_init_vars();
910
+
911
+ return $this->_tabs_hierarchy;
912
+ }
913
+
914
+ /**
915
+ * Return the sub-tabs array of a specific tab
916
+ *
917
+ * @param array|bool $_tab the tab; if not set it'll be the current tab
918
+ * @since 3.4.0
919
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
920
+ * @return array sub-tabs array
921
+ */
922
+ public function get_sub_tabs( $_tab = false ) {
923
+ if ( false === $_tab ) {
924
+ $_tab = $this->get_current_tab();
925
+ }
926
+
927
+ if ( is_string( $_tab ) ) {
928
+ $main_array_options = $this->get_main_array_options();
929
+ $current_tab_options = isset( $main_array_options[ $_tab ] ) ? $main_array_options[ $_tab ] : array();
930
+ if ( $current_tab_options ) {
931
+ $_tab = array( $_tab => $current_tab_options );
932
+ }
933
+ }
934
+
935
+ $_tab_options = ! ! $_tab && is_array( $_tab ) ? current( $_tab ) : false;
936
+ $_first = ! ! $_tab_options && is_array( $_tab_options ) ? current( $_tab_options ) : false;
937
+ if ( $_first && is_array( $_first ) && isset( $_first['type'] ) && 'multi_tab' === $_first['type'] && ! empty( $_first['sub-tabs'] ) ) {
938
+ return $_first['sub-tabs'];
939
+ }
940
+ return array();
941
+ }
942
+
943
+ public function get_first_sub_tab_key( $_tab = false ) {
944
+ $key = false;
945
+ if ( is_string( $_tab ) ) {
946
+ $main_array_options = $this->get_main_array_options();
947
+ $current_tab_options = isset( $main_array_options[ $_tab ] ) ? $main_array_options[ $_tab ] : array();
948
+ if ( $current_tab_options ) {
949
+ $_tab = array( $_tab => $current_tab_options );
950
+ }
951
+ }
952
+
953
+ if ( ( $sub_tabs = $this->get_sub_tabs( $_tab ) ) ) {
954
+ $key = current( array_keys( $sub_tabs ) );
955
+ }
956
+
957
+ return $key;
958
+ }
959
+
960
+
961
+ /**
962
+ * Set an array with all default options
963
+ * put default options in an array
964
+ *
965
+ * @return array
966
+ * @since 1.0
967
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
968
+ */
969
+ public function get_default_options() {
970
+ $yit_options = $this->get_main_array_options();
971
+ $default_options = array();
972
+
973
+ foreach ( $yit_options as $tab => $sections ) {
974
+ foreach ( $sections as $section ) {
975
+ foreach ( $section as $id => $value ) {
976
+ if ( isset( $value['std'] ) && isset( $value['id'] ) ) {
977
+ $default_options[ $value['id'] ] = $value['std'];
978
+ }
979
+ }
980
+ }
981
+ }
982
+
983
+ unset( $yit_options );
984
+
985
+ return $default_options;
986
+ }
987
+
988
+
989
+ /**
990
+ * Get the title of the tab
991
+ * return the title of tab
992
+ *
993
+ * @return string
994
+ * @since 1.0
995
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
996
+ */
997
+ function get_tab_title() {
998
+ $yit_options = $this->get_main_array_options();
999
+ $option_key = $this->get_current_option_key();
1000
+
1001
+ foreach ( $yit_options[ $option_key ] as $sections => $data ) {
1002
+ foreach ( $data as $option ) {
1003
+ if ( isset( $option['type'] ) && $option['type'] == 'title' ) {
1004
+ return $option['name'];
1005
+ }
1006
+ }
1007
+ }
1008
+ return '';
1009
+ }
1010
+
1011
+ /**
1012
+ * Get the title of the section
1013
+ * return the title of section
1014
+ *
1015
+ * @param $section
1016
+ * @return string
1017
+ * @since 1.0
1018
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
1019
+ */
1020
+ function get_section_title( $section ) {
1021
+ $yit_options = $this->get_main_array_options();
1022
+ $option_key = $this->get_current_option_key();
1023
+
1024
+ foreach ( $yit_options[ $option_key ][ $section ] as $option ) {
1025
+ if ( isset( $option['type'] ) && $option['type'] == 'section' ) {
1026
+ return $option['name'];
1027
+ }
1028
+ }
1029
+ return '';
1030
+ }
1031
+
1032
+ /**
1033
+ * Get the description of the section
1034
+ * return the description of section if is set
1035
+ *
1036
+ * @param $section
1037
+ * @return string
1038
+ * @since 1.0
1039
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
1040
+ */
1041
+ function get_section_description( $section ) {
1042
+ $yit_options = $this->get_main_array_options();
1043
+ $option_key = $this->get_current_option_key();
1044
+
1045
+ foreach ( $yit_options[ $option_key ][ $section ] as $option ) {
1046
+ if ( isset( $option['type'] ) && $option['type'] == 'section' && isset( $option['desc'] ) ) {
1047
+ return '<p>' . $option['desc'] . '</p>';
1048
+ }
1049
+ }
1050
+ return '';
1051
+ }
1052
+
1053
+
1054
+ /**
1055
+ * Show form when necessary
1056
+ * return true if 'showform' is not defined
1057
+ *
1058
+ * @return bool
1059
+ * @since 1.0
1060
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
1061
+ */
1062
+ function is_show_form() {
1063
+ $yit_options = $this->get_main_array_options();
1064
+ $option_key = $this->get_current_option_key();
1065
+
1066
+ foreach ( $yit_options[ $option_key ] as $sections => $data ) {
1067
+ foreach ( $data as $option ) {
1068
+ if ( ! isset( $option['type'] ) || $option['type'] != 'title' ) {
1069
+ continue;
1070
+ }
1071
+ if ( isset( $option['showform'] ) ) {
1072
+ return $option['showform'];
1073
+ } else {
1074
+ return true;
1075
+ }
1076
+ }
1077
+ }
1078
+ }
1079
+
1080
+ /**
1081
+ * Get name field
1082
+ * return a string with the name of the input field
1083
+ *
1084
+ * @param string $name
1085
+ * @return string
1086
+ * @since 1.0
1087
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
1088
+ */
1089
+ function get_name_field( $name = '' ) {
1090
+ return 'yit_' . $this->settings['parent'] . '_options[' . $name . ']';
1091
+ }
1092
+
1093
+ /**
1094
+ * Get id field
1095
+ * return a string with the id of the input field
1096
+ *
1097
+ * @param string $id
1098
+ * @return string
1099
+ * @since 1.0
1100
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
1101
+ */
1102
+ function get_id_field( $id ) {
1103
+ return 'yit_' . $this->settings['parent'] . '_options_' . $id;
1104
+ }
1105
+
1106
+
1107
+ /**
1108
+ * Render the field showed in the setting page
1109
+ * include the file of the option type, if file do not exists
1110
+ * return a text area
1111
+ *
1112
+ * @param array $param
1113
+ * @return void
1114
+ * @since 1.0
1115
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
1116
+ */
1117
+ function render_field( $param ) {
1118
+
1119
+ if ( ! empty( $param ) && isset( $param ['option'] ) ) {
1120
+ $option = $param ['option'];
1121
+ $db_options = $this->get_options();
1122
+
1123
+ $custom_attributes = array();
1124
+
1125
+ if ( ! empty( $option['custom_attributes'] ) && is_array( $option['custom_attributes'] ) ) {
1126
+ foreach ( $option['custom_attributes'] as $attribute => $attribute_value ) {
1127
+ $custom_attributes[] = esc_attr( $attribute ) . '="' . esc_attr( $attribute_value ) . '"';
1128
+ }
1129
+ }
1130
+
1131
+ $custom_attributes = implode( ' ', $custom_attributes );
1132
+ $std = isset( $option['std'] ) ? $option['std'] : '';
1133
+ $db_value = ( isset( $db_options[ $option['id'] ] ) ) ? $db_options[ $option['id'] ] : $std;
1134
+
1135
+ if ( isset( $option['deps'] ) )
1136
+ $deps = $option['deps'];
1137
+
1138
+ if ( 'on-off' === $option['type'] )
1139
+ $option['type'] = 'onoff';
1140
+
1141
+ if ( $field_template_path = yith_plugin_fw_get_field_template_path( $option ) ) {
1142
+ $field_container_path = apply_filters( 'yith_plugin_fw_panel_field_container_template_path', YIT_CORE_PLUGIN_TEMPLATE_PATH . '/panel/panel-field-container.php', $option );
1143
+ file_exists( $field_container_path ) && include( $field_container_path );
1144
+ } else {
1145
+ do_action( "yit_panel_{$option['type']}", $option, $db_value, $custom_attributes );
1146
+ }
1147
+ }
1148
+ }
1149
+
1150
+ /**
1151
+ * Get options from db
1152
+ * return the options from db, if the options aren't defined in the db,
1153
+ * get the default options ad add the options in the db
1154
+ *
1155
+ * @return array
1156
+ * @since 1.0
1157
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
1158
+ */
1159
+ public function get_options() {
1160
+ $options = get_option( 'yit_' . $this->settings['parent'] . '_options' );
1161
+ if ( $options === false || ( isset( $_REQUEST['yit-action'] ) && $_REQUEST['yit-action'] == 'reset' ) ) {
1162
+ $options = $this->get_default_options();
1163
+ }
1164
+
1165
+ return $options;
1166
+ }
1167
+
1168
+ /**
1169
+ * Show a box panel with specific content in two columns as a new woocommerce type
1170
+ *
1171
+ * @param array $args
1172
+ * @return void
1173
+ * @since 1.0
1174
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.com>
1175
+ */
1176
+ public static function add_infobox( $args = array() ) {
1177
+ if ( ! empty( $args ) ) {
1178
+ extract( $args );
1179
+ require_once( YIT_CORE_PLUGIN_TEMPLATE_PATH . '/panel/boxinfo.php' );
1180
+ }
1181
+ }
1182
+
1183
+ /**
1184
+ * Show a box panel with specific content in two columns as a new woocommerce type
1185
+ *
1186
+ * @param array $args
1187
+ * @return void
1188
+ * @deprecated 3.0.12 Do nothing! Method left to prevent Fatal Error if called directly
1189
+ */
1190
+ public static function add_videobox( $args = array() ) {
1191
+
1192
+ }
1193
+
1194
+ /**
1195
+ * Fire the action to print the custom tab
1196
+ *
1197
+ * @return void
1198
+ * @deprecated 3.0.12 Do nothing! Method left to prevent Fatal Error if called directly
1199
+ */
1200
+ public function print_video_box() {
1201
+
1202
+ }
1203
+
1204
+ /**
1205
+ * sort plugins by name in YITH Plugins menu
1206
+ *
1207
+ * @since 3.0.0
1208
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
1209
+ */
1210
+ public static function sort_plugins() {
1211
+ global $submenu;
1212
+ if ( ! empty( $submenu['yith_plugin_panel'] ) ) {
1213
+ $sorted_plugins = $submenu['yith_plugin_panel'];
1214
+
1215
+ usort( $sorted_plugins, function ( $a, $b ) {
1216
+ return strcmp( current( $a ), current( $b ) );
1217
+ } );
1218
+
1219
+ $submenu['yith_plugin_panel'] = $sorted_plugins;
1220
+ }
1221
+ }
1222
+
1223
+ /**
1224
+ * add menu class in YITH Plugins menu
1225
+ *
1226
+ * @since 3.0.0
1227
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
1228
+ */
1229
+ public static function add_menu_class_in_yith_plugin( $menu ) {
1230
+ global $submenu;
1231
+
1232
+ if ( ! empty( $submenu['yith_plugin_panel'] ) ) {
1233
+ $item_count = count( $submenu['yith_plugin_panel'] );
1234
+ $columns = absint( $item_count / 20 ) + 1;
1235
+ $columns = max( 1, min( $columns, 3 ) );
1236
+ $columns = apply_filters( 'yith_plugin_fw_yith_plugins_menu_columns', $columns, $item_count );
1237
+
1238
+ if ( $columns > 1 ) {
1239
+ $class = "yith-plugin-fw-menu-$columns-columns";
1240
+ foreach ( $menu as $order => $top ) {
1241
+ if ( 'yith_plugin_panel' === $top[2] ) {
1242
+ $c = $menu[ $order ][4];
1243
+ $menu[ $order ][4] = add_cssclass( $class, $c );
1244
+ break;
1245
+ }
1246
+ }
1247
+ }
1248
+ }
1249
+
1250
+ return $menu;
1251
+ }
1252
+
1253
+ /**
1254
+ * Check if inside the admin tab there's the premium tab to
1255
+ * check if the plugin is a free or not
1256
+ *
1257
+ * @author Emanuela Castorina
1258
+ */
1259
+ function is_free() {
1260
+ return ( ! empty( $this->settings['admin-tabs'] ) && isset( $this->settings['admin-tabs']['premium'] ) );
1261
+ }
1262
+
1263
+ /**
1264
+ * Add plugin banner
1265
+ */
1266
+ public function add_plugin_banner( $page ) {
1267
+
1268
+ if ( $page != $this->settings['page'] || ! isset( $this->settings['class'] ) ) {
1269
+ return;
1270
+ }
1271
+
1272
+ if ( $this->is_free() && isset( $this->settings['plugin_slug'] ) ):
1273
+ $rate_link = apply_filters( 'yith_plugin_fw_rate_url', 'https://wordpress.org/support/plugin/' . $this->settings['plugin_slug'] . '/reviews/?rate=5#new-post' );
1274
+ ?>
1275
+ <h1 class="notice-container"></h1>
1276
+ <div class="yith-plugin-fw-banner">
1277
+ <h1><?php echo esc_html( $this->settings['page_title'] ) ?></h1>
1278
+ </div>
1279
+ <div class="yith-plugin-fw-rate">
1280
+ <?php printf( '<strong>%s</strong> %s <a href="%s" target="_blank"><u>%s</u> <span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span></a> %s',
1281
+ __( 'We need your support', 'yith-plugin-fw' ),
1282
+ __( 'to keep updating and improving the plugin. Please,', 'yith-plugin-fw' ),
1283
+ $rate_link,
1284
+ __( 'help us by leaving a five-star rating', 'yith-plugin-fw' ),
1285
+ __( ':) Thanks!', 'yith-plugin-fw' ) ) ?>
1286
+ </div>
1287
+ <?php else: ?>
1288
+ <h1 class="notice-container"></h1>
1289
+ <div class="yith-plugin-fw-banner">
1290
+ <h1><?php echo esc_html( $this->settings['page_title'] ) ?></h1>
1291
+ </div>
1292
+ <?php endif ?>
1293
+ <?php
1294
+ }
1295
+
1296
+ /**
1297
+ * Add additional element after print the field.
1298
+ *
1299
+ * @since 3.2
1300
+ * @author Emanuela Castorina
1301
+ */
1302
+ public function add_yith_ui( $field ) {
1303
+ global $pagenow;
1304
+
1305
+ $screen = function_exists( 'get_current_screen' ) ? get_current_screen() : false;
1306
+
1307
+ if ( empty( $this->settings['class'] ) || ! isset( $field['type'] ) ) {
1308
+ return;
1309
+ }
1310
+ if ( 'admin.php' === $pagenow && $screen && strpos( $screen->id, $this->settings['page'] ) !== false ) {
1311
+ switch ( $field['type'] ) {
1312
+ case 'datepicker':
1313
+ echo '<span class="yith-icon yith-icon-calendar"></span>';
1314
+ break;
1315
+ default:
1316
+ break;
1317
+ }
1318
+ }
1319
+ }
1320
+
1321
+
1322
+ public function get_post_type_tabs( $post_type ) {
1323
+ $tabs = array();
1324
+
1325
+ foreach ( $this->get_tabs_hierarchy() as $key => $info ) {
1326
+ if ( isset( $info['type'], $info['post_type'] ) && 'post_type' === $info['type'] && $post_type === $info['post_type'] ) {
1327
+ if ( ! empty( $info['parent'] ) ) {
1328
+ $tabs = array( 'tab' => $info['parent'], 'sub_tab' => $key );
1329
+ } else {
1330
+ $tabs = array( 'tab' => $key );
1331
+ }
1332
+ break;
1333
+ }
1334
+ }
1335
 
1336
  $panel_page = isset( $this->settings['page'] ) ? $this->settings['page'] : 'general';
1337
 
1338
  return apply_filters( "yith_plugin_fw_panel_{$panel_page}_get_post_type_tabs", $tabs, $post_type );
1339
+ }
1340
+
1341
+ public function get_taxonomy_tabs( $taxonomy ) {
1342
+ $tabs = array();
1343
+
1344
+ foreach ( $this->get_tabs_hierarchy() as $key => $info ) {
1345
+ if ( isset( $info['type'], $info['taxonomy'] ) && 'taxonomy' === $info['type'] && $taxonomy === $info['taxonomy'] ) {
1346
+ if ( ! empty( $info['parent'] ) ) {
1347
+ $tabs = array( 'tab' => $info['parent'], 'sub_tab' => $key );
1348
+ } else {
1349
+ $tabs = array( 'tab' => $key );
1350
+ }
1351
+ break;
1352
+ }
1353
+ }
1354
 
1355
  $panel_page = isset( $this->settings['page'] ) ? $this->settings['page'] : 'general';
1356
 
1357
  return apply_filters( "yith_plugin_fw_panel_{$panel_page}_get_taxonomy_tabs", $tabs, $taxonomy );
1358
+ }
1359
+
1360
+
1361
+ /**
1362
+ * If the panel page is a WP Page, this will redirect you to the correct page
1363
+ * useful when a Post Type (Taxonomy) is the first tab of your panel, so when you open your panel it'll open the Post Type (Taxonomy) list
1364
+ *
1365
+ * @since 3.4.0
1366
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
1367
+ */
1368
+ public function maybe_redirect_to_proper_wp_page() {
1369
+ global $pagenow;
1370
+ if ( 'admin.php' === $pagenow && isset( $_GET['page'] ) && $this->settings['page'] === $_GET['page'] &&
1371
+ ! $this->is_custom_taxonomy_page() && ! $this->is_custom_post_type_page() && ! isset( $_REQUEST['yith-plugin-fw-panel-skip-redirect'] ) ) {
1372
+ $url = $this->get_nav_url( $this->settings['page'], $this->get_current_tab(), $this->get_current_sub_tab() );
1373
+ if ( strpos( $url, 'edit.php' ) !== false || strpos( $url, 'edit-tags.php' ) !== false ) {
1374
+ wp_safe_redirect( add_query_arg( array( 'yith-plugin-fw-panel-skip-redirect' => 1 ), $url ) );
1375
+ exit;
1376
+ }
1377
+ }
1378
  }
1379
 
1380
  /**
1387
  public function print_panel_tabs_in_wp_pages() {
1388
  if ( self::$_panel_tabs_in_wp_pages ) {
1389
  wp_enqueue_style( 'yit-plugin-style' );
1390
+ wp_enqueue_script( 'yit-plugin-panel' );
1391
+
1392
  $wrap_class = isset( $this->settings[ 'class' ] ) ? $this->settings[ 'class' ] : '';
1393
 
1394
  ?>
1436
  return true;
1437
  }
1438
  }
 
 
1439
  }
plugin-fw/lib/yith-system-status.php CHANGED
@@ -13,6 +13,7 @@ if ( ! defined( 'ABSPATH' ) ) {
13
  } // Exit if accessed directly
14
 
15
  if ( ! class_exists( 'YITH_System_Status' ) ) {
 
16
  /**
17
  * YITH System Status Panel
18
  *
@@ -38,13 +39,18 @@ if ( ! class_exists( 'YITH_System_Status' ) ) {
38
  /**
39
  * @var array requirements labels
40
  */
41
- protected $_requirement_labels = array();
 
 
 
 
 
42
 
43
  /**
44
  * Single instance of the class
45
  *
46
  * @since 1.0.0
47
- * @var \YITH_System_Status
48
  */
49
  protected static $_instance = null;
50
 
@@ -102,19 +108,19 @@ if ( ! class_exists( 'YITH_System_Status' ) ) {
102
  public function set_requirements_labels() {
103
 
104
  $this->_requirement_labels = array(
105
- 'min_wp_version' => __( 'WordPress Version', 'yith-plugin-fw' ),
106
- 'min_wc_version' => __( 'WooCommerce Version', 'yith-plugin-fw' ),
107
- 'wp_memory_limit' => __( 'Available Memory', 'yith-plugin-fw' ),
108
- 'min_php_version' => __( 'PHP Version', 'yith-plugin-fw' ),
109
- 'min_tls_version' => __( 'TLS Version', 'yith-plugin-fw' ),
110
- 'wp_cron_enabled' => __( 'WordPress Cron', 'yith-plugin-fw' ),
111
- 'simplexml_enabled' => __( 'SimpleXML', 'yith-plugin-fw' ),
112
- 'mbstring_enabled' => __( 'MultiByte String', 'yith-plugin-fw' ),
113
- 'imagick_version' => __( 'ImageMagick Version', 'yith-plugin-fw' ),
114
- 'gd_enabled' => __( 'GD Library', 'yith-plugin-fw' ),
115
- 'iconv_enabled' => __( 'Iconv Module', 'yith-plugin-fw' ),
116
- 'opcache_enabled' => __( 'OPCache Save Comments', 'yith-plugin-fw' ),
117
- 'url_fopen_enabled' => __( 'URL FOpen', 'yith-plugin-fw' ),
118
  );
119
 
120
  }
@@ -129,11 +135,11 @@ if ( ! class_exists( 'YITH_System_Status' ) ) {
129
  public function add_submenu_page() {
130
 
131
  $system_info = get_option( 'yith_system_info', array() );
132
- $error_notice = ( $system_info['errors'] === true ? ' <span class="yith-system-info-menu update-plugins">!</span>' : '' );
133
  $settings = array(
134
  'parent_page' => 'yith_plugin_panel',
135
- 'page_title' => __( 'System Status', 'yith-plugin-fw' ),
136
- 'menu_title' => __( 'System Status', 'yith-plugin-fw' ) . $error_notice,
137
  'capability' => 'manage_options',
138
  'page' => $this->_page,
139
  );
@@ -157,8 +163,7 @@ if ( ! class_exists( 'YITH_System_Status' ) ) {
157
  */
158
  public function show_information_panel() {
159
 
160
- $path = defined( 'YIT_CORE_PLUGIN_PATH' ) ? YIT_CORE_PLUGIN_PATH : get_template_directory() . '/core/plugin-fw/';
161
- $labels = $this->_requirement_labels;
162
 
163
  require_once( $path . '/templates/sysinfo/system-information-panel.php' );
164
 
@@ -173,15 +178,26 @@ if ( ! class_exists( 'YITH_System_Status' ) ) {
173
  */
174
  public function check_system_status() {
175
 
176
-
177
- if ( '' == get_option( 'yith_system_info' ) || ( isset( $_GET['page'] ) && $_GET['page'] == $this->_page ) ) {
178
-
179
- $this->add_requirements( __( 'YITH Plugins', 'yith-plugin-fw' ), array( 'min_wp_version' => '4.9', 'min_wc_version' => '3.4', 'min_php_version' => '5.6.20' ) );
180
- $this->add_requirements( __( 'WooCommerce', 'yith-plugin-fw' ), array( 'wp_memory_limit' => '64M' ) );
 
 
 
 
 
 
 
 
 
 
 
181
 
182
  $system_info = $this->get_system_info();
183
  $check_results = array();
184
- $errors = false;
185
 
186
  foreach ( $system_info as $key => $value ) {
187
  $check_results[ $key ] = array( 'value' => $value );
@@ -191,44 +207,61 @@ if ( ! class_exists( 'YITH_System_Status' ) ) {
191
  foreach ( $this->_plugins_requirements[ $key ] as $plugin_name => $required_value ) {
192
 
193
  switch ( $key ) {
194
- case 'wp_cron_enabled' :
195
- case 'mbstring_enabled' :
196
  case 'simplexml_enabled':
197
  case 'gd_enabled':
198
  case 'iconv_enabled':
199
  case 'url_fopen_enabled':
200
- case 'opcache_enabled' :
201
-
202
  if ( ! $value ) {
203
  $check_results[ $key ]['errors'][ $plugin_name ] = $required_value;
204
- $errors = true;
205
  }
206
  break;
207
 
208
- case 'wp_memory_limit' :
209
  $required_memory = $this->memory_size_to_num( $required_value );
210
 
211
  if ( $required_memory > $value ) {
212
  $check_results[ $key ]['errors'][ $plugin_name ] = $required_value;
213
- $errors = true;
 
 
 
214
  }
215
  break;
216
 
217
  default:
218
- if ( ! version_compare( $value, $required_value, '>=' ) && $value != 'n/a' ) {
219
- $check_results[ $key ]['errors'][ $plugin_name ] = $required_value;
220
- $errors = true;
 
 
 
 
 
 
 
 
 
 
 
 
 
221
  }
222
-
223
  }
224
-
225
  }
226
-
227
  }
228
-
229
  }
230
 
231
- update_option( 'yith_system_info', array( 'system_info' => $check_results, 'errors' => $errors ) );
 
 
 
 
 
 
232
 
233
  }
234
 
@@ -251,7 +284,7 @@ if ( ! class_exists( 'YITH_System_Status' ) ) {
251
 
252
  foreach ( $requirements as $requirement => $value ) {
253
 
254
- if ( in_array( $requirement, $allowed_requirements ) ) {
255
  $this->_plugins_requirements[ $requirement ][ $plugin_name ] = $value;
256
  }
257
  }
@@ -267,8 +300,7 @@ if ( ! class_exists( 'YITH_System_Status' ) ) {
267
  */
268
  public function dismissable_notice() {
269
  $script_path = defined( 'YIT_CORE_PLUGIN_URL' ) ? YIT_CORE_PLUGIN_URL : get_template_directory_uri() . '/core/plugin-fw';
270
- $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
271
- wp_register_script( 'yith-system-info', $script_path . '/assets/js/yith-system-info' . $suffix . '.js', array( 'jquery' ), '1.0.0', true );
272
  }
273
 
274
  /**
@@ -282,25 +314,31 @@ if ( ! class_exists( 'YITH_System_Status' ) ) {
282
 
283
  $system_info = get_option( 'yith_system_info', '' );
284
 
285
- if ( ( isset( $_GET['page'] ) && $_GET['page'] == $this->_page ) || ( ! empty( $_COOKIE['hide_yith_system_alert'] ) && 'yes' == $_COOKIE['hide_yith_system_alert'] ) || ( $system_info == '' ) || ( $system_info != '' && $system_info['errors'] === false ) ) {
286
  return;
287
  }
288
 
289
  $show_notice = true;
290
 
291
- if ( true === $show_notice ) :
292
  wp_enqueue_script( 'yith-system-info' );
293
  ?>
294
- <div id="yith-system-alert" class="notice notice-error is-dismissible" style="position: relative;">
295
- <p>
296
- <span class="yith-logo"><img src="<?php echo yith_plugin_fw_get_default_logo() ?>" /></span>
297
- <b><?php echo __( 'Warning!', 'yith-plugin-fw' ) ?></b><br />
298
- <?php echo sprintf( __( 'The system check has detected some compatibility issues on your installation. %sClick here%s to know more', 'yith-plugin-fw' ), '<a href="' . esc_url( add_query_arg( array( 'page' => $this->_page ), admin_url( 'admin.php' ) ) ) . '">', '</a>' ) ?>
299
- </p>
300
- <span class="notice-dismiss"></span>
301
-
302
- </div>
303
- <?php endif;
 
 
 
 
 
 
304
  }
305
 
306
  /**
@@ -312,7 +350,8 @@ if ( ! class_exists( 'YITH_System_Status' ) ) {
312
  */
313
  public function get_system_info() {
314
 
315
- $tls = $imagick_version = 'n/a';
 
316
 
317
  if ( function_exists( 'curl_init' ) && apply_filters( 'yith_system_status_check_ssl', true ) ) {
318
  //Get TLS version
@@ -324,44 +363,70 @@ if ( ! class_exists( 'YITH_System_Status' ) ) {
324
  $data = curl_exec( $ch );
325
  curl_close( $ch );
326
  $json = json_decode( $data );
327
- $tls = $json != null ? str_replace( 'TLS ', '', $json->tls_version ) : '';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
328
  }
329
 
330
  //Get PHP version
331
- preg_match( "#^\d+(\.\d+)*#", PHP_VERSION, $match );
332
  $php_version = $match[0];
333
 
334
  // WP memory limit.
335
  $wp_memory_limit = $this->memory_size_to_num( WP_MEMORY_LIMIT );
336
  if ( function_exists( 'memory_get_usage' ) ) {
337
- $wp_memory_limit = max( $wp_memory_limit, $this->memory_size_to_num( @ini_get( 'memory_limit' ) ) );
338
  }
339
 
340
  if ( class_exists( 'Imagick' ) && is_callable( array( 'Imagick', 'getVersion' ) ) ) {
341
- preg_match( "/([0-9]+\.[0-9]+\.[0-9]+)/", Imagick::getVersion()['versionString'], $imatch );
342
  $imagick_version = $imatch[0];
343
  }
344
 
345
- return apply_filters( 'yith_system_additional_check', array(
346
- 'min_wp_version' => get_bloginfo( 'version' ),
347
- 'min_wc_version' => function_exists( 'WC' ) ? WC()->version : 'n/a',
348
- 'wp_memory_limit' => $wp_memory_limit,
349
- 'min_php_version' => $php_version,
350
- 'min_tls_version' => $tls,
351
- 'imagick_version' => $imagick_version,
352
- 'wp_cron_enabled' => ! ( defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON ),
353
- 'mbstring_enabled' => extension_loaded( 'mbstring' ),
354
- 'simplexml_enabled' => extension_loaded( 'simplexml' ),
355
- 'gd_enabled' => extension_loaded( 'gd' ) && function_exists( 'gd_info' ),
356
- 'iconv_enabled' => extension_loaded( 'iconv' ),
357
- 'opcache_enabled' => ini_get( 'opcache.save_comments' ),
358
- 'url_fopen_enabled' => ini_get( 'allow_url_fopen' ),
359
- ) );
 
 
 
360
 
361
  }
362
 
363
  /**
364
- * Convert site into number
365
  *
366
  * @param $memory_size string
367
  *
@@ -391,6 +456,149 @@ if ( ! class_exists( 'YITH_System_Status' ) ) {
391
  return $size;
392
  }
393
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
394
  }
395
  }
396
 
@@ -402,7 +610,7 @@ if ( ! class_exists( 'YITH_System_Status' ) ) {
402
  * @author Alberto Ruggiero
403
  */
404
  if ( ! function_exists( 'YITH_System_Status' ) ) {
405
- function YITH_System_Status() {
406
  return YITH_System_Status::instance();
407
  }
408
  }
13
  } // Exit if accessed directly
14
 
15
  if ( ! class_exists( 'YITH_System_Status' ) ) {
16
+
17
  /**
18
  * YITH System Status Panel
19
  *
39
  /**
40
  * @var array requirements labels
41
  */
42
+ public $_requirement_labels = array();
43
+
44
+ /**
45
+ * @var int recommended memory amount 134217728 = 128M
46
+ */
47
+ private $_recommended_memory = 134217728;
48
 
49
  /**
50
  * Single instance of the class
51
  *
52
  * @since 1.0.0
53
+ * @var YITH_System_Status
54
  */
55
  protected static $_instance = null;
56
 
108
  public function set_requirements_labels() {
109
 
110
  $this->_requirement_labels = array(
111
+ 'min_wp_version' => esc_html__( 'WordPress Version', 'yith-plugin-fw' ),
112
+ 'min_wc_version' => esc_html__( 'WooCommerce Version', 'yith-plugin-fw' ),
113
+ 'wp_memory_limit' => esc_html__( 'Available Memory', 'yith-plugin-fw' ),
114
+ 'min_php_version' => esc_html__( 'PHP Version', 'yith-plugin-fw' ),
115
+ 'min_tls_version' => esc_html__( 'TLS Version', 'yith-plugin-fw' ),
116
+ 'wp_cron_enabled' => esc_html__( 'WordPress Cron', 'yith-plugin-fw' ),
117
+ 'simplexml_enabled' => esc_html__( 'SimpleXML', 'yith-plugin-fw' ),
118
+ 'mbstring_enabled' => esc_html__( 'MultiByte String', 'yith-plugin-fw' ),
119
+ 'imagick_version' => esc_html__( 'ImageMagick Version', 'yith-plugin-fw' ),
120
+ 'gd_enabled' => esc_html__( 'GD Library', 'yith-plugin-fw' ),
121
+ 'iconv_enabled' => esc_html__( 'Iconv Module', 'yith-plugin-fw' ),
122
+ 'opcache_enabled' => esc_html__( 'OPCache Save Comments', 'yith-plugin-fw' ),
123
+ 'url_fopen_enabled' => esc_html__( 'URL FOpen', 'yith-plugin-fw' ),
124
  );
125
 
126
  }
135
  public function add_submenu_page() {
136
 
137
  $system_info = get_option( 'yith_system_info', array() );
138
+ $error_notice = ( isset( $system_info['errors'] ) && true === $system_info['errors'] ? ' <span class="yith-system-info-menu update-plugins">!</span>' : '' );
139
  $settings = array(
140
  'parent_page' => 'yith_plugin_panel',
141
+ 'page_title' => esc_html__( 'System Status', 'yith-plugin-fw' ),
142
+ 'menu_title' => esc_html__( 'System Status', 'yith-plugin-fw' ) . $error_notice,
143
  'capability' => 'manage_options',
144
  'page' => $this->_page,
145
  );
163
  */
164
  public function show_information_panel() {
165
 
166
+ $path = defined( 'YIT_CORE_PLUGIN_PATH' ) ? YIT_CORE_PLUGIN_PATH : get_template_directory() . '/core/plugin-fw/';
 
167
 
168
  require_once( $path . '/templates/sysinfo/system-information-panel.php' );
169
 
178
  */
179
  public function check_system_status() {
180
 
181
+ if ( '' === get_option( 'yith_system_info' ) || ( isset( $_GET['page'] ) && $_GET['page'] === $this->_page ) ) {
182
+
183
+ $this->add_requirements(
184
+ esc_html__( 'YITH Plugins', 'yith-plugin-fw' ),
185
+ array(
186
+ 'min_wp_version' => '4.9',
187
+ 'min_wc_version' => '3.4',
188
+ 'min_php_version' => '5.6.20',
189
+ )
190
+ );
191
+ $this->add_requirements(
192
+ esc_html__( 'WooCommerce', 'yith-plugin-fw' ),
193
+ array(
194
+ 'wp_memory_limit' => '64M',
195
+ )
196
+ );
197
 
198
  $system_info = $this->get_system_info();
199
  $check_results = array();
200
+ $errors = 0;
201
 
202
  foreach ( $system_info as $key => $value ) {
203
  $check_results[ $key ] = array( 'value' => $value );
207
  foreach ( $this->_plugins_requirements[ $key ] as $plugin_name => $required_value ) {
208
 
209
  switch ( $key ) {
210
+ case 'wp_cron_enabled':
211
+ case 'mbstring_enabled':
212
  case 'simplexml_enabled':
213
  case 'gd_enabled':
214
  case 'iconv_enabled':
215
  case 'url_fopen_enabled':
216
+ case 'opcache_enabled':
 
217
  if ( ! $value ) {
218
  $check_results[ $key ]['errors'][ $plugin_name ] = $required_value;
219
+ $errors ++;
220
  }
221
  break;
222
 
223
+ case 'wp_memory_limit':
224
  $required_memory = $this->memory_size_to_num( $required_value );
225
 
226
  if ( $required_memory > $value ) {
227
  $check_results[ $key ]['errors'][ $plugin_name ] = $required_value;
228
+ $errors ++;
229
+
230
+ } elseif ( $this->_recommended_memory > $value && $value > $required_value ) {
231
+ $check_results[ $key ]['warnings'] = 'yes';
232
  }
233
  break;
234
 
235
  default:
236
+ if ( 'imagick_version' === $key ) {
237
+ if ( ! version_compare( $value, $required_value, '>=' ) ) {
238
+ $check_results[ $key ]['errors'][ $plugin_name ] = $required_value;
239
+ $errors ++;
240
+ }
241
+ } else {
242
+ if ( 'n/a' !== $value ) {
243
+ if ( ! version_compare( $value, $required_value, '>=' ) ) {
244
+ $check_results[ $key ]['errors'][ $plugin_name ] = $required_value;
245
+ $errors ++;
246
+ }
247
+ } else {
248
+ if ( 'min_wc_version' !== $key ) {
249
+ $check_results[ $key ]['warnings'][ $plugin_name ] = $required_value;
250
+ }
251
+ }
252
  }
 
253
  }
 
254
  }
 
255
  }
 
256
  }
257
 
258
+ update_option(
259
+ 'yith_system_info',
260
+ array(
261
+ 'system_info' => $check_results,
262
+ 'errors' => $errors > 0,
263
+ )
264
+ );
265
 
266
  }
267
 
284
 
285
  foreach ( $requirements as $requirement => $value ) {
286
 
287
+ if ( in_array( $requirement, $allowed_requirements, true ) ) {
288
  $this->_plugins_requirements[ $requirement ][ $plugin_name ] = $value;
289
  }
290
  }
300
  */
301
  public function dismissable_notice() {
302
  $script_path = defined( 'YIT_CORE_PLUGIN_URL' ) ? YIT_CORE_PLUGIN_URL : get_template_directory_uri() . '/core/plugin-fw';
303
+ wp_register_script( 'yith-system-info', yit_load_js_file( $script_path . '/assets/js/yith-system-info.js' ), array( 'jquery' ), '1.0.0', true );
 
304
  }
305
 
306
  /**
314
 
315
  $system_info = get_option( 'yith_system_info', '' );
316
 
317
+ if ( ( isset( $_GET['page'] ) && $_GET['page'] === $this->_page ) || ( ! empty( $_COOKIE['hide_yith_system_alert'] ) && 'yes' === $_COOKIE['hide_yith_system_alert'] ) || ( '' === $system_info ) || ( '' !== $system_info && false === $system_info['errors'] ) ) {
318
  return;
319
  }
320
 
321
  $show_notice = true;
322
 
323
+ if ( true === $show_notice ) {
324
  wp_enqueue_script( 'yith-system-info' );
325
  ?>
326
+ <div id="yith-system-alert" class="notice notice-error is-dismissible" style="position: relative;">
327
+ <p>
328
+ <span class="yith-logo"><img src="<?php echo yith_plugin_fw_get_default_logo(); ?>" /></span>
329
+ <b>
330
+ <?php esc_html_e( 'Warning!', 'yith-plugin-fw' ); ?>
331
+ </b><br />
332
+ <?php
333
+ /* translators: %1$s open link tag, %2$s open link tag*/
334
+ echo sprintf( esc_html__( 'The system check has detected some compatibility issues on your installation.%1$sClick here%2$s to know more', 'yith-plugin-fw' ), '<a href="' . esc_url( add_query_arg( array( 'page' => $this->_page ), admin_url( 'admin.php' ) ) ) . '">', '</a>' );
335
+ ?>
336
+ </p>
337
+ <span class="notice-dismiss"></span>
338
+
339
+ </div>
340
+ <?php
341
+ }
342
  }
343
 
344
  /**
350
  */
351
  public function get_system_info() {
352
 
353
+ $tls = 'n/a';
354
+ $imagick_version = 'n/a';
355
 
356
  if ( function_exists( 'curl_init' ) && apply_filters( 'yith_system_status_check_ssl', true ) ) {
357
  //Get TLS version
363
  $data = curl_exec( $ch );
364
  curl_close( $ch );
365
  $json = json_decode( $data );
366
+
367
+ if ( is_string( $json ) && strpos( $json, '<!DOCTYPE html>' ) !== false ) {
368
+ $tls = 'n/a';
369
+ } else {
370
+ $tls = null !== $json ? str_replace( 'TLS ', '', $json->tls_version ) : '';
371
+ }
372
+
373
+ if ( 'n/a' === $tls || '' === $tls ) {
374
+ //run backup service
375
+ $ch = curl_init();
376
+ curl_setopt( $ch, CURLOPT_URL, 'https://ttl-version.yithemes.workers.dev/' );
377
+ curl_setopt( $ch, CURLOPT_SSL_VERIFYHOST, 0 );
378
+ curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, 0 );
379
+ curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
380
+ $data = curl_exec( $ch );
381
+ curl_close( $ch );
382
+ $json = json_decode( $data );
383
+
384
+ if ( is_string( $json ) && strpos( $json, '<!DOCTYPE html>' ) !== false ) {
385
+ $tls = 'n/a';
386
+ } else {
387
+ $tls = null !== $json ? str_replace( 'TLSv', '', $json->tlsVersion ) : 'n/a'; //phpcs:ignore
388
+ }
389
+ }
390
  }
391
 
392
  //Get PHP version
393
+ preg_match( '#^\d+(\.\d+)*#', PHP_VERSION, $match );
394
  $php_version = $match[0];
395
 
396
  // WP memory limit.
397
  $wp_memory_limit = $this->memory_size_to_num( WP_MEMORY_LIMIT );
398
  if ( function_exists( 'memory_get_usage' ) ) {
399
+ $wp_memory_limit = max( $wp_memory_limit, $this->memory_size_to_num( @ini_get( 'memory_limit' ) ) ); //phpcs:ignore
400
  }
401
 
402
  if ( class_exists( 'Imagick' ) && is_callable( array( 'Imagick', 'getVersion' ) ) ) {
403
+ preg_match( '/([0-9]+\.[0-9]+\.[0-9]+)/', Imagick::getVersion()['versionString'], $imatch );
404
  $imagick_version = $imatch[0];
405
  }
406
 
407
+ return apply_filters(
408
+ 'yith_system_additional_check',
409
+ array(
410
+ 'min_wp_version' => get_bloginfo( 'version' ),
411
+ 'min_wc_version' => function_exists( 'WC' ) ? WC()->version : 'n/a',
412
+ 'wp_memory_limit' => $wp_memory_limit,
413
+ 'min_php_version' => $php_version,
414
+ 'min_tls_version' => $tls,
415
+ 'imagick_version' => $imagick_version,
416
+ 'wp_cron_enabled' => ( ! ( defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON ) || apply_filters( 'yith_system_status_server_cron', false ) ),
417
+ 'mbstring_enabled' => extension_loaded( 'mbstring' ),
418
+ 'simplexml_enabled' => extension_loaded( 'simplexml' ),
419
+ 'gd_enabled' => extension_loaded( 'gd' ) && function_exists( 'gd_info' ),
420
+ 'iconv_enabled' => extension_loaded( 'iconv' ),
421
+ 'opcache_enabled' => ini_get( 'opcache.save_comments' ),
422
+ 'url_fopen_enabled' => ini_get( 'allow_url_fopen' ),
423
+ )
424
+ );
425
 
426
  }
427
 
428
  /**
429
+ * Convert size into number
430
  *
431
  * @param $memory_size string
432
  *
456
  return $size;
457
  }
458
 
459
+ /**
460
+ * Format requirement value
461
+ *
462
+ * @param $key string
463
+ * @param $value mixed
464
+ *
465
+ * @return string
466
+ * @since 1.0.0
467
+ *
468
+ * @author Alberto Ruggiero
469
+ */
470
+ public function format_requirement_value( $key, $value ) {
471
+
472
+ if ( strpos( $key, '_enabled' ) !== false ) {
473
+ return $value ? esc_html__( 'Enabled', 'yith-plugin-fw' ) : esc_html__( 'Disabled', 'yith-plugin-fw' );
474
+ } elseif ( 'wp_memory_limit' === $key ) {
475
+ return esc_html( size_format( $value ) );
476
+ } else {
477
+ if ( 'n/a' === $value ) {
478
+ return esc_html__( 'N/A', 'yith-plugin-fw' );
479
+ } else {
480
+ return $value;
481
+ }
482
+ }
483
+
484
+ }
485
+
486
+ /**
487
+ * Print error messages
488
+ *
489
+ * @param $key string
490
+ * @param $item array
491
+ * @param $label string
492
+ *
493
+ * @return void
494
+ * @since 1.0.0
495
+ *
496
+ * @author Alberto Ruggiero
497
+ */
498
+ public function print_error_messages( $key, $item, $label ) {
499
+ ?>
500
+ <ul>
501
+ <?php foreach ( $item['errors'] as $plugin => $requirement ) : ?>
502
+ <li>
503
+ <?php
504
+ if ( strpos( $key, '_enabled' ) !== false ) {
505
+ /* translators: %1$s plugin name, %2$s requirement name */
506
+ echo sprintf( esc_html__( '%1$s needs %2$s enabled', 'yith-plugin-fw' ), '<b>' . $plugin . '</b>', '<b>' . $label . '</b>' );
507
+ } elseif ( 'wp_memory_limit' === $key ) {
508
+ /* translators: %1$s plugin name, %2$s required memory amount */
509
+ echo sprintf( esc_html__( '%1$s needs at least %2$s of available memory', 'yith-plugin-fw' ), '<b>' . $plugin . '</b>', '<span class="error">' . esc_html( size_format( $this->memory_size_to_num( $requirement ) ) ) . '</span>' );
510
+ } else {
511
+ /* translators: %1$s plugin name, %2$s version number */
512
+ echo sprintf( esc_html__( '%1$s needs at least %2$s version', 'yith-plugin-fw' ), '<b>' . $plugin . '</b>', '<span class="error">' . $requirement . '</span>' );
513
+ }
514
+ ?>
515
+ </li>
516
+ <?php endforeach; ?>
517
+ </ul>
518
+ <?php
519
+ }
520
+
521
+ /**
522
+ * Print solution suggestions
523
+ *
524
+ * @param $key string
525
+ * @param $item array
526
+ * @param $label string
527
+ *
528
+ * @return void
529
+ * @since 1.0.0
530
+ *
531
+ * @author Alberto Ruggiero
532
+ */
533
+ public function print_solution_suggestion( $key, $item, $label ) {
534
+ switch ( $key ) {
535
+ case 'min_wp_version':
536
+ case 'min_wc_version':
537
+ esc_html_e( 'Update it to the latest version in order to benefit of all new features and security updates.', 'yith-plugin-fw' );
538
+ break;
539
+ case 'min_php_version':
540
+ case 'min_tls_version':
541
+ esc_html_e( 'Contact your hosting company in order to update it.', 'yith-plugin-fw' );
542
+ break;
543
+ case 'imagick_version':
544
+ if ( 'n/a' === $item['value'] ) {
545
+ esc_html_e( 'Contact your hosting company in order to install it.', 'yith-plugin-fw' );
546
+ } else {
547
+ esc_html_e( 'Contact your hosting company in order to update it.', 'yith-plugin-fw' );
548
+ }
549
+ break;
550
+ case 'wp_cron_enabled':
551
+ /* translators: %1$s code, %2$s file name */
552
+ echo sprintf( esc_html__( 'Remove %1$s from %2$s file', 'yith-plugin-fw' ), '<code>define( \'DISABLE_WP_CRON\', true );</code>', '<b>wp-config.php</b>' );
553
+ break;
554
+ case 'mbstring_enabled':
555
+ case 'simplexml_enabled':
556
+ case 'gd_enabled':
557
+ case 'iconv_enabled':
558
+ case 'opcache_enabled':
559
+ case 'url_fopen_enabled':
560
+ esc_html_e( 'Contact your hosting company in order to enable it.', 'yith-plugin-fw' );
561
+ break;
562
+ case 'wp_memory_limit':
563
+ /* translators: %1$s opening link tag, %2$s closing link tag */
564
+ echo sprintf( esc_html__( 'Read more %1$shere%2$s or contact your hosting company in order to increase it.', 'yith-plugin-fw' ), '<a href="https://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP" target="_blank">', '</a>' );
565
+ break;
566
+ default:
567
+ echo apply_filters( 'yith_system_generic_message', '', $key, $item, $label );
568
+ }
569
+ }
570
+
571
+ /**
572
+ * Print warning messages
573
+ *
574
+ * @param $key string
575
+ *
576
+ * @return void
577
+ * @since 1.0.0
578
+ *
579
+ * @author Alberto Ruggiero
580
+ */
581
+ public function print_warning_messages( $key ) {
582
+ switch ( $key ) {
583
+ case 'wp_memory_limit':
584
+ /* translators: %s recommended memory amount */
585
+ echo sprintf( esc_html__( 'For optimal functioning of our plugins, we suggest setting at least %s of available memory', 'yith-plugin-fw' ), '<span class="warning">' . esc_html( size_format( $this->_recommended_memory ) ) . '</span>' );
586
+ echo '<br/>';
587
+ /* translators: %1$s opening link tag, %2$s closing link tag */
588
+ echo sprintf( esc_html__( 'Read more %1$shere%2$s or contact your hosting company in order to increase it.', 'yith-plugin-fw' ), '<a href="https://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP" target="_blank">', '</a>' );
589
+ break;
590
+ case 'min_tls_version':
591
+ if ( ! function_exists( 'curl_init' ) ) {
592
+ /* translators: %1$s TLS label, %2$s cURL label */
593
+ echo sprintf( esc_html__( 'The system check cannot determine which %1$s version is installed because %2$s module is disabled. Ask your hosting company to enable it.', 'yith-plugin-fw' ), '<b>TLS</b>', '<b>cURL</b>' );
594
+ } else {
595
+ /* translators: %1$s TLS label */
596
+ echo sprintf( esc_html__( 'The system check cannot determine which %1$s version is installed due to a connection issue between your site and our server.', 'yith-plugin-fw' ), '<b>TLS</b>' );
597
+ }
598
+ break;
599
+ }
600
+ }
601
+
602
  }
603
  }
604
 
610
  * @author Alberto Ruggiero
611
  */
612
  if ( ! function_exists( 'YITH_System_Status' ) ) {
613
+ function YITH_System_Status() {//phpcs:ignore
614
  return YITH_System_Status::instance();
615
  }
616
  }
plugin-fw/package.json CHANGED
@@ -1,10 +1,10 @@
1
  {
2
  "name": "yith-plugin-framewowrk",
3
- "version": "3.4.13",
4
  "description": "YITH Plugin Framework",
5
  "main": "Gruntfile.js",
6
  "scripts": {
7
- "prerelease": "npm run js && npm run i18n",
8
  "js": "grunt js",
9
  "i18n": "grunt i18n"
10
  },
1
  {
2
  "name": "yith-plugin-framewowrk",
3
+ "version": "3.4.29",
4
  "description": "YITH Plugin Framework",
5
  "main": "Gruntfile.js",
6
  "scripts": {
7
+ "build": "npm run js && npm run i18n",
8
  "js": "grunt js",
9
  "i18n": "grunt i18n"
10
  },
plugin-fw/templates/fields/dimensions.php ADDED
@@ -0,0 +1,123 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * This file belongs to the YIT Plugin Framework.
4
+ * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
5
+ * that is bundled with this package in the file LICENSE.txt.
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
+ * @var array $field
10
+ */
11
+
12
+ ! defined( 'ABSPATH' ) && exit; // Exit if accessed directly
13
+
14
+ $default_options = array(
15
+ 'dimensions' => array(
16
+ 'top' => _x( 'Top', 'Position in the "Dimensions" field', 'yith-plugin-fw' ),
17
+ 'right' => _x( 'Right', 'Position in the "Dimensions" field', 'yith-plugin-fw' ),
18
+ 'bottom' => _x( 'Bottom', 'Position in the "Dimensions" field', 'yith-plugin-fw' ),
19
+ 'left' => _x( 'Left', 'Position in the "Dimensions" field', 'yith-plugin-fw' ),
20
+ ),
21
+ 'units' => array(
22
+ 'px' => 'px',
23
+ 'percentage' => '%',
24
+ ),
25
+ 'allow_linked' => true,
26
+ 'min' => false,
27
+ 'max' => false,
28
+ );
29
+
30
+ $field = wp_parse_args( $field, $default_options );
31
+
32
+ /**
33
+ * @var string $id
34
+ * @var string $custom_attributes
35
+ * @var array $dimensions
36
+ * @var array $units
37
+ * @var bool $allow_linked
38
+ * @var bool|int $min
39
+ * @var bool|int $max
40
+ */
41
+ extract( $field );
42
+
43
+ $class = isset( $class ) ? $class : '';
44
+ $class = 'yith-plugin-fw-dimensions ' . $class;
45
+
46
+ $value = ! empty( $value ) ? $value : array();
47
+
48
+ $unit_value = isset( $value['unit'] ) ? $value['unit'] : current( array_keys( $units ) );
49
+ $dimensions_values = isset( $value['dimensions'] ) ? $value['dimensions'] : array();
50
+ $linked = isset( $value['linked'] ) ? $value['linked'] : 'yes';
51
+
52
+ if ( $allow_linked && 'yes' === $linked ) {
53
+ $class .= ' yith-plugin-fw-dimensions--linked-active';
54
+ }
55
+ ?>
56
+ <div id="<?php echo $id ?>" class="<?php echo $class; ?>"
57
+ <?php echo $custom_attributes ?>
58
+ <?php echo isset( $data ) ? yith_plugin_fw_html_data_to_string( $data ) : ''; ?>
59
+ >
60
+ <div class="yith-plugin-fw-dimensions__units">
61
+ <input class='yith-plugin-fw-dimensions__unit__value' type="hidden" name="<?php echo $name ?>[unit]" value="<?php echo isset( $value['unit'] ) ? $value['unit'] : current( array_keys( $units ) ) ?>">
62
+ <?php foreach ( $units as $key => $label ) : ?>
63
+ <?php
64
+ $key = sanitize_title( $key );
65
+ $classes = array(
66
+ 'yith-plugin-fw-dimensions__unit',
67
+ "yith-plugin-fw-dimensions__unit--{$key}-unit",
68
+ );
69
+ if ( $unit_value === $key ) {
70
+ $classes[] = 'yith-plugin-fw-dimensions__unit--selected';
71
+ }
72
+ $classes = implode( ' ', $classes );
73
+ ?>
74
+ <span class="<?php echo $classes; ?>" data-value="<?php echo $key; ?>"><?php echo $label; ?></span>
75
+ <?php endforeach ?>
76
+ </div>
77
+
78
+ <ul class="yith-plugin-fw-dimensions__dimensions">
79
+ <?php foreach ( $dimensions as $key => $dimension ) : ?>
80
+ <?php
81
+ $d_id = "{$id}-dimension-" . sanitize_title( $key );
82
+ $d_name = "{$name}[dimensions][" . sanitize_title( $key ) . "]";
83
+ $d_value = isset( $dimensions_values[ $key ] ) ? $dimensions_values[ $key ] : 0;
84
+ $d_attributes = '';
85
+ $d_label = $dimension;
86
+ $d_min = $min;
87
+ $d_max = $max;
88
+
89
+ if ( is_array( $dimension ) ) {
90
+ $d_label = isset( $dimension['label'] ) ? $dimension['label'] : $key;
91
+ if ( isset( $dimension['custom_attributes'] ) ) {
92
+ $d_attributes .= $dimension['custom_attributes'];
93
+ }
94
+ $d_min = isset( $dimension['min'] ) ? $dimension['min'] : $d_min;
95
+ $d_max = isset( $dimension['max'] ) ? $dimension['max'] : $d_max;
96
+ }
97
+
98
+ if ( $d_max !== false ) {
99
+ $d_attributes = " max='{$d_max}' . $d_attributes";
100
+ }
101
+
102
+ if ( $d_min !== false ) {
103
+ $d_attributes = " min='{$d_min}' " . $d_attributes;
104
+ }
105
+
106
+ ?>
107
+ <li class="yith-plugin-fw-dimensions__dimension yith-plugin-fw-dimensions__dimension--<?php echo sanitize_title( $key ); ?>">
108
+ <input id="<?php echo $d_id; ?>" class="yith-plugin-fw-dimensions__dimension__number"
109
+ type="number" name="<?php echo $d_name; ?>" value="<?php echo $d_value; ?>"
110
+ <?php echo $d_attributes; ?>
111
+ >
112
+ <label for="<?php echo $d_id; ?>" class="yith-plugin-fw-dimensions__dimension__label"><?php echo $d_label; ?></label>
113
+ </li>
114
+ <?php endforeach ?>
115
+
116
+ <?php if ( $allow_linked ): ?>
117
+ <li class="yith-plugin-fw-dimensions__linked" title="<?php _ex( 'Link values together', 'Tooltip in the "Dimensions" field', 'yith-plugin-fw' ); ?>">
118
+ <input class='yith-plugin-fw-dimensions__linked__value' type="hidden" name="<?php echo $name ?>[linked]" value="<?php echo $linked ?>">
119
+ <span class="dashicons dashicons-admin-links"></span>
120
+ </li>
121
+ <?php endif; ?>
122
+ </ul>
123
+ </div>
plugin-fw/templates/fields/inline-fields.php ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ if ( ! defined( 'ABSPATH' ) ) {
14
+ exit; // Exit if accessed directly.
15
+ }
16
+
17
+ extract( $field );
18
+ $value = maybe_unserialize( $value );
19
+ if ( ! empty( $fields ) && is_array( $fields ) ) { ?>
20
+ <div id="<?php echo esc_attr( $id ); ?>" class="<?php echo isset( $class ) ? $class : ''; ?> yith-inline-fields">
21
+ <?php
22
+ foreach ( $fields as $key => $field ) {
23
+ $allowed_types = array( 'select', 'select-buttons', 'number', 'text', 'slider', 'hidden', 'html' );
24
+ $default_args = array( 'type' => 'select' );
25
+
26
+ // set default
27
+ if ( ! isset( $field[ 'default' ] ) && isset( $field[ 'std' ] ) ) {
28
+ $field['default'] = $field['std'];
29
+ }
30
+ $std = isset( $field['default'] ) ? $field['default'] : '';
31
+
32
+ $field['value'] = isset( $value[ $key ] ) ? maybe_unserialize( $value[ $key ] ) : $std;
33
+ $field['class'] = isset( $field['class'] ) ? $field['class'] : '';
34
+ $field['id'] = $id . '_' . $key;
35
+ $field['name'] = $name . '[' . $key . ']';
36
+
37
+ if ( ! in_array( $field['type'], $allowed_types, true ) ) {
38
+ continue;
39
+ }
40
+
41
+ if ( in_array( $field['type'], array( 'select', 'select-buttons' ), true ) ) {
42
+ $field['class'] = 'wc-enhanced-select';
43
+ }
44
+ ?>
45
+ <?php if ( isset( $field['inline-label'] ) && '' !== $field['inline-label'] ) : ?>
46
+ <div class="option-element">
47
+ <span><?php echo $field['inline-label']; ?></span>
48
+ </div>
49
+ <?php endif; ?>
50
+ <div class="option-element <?php echo $field['type']; ?> <?php echo $field['class']; ?>">
51
+ <?php if ( isset( $field['label'] ) && '' !== $field['label'] ) : ?>
52
+ <label for="<?php echo $field['id']; ?>"><?php echo $field['label']; ?></label>
53
+ <?php endif; ?>
54
+ <?php yith_plugin_fw_get_field( $field, true ); ?>
55
+ </div>
56
+ <?php } ?>
57
+ </div>
58
+ <?php
59
+
60
+ }
plugin-fw/templates/fields/onoff.php CHANGED
@@ -21,11 +21,11 @@ extract( $field );
21
  <?php echo $custom_attributes ?>
22
  />
23
  <span class="yith-plugin-fw-onoff"
24
- data-text-on="<?php echo esc_attr_x( 'ON', 'ON/OFF button: use MAX 3 characters!', 'yith-plugin-fw' ); ?>"
25
- data-text-off="<?php echo esc_attr_x( 'OFF', 'ON/OFF button: use MAX 3 characters!', 'yith-plugin-fw' ); ?>"></span>
26
  </div>
27
  <?php
28
  if ( isset( $field[ 'desc-inline' ] ) ) {
29
  echo "<span class='description inline'>" . $field[ 'desc-inline' ] . "</span>";
30
  }
31
- ?>
21
  <?php echo $custom_attributes ?>
22
  />
23
  <span class="yith-plugin-fw-onoff"
24
+ data-text-on="<?php echo esc_attr_x( 'YES', 'YES/NO button: use MAX 3 characters!', 'yith-plugin-fw' ); ?>"
25
+ data-text-off="<?php echo esc_attr_x( 'NO', 'YES/NO button: use MAX 3 characters!', 'yith-plugin-fw' ); ?>"></span>
26
  </div>
27
  <?php
28
  if ( isset( $field[ 'desc-inline' ] ) ) {
29
  echo "<span class='description inline'>" . $field[ 'desc-inline' ] . "</span>";
30
  }
31
+ ?>
plugin-fw/templates/fields/radio.php CHANGED
@@ -21,7 +21,7 @@ $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
  ?>
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 ); ?> data-value="<?php echo $value ?>">
25
  <?php foreach ( $options as $key => $label ) :
26
  $radio_id = sanitize_key( $id . '-' . $key );
27
  ?>
plugin-fw/templates/fields/select-images.php CHANGED
@@ -17,7 +17,7 @@ extract( $field );
17
  $class = isset( $class ) ? $class : 'yith-plugin-fw-select-images';
18
  $wrapper_id = $id . '-wrapper';
19
  ?>
20
- <div id="<?php echo $wrapper_id ?>" class="yith-plugin-fw-select-images__wrapper">
21
 
22
  <select id="<?php echo $id ?>"
23
  name="<?php echo $name ?>"
@@ -34,19 +34,20 @@ $wrapper_id = $id . '-wrapper';
34
 
35
  <ul class="yith-plugin-fw-select-images__list">
36
  <?php foreach ( $options as $key => $item ) :
37
- $label = !empty( $item[ 'label' ] ) ? $item[ 'label' ] : $key;
38
- $image = !empty( $item[ 'image' ] ) ? $item[ 'image' ] : '';
 
39
  if ( $image ) :
40
  $selected_class = 'yith-plugin-fw-select-images__item--selected';
41
  $current_class = $key === $value ? $selected_class : '';
42
  ?>
43
- <li class="yith-plugin-fw-select-images__item <?php echo $current_class ?>" data-key="<?php echo $key ?>">
44
  <?php if ( $label ) : ?>
45
  <div class="yith-plugin-fw-select-images__item__label"><?php echo $label ?></div>
46
  <?php endif; ?>
47
- <img src="<?php echo $image ?>">
48
  </li>
49
  <?php endif; ?>
50
  <?php endforeach; ?>
51
  </ul>
52
- </div>
17
  $class = isset( $class ) ? $class : 'yith-plugin-fw-select-images';
18
  $wrapper_id = $id . '-wrapper';
19
  ?>
20
+ <div id="<?php echo $wrapper_id ?>" class="yith-plugin-fw-select-images__wrapper" data-type="select-images">
21
 
22
  <select id="<?php echo $id ?>"
23
  name="<?php echo $name ?>"
34
 
35
  <ul class="yith-plugin-fw-select-images__list">
36
  <?php foreach ( $options as $key => $item ) :
37
+ $label = ! empty( $item['label'] ) ? $item['label'] : $key;
38
+ $image = ! empty( $item['image'] ) ? $item['image'] : '';
39
+ $img_data = ! empty( $item['data'] ) ? yith_plugin_fw_html_data_to_string( $item['data'] ): '';
40
  if ( $image ) :
41
  $selected_class = 'yith-plugin-fw-select-images__item--selected';
42
  $current_class = $key === $value ? $selected_class : '';
43
  ?>
44
+ <li class="yith-plugin-fw-select-images__item <?php echo $current_class ?>" data-type="select-images-item" data-key="<?php echo $key ?>" <?php echo $img_data; ?>>
45
  <?php if ( $label ) : ?>
46
  <div class="yith-plugin-fw-select-images__item__label"><?php echo $label ?></div>
47
  <?php endif; ?>
48
+ <img class="yith-plugin-fw-select-images_src" src="<?php echo $image ?>" />
49
  </li>
50
  <?php endif; ?>
51
  <?php endforeach; ?>
52
  </ul>
53
+ </div>
plugin-fw/templates/fields/textarea-editor.php CHANGED
@@ -18,6 +18,8 @@ if ( !function_exists( 'wp_editor' ) ) :
18
  else:
19
  extract( $field );
20
 
 
 
21
  $editor_args = wp_parse_args( $field, array(
22
  'wpautop' => true, // use wpautop?
23
  'media_buttons' => true, // show insert/upload button(s)
@@ -32,7 +34,7 @@ else:
32
  'quicktags' => true // load Quicktags, can be used to pass settings directly to Quicktags using an array()
33
  ) );
34
  ?>
35
- <div class="editor" <?php echo $custom_attributes ?>
36
  <?php if ( isset( $data ) ) echo yith_plugin_fw_html_data_to_string( $data ); ?>><?php wp_editor( $value, $id, $editor_args ); ?></div>
37
 
38
  <?php endif; ?>
18
  else:
19
  extract( $field );
20
 
21
+ $classes = isset( $classes ) ? ' '.$classes : '';
22
+
23
  $editor_args = wp_parse_args( $field, array(
24
  'wpautop' => true, // use wpautop?
25
  'media_buttons' => true, // show insert/upload button(s)
34
  'quicktags' => true // load Quicktags, can be used to pass settings directly to Quicktags using an array()
35
  ) );
36
  ?>
37
+ <div class="editor<?php echo $classes ?>" <?php echo $custom_attributes ?>
38
  <?php if ( isset( $data ) ) echo yith_plugin_fw_html_data_to_string( $data ); ?>><?php wp_editor( $value, $id, $editor_args ); ?></div>
39
 
40
  <?php endif; ?>
plugin-fw/templates/fields/toggle-element-fixed.php CHANGED
@@ -10,6 +10,7 @@ $defaults = array(
10
  'custom_attributes' => '',
11
  'elements' => [],
12
  'onoff_field' => true,
 
13
 
14
  );
15
  $field = wp_parse_args( $field, $defaults );
@@ -48,10 +49,17 @@ $value = get_option( $name, [] );
48
  <?php foreach ( $elements as $element ):
49
  // build correct name and id
50
  $field_id = $element['id'];
51
- $element['name'] = "{$name}[{$field_id}]";
52
  $element['id'] = "{$id}_{$field_id}";
53
  // get value
54
- $element['value'] = isset( $value[ $field_id ] ) ? $value[ $field_id ] : ( isset( $element['default'] ) ? $element['default'] : '' );
 
 
 
 
 
 
 
55
  ?>
56
  <div class="yith-toggle-content-row <?php echo $element['type'] ?>">
57
  <label for="<?php echo $element['id']; ?>"><?php echo $element['title']; ?></label>
@@ -65,4 +73,4 @@ $value = get_option( $name, [] );
65
  </div>
66
  </div>
67
  </div>
68
- </div>
10
  'custom_attributes' => '',
11
  'elements' => [],
12
  'onoff_field' => true,
13
+ 'save_single_options' => false,
14
 
15
  );
16
  $field = wp_parse_args( $field, $defaults );
49
  <?php foreach ( $elements as $element ):
50
  // build correct name and id
51
  $field_id = $element['id'];
52
+ $element['name'] = false === $save_single_options ? "{$name}[{$field_id}]" : $field_id;
53
  $element['id'] = "{$id}_{$field_id}";
54
  // get value
55
+ $element['value'] = '';
56
+ if( false === $save_single_options ){
57
+ $element['value'] = isset( $value[ $field_id ] ) ? $value[ $field_id ] : ( isset( $element['default'] ) ? $element['default'] : '' );
58
+ }
59
+
60
+ else {
61
+ $element['value'] = get_option( $field_id, $element['default'] );
62
+ }
63
  ?>
64
  <div class="yith-toggle-content-row <?php echo $element['type'] ?>">
65
  <label for="<?php echo $element['id']; ?>"><?php echo $element['title']; ?></label>
73
  </div>
74
  </div>
75
  </div>
76
+ </div>
plugin-fw/templates/fields/toggle-element.php CHANGED
@@ -44,6 +44,11 @@ if ( empty( $values ) && !$show_add_button && $elements ) {
44
 
45
  ?>
46
  <div class="yith-toggle_wrapper <?php echo $class_wrapper ?>" id="<?php echo $id ?>" data-nonce="<?php echo $ajax_nonce; ?>">
 
 
 
 
 
47
  <?php
48
 
49
  if ( $show_add_button ):
@@ -287,4 +292,4 @@ if ( empty( $values ) && !$show_add_button && $elements ) {
287
  </div>
288
  </script>
289
 
290
- </div>
44
 
45
  ?>
46
  <div class="yith-toggle_wrapper <?php echo $class_wrapper ?>" id="<?php echo $id ?>" data-nonce="<?php echo $ajax_nonce; ?>">
47
+ <?php
48
+ if( !empty( $label ) ):
49
+ ?>
50
+ <label for="<?php esc_attr_e($id);?>"><?php echo esc_html( $label );?></label>
51
+ <?php endif;?>
52
  <?php
53
 
54
  if ( $show_add_button ):
292
  </div>
293
  </script>
294
 
295
+ </div>
plugin-fw/templates/fields/upload.php CHANGED
@@ -18,7 +18,7 @@ extract( $field );
18
  <div class="yith-plugin-fw-upload-img-preview" style="margin-top:10px;">
19
  <?php
20
  $file = $value;
21
- if ( preg_match( '/(jpg|jpeg|png|gif|ico)$/', $file ) ) {
22
  echo "<img src='$file' style='max-width:600px; max-height:300px;' />";
23
  }
24
  ?>
18
  <div class="yith-plugin-fw-upload-img-preview" style="margin-top:10px;">
19
  <?php
20
  $file = $value;
21
+ if ( preg_match( '/(jpg|jpeg|png|gif|ico|svg)$/', $file ) ) {
22
  echo "<img src='$file' style='max-width:600px; max-height:300px;' />";
23
  }
24
  ?>
plugin-fw/templates/metaboxes/tab.php CHANGED
@@ -73,11 +73,11 @@ do_action( 'yit_before_metaboxes_tab' ) ?>
73
  if ( $pos = strpos( $field_name, ']' ) ) {
74
  $field_name = substr_replace( $field_name, '', $pos, 1 );
75
  }
76
- $value = yit_get_post_meta( $post->ID, $field_name );
77
- $field[ 'value' ] = $value != '' ? $value : ( isset( $field[ 'std' ] ) ? $field[ 'std' ] : '' );
78
- $field[ 'checkboxgroup' ] = ( $field[ 'type' ] == 'checkbox' && isset( $field[ 'checkboxgroup' ] ) ) ? " " . $field[ 'checkboxgroup' ] : "";
79
- $container_classes = "the-metabox " . $field[ 'type' ] . $field[ 'checkboxgroup' ] . " clearfix ";
80
- $container_classes .= empty( $field[ 'label' ] ) ? 'no-label' : '';
81
 
82
  ?>
83
  <div class="<?php echo $container_classes ?>">
73
  if ( $pos = strpos( $field_name, ']' ) ) {
74
  $field_name = substr_replace( $field_name, '', $pos, 1 );
75
  }
76
+ $value = yit_get_post_meta( $post->ID, $field_name );
77
+ $field['value'] = false === $value ? ( isset( $field['std'] ) ? $field['std'] : '' ) : $value;
78
+ $field['checkboxgroup'] = ( $field['type'] == 'checkbox' && isset( $field['checkboxgroup'] ) ) ? " " . $field['checkboxgroup'] : "";
79
+ $container_classes = "the-metabox " . $field['type'] . $field['checkboxgroup'] . " clearfix ";
80
+ $container_classes .= empty( $field['label'] ) ? 'no-label' : '';
81
 
82
  ?>
83
  <div class="<?php echo $container_classes ?>">
plugin-fw/templates/panel/woocommerce/woocommerce-form.php CHANGED
@@ -10,8 +10,10 @@ $panel_content_class = apply_filters( 'yit_admin_panel_content_class', 'yit-admi
10
  <div class="<?php echo $panel_content_class; ?>">
11
  <form id="plugin-fw-wc" method="post">
12
  <?php $this->add_fields() ?>
13
- <?php wp_nonce_field( 'yit_panel_wc_options_' . $this->settings[ 'page' ], 'yit_panel_wc_options_nonce' ); ?>
14
- <input style="float: left; margin-right: 10px;" class="button-primary" type="submit" value="<?php _e( 'Save Changes', 'yith-plugin-fw' ) ?>"/>
 
 
15
  </form>
16
  <form id="plugin-fw-wc-reset" method="post">
17
  <?php $warning = __( 'If you continue with this action, you will reset all options in this page.', 'yith-plugin-fw' ) ?>
10
  <div class="<?php echo $panel_content_class; ?>">
11
  <form id="plugin-fw-wc" method="post">
12
  <?php $this->add_fields() ?>
13
+ <p class="submit" style="float: left;margin: 0 10px 0 0;">
14
+ <?php wp_nonce_field( 'yit_panel_wc_options_' . $this->settings[ 'page' ], 'yit_panel_wc_options_nonce' ); ?>
15
+ <input class="button-primary" type="submit" value="<?php _e( 'Save Changes', 'yith-plugin-fw' ) ?>"/>
16
+ </p>
17
  </form>
18
  <form id="plugin-fw-wc-reset" method="post">
19
  <?php $warning = __( 'If you continue with this action, you will reset all options in this page.', 'yith-plugin-fw' ) ?>
plugin-fw/templates/sysinfo/system-information-panel.php CHANGED
@@ -8,11 +8,12 @@
8
  * http://www.gnu.org/licenses/gpl-3.0.txt
9
  */
10
 
11
- $system_info = get_option( 'yith_system_info' );
12
- $recommended_memory = 134217728;
13
- $output_ip = 'n/a';
 
14
 
15
- if ( function_exists( 'curl_init' ) && apply_filters( 'yith_system_status_check_ip', true ) ) {
16
  //Get Output IP Address
17
  $ch = curl_init();
18
  curl_setopt( $ch, CURLOPT_URL, 'https://ifconfig.co/ip' );
@@ -21,176 +22,153 @@ if ( function_exists( 'curl_init' ) && apply_filters( 'yith_system_status_check_
21
  curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
22
  $data = curl_exec( $ch );
23
  curl_close( $ch );
24
- $output_ip = $data != '' ? $data : 'n/a';
25
- }
26
-
27
- ?>
28
- <div id="yith-sysinfo" class="wrap yith-system-info">
29
- <h1>
30
- <span class="yith-logo"><img src="<?php echo yith_plugin_fw_get_default_logo() ?>" /></span> <?php _e( 'YITH System Information', 'yith-plugin-fw' ) ?>
31
- </h1>
32
-
33
- <?php if ( ! isset( $_GET['yith-phpinfo'] ) || $_GET['yith-phpinfo'] != 'true' ): ?>
34
 
35
- <table class="widefat striped">
36
- <tr>
37
- <th>
38
- <?php _e( 'Site URL', 'yith-plugin-fw' ); ?>
39
- </th>
40
- <td class="requirement-value">
41
- <?php echo get_site_url() ?>
42
- </td>
43
- </tr>
44
- <tr>
45
- <th>
46
- <?php _e( 'Output IP Address', 'yith-plugin-fw' ); ?>
47
- </th>
48
- <td class="requirement-value">
49
- <?php echo $output_ip ?>
50
- </td>
51
- </tr>
52
- </table>
53
 
54
- <table class="widefat striped">
55
- <?php foreach ( $system_info['system_info'] as $key => $item ): ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
  <?php
57
- $to_be_enabled = strpos( $key, '_enabled' ) !== false;
58
- $has_errors = isset( $item['errors'] );
59
- $has_warnings = false;
60
-
61
- if ( $key == 'wp_memory_limit' && ! $has_errors ) {
62
- $has_warnings = $item['value'] < $recommended_memory;
63
- } elseif ( ( $key == 'min_tls_version' || $key == 'imagick_version' ) && ! $has_errors ) {
64
- $has_warnings = $item['value'] == 'n/a';
65
- }
66
-
67
- ?>
68
- <tr>
69
- <th class="requirement-name">
70
- <?php echo $labels[ $key ]; ?>
71
- </th>
72
- <td class="requirement-value <?php echo( $has_errors ? 'has-errors' : '' ) ?> <?php echo( $has_warnings ? 'has-warnings' : '' ) ?>">
73
- <span class="dashicons dashicons-<?php echo( $has_errors || $has_warnings ? 'warning' : 'yes' ) ?>"></span>
74
-
75
- <?php if ( $to_be_enabled ) {
76
- echo $item['value'] ? __( 'Enabled', 'yith-plugin-fw' ) : __( 'Disabled', 'yith-plugin-fw' );
77
- } elseif ( $key == 'wp_memory_limit' ) {
78
- echo esc_html( size_format( $item['value'] ) );
79
- } else {
80
-
81
- if ( $item['value'] == 'n/a' ) {
82
- echo __( 'N/A', 'yith-plugin-fw' );
83
- } else {
84
- echo $item['value'];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
  }
86
 
87
- } ?>
88
-
89
- </td>
90
- <td class="requirement-messages">
91
- <?php if ( $has_errors ) : ?>
92
- <ul>
93
- <?php foreach ( $item['errors'] as $plugin => $requirement ) : ?>
94
- <li>
95
- <?php if ( $to_be_enabled ) {
96
- echo sprintf( __( '%s needs %s enabled', 'yith-plugin-fw' ), '<b>' . $plugin . '</b>', '<b>' . $labels[ $key ] . '</b>' );
97
- } elseif ( $key == 'wp_memory_limit' ) {
98
- echo sprintf( __( '%s needs at least %s of available memory', 'yith-plugin-fw' ), '<b>' . $plugin . '</b>', '<span class="error">' . esc_html( size_format( YITH_System_Status()->memory_size_to_num( $requirement ) ) ) . '</span>' );
99
- echo '<br/>';
100
- echo sprintf( __( 'For optimal functioning of our plugins, we suggest setting at least %s of available memory', 'yith-plugin-fw' ), '<span class="error">' . esc_html( size_format( $recommended_memory ) ) . '</span>' );
101
- echo '<br/>';
102
- echo sprintf( __( 'Read more %s here%s or contact your hosting company in order to increase it.', 'yith-plugin-fw' ), '<a href="https://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP" target="_blank">', '</a>' );
103
-
104
- } else {
105
- echo sprintf( __( '%s needs at least %s version', 'yith-plugin-fw' ), '<b>' . $plugin . '</b>', '<span class="error">' . $requirement . '</span>' );
106
-
107
-
108
- } ?>
109
- </li>
110
- <?php endforeach; ?>
111
- </ul>
112
- <?php switch ( $key ) {
113
-
114
- case 'min_wp_version':
115
- case 'min_wc_version':
116
- echo __( 'Update it to the latest version in order to benefit of all new features and security updates.', 'yith-plugin-fw' );
117
- break;
118
- case 'min_php_version':
119
- case 'min_tls_version':
120
- case 'imagick_version':
121
- if ( $item['value'] != 'n/a' ) {
122
- echo __( 'Contact your hosting company in order to update it.', 'yith-plugin-fw' );
123
- }
124
- break;
125
- case 'wp_cron_enabled':
126
- echo sprintf( __( 'Remove %s from %s file', 'yith-plugin-fw' ), '<code>define( \'DISABLE_WP_CRON\', true );</code>', '<b>wp-config.php</b>' );
127
- break;
128
- case 'mbstring_enabled':
129
- case 'simplexml_enabled':
130
- case 'gd_enabled':
131
- case 'iconv_enabled':
132
- case 'opcache_enabled':
133
- case 'url_fopen_enabled':
134
- echo __( 'Contact your hosting company in order to enable it.', 'yith-plugin-fw' );
135
- break;
136
- case 'wp_memory_limit':
137
- echo sprintf( __( 'Read more %s here%s or contact your hosting company in order to increase it.', 'yith-plugin-fw' ), '<a href="https://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP" target="_blank">', '</a>' );
138
- break;
139
- default:
140
- echo apply_filters( 'yith_system_generic_message', '', $item );
141
-
142
- } ?>
143
- <?php endif; ?>
144
 
145
- <?php if ( $has_warnings ) {
146
-
147
- if ( $item['value'] != 'n/a' ) {
148
-
149
- echo sprintf( __( 'For optimal functioning of our plugins, we suggest setting at least %s of available memory', 'yith-plugin-fw' ), '<span class="error">' . esc_html( size_format( $recommended_memory ) ) . '</span>' );
150
- echo '<br/>';
151
- echo sprintf( __( 'Read more %s here%s or contact your hosting company in order to increase it.', 'yith-plugin-fw' ), '<a href="https://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP" target="_blank">', '</a>' );
152
-
153
- } else {
154
-
155
- switch ( $key ) {
156
- case 'min_tls_version':
157
- echo __( 'We cannot determine which <b>TLS</b> version is installed because <b>cURL</b> module is disabled. Ask your hosting company to enable it.', 'yith-plugin-fw' );
158
- break;
159
- case 'imagick_version':
160
- echo __( '<b>ImageMagick</b> module is not installed. Ask your hosting company to install it.', 'yith-plugin-fw' );
161
- break;
162
  }
163
-
 
 
164
  }
165
-
166
- } ?>
167
- </td>
168
- </tr>
169
- <?php endforeach; ?>
170
- </table>
171
-
172
- <a href="<?php echo add_query_arg( array( 'yith-phpinfo' => 'true' ) ) ?> "><?php _e( 'Show full PHPInfo', 'yith-plugin-fw' ) ?></a>
173
-
174
- <?php else : ?>
175
-
176
- <a href="<?php echo add_query_arg( array( 'yith-phpinfo' => 'false' ) ) ?> "><?php _e( 'Back to System panel', 'yith-plugin-fw' ) ?></a>
177
-
178
- <?php
179
-
180
- ob_start();
181
- phpinfo( 61 );
182
- $pinfo = ob_get_contents();
183
- ob_end_clean();
184
-
185
- $pinfo = preg_replace( '%^.*<div class="center">(.*)</div>.*$%ms', '$1', $pinfo );
186
- $pinfo = preg_replace( '%(^.*)<a name=\".*\">(.*)</a>(.*$)%m', '$1$2$3', $pinfo );
187
- $pinfo = str_replace( '<table>', '<table class="widefat striped yith-phpinfo">', $pinfo );
188
- $pinfo = str_replace( '<td class="e">', '<th class="e">', $pinfo );
189
- echo $pinfo;
190
-
191
- ?>
192
-
193
- <a href="#yith-sysinfo"><?php _e( 'Back to top', 'yith-plugin-fw' ) ?></a>
194
-
195
- <?php endif; ?>
196
- </div>
8
  * http://www.gnu.org/licenses/gpl-3.0.txt
9
  */
10
 
11
+ $system_info = get_option( 'yith_system_info' );
12
+ $saved_ip = get_transient( 'yith-sysinfo-ip' );
13
+ $output_ip = ( '' === (string) $saved_ip ? 'n/a' : $saved_ip );
14
+ $labels = YITH_System_Status()->_requirement_labels;
15
 
16
+ if ( 'n/a' === $output_ip && function_exists( 'curl_init' ) && apply_filters( 'yith_system_status_check_ip', true ) ) {
17
  //Get Output IP Address
18
  $ch = curl_init();
19
  curl_setopt( $ch, CURLOPT_URL, 'https://ifconfig.co/ip' );
22
  curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
23
  $data = curl_exec( $ch );
24
  curl_close( $ch );
 
 
 
 
 
 
 
 
 
 
25
 
26
+ //CHECK IF IS IPv4
27
+ preg_match( '/((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])/', $data, $matches );
28
+ //CHECK IF IS IPv6
29
+ if ( empty( $matches ) ) {
30
+ preg_match( '/(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))/', $data, $matches );
31
+ }
32
+ $output_ip = ! empty( $matches ) ? $matches[0] : 'n/a';
 
 
 
 
 
 
 
 
 
 
 
33
 
34
+ set_transient( 'yith-sysinfo-ip', $output_ip, 300 );
35
+ }
36
+ ?>
37
+ <div id="yith-sysinfo" class="wrap yith-system-info yith-plugin-ui">
38
+ <h2 class="yith-sysinfo-title">
39
+ <span class="yith-logo"><img src="<?php echo yith_plugin_fw_get_default_logo(); ?>" /></span> <?php _e( 'YITH System Information', 'yith-plugin-fw' ); ?>
40
+ </h2>
41
+ <?php
42
+
43
+ $tab = isset( $_GET['tab'] ) ? $_GET['tab'] : '';
44
+
45
+ switch ( $tab ) {
46
+ case 'error-log':
47
+ $debug_files = array(
48
+ //debug.log file
49
+ 'debug.log' => array(
50
+ 'label' => esc_html__( 'WP debug.log file', 'yith-plugin-fw' ),
51
+ 'path' => WP_CONTENT_DIR . '/debug.log',
52
+ ),
53
+ 'error_log' => array(
54
+ 'label' => esc_html__( 'PHP error_log file', 'yith-plugin-fw' ),
55
+ 'path' => ABSPATH . 'error_log',
56
+ ),
57
+ );
58
+ ?>
59
+ <a href="<?php echo add_query_arg( array( 'tab' => 'main' ) ); ?> "><?php esc_html_e( 'Back to System panel', 'yith-plugin-fw' ); ?></a>
60
+ <table class="widefat striped">
61
  <?php
62
+ foreach ( $debug_files as $debug_file ) :
63
+
64
+ if ( ! file_exists( $debug_file['path'] ) ) {
65
+ continue;
66
+ }
67
+
68
+ ?>
69
+ <tr>
70
+ <th>
71
+ <?php echo $debug_file['label']; ?>
72
+ </th>
73
+ <td>
74
+ <textarea class="yith-system-info-debug" readonly> <?php include $debug_file['path']; ?></textarea>
75
+ </td>
76
+ </tr>
77
+ <?php endforeach; ?>
78
+ </table>
79
+ <?php
80
+ break;
81
+ case 'php-info':
82
+ ?>
83
+ <a href="<?php echo add_query_arg( array( 'tab' => 'main' ) ); ?> "><?php esc_html_e( 'Back to System panel', 'yith-plugin-fw' ); ?></a>
84
+ <?php
85
+ ob_start();
86
+ phpinfo( 61 );
87
+ $pinfo = ob_get_contents();
88
+ ob_end_clean();
89
+
90
+ $pinfo = preg_replace( '%^.*<div class="center">(.*)</div>.*$%ms', '$1', $pinfo );
91
+ $pinfo = preg_replace( '%(^.*)<a name=\".*\">(.*)</a>(.*$)%m', '$1$2$3', $pinfo );
92
+ $pinfo = str_replace( '<table>', '<table class="widefat striped yith-phpinfo">', $pinfo );
93
+ $pinfo = str_replace( '<td class="e">', '<th class="e">', $pinfo );
94
+ echo $pinfo;
95
+ ?>
96
+ <a href="#yith-sysinfo"><?php esc_html_e( 'Back to top', 'yith-plugin-fw' ); ?></a>
97
+ <?php
98
+ break;
99
+ default:
100
+ ?>
101
+ <table class="widefat striped">
102
+ <tr>
103
+ <th>
104
+ <?php esc_html_e( 'Site URL', 'yith-plugin-fw' ); ?>
105
+ </th>
106
+ <td class="requirement-value">
107
+ <?php echo get_site_url(); ?>
108
+ </td>
109
+ </tr>
110
+ <tr>
111
+ <th>
112
+ <?php esc_html_e( 'Output IP Address', 'yith-plugin-fw' ); ?>
113
+ </th>
114
+ <td class="requirement-value">
115
+ <?php echo $output_ip; ?>
116
+ </td>
117
+ </tr>
118
+ <tr>
119
+ <th>
120
+ <?php esc_html_e( 'Defined WP_CACHE', 'yith-plugin-fw' ); ?>
121
+ </th>
122
+ <td class="requirement-value">
123
+ <?php echo( defined( 'WP_CACHE' ) && WP_CACHE ? esc_html__( 'Yes', 'yith-plugin-fw' ) : esc_html__( 'No', 'yith-plugin-fw' ) ); ?>
124
+ </td>
125
+ </tr>
126
+ </table>
127
+
128
+ <table class="widefat striped">
129
+ <?php foreach ( $system_info['system_info'] as $key => $item ) : ?>
130
+ <?php
131
+ $has_errors = isset( $item['errors'] );
132
+ $has_warnings = isset( $item['warnings'] );
133
+ ?>
134
+ <tr>
135
+ <th class="requirement-name">
136
+ <?php echo $labels[ $key ]; ?>
137
+ </th>
138
+ <td class="requirement-value <?php echo( $has_errors ? 'has-errors' : '' ); ?> <?php echo( $has_warnings ? 'has-warnings' : '' ); ?>">
139
+ <span class="dashicons dashicons-<?php echo( $has_errors || $has_warnings ? 'warning' : 'yes' ); ?>"></span>
140
+ <?php
141
+ echo YITH_System_Status()->format_requirement_value( $key, $item['value'] );
142
+ ?>
143
+ </td>
144
+ <td class="requirement-messages">
145
+ <?php
146
+ if ( $has_errors ) {
147
+ YITH_System_Status()->print_error_messages( $key, $item, $labels[ $key ] );
148
+ YITH_System_Status()->print_solution_suggestion( $key, $item, $labels[ $key ] );
149
+ } elseif ( $has_warnings ) {
150
+ YITH_System_Status()->print_warning_messages( $key );
151
  }
152
 
153
+ if ( 'min_php_version' === $key ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
154
 
155
+ if ( $has_errors || $has_warnings ) {
156
+ echo '<br />';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
157
  }
158
+ ?>
159
+ <a href="<?php echo add_query_arg( array( 'tab' => 'php-info' ) ); ?> "><?php esc_html_e( 'Show full PHPInfo', 'yith-plugin-fw' ); ?></a>
160
+ <?php
161
  }
162
+ ?>
163
+ </td>
164
+ </tr>
165
+ <?php endforeach; ?>
166
+ </table>
167
+ <a href="<?php echo add_query_arg( array( 'tab' => 'error-log' ) ); ?> "><?php esc_html_e( 'Show log files', 'yith-plugin-fw' ); ?></a>
168
+
169
+ <?php
170
+ break;
171
+ }
172
+
173
+ ?>
174
+ </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
plugin-fw/yit-functions.php CHANGED
@@ -338,12 +338,12 @@ if ( !function_exists( 'yit_get_post_meta' ) ) {
338
  *
339
  * @param int $id Post ID.
340
  * @param string $meta The meta key to retrieve.
341
- * @return mixed Single value or array
342
  * @since 2.0.0
343
  */
344
  function yit_get_post_meta( $id, $meta ) {
345
  if ( !strpos( $meta, '[' ) ) {
346
- return get_post_meta( $id, $meta, true );
347
  }
348
 
349
  $sub_meta = explode( '[', $meta );
@@ -969,21 +969,34 @@ if ( !function_exists( 'yith_plugin_fw_get_field' ) ) {
969
  * @return string|void
970
  */
971
  function yith_plugin_fw_get_field( $field, $echo = false, $show_container = true ) {
972
- if ( empty( $field[ 'type' ] ) )
973
- return '';
974
-
975
- if ( !isset( $field[ 'value' ] ) )
976
- $field[ 'value' ] = '';
977
 
978
- if ( !isset( $field[ 'name' ] ) )
979
- $field[ 'name' ] = '';
 
980
 
981
- if ( !isset( $field[ 'custom_attributes' ] ) )
982
- $field[ 'custom_attributes' ] = '';
 
983
 
984
- if ( !isset( $field[ 'default' ] ) && isset( $field[ 'std' ] ) )
985
- $field[ 'default' ] = $field[ 'std' ];
 
 
 
 
 
 
 
 
 
 
986
 
 
 
 
987
 
988
  $field_template = yith_plugin_fw_get_field_template_path( $field );
989
 
@@ -1366,4 +1379,43 @@ if ( !function_exists( 'yith_plugin_fw_add_requirements' ) ) {
1366
 
1367
  }
1368
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1369
  }
338
  *
339
  * @param int $id Post ID.
340
  * @param string $meta The meta key to retrieve.
341
+ * @return mixed Single value or array. Return false is the meta doesn't exists.
342
  * @since 2.0.0
343
  */
344
  function yit_get_post_meta( $id, $meta ) {
345
  if ( !strpos( $meta, '[' ) ) {
346
+ return metadata_exists( 'post', $id, $meta ) ? get_post_meta( $id, $meta, true ) : false;
347
  }
348
 
349
  $sub_meta = explode( '[', $meta );
969
  * @return string|void
970
  */
971
  function yith_plugin_fw_get_field( $field, $echo = false, $show_container = true ) {
972
+ if ( empty( $field[ 'type' ] ) ) {
973
+ return '';
974
+ }
 
 
975
 
976
+ if ( !isset( $field[ 'value' ] ) ) {
977
+ $field['value'] = '';
978
+ }
979
 
980
+ if ( !isset( $field[ 'name' ] ) ) {
981
+ $field['name'] = '';
982
+ }
983
 
984
+ if ( ! isset( $field[ 'custom_attributes' ] ) ) {
985
+ $field['custom_attributes'] = '';
986
+ }
987
+ elseif( is_array( $field[ 'custom_attributes' ] ) ) {
988
+ // let's build custom attributes as string
989
+ $custom_attributes = array();
990
+ foreach ( $field[ 'custom_attributes' ] as $attribute => $attribute_value ) {
991
+ $custom_attributes[] = esc_attr( $attribute ) . '="' . esc_attr( $attribute_value ) . '"';
992
+ }
993
+
994
+ $field['custom_attributes'] = implode( ' ', $custom_attributes );
995
+ }
996
 
997
+ if ( ! isset( $field[ 'default' ] ) && isset( $field[ 'std' ] ) ) {
998
+ $field['default'] = $field['std'];
999
+ }
1000
 
1001
  $field_template = yith_plugin_fw_get_field_template_path( $field );
1002
 
1379
 
1380
  }
1381
  }
1382
+ }
1383
+
1384
+ if ( ! function_exists( 'yith_plugin_fw_parse_dimensions' ) ) {
1385
+ /**
1386
+ * Parse dimensions stored through a "dimensions" field to a key-value array
1387
+ * where the key will be equal to the dimension key
1388
+ * and the value will be equal to the value of the dimension suffixed with the unit
1389
+ *
1390
+ * @param array $values
1391
+ * @return array
1392
+ */
1393
+ function yith_plugin_fw_parse_dimensions( $values ) {
1394
+ $dimensions = array();
1395
+ if ( is_array( $values ) && isset( $values['dimensions'], $values['unit'] ) && is_array( $values['dimensions'] ) ) {
1396
+ $raw_unit = $values['unit'];
1397
+ $unit = 'percentage' === $raw_unit ? '%' : $raw_unit;
1398
+ foreach ( $values['dimensions'] as $key => $value ) {
1399
+ $dimensions[ $key ] = $value . $unit;
1400
+ }
1401
+ }
1402
+
1403
+ return $dimensions;
1404
+ }
1405
+ }
1406
+
1407
+ if ( ! function_exists( 'yith_plugin_fw_get_dimensions_by_option' ) ) {
1408
+ /**
1409
+ * Retrieve a parsed array of dimensions by an option
1410
+ *
1411
+ * @param string $option
1412
+ * @param bool|array $default
1413
+ *
1414
+ * @return array|bool
1415
+ */
1416
+ function yith_plugin_fw_get_dimensions_by_option( $option, $default = false ) {
1417
+ $dimensions = get_option( $option, false );
1418
+
1419
+ return ! ! $dimensions ? yith_plugin_fw_parse_dimensions( $dimensions ) : $default;
1420
+ }
1421
  }
plugin-options/premium-options.php CHANGED
@@ -15,10 +15,10 @@ if ( ! defined( 'ABSPATH' ) ) {
15
 
16
 
17
  return array(
18
- 'premium-landing' => array(
19
  'home' => array(
20
  'type' => 'custom_tab',
21
  'action' => 'yith_zoom_magnifier_premium'
22
  )
23
  )
24
- );
15
 
16
 
17
  return array(
18
+ 'premium' => array(
19
  'home' => array(
20
  'type' => 'custom_tab',
21
  'action' => 'yith_zoom_magnifier_premium'
22
  )
23
  )
24
+ );
templates/single-product/product-image-magnifier.php CHANGED
@@ -25,6 +25,10 @@ if( is_array( $extra_classes ) ){
25
  $extra_classes = implode( " ", $extra_classes );
26
  }
27
  ?>
 
 
 
 
28
  <div class="images<?php if ( $is_IE ): ?> ie<?php endif ?>">
29
 
30
  <?php
@@ -88,7 +92,7 @@ if( is_array( $extra_classes ) ){
88
  position: '<?php echo get_option ( 'yith_wcmg_zoom_position' ) ?>',
89
  //tint: <?php //echo get_option('yith_wcmg_tint') == '' ? 'false' : "'".get_option('yith_wcmg_tint')."'" ?>,
90
  //tintOpacity: <?php //echo get_option('yith_wcmg_tint_opacity') ?>,
91
- lensOpacity: <?php echo get_option ( 'yith_wcmg_lens_opacity' ) ?>,
92
  softFocus: <?php echo get_option ( 'yith_wcmg_softfocus' ) == 'yes' ? 'true' : 'false' ?>,
93
  //smoothMove: <?php //echo get_option('yith_wcmg_smooth') ?>,
94
  adjustY: 0,
@@ -97,4 +101,4 @@ if( is_array( $extra_classes ) ){
97
  loadingLabel: '<?php echo stripslashes ( get_option ( 'yith_wcmg_loading_label' ) ) ?>',
98
  zoom_wrap_additional_css: '<?php echo apply_filters ( 'yith_ywzm_zoom_wrap_additional_css', '', $post->ID ); ?>'
99
  };
100
- </script>
25
  $extra_classes = implode( " ", $extra_classes );
26
  }
27
  ?>
28
+
29
+ <input type="hidden" id="yith_wczm_traffic_light" value="free">
30
+
31
+
32
  <div class="images<?php if ( $is_IE ): ?> ie<?php endif ?>">
33
 
34
  <?php
92
  position: '<?php echo get_option ( 'yith_wcmg_zoom_position' ) ?>',
93
  //tint: <?php //echo get_option('yith_wcmg_tint') == '' ? 'false' : "'".get_option('yith_wcmg_tint')."'" ?>,
94
  //tintOpacity: <?php //echo get_option('yith_wcmg_tint_opacity') ?>,
95
+ lensOpacity: '<?php echo get_option ( 'yith_wcmg_lens_opacity' ) ?>',
96
  softFocus: <?php echo get_option ( 'yith_wcmg_softfocus' ) == 'yes' ? 'true' : 'false' ?>,
97
  //smoothMove: <?php //echo get_option('yith_wcmg_smooth') ?>,
98
  adjustY: 0,
101
  loadingLabel: '<?php echo stripslashes ( get_option ( 'yith_wcmg_loading_label' ) ) ?>',
102
  zoom_wrap_additional_css: '<?php echo apply_filters ( 'yith_ywzm_zoom_wrap_additional_css', '', $post->ID ); ?>'
103
  };
104
+ </script>
templates/single-product/product-thumbnails-magnifier.php CHANGED
@@ -2,68 +2,78 @@
2
  /**
3
  * Single Product Image
4
  *
5
- * @author YIThemes
6
- * @package YITH_Magnifier/Templates
7
- * @version 1.1.2
8
  */
9
 
10
- if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
11
 
12
  global $post, $product, $woocommerce;
13
 
14
  $enable_slider = get_option('yith_wcmg_enableslider') == 'yes' ? true : false;
15
-
16
- $attachment_ids = version_compare(WC()->version, '3.0.0', '<') ? $product->get_gallery_attachment_ids() : $product->get_gallery_image_ids();
17
  $post_thumbnail_id = apply_filters( 'yith_wcmg_get_post_thumbnail_id', get_post_thumbnail_id(), $post->ID );
18
- if ( ! empty( $attachment_ids ) ) array_unshift( $attachment_ids, $post_thumbnail_id );
 
 
19
 
20
  // make sure attachments ids are unique
21
  $attachment_ids = array_unique($attachment_ids);
 
 
 
 
 
 
 
 
 
 
 
22
 
23
- if ( $attachment_ids ) {
24
  ?>
 
25
  <div class="thumbnails <?php echo $enable_slider ? 'slider' : 'noslider' ?>">
26
- <ul class="yith_magnifier_gallery">
27
- <?php
28
- $loop = 0;
29
- $columns = apply_filters( 'woocommerce_product_thumbnails_columns', get_option( 'yith_wcmg_slider_items', 3 ) );
30
 
31
- if( !isset( $columns ) || $columns == null ) $columns = 3;
32
 
33
- foreach ( $attachment_ids as $attachment_id ) {
34
- $classes = array( 'yith_magnifier_thumbnail' );
35
 
36
- if ( $loop == 0 || $loop % $columns == 0 ) {
37
- $classes[] = 'first';
38
- }
39
 
40
- if ( ( $loop + 1 ) % $columns == 0 ) {
41
- $classes[] = 'last';
42
- }
43
 
44
- if( $loop == 0 && defined( 'YWCFAV_PREMIUM') ){
45
- $classes[] = 'ywfav_magnifier_thumbnail';
46
- }
 
 
 
47
 
48
- $image = wp_get_attachment_image( $attachment_id, apply_filters( 'single_product_small_thumbnail_size', 'shop_thumbnail' ) );
49
- $image_class = esc_attr( implode( ' ', $classes ) );
50
- $image_title = esc_attr( get_the_title( $attachment_id ) );
51
 
52
- list( $thumbnail_url, $thumbnail_width, $thumbnail_height ) = wp_get_attachment_image_src( $attachment_id, "shop_single" );
53
- list( $magnifier_url, $magnifier_width, $magnifier_height ) = wp_get_attachment_image_src( $attachment_id, "shop_magnifier" );
54
 
55
- echo apply_filters( 'woocommerce_single_product_image_thumbnail_html', sprintf( '<li class="%s"><a href="%s" class="%s" title="%s" data-small="%s">%s</a></li>', $image_class, $magnifier_url, $image_class, $image_title, $thumbnail_url, $image ), $attachment_id, $post->ID, $image_class );
56
 
57
- $loop++;
58
- }
59
- ?>
60
  </ul>
61
 
62
- <?php if ( $enable_slider ) : ?>
63
  <div id="slider-prev"></div>
64
  <div id="slider-next"></div>
65
  <?php endif; ?>
 
66
  </div>
67
- <?php
 
68
  }
69
  ?>
2
  /**
3
  * Single Product Image
4
  *
5
+ * @author YIThemes
6
+ * @package YITH_Magnifier/Templates
 
7
  */
8
 
9
+ if (!defined('ABSPATH')) exit; // Exit if accessed directly
10
 
11
  global $post, $product, $woocommerce;
12
 
13
  $enable_slider = get_option('yith_wcmg_enableslider') == 'yes' ? true : false;
 
 
14
  $post_thumbnail_id = apply_filters( 'yith_wcmg_get_post_thumbnail_id', get_post_thumbnail_id(), $post->ID );
15
+
16
+ $attachment_ids = version_compare(WC()->version, '2.7.0', '<') ? $product->get_gallery_attachment_ids() : $product->get_gallery_image_ids();
17
+ if (!empty($attachment_ids)) array_unshift($attachment_ids, $post_thumbnail_id );
18
 
19
  // make sure attachments ids are unique
20
  $attachment_ids = array_unique($attachment_ids);
21
+ if ($attachment_ids) {
22
+
23
+ $columns = apply_filters('woocommerce_product_thumbnails_columns', get_option('yith_wcmg_slider_items', 3));
24
+ if ( ! isset( $columns ) || $columns == null ) $columns = 3;
25
+
26
+ $li_width = floor( 90 / $columns );
27
+ $li_width = 90 / $columns;
28
+
29
+ $li_margins_l_r = 10 / ( $columns * 2 );
30
+
31
+ $li_style = apply_filters( 'woocommerce_single_product_image_thumbnail_html_cloumns_style', 'width: ' . $li_width . '%; margin-left: ' . $li_margins_l_r . '%; margin-right: ' . $li_margins_l_r . '%;' , $columns );
32
 
 
33
  ?>
34
+
35
  <div class="thumbnails <?php echo $enable_slider ? 'slider' : 'noslider' ?>">
36
+ <ul class="yith_magnifier_gallery" data-columns="<?php echo $columns; ?>" data-circular="<?php echo get_option ( 'yith_wcmg_slider_circular' ); ?>" data-slider_infinite="<?php echo get_option ( 'yith_wcmg_slider_infinite' ); ?>" data-auto_carousel="<?php echo get_option ( 'ywzm_auto_carousel' ); ?>">
37
+ <?php
38
+ $loop = 1;
 
39
 
40
+ foreach ( $attachment_ids as $attachment_id ) {
41
 
42
+ $classes = array( 'yith_magnifier_thumbnail' );
 
43
 
44
+ if ( $loop == 1 ) {
45
+ $classes[] = 'first';
 
46
 
47
+ }
 
 
48
 
49
+ if ( $loop == $columns ) {
50
+ $classes[] = 'last';
51
+ }
52
+
53
+ if ( $loop > $columns )
54
+ $li_style = apply_filters( 'woocommerce_single_product_image_thumbnail_html_cloumns_style', 'display: none; width: ' . $li_width . '%; margin-left:' . $li_margins_l_r . '%; margin-right: ' . $li_margins_l_r . '%;' , $columns );
55
 
56
+ $image = wp_get_attachment_image( $attachment_id, apply_filters( 'single_product_small_thumbnail_size', 'shop_thumbnail' ) );
57
+ $image_class = esc_attr(implode(' ', $classes ) );
58
+ $image_title = apply_filters( 'ywcmg_get_image_title', esc_attr( get_the_title( $attachment_id ) ), $attachment_id );
59
 
60
+ list( $thumbnail_url, $thumbnail_width, $thumbnail_height ) = wp_get_attachment_image_src( $attachment_id, apply_filters( 'yith_zoom_magnifier_thumbnail_size', "shop_single" ) );
61
+ list( $magnifier_url, $magnifier_width, $magnifier_height ) = wp_get_attachment_image_src( $attachment_id, "full" );
62
 
63
+ echo apply_filters( 'woocommerce_single_product_image_thumbnail_html', sprintf('<li class="%s" style="%s"><a href="%s" class="%s" title="%s" data-small="%s">%s</a></li>', $image_class, $li_style, $magnifier_url, $image_class, $image_title, $thumbnail_url, $image), $attachment_id, $post->ID, $image_class, $columns );
64
 
65
+ $loop++;
66
+ }
67
+ ?>
68
  </ul>
69
 
70
+ <?php if ( $enable_slider && ( count( $attachment_ids ) > $columns ) ) : ?>
71
  <div id="slider-prev"></div>
72
  <div id="slider-next"></div>
73
  <?php endif; ?>
74
+ <input id="yith_wc_zm_carousel_controler" type="hidden" value="1">
75
  </div>
76
+
77
+ <?php
78
  }
79
  ?>