YITH Essential Kit for WooCommerce #1 - Version 1.1.16

Version Description

  • Updated: All YITH plugins to latest version
Download this release

Release Info

Developer yithemes
Plugin Icon 128x128 YITH Essential Kit for WooCommerce #1
Version 1.1.16
Comparing to
See all releases

Code changes from version 1.1.15 to 1.1.16

Files changed (61) hide show
  1. README.txt +6 -2
  2. init.php +1 -1
  3. modules/yith-infinite-scrolling/init.php +0 -1
  4. modules/yith-woocommerce-ajax-navigation/assets/css/frontend.css +39 -0
  5. modules/yith-woocommerce-ajax-navigation/assets/js/yith-wcan-admin.js +2 -2
  6. modules/yith-woocommerce-ajax-navigation/assets/js/yith-wcan-frontend.js +10 -3
  7. modules/yith-woocommerce-ajax-navigation/assets/js/yith-wcan-frontend.min.js +13 -13
  8. modules/yith-woocommerce-ajax-navigation/includes/class.yith-wcan-frontend.php +5 -0
  9. modules/yith-woocommerce-ajax-navigation/includes/functions.yith-wcan.php +40 -4
  10. modules/yith-woocommerce-ajax-navigation/init.php +2 -2
  11. modules/yith-woocommerce-ajax-navigation/widgets/class.yith-wcan-navigation-widget.php +82 -22
  12. modules/yith-woocommerce-ajax-navigation/widgets/class.yith-wcan-reset-navigation-widget.php +17 -6
  13. modules/yith-woocommerce-colors-labels-variations/assets/js/frontend.js +8 -25
  14. modules/yith-woocommerce-colors-labels-variations/assets/js/frontend.min.js +1 -5
  15. modules/yith-woocommerce-colors-labels-variations/changelog.txt +5 -0
  16. modules/yith-woocommerce-colors-labels-variations/init.php +3 -3
  17. modules/yith-woocommerce-colors-labels-variations/templates/single-product/add-to-cart/variable-wccl.php +6 -9
  18. modules/yith-woocommerce-order-tracking/class.yith-woocommerce-order-tracking.php +1 -1
  19. modules/yith-woocommerce-product-vendors/assets/css/admin.css +8 -2
  20. modules/yith-woocommerce-product-vendors/assets/images/29-bg.png +0 -0
  21. modules/yith-woocommerce-product-vendors/assets/images/29-icon.png +0 -0
  22. modules/yith-woocommerce-product-vendors/assets/images/29.png +0 -0
  23. modules/yith-woocommerce-product-vendors/assets/images/30-bg.png +0 -0
  24. modules/yith-woocommerce-product-vendors/assets/images/30-icon.png +0 -0
  25. modules/yith-woocommerce-product-vendors/assets/images/30.png +0 -0
  26. modules/yith-woocommerce-product-vendors/assets/images/31-bg.png +0 -0
  27. modules/yith-woocommerce-product-vendors/assets/images/31-icon.png +0 -0
  28. modules/yith-woocommerce-product-vendors/assets/images/31.png +0 -0
  29. modules/yith-woocommerce-product-vendors/assets/js/admin.js +3 -1
  30. modules/yith-woocommerce-product-vendors/includes/class.yith-commissions.php +4 -1
  31. modules/yith-woocommerce-product-vendors/includes/class.yith-orders.php +46 -4
  32. modules/yith-woocommerce-product-vendors/includes/class.yith-vendors-admin.php +10 -1
  33. modules/yith-woocommerce-product-vendors/init.php +2 -2
  34. modules/yith-woocommerce-product-vendors/plugin-options/vendors-options.php +4 -4
  35. modules/yith-woocommerce-product-vendors/templates/admin/premium.php +53 -0
  36. modules/yith-woocommerce-review-reminder/init.php +2 -2
  37. modules/yith-woocommerce-review-reminder/languages/yith-woocommerce-review-reminder-it_IT.mo +0 -0
  38. modules/yith-woocommerce-review-reminder/languages/yith-woocommerce-review-reminder-it_IT.po +3 -3
  39. modules/yith-woocommerce-tab-manager/assets/images/06-bg.png +0 -0
  40. modules/yith-woocommerce-tab-manager/assets/images/06-icon.png +0 -0
  41. modules/yith-woocommerce-tab-manager/assets/images/06.png +0 -0
  42. modules/yith-woocommerce-tab-manager/includes/class.yith-woocommerce-tab-manager.php +8 -8
  43. modules/yith-woocommerce-tab-manager/includes/metabox/tab-metabox.php +0 -1
  44. modules/yith-woocommerce-tab-manager/init.php +3 -3
  45. modules/yith-woocommerce-tab-manager/languages/yith-woocommerce-tab-manager.pot +37 -18
  46. modules/yith-woocommerce-tab-manager/templates/admin/premium.php +16 -0
  47. modules/yith-woocommerce-waiting-list/includes/class.yith-wcwtl-frontend.php +45 -13
  48. modules/yith-woocommerce-waiting-list/includes/class.yith-wcwtl-meta.php +1 -1
  49. modules/yith-woocommerce-waiting-list/init.php +3 -3
  50. modules/yith-woocommerce-waiting-list/languages/yith-woocommerce-waiting-list.pot +6 -6
  51. modules/yith-woocommerce-zoom-magnifier/assets/js/frontend.js +1 -1
  52. modules/yith-woocommerce-zoom-magnifier/class.yith-wcmg-admin.php +1 -10
  53. modules/yith-woocommerce-zoom-magnifier/class.yith-wcmg-frontend.php +38 -47
  54. modules/yith-woocommerce-zoom-magnifier/class.yith-wcmg.php +3 -9
  55. modules/yith-woocommerce-zoom-magnifier/functions.yith-wcmg.php +56 -53
  56. modules/yith-woocommerce-zoom-magnifier/init.php +112 -112
  57. modules/yith-woocommerce-zoom-magnifier/lib/class.yith-woocommerce-zoom-magnifier.php +2 -9
  58. modules/yith-woocommerce-zoom-magnifier/lib/class.yith-ywzm-plugin-fw-loader.php +1 -1
  59. plugin-fw/init.php +1 -1
  60. plugin-fw/lib/yit-plugin-panel.php +2 -2
  61. yith-jetpack.php +56 -2
README.txt CHANGED
@@ -4,7 +4,7 @@ Contributors: yithemes
4
  Tags: woocommerce,jetpack,woocommerce jetpack, essential, kit, plugins, plugin, product, e-commerce, ecommerce, commerce, shop, yith, yit, yithemes,yith woocommerce colors and labels variations, colors and labels variations,colors and labels variations jetpack,yith woocommerce zoom magnifier,zoom magnifier,zoom magnifier jetpack,yith woocommerce wishlist,wishlist,wishlist jetpack,yith woocommerce compare,compare,compare jetpack,yith woocommerce ajax product filter,ajax product filter,ajax product filter jetpack,yith woocommerce ajax search,ajax search,ajax search jetpack,yith woocommerce catalog mode,catalog mode,catalog mode jetpack,yith woocommerce order tracking,order tracking,order tracking jetpack, yith woocommerce advanced reviews,advanced reviews,advanced reviews jetpack,yith woocommerce badges management,badges management,badges management jetpack,yith woocommerce cart messages,cart messages,cart messages jetpack,yith woocommerce review reminder,review reminder,review reminder jetpack,yith woocommerce quick view,quick view,quick view jetpack,yith live chat,live chat,live chat jetpack,yith woocommerce eu vat,eu vat,eu vat jetpack,yith woocommerce mailchimp,mailchimp,mailchimp jetpack,yith woocommerce stripe,stripe, stripe jetpack,yith infinite scrolling,infinite scrolling,infinite scrolling jetpack,yith woocommerce request a quote,request a quote,request a quote jetpack,yith woocommerce waiting list,waiting list,waiting list jetpack,yith woocommerce tab manager,tab manager,tab manager jetpack,yith woocommerce multi vendor,multi vendor,multi vendor jetpack,product vendor,products vendor,products vendor jetpack, booster for woocommerce
5
  Requires at least: 3.5.1
6
  Tested up to: 4.4
7
- Stable tag: 1.1.15
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -151,6 +151,10 @@ YITH Essential Kit for WooCommerce #1 will add a new submenu called "YITH Essent
151
 
152
  == Changelog ==
153
 
 
 
 
 
154
  = 1.1.15 =
155
 
156
  * Updated: YITH WooCommerce Multi Vendor
@@ -265,4 +269,4 @@ YITH Essential Kit for WooCommerce #1 will add a new submenu called "YITH Essent
265
 
266
  == Upgrade Notice ==
267
 
268
- Last Stable Tag 1.1.15
4
  Tags: woocommerce,jetpack,woocommerce jetpack, essential, kit, plugins, plugin, product, e-commerce, ecommerce, commerce, shop, yith, yit, yithemes,yith woocommerce colors and labels variations, colors and labels variations,colors and labels variations jetpack,yith woocommerce zoom magnifier,zoom magnifier,zoom magnifier jetpack,yith woocommerce wishlist,wishlist,wishlist jetpack,yith woocommerce compare,compare,compare jetpack,yith woocommerce ajax product filter,ajax product filter,ajax product filter jetpack,yith woocommerce ajax search,ajax search,ajax search jetpack,yith woocommerce catalog mode,catalog mode,catalog mode jetpack,yith woocommerce order tracking,order tracking,order tracking jetpack, yith woocommerce advanced reviews,advanced reviews,advanced reviews jetpack,yith woocommerce badges management,badges management,badges management jetpack,yith woocommerce cart messages,cart messages,cart messages jetpack,yith woocommerce review reminder,review reminder,review reminder jetpack,yith woocommerce quick view,quick view,quick view jetpack,yith live chat,live chat,live chat jetpack,yith woocommerce eu vat,eu vat,eu vat jetpack,yith woocommerce mailchimp,mailchimp,mailchimp jetpack,yith woocommerce stripe,stripe, stripe jetpack,yith infinite scrolling,infinite scrolling,infinite scrolling jetpack,yith woocommerce request a quote,request a quote,request a quote jetpack,yith woocommerce waiting list,waiting list,waiting list jetpack,yith woocommerce tab manager,tab manager,tab manager jetpack,yith woocommerce multi vendor,multi vendor,multi vendor jetpack,product vendor,products vendor,products vendor jetpack, booster for woocommerce
5
  Requires at least: 3.5.1
6
  Tested up to: 4.4
7
+ Stable tag: 1.1.16
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
151
 
152
  == Changelog ==
153
 
154
+ = 1.1.16 =
155
+
156
+ * Updated: All YITH plugins to latest version
157
+
158
  = 1.1.15 =
159
 
160
  * Updated: YITH WooCommerce Multi Vendor
269
 
270
  == Upgrade Notice ==
271
 
272
+ Last Stable Tag 1.1.16
init.php CHANGED
@@ -7,7 +7,7 @@ Text Domain: yith-essential-kit-for-woocommerce-1
7
  Domain Path: /languages/
8
  Author: YIThemes
9
  Author URI: http://yithemes.com/
10
- Version: 1.1.15
11
  */
12
 
13
  if ( ! defined( 'ABSPATH' ) ) {
7
  Domain Path: /languages/
8
  Author: YIThemes
9
  Author URI: http://yithemes.com/
10
+ Version: 1.1.16
11
  */
12
 
13
  if ( ! defined( 'ABSPATH' ) ) {
modules/yith-infinite-scrolling/init.php CHANGED
@@ -77,7 +77,6 @@ if ( ! defined( 'YITH_INFS_TEMPLATE_PATH' ) ) {
77
  define( 'YITH_INFS_TEMPLATE_PATH', YITH_INFS_DIR . 'templates' );
78
  }
79
 
80
-
81
  if ( ! defined( 'YITH_INFS_ASSETS_URL' ) ) {
82
  define( 'YITH_INFS_ASSETS_URL', YITH_INFS_URL . 'assets' );
83
  }
77
  define( 'YITH_INFS_TEMPLATE_PATH', YITH_INFS_DIR . 'templates' );
78
  }
79
 
 
80
  if ( ! defined( 'YITH_INFS_ASSETS_URL' ) ) {
81
  define( 'YITH_INFS_ASSETS_URL', YITH_INFS_URL . 'assets' );
82
  }
modules/yith-woocommerce-ajax-navigation/assets/css/frontend.css CHANGED
@@ -277,3 +277,42 @@ a.yith-wcan-price-link.active:before {
277
  }
278
 
279
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
277
  }
278
 
279
 
280
+ /*--------------------------
281
+ CHECKBOX LAYOUT
282
+ ---------------------------*/
283
+ .yith-woocommerce-ajax-product-filter.with-checkbox{
284
+
285
+ }
286
+ .yith-woocommerce-ajax-product-filter.with-checkbox ul{
287
+ list-style-type: none;
288
+ padding-left: 0;
289
+ }
290
+ .yith-woocommerce-ajax-product-filter.with-checkbox ul li a:before{
291
+ content: '';
292
+ display: inline-block;
293
+ background-image: url("../images/checkbox_sprite.png");
294
+ background-repeat: no-repeat;
295
+ background-position: top center;
296
+ width: 11px;
297
+ height: 11px;
298
+ margin-right: 5px;
299
+ }
300
+ .yith-woocommerce-ajax-product-filter.with-checkbox ul li a.active:before,
301
+ .yith-woocommerce-ajax-product-filter.with-checkbox ul li a.chosen:before,
302
+ .yith-woocommerce-ajax-product-filter.with-checkbox ul li.active a:before,
303
+ .yith-woocommerce-ajax-product-filter.with-checkbox ul li.chosen a:before,
304
+ .yith-woocommerce-ajax-product-filter.with-checkbox ul.orderby li a.active:before,
305
+ .yith-woocommerce-ajax-product-filter.with-checkbox ul.orderby li a.chosen:before,
306
+ .yith-woocommerce-ajax-product-filter.with-checkbox ul.orderby li.active a:before,
307
+ .yith-woocommerce-ajax-product-filter.with-checkbox ul.orderby li.chosen a:before{
308
+ content: '';
309
+ background-position: bottom center;
310
+ }
311
+ .yith-woocommerce-ajax-product-filter.with-checkbox ul li a:after,
312
+ .yith-woocommerce-ajax-product-filter.with-checkbox ul li a.active:after,
313
+ .yith-woocommerce-ajax-product-filter.with-checkbox ul li a.chosen:after,
314
+ .yith-woocommerce-ajax-product-filter.with-checkbox ul li.active a:after,
315
+ .yith-woocommerce-ajax-product-filter.with-checkbox ul li.chosen a:after{
316
+ content: '';
317
+ display: none;
318
+ }
modules/yith-woocommerce-ajax-navigation/assets/js/yith-wcan-admin.js CHANGED
@@ -108,11 +108,11 @@ jQuery(function ($) {
108
 
109
  select_all.on('click', function(e){
110
  e.preventDefault();
111
- $(this).parents( '.yith-wcan-select-option').next('.yith_wcan_select_tag').find('.yith_wcan_tag_list_checkbox').attr( 'checked', true );
112
  });
113
 
114
  unselect_all.on('click', function(e){
115
  e.preventDefault();
116
- $(this).parents( '.yith-wcan-select-option').next('.yith_wcan_select_tag').find('.yith_wcan_tag_list_checkbox').attr( 'checked', false );
117
  });
118
  });
108
 
109
  select_all.on('click', function(e){
110
  e.preventDefault();
111
+ $(this).parents( '.yith-wcan-select-option').next('.yith_wcan_select_tag_wrapper').find('.yith_wcan_tag_list_checkbox').attr( 'checked', true );
112
  });
113
 
114
  unselect_all.on('click', function(e){
115
  e.preventDefault();
116
+ $(this).parents( '.yith-wcan-select-option').next('.yith_wcan_select_tag_wrapper').find('.yith_wcan_tag_list_checkbox').attr( 'checked', false );
117
  });
118
  });
modules/yith-woocommerce-ajax-navigation/assets/js/yith-wcan-frontend.js CHANGED
@@ -98,8 +98,9 @@ jQuery(function ($) {
98
 
99
  $.fn.yith_wcan_ajax_filters = function (e, obj) {
100
  e.preventDefault();
101
- var href = obj.href,
102
- t = $(obj);
 
103
 
104
  if (typeof href == 'undefined' && t.parents().hasClass('price_slider_wrapper')) {
105
  var form = t.parents('form'),
@@ -155,7 +156,6 @@ jQuery(function ($) {
155
  if( ajax_call != false ){
156
  ajax_call.abort();
157
  ajax_call = false;
158
- console.log( 'here' );
159
  }
160
 
161
  ajax_call = $.ajax({
@@ -218,6 +218,13 @@ jQuery(function ($) {
218
  //trigger ready event
219
  $(document).trigger("ready");
220
  $(document).trigger("yith-wcan-ajax-filtered");
 
 
 
 
 
 
 
221
  }
222
  });
223
  };
98
 
99
  $.fn.yith_wcan_ajax_filters = function (e, obj) {
100
  e.preventDefault();
101
+ var href = obj.href,
102
+ t = $(obj),
103
+ is_reset = t.hasClass("yith-wcan-reset-navigation");
104
 
105
  if (typeof href == 'undefined' && t.parents().hasClass('price_slider_wrapper')) {
106
  var form = t.parents('form'),
156
  if( ajax_call != false ){
157
  ajax_call.abort();
158
  ajax_call = false;
 
159
  }
160
 
161
  ajax_call = $.ajax({
218
  //trigger ready event
219
  $(document).trigger("ready");
220
  $(document).trigger("yith-wcan-ajax-filtered");
221
+ if( is_reset ){
222
+ var min_price = parseInt( $( yith_wcan.wc_price_slider.min_price ).data( 'min' ) ),
223
+ max_price = parseInt( $( yith_wcan.wc_price_slider.max_price ).data( 'max' ) );
224
+ $( yith_wcan.wc_price_slider.wrapper ).slider( 'values', [ min_price, max_price ] );
225
+ $( document.body ).trigger( 'price_slider_slide', [ min_price, max_price ] );
226
+ $(document).trigger("yith-wcan-ajax-reset-filtered");
227
+ }
228
  }
229
  });
230
  };
modules/yith-woocommerce-ajax-navigation/assets/js/yith-wcan-frontend.min.js CHANGED
@@ -1,13 +1,13 @@
1
- jQuery(function(b){function u(b,p){return b.replace(new RegExp("[?&]"+p+"=[^&#]*(#.*)?$"),"$1").replace(new RegExp("([?&])"+p+"=[^&]*&"),"$1")}var x=/(?!(\[))(\.)[^.#[]*/g,y=/(#)[^.#[]*/,z=/^[\w]+/,A=/^[\w]+$/,v=function(h,p){var a=[];if(A.test(h))a=[{tag:h}];else{for(var a=h,d={sel:[],val:[]},f=[],k=!1,g="",l=[],c=0,m=a.length;c<m;c++){var e=a.charAt(c);if(k)if("\\"===e&&c+1<a.length)l.push(a.charAt(++c));else if(g===e)g="",l.push(e);else if(("'"===e||'"'===e)&&""===g)g=e,l.push(e);else if("]"===
2
- e&&""===g)d.val.push(l.join("")),l=[],k=!1;else{if("]"!==e||""!==g)""===g&&","===e?(d.val.push(l.join("")),l=[]):l.push(e)}else"\\"===e&&c+1<a.length?k&&l.push(a.charAt(++c)):"["===e&&""===g?k=!0:" "===e||"+"===e?(d.sel=d.sel.join(""),f.push(d),"+"===e&&f.push({sel:"+",val:""}),d={sel:[],val:[]}):" "!==e&&"]"!==e&&d.sel.push(e)}if(0!=d.sel.length||0!=d.val.length)d.sel=d.sel.join(""),f.push(d);for(c=0;c<f.length;c++){d=f[c].sel;if("+"===d)n.tag=d;else{var n=[];n.tag=z.exec(d);n.id=y.exec(d);n.id&&
3
- b.isArray(n.id)&&(n.id=n.id[0].substr(1));n.tag||(n.tag="div");n.vars=[];for(a=0;a<f[c].val.length;a++)g=f[c].val[a].indexOf("="),k=f[c].val[a].substr(0,g),g=f[c].val[a].substr(g+1),g=g.replace(/^[\s]*[\"\']*|[\"\']*[\s]*$/g,""),"text"===k?n.text=g:n.vars.push([k,g]);d=d.match(x);k=[];if(d){for(a=0;a<d.length;a++)k.push(d[a].substr(1));n.className=k.join(" ")}}f[c]=n}a=f}n=[];"undefined"===typeof p&&(p=1);d=[];f=[];k=[];g=document.createElement("div");for(c=l=0;c<a.length;c++){if("+"==a[c].tag)f=
4
- k.slice(),--l;else{for(m=0;m<p;m++)if("input"==a[c].tag){e=[];e.push("<"+a[c].tag);a[c].id&&e.push("id='"+a[c].id+"'");a[c].className&&(e.push("class='"+a[c].className),c+1===a.length&&e.push(lastClass),e.push("'"));if(a[c].vars)for(var q=0;q<a[c].vars.length;q++)e.push(a[c].vars[q][0]+"='"+a[c].vars[q][1]+"'");a[c].text&&e.push("value='"+a[c].text+"'");e.push("/>");k[m]=f[m];f[m]?(f[m].innerHTML+=e.join(" "),f[m]=f[m].lastChild):(g.innerHTML=e.join(" "),f[m]=g.removeChild(g.firstChild))}else{e=document.createElement(a[c].tag);
5
- if(a[c].vars)for(q=0;q<a[c].vars.length;q++)console.log(a[c].tag,a[c].vars[q]),e.setAttribute(a[c].vars[q][0],a[c].vars[q][1]);a[c].id&&(e.id=a[c].id);a[c].className&&(e.className=a[c].className);a[c].text&&e.appendChild(document.createTextNode(a[c].text));k[m]=f[m];f[m]=f[m]?f[m].appendChild(e):e}l++||Array.prototype.push.apply(d,f)}n=b.merge(n,f)}return b(d)},w=function(h,p,a){for(var d=h.match(/%[^%]*%/g)||[],f=[],k=0;k<p.length;k++){for(var g=h,l=0;l<d.length;l++)var c=d[l].substr(1,d[l].length-
6
- 2),g=g.replace(d[l],p[k][c]);f=b.merge(f,v(g,a))}return b(f)};b.jseldom=function(h){if(2==arguments.length&&b.isPlainObject(arguments[1]))return w.apply(this,[arguments[0],[arguments[1]]]);if(1==arguments.length||2==arguments.length&&!b.isArray(arguments[1]))return v.apply(this,arguments);if(2==arguments.length)return w.apply(this,arguments)};var r=!1;b.fn.yith_wcan_ajax_filters=function(h,p){h.preventDefault();var a=p.href,d=b(p);if("undefined"==typeof a&&d.parents().hasClass("price_slider_wrapper")){d.parents("form");
7
- var f=window.location,k=f.origin+f.pathname,g=k!=f.href,l=b(".price_slider_amount #min_price").val(),c=b(".price_slider_amount #max_price").val(),a=f.href;1==g&&(a=u(a,"min_price"),a=u(a,"max_price"));a=a+(k==a?"?":"&")+b.param({min_price:l,max_price:c})}"select"==d.data("type")&&(d.parents("div.yith-woo-ajax-navigation").find("a.yit-wcan-select-open").removeClass("active"),d.parent().find("div.yith-wcan-select-wrapper").animate({visibility:"hidden",opacity:0},300));b(yith_wcan.container).html("").addClass("yith-wcan-loading");
8
- b(document).trigger("yith-wcan-ajax-loading");"undefined"!=typeof yith_wcan_frontend&&b(yith_wcan.container).css("backgroundImage","url("+yith_wcan_frontend.loader_url+")");b(yith_wcan.pagination).hide();b(yith_wcan.result_count).hide();0!=r&&(r.abort(),r=!1,console.log("here"));r=b.ajax({url:a,success:function(c){r=!1;b(yith_wcan.container).removeClass("yith-wcan-loading");0<b(c).find(yith_wcan.container).length?b(".yit-wcan-container").html(b(c).find(yith_wcan.container)):b(".yit-wcan-container").html(b(c).find(".woocommerce-info"));
9
- 0<b(c).find(yith_wcan.pagination).length?(0==b(yith_wcan.pagination).length&&b.jseldom(yith_wcan.pagination).insertAfter(b(yith_wcan.container)),b(yith_wcan.pagination).html(b(c).find(yith_wcan.pagination).html()).show()):b(yith_wcan.pagination).empty();0<b(c).find(yith_wcan.result_count).length&&b(yith_wcan.result_count).html(b(c).find(yith_wcan.result_count).html()).show();b(".yith-woo-ajax-navigation").add(".yith-wcan-sort-by").add(".yith-wcan-stock-on-sale").add(".yith-wcan-list-price-filter").each(function(){var a=
10
- b(this),d=a.attr("id");a.html(b(c).find("#"+d).html());""==a.text()?a.hide():a.show()});navigator.userAgent.match(/msie/i)||window.history.pushState({pageTitle:c.pageTitle},"",a);b(document).trigger("ready");b(document).trigger("yith-wcan-ajax-filtered")}})};b(yith_wcan.container).wrap('<div class="yit-wcan-container"></div>');b(".woocommerce-info").wrap('<div class="yit-wcan-container"></div>');b(document).on("click",".yith-wcan a",function(h){b(this).yith_wcan_ajax_filters(h,this)});var t=function(){b("div.yith-wcan-select-wrapper").animate({visibility:"hidden",
11
- opacity:0},0);b("a.yit-wcan-select-open").removeClass("active")};b(document).on("click","a.yit-wcan-select-open.active",function(h){h.preventDefault();b(this).parent().find("div.yith-wcan-select-wrapper").css("z-index","-1").animate({visibility:"hidden",opacity:0},300);b(this).parent().find("a.yit-wcan-select-open").removeClass("active")});b(document).on("click","a.yit-wcan-select-open:not(.active)",function(h){h.preventDefault();b(this).parent().find("div.yith-wcan-select-wrapper").css("z-index",
12
- "1").animate({visibility:"visible",opacity:1},300);b(this).parent().find("a.yit-wcan-select-open").addClass("active")});b(document).on("ready yith-wcan-ajax-filtered",function(){b("div.yith-wcan-select-wrapper ul.yith-wcan-select li.chosen");t();b("div.yith-wcan-select-wrapper").each(function(){var h="";b(this).find("ul.yith-wcan-select li.chosen").each(function(){h+=b(this).text()+", "});h=h.substring(0,h.length-2);""!=h&&b(this).parent().find("a.yit-wcan-select-open").text(h)})});b(document).on("ready",
13
- t);b("body").on("click",function(h){b(h.target).hasClass("yit-wcan-select-open")||t()})});
1
+ jQuery(function(a){function u(a,p){return a.replace(new RegExp("[?&]"+p+"=[^&#]*(#.*)?$"),"$1").replace(new RegExp("([?&])"+p+"=[^&]*&"),"$1")}var x=/(?!(\[))(\.)[^.#[]*/g,y=/(#)[^.#[]*/,z=/^[\w]+/,A=/^[\w]+$/,v=function(h,p){var b=[];if(A.test(h))b=[{tag:h}];else{for(var b=h,d={sel:[],val:[]},f=[],k=!1,g="",l=[],c=0,m=b.length;c<m;c++){var e=b.charAt(c);if(k)if("\\"===e&&c+1<b.length)l.push(b.charAt(++c));else if(g===e)g="",l.push(e);else if(("'"===e||'"'===e)&&""===g)g=e,l.push(e);else if("]"===
2
+ e&&""===g)d.val.push(l.join("")),l=[],k=!1;else{if("]"!==e||""!==g)""===g&&","===e?(d.val.push(l.join("")),l=[]):l.push(e)}else"\\"===e&&c+1<b.length?k&&l.push(b.charAt(++c)):"["===e&&""===g?k=!0:" "===e||"+"===e?(d.sel=d.sel.join(""),f.push(d),"+"===e&&f.push({sel:"+",val:""}),d={sel:[],val:[]}):" "!==e&&"]"!==e&&d.sel.push(e)}if(0!=d.sel.length||0!=d.val.length)d.sel=d.sel.join(""),f.push(d);for(c=0;c<f.length;c++){d=f[c].sel;if("+"===d)n.tag=d;else{var n=[];n.tag=z.exec(d);n.id=y.exec(d);n.id&&
3
+ a.isArray(n.id)&&(n.id=n.id[0].substr(1));n.tag||(n.tag="div");n.vars=[];for(b=0;b<f[c].val.length;b++)g=f[c].val[b].indexOf("="),k=f[c].val[b].substr(0,g),g=f[c].val[b].substr(g+1),g=g.replace(/^[\s]*[\"\']*|[\"\']*[\s]*$/g,""),"text"===k?n.text=g:n.vars.push([k,g]);d=d.match(x);k=[];if(d){for(b=0;b<d.length;b++)k.push(d[b].substr(1));n.className=k.join(" ")}}f[c]=n}b=f}n=[];"undefined"===typeof p&&(p=1);d=[];f=[];k=[];g=document.createElement("div");for(c=l=0;c<b.length;c++){if("+"==b[c].tag)f=
4
+ k.slice(),--l;else{for(m=0;m<p;m++)if("input"==b[c].tag){e=[];e.push("<"+b[c].tag);b[c].id&&e.push("id='"+b[c].id+"'");b[c].className&&(e.push("class='"+b[c].className),c+1===b.length&&e.push(lastClass),e.push("'"));if(b[c].vars)for(var q=0;q<b[c].vars.length;q++)e.push(b[c].vars[q][0]+"='"+b[c].vars[q][1]+"'");b[c].text&&e.push("value='"+b[c].text+"'");e.push("/>");k[m]=f[m];f[m]?(f[m].innerHTML+=e.join(" "),f[m]=f[m].lastChild):(g.innerHTML=e.join(" "),f[m]=g.removeChild(g.firstChild))}else{e=document.createElement(b[c].tag);
5
+ if(b[c].vars)for(q=0;q<b[c].vars.length;q++)console.log(b[c].tag,b[c].vars[q]),e.setAttribute(b[c].vars[q][0],b[c].vars[q][1]);b[c].id&&(e.id=b[c].id);b[c].className&&(e.className=b[c].className);b[c].text&&e.appendChild(document.createTextNode(b[c].text));k[m]=f[m];f[m]=f[m]?f[m].appendChild(e):e}l++||Array.prototype.push.apply(d,f)}n=a.merge(n,f)}return a(d)},w=function(h,p,b){for(var d=h.match(/%[^%]*%/g)||[],f=[],k=0;k<p.length;k++){for(var g=h,l=0;l<d.length;l++)var c=d[l].substr(1,d[l].length-
6
+ 2),g=g.replace(d[l],p[k][c]);f=a.merge(f,v(g,b))}return a(f)};a.jseldom=function(h){if(2==arguments.length&&a.isPlainObject(arguments[1]))return w.apply(this,[arguments[0],[arguments[1]]]);if(1==arguments.length||2==arguments.length&&!a.isArray(arguments[1]))return v.apply(this,arguments);if(2==arguments.length)return w.apply(this,arguments)};var r=!1;a.fn.yith_wcan_ajax_filters=function(h,p){h.preventDefault();var b=p.href,d=a(p),f=d.hasClass("yith-wcan-reset-navigation");if("undefined"==typeof b&&
7
+ d.parents().hasClass("price_slider_wrapper")){d.parents("form");var k=window.location,g=k.origin+k.pathname,l=g!=k.href,c=a(".price_slider_amount #min_price").val(),m=a(".price_slider_amount #max_price").val(),b=k.href;1==l&&(b=u(b,"min_price"),b=u(b,"max_price"));b=b+(g==b?"?":"&")+a.param({min_price:c,max_price:m})}"select"==d.data("type")&&(d.parents("div.yith-woo-ajax-navigation").find("a.yit-wcan-select-open").removeClass("active"),d.parent().find("div.yith-wcan-select-wrapper").animate({visibility:"hidden",
8
+ opacity:0},300));a(yith_wcan.container).html("").addClass("yith-wcan-loading");a(document).trigger("yith-wcan-ajax-loading");"undefined"!=typeof yith_wcan_frontend&&a(yith_wcan.container).css("backgroundImage","url("+yith_wcan_frontend.loader_url+")");a(yith_wcan.pagination).hide();a(yith_wcan.result_count).hide();0!=r&&(r.abort(),r=!1);r=a.ajax({url:b,success:function(c){r=!1;a(yith_wcan.container).removeClass("yith-wcan-loading");0<a(c).find(yith_wcan.container).length?a(".yit-wcan-container").html(a(c).find(yith_wcan.container)):
9
+ a(".yit-wcan-container").html(a(c).find(".woocommerce-info"));0<a(c).find(yith_wcan.pagination).length?(0==a(yith_wcan.pagination).length&&a.jseldom(yith_wcan.pagination).insertAfter(a(yith_wcan.container)),a(yith_wcan.pagination).html(a(c).find(yith_wcan.pagination).html()).show()):a(yith_wcan.pagination).empty();0<a(c).find(yith_wcan.result_count).length&&a(yith_wcan.result_count).html(a(c).find(yith_wcan.result_count).html()).show();a(".yith-woo-ajax-navigation").add(".yith-wcan-sort-by").add(".yith-wcan-stock-on-sale").add(".yith-wcan-list-price-filter").each(function(){var b=
10
+ a(this),d=b.attr("id");b.html(a(c).find("#"+d).html());""==b.text()?b.hide():b.show()});navigator.userAgent.match(/msie/i)||window.history.pushState({pageTitle:c.pageTitle},"",b);a(document).trigger("ready");a(document).trigger("yith-wcan-ajax-filtered");if(f){var d=parseInt(a(yith_wcan.wc_price_slider.min_price).data("min")),g=parseInt(a(yith_wcan.wc_price_slider.max_price).data("max"));a(yith_wcan.wc_price_slider.wrapper).slider("values",[d,g]);a(document.body).trigger("price_slider_slide",[d,g]);
11
+ a(document).trigger("yith-wcan-ajax-reset-filtered")}}})};a(yith_wcan.container).wrap('<div class="yit-wcan-container"></div>');a(".woocommerce-info").wrap('<div class="yit-wcan-container"></div>');a(document).on("click",".yith-wcan a",function(h){a(this).yith_wcan_ajax_filters(h,this)});var t=function(){a("div.yith-wcan-select-wrapper").animate({visibility:"hidden",opacity:0},0);a("a.yit-wcan-select-open").removeClass("active")};a(document).on("click","a.yit-wcan-select-open.active",function(h){h.preventDefault();
12
+ a(this).parent().find("div.yith-wcan-select-wrapper").css("z-index","-1").animate({visibility:"hidden",opacity:0},300);a(this).parent().find("a.yit-wcan-select-open").removeClass("active")});a(document).on("click","a.yit-wcan-select-open:not(.active)",function(h){h.preventDefault();a(this).parent().find("div.yith-wcan-select-wrapper").css("z-index","1").animate({visibility:"visible",opacity:1},300);a(this).parent().find("a.yit-wcan-select-open").addClass("active")});a(document).on("ready yith-wcan-ajax-filtered",
13
+ function(){a("div.yith-wcan-select-wrapper ul.yith-wcan-select li.chosen");t();a("div.yith-wcan-select-wrapper").each(function(){var h="";a(this).find("ul.yith-wcan-select li.chosen").each(function(){h+=a(this).text()+", "});h=h.substring(0,h.length-2);""!=h&&a(this).parent().find("a.yit-wcan-select-open").text(h)})});a(document).on("ready",t);a("body").on("click",function(h){a(h.target).hasClass("yit-wcan-select-open")||t()})});
modules/yith-woocommerce-ajax-navigation/includes/class.yith-wcan-frontend.php CHANGED
@@ -67,6 +67,11 @@ if ( ! class_exists( 'YITH_WCAN_Frontend' ) ) {
67
  'container' => yith_wcan_get_option( 'yith_wcan_ajax_shop_container', '.products' ),
68
  'pagination' => yith_wcan_get_option( 'yith_wcan_ajax_shop_pagination', 'nav.woocommerce-pagination' ),
69
  'result_count' => yith_wcan_get_option( 'yith_wcan_ajax_shop_result_container', '.woocommerce-result-count' ),
 
 
 
 
 
70
  )
71
  );
72
 
67
  'container' => yith_wcan_get_option( 'yith_wcan_ajax_shop_container', '.products' ),
68
  'pagination' => yith_wcan_get_option( 'yith_wcan_ajax_shop_pagination', 'nav.woocommerce-pagination' ),
69
  'result_count' => yith_wcan_get_option( 'yith_wcan_ajax_shop_result_container', '.woocommerce-result-count' ),
70
+ 'wc_price_slider' => array(
71
+ 'wrapper' => '.price_slider',
72
+ 'min_price' => '.price_slider_amount #min_price',
73
+ 'max_price' => '.price_slider_amount #max_price',
74
+ )
75
  )
76
  );
77
 
modules/yith-woocommerce-ajax-navigation/includes/functions.yith-wcan.php CHANGED
@@ -191,6 +191,10 @@ if ( ! function_exists( 'yit_reorder_terms_by_parent' ) ) {
191
  $terms_count ++;
192
  }
193
 
 
 
 
 
194
  /* Reorder Therms */
195
  $terms_count = 0;
196
  $terms = array();
@@ -202,6 +206,10 @@ if ( ! function_exists( 'yit_reorder_terms_by_parent' ) ) {
202
  /* The term as child */
203
  if ( array_key_exists( $term->term_id, $child_terms ) ) {
204
 
 
 
 
 
205
  foreach ( $child_terms[$term->term_id] as $child_term ) {
206
  $terms_count ++;
207
  $terms[$terms_count] = $child_term;
@@ -228,6 +236,7 @@ if ( ! function_exists( 'yit_get_terms' ) ) {
228
 
229
  $exclude = apply_filters( 'yith_wcan_exclude_terms', array(), $instance );
230
  $include = apply_filters( 'yith_wcan_include_terms', array(), $instance );
 
231
 
232
  switch ( $case ) {
233
 
@@ -236,7 +245,11 @@ if ( ! function_exists( 'yit_get_terms' ) ) {
236
  break;
237
 
238
  case 'hierarchical':
239
- $terms = yit_reorder_terms_by_parent( get_terms( $taxonomy, array( 'hide_empty' => true, 'exclude' => $exclude ) ) );
 
 
 
 
240
  break;
241
 
242
  case 'parent' :
@@ -252,12 +265,19 @@ if ( ! function_exists( 'yit_get_terms' ) ) {
252
  $terms = get_terms( $taxonomy, $args );
253
 
254
  if ( 'hierarchical' == $instance['display'] ) {
255
- $terms = yit_reorder_terms_by_parent( $terms );
 
 
 
256
  }
257
  break;
258
  }
259
 
260
- return $terms;
 
 
 
 
261
  }
262
  }
263
 
@@ -441,7 +461,7 @@ if ( ! function_exists( 'yit_get_woocommerce_layered_nav_link' ) ) {
441
  */
442
  function yit_get_woocommerce_layered_nav_link() {
443
 
444
- if ( defined( 'SHOP_IS_ON_FRONT' ) || ( is_shop() && ! is_product_category() ) || is_product_taxonomy() ) {
445
  $return = get_post_type_archive_link( 'product' );
446
  return apply_filters( 'yith_wcan_untrailingslashit', true ) ? untrailingslashit( $return ) : $return;
447
  }
@@ -500,4 +520,20 @@ if ( ! function_exists( 'yit_wcan_get_product_taxonomy' ) ) {
500
  return array_merge( $product_taxonomies, apply_filters( 'yith_wcan_product_taxonomy_type', array() ) );
501
  }
502
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
503
  }
191
  $terms_count ++;
192
  }
193
 
194
+ if( 'product' == yith_wcan_get_option( 'yith_wcan_ajax_shop_terms_order', 'alphabetical' ) && ! is_wp_error( $parent_terms ) ){
195
+ usort( $parent_terms, 'yit_terms_sort' );
196
+ }
197
+
198
  /* Reorder Therms */
199
  $terms_count = 0;
200
  $terms = array();
206
  /* The term as child */
207
  if ( array_key_exists( $term->term_id, $child_terms ) ) {
208
 
209
+ if( 'product' == yith_wcan_get_option( 'yith_wcan_ajax_shop_terms_order', 'alphabetical' ) && ! is_wp_error( $child_terms[$term->term_id] ) ){
210
+ usort( $child_terms[$term->term_id], 'yit_terms_sort' );
211
+ }
212
+
213
  foreach ( $child_terms[$term->term_id] as $child_term ) {
214
  $terms_count ++;
215
  $terms[$terms_count] = $child_term;
236
 
237
  $exclude = apply_filters( 'yith_wcan_exclude_terms', array(), $instance );
238
  $include = apply_filters( 'yith_wcan_include_terms', array(), $instance );
239
+ $reordered = false;
240
 
241
  switch ( $case ) {
242
 
245
  break;
246
 
247
  case 'hierarchical':
248
+ $terms = get_terms( $taxonomy, array( 'hide_empty' => true, 'exclude' => $exclude ) );
249
+ if( ! in_array( $instance['type'], apply_filters( 'yith_wcan_display_type_list', array( 'list' ) ) ) ) {
250
+ $terms = yit_reorder_terms_by_parent( $terms );
251
+ $reordered = true;
252
+ }
253
  break;
254
 
255
  case 'parent' :
265
  $terms = get_terms( $taxonomy, $args );
266
 
267
  if ( 'hierarchical' == $instance['display'] ) {
268
+ if( ! in_array( $instance['type'], apply_filters( 'yith_wcan_display_type_list', array( 'list' ) ) ) ) {
269
+ $terms = yit_reorder_terms_by_parent( $terms );
270
+ $reordered = true;
271
+ }
272
  }
273
  break;
274
  }
275
 
276
+ if( 'product' == yith_wcan_get_option( 'yith_wcan_ajax_shop_terms_order', 'alphabetical' ) && 'hierarchical' != $instance['display'] && ! is_wp_error( $terms ) && ! $reordered ){
277
+ usort( $terms, 'yit_terms_sort' );
278
+ }
279
+
280
+ return apply_filters( 'yith_wcan_get_terms_list', $terms, $taxonomy, $instance );
281
  }
282
  }
283
 
461
  */
462
  function yit_get_woocommerce_layered_nav_link() {
463
 
464
+ if ( defined( 'SHOP_IS_ON_FRONT' ) || ( is_shop() && ! is_product_category() && ! is_product_taxonomy() ) ) {
465
  $return = get_post_type_archive_link( 'product' );
466
  return apply_filters( 'yith_wcan_untrailingslashit', true ) ? untrailingslashit( $return ) : $return;
467
  }
520
  return array_merge( $product_taxonomies, apply_filters( 'yith_wcan_product_taxonomy_type', array() ) );
521
  }
522
 
523
+ }
524
+
525
+ if( ! function_exists( 'yit_terms_sort' ) ){
526
+
527
+ function yit_terms_sort( $a, $b ){
528
+ $result = 0;
529
+ if ( $a->count < $b->count ) {
530
+ $result = 1;
531
+ }
532
+
533
+ elseif ( $a->count > $b->count ) {
534
+ $result = - 1;
535
+ }
536
+ return $result;
537
+ }
538
+
539
  }
modules/yith-woocommerce-ajax-navigation/init.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: YITH WooCommerce Ajax Product Filter
4
  * Plugin URI: http://yithemes.com/
5
  * Description: YITH WooCommerce Ajax Product Filter offers the perfect way to filter all the products of your shop.
6
- * Version: 2.7.0
7
  * Author: yithemes
8
  * Author URI: http://yithemes.com/
9
  * Text Domain: yith_wc_ajxnav
@@ -65,7 +65,7 @@ if ( defined( 'YITH_WCAN_VERSION' ) ) {
65
  ! defined( 'YITH_WCAN' ) && define( 'YITH_WCAN', true );
66
  ! defined( 'YITH_WCAN_URL' ) && define( 'YITH_WCAN_URL', plugin_dir_url( __FILE__ ) );
67
  ! defined( 'YITH_WCAN_DIR' ) && define( 'YITH_WCAN_DIR', plugin_dir_path( __FILE__ ) );
68
- ! defined( 'YITH_WCAN_VERSION' ) && define( 'YITH_WCAN_VERSION', '2.7.0' );
69
  ! defined( 'YITH_WCAN_FREE_INIT') && define( 'YITH_WCAN_FREE_INIT', plugin_basename( __FILE__ ) );
70
  ! defined( 'YITH_WCAN_FILE' ) && define( 'YITH_WCAN_FILE', __FILE__ );
71
 
3
  * Plugin Name: YITH WooCommerce Ajax Product Filter
4
  * Plugin URI: http://yithemes.com/
5
  * Description: YITH WooCommerce Ajax Product Filter offers the perfect way to filter all the products of your shop.
6
+ * Version: 2.7.2
7
  * Author: yithemes
8
  * Author URI: http://yithemes.com/
9
  * Text Domain: yith_wc_ajxnav
65
  ! defined( 'YITH_WCAN' ) && define( 'YITH_WCAN', true );
66
  ! defined( 'YITH_WCAN_URL' ) && define( 'YITH_WCAN_URL', plugin_dir_url( __FILE__ ) );
67
  ! defined( 'YITH_WCAN_DIR' ) && define( 'YITH_WCAN_DIR', plugin_dir_path( __FILE__ ) );
68
+ ! defined( 'YITH_WCAN_VERSION' ) && define( 'YITH_WCAN_VERSION', '2.7.2' );
69
  ! defined( 'YITH_WCAN_FREE_INIT') && define( 'YITH_WCAN_FREE_INIT', plugin_basename( __FILE__ ) );
70
  ! defined( 'YITH_WCAN_FILE' ) && define( 'YITH_WCAN_FILE', __FILE__ );
71
 
modules/yith-woocommerce-ajax-navigation/widgets/class.yith-wcan-navigation-widget.php CHANGED
@@ -12,6 +12,7 @@ if ( ! defined( 'YITH_WCAN' ) ) {
12
  } // Exit if accessed directly
13
 
14
  if ( ! class_exists( 'YITH_WCAN_Navigation_Widget' ) ) {
 
15
  /**
16
  * YITH WooCommerce Ajax Navigation Widget
17
  *
@@ -19,10 +20,20 @@ if ( ! class_exists( 'YITH_WCAN_Navigation_Widget' ) ) {
19
  */
20
  class YITH_WCAN_Navigation_Widget extends WP_Widget {
21
 
 
 
 
22
  public $brand_taxonomy = '';
23
 
 
 
 
 
 
24
  function __construct() {
25
- $widget_ops = array( 'classname' => 'yith-woo-ajax-navigation woocommerce widget_layered_nav', 'description' => __( 'Filter the product list without reloading the page', 'yith-woocommerce-ajax-navigation' ) );
 
 
26
  $control_ops = array( 'width' => 400, 'height' => 350 );
27
  add_action('wp_ajax_yith_wcan_select_type', array( $this, 'ajax_print_terms') );
28
  parent::__construct( 'yith-woo-ajax-navigation', _x( 'YITH WooCommerce Ajax Product Filter', 'Admin: Widget Title', 'yith-woocommerce-ajax-navigation' ), $widget_ops, $control_ops );
@@ -66,20 +77,19 @@ if ( ! class_exists( 'YITH_WCAN_Navigation_Widget' ) ) {
66
  $taxonomy = $woocommerce->attribute_taxonomy_name( $instance['attribute'] );
67
  }
68
 
 
 
 
69
  if ( ! taxonomy_exists( $taxonomy ) ) {
70
  return;
71
  }
72
 
73
- $taxonomy = apply_filters( 'yith_wcan_get_terms_params', $taxonomy, $instance, 'taxonomy_name' );
74
- $terms_type_list = apply_filters( 'yith_wcan_get_terms_params', $terms_type_list, $instance, 'terms_type' );
75
-
76
  $terms = yit_get_terms( $terms_type_list, $taxonomy, $instance );
77
 
78
  if ( count( $terms ) > 0 ) {
79
-
80
  ob_start();
81
 
82
- $found = false;
83
 
84
  echo $before_widget;
85
 
@@ -92,7 +102,7 @@ if ( ! class_exists( 'YITH_WCAN_Navigation_Widget' ) ) {
92
  // Force found when option is selected - do not force found on taxonomy attributes
93
  if ( ! $_attributes_array || ! is_tax( $_attributes_array ) ) {
94
  if ( is_array( $_chosen_attributes ) && array_key_exists( $taxonomy, $_chosen_attributes ) ) {
95
- $found = true;
96
  }
97
  }
98
 
@@ -127,7 +137,7 @@ if ( ! class_exists( 'YITH_WCAN_Navigation_Widget' ) ) {
127
  }
128
 
129
  if ( $count > 0 && $current_term !== $term_param ) {
130
- $found = true;
131
  }
132
 
133
  if ( ( ( $terms_type_list == 'hierarchical' || ( $terms_type_list == 'tags' && $instance['display'] == 'hierarchical' ) ) || ! yit_term_has_child( $term, $taxonomy ) ) && $count == 0 && ! $option_is_set ) {
@@ -146,7 +156,7 @@ if ( ! class_exists( 'YITH_WCAN_Navigation_Widget' ) ) {
146
  $count = sizeof( array_intersect( $_products_in_term, $woocommerce->query->unfiltered_product_ids ) );
147
 
148
  if ( $count > 0 ) {
149
- $found = true;
150
  }
151
 
152
  }
@@ -206,12 +216,32 @@ if ( ! class_exists( 'YITH_WCAN_Navigation_Widget' ) ) {
206
  }
207
 
208
  if ( isset( $_GET[ $this->brand_taxonomy ] ) ) {
209
- $brands = get_term_by( 'name', $_GET[ $this->brand_taxonomy ], $this->brand_taxonomy );
210
  if( $brands->term_id != $term->term_id ){
211
- $link = add_query_arg( $this->brand_taxonomy, urlencode( $brands->name ), $link );
212
  }
213
  }
214
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
215
  $check_for_current_widget = isset( $_chosen_attributes[$taxonomy] ) && is_array( $_chosen_attributes[$taxonomy]['terms'] ) && in_array( $term->term_id, $_chosen_attributes[$taxonomy]['terms'] );
216
 
217
  // Current Filter = this widget
@@ -226,7 +256,7 @@ if ( ! class_exists( 'YITH_WCAN_Navigation_Widget' ) ) {
226
  }
227
 
228
  else {
229
- $class = ( ( $terms_type_list == 'hierarchical' || ( $terms_type_list == 'tags' && $instance['display'] == 'hierarchical' ) ) && yit_term_is_child( $term ) ) ? "class='{$is_child_class}'" : '';
230
  $link = add_query_arg( $arg, implode( apply_filters( 'yith_wcan_list_filter_operator', ',', $display_type ), $current_filter ), $link );
231
  }
232
 
@@ -300,7 +330,7 @@ if ( ! class_exists( 'YITH_WCAN_Navigation_Widget' ) ) {
300
  }
301
 
302
  if ( $count > 0 && $current_term !== $term->term_id ) {
303
- $found = true;
304
  }
305
 
306
  if ( ( $terms_type_list != 'hierarchical' || ! yit_term_has_child( $term, $taxonomy ) ) && $count == 0 && ! $option_is_set ) {
@@ -319,7 +349,7 @@ if ( ! class_exists( 'YITH_WCAN_Navigation_Widget' ) ) {
319
  $count = sizeof( array_intersect( $_products_in_term, $woocommerce->query->unfiltered_product_ids ) );
320
 
321
  if ( $count > 0 ) {
322
- $found = true;
323
  }
324
 
325
  }
@@ -381,10 +411,20 @@ if ( ! class_exists( 'YITH_WCAN_Navigation_Widget' ) ) {
381
  if ( isset( $_GET[ $this->brand_taxonomy ] ) ) {
382
  $brands = get_term_by( 'name', $_GET[ $this->brand_taxonomy ], $this->brand_taxonomy );
383
  if( $brands->term_id != $term->term_id ){
384
- $link = add_query_arg( $this->brand_taxonomy, urlencode( $brands->name ), $link );
385
  }
386
  }
387
 
 
 
 
 
 
 
 
 
 
 
388
  // Current Filter = this widget
389
  if ( isset( $_chosen_attributes[$taxonomy] ) && is_array( $_chosen_attributes[$taxonomy]['terms'] ) && in_array( $term->term_id, $_chosen_attributes[$taxonomy]['terms'] ) ) {
390
 
@@ -465,7 +505,7 @@ if ( ! class_exists( 'YITH_WCAN_Navigation_Widget' ) ) {
465
  }
466
 
467
  if ( $count > 0 && $current_term !== $term->term_id ) {
468
- $found = true;
469
  }
470
 
471
  if ( $count == 0 && ! $option_is_set ) {
@@ -484,7 +524,7 @@ if ( ! class_exists( 'YITH_WCAN_Navigation_Widget' ) ) {
484
  $count = sizeof( array_intersect( $_products_in_term, $woocommerce->query->unfiltered_product_ids ) );
485
 
486
  if ( $count > 0 ) {
487
- $found = true;
488
  }
489
 
490
  }
@@ -546,10 +586,20 @@ if ( ! class_exists( 'YITH_WCAN_Navigation_Widget' ) ) {
546
  if ( isset( $_GET[ $this->brand_taxonomy ] ) ) {
547
  $brands = get_term_by( 'name', $_GET[ $this->brand_taxonomy ], $this->brand_taxonomy );
548
  if( $brands->term_id != $term->term_id ){
549
- $link = add_query_arg( $this->brand_taxonomy, urlencode( $brands->name ), $link );
550
  }
551
  }
552
 
 
 
 
 
 
 
 
 
 
 
553
  // Current Filter = this widget
554
  if ( isset( $_chosen_attributes[$taxonomy] ) && is_array( $_chosen_attributes[$taxonomy]['terms'] ) && in_array( $term->term_id, $_chosen_attributes[$taxonomy]['terms'] ) ) {
555
 
@@ -628,7 +678,7 @@ if ( ! class_exists( 'YITH_WCAN_Navigation_Widget' ) ) {
628
  }
629
 
630
  if ( $count > 0 && $current_term !== $term->term_id ) {
631
- $found = true;
632
  }
633
 
634
  if ( $count == 0 && ! $option_is_set ) {
@@ -647,7 +697,7 @@ if ( ! class_exists( 'YITH_WCAN_Navigation_Widget' ) ) {
647
  $count = sizeof( array_intersect( $_products_in_term, $woocommerce->query->unfiltered_product_ids ) );
648
 
649
  if ( $count > 0 ) {
650
- $found = true;
651
  }
652
 
653
  }
@@ -709,10 +759,20 @@ if ( ! class_exists( 'YITH_WCAN_Navigation_Widget' ) ) {
709
  if ( isset( $_GET[ $this->brand_taxonomy ] ) ) {
710
  $brands = get_term_by( 'name', $_GET[ $this->brand_taxonomy ], $this->brand_taxonomy );
711
  if( $brands->term_id != $term->term_id ){
712
- $link = add_query_arg( $this->brand_taxonomy, urlencode( $brands->name ), $link );
713
  }
714
  }
715
 
 
 
 
 
 
 
 
 
 
 
716
  // Current Filter = this widget
717
  if ( isset( $_chosen_attributes[$taxonomy] ) && is_array( $_chosen_attributes[$taxonomy]['terms'] ) && in_array( $term->term_id, $_chosen_attributes[$taxonomy]['terms'] ) ) {
718
 
@@ -770,7 +830,7 @@ if ( ! class_exists( 'YITH_WCAN_Navigation_Widget' ) ) {
770
 
771
  echo $after_widget;
772
 
773
- if ( ! apply_filters( 'yith_wcan_found_taxonomy', $found ) ) {
774
  ob_end_clean();
775
  echo substr( $before_widget, 0, strlen( $before_widget ) - 1 ) . ' style="display:none">' . $after_widget;
776
  }
12
  } // Exit if accessed directly
13
 
14
  if ( ! class_exists( 'YITH_WCAN_Navigation_Widget' ) ) {
15
+
16
  /**
17
  * YITH WooCommerce Ajax Navigation Widget
18
  *
20
  */
21
  class YITH_WCAN_Navigation_Widget extends WP_Widget {
22
 
23
+ /**
24
+ * YITH Brands Taxonomy Name
25
+ */
26
  public $brand_taxonomy = '';
27
 
28
+ /**
29
+ * Use to print or not widget
30
+ */
31
+ public $found = false;
32
+
33
  function __construct() {
34
+ $classname = 'yith-woocommerce-ajax-product-filter yith-woo-ajax-navigation woocommerce widget_layered_nav';
35
+ $classname .= 'checkboxes' == yith_wcan_get_option( 'yith_wcan_ajax_shop_filter_style', 'standard' ) ? ' with-checkbox' : '';
36
+ $widget_ops = array( 'classname' => $classname, 'description' => __( 'Filter the product list without reloading the page', 'yith-woocommerce-ajax-navigation' ) );
37
  $control_ops = array( 'width' => 400, 'height' => 350 );
38
  add_action('wp_ajax_yith_wcan_select_type', array( $this, 'ajax_print_terms') );
39
  parent::__construct( 'yith-woo-ajax-navigation', _x( 'YITH WooCommerce Ajax Product Filter', 'Admin: Widget Title', 'yith-woocommerce-ajax-navigation' ), $widget_ops, $control_ops );
77
  $taxonomy = $woocommerce->attribute_taxonomy_name( $instance['attribute'] );
78
  }
79
 
80
+ $taxonomy = apply_filters( 'yith_wcan_get_terms_params', $taxonomy, $instance, 'taxonomy_name' );
81
+ $terms_type_list = apply_filters( 'yith_wcan_get_terms_params', $terms_type_list, $instance, 'terms_type' );
82
+
83
  if ( ! taxonomy_exists( $taxonomy ) ) {
84
  return;
85
  }
86
 
 
 
 
87
  $terms = yit_get_terms( $terms_type_list, $taxonomy, $instance );
88
 
89
  if ( count( $terms ) > 0 ) {
 
90
  ob_start();
91
 
92
+ $this->found = false;
93
 
94
  echo $before_widget;
95
 
102
  // Force found when option is selected - do not force found on taxonomy attributes
103
  if ( ! $_attributes_array || ! is_tax( $_attributes_array ) ) {
104
  if ( is_array( $_chosen_attributes ) && array_key_exists( $taxonomy, $_chosen_attributes ) ) {
105
+ $this->found = true;
106
  }
107
  }
108
 
137
  }
138
 
139
  if ( $count > 0 && $current_term !== $term_param ) {
140
+ $this->found = true;
141
  }
142
 
143
  if ( ( ( $terms_type_list == 'hierarchical' || ( $terms_type_list == 'tags' && $instance['display'] == 'hierarchical' ) ) || ! yit_term_has_child( $term, $taxonomy ) ) && $count == 0 && ! $option_is_set ) {
156
  $count = sizeof( array_intersect( $_products_in_term, $woocommerce->query->unfiltered_product_ids ) );
157
 
158
  if ( $count > 0 ) {
159
+ $this->found = true;
160
  }
161
 
162
  }
216
  }
217
 
218
  if ( isset( $_GET[ $this->brand_taxonomy ] ) ) {
219
+ $brands = get_term_by( 'slug', $_GET[ $this->brand_taxonomy ], $this->brand_taxonomy );
220
  if( $brands->term_id != $term->term_id ){
221
+ $link = add_query_arg( $this->brand_taxonomy, urlencode( $brands->slug ), $link );
222
  }
223
  }
224
 
225
+ if( isset( $_GET['product_cat'] ) ){
226
+ $categories_filter_operator = 'and' == $query_type ? '+' : ',';
227
+ $_chosen_categories = explode( $categories_filter_operator, urlencode( $_GET['product_cat'] ) );
228
+ $link = add_query_arg(
229
+ 'product_cat',
230
+ implode( apply_filters( 'yith_wcan_categories_filter_operator', $categories_filter_operator, $display_type ), $_chosen_categories ),
231
+ $link
232
+ );
233
+ }
234
+
235
+ if( isset( $_GET['product_cat'] ) ){
236
+ $categories_filter_operator = 'and' == $query_type ? '+' : ',';
237
+ $_chosen_categories = explode( $categories_filter_operator, urlencode( $_GET['product_cat'] ) );
238
+ $link = add_query_arg(
239
+ 'product_cat',
240
+ implode( apply_filters( 'yith_wcan_categories_filter_operator', $categories_filter_operator, $display_type ), $_chosen_categories ),
241
+ $link
242
+ );
243
+ }
244
+
245
  $check_for_current_widget = isset( $_chosen_attributes[$taxonomy] ) && is_array( $_chosen_attributes[$taxonomy]['terms'] ) && in_array( $term->term_id, $_chosen_attributes[$taxonomy]['terms'] );
246
 
247
  // Current Filter = this widget
256
  }
257
 
258
  else {
259
+ $class = ( ( $terms_type_list == 'hierarchical' || $terms_type_list == 'tags' ) && yit_term_is_child( $term ) ) ? "class='{$is_child_class}'" : '';
260
  $link = add_query_arg( $arg, implode( apply_filters( 'yith_wcan_list_filter_operator', ',', $display_type ), $current_filter ), $link );
261
  }
262
 
330
  }
331
 
332
  if ( $count > 0 && $current_term !== $term->term_id ) {
333
+ $this->found = true;
334
  }
335
 
336
  if ( ( $terms_type_list != 'hierarchical' || ! yit_term_has_child( $term, $taxonomy ) ) && $count == 0 && ! $option_is_set ) {
349
  $count = sizeof( array_intersect( $_products_in_term, $woocommerce->query->unfiltered_product_ids ) );
350
 
351
  if ( $count > 0 ) {
352
+ $this->found = true;
353
  }
354
 
355
  }
411
  if ( isset( $_GET[ $this->brand_taxonomy ] ) ) {
412
  $brands = get_term_by( 'name', $_GET[ $this->brand_taxonomy ], $this->brand_taxonomy );
413
  if( $brands->term_id != $term->term_id ){
414
+ $link = add_query_arg( $this->brand_taxonomy, urlencode( $brands->slug ), $link );
415
  }
416
  }
417
 
418
+ if( isset( $_GET['product_cat'] ) ){
419
+ $categories_filter_operator = 'and' == $query_type ? '+' : ',';
420
+ $_chosen_categories = explode( $categories_filter_operator, urlencode( $_GET['product_cat'] ) );
421
+ $link = add_query_arg(
422
+ 'product_cat',
423
+ implode( apply_filters( 'yith_wcan_categories_filter_operator', $categories_filter_operator, $display_type ), $_chosen_categories ),
424
+ $link
425
+ );
426
+ }
427
+
428
  // Current Filter = this widget
429
  if ( isset( $_chosen_attributes[$taxonomy] ) && is_array( $_chosen_attributes[$taxonomy]['terms'] ) && in_array( $term->term_id, $_chosen_attributes[$taxonomy]['terms'] ) ) {
430
 
505
  }
506
 
507
  if ( $count > 0 && $current_term !== $term->term_id ) {
508
+ $this->found = true;
509
  }
510
 
511
  if ( $count == 0 && ! $option_is_set ) {
524
  $count = sizeof( array_intersect( $_products_in_term, $woocommerce->query->unfiltered_product_ids ) );
525
 
526
  if ( $count > 0 ) {
527
+ $this->found = true;
528
  }
529
 
530
  }
586
  if ( isset( $_GET[ $this->brand_taxonomy ] ) ) {
587
  $brands = get_term_by( 'name', $_GET[ $this->brand_taxonomy ], $this->brand_taxonomy );
588
  if( $brands->term_id != $term->term_id ){
589
+ $link = add_query_arg( $this->brand_taxonomy, urlencode( $brands->slug ), $link );
590
  }
591
  }
592
 
593
+ if( isset( $_GET['product_cat'] ) ){
594
+ $categories_filter_operator = 'and' == $query_type ? '+' : ',';
595
+ $_chosen_categories = explode( $categories_filter_operator, urlencode( $_GET['product_cat'] ) );
596
+ $link = add_query_arg(
597
+ 'product_cat',
598
+ implode( apply_filters( 'yith_wcan_categories_filter_operator', $categories_filter_operator, $display_type ), $_chosen_categories ),
599
+ $link
600
+ );
601
+ }
602
+
603
  // Current Filter = this widget
604
  if ( isset( $_chosen_attributes[$taxonomy] ) && is_array( $_chosen_attributes[$taxonomy]['terms'] ) && in_array( $term->term_id, $_chosen_attributes[$taxonomy]['terms'] ) ) {
605
 
678
  }
679
 
680
  if ( $count > 0 && $current_term !== $term->term_id ) {
681
+ $this->found = true;
682
  }
683
 
684
  if ( $count == 0 && ! $option_is_set ) {
697
  $count = sizeof( array_intersect( $_products_in_term, $woocommerce->query->unfiltered_product_ids ) );
698
 
699
  if ( $count > 0 ) {
700
+ $this->found = true;
701
  }
702
 
703
  }
759
  if ( isset( $_GET[ $this->brand_taxonomy ] ) ) {
760
  $brands = get_term_by( 'name', $_GET[ $this->brand_taxonomy ], $this->brand_taxonomy );
761
  if( $brands->term_id != $term->term_id ){
762
+ $link = add_query_arg( $this->brand_taxonomy, urlencode( $brands->slug ), $link );
763
  }
764
  }
765
 
766
+ if( isset( $_GET['product_cat'] ) ){
767
+ $categories_filter_operator = 'and' == $query_type ? '+' : ',';
768
+ $_chosen_categories = explode( $categories_filter_operator, urlencode( $_GET['product_cat'] ) );
769
+ $link = add_query_arg(
770
+ 'product_cat',
771
+ implode( apply_filters( 'yith_wcan_categories_filter_operator', $categories_filter_operator, $display_type ), $_chosen_categories ),
772
+ $link
773
+ );
774
+ }
775
+
776
  // Current Filter = this widget
777
  if ( isset( $_chosen_attributes[$taxonomy] ) && is_array( $_chosen_attributes[$taxonomy]['terms'] ) && in_array( $term->term_id, $_chosen_attributes[$taxonomy]['terms'] ) ) {
778
 
830
 
831
  echo $after_widget;
832
 
833
+ if ( ! $this->found ) {
834
  ob_end_clean();
835
  echo substr( $before_widget, 0, strlen( $before_widget ) - 1 ) . ' style="display:none">' . $after_widget;
836
  }
modules/yith-woocommerce-ajax-navigation/widgets/class.yith-wcan-reset-navigation-widget.php CHANGED
@@ -20,7 +20,7 @@ if ( ! class_exists( 'YITH_WCAN_Reset_Navigation_Widget' ) ) {
20
  class YITH_WCAN_Reset_Navigation_Widget extends WP_Widget {
21
 
22
  function __construct() {
23
- $widget_ops = array( 'classname' => 'yith-woo-ajax-reset-navigation yith-woo-ajax-navigation woocommerce widget_layered_nav', 'description' => __( 'Reset all filters set by YITH WooCommerce Ajax Product Filter', 'yith-woocommerce-ajax-navigation' ) );
24
  $control_ops = array( 'width' => 400, 'height' => 350 );
25
  parent::__construct( 'yith-woo-ajax-reset-navigation', __( 'YITH WooCommerce Ajax Reset Filter', 'yith-woocommerce-ajax-navigation' ), $widget_ops, $control_ops );
26
  }
@@ -47,14 +47,25 @@ if ( ! class_exists( 'YITH_WCAN_Reset_Navigation_Widget' ) ) {
47
  $title = isset( $instance['title'] ) ? apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base ) : '';
48
  $label = isset( $instance['label'] ) ? apply_filters( 'yith-wcan-reset-navigation-label', $instance['label'], $instance, $this->id_base ) : '';
49
 
 
 
50
  //clean the url
51
- $link = yit_curPageURL();
52
- foreach ( (array) $_chosen_attributes as $taxonomy => $data ) {
53
- $taxonomy_filter = str_replace( 'pa_', '', $taxonomy );
54
- $link = remove_query_arg( 'filter_' . $taxonomy_filter, $link );
 
 
 
 
 
 
 
 
 
 
55
  }
56
 
57
- $link = remove_query_arg( array( 'min_price', 'max_price', 'product_tag' ), $link );
58
 
59
  $link = apply_filters( 'yith_woocommerce_reset_filter_link', $link );
60
 
20
  class YITH_WCAN_Reset_Navigation_Widget extends WP_Widget {
21
 
22
  function __construct() {
23
+ $widget_ops = array( 'classname' => 'yith-woocommerce-ajax-product-filter yith-woo-ajax-reset-navigation yith-woo-ajax-navigation woocommerce widget_layered_nav', 'description' => __( 'Reset all filters set by YITH WooCommerce Ajax Product Filter', 'yith-woocommerce-ajax-navigation' ) );
24
  $control_ops = array( 'width' => 400, 'height' => 350 );
25
  parent::__construct( 'yith-woo-ajax-reset-navigation', __( 'YITH WooCommerce Ajax Reset Filter', 'yith-woocommerce-ajax-navigation' ), $widget_ops, $control_ops );
26
  }
47
  $title = isset( $instance['title'] ) ? apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base ) : '';
48
  $label = isset( $instance['label'] ) ? apply_filters( 'yith-wcan-reset-navigation-label', $instance['label'], $instance, $this->id_base ) : '';
49
 
50
+ $link = '';
51
+
52
  //clean the url
53
+ if( ! isset( $_GET['source_id'] ) ){
54
+ $link = yit_curPageURL();
55
+ foreach ( (array) $_chosen_attributes as $taxonomy => $data ) {
56
+ $taxonomy_filter = str_replace( 'pa_', '', $taxonomy );
57
+ $link = remove_query_arg( 'filter_' . $taxonomy_filter, $link );
58
+ }
59
+
60
+ $link = remove_query_arg( array( 'min_price', 'max_price', 'product_tag' ), $link );
61
+ }
62
+
63
+ else{
64
+ //Start filter from Product category Page
65
+ $term = get_term_by( 'id', $_GET['source_id'], 'product_cat' );
66
+ $link = get_term_link( $term, $term->taxonomy );
67
  }
68
 
 
69
 
70
  $link = apply_filters( 'yith_woocommerce_reset_filter_link', $link );
71
 
modules/yith-woocommerce-colors-labels-variations/assets/js/frontend.js CHANGED
@@ -26,26 +26,6 @@
26
  var t = $(this),
27
  type = $(this).data('type');
28
 
29
- // if( type != 'select' ) {
30
- // if( t.attr('name') == last_change ) {
31
- //
32
- // select_box = t.data('last_content');
33
- // select_box = select_box.insertAfter(t);
34
- // select_box.find('.select_option')
35
- // .off('click')
36
- // .on('click', function(e){
37
- // if( $(this).hasClass('selected') ) {
38
- // t.val('').change();
39
- // t.removeClass('selected');
40
- // } else {
41
- // var value = $(this).data('value');
42
- // var option = $(this).data('option');
43
- //
44
- // t.append(option).val(option.val()).change();
45
- // t.append(option).val(option.val()).change(); //do not remove the duplicated line
46
- // }
47
- // });
48
- // } else {
49
  var select_box = $('<div />', {
50
  'class': 'select_box_' + type + ' select_box ' + t.attr('name')
51
  }).insertAfter(t);
@@ -90,8 +70,6 @@
90
  }
91
  }
92
  });
93
- // }
94
- //}
95
  }).filter(function () {
96
  return $(this).data('type') != 'select'
97
  }).hide();
@@ -103,9 +81,14 @@
103
 
104
  select.each(function () {
105
  var value = $(this).val();
106
- var options = $(this).siblings('.select_box')
107
- .find('.select_option')
108
- .removeClass('selected');
 
 
 
 
 
109
 
110
  if (value) {
111
  options
26
  var t = $(this),
27
  type = $(this).data('type');
28
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  var select_box = $('<div />', {
30
  'class': 'select_box_' + type + ' select_box ' + t.attr('name')
31
  }).insertAfter(t);
70
  }
71
  }
72
  });
 
 
73
  }).filter(function () {
74
  return $(this).data('type') != 'select'
75
  }).hide();
81
 
82
  select.each(function () {
83
  var value = $(this).val();
84
+ var options = $(this).next('.select_box'); // get next elem
85
+
86
+ // else get siblings
87
+ if( ! options.length ){
88
+ options = $(this).siblings('.select_box');
89
+ }
90
+ // reset class
91
+ options = options.find('.select_option').removeClass('selected');
92
 
93
  if (value) {
94
  options
modules/yith-woocommerce-colors-labels-variations/assets/js/frontend.min.js CHANGED
@@ -1,5 +1 @@
1
- (function(b,k,e){b.fn.yith_wccl=function(){var a=this;a.data("last_change");var c=a.find(".variations select");this.clean=function(){a.find(".select_box").remove();return this};this.generateOutput=function(){c.each(function(){var a=b(this),g=b(this).data("type"),d=b("<div />",{"class":"select_box_"+g+" select_box "+a.attr("name")}).insertAfter(a);a.removeData("last_content");a.find("option").each(function(){if(b(this).data("value")){var c="select_option_"+g+" select_option",f=b(this).data("value"),
2
- e=b(this),c=b("<div/>",{"class":c}).data("value",b(this).attr("value")).data("option",e.clone(!0)).appendTo(d).off("click").on("click",function(c){b(this).hasClass("selected")?a.val("").change():(c.preventDefault(),a.val(e.val()).change())});"colorpicker"==g?c.append(b("<span/>",{css:{background:f}})):"image"==g?c.append(b("<img/>",{src:f})):"label"==g&&c.append(b("<span/>",{text:f}))}})}).filter(function(){return"select"!=b(this).data("type")}).hide();return a};this.onSelect=function(){c.each(function(){var a=
3
- b(this).val(),c=b(this).siblings(".select_box").find(".select_option").removeClass("selected");a&&c.filter(function(){return b(this).data("value")==a}).addClass("selected")});return a};this.updateOptions=function(){"undefined"==typeof yith_wccl_arg||yith_wccl_arg.is_wc24||a.find(".variations select").each(function(a,c){var d=b(this),e=d.val(),f=d.data("active_options")?d.data("active_options"):d.data("attribute_options");if(!f)return!1;""!=e?b.each(f,function(a,b){d.append(b)}):d.data("active_options",
4
- d.find("option").get())});return a};return this.updateOptions().clean().generateOutput().onSelect()};jQuery(function(a){var b=a(".variations_form"),h=b.find(".variations select");a(e).on("yith_wccl_change check_variations",b,function(){a(this).yith_wccl()}).trigger("yith_wccl_change");a(e).on("change",h,function(){b.data("last_change",a(this).attr("name"));a(this).data("last_content",a(this).siblings(".select_box").clone(!0))});a(e).on("click",".reset_variations",function(){h.removeData("last_content");
5
- b.removeData("last_change")});h.trigger("focusin")})})(jQuery,window,document);
1
+ !function(t,e,n){t.fn.yith_wccl=function(){var e=this,n=(e.data("last_change"),e.find(".variations select"));return this.clean=function(){return e.find(".select_box").remove(),this},this.generateOutput=function(){return n.each(function(){var e=t(this),n=t(this).data("type"),a=t("<div />",{"class":"select_box_"+n+" select_box "+e.attr("name")}).insertAfter(e);e.removeData("last_content"),e.find("option").each(function(){if(t(this).data("value")){var i="select_option_"+n+" select_option",c=t(this).data("value"),s=t(this),o=t("<div/>",{"class":i}).data("value",t(this).attr("value")).data("option",s.clone(!0)).appendTo(a).off("click").on("click",function(n){t(this).hasClass("selected")?e.val("").change():(n.preventDefault(),e.val(s.val()).change())});"colorpicker"==n?o.append(t("<span/>",{css:{background:c}})):"image"==n?o.append(t("<img/>",{src:c})):"label"==n&&o.append(t("<span/>",{text:c}))}})}).filter(function(){return"select"!=t(this).data("type")}).hide(),e},this.onSelect=function(){return n.each(function(){var e=t(this).val(),n=t(this).next(".select_box");n.length||(n=t(this).siblings(".select_box")),n=n.find(".select_option").removeClass("selected"),e&&n.filter(function(){return t(this).data("value")==e}).addClass("selected")}),e},this.updateOptions=function(){return"undefined"==typeof yith_wccl_arg||yith_wccl_arg.is_wc24||e.find(".variations select").each(function(e,n){var a=t(this),i=a.val(),c=a.data("active_options")?a.data("active_options"):a.data("attribute_options");return c?void(""!=i?t.each(c,function(t,e){a.append(e)}):a.data("active_options",a.find("option").get())):!1}),e},this.updateOptions().clean().generateOutput().onSelect()},jQuery(function(t){var e=t(".variations_form"),a=e.find(".variations select");t(n).on("yith_wccl_change check_variations",e,function(){t(this).yith_wccl()}).trigger("yith_wccl_change"),t(n).on("change",a,function(){e.data("last_change",t(this).attr("name")),t(this).data("last_content",t(this).siblings(".select_box").clone(!0))}),t(n).on("click",".reset_variations",function(){a.removeData("last_content"),e.removeData("last_change")}),a.trigger("focusin")})}(jQuery,window,document);
 
 
 
 
modules/yith-woocommerce-colors-labels-variations/changelog.txt CHANGED
@@ -1,3 +1,8 @@
 
 
 
 
 
1
  === 1.2.2 ===
2
  Updated: Plugin Core
3
 
1
+ === 1.2.3 ===
2
+ Added: Ready to WooCommerce 2.5
3
+ Updated: Template file variable-wccl.php
4
+ Updated: Plugin Core
5
+
6
  === 1.2.2 ===
7
  Updated: Plugin Core
8
 
modules/yith-woocommerce-colors-labels-variations/init.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: YITH WooCommerce Colors and Labels Variations
4
  * Plugin URI: http://yithemes.com/
5
  * Description: YITH WooCommerce Ajax Colors and Labels Variations replaces the dropdown select of your variable products with Colors and Labels
6
- * Version: 1.2.2
7
  * Author: Yithemes
8
  * Author URI: http://yithemes.com/
9
  * Text Domain: ywcl
@@ -11,7 +11,7 @@
11
  *
12
  * @author Yithemes
13
  * @package YITH WooCommerce Colors and Labels Variations
14
- * @version 1.2.2
15
  */
16
  /* Copyright 2013 Your Inspiration Themes (email : plugins@yithemes.com)
17
 
@@ -63,7 +63,7 @@ if ( ! defined( 'YITH_WCCL_DIR' ) ) {
63
  define( 'YITH_WCCL_DIR', plugin_dir_path( __FILE__ ) );
64
  }
65
  if ( ! defined( 'YITH_WCCL_VERSION' ) ) {
66
- define( 'YITH_WCCL_VERSION', '1.2.2' );
67
  }
68
 
69
  function yith_wccl_constructor() {
3
  * Plugin Name: YITH WooCommerce Colors and Labels Variations
4
  * Plugin URI: http://yithemes.com/
5
  * Description: YITH WooCommerce Ajax Colors and Labels Variations replaces the dropdown select of your variable products with Colors and Labels
6
+ * Version: 1.2.3
7
  * Author: Yithemes
8
  * Author URI: http://yithemes.com/
9
  * Text Domain: ywcl
11
  *
12
  * @author Yithemes
13
  * @package YITH WooCommerce Colors and Labels Variations
14
+ * @version 1.2.3
15
  */
16
  /* Copyright 2013 Your Inspiration Themes (email : plugins@yithemes.com)
17
 
63
  define( 'YITH_WCCL_DIR', plugin_dir_path( __FILE__ ) );
64
  }
65
  if ( ! defined( 'YITH_WCCL_VERSION' ) ) {
66
+ define( 'YITH_WCCL_VERSION', '1.2.3' );
67
  }
68
 
69
  function yith_wccl_constructor() {
modules/yith-woocommerce-colors-labels-variations/templates/single-product/add-to-cart/variable-wccl.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * @author Your Inspiration Themes
6
  * @package YITH WooCommerce Colors and Labels Variations
7
- * @version 1.1.4
8
  */
9
 
10
  if ( ! defined( 'ABSPATH' ) ) {
@@ -30,8 +30,9 @@ if ( function_exists('wc_attribute_label') ) {
30
 
31
  $attribute_keys = array_keys( $attributes );
32
 
33
- ?>
34
- <form class="variations_form cart" method="post" enctype='multipart/form-data' data-product_id="<?php echo absint( $product->id ); ?>" data-product_variations="<?php echo esc_attr( json_encode( $available_variations ) ) ?>">
 
35
  <?php do_action( 'woocommerce_before_variations_form' ); ?>
36
 
37
  <?php if ( empty( $available_variations ) && false !== $available_variations ) : ?>
@@ -111,13 +112,12 @@ $attribute_keys = array_keys( $attributes );
111
  <div class="single_variation_wrap" style="display:none;">
112
  <?php
113
  /**
114
- * woocommerce_before_single_variation Hook
115
  */
116
  do_action( 'woocommerce_before_single_variation' );
117
 
118
  /**
119
  * woocommerce_single_variation hook. Used to output the cart button and placeholder for variation data.
120
- *
121
  * @since 2.4.0
122
  * @hooked woocommerce_single_variation - 10 Empty div for variation data.
123
  * @hooked woocommerce_single_variation_add_to_cart_button - 20 Qty and cart button.
@@ -125,19 +125,16 @@ $attribute_keys = array_keys( $attributes );
125
  do_action( 'woocommerce_single_variation' );
126
 
127
  /**
128
- * woocommerce_after_single_variation Hook
129
  */
130
  do_action( 'woocommerce_after_single_variation' );
131
  ?>
132
-
133
  </div>
134
 
135
  <?php do_action('woocommerce_after_add_to_cart_button'); ?>
136
-
137
  <?php endif; ?>
138
 
139
  <?php do_action( 'woocommerce_after_variations_form' ); ?>
140
-
141
  </form>
142
 
143
  <?php do_action('woocommerce_after_add_to_cart_form'); ?>
4
  *
5
  * @author Your Inspiration Themes
6
  * @package YITH WooCommerce Colors and Labels Variations
7
+ * @version 1.2.3
8
  */
9
 
10
  if ( ! defined( 'ABSPATH' ) ) {
30
 
31
  $attribute_keys = array_keys( $attributes );
32
 
33
+ do_action( 'woocommerce_before_add_to_cart_form' ); ?>
34
+
35
+ <form class="variations_form cart" method="post" enctype='multipart/form-data' data-product_id="<?php echo absint( $product->id ); ?>" data-product_variations="<?php echo htmlspecialchars( json_encode( $available_variations ) ) ?>" data-wccl="true">
36
  <?php do_action( 'woocommerce_before_variations_form' ); ?>
37
 
38
  <?php if ( empty( $available_variations ) && false !== $available_variations ) : ?>
112
  <div class="single_variation_wrap" style="display:none;">
113
  <?php
114
  /**
115
+ * woocommerce_before_single_variation Hook.
116
  */
117
  do_action( 'woocommerce_before_single_variation' );
118
 
119
  /**
120
  * woocommerce_single_variation hook. Used to output the cart button and placeholder for variation data.
 
121
  * @since 2.4.0
122
  * @hooked woocommerce_single_variation - 10 Empty div for variation data.
123
  * @hooked woocommerce_single_variation_add_to_cart_button - 20 Qty and cart button.
125
  do_action( 'woocommerce_single_variation' );
126
 
127
  /**
128
+ * woocommerce_after_single_variation Hook.
129
  */
130
  do_action( 'woocommerce_after_single_variation' );
131
  ?>
 
132
  </div>
133
 
134
  <?php do_action('woocommerce_after_add_to_cart_button'); ?>
 
135
  <?php endif; ?>
136
 
137
  <?php do_action( 'woocommerce_after_variations_form' ); ?>
 
138
  </form>
139
 
140
  <?php do_action('woocommerce_after_add_to_cart_form'); ?>
modules/yith-woocommerce-order-tracking/class.yith-woocommerce-order-tracking.php CHANGED
@@ -411,7 +411,7 @@ if (!class_exists('YITH_WooCommerce_Order_Tracking')) {
411
  */
412
  public function plugin_fw_loader()
413
  {
414
- if ( !defined('YIT_CORE_PLUGIN')) {
415
  require_once('plugin-fw/yit-plugin.php');
416
  }
417
  }
411
  */
412
  public function plugin_fw_loader()
413
  {
414
+ if ( !defined('YIT_CORE_PLUGIN') ) {
415
  require_once('plugin-fw/yit-plugin.php');
416
  }
417
  }
modules/yith-woocommerce-product-vendors/assets/css/admin.css CHANGED
@@ -84,7 +84,7 @@ select#tax-input-yith_shop_vendor {
84
 
85
  .taxonomy-yith_shop_vendor table.wp-list-table .column-name,
86
  .taxonomy-yith_shop_vendor table.wp-list-table .column-description,
87
- .taxonomy-yith_shop_vendor table.wp-list-table .column-slug
88
  .taxonomy-yith_shop_vendor table.wp-list-table .column-name,
89
  .taxonomy-yith_shop_vendor table.wp-list-table .check-column,
90
  .taxonomy-yith_shop_vendor table.wp-list-table .enable_sales,
@@ -359,7 +359,7 @@ input#yith_vendor_vat.valid {
359
  }
360
 
361
  #vendor-details .form-field textarea:not(.wp-editor-area){
362
- width: 40%;
363
  resize: none;
364
  }
365
 
@@ -490,4 +490,10 @@ span.vacation-date-field {
490
 
491
  .vendor_limited_access #adminmenu #menu-posts-shop_order .wp-submenu li:last-child {
492
  display: none;
 
 
 
 
 
 
493
  }
84
 
85
  .taxonomy-yith_shop_vendor table.wp-list-table .column-name,
86
  .taxonomy-yith_shop_vendor table.wp-list-table .column-description,
87
+ .taxonomy-yith_shop_vendor table.wp-list-table .column-slug,
88
  .taxonomy-yith_shop_vendor table.wp-list-table .column-name,
89
  .taxonomy-yith_shop_vendor table.wp-list-table .check-column,
90
  .taxonomy-yith_shop_vendor table.wp-list-table .enable_sales,
359
  }
360
 
361
  #vendor-details .form-field textarea:not(.wp-editor-area){
362
+ width: 55%;
363
  resize: none;
364
  }
365
 
490
 
491
  .vendor_limited_access #adminmenu #menu-posts-shop_order .wp-submenu li:last-child {
492
  display: none;
493
+ }
494
+
495
+ @media (max-width: 1200px) {
496
+ #vendor-details .form-field textarea:not(.wp-editor-area) {
497
+ width: auto;
498
+ }
499
  }
modules/yith-woocommerce-product-vendors/assets/images/29-bg.png ADDED
Binary file
modules/yith-woocommerce-product-vendors/assets/images/29-icon.png ADDED
Binary file
modules/yith-woocommerce-product-vendors/assets/images/29.png ADDED
Binary file
modules/yith-woocommerce-product-vendors/assets/images/30-bg.png ADDED
Binary file
modules/yith-woocommerce-product-vendors/assets/images/30-icon.png ADDED
Binary file
modules/yith-woocommerce-product-vendors/assets/images/30.png ADDED
Binary file
modules/yith-woocommerce-product-vendors/assets/images/31-bg.png ADDED
Binary file
modules/yith-woocommerce-product-vendors/assets/images/31-icon.png ADDED
Binary file
modules/yith-woocommerce-product-vendors/assets/images/31.png ADDED
Binary file
modules/yith-woocommerce-product-vendors/assets/js/admin.js CHANGED
@@ -86,7 +86,9 @@
86
  $('#yith_wpv_vendors_my_account_registration').yith_wpv_option_deps( '#yith_wpv_vendors_my_account_registration_auto_approve', 'checkbox', undefined, false );
87
  vendor_order_refund.yith_wpv_option_deps( '#yith_wpv_vendors_option_order_synchronization', 'checkbox', undefined, false );
88
  vendor_order_refund.yith_wpv_option_deps( '#yith_wpv_vendors_option_order_refund_synchronization', 'checkbox', undefined, false );
 
89
  $('#yith_vendors_show_gravatar_image').yith_wpv_option_deps( '#yith_vendors_gravatar_image_size', 'select', 'disabled', false );
 
90
 
91
  // Vendor taxonomy table
92
  var tax_table = $( '#the-list');
@@ -112,7 +114,7 @@
112
  taxonomy_table_col( tax_table );
113
 
114
  // Vendor taxonomy bulk actions
115
- if( $body.hasClass( 'taxonomy-yith_shop_vendor' ) ){
116
  var bulk_action_1 = $('#bulk-action-selector-top'),
117
  bulk_action_2 = $('#bulk-action-selector-bottom'),
118
  action_approve = '<option value="approve">' + yith_vendors.approve + '</option>',
86
  $('#yith_wpv_vendors_my_account_registration').yith_wpv_option_deps( '#yith_wpv_vendors_my_account_registration_auto_approve', 'checkbox', undefined, false );
87
  vendor_order_refund.yith_wpv_option_deps( '#yith_wpv_vendors_option_order_synchronization', 'checkbox', undefined, false );
88
  vendor_order_refund.yith_wpv_option_deps( '#yith_wpv_vendors_option_order_refund_synchronization', 'checkbox', undefined, false );
89
+ vendor_order_refund.yith_wpv_option_deps( '#yith_wpv_vendors_option_order_hide_customer', 'checkbox', undefined, false );
90
  $('#yith_vendors_show_gravatar_image').yith_wpv_option_deps( '#yith_vendors_gravatar_image_size', 'select', 'disabled', false );
91
+ $('#yith_wpv_vendors_option_editor_management').yith_wpv_option_deps( '#yith_wpv_vendors_option_editor_media', 'checkbox', undefined, false );
92
 
93
  // Vendor taxonomy table
94
  var tax_table = $( '#the-list');
114
  taxonomy_table_col( tax_table );
115
 
116
  // Vendor taxonomy bulk actions
117
+ if( $body.hasClass( 'taxonomy-yith_shop_vendor' ) && typeof yith_vendors != 'undefined' ){
118
  var bulk_action_1 = $('#bulk-action-selector-top'),
119
  bulk_action_2 = $('#bulk-action-selector-bottom'),
120
  action_approve = '<option value="approve">' + yith_vendors.approve + '</option>',
modules/yith-woocommerce-product-vendors/includes/class.yith-commissions.php CHANGED
@@ -769,8 +769,11 @@ if ( ! class_exists( 'YITH_Commissions' ) ) {
769
  // Check
770
  $get_item_amount = 'yes' == get_option( 'yith_wpv_include_coupon' ) ? 'get_item_total' : 'get_item_subtotal';
771
 
 
 
 
772
  // Retrieve the real amount of single item, with right discounts applied and without taxes
773
- $line_total = (float) $order->$get_item_amount( $item, false, false ) * $item['qty'];
774
 
775
  // If total is 0 after discounts then go no further
776
  if ( ! $line_total ) {
769
  // Check
770
  $get_item_amount = 'yes' == get_option( 'yith_wpv_include_coupon' ) ? 'get_item_total' : 'get_item_subtotal';
771
 
772
+ // Get item amount params
773
+ $include_tax = apply_filters( 'yith_wcmv_include_tax_in_commissions', 'no' == get_option( 'yith_wpv_include_tax', 'no' ) ? false : true );
774
+
775
  // Retrieve the real amount of single item, with right discounts applied and without taxes
776
+ $line_total = (float) $order->$get_item_amount( $item, $include_tax, false ) * $item['qty'];
777
 
778
  // If total is 0 after discounts then go no further
779
  if ( ! $line_total ) {
modules/yith-woocommerce-product-vendors/includes/class.yith-orders.php CHANGED
@@ -56,9 +56,6 @@ if ( ! class_exists ( 'YITH_Orders' ) ) {
56
 
57
  add_filter ( 'woocommerce_attribute_label', array ( $this, 'commissions_attribute_label' ), 10, 3 );
58
 
59
- /* Single Order Page for Vendor */
60
- add_filter ( 'wc_order_is_editable', array ( $this, 'vendor_single_order_page' ) );
61
-
62
  /* Order Item Meta */
63
  add_action ( 'woocommerce_hidden_order_itemmeta', array ( $this, 'hidden_order_itemmeta' ) );
64
 
@@ -69,6 +66,8 @@ if ( ! class_exists ( 'YITH_Orders' ) ) {
69
  /* Order MetaBoxes */
70
  add_action ( 'add_meta_boxes', array ( $this, 'add_meta_boxes' ), 30 );
71
 
 
 
72
  $sync_enabled = get_option ( 'yith_wpv_vendors_option_order_synchronization', 'yes' );
73
 
74
  if ( $sync_enabled ) {
@@ -240,7 +239,7 @@ if ( ! class_exists ( 'YITH_Orders' ) ) {
240
  }
241
  }
242
  }
243
-
244
  //Calculate Discount
245
  $discount += ( $item[ 'line_subtotal' ] - $item[ 'line_total' ] );
246
  }
@@ -1675,5 +1674,48 @@ if ( ! class_exists ( 'YITH_Orders' ) ) {
1675
 
1676
  return $product_by_vendor;
1677
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1678
  }
1679
  }
56
 
57
  add_filter ( 'woocommerce_attribute_label', array ( $this, 'commissions_attribute_label' ), 10, 3 );
58
 
 
 
 
59
  /* Order Item Meta */
60
  add_action ( 'woocommerce_hidden_order_itemmeta', array ( $this, 'hidden_order_itemmeta' ) );
61
 
66
  /* Order MetaBoxes */
67
  add_action ( 'add_meta_boxes', array ( $this, 'add_meta_boxes' ), 30 );
68
 
69
+ add_filter( 'yith_wcmv_shop_order_request', array( $this, 'vendor_order_list' ) );
70
+
71
  $sync_enabled = get_option ( 'yith_wpv_vendors_option_order_synchronization', 'yes' );
72
 
73
  if ( $sync_enabled ) {
239
  }
240
  }
241
  }
242
+
243
  //Calculate Discount
244
  $discount += ( $item[ 'line_subtotal' ] - $item[ 'line_total' ] );
245
  }
1674
 
1675
  return $product_by_vendor;
1676
  }
1677
+
1678
+ /**
1679
+ * Check if the current page is an order details page for vendor
1680
+ *
1681
+ * @param mixed $vendor The vendor object
1682
+ *
1683
+ * @author Andrea Grillo <andrea.grillo@yithemes.com>
1684
+ * @since 1.6.0
1685
+ * @return bool
1686
+ */
1687
+ public function is_vendor_order_details_page( $vendor = false ){
1688
+ global $theorder;
1689
+ if( ! $vendor ){
1690
+ $vendor = yith_get_vendor ( 'current', 'user' );
1691
+ }
1692
+ $is_ajax = defined ( 'DOING_AJAX' ) && DOING_AJAX;
1693
+ $is_order_details = is_admin () && 'shop_order' == get_current_screen ()->id;
1694
+
1695
+ return $vendor->is_valid() && $vendor->has_limited_access() && $is_order_details && ! $is_ajax;
1696
+ }
1697
+
1698
+ /**
1699
+ * Only show vendor's order
1700
+ *
1701
+ * @author Andrea Grillo <andrea.grillo@yithemes.com>
1702
+ *
1703
+ * @param arr $request Current request
1704
+ *
1705
+ * @return arr Modified request
1706
+ * @since 1.6
1707
+ */
1708
+ public function vendor_order_list( $query ) {
1709
+ $vendor = yith_get_vendor( 'current', 'user' );
1710
+
1711
+ if ( is_admin() && $vendor->is_valid() && $vendor->has_limited_access() ) {
1712
+ //Remove Exclude Order Comments to vendor admin dashboard
1713
+ remove_filter( 'comments_clauses', array( 'WC_Comments', 'exclude_order_comments' ), 10, 1 );
1714
+
1715
+ $query['post__in'] = $vendor->get_orders( 'suborder' );
1716
+ $query['author'] = absint( $vendor->get_owner() );
1717
+ }
1718
+ return $query;
1719
+ }
1720
  }
1721
  }
modules/yith-woocommerce-product-vendors/includes/class.yith-vendors-admin.php CHANGED
@@ -894,9 +894,18 @@ if ( !class_exists( 'YITH_Vendors_Admin' ) ) {
894
  * @use woocommerce_prevent_admin_access hooks
895
  */
896
  public function prevent_admin_access( $prevent_access ) {
 
897
  $vendor = yith_get_vendor( 'current', 'user' );
898
 
899
- return $vendor->is_valid() && $vendor->has_limited_access() && $vendor->is_user_admin() ? false : $prevent_access;
 
 
 
 
 
 
 
 
900
  }
901
 
902
  /**
894
  * @use woocommerce_prevent_admin_access hooks
895
  */
896
  public function prevent_admin_access( $prevent_access ) {
897
+ global $current_user;
898
  $vendor = yith_get_vendor( 'current', 'user' );
899
 
900
+ if( $vendor->is_valid() && $vendor->has_limited_access() && $vendor->is_user_admin() ){
901
+ $prevent_access = false;
902
+ }
903
+
904
+ elseif( ! $vendor->is_valid() && in_array( YITH_Vendors()->get_role_name(), $current_user->roles ) ){
905
+ $prevent_access = true;
906
+ }
907
+
908
+ return $prevent_access;
909
  }
910
 
911
  /**
modules/yith-woocommerce-product-vendors/init.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://yithemes.com/themes/plugins/yith-woocommerce-product-vendors/
5
  Description: YITH WooCommerce Multi Vendor is a plugin explicitly developed to switch your website into a platform hosting more than one shop.
6
  Author: yithemes
7
  Text Domain: yith_wc_product_vendors
8
- Version: 1.8.1
9
  Author URI: http://yithemes.com/
10
  */
11
 
@@ -46,7 +46,7 @@ if ( ! function_exists( 'WC' ) ) {
46
  if ( defined( 'YITH_WPV_VERSION' ) ) {
47
  return;
48
  } else {
49
- define( 'YITH_WPV_VERSION', '1.8.1' );
50
  }
51
 
52
  if ( ! defined( 'YITH_WPV_DB_VERSION' ) ) {
5
  Description: YITH WooCommerce Multi Vendor is a plugin explicitly developed to switch your website into a platform hosting more than one shop.
6
  Author: yithemes
7
  Text Domain: yith_wc_product_vendors
8
+ Version: 1.8.2
9
  Author URI: http://yithemes.com/
10
  */
11
 
46
  if ( defined( 'YITH_WPV_VERSION' ) ) {
47
  return;
48
  } else {
49
+ define( 'YITH_WPV_VERSION', '1.8.2' );
50
  }
51
 
52
  if ( ! defined( 'YITH_WPV_DB_VERSION' ) ) {
modules/yith-woocommerce-product-vendors/plugin-options/vendors-options.php CHANGED
@@ -35,18 +35,18 @@ return apply_filters( 'yith_wpv_panel_vendors_options', array(
35
  'type' => 'sectionend',
36
  ),
37
 
38
- 'vendors_order_start' => array(
39
  'type' => 'sectionstart',
40
  ),
41
 
42
- 'vendors_order_title' => array(
43
  'title' => __( 'Order management', 'yith_wc_product_vendors' ),
44
  'type' => 'title',
45
  'desc' => '',
46
  'id' => 'yith_wpv_vendors_orders_title'
47
  ),
48
 
49
- 'vendors_order_management' => array(
50
  'title' => __( 'Enable order management', 'yith_wc_product_vendors' ),
51
  'type' => 'checkbox',
52
  'desc' => __( 'If you enable this option, each vendor will be able to manage orders on his/her own products independently.', 'yith_wc_product_vendors' ),
@@ -62,7 +62,7 @@ return apply_filters( 'yith_wpv_panel_vendors_options', array(
62
  'default' => 'yes'
63
  ),
64
 
65
- 'vendors_order_end' => array(
66
  'type' => 'sectionend',
67
  ),
68
  )
35
  'type' => 'sectionend',
36
  ),
37
 
38
+ 'vendors_order_start' => array(
39
  'type' => 'sectionstart',
40
  ),
41
 
42
+ 'vendors_order_title' => array(
43
  'title' => __( 'Order management', 'yith_wc_product_vendors' ),
44
  'type' => 'title',
45
  'desc' => '',
46
  'id' => 'yith_wpv_vendors_orders_title'
47
  ),
48
 
49
+ 'vendors_order_management' => array(
50
  'title' => __( 'Enable order management', 'yith_wc_product_vendors' ),
51
  'type' => 'checkbox',
52
  'desc' => __( 'If you enable this option, each vendor will be able to manage orders on his/her own products independently.', 'yith_wc_product_vendors' ),
62
  'default' => 'yes'
63
  ),
64
 
65
+ 'vendors_order_end' => array(
66
  'type' => 'sectionend',
67
  ),
68
  )
modules/yith-woocommerce-product-vendors/templates/admin/premium.php CHANGED
@@ -57,6 +57,7 @@
57
  .section .section-title h2 {
58
  display: table-cell;
59
  vertical-align: middle;
 
60
  }
61
 
62
  .section-title {
@@ -716,6 +717,58 @@
716
  </div>
717
  </div>
718
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
719
  <div class="section section-cta section-odd">
720
  <div class="landing-container">
721
  <div class="premium-cta">
57
  .section .section-title h2 {
58
  display: table-cell;
59
  vertical-align: middle;
60
+ line-height: 24px;
61
  }
62
 
63
  .section-title {
717
  </div>
718
  </div>
719
  </div>
720
+ <div class="section section-even clear"style="background: url(<?php echo YITH_WPV_URL ?>assets/images/29-bg.png) no-repeat #fff; background-position: 85% 100%">
721
+ <div class="landing-container">
722
+ <div class="col-1">
723
+ <img src="<?php echo YITH_WPV_URL ?>assets/images/29.png" alt="Screenshot"/>
724
+ </div>
725
+ <div class="col-2">
726
+ <div class="section-title">
727
+ <img src="<?php echo YITH_WPV_URL ?>assets/images/29-icon.png" alt="icon"/>
728
+ <h2><?php _e('VENDOR TAXONOMY','yith_wc_product_vendors'); ?></h2>
729
+ </div>
730
+ <p>
731
+ <?php _e( 'With a specific option, %1$svendor taxonomy slug%2$s becomes customizable according to your needs.','yith_wc_product_vendors' )?>
732
+ </p>
733
+ </div>
734
+ </div>
735
+ </div>
736
+ <div class="section section-odd clear" style="background: url(<?php echo YITH_WPV_URL ?>assets/images/30-bg.png) no-repeat #f1f1f1; background-position: 15% 100%">
737
+ <div class="landing-container">
738
+ <div class="col-2">
739
+ <div class="section-title">
740
+ <img src="<?php echo YITH_WPV_URL ?>assets/images/30-icon.png" alt="Icon"/>
741
+ <h2><?php _e('VENDOR LOGO','yith_wc_product_vendors');?></h2>
742
+ </div>
743
+ <p>
744
+ <?php _e( 'Vendors might wish to show their own logo, but not all vendors have one. This is the reason why you can give them the chance to add it or not in their shop pages. If you prefer to have an uniform style in your site, you can also choose to hide all your vendors’ logos.','yith_wc_product_vendors' )?>
745
+ </p>
746
+ <p>
747
+ <?php _e( ' If you prefer to have an suniform style in your site, you can also choose to hide all your vendors’ logos.','yith_wc_product_vendors' )?>
748
+ </p>
749
+ </div>
750
+ <div class="col-1">
751
+ <img src="<?php echo YITH_WPV_URL ?>assets/images/30.png" alt="Screenshot"/>
752
+ </div>
753
+ </div>
754
+ </div>
755
+ <div class="section section-even clear"style="background: url(<?php echo YITH_WPV_URL ?>assets/images/31-bg.png) no-repeat #fff; background-position: 85% 100%">
756
+ <div class="landing-container">
757
+ <div class="col-1">
758
+ <img src="<?php echo YITH_WPV_URL ?>assets/images/31.png" alt="Screenshot"/>
759
+ </div>
760
+ <div class="col-2">
761
+ <div class="section-title">
762
+ <img src="<?php echo YITH_WPV_URL ?>assets/images/31-icon.png" alt="icon"/>
763
+ <h2><?php _e('USERS PRIVACY','yith_wc_product_vendors'); ?></h2>
764
+ </div>
765
+ <p>
766
+ <?php _e( 'Protect your customers\' privacy! With a specific option of the plugin, you can hide "Customer" search section in order detail page, so that other vendors won’t have access to your customers email addresses.','yith_wc_product_vendors' )?>
767
+ </p>
768
+ </div>
769
+ </div>
770
+ </div>
771
+
772
  <div class="section section-cta section-odd">
773
  <div class="landing-container">
774
  <div class="premium-cta">
modules/yith-woocommerce-review-reminder/init.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://yithemes.com/themes/plugins/yith-woocommerce-review-reminder
5
  Description: Send a review reminder to the customers over WooCommerce.
6
  Author: Yithemes
7
  Text Domain: yith-woocommerce-review-reminder
8
- Version: 1.1.2
9
  Author URI: http://yithemes.com/
10
  */
11
 
@@ -34,7 +34,7 @@ function ywrr_install_free_admin_notice() {
34
  }
35
 
36
  if ( !defined( 'YWRR_VERSION' ) ) {
37
- define( 'YWRR_VERSION', '1.1.2' );
38
  }
39
 
40
  if ( !defined( 'YWRR_FREE_INIT' ) ) {
5
  Description: Send a review reminder to the customers over WooCommerce.
6
  Author: Yithemes
7
  Text Domain: yith-woocommerce-review-reminder
8
+ Version: 1.1.3
9
  Author URI: http://yithemes.com/
10
  */
11
 
34
  }
35
 
36
  if ( !defined( 'YWRR_VERSION' ) ) {
37
+ define( 'YWRR_VERSION', '1.1.3' );
38
  }
39
 
40
  if ( !defined( 'YWRR_FREE_INIT' ) ) {
modules/yith-woocommerce-review-reminder/languages/yith-woocommerce-review-reminder-it_IT.mo CHANGED
Binary file
modules/yith-woocommerce-review-reminder/languages/yith-woocommerce-review-reminder-it_IT.po CHANGED
@@ -2,14 +2,14 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: YITH WooCommerce Review Reminder\n"
4
  "POT-Creation-Date: 2015-10-02 09:44+0200\n"
5
- "PO-Revision-Date: 2015-10-02 10:54+0200\n"
6
  "Last-Translator: \n"
7
  "Language-Team: Your Inspiration Themes <plugins@yithemes.com>\n"
8
  "Language: it\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "X-Generator: Poedit 1.8.4\n"
13
  "X-Poedit-KeywordsList: _;gettext;gettext_noop;__;_e;_n:1,2;__ngettext:1,2;"
14
  "__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;"
15
  "_nx_noop:4c,1,2\n"
@@ -293,7 +293,7 @@ msgstr ""
293
  "Segui il link sotto ciascun prodotto e lascia una recensione sotto la tab "
294
  "'Recensioni'.\n"
295
  "\n"
296
- "{oder_list}\n"
297
  "\n"
298
  "Grazie per a collaborazione,\n"
299
  "\n"
2
  msgstr ""
3
  "Project-Id-Version: YITH WooCommerce Review Reminder\n"
4
  "POT-Creation-Date: 2015-10-02 09:44+0200\n"
5
+ "PO-Revision-Date: 2015-12-28 15:22+0100\n"
6
  "Last-Translator: \n"
7
  "Language-Team: Your Inspiration Themes <plugins@yithemes.com>\n"
8
  "Language: it\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 1.7.4\n"
13
  "X-Poedit-KeywordsList: _;gettext;gettext_noop;__;_e;_n:1,2;__ngettext:1,2;"
14
  "__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;"
15
  "_nx_noop:4c,1,2\n"
293
  "Segui il link sotto ciascun prodotto e lascia una recensione sotto la tab "
294
  "'Recensioni'.\n"
295
  "\n"
296
+ "{order_list}\n"
297
  "\n"
298
  "Grazie per a collaborazione,\n"
299
  "\n"
modules/yith-woocommerce-tab-manager/assets/images/06-bg.png ADDED
Binary file
modules/yith-woocommerce-tab-manager/assets/images/06-icon.png ADDED
Binary file
modules/yith-woocommerce-tab-manager/assets/images/06.png ADDED
Binary file
modules/yith-woocommerce-tab-manager/includes/class.yith-woocommerce-tab-manager.php CHANGED
@@ -361,16 +361,16 @@ if ( !class_exists( 'YITH_WC_Tab_Manager' ) ) {
361
  $messages[$this->post_type_name] = array (
362
 
363
  0 => '',
364
- 1 => __($singular_name.' updated','yith-woocommerce-tab-manager'),
365
  2 => __('Custom field updated', 'yith-woocommerce-tab-manager'),
366
  3 => __('Custom field deleted', 'yith-woocommerce-tab-manager'),
367
- 4 => __($singular_name.' updated', 'yith-woocommerce-tab-manager'),
368
  5 => isset( $_GET['revision'] ) ? sprintf( __( 'Tab restored to version %s', 'yith-woocommerce-tab-manager' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false,
369
- 6 => __($singular_name.' published', 'yith-woocommerce-tab-manager'),
370
- 7 => __($singular_name.' saved', 'yith-woocommerce-tab-manager'),
371
- 8 => __($singular_name.' submitted', 'yith-woocommerce-tab-manager'),
372
- 9 => __($singular_name.' ', 'yith-woocommerce-tab-manager'),
373
- 10 => __($singular_name.' draft updated', 'yith-woocommerce-tab-manager')
374
  );
375
 
376
 
@@ -387,7 +387,7 @@ if ( !class_exists( 'YITH_WC_Tab_Manager' ) ) {
387
  $args = include_once( YWTM_INC . '/metabox/tab-metabox.php');
388
 
389
  if (!function_exists( 'YIT_Metabox' ) ) {
390
- require_once( 'plugin-fw/yit-plugin.php' );
391
  }
392
  $metabox = YIT_Metabox('yit-tab-manager-setting');
393
  $metabox->init($args);
361
  $messages[$this->post_type_name] = array (
362
 
363
  0 => '',
364
+ 1 => sprintf(__('%s updated','yith-woocommerce-tab-manager') , $singular_name ) ,
365
  2 => __('Custom field updated', 'yith-woocommerce-tab-manager'),
366
  3 => __('Custom field deleted', 'yith-woocommerce-tab-manager'),
367
+ 4 => sprintf(__('%s updated','yith-woocommerce-tab-manager') , $singular_name ) ,
368
  5 => isset( $_GET['revision'] ) ? sprintf( __( 'Tab restored to version %s', 'yith-woocommerce-tab-manager' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false,
369
+ 6 => sprintf( __('%s published', 'yith-woocommerce-tab-manager' ), $singular_name ),
370
+ 7 => sprintf( __('%s saved', 'yith-woocommerce-tab-manager' ), $singular_name ),
371
+ 8 => sprintf( __('%s submitted', 'yith-woocommerce-tab-manager' ), $singular_name ),
372
+ 9 => sprintf( __('%s', 'yith-woocommerce-tab-manager'), $singular_name ),
373
+ 10 => sprintf( __('%s draft updated', 'yith-woocommerce-tab-manager'), $singular_name )
374
  );
375
 
376
 
387
  $args = include_once( YWTM_INC . '/metabox/tab-metabox.php');
388
 
389
  if (!function_exists( 'YIT_Metabox' ) ) {
390
+ require_once( YWTM_DIR.'plugin-fw/yit-plugin.php' );
391
  }
392
  $metabox = YIT_Metabox('yit-tab-manager-setting');
393
  $metabox->init($args);
modules/yith-woocommerce-tab-manager/includes/metabox/tab-metabox.php CHANGED
@@ -5,7 +5,6 @@
5
  * Date: 18/03/2015
6
  * Time: 13:53
7
  */
8
-
9
  $args = array (
10
  'label' => __( 'Tab Settings', 'yith-woocommerce-tab-manager' ),
11
  'pages' => 'ywtm_tab', //or array( 'post-type1', 'post-type2')
5
  * Date: 18/03/2015
6
  * Time: 13:53
7
  */
 
8
  $args = array (
9
  'label' => __( 'Tab Settings', 'yith-woocommerce-tab-manager' ),
10
  'pages' => 'ywtm_tab', //or array( 'post-type1', 'post-type2')
modules/yith-woocommerce-tab-manager/init.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: YITH WooCommerce Tab Manager
4
  * Plugin URI: http://yithemes.com/themes/plugins/yith-woocommerce-tab-manager/
5
  * Description: YITH WooCommerce Tab Manager allows you to add Tab to products.
6
- * Version: 1.1.0
7
  * Author: Yithemes
8
  * Author URI: http://yithemes.com/
9
  * Text Domain: yith_wc_tab_manager
@@ -11,7 +11,7 @@
11
  *
12
  * @author Your Inspiration Themes
13
  * @package YITH WooCommerce Tab Manager
14
- * @version 1.1.0
15
  */
16
 
17
  /* Copyright 2013 Your Inspiration Themes (email : plugins@yithemes.com)
@@ -65,7 +65,7 @@ if ( !function_exists( 'yith_plugin_registration_hook' ) ) {
65
 
66
 
67
  if ( !defined( 'YWTM_VERSION' ) ) {
68
- define( 'YWTM_VERSION', '1.1.0' );
69
  }
70
 
71
  if ( !defined( 'YWTM_FREE_INIT' ) ) {
3
  * Plugin Name: YITH WooCommerce Tab Manager
4
  * Plugin URI: http://yithemes.com/themes/plugins/yith-woocommerce-tab-manager/
5
  * Description: YITH WooCommerce Tab Manager allows you to add Tab to products.
6
+ * Version: 1.1.1
7
  * Author: Yithemes
8
  * Author URI: http://yithemes.com/
9
  * Text Domain: yith_wc_tab_manager
11
  *
12
  * @author Your Inspiration Themes
13
  * @package YITH WooCommerce Tab Manager
14
+ * @version 1.1.1
15
  */
16
 
17
  /* Copyright 2013 Your Inspiration Themes (email : plugins@yithemes.com)
65
 
66
 
67
  if ( !defined( 'YWTM_VERSION' ) ) {
68
+ define( 'YWTM_VERSION', '1.1.1' );
69
  }
70
 
71
  if ( !defined( 'YWTM_FREE_INIT' ) ) {
modules/yith-woocommerce-tab-manager/languages/yith-woocommerce-tab-manager.pot CHANGED
@@ -1,8 +1,8 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: YITH WooCommerce Tab Manager\n"
4
- "POT-Creation-Date: 2015-11-10 16:35+0100\n"
5
- "PO-Revision-Date: 2015-11-10 16:35+0100\n"
6
  "Last-Translator: \n"
7
  "Language-Team: Your Inspiration Themes <plugins@yithemes.com>\n"
8
  "Language: en\n"
@@ -20,7 +20,7 @@ msgstr ""
20
 
21
  #: ../includes/class.yith-woocommerce-tab-manager.php:179
22
  #: ../includes/class.yith-woocommerce-tab-manager.php:232
23
- #: ../includes/metabox/tab-metabox.php:16
24
  msgid "Settings"
25
  msgstr ""
26
 
@@ -96,7 +96,8 @@ msgstr ""
96
 
97
  #: ../includes/class.yith-woocommerce-tab-manager.php:364
98
  #: ../includes/class.yith-woocommerce-tab-manager.php:367
99
- msgid " updated"
 
100
  msgstr ""
101
 
102
  #: ../includes/class.yith-woocommerce-tab-manager.php:365
@@ -113,23 +114,28 @@ msgid "Tab restored to version %s"
113
  msgstr ""
114
 
115
  #: ../includes/class.yith-woocommerce-tab-manager.php:369
116
- msgid " published"
 
117
  msgstr ""
118
 
119
  #: ../includes/class.yith-woocommerce-tab-manager.php:370
120
- msgid " saved"
 
121
  msgstr ""
122
 
123
  #: ../includes/class.yith-woocommerce-tab-manager.php:371
124
- msgid " submitted"
 
125
  msgstr ""
126
 
127
  #: ../includes/class.yith-woocommerce-tab-manager.php:372
128
- msgid " "
 
129
  msgstr ""
130
 
131
  #: ../includes/class.yith-woocommerce-tab-manager.php:373
132
- msgid " draft updated"
 
133
  msgstr ""
134
 
135
  #: ../includes/class.yith-woocommerce-tab-manager.php:494
@@ -148,27 +154,27 @@ msgstr ""
148
  msgid "Date"
149
  msgstr ""
150
 
151
- #: ../includes/metabox/tab-metabox.php:10
152
  msgid "Tab Settings"
153
  msgstr ""
154
 
155
- #: ../includes/metabox/tab-metabox.php:19
156
  msgid "Content Tab"
157
  msgstr ""
158
 
159
- #: ../includes/metabox/tab-metabox.php:24
160
  msgid "Enable Tab"
161
  msgstr ""
162
 
163
- #: ../includes/metabox/tab-metabox.php:25
164
  msgid "Show Tab in frontend"
165
  msgstr ""
166
 
167
- #: ../includes/metabox/tab-metabox.php:30
168
  msgid "Tab Priority"
169
  msgstr ""
170
 
171
- #: ../includes/metabox/tab-metabox.php:31
172
  msgid "The plugin tabs are displayed after the WooCommerce Tabs"
173
  msgstr ""
174
 
@@ -222,18 +228,18 @@ msgstr ""
222
  msgid "Enable plugin"
223
  msgstr ""
224
 
225
- #: ../templates/admin/premium.php:198 ../templates/admin/premium.php:309
226
  #, php-format
227
  msgid ""
228
  "Upgrade to %1$spremium version%2$s of %1$sYITH WooCommerce Tab Manager%2$s "
229
  "to benefit from all features!"
230
  msgstr ""
231
 
232
- #: ../templates/admin/premium.php:202 ../templates/admin/premium.php:313
233
  msgid "UPGRADE"
234
  msgstr ""
235
 
236
- #: ../templates/admin/premium.php:203 ../templates/admin/premium.php:314
237
  msgid "to the premium version"
238
  msgstr ""
239
 
@@ -319,3 +325,16 @@ msgid ""
319
  " %2$sYou do not need anything more to achieve the best "
320
  "results!%3$s"
321
  msgstr ""
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: YITH WooCommerce Tab Manager\n"
4
+ "POT-Creation-Date: 2016-01-05 11:28+0100\n"
5
+ "PO-Revision-Date: 2016-01-05 11:28+0100\n"
6
  "Last-Translator: \n"
7
  "Language-Team: Your Inspiration Themes <plugins@yithemes.com>\n"
8
  "Language: en\n"
20
 
21
  #: ../includes/class.yith-woocommerce-tab-manager.php:179
22
  #: ../includes/class.yith-woocommerce-tab-manager.php:232
23
+ #: ../includes/metabox/tab-metabox.php:15
24
  msgid "Settings"
25
  msgstr ""
26
 
96
 
97
  #: ../includes/class.yith-woocommerce-tab-manager.php:364
98
  #: ../includes/class.yith-woocommerce-tab-manager.php:367
99
+ #, php-format
100
+ msgid "%s updated"
101
  msgstr ""
102
 
103
  #: ../includes/class.yith-woocommerce-tab-manager.php:365
114
  msgstr ""
115
 
116
  #: ../includes/class.yith-woocommerce-tab-manager.php:369
117
+ #, php-format
118
+ msgid "%s published"
119
  msgstr ""
120
 
121
  #: ../includes/class.yith-woocommerce-tab-manager.php:370
122
+ #, php-format
123
+ msgid "%s saved"
124
  msgstr ""
125
 
126
  #: ../includes/class.yith-woocommerce-tab-manager.php:371
127
+ #, php-format
128
+ msgid "%s submitted"
129
  msgstr ""
130
 
131
  #: ../includes/class.yith-woocommerce-tab-manager.php:372
132
+ #, php-format
133
+ msgid "%s"
134
  msgstr ""
135
 
136
  #: ../includes/class.yith-woocommerce-tab-manager.php:373
137
+ #, php-format
138
+ msgid "%s draft updated"
139
  msgstr ""
140
 
141
  #: ../includes/class.yith-woocommerce-tab-manager.php:494
154
  msgid "Date"
155
  msgstr ""
156
 
157
+ #: ../includes/metabox/tab-metabox.php:9
158
  msgid "Tab Settings"
159
  msgstr ""
160
 
161
+ #: ../includes/metabox/tab-metabox.php:18
162
  msgid "Content Tab"
163
  msgstr ""
164
 
165
+ #: ../includes/metabox/tab-metabox.php:23
166
  msgid "Enable Tab"
167
  msgstr ""
168
 
169
+ #: ../includes/metabox/tab-metabox.php:24
170
  msgid "Show Tab in frontend"
171
  msgstr ""
172
 
173
+ #: ../includes/metabox/tab-metabox.php:29
174
  msgid "Tab Priority"
175
  msgstr ""
176
 
177
+ #: ../includes/metabox/tab-metabox.php:30
178
  msgid "The plugin tabs are displayed after the WooCommerce Tabs"
179
  msgstr ""
180
 
228
  msgid "Enable plugin"
229
  msgstr ""
230
 
231
+ #: ../templates/admin/premium.php:198 ../templates/admin/premium.php:325
232
  #, php-format
233
  msgid ""
234
  "Upgrade to %1$spremium version%2$s of %1$sYITH WooCommerce Tab Manager%2$s "
235
  "to benefit from all features!"
236
  msgstr ""
237
 
238
+ #: ../templates/admin/premium.php:202 ../templates/admin/premium.php:329
239
  msgid "UPGRADE"
240
  msgstr ""
241
 
242
+ #: ../templates/admin/premium.php:203 ../templates/admin/premium.php:330
243
  msgid "to the premium version"
244
  msgstr ""
245
 
325
  " %2$sYou do not need anything more to achieve the best "
326
  "results!%3$s"
327
  msgstr ""
328
+
329
+ #: ../templates/admin/premium.php:310
330
+ msgid "WooCommerce tabs"
331
+ msgstr ""
332
+
333
+ #: ../templates/admin/premium.php:313
334
+ #, php-format
335
+ msgid ""
336
+ "Edit or remove %1$s\"Reviews\"%2$s and %1$s\"Description\"%2$s tabs that "
337
+ "WooCommerce adds defaultly in every product of the shop. In this way, you "
338
+ "will have the full control of every detail of the pages, shaping them as you "
339
+ "want."
340
+ msgstr ""
modules/yith-woocommerce-tab-manager/templates/admin/premium.php CHANGED
@@ -302,6 +302,22 @@
302
  </div>
303
  </div>
304
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
305
  <div class="section section-cta section-odd">
306
  <div class="landing-container">
307
  <div class="premium-cta">
302
  </div>
303
  </div>
304
  </div>
305
+ <div class="section section-odd clear" style="background: url(<?php echo YWTM_ASSETS_URL ?>/images/06-bg.png) no-repeat #f1f1f1; background-position: 15% 100%">
306
+ <div class="landing-container">
307
+ <div class="col-2">
308
+ <div class="section-title">
309
+ <img src="<?php echo YWTM_ASSETS_URL ?>/images/06-icon.png" alt="" />
310
+ <h2><?php _e( 'WooCommerce tabs', 'yith-woocommerce-tab-manager' );?></h2>
311
+ </div>
312
+ <p>
313
+ <?php echo sprintf( __('Edit or remove %1$s"Reviews"%2$s and %1$s"Description"%2$s tabs that WooCommerce adds defaultly in every product of the shop. In this way, you will have the full control of every detail of the pages, shaping them as you want.', 'yith-woocommerce-tab-manager'), '<b>','</b>' );?>
314
+ </p>
315
+ </div>
316
+ <div class="col-1">
317
+ <img src="<?php echo YWTM_ASSETS_URL ?>/images/06.png" alt="" />
318
+ </div>
319
+ </div>
320
+ </div>
321
  <div class="section section-cta section-odd">
322
  <div class="landing-container">
323
  <div class="premium-cta">
modules/yith-woocommerce-waiting-list/includes/class.yith-wcwtl-frontend.php CHANGED
@@ -28,6 +28,14 @@ if( ! class_exists( 'YITH_WCWTL_Frontend' ) ) {
28
  */
29
  protected static $instance;
30
 
 
 
 
 
 
 
 
 
31
  /**
32
  * Plugin version
33
  *
@@ -64,22 +72,33 @@ if( ! class_exists( 'YITH_WCWTL_Frontend' ) ) {
64
  add_action( 'wp', array( $this, 'yith_waiting_submit' ), 100 );
65
 
66
  // enqueue frontend js
67
- add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
68
  }
69
 
70
  /**
71
- * Enqueue frontend scripts and style
72
  *
73
  * @access public
74
  * @since 1.0.0
75
  * @author Francesco Licandro <francesco.licandro@yithemes.com>
76
  */
77
- public function enqueue_scripts() {
78
 
79
- wp_enqueue_script( 'yith-wcwtl-frontend', YITH_WCWTL_ASSETS_URL . '/js/frontend.js', array( 'jquery' ), false, true );
80
  }
81
 
82
- /**
 
 
 
 
 
 
 
 
 
 
 
83
  * Init and add action form to products
84
  *
85
  * @access public
@@ -89,15 +108,23 @@ if( ! class_exists( 'YITH_WCWTL_Frontend' ) ) {
89
  public function add_form(){
90
  global $post;
91
 
92
- if( $post && get_post_type( $post->ID ) == 'product' ) {
93
 
94
- $product = wc_get_product( $post->ID );
95
 
96
- if ( $product->product_type == 'grouped' ) {
97
  return;
98
  }
99
 
100
- add_action( 'woocommerce_stock_html', array( $this, 'output_form' ), 20, 3 );
 
 
 
 
 
 
 
 
101
  }
102
  }
103
 
@@ -108,11 +135,16 @@ if( ! class_exists( 'YITH_WCWTL_Frontend' ) ) {
108
  * @since 1.0.0
109
  * @param string $html
110
  * @param int $availability
111
- * @param object $product
112
  * @return string
113
  * @author Francesco Licandro <francesco.licandro@yithemes.com>
114
  */
115
- public function output_form( $html, $availability, $product ) {
 
 
 
 
 
116
  return $html . $this->the_form( $product );
117
  }
118
 
@@ -154,7 +186,7 @@ if( ! class_exists( 'YITH_WCWTL_Frontend' ) ) {
154
 
155
  if( $product_type == 'simple' && ! $user->exists() ) {
156
 
157
- $html .= '<form method="post" action="' . esc_url( $url ) . '" name="prova">';
158
  $html .= '<label for="yith-wcwtl-email">' . __( 'Email Address', 'yith-woocommerce-waiting-list' ) . '<input type="email" name="yith-wcwtl-email" id="yith-wcwtl-email" /></label>';
159
  $html .= '<input type="submit" value="' . $label_button_add . '" class="button alt" />';
160
  $html .= '</form>';
@@ -189,7 +221,7 @@ if( ! class_exists( 'YITH_WCWTL_Frontend' ) ) {
189
 
190
  $user = wp_get_current_user();
191
 
192
- if( ! ( isset( $_REQUEST[ YITH_WCWTL_META ] ) && is_numeric( $_REQUEST[ YITH_WCWTL_META ] ) && isset( $_REQUEST[ YITH_WCWTL_META . '-action' ] ) && wp_verify_nonce( $_REQUEST[ '_wpnonce' ], 'action_waitlist' ) ) ) {
193
  return;
194
  }
195
 
28
  */
29
  protected static $instance;
30
 
31
+ /**
32
+ * Current object product
33
+ *
34
+ * @var object
35
+ * @since 1.0.0
36
+ */
37
+ protected $current_product = false;
38
+
39
  /**
40
  * Plugin version
41
  *
72
  add_action( 'wp', array( $this, 'yith_waiting_submit' ), 100 );
73
 
74
  // enqueue frontend js
75
+ add_action( 'wp_enqueue_scripts', array( $this, 'register_scripts' ) );
76
  }
77
 
78
  /**
79
+ * Register scripts frontend
80
  *
81
  * @access public
82
  * @since 1.0.0
83
  * @author Francesco Licandro <francesco.licandro@yithemes.com>
84
  */
85
+ public function register_scripts(){
86
 
87
+ wp_register_script( 'yith-wcwtl-frontend', YITH_WCWTL_ASSETS_URL . '/js/frontend.js', array( 'jquery'), YITH_WCWTL_VERSION, true );
88
  }
89
 
90
+ /**
91
+ * Enqueue scripts and style
92
+ *
93
+ * @since 1.0.8
94
+ * @access public
95
+ * @author Francesco Licandro
96
+ */
97
+ public function enqueue_scripts() {
98
+ wp_enqueue_script( 'yith-wcwtl-frontend' );
99
+ }
100
+
101
+ /**
102
  * Init and add action form to products
103
  *
104
  * @access public
108
  public function add_form(){
109
  global $post;
110
 
111
+ if( get_post_type( $post->ID ) == 'product' && is_product() ) {
112
 
113
+ $this->current_product = wc_get_product( $post->ID );
114
 
115
+ if ( $this->current_product->product_type == 'grouped' ) {
116
  return;
117
  }
118
 
119
+ // first enqueue scripts
120
+ $this->enqueue_scripts();
121
+
122
+ if( $this->current_product->product_type == 'variable' ){
123
+ add_action( 'woocommerce_stock_html', array( $this, 'output_form' ), 20, 3 );
124
+ }
125
+ else {
126
+ add_action( 'woocommerce_stock_html', array( $this, 'output_form' ), 20, 2 );
127
+ }
128
  }
129
  }
130
 
135
  * @since 1.0.0
136
  * @param string $html
137
  * @param int $availability
138
+ * @param object | boolean $product
139
  * @return string
140
  * @author Francesco Licandro <francesco.licandro@yithemes.com>
141
  */
142
+ public function output_form( $html, $availability, $product = false ) {
143
+
144
+ if( ! $product ) {
145
+ $product = $this->current_product;
146
+ }
147
+
148
  return $html . $this->the_form( $product );
149
  }
150
 
186
 
187
  if( $product_type == 'simple' && ! $user->exists() ) {
188
 
189
+ $html .= '<form method="post" action="' . esc_url( $url ) . '">';
190
  $html .= '<label for="yith-wcwtl-email">' . __( 'Email Address', 'yith-woocommerce-waiting-list' ) . '<input type="email" name="yith-wcwtl-email" id="yith-wcwtl-email" /></label>';
191
  $html .= '<input type="submit" value="' . $label_button_add . '" class="button alt" />';
192
  $html .= '</form>';
221
 
222
  $user = wp_get_current_user();
223
 
224
+ if( ! ( isset( $_REQUEST[ YITH_WCWTL_META ] ) && is_numeric( $_REQUEST[ YITH_WCWTL_META ] ) && isset( $_REQUEST[ YITH_WCWTL_META . '-action' ] ) ) ) {
225
  return;
226
  }
227
 
modules/yith-woocommerce-waiting-list/includes/class.yith-wcwtl-meta.php CHANGED
@@ -78,7 +78,7 @@ if ( ! class_exists( 'YITH_WCWTL_Meta' ) ) {
78
  * @author Francesco Licandro <francesco.licandro@yithemes.com>
79
  */
80
  public function enqueue_scripts(){
81
- wp_enqueue_script( 'yith-waitlist-metabox', YITH_WCWTL_ASSETS_URL . '/js/metabox.js', array( 'jquery' ), false, true );
82
 
83
  wp_localize_script( 'yith-waitlist-metabox', 'yith_wcwtl_meta', array(
84
  'ajaxurl' => admin_url( 'admin-ajax.php' )
78
  * @author Francesco Licandro <francesco.licandro@yithemes.com>
79
  */
80
  public function enqueue_scripts(){
81
+ wp_enqueue_script( 'yith-waitlist-metabox', YITH_WCWTL_ASSETS_URL . '/js/metabox.js', array( 'jquery' ), YITH_WCWTL_VERSION, true );
82
 
83
  wp_localize_script( 'yith-waitlist-metabox', 'yith_wcwtl_meta', array(
84
  'ajaxurl' => admin_url( 'admin-ajax.php' )
modules/yith-woocommerce-waiting-list/init.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: YITH WooCommerce Waiting List
4
  * Plugin URI: http://yithemes.com/
5
  * Description: YITH WooCommerce Waiting List allow users to request an email notification when an out-of-stock product comes back into stock.
6
- * Version: 1.0.3
7
  * Author: Yithemes
8
  * Author URI: http://yithemes.com/
9
  * Text Domain: yith-woocommerce-waiting-list
@@ -11,7 +11,7 @@
11
  *
12
  * @author Yithemes
13
  * @package YITH WooCommerce Waiting List
14
- * @version 1.0.3
15
  */
16
  /* Copyright 2015 Your Inspiration Themes (email : plugins@yithemes.com)
17
 
@@ -59,7 +59,7 @@ register_activation_hook( __FILE__, 'yith_plugin_registration_hook' );
59
 
60
 
61
  if ( ! defined( 'YITH_WCWTL_VERSION' ) ){
62
- define( 'YITH_WCWTL_VERSION', '1.0.3' );
63
  }
64
 
65
  if ( ! defined( 'YITH_WCWTL_FREE_INIT' ) ) {
3
  * Plugin Name: YITH WooCommerce Waiting List
4
  * Plugin URI: http://yithemes.com/
5
  * Description: YITH WooCommerce Waiting List allow users to request an email notification when an out-of-stock product comes back into stock.
6
+ * Version: 1.0.4
7
  * Author: Yithemes
8
  * Author URI: http://yithemes.com/
9
  * Text Domain: yith-woocommerce-waiting-list
11
  *
12
  * @author Yithemes
13
  * @package YITH WooCommerce Waiting List
14
+ * @version 1.0.4
15
  */
16
  /* Copyright 2015 Your Inspiration Themes (email : plugins@yithemes.com)
17
 
59
 
60
 
61
  if ( ! defined( 'YITH_WCWTL_VERSION' ) ){
62
+ define( 'YITH_WCWTL_VERSION', '1.0.4' );
63
  }
64
 
65
  if ( ! defined( 'YITH_WCWTL_FREE_INIT' ) ) {
modules/yith-woocommerce-waiting-list/languages/yith-woocommerce-waiting-list.pot CHANGED
@@ -2,7 +2,7 @@
2
  msgid ""
3
  msgstr ""
4
  "Project-Id-Version: YITH WooCommerce Waiting List\n"
5
- "POT-Creation-Date: 2015-11-02 10:12+0100\n"
6
  "PO-Revision-Date: 2015-04-22 16:20+0100\n"
7
  "Last-Translator: \n"
8
  "Language-Team: Yithemes <plugins@yithemes.com>\n"
@@ -57,25 +57,25 @@ msgstr ""
57
  msgid "A product you are waiting for is back in stock"
58
  msgstr ""
59
 
60
- #: includes/class.yith-wcwtl-frontend.php:158
61
  msgid "Email Address"
62
  msgstr ""
63
 
64
- #: includes/class.yith-wcwtl-frontend.php:197
65
  msgid ""
66
  "You must provide a valid email address to join the waiting list of this "
67
  "product"
68
  msgstr ""
69
 
70
- #: includes/class.yith-wcwtl-frontend.php:220
71
  msgid "You have already registered for this waiting list"
72
  msgstr ""
73
 
74
- #: includes/class.yith-wcwtl-frontend.php:227
75
  msgid "You have been removed from the waiting list for this product"
76
  msgstr ""
77
 
78
- #: includes/class.yith-wcwtl-frontend.php:230
79
  msgid "An error has occurred. Please try again."
80
  msgstr ""
81
 
2
  msgid ""
3
  msgstr ""
4
  "Project-Id-Version: YITH WooCommerce Waiting List\n"
5
+ "POT-Creation-Date: 2016-01-04 15:41+0100\n"
6
  "PO-Revision-Date: 2015-04-22 16:20+0100\n"
7
  "Last-Translator: \n"
8
  "Language-Team: Yithemes <plugins@yithemes.com>\n"
57
  msgid "A product you are waiting for is back in stock"
58
  msgstr ""
59
 
60
+ #: includes/class.yith-wcwtl-frontend.php:190
61
  msgid "Email Address"
62
  msgstr ""
63
 
64
+ #: includes/class.yith-wcwtl-frontend.php:229
65
  msgid ""
66
  "You must provide a valid email address to join the waiting list of this "
67
  "product"
68
  msgstr ""
69
 
70
+ #: includes/class.yith-wcwtl-frontend.php:252
71
  msgid "You have already registered for this waiting list"
72
  msgstr ""
73
 
74
+ #: includes/class.yith-wcwtl-frontend.php:259
75
  msgid "You have been removed from the waiting list for this product"
76
  msgstr ""
77
 
78
+ #: includes/class.yith-wcwtl-frontend.php:262
79
  msgid "An error has occurred. Please try again."
80
  msgstr ""
81
 
modules/yith-woocommerce-zoom-magnifier/assets/js/frontend.js CHANGED
@@ -3,7 +3,7 @@
3
  *
4
  * @author Your Inspiration Themes
5
  * @package YITH WooCommerce Zoom Magnifier
6
- * @version 1.2.13
7
  */
8
  jQuery(document).ready(function ($) {
9
 
3
  *
4
  * @author Your Inspiration Themes
5
  * @package YITH WooCommerce Zoom Magnifier
6
+ * @version 1.2.15
7
  */
8
  jQuery(document).ready(function ($) {
9
 
modules/yith-woocommerce-zoom-magnifier/class.yith-wcmg-admin.php CHANGED
@@ -28,14 +28,6 @@ if ( ! class_exists( 'YITH_WCMG_Admin' ) ) {
28
  */
29
  public $options = array();
30
 
31
- /**
32
- * Plugin version
33
- *
34
- * @var string
35
- * @since 1.0.0
36
- */
37
- public $version;
38
-
39
  /**
40
  * Various links
41
  *
@@ -53,8 +45,7 @@ if ( ! class_exists( 'YITH_WCMG_Admin' ) ) {
53
  * @access public
54
  * @since 1.0.0
55
  */
56
- public function __construct( $version ) {
57
- $this->version = $version;
58
 
59
  //Actions
60
  add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_styles_scripts' ) );
28
  */
29
  public $options = array();
30
 
 
 
 
 
 
 
 
 
31
  /**
32
  * Various links
33
  *
45
  * @access public
46
  * @since 1.0.0
47
  */
48
+ public function __construct( ) {
 
49
 
50
  //Actions
51
  add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_styles_scripts' ) );
modules/yith-woocommerce-zoom-magnifier/class.yith-wcmg-frontend.php CHANGED
@@ -19,13 +19,7 @@ if ( ! class_exists ( 'YITH_WCMG_Frontend' ) ) {
19
  * @since 1.0.0
20
  */
21
  class YITH_WCMG_Frontend {
22
- /**
23
- * Plugin version
24
- *
25
- * @var string
26
- * @since 1.0.0
27
- */
28
- public $version;
29
 
30
  /**
31
  * Constructor
@@ -33,15 +27,14 @@ if ( ! class_exists ( 'YITH_WCMG_Frontend' ) ) {
33
  * @access public
34
  * @since 1.0.0
35
  */
36
- public function __construct ( $version ) {
37
- $this->version = $version;
38
 
39
  // add the action only when the loop is initializate
40
  add_action ( 'template_redirect', array ( $this, 'render' ) );
41
  }
42
 
43
  public function render () {
44
- if ( yith_wcmg_is_enabled () && ! $this->is_video_featured_enabled () ) {
45
  //change the templates
46
  remove_action ( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_images', 20 );
47
  remove_action ( 'woocommerce_product_thumbnails', 'woocommerce_show_product_thumbnails', 20 );
@@ -100,15 +93,29 @@ if ( ! class_exists ( 'YITH_WCMG_Frontend' ) ) {
100
 
101
  $suffix = defined ( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
102
 
103
- wp_register_script ( 'yith-magnifier-slider', YITH_WCMG_URL . 'assets/js/jquery.carouFredSel' . $suffix . '.js', array (
104
- 'jquery',
105
- 'jquery-migrate',
106
- ), '6.2.1', true );
107
- wp_register_script ( 'yith-magnifier', YITH_WCMG_URL . 'assets/js/yith_magnifier' . $suffix . '.js', array ( 'jquery' ), $this->version, true );
108
- wp_register_script ( 'yith_wcmg_frontend', YITH_WCMG_URL . 'assets/js/frontend' . $suffix . '.js', array (
109
- 'jquery',
110
- 'yith-magnifier',
111
- ), $this->version, true );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
112
 
113
  wp_register_style ( 'yith-magnifier', YITH_WCMG_URL . 'assets/css/yith_magnifier.css' );
114
 
@@ -121,18 +128,18 @@ if ( ! class_exists ( 'YITH_WCMG_Frontend' ) ) {
121
 
122
  $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';
123
  wp_enqueue_style ( 'yith_wcmg_frontend', $css );
124
- /*
125
- $append_text_css = '.yith_magnifier_zoom_wrap::after {
126
- content: "' . __ ( "Roll over image to zoom in", "yith-woocommerce-zoom-magnifier" ) . '";
127
- margin: 0 auto;
128
- display: inline-block;
129
- text-align:center;
130
- font-size: 10px;
131
- }
132
- ';
133
-
134
- wp_add_inline_style ( 'yith_wcmg_frontend', $append_text_css );
135
- */
136
  }
137
  }
138
 
@@ -154,21 +161,5 @@ if ( ! class_exists ( 'YITH_WCMG_Frontend' ) ) {
154
  return $data;
155
  }
156
 
157
- /**
158
- * Detect if the featured video is enabled
159
- */
160
- public function is_video_featured_enabled () {
161
- global $post;
162
- if ( ! isset( $post->ID ) ) {
163
- return;
164
- }
165
-
166
- $featured_video = get_post_meta ( $post->ID, '_video_url', true );
167
- if ( ! empty( $featured_video ) ) {
168
- return true;
169
- } else {
170
- return false;
171
- }
172
- }
173
  }
174
  }
19
  * @since 1.0.0
20
  */
21
  class YITH_WCMG_Frontend {
22
+
 
 
 
 
 
 
23
 
24
  /**
25
  * Constructor
27
  * @access public
28
  * @since 1.0.0
29
  */
30
+ public function __construct ( ) {
 
31
 
32
  // add the action only when the loop is initializate
33
  add_action ( 'template_redirect', array ( $this, 'render' ) );
34
  }
35
 
36
  public function render () {
37
+ if ( yith_wcmg_is_enabled () && ! apply_filters ( 'yith_wczm_featured_video_enabled', false ) ) {
38
  //change the templates
39
  remove_action ( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_images', 20 );
40
  remove_action ( 'woocommerce_product_thumbnails', 'woocommerce_show_product_thumbnails', 20 );
93
 
94
  $suffix = defined ( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
95
 
96
+ wp_register_script ( 'yith-magnifier-slider',
97
+ YITH_WCMG_URL . 'assets/js/jquery.carouFredSel' . $suffix . '.js',
98
+ array (
99
+ 'jquery',
100
+ 'jquery-migrate',
101
+ ),
102
+ YITH_YWZM_VERSION,
103
+ true );
104
+
105
+ wp_register_script ( 'yith-magnifier',
106
+ YITH_WCMG_URL . 'assets/js/yith_magnifier' . $suffix . '.js',
107
+ array ( 'jquery' ),
108
+ YITH_YWZM_VERSION,
109
+ true );
110
+
111
+ wp_register_script ( 'yith_wcmg_frontend',
112
+ YITH_WCMG_URL . 'assets/js/frontend' . $suffix . '.js',
113
+ array (
114
+ 'jquery',
115
+ 'yith-magnifier',
116
+ ),
117
+ YITH_YWZM_VERSION,
118
+ true );
119
 
120
  wp_register_style ( 'yith-magnifier', YITH_WCMG_URL . 'assets/css/yith_magnifier.css' );
121
 
128
 
129
  $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';
130
  wp_enqueue_style ( 'yith_wcmg_frontend', $css );
131
+ /*
132
+ $append_text_css = '.yith_magnifier_zoom_wrap::after {
133
+ content: "' . __ ( "Roll over image to zoom in", "yith-woocommerce-zoom-magnifier" ) . '";
134
+ margin: 0 auto;
135
+ display: inline-block;
136
+ text-align:center;
137
+ font-size: 10px;
138
+ }
139
+ ';
140
+
141
+ wp_add_inline_style ( 'yith_wcmg_frontend', $append_text_css );
142
+ */
143
  }
144
  }
145
 
161
  return $data;
162
  }
163
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
164
  }
165
  }
modules/yith-woocommerce-zoom-magnifier/class.yith-wcmg.php CHANGED
@@ -16,13 +16,7 @@ if( !class_exists( 'YITH_WCMG' ) ) {
16
  * @since 1.0.0
17
  */
18
  class YITH_WCMG {
19
- /**
20
- * Plugin version
21
- *
22
- * @var string
23
- * @since 1.0.0
24
- */
25
- public $version = '1.2.13';
26
 
27
  /**
28
  * Plugin object
@@ -44,9 +38,9 @@ if( !class_exists( 'YITH_WCMG' ) ) {
44
  add_action( 'init', array( $this, 'init' ) );
45
 
46
  if( is_admin() ) {
47
- $this->obj = new YITH_WCMG_Admin( $this->version );
48
  } else {
49
- $this->obj = new YITH_WCMG_Frontend( $this->version );
50
  }
51
 
52
  return $this->obj;
16
  * @since 1.0.0
17
  */
18
  class YITH_WCMG {
19
+
 
 
 
 
 
 
20
 
21
  /**
22
  * Plugin object
38
  add_action( 'init', array( $this, 'init' ) );
39
 
40
  if( is_admin() ) {
41
+ $this->obj = new YITH_WCMG_Admin( );
42
  } else {
43
+ $this->obj = new YITH_WCMG_Frontend( );
44
  }
45
 
46
  return $this->obj;
modules/yith-woocommerce-zoom-magnifier/functions.yith-wcmg.php CHANGED
@@ -2,74 +2,77 @@
2
  /**
3
  * Functions
4
  *
5
- * @author Your Inspiration Themes
6
  * @package YITH WooCommerce Zoom Magnifier
7
  * @version 1.1.2
8
  */
9
 
10
- if ( ! defined( 'YITH_WCMG' ) ) {
11
- exit;
12
  } // Exit if accessed directly
13
 
14
- if ( ! function_exists( 'yith_wcmg_is_enabled' ) ) {
15
- /**
16
- * Check if the plugin is enabled for the current context
17
- *
18
- * @param string $path
19
- * @param array $var
20
- *
21
- * @return void
22
- * @since 1.0.0
23
- */
24
- function yith_wcmg_is_enabled() {
25
- if ( wp_is_mobile() ) {
26
- return ( 'yes' == get_option( 'yith_wcmg_enable_mobile' ) );
27
- }
28
 
29
- return get_option( 'yith_wcmg_enable_plugin' ) == 'yes';
30
-
31
- }
32
  }
33
 
34
- if ( ! function_exists( 'yit_shop_single_w' ) ) {
35
- /**
36
- * Return the shop_single image width
37
- *
38
- * @return integer
39
- * @since 1.0.0
40
- */
41
- function yit_shop_single_w() {
42
- global $woocommerce;
43
- $size = yit_get_image_size( 'shop_single' );
44
 
45
- return $size['width'];
46
- }
47
  }
48
 
49
- if ( ! function_exists( 'yit_shop_thumbnail_w' ) ) {
50
- /**
51
- * Return the shop_thumbnail image width
52
- *
53
- * @return integer
54
- * @since 1.0.0
55
- */
56
- function yit_shop_thumbnail_w() {
57
- global $woocommerce;
58
- $size = yit_get_image_size( 'shop_thumbnail' );
59
 
60
- return $size['width'];
61
- }
62
  }
63
 
64
  /* FIX TO WOOCOMMERCE 2.1 */
65
- if ( ! function_exists( 'yit_get_image_size' ) ) {
66
- function yit_get_image_size( $size ) {
67
- if ( function_exists( 'wc_get_image_size' ) ) {
68
- return wc_get_image_size( $size );
69
- } else {
70
- global $woocommerce;
 
 
 
 
 
 
 
 
 
71
 
72
- return $woocommerce->get_image_size( $size );
73
- }
74
- }
75
  }
2
  /**
3
  * Functions
4
  *
5
+ * @author Your Inspiration Themes
6
  * @package YITH WooCommerce Zoom Magnifier
7
  * @version 1.1.2
8
  */
9
 
10
+ if ( ! defined ( 'YITH_WCMG' ) ) {
11
+ exit;
12
  } // Exit if accessed directly
13
 
14
+ if ( ! function_exists ( 'yith_wcmg_is_enabled' ) ) {
15
+ /**
16
+ * Check if the plugin is enabled for the current context
17
+ *
18
+ * @return bool
19
+ * @since 1.0.0
20
+ */
21
+ function yith_wcmg_is_enabled () {
22
+ if ( wp_is_mobile () ) {
23
+ return ( 'yes' == get_option ( 'yith_wcmg_enable_mobile' ) );
24
+ }
 
 
 
25
 
26
+ return get_option ( 'yith_wcmg_enable_plugin' ) == 'yes';
27
+ }
 
28
  }
29
 
30
+ if ( ! function_exists ( 'yit_shop_single_w' ) ) {
31
+ /**
32
+ * Return the shop_single image width
33
+ *
34
+ * @return integer
35
+ * @since 1.0.0
36
+ */
37
+ function yit_shop_single_w () {
38
+ $size = yit_get_image_size ( 'shop_single' );
 
39
 
40
+ return $size[ 'width' ];
41
+ }
42
  }
43
 
44
+ if ( ! function_exists ( 'yit_shop_thumbnail_w' ) ) {
45
+ /**
46
+ * Return the shop_thumbnail image width
47
+ *
48
+ * @return integer
49
+ * @since 1.0.0
50
+ */
51
+ function yit_shop_thumbnail_w () {
52
+ $size = yit_get_image_size ( 'shop_thumbnail' );
 
53
 
54
+ return $size[ 'width' ];
55
+ }
56
  }
57
 
58
  /* FIX TO WOOCOMMERCE 2.1 */
59
+ if ( ! function_exists ( 'yit_get_image_size' ) ) {
60
+ /**
61
+ * Get default image size
62
+ *
63
+ * @param array $size current size
64
+ *
65
+ * @return array
66
+ * @author Lorenzo Giuffrida
67
+ * @since 1.0.0
68
+ */
69
+ function yit_get_image_size ( $size ) {
70
+ if ( function_exists ( 'wc_get_image_size' ) ) {
71
+ return wc_get_image_size ( $size );
72
+ } else {
73
+ global $woocommerce;
74
 
75
+ return $woocommerce->get_image_size ( $size );
76
+ }
77
+ }
78
  }
modules/yith-woocommerce-zoom-magnifier/init.php CHANGED
@@ -3,15 +3,15 @@
3
  * Plugin Name: YITH WooCommerce Zoom Magnifier
4
  * Plugin URI: http://yithemes.com/themes/plugins/yith-woocommerce-zoom-magnifier/
5
  * Description: YITH WooCommerce Zoom Magnifier enables you to add a zoom effect to product images and a thumbnail slider for the product image gallery.
6
- * Version: 1.2.13
7
  * Author: Yithemes
8
  * Author URI: http://yithemes.com/
9
  * Text Domain: yith-woocommerce-zoom-magnifier
10
  * Domain Path: /languages/
11
  *
12
- * @author Your Inspiration Themes
13
  * @package YITH WooCommerce Magnifier
14
- * @version 1.2.13
15
  */
16
  /* Copyright 2013-2015 Your Inspiration Themes (email : plugins@yithemes.com)
17
 
@@ -29,124 +29,124 @@
29
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
30
  */
31
 
32
- if ( ! defined( 'ABSPATH' ) ) {
33
- exit;
34
  } // Exit if accessed directly
35
 
36
- if ( ! function_exists( 'is_plugin_active' ) ) {
37
- require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
38
  }
39
 
40
- function yith_ywzm_install_woocommerce_admin_notice() {
41
- ?>
42
- <div class="error">
43
- <p><?php _e( 'YITH WooCommerce Zoom Magnifier is enabled but not effective. It requires WooCommerce in order to work.', 'yith-woocommerce-zoom-magnifier' ); ?></p>
44
- </div>
45
- <?php
46
- }
47
-
48
-
49
- function yith_ywzm_install_free_admin_notice() {
50
- ?>
51
- <div class="error">
52
- <p><?php _e( 'You can\'t activate the free version of YITH WooCommerce Zoom Magnifier while you are using the premium one.', 'yith-woocommerce-zoom-magnifier' ); ?></p>
53
- </div>
54
- <?php
55
- }
56
-
57
- if ( ! function_exists( 'yith_plugin_registration_hook' ) ) {
58
- require_once 'plugin-fw/yit-plugin-registration-hook.php';
59
- }
60
- register_activation_hook( __FILE__, 'yith_plugin_registration_hook' );
61
-
62
- //region **** Define constants
63
- if ( ! defined( 'YITH_YWZM_FREE_INIT' ) ) {
64
- define( 'YITH_YWZM_FREE_INIT', plugin_basename( __FILE__ ) );
65
- }
66
-
67
- if ( ! defined( 'YITH_YWZM_VERSION' ) ) {
68
- define( 'YITH_YWZM_VERSION', '1.2.13' );
69
- }
70
-
71
- if ( ! defined( 'YITH_YWZM_FILE' ) ) {
72
- define( 'YITH_YWZM_FILE', __FILE__ );
73
- }
74
-
75
- if ( ! defined( 'YITH_YWZM_DIR' ) ) {
76
- define( 'YITH_YWZM_DIR', plugin_dir_path( __FILE__ ) );
77
- }
78
-
79
- if ( ! defined( 'YITH_YWZM_URL' ) ) {
80
- define( 'YITH_YWZM_URL', plugins_url( '/', __FILE__ ) );
81
- }
82
-
83
- if ( ! defined( 'YITH_YWZM_ASSETS_URL' ) ) {
84
- define( 'YITH_YWZM_ASSETS_URL', YITH_YWZM_URL . 'assets' );
85
- }
86
-
87
- if ( ! defined( 'YITH_YWZM_TEMPLATE_DIR' ) ) {
88
- define( 'YITH_YWZM_TEMPLATE_DIR', YITH_YWZM_DIR . 'templates' );
89
  }
90
 
91
- if ( ! defined( 'YITH_YWZM_ASSETS_IMAGES_URL' ) ) {
92
- define( 'YITH_YWZM_ASSETS_IMAGES_URL', YITH_YWZM_ASSETS_URL . '/images/' );
 
 
 
 
 
 
 
 
 
 
 
 
93
  }
94
 
95
- if ( ! defined( 'YITH_YWZM_LIB_DIR' ) ) {
96
- define( 'YITH_YWZM_LIB_DIR', YITH_YWZM_DIR . 'lib/' );
97
  }
98
-
99
- //endregion
100
-
101
- function yith_ywzm_init() {
102
-
103
- /**
104
- * Required functions
105
- */
106
- if ( ! defined( 'YITH_FUNCTIONS' ) ) {
107
- require_once( 'yit-common/yit-functions.php' );
108
- }
109
-
110
- /**
111
- * Load text domain and start plugin
112
- */
113
- load_plugin_textdomain( 'yith-woocommerce-zoom-magnifier', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
114
-
115
- add_option( 'yith_wcmg_slider_direction', apply_filters( 'yith_wcmg_slider_direction', 'left' ) );
116
-
117
- define( 'YITH_WCMG', true );
118
- define( 'YITH_WCMG_URL', plugin_dir_url( __FILE__ ) );
119
-
120
- // Load required classes and functions
121
- require_once( 'functions.yith-wcmg.php' );
122
- require_once( 'class.yith-wcmg-admin.php' );
123
- require_once( 'class.yith-wcmg-frontend.php' );
124
-
125
- require_once( YITH_YWZM_LIB_DIR . 'class.yith-woocommerce-zoom-magnifier.php' );
126
- require_once( YITH_YWZM_LIB_DIR . 'class.yith-ywzm-plugin-fw-loader.php' );
127
- require_once( YITH_YWZM_LIB_DIR . 'class.yith-ywzm-custom-types.php' );
128
-
129
- YITH_YWZM_Plugin_FW_Loader::get_instance();
130
-
131
- // Let's start the game!
132
- global $yith_wcmg;
133
-
134
- $yith_wcmg = new YITH_WooCommerce_Zoom_Magnifier();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
135
  }
136
-
137
- add_action( 'yith_ywzm_init', 'yith_ywzm_init' );
138
-
139
-
140
- function yith_ywzm_install() {
141
-
142
- if ( ! function_exists( 'WC' ) ) {
143
- add_action( 'admin_notices', 'yith_ywzm_install_woocommerce_admin_notice' );
144
- } elseif ( defined( 'YITH_YWZM_PREMIUM' ) ) {
145
- add_action( 'admin_notices', 'yith_ywzm_install_free_admin_notice' );
146
- deactivate_plugins( plugin_basename( __FILE__ ) );
147
- } else {
148
- do_action( 'yith_ywzm_init' );
149
- }
 
 
 
 
 
 
150
  }
151
 
152
- add_action( 'plugins_loaded', 'yith_ywzm_install', 11 );
3
  * Plugin Name: YITH WooCommerce Zoom Magnifier
4
  * Plugin URI: http://yithemes.com/themes/plugins/yith-woocommerce-zoom-magnifier/
5
  * Description: YITH WooCommerce Zoom Magnifier enables you to add a zoom effect to product images and a thumbnail slider for the product image gallery.
6
+ * Version: 1.2.15
7
  * Author: Yithemes
8
  * Author URI: http://yithemes.com/
9
  * Text Domain: yith-woocommerce-zoom-magnifier
10
  * Domain Path: /languages/
11
  *
12
+ * @author Your Inspiration Themes
13
  * @package YITH WooCommerce Magnifier
14
+ * @version 1.2.15
15
  */
16
  /* Copyright 2013-2015 Your Inspiration Themes (email : plugins@yithemes.com)
17
 
29
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
30
  */
31
 
32
+ if ( ! defined ( 'ABSPATH' ) ) {
33
+ exit;
34
  } // Exit if accessed directly
35
 
36
+ if ( ! function_exists ( 'is_plugin_active' ) ) {
37
+ require_once ( ABSPATH . 'wp-admin/includes/plugin.php' );
38
  }
39
 
40
+ if ( ! function_exists ( 'yith_ywzm_install_woocommerce_admin_notice' ) ) {
41
+ /**
42
+ * WooCommerce is not enabled, the plugin will not be effective
43
+ *
44
+ * @author Lorenzo Giuffrida
45
+ * @since 1.0.0
46
+ */
47
+ function yith_ywzm_install_woocommerce_admin_notice () {
48
+ ?>
49
+ <div class="error">
50
+ <p><?php _e ( 'YITH WooCommerce Zoom Magnifier is enabled but not effective. It requires WooCommerce in order to work.', 'yith-woocommerce-zoom-magnifier' ); ?></p>
51
+ </div>
52
+ <?php
53
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
  }
55
 
56
+ if ( ! function_exists ( 'yith_ywzm_install_free_admin_notice' ) ) {
57
+ /**
58
+ * Unable to activate the free version while the premium version is active
59
+ *
60
+ * @author Lorenzo Giuffrida
61
+ * @since 1.0.0
62
+ */
63
+ function yith_ywzm_install_free_admin_notice () {
64
+ ?>
65
+ <div class="error">
66
+ <p><?php _e ( 'You can\'t activate the free version of YITH WooCommerce Zoom Magnifier while you are using the premium one.', 'yith-woocommerce-zoom-magnifier' ); ?></p>
67
+ </div>
68
+ <?php
69
+ }
70
  }
71
 
72
+ if ( ! function_exists ( 'yith_plugin_registration_hook' ) ) {
73
+ require_once 'plugin-fw/yit-plugin-registration-hook.php';
74
  }
75
+ register_activation_hook ( __FILE__, 'yith_plugin_registration_hook' );
76
+
77
+ defined ( 'YITH_YWZM_FREE_INIT' ) || define ( 'YITH_YWZM_FREE_INIT', plugin_basename ( __FILE__ ) );
78
+ defined ( 'YITH_YWZM_VERSION' ) || define ( 'YITH_YWZM_VERSION', '1.2.15' );
79
+ defined ( 'YITH_YWZM_FILE' ) || define ( 'YITH_YWZM_FILE', __FILE__ );
80
+ defined ( 'YITH_YWZM_DIR' ) || define ( 'YITH_YWZM_DIR', plugin_dir_path ( __FILE__ ) );
81
+ defined ( 'YITH_YWZM_URL' ) || define ( 'YITH_YWZM_URL', plugins_url ( '/', __FILE__ ) );
82
+ defined ( 'YITH_YWZM_ASSETS_URL' ) || define ( 'YITH_YWZM_ASSETS_URL', YITH_YWZM_URL . 'assets' );
83
+ defined ( 'YITH_YWZM_TEMPLATE_DIR' ) || define ( 'YITH_YWZM_TEMPLATE_DIR', YITH_YWZM_DIR . 'templates' );
84
+ defined ( 'YITH_YWZM_ASSETS_IMAGES_URL' ) || define ( 'YITH_YWZM_ASSETS_IMAGES_URL', YITH_YWZM_ASSETS_URL . '/images/' );
85
+ defined ( 'YITH_YWZM_LIB_DIR' ) || define ( 'YITH_YWZM_LIB_DIR', YITH_YWZM_DIR . 'lib/' );
86
+
87
+ if ( ! function_exists ( 'yith_ywzm_init' ) ) {
88
+ /**
89
+ * Init the plugin
90
+ *
91
+ * @author Lorenzo Giuffrida
92
+ * @since 1.0.0
93
+ */
94
+ function yith_ywzm_init () {
95
+
96
+ /**
97
+ * Required functions
98
+ */
99
+ if ( ! defined ( 'YITH_FUNCTIONS' ) ) {
100
+ require_once ( 'yit-common/yit-functions.php' );
101
+ }
102
+
103
+ /**
104
+ * Load text domain and start plugin
105
+ */
106
+ load_plugin_textdomain ( 'yith-woocommerce-zoom-magnifier', false, dirname ( plugin_basename ( __FILE__ ) ) . '/languages/' );
107
+
108
+ add_option ( 'yith_wcmg_slider_direction', apply_filters ( 'yith_wcmg_slider_direction', 'left' ) );
109
+
110
+ define ( 'YITH_WCMG', true );
111
+ define ( 'YITH_WCMG_URL', plugin_dir_url ( __FILE__ ) );
112
+
113
+ // Load required classes and functions
114
+ require_once ( 'functions.yith-wcmg.php' );
115
+ require_once ( 'class.yith-wcmg-admin.php' );
116
+ require_once ( 'class.yith-wcmg-frontend.php' );
117
+
118
+ require_once ( YITH_YWZM_LIB_DIR . 'class.yith-woocommerce-zoom-magnifier.php' );
119
+ require_once ( YITH_YWZM_LIB_DIR . 'class.yith-ywzm-plugin-fw-loader.php' );
120
+ require_once ( YITH_YWZM_LIB_DIR . 'class.yith-ywzm-custom-types.php' );
121
+
122
+ YITH_YWZM_Plugin_FW_Loader::get_instance ();
123
+
124
+ // Let's start the game!
125
+ global $yith_wcmg;
126
+
127
+ $yith_wcmg = new YITH_WooCommerce_Zoom_Magnifier();
128
+ }
129
  }
130
+ add_action ( 'yith_ywzm_init', 'yith_ywzm_init' );
131
+
132
+ if ( ! function_exists ( 'yith_ywzm_install' ) ) {
133
+ /**
134
+ * install the plugin
135
+ *
136
+ * @author Lorenzo Giuffrida
137
+ * @since 1.0.0
138
+ */
139
+ function yith_ywzm_install () {
140
+
141
+ if ( ! function_exists ( 'WC' ) ) {
142
+ add_action ( 'admin_notices', 'yith_ywzm_install_woocommerce_admin_notice' );
143
+ } elseif ( defined ( 'YITH_YWZM_PREMIUM' ) ) {
144
+ add_action ( 'admin_notices', 'yith_ywzm_install_free_admin_notice' );
145
+ deactivate_plugins ( plugin_basename ( __FILE__ ) );
146
+ } else {
147
+ do_action ( 'yith_ywzm_init' );
148
+ }
149
+ }
150
  }
151
 
152
+ add_action ( 'plugins_loaded', 'yith_ywzm_install', 11 );
modules/yith-woocommerce-zoom-magnifier/lib/class.yith-woocommerce-zoom-magnifier.php CHANGED
@@ -19,13 +19,6 @@ if ( ! class_exists( 'YITH_WooCommerce_Zoom_Magnifier' ) ) {
19
  * @since 1.0.0
20
  */
21
  class YITH_WooCommerce_Zoom_Magnifier {
22
- /**
23
- * Plugin version
24
- *
25
- * @var string
26
- * @since 1.0.0
27
- */
28
- public $version = '1.2.13';
29
 
30
  /**
31
  * Plugin object
@@ -51,9 +44,9 @@ if ( ! class_exists( 'YITH_WooCommerce_Zoom_Magnifier' ) ) {
51
  add_action( 'init', array( $this, 'init' ) );
52
 
53
  if ( is_admin() && ( ! isset( $_REQUEST['action'] ) || ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] != 'yith_load_product_quick_view' ) ) ) {
54
- $this->obj = new YITH_WCMG_Admin( $this->version );
55
  } else {
56
- $this->obj = new YITH_WCMG_Frontend( $this->version );
57
  }
58
 
59
  return $this->obj;
19
  * @since 1.0.0
20
  */
21
  class YITH_WooCommerce_Zoom_Magnifier {
 
 
 
 
 
 
 
22
 
23
  /**
24
  * Plugin object
44
  add_action( 'init', array( $this, 'init' ) );
45
 
46
  if ( is_admin() && ( ! isset( $_REQUEST['action'] ) || ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] != 'yith_load_product_quick_view' ) ) ) {
47
+ $this->obj = new YITH_WCMG_Admin( );
48
  } else {
49
+ $this->obj = new YITH_WCMG_Frontend( );
50
  }
51
 
52
  return $this->obj;
modules/yith-woocommerce-zoom-magnifier/lib/class.yith-ywzm-plugin-fw-loader.php CHANGED
@@ -101,7 +101,7 @@ if ( ! class_exists( 'YITH_YWZM_Plugin_FW_Loader' ) ) {
101
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
102
  */
103
  public function plugin_fw_loader() {
104
- if ( ! defined( 'YIT_CORE_PLUGIN' ) ) {
105
  require_once( YITH_YWZM_DIR . 'plugin-fw/yit-plugin.php' );
106
  }
107
  }
101
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
102
  */
103
  public function plugin_fw_loader() {
104
+ if ( defined( 'YIT_CORE_PLUGIN' ) ) {
105
  require_once( YITH_YWZM_DIR . 'plugin-fw/yit-plugin.php' );
106
  }
107
  }
plugin-fw/init.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  * Framework Name: YIT Plugin Framework
4
- * Version: 2.9.6
5
  * Author: Yithemes
6
  * Text Domain: yith-plugin-fw
7
  * Domain Path: /languages/
1
  <?php
2
  /**
3
  * Framework Name: YIT Plugin Framework
4
+ * Version: 2.9.7
5
  * Author: Yithemes
6
  * Text Domain: yith-plugin-fw
7
  * Domain Path: /languages/
plugin-fw/lib/yit-plugin-panel.php CHANGED
@@ -146,8 +146,8 @@ if ( ! class_exists( 'YIT_Plugin_Panel' ) ) {
146
  wp_enqueue_style( 'raleway-font', '//fonts.googleapis.com/css?family=Raleway:400,500,600,700,800,100,200,300,900' );
147
  wp_enqueue_style( 'jquery-chosen', YIT_CORE_PLUGIN_URL . '/assets/css/chosen/chosen.css' );
148
  wp_enqueue_style( 'yit-jquery-ui-style', '//code.jquery.com/ui/' . $jquery_version . '/themes/smoothness/jquery-ui.css', array(), $jquery_version );
149
-
150
- if( 'admin.php' == $pagenow && strpos('yit-plugins_page',get_current_screen()->id ) !== false ){
151
  wp_enqueue_style( 'yit-plugin-style' );
152
  wp_enqueue_script( 'yit-plugin-panel' );
153
  }
146
  wp_enqueue_style( 'raleway-font', '//fonts.googleapis.com/css?family=Raleway:400,500,600,700,800,100,200,300,900' );
147
  wp_enqueue_style( 'jquery-chosen', YIT_CORE_PLUGIN_URL . '/assets/css/chosen/chosen.css' );
148
  wp_enqueue_style( 'yit-jquery-ui-style', '//code.jquery.com/ui/' . $jquery_version . '/themes/smoothness/jquery-ui.css', array(), $jquery_version );
149
+
150
+ if( ( 'admin.php' == $pagenow && strpos( get_current_screen()->id, 'yit-plugins_page' ) !== false ) || apply_filters( 'yit_plugin_panel_asset_loading', false ) ){
151
  wp_enqueue_style( 'yit-plugin-style' );
152
  wp_enqueue_script( 'yit-plugin-panel' );
153
  }
yith-jetpack.php CHANGED
@@ -18,6 +18,8 @@ if ( ! class_exists( 'YITH_JetPack' ) ) {
18
 
19
  const MODULE_LIST_OPTION_NAME = 'yith_jetpack_inserted_modules';
20
 
 
 
21
  const MODULES_LIST_QUERY_VALUE = 'yith-jetpack-modules';
22
 
23
  const PLUGIN_LIST_HIDE_NOTICE_OPTION_NAME = 'yith_jetpack_m_hide_notice';
@@ -37,6 +39,8 @@ if ( ! class_exists( 'YITH_JetPack' ) ) {
37
 
38
  protected $_module_list_option_name = null;
39
 
 
 
40
  protected $_modules_list_query_value = null;
41
 
42
  protected $_plugin_list_hide_notice_option_name = null;
@@ -61,6 +65,7 @@ if ( ! class_exists( 'YITH_JetPack' ) ) {
61
  $this->_activate_module_option_name = self::ACTIVATED_MODULES_OPTION_BASE_NAME.$this->$index;
62
  $this->_deactivated_plugin_option_name = self::DEACTIVATED_PLUGIN_OPTION_NAME.$this->$index;
63
  $this->_module_list_option_name = self::MODULE_LIST_OPTION_NAME.$this->$index;
 
64
  $this->_modules_list_query_value = self::MODULES_LIST_QUERY_VALUE.$this->$index;
65
  $this->_plugin_list_hide_notice_option_name = self::PLUGIN_LIST_HIDE_NOTICE_OPTION_NAME.$this->$index;
66
 
@@ -327,9 +332,14 @@ if ( ! class_exists( 'YITH_JetPack' ) ) {
327
  $active_modules = $this->active_modules();
328
  foreach ( $modules as $module => $args ) {
329
  if ( in_array( $module, array_keys( $active_modules ) ) ) {
330
- include_once( $this->module_path( $module, $args['file'] ) );
331
- }
332
 
 
 
 
 
 
 
 
333
  }
334
 
335
  }
@@ -494,17 +504,22 @@ if ( ! class_exists( 'YITH_JetPack' ) ) {
494
  foreach ( $this->_active_modules as $key => $item ) {
495
  $is_recommended = in_array( $key, $recommended_modules_list );
496
  if ( $is_recommended ) {
 
497
  unset( $this->_active_modules[$key] );
498
  }
499
  }
500
  }
501
  else {
 
 
 
502
  $this->_active_modules = array();
503
  }
504
 
505
  }
506
  else {
507
  if ( isset( $this->_active_modules[$module] ) ) {
 
508
  unset( $this->_active_modules[$module] );
509
  }
510
  }
@@ -749,5 +764,44 @@ if ( ! class_exists( 'YITH_JetPack' ) ) {
749
  }
750
  }
751
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
752
  }
753
  }
18
 
19
  const MODULE_LIST_OPTION_NAME = 'yith_jetpack_inserted_modules';
20
 
21
+ const MODULE_LIST_ACTIVATION_HOOK_OPTION_NAME = 'yith_jetpack_activation_hook';
22
+
23
  const MODULES_LIST_QUERY_VALUE = 'yith-jetpack-modules';
24
 
25
  const PLUGIN_LIST_HIDE_NOTICE_OPTION_NAME = 'yith_jetpack_m_hide_notice';
39
 
40
  protected $_module_list_option_name = null;
41
 
42
+ protected $_module_activation_hook_option_name = null;
43
+
44
  protected $_modules_list_query_value = null;
45
 
46
  protected $_plugin_list_hide_notice_option_name = null;
65
  $this->_activate_module_option_name = self::ACTIVATED_MODULES_OPTION_BASE_NAME.$this->$index;
66
  $this->_deactivated_plugin_option_name = self::DEACTIVATED_PLUGIN_OPTION_NAME.$this->$index;
67
  $this->_module_list_option_name = self::MODULE_LIST_OPTION_NAME.$this->$index;
68
+ $this->_module_activation_hook_option_name = self::MODULE_LIST_ACTIVATION_HOOK_OPTION_NAME.$this->$index;
69
  $this->_modules_list_query_value = self::MODULES_LIST_QUERY_VALUE.$this->$index;
70
  $this->_plugin_list_hide_notice_option_name = self::PLUGIN_LIST_HIDE_NOTICE_OPTION_NAME.$this->$index;
71
 
332
  $active_modules = $this->active_modules();
333
  foreach ( $modules as $module => $args ) {
334
  if ( in_array( $module, array_keys( $active_modules ) ) ) {
 
 
335
 
336
+ $path = $this->module_path( $module, $args['file'] );
337
+
338
+ include_once( $path );
339
+
340
+ $this->register_activation_hook( $path ) ;
341
+
342
+ }
343
  }
344
 
345
  }
504
  foreach ( $this->_active_modules as $key => $item ) {
505
  $is_recommended = in_array( $key, $recommended_modules_list );
506
  if ( $is_recommended ) {
507
+ $this->register_deactivation_hook( $this->module_path( $key , $item['file'] ) );
508
  unset( $this->_active_modules[$key] );
509
  }
510
  }
511
  }
512
  else {
513
+ foreach ( $this->_active_modules as $key => $item ) {
514
+ $this->register_deactivation_hook( $this->module_path( $key , $item['file'] ) );
515
+ }
516
  $this->_active_modules = array();
517
  }
518
 
519
  }
520
  else {
521
  if ( isset( $this->_active_modules[$module] ) ) {
522
+ $this->register_deactivation_hook( $this->module_path( $module , $this->_active_modules[$module]['file'] ) );
523
  unset( $this->_active_modules[$module] );
524
  }
525
  }
764
  }
765
  }
766
 
767
+ /**
768
+ * Activation Hook
769
+ *
770
+ * call activation action
771
+ *
772
+ * @author Andrea Frascaspata <andrea.frascaspata@yithemes.it>
773
+ */
774
+ public function register_activation_hook( $path ) {
775
+
776
+ $activation_list = get_option( $this->_module_activation_hook_option_name, array() );
777
+ $file = plugin_basename( $path );
778
+ if ( ! in_array( $file, array_keys( $activation_list ) ) ) {
779
+
780
+ do_action( 'activate_' . $file );
781
+
782
+ $activation_list[$file] = true;
783
+ update_option( $this->_module_activation_hook_option_name , $activation_list);
784
+
785
+ }
786
+
787
+ }
788
+
789
+ /**
790
+ * Deactivation Hook
791
+ *
792
+ * call deactivation action
793
+ *
794
+ * @author Andrea Frascaspata <andrea.frascaspata@yithemes.it>
795
+ */
796
+ public function register_deactivation_hook( $path ) {
797
+
798
+ $activation_list = get_option( $this->_module_activation_hook_option_name, array() );
799
+ $file = plugin_basename( $path );
800
+ do_action( 'deactivate_' . $file );
801
+
802
+ unset( $activation_list[$file] );
803
+ update_option( $this->_module_activation_hook_option_name , $activation_list);
804
+ }
805
+
806
  }
807
  }