YITH WooCommerce Ajax Product Filter - Version 3.6.0

Version Description

  • Released on 11th October, 2018 =

  • New: Support for WooCommerce 3.5

  • New: Support for Aardvark theme

  • New: Support for Aurum theme

  • New: Support for UX Shop theme

  • New: Support for YooTheme theme

  • Fix: Wrong results with search query string

  • Fix: Double chosen icon with themes that override layered navigation style

  • Tweak: Widget reinit after ajax call

  • Tweak: Flatsome optimization

  • Tweak: Prevent untrailingslashit on filter url for SEO optimization

  • Update: Spanish language

  • Update: Italian Language

  • Dev: yith_wcan_skip_no_products_label hook

Download this release

Release Info

Developer yithemes
Plugin Icon 128x128 YITH WooCommerce Ajax Product Filter
Version 3.6.0
Comparing to
See all releases

Code changes from version 3.5.1 to 3.6.0

Files changed (63) hide show
  1. README.txt +20 -4
  2. assets/css/frontend.css +7 -1
  3. assets/js/yith-wcan-frontend.js +8 -0
  4. assets/js/yith-wcan-frontend.min.js +16 -16
  5. includes/class.yith-wcan-admin.php +24 -23
  6. includes/class.yith-wcan-frontend.php +24 -5
  7. includes/functions.yith-wcan.php +31 -5
  8. init.php +6 -6
  9. plugin-fw/assets/css/metaboxes.css +3 -0
  10. plugin-fw/assets/css/yith-fields.css +47 -0
  11. plugin-fw/assets/css/yith-select2-no-wc.css +741 -0
  12. plugin-fw/assets/js/jquery.colorbox.min.js +33 -24
  13. plugin-fw/assets/js/metabox.min.js +7 -4
  14. plugin-fw/assets/js/multisite-updater.js +75 -79
  15. plugin-fw/assets/js/multisite-updater.min.js +7 -4
  16. plugin-fw/assets/js/yit-cpt-unlimited.min.js +2 -2
  17. plugin-fw/assets/js/yit-wp-pointer.min.js +6 -3
  18. plugin-fw/assets/js/yith-enhanced-select-wc-2.6.min.js +5 -5
  19. plugin-fw/assets/js/yith-enhanced-select.min.js +8 -5
  20. plugin-fw/assets/js/yith-fields.js +27 -13
  21. plugin-fw/assets/js/yith-fields.min.js +11 -11
  22. plugin-fw/init.php +3 -3
  23. plugin-fw/languages/yith-plugin-fw-es_ES.mo +0 -0
  24. plugin-fw/languages/yith-plugin-fw-es_ES.po +466 -421
  25. plugin-fw/languages/yith-plugin-fw-it_IT.mo +0 -0
  26. plugin-fw/languages/yith-plugin-fw-it_IT.po +466 -425
  27. plugin-fw/languages/yith-plugin-fw.pot +167 -354
  28. plugin-fw/lib/privacy/yit-privacy-plugin-abstract.php +29 -0
  29. plugin-fw/lib/privacy/yit-privacy.php +79 -0
  30. plugin-fw/lib/yit-ajax.php +3 -3
  31. plugin-fw/lib/yit-assets.php +12 -8
  32. plugin-fw/lib/yit-cpt-unlimited.php +1 -1
  33. plugin-fw/lib/yit-debug.php +2 -3
  34. plugin-fw/lib/yit-icons.php +1 -1
  35. plugin-fw/lib/yit-metabox.php +6 -2
  36. plugin-fw/lib/yit-plugin-panel-wc.php +15 -9
  37. plugin-fw/lib/yit-plugin-panel.php +27 -17
  38. plugin-fw/lib/yit-plugin-subpanel.php +7 -6
  39. plugin-fw/lib/yit-pointers.php +4 -4
  40. plugin-fw/lib/yit-upgrade.php +643 -564
  41. plugin-fw/lib/yit-video.php +4 -2
  42. plugin-fw/licence/assets/js/yit-licence.js +145 -141
  43. plugin-fw/licence/assets/js/yit-licence.min.js +10 -7
  44. plugin-fw/licence/lib/yit-licence.php +18 -11
  45. plugin-fw/licence/lib/yit-plugin-licence.php +44 -9
  46. plugin-fw/licence/lib/yit-theme-licence.php +2 -2
  47. plugin-fw/licence/templates/panel/activation/activation-panel.php +149 -145
  48. plugin-fw/templates/fields/ajax-posts.php +1 -2
  49. plugin-fw/templates/fields/ajax-terms.php +1 -2
  50. plugin-fw/templates/fields/onoff.php +6 -1
  51. plugin-fw/templates/fields/resources/select2-wc-2.6.php +31 -0
  52. plugin-fw/templates/fields/resources/select2.php +43 -0
  53. plugin-fw/templates/fields/select-images.php +52 -0
  54. plugin-fw/templates/metaboxes/types/icon-list.php +1 -1
  55. plugin-fw/templates/panel/panel-field-container.php +1 -1
  56. plugin-fw/templates/panel/woocommerce/woocommerce-upload.php +1 -1
  57. plugin-fw/templates/privacy/html-policy-content.php +37 -0
  58. plugin-fw/templates/upgrade/changelog.php +51 -0
  59. plugin-fw/templates/upgrade/error.php +147 -0
  60. plugin-fw/yit-functions.php +95 -7
  61. plugin-fw/yit-plugin.php +150 -0
  62. widgets/class.yith-wcan-navigation-widget.php +20 -15
  63. widgets/class.yith-wcan-reset-navigation-widget.php +4 -2
README.txt CHANGED
@@ -3,8 +3,8 @@
3
Contributors: yithemes
4
Tags: woocommerce ajax product filter download, woocommerce, widget, ajax, ajax filtered nav, ajax navigation, ajax filtered navigation, woocommerce layered navigation, woocommerce layered nav, product filter, product filters, ajax product filter, woocommerce ajax product filter, woocommerce filters, sidebar filter, sidebar ajax filter, ajax price filter, price filter, product sorting, woocommerce filter, taxonomy filter, attribute filter, attributes filter, woocommerce product sort, ajax sort, woocommerce ajax product filter, advanced product filters, ajax product filters, filters, woocommerce ajax product filters, woocommerce product filters, woocommerce product filters, category filter, attribute filters, woocommerce products filter, woocommerce price filter, yit, yith, yithemes
5
Requires at least: 4.0
6
- Tested up to: 4.9.4
7
- Stable tag: 3.5.1
8
License: GPLv2 or later
9
License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
@@ -23,7 +23,7 @@ All this can be done in a quick and very intuitive way that will certainly help
23
Working demos for YITH WooCommerce Ajax Product Filter are available here:
24
**[LIVE DEMO](https://plugins.yithemes.com/yith-woocommerce-ajax-product-filter/)**
25
26
- Full documentation for YITH WooCommerce Ajax Product Filter is available [here](http://yithemes.com/docs-plugins/yith-woocommerce-ajax-product-filter/).
27
28
**Main Features of YITH WooCommerce Ajax Product Filter:**
29
@@ -159,6 +159,22 @@ If you want to see a demonstration version of the premium plugin, you can see it
159
160
== Changelog ==
161
162
= 3.5.1 - Released on 14th March, 2018 =
163
164
* Tweak: Removed old YITH_WCAN_Helper class
@@ -580,7 +596,7 @@ If you have created your own language pack, or have an update for an existing on
580
581
== Documentation ==
582
583
- Full documentation is available [here](http://yithemes.com/docs-plugins/yith_woocommerce_ajax_navigation/).
584
585
== Upgrade notice ==
586
3
Contributors: yithemes
4
Tags: woocommerce ajax product filter download, woocommerce, widget, ajax, ajax filtered nav, ajax navigation, ajax filtered navigation, woocommerce layered navigation, woocommerce layered nav, product filter, product filters, ajax product filter, woocommerce ajax product filter, woocommerce filters, sidebar filter, sidebar ajax filter, ajax price filter, price filter, product sorting, woocommerce filter, taxonomy filter, attribute filter, attributes filter, woocommerce product sort, ajax sort, woocommerce ajax product filter, advanced product filters, ajax product filters, filters, woocommerce ajax product filters, woocommerce product filters, woocommerce product filters, category filter, attribute filters, woocommerce products filter, woocommerce price filter, yit, yith, yithemes
5
Requires at least: 4.0
6
+ Tested up to: 4.9
7
+ Stable tag: 3.6.0
8
License: GPLv2 or later
9
License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
23
Working demos for YITH WooCommerce Ajax Product Filter are available here:
24
**[LIVE DEMO](https://plugins.yithemes.com/yith-woocommerce-ajax-product-filter/)**
25
26
+ Full documentation for YITH WooCommerce Ajax Product Filter is available [here](https://docs.yithemes.com/yith-woocommerce-ajax-product-filter/).
27
28
**Main Features of YITH WooCommerce Ajax Product Filter:**
29
159
160
== Changelog ==
161
162
+ = 3.6.0 - Released on 11th October, 2018 =
163
+
164
+ * New: Support for WooCommerce 3.5
165
+ * New: Support for Aardvark theme
166
+ * New: Support for Aurum theme
167
+ * New: Support for UX Shop theme
168
+ * New: Support for YooTheme theme
169
+ * Fix: Wrong results with search query string
170
+ * Fix: Double chosen icon with themes that override layered navigation style
171
+ * Tweak: Widget reinit after ajax call
172
+ * Tweak: Flatsome optimization
173
+ * Tweak: Prevent untrailingslashit on filter url for SEO optimization
174
+ * Update: Spanish language
175
+ * Update: Italian Language
176
+ * Dev: yith_wcan_skip_no_products_label hook
177
+
178
= 3.5.1 - Released on 14th March, 2018 =
179
180
* Tweak: Removed old YITH_WCAN_Helper class
596
597
== Documentation ==
598
599
+ Full documentation is available [here](https://docs.yithemes.com/yith-woocommerce-ajax-product-filter/).
600
601
== Upgrade notice ==
602
assets/css/frontend.css CHANGED
@@ -301,10 +301,16 @@ ul.yith-wcan-list li.chosen a:before{
301
.yith-woocommerce-ajax-product-filter.with-checkbox ul.orderby li a.active:before,
302
.yith-woocommerce-ajax-product-filter.with-checkbox ul.orderby li a.chosen:before,
303
.yith-woocommerce-ajax-product-filter.with-checkbox ul.orderby li.active a:before,
304
- .yith-woocommerce-ajax-product-filter.with-checkbox ul.orderby li.chosen a:before{
305
content: '';
306
background-position: bottom center;
307
}
308
.yith-woocommerce-ajax-product-filter.with-checkbox ul li a:after,
309
.yith-woocommerce-ajax-product-filter.with-checkbox ul li a.active:after,
310
.yith-woocommerce-ajax-product-filter.with-checkbox ul li a.chosen:after,
301
.yith-woocommerce-ajax-product-filter.with-checkbox ul.orderby li a.active:before,
302
.yith-woocommerce-ajax-product-filter.with-checkbox ul.orderby li a.chosen:before,
303
.yith-woocommerce-ajax-product-filter.with-checkbox ul.orderby li.active a:before,
304
+ .yith-woocommerce-ajax-product-filter.with-checkbox ul.orderby li.chosen a:before,
305
+ .widget_layered_nav.with-checkbox .chosen::before{
306
content: '';
307
background-position: bottom center;
308
}
309
+
310
+ .widget_layered_nav.with-checkbox .chosen::before{
311
+ display: none;
312
+ }
313
+
314
.yith-woocommerce-ajax-product-filter.with-checkbox ul li a:after,
315
.yith-woocommerce-ajax-product-filter.with-checkbox ul li a.active:after,
316
.yith-woocommerce-ajax-product-filter.with-checkbox ul li a.chosen:after,
assets/js/yith-wcan-frontend.js CHANGED
@@ -248,6 +248,14 @@ jQuery(function ($) {
248
widget_reload(t)
249
});
250
251
/* === Avada Theme Support === */
252
if( yith_wcan.avada.is_enabled == 1 ) {
253
var avada_sort_count = $(yith_wcan.avada.sort_count);
248
widget_reload(t)
249
});
250
251
+ /* === YooTheme Theme Support === */
252
+ if( yith_wcan.yootheme.is_enabled == 1 ){
253
+ $('.widget-yith-woo-ajax-navigation').add('.widget-yith-woo-ajax-navigation-sort-by').add('.widget-yith-woo-ajax-reset-navigation').add('.widget-yith-wcan-stock-on-sale').add('.widget-yith-wcan-list-price-filter').each(function () {
254
+ var t = $(this);
255
+ widget_reload(t)
256
+ });
257
+ }
258
+
259
/* === Avada Theme Support === */
260
if( yith_wcan.avada.is_enabled == 1 ) {
261
var avada_sort_count = $(yith_wcan.avada.sort_count);
assets/js/yith-wcan-frontend.min.js CHANGED
@@ -1,17 +1,17 @@
1
- jQuery(function(a){function y(h){a(h).parent().find("div.yith-wcan-select-wrapper").css("z-index","1").animate({visibility:"visible",opacity:1},{duration:300,start:function(){a(this).css("display","block")}});a(h).parent().find("a.yit-wcan-select-open").addClass("active")}function z(h){a(h).parent().find("div.yith-wcan-select-wrapper").css("z-index","-1").animate({visibility:"hidden",opacity:0},300,function(){a(this).css("display","none")});a(h).parent().find("a.yit-wcan-select-open").removeClass("active")}
2
- function u(a,p){return a.replace(new RegExp("[?&]"+p+"=[^&#]*(#.*)?quot;),"$1").replace(new RegExp("([?&])"+p+"=[^&]*&"),"$1")}var A=/(?!(\[))(\.)[^.#[]*/g,B=/(#)[^.#[]*/,C=/^[\w]+/,D=/^[\w]+#x2F;,v=function(h,p){if(D.test(h))var b=[{tag:h}];else{b=h;for(var d={sel:[],val:[]},n=[],c=!1,k="",m=[],l=0,g=b.length;l<g;l++){var f=b.charAt(l);if(c)if("\\"===f&&l+1<b.length)m.push(b.charAt(++l));else if(k===f)k="",m.push(f);else if(("'"===f||'"'===f)&&""===k)k=f,m.push(f);else if("]"===f&&""===k)d.val.push(m.join("")),
3
- m=[],c=!1;else{if("]"!==f||""!==k)""===k&&","===f?(d.val.push(m.join("")),m=[]):m.push(f)}else"\\"===f&&l+1<b.length?c&&m.push(b.charAt(++l)):"["===f&&""===k?c=!0:" "===f||"+"===f?(d.sel=d.sel.join(""),n.push(d),"+"===f&&n.push({sel:"+",val:""}),d={sel:[],val:[]}):" "!==f&&"]"!==f&&d.sel.push(f)}if(0!=d.sel.length||0!=d.val.length)d.sel=d.sel.join(""),n.push(d);for(l=0;l<n.length;l++){d=n[l].sel;if("+"===d)e.tag=d;else{var e=[];e.tag=C.exec(d);e.id=B.exec(d);e.id&&a.isArray(e.id)&&(e.id=e.id[0].substr(1));
4
- e.tag||(e.tag="div");e.vars=[];for(b=0;b<n[l].val.length;b++)k=n[l].val[b].indexOf("="),c=n[l].val[b].substr(0,k),k=n[l].val[b].substr(k+1),k=k.replace(/^[\s]*[\"\']*|[\"\']*[\s]*#x2F;g,""),"text"===c?e.text=k:e.vars.push([c,k]);d=d.match(A);c=[];if(d){for(b=0;b<d.length;b++)c.push(d[b].substr(1));e.className=c.join(" ")}}n[l]=e}b=n}d=[];"undefined"===typeof p&&(p=1);n=[];c=[];k=[];m=document.createElement("div");for(g=l=0;g<b.length;g++){if("+"==b[g].tag)c=k.slice(),--l;else{for(f=0;f<p;f++)if("input"==
5
- b[g].tag){e=[];e.push("<"+b[g].tag);b[g].id&&e.push("id='"+b[g].id+"'");b[g].className&&(e.push("class='"+b[g].className),g+1===b.length&&e.push(lastClass),e.push("'"));if(b[g].vars)for(var q=0;q<b[g].vars.length;q++)e.push(b[g].vars[q][0]+"='"+b[g].vars[q][1]+"'");b[g].text&&e.push("value='"+b[g].text+"'");e.push("/>");k[f]=c[f];c[f]?(c[f].innerHTML+=e.join(" "),c[f]=c[f].lastChild):(m.innerHTML=e.join(" "),c[f]=m.removeChild(m.firstChild))}else{e=document.createElement(b[g].tag);if(b[g].vars)for(q=
6
- 0;q<b[g].vars.length;q++)console.log(b[g].tag,b[g].vars[q]),e.setAttribute(b[g].vars[q][0],b[g].vars[q][1]);b[g].id&&(e.id=b[g].id);b[g].className&&(e.className=b[g].className);b[g].text&&e.appendChild(document.createTextNode(b[g].text));k[f]=c[f];c[f]=c[f]?c[f].appendChild(e):e}l++||Array.prototype.push.apply(n,c)}d=a.merge(d,c)}return a(n)},w=function(h,p,b){for(var d=h.match(/%[^%]*%/g)||[],n=[],c=0;c<p.length;c++){for(var k=h,m=0;m<d.length;m++){var l=d[m].substr(1,d[m].length-2);k=k.replace(d[m],
7
- p[c][l])}n=a.merge(n,v(k,b))}return a(n)};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,x=function(){var h=a("#yith-wcan-reset-all-categories").find("a.yith-wcan-reset-categories-link"),p=a("#yith-wcan-reset-all-tags").find("a.yith-wcan-reset-tags-link");
8
- h.add(p).on("click",function(b){a(this).yith_wcan_ajax_filters(b,this)})};a.fn.yith_wcan_ajax_filters=function(h,p){h.preventDefault();var b=p.href,d=a(p),n=d.hasClass("yith-wcan-reset-navigation");if("undefined"==typeof b&&d.parents().hasClass("price_slider_wrapper")){d.parents("form");var c=window.location,k=c.origin+c.pathname,m=k!=c.href,l=a(".price_slider_amount #min_price").val(),g=a(".price_slider_amount #max_price").val();b=c.href;1==m&&(b=u(b,"min_price"),b=u(b,"max_price"));b=b+(k==b?"?":
9
- "&")+a.param({min_price:l,max_price:g})}"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").css("z-index","-1").animate({visibility:"hidden",opacity:0},300));a(yith_wcan.container).not(".ywcps-products").html("").addClass("yith-wcan-loading");a(document).trigger("yith-wcan-ajax-loading");"undefined"!=typeof yith_wcan_frontend&&a(yith_wcan.container).not(".ywcps-products").css("backgroundImage",
10
"url("+yith_wcan_frontend.loader_url+")");c=!1;"both"==yith_wcan.scroll_top_mode?c=!0:"mobile"==yith_wcan.scroll_top_mode&&1==yith_wcan.is_mobile?c=!0:"desktop"==yith_wcan.scroll_top_mode&&1!=yith_wcan.is_mobile&&(c=!0);1==c&&a(window).scrollTop(a(yith_wcan.scroll_top).offset().top);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).not(".ywcps-products").removeClass("yith-wcan-loading");0<a(c).find(yith_wcan.container).not(".ywcps-products").length?
11
- a(".yit-wcan-container").html(a(c).find(yith_wcan.container).not(".ywcps-products")):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).not(".ywcps-products")),a(yith_wcan.pagination).html(a(c).find(yith_wcan.pagination).html()).show()):a(yith_wcan.pagination).empty();a("div.quantity:not(.buttons_added), td.quantity:not(.buttons_added)").addClass("buttons_added").append('<input type="button" value="+" class="plus" />').prepend('<input type="button" value="-" class="minus" />');
12
- 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=a(this),d=b.attr("id");d=a(c).find("#"+d);0==d.length?b.hide():(b.html(d.html()),b.show())});if(1==yith_wcan.avada.is_enabled){var e=a(yith_wcan.avada.sort_count);e.html(a(c).find(yith_wcan.avada.sort_count).html());""==d.text()?e.hide():
13
- e.show()}1!=yith_wcan.change_browser_url||navigator.userAgent.match(/msie/i)||window.history.pushState({pageTitle:c.pageTitle},"",b);a(document).trigger("ready");a(document).trigger("yith-wcan-ajax-filtered",[c]);a(window).trigger("scroll");if(n){if("undefined"!=typeof a.fn.slider){e=parseInt(a(yith_wcan.wc_price_slider.min_price).data("min"));var f=parseInt(a(yith_wcan.wc_price_slider.max_price).data("max"));a(yith_wcan.wc_price_slider.wrapper).slider("values",[e,f]);a(document.body).trigger("price_slider_slide",
14
- [e,f])}a(document).trigger("yith-wcan-ajax-reset-filtered")}x()}})};a(yith_wcan.container).not(".ywcps-products").wrap('<div class="yit-wcan-container"></div>');a(document).on("yith-wcan-wrapped",function(){x()});a(document).trigger("yith-wcan-wrapped");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").css("z-index","-1").animate({visibility:"hidden",opacity:0},0,function(){a(this).css("display","none")});
15
- a("a.yit-wcan-select-open").removeClass("active")};a(document).on("click","a.yit-wcan-select-open.active",function(a){a.preventDefault();z(this)});a(document).on("click","a.yit-wcan-select-open:not(.active)",function(h){h.preventDefault();a("a.yit-wcan-select-open.active").trigger("click");y(this)});a(document).on("ready yith-wcan-ajax-filtered",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+=
16
- 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()});if(1==yith_wcan.flatsome.is_enabled&&1==yith_wcan.flatsome.lazy_load_enabled)a(document).on("yith-wcan-ajax-filtered",function(h,p){var b=a(document);jQuery(".lazy-load",b).each(function(a,b){var c=jQuery(b);c.waypoint(function(a){if(!c.hasClass("lazy-load-active")){a=c.data("src");
17
- var b=c.data("srcset");a&&c.attr("src",a);b&&c.attr("srcset",b);c.imagesLoaded(function(){c.addClass("lazy-load-active").removeClass("lazy-load")})}},{offset:"140%"})})});window.addEventListener("popstate",function(a){window.location.reload(!0)})});
1
+ jQuery(function(a){function y(d){a(d).parent().find("div.yith-wcan-select-wrapper").css("z-index","1").animate({visibility:"visible",opacity:1},{duration:300,start:function(){a(this).css("display","block")}});a(d).parent().find("a.yit-wcan-select-open").addClass("active")}function z(d){a(d).parent().find("div.yith-wcan-select-wrapper").css("z-index","-1").animate({visibility:"hidden",opacity:0},300,function(){a(this).css("display","none")});a(d).parent().find("a.yit-wcan-select-open").removeClass("active")}
2
+ function u(a,p){return a.replace(new RegExp("[?&]"+p+"=[^&#]*(#.*)?quot;),"$1").replace(new RegExp("([?&])"+p+"=[^&]*&"),"$1")}var A=/(?!(\[))(\.)[^.#[]*/g,B=/(#)[^.#[]*/,C=/^[\w]+/,D=/^[\w]+#x2F;,v=function(d,p){if(D.test(d))var b=[{tag:d}];else{b=d;for(var e={sel:[],val:[]},n=[],c=!1,k="",m=[],l=0,g=b.length;l<g;l++){var f=b.charAt(l);if(c)if("\\"===f&&l+1<b.length)m.push(b.charAt(++l));else if(k===f)k="",m.push(f);else if(("'"===f||'"'===f)&&""===k)k=f,m.push(f);else if("]"===f&&""===k)e.val.push(m.join("")),
3
+ m=[],c=!1;else{if("]"!==f||""!==k)""===k&&","===f?(e.val.push(m.join("")),m=[]):m.push(f)}else"\\"===f&&l+1<b.length?c&&m.push(b.charAt(++l)):"["===f&&""===k?c=!0:" "===f||"+"===f?(e.sel=e.sel.join(""),n.push(e),"+"===f&&n.push({sel:"+",val:""}),e={sel:[],val:[]}):" "!==f&&"]"!==f&&e.sel.push(f)}if(0!=e.sel.length||0!=e.val.length)e.sel=e.sel.join(""),n.push(e);for(l=0;l<n.length;l++){e=n[l].sel;if("+"===e)h.tag=e;else{var h=[];h.tag=C.exec(e);h.id=B.exec(e);h.id&&a.isArray(h.id)&&(h.id=h.id[0].substr(1));
4
+ h.tag||(h.tag="div");h.vars=[];for(b=0;b<n[l].val.length;b++)k=n[l].val[b].indexOf("="),c=n[l].val[b].substr(0,k),k=n[l].val[b].substr(k+1),k=k.replace(/^[\s]*["']*|["']*[\s]*#x2F;g,""),"text"===c?h.text=k:h.vars.push([c,k]);e=e.match(A);c=[];if(e){for(b=0;b<e.length;b++)c.push(e[b].substr(1));h.className=c.join(" ")}}n[l]=h}b=n}e=[];"undefined"===typeof p&&(p=1);n=[];c=[];k=[];m=document.createElement("div");for(g=l=0;g<b.length;g++){if("+"==b[g].tag)c=k.slice(),--l;else{for(f=0;f<p;f++)if("input"==
5
+ b[g].tag){h=[];h.push("<"+b[g].tag);b[g].id&&h.push("id='"+b[g].id+"'");b[g].className&&(h.push("class='"+b[g].className),g+1===b.length&&h.push(lastClass),h.push("'"));if(b[g].vars)for(var q=0;q<b[g].vars.length;q++)h.push(b[g].vars[q][0]+"='"+b[g].vars[q][1]+"'");b[g].text&&h.push("value='"+b[g].text+"'");h.push("/>");k[f]=c[f];c[f]?(c[f].innerHTML+=h.join(" "),c[f]=c[f].lastChild):(m.innerHTML=h.join(" "),c[f]=m.removeChild(m.firstChild))}else{h=document.createElement(b[g].tag);if(b[g].vars)for(q=
6
+ 0;q<b[g].vars.length;q++)console.log(b[g].tag,b[g].vars[q]),h.setAttribute(b[g].vars[q][0],b[g].vars[q][1]);b[g].id&&(h.id=b[g].id);b[g].className&&(h.className=b[g].className);b[g].text&&h.appendChild(document.createTextNode(b[g].text));k[f]=c[f];c[f]=c[f]?c[f].appendChild(h):h}l++||Array.prototype.push.apply(n,c)}e=a.merge(e,c)}return a(n)},w=function(d,p,b){for(var e=d.match(/%[^%]*%/g)||[],n=[],c=0;c<p.length;c++){for(var k=d,m=0;m<e.length;m++){var l=e[m].substr(1,e[m].length-2);k=k.replace(e[m],
7
+ p[c][l])}n=a.merge(n,v(k,b))}return a(n)};a.jseldom=function(d){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,x=function(){var d=a("#yith-wcan-reset-all-categories").find("a.yith-wcan-reset-categories-link"),p=a("#yith-wcan-reset-all-tags").find("a.yith-wcan-reset-tags-link");
8
+ d.add(p).on("click",function(b){a(this).yith_wcan_ajax_filters(b,this)})};a.fn.yith_wcan_ajax_filters=function(d,p){d.preventDefault();var b=p.href,e=a(p),n=e.hasClass("yith-wcan-reset-navigation");if("undefined"==typeof b&&e.parents().hasClass("price_slider_wrapper")){e.parents("form");var c=window.location,k=c.origin+c.pathname,m=k!=c.href,l=a(".price_slider_amount #min_price").val(),g=a(".price_slider_amount #max_price").val();b=c.href;1==m&&(b=u(b,"min_price"),b=u(b,"max_price"));b=b+(k==b?"?":
9
+ "&")+a.param({min_price:l,max_price:g})}"select"==e.data("type")&&(e.parents("div.yith-woo-ajax-navigation").find("a.yit-wcan-select-open").removeClass("active"),e.parent().find("div.yith-wcan-select-wrapper").css("z-index","-1").animate({visibility:"hidden",opacity:0},300));a(yith_wcan.container).not(".ywcps-products").html("").addClass("yith-wcan-loading");a(document).trigger("yith-wcan-ajax-loading");"undefined"!=typeof yith_wcan_frontend&&a(yith_wcan.container).not(".ywcps-products").css("backgroundImage",
10
"url("+yith_wcan_frontend.loader_url+")");c=!1;"both"==yith_wcan.scroll_top_mode?c=!0:"mobile"==yith_wcan.scroll_top_mode&&1==yith_wcan.is_mobile?c=!0:"desktop"==yith_wcan.scroll_top_mode&&1!=yith_wcan.is_mobile&&(c=!0);1==c&&a(window).scrollTop(a(yith_wcan.scroll_top).offset().top);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).not(".ywcps-products").removeClass("yith-wcan-loading");0<a(c).find(yith_wcan.container).not(".ywcps-products").length?
11
+ a(".yit-wcan-container").html(a(c).find(yith_wcan.container).not(".ywcps-products")):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).not(".ywcps-products")),a(yith_wcan.pagination).html(a(c).find(yith_wcan.pagination).html()).show()):a(yith_wcan.pagination).empty();a("div.quantity:not(.buttons_added), td.quantity:not(.buttons_added)").addClass("buttons_added").append('<input type="button" value="+" class="plus" />').prepend('<input type="button" value="-" class="minus" />');
12
+ 0<a(c).find(yith_wcan.result_count).length&&a(yith_wcan.result_count).html(a(c).find(yith_wcan.result_count).html()).show();var f=function(b){var d=b.attr("id");d=a(c).find("#"+d);0==d.length?b.hide():(b.html(d.html()),b.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=a(this);f(b)});1==yith_wcan.yootheme.is_enabled&&a(".widget-yith-woo-ajax-navigation").add(".widget-yith-woo-ajax-navigation-sort-by").add(".widget-yith-woo-ajax-reset-navigation").add(".widget-yith-wcan-stock-on-sale").add(".widget-yith-wcan-list-price-filter").each(function(){var b=
13
+ a(this);f(b)});if(1==yith_wcan.avada.is_enabled){var d=a(yith_wcan.avada.sort_count);d.html(a(c).find(yith_wcan.avada.sort_count).html());""==e.text()?d.hide():d.show()}1!=yith_wcan.change_browser_url||navigator.userAgent.match(/msie/i)||window.history.pushState({pageTitle:c.pageTitle},"",b);a(document).trigger("ready");a(document).trigger("yith-wcan-ajax-filtered",[c]);a(window).trigger("scroll");if(n){if("undefined"!=typeof a.fn.slider){d=parseInt(a(yith_wcan.wc_price_slider.min_price).data("min"));
14
+ var 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])}a(document).trigger("yith-wcan-ajax-reset-filtered")}x()}})};a(yith_wcan.container).not(".ywcps-products").wrap('<div class="yit-wcan-container"></div>');a(document).on("yith-wcan-wrapped",function(){x()});a(document).trigger("yith-wcan-wrapped");a(document).on("click",".yith-wcan a",function(d){a(this).yith_wcan_ajax_filters(d,
15
+ this)});var t=function(){a("div.yith-wcan-select-wrapper").css("z-index","-1").animate({visibility:"hidden",opacity:0},0,function(){a(this).css("display","none")});a("a.yit-wcan-select-open").removeClass("active")};a(document).on("click","a.yit-wcan-select-open.active",function(a){a.preventDefault();z(this)});a(document).on("click","a.yit-wcan-select-open:not(.active)",function(d){d.preventDefault();a("a.yit-wcan-select-open.active").trigger("click");y(this)});a(document).on("ready yith-wcan-ajax-filtered",
16
+ function(){a("div.yith-wcan-select-wrapper ul.yith-wcan-select li.chosen");t();a("div.yith-wcan-select-wrapper").each(function(){var d="";a(this).find("ul.yith-wcan-select li.chosen").each(function(){d+=a(this).text()+", "});d=d.substring(0,d.length-2);""!=d&&a(this).parent().find("a.yit-wcan-select-open").text(d)})});a(document).on("ready",t);a("body").on("click",function(d){a(d.target).hasClass("yit-wcan-select-open")||t()});if(1==yith_wcan.flatsome.is_enabled&&1==yith_wcan.flatsome.lazy_load_enabled)a(document).on("yith-wcan-ajax-filtered",
17
+ function(d,p){var b=a(document);jQuery(".lazy-load",b).each(function(a,b){var c=jQuery(b);c.waypoint(function(a){if(!c.hasClass("lazy-load-active")){a=c.data("src");var b=c.data("srcset");a&&c.attr("src",a);b&&c.attr("srcset",b);c.imagesLoaded(function(){c.addClass("lazy-load-active").removeClass("lazy-load")})}},{offset:"140%"})})});window.addEventListener("popstate",function(a){window.location.reload(!0)})});
includes/class.yith-wcan-admin.php CHANGED
@@ -43,17 +43,17 @@ if ( ! class_exists( 'YITH_WCAN_Admin' ) ) {
43
/**
44
* @var string Official plugin documentation
45
*/
46
- protected $_official_documentation = 'https://yithemes.com/docs-plugins/yith-woocommerce-ajax-product-filter';
47
48
/**
49
* @var string Official plugin landing page
50
*/
51
- protected $_premium_landing = 'https://yithemes.com/themes/plugins/yith-woocommerce-ajax-product-filter';
52
53
/**
54
* @var string Official plugin landing page
55
*/
56
- protected $_premium_live = 'http://plugins.yithemes.com/yith-woocommerce-ajax-product-filter/shop/';
57
58
/**
59
* Constructor
@@ -73,9 +73,9 @@ if ( ! class_exists( 'YITH_WCAN_Admin' ) ) {
73
add_action( 'yith_wcan_premium_tab', array( $this, 'premium_tab' ) );
74
add_action( 'yith_wcan_custom_style_tab', array( $this, 'custom_style_tab' ) );
75
76
- /* Plugin Informations */
77
- add_filter( 'plugin_action_links_' . plugin_basename( YITH_WCAN_DIR . '/' . basename( YITH_WCAN_FILE ) ), array( $this, 'action_links' ) );
78
- add_filter( 'plugin_row_meta', array( $this, 'plugin_row_meta' ), 10, 4 );
79
80
// YITH WCAN Loaded
81
do_action( 'yith_wcan_loaded' );
@@ -187,18 +187,13 @@ if ( ! class_exists( 'YITH_WCAN_Admin' ) ) {
187
* @return mixed
188
* @use plugin_action_links_{$plugin_file_name}
189
*/
190
- public function action_links( $links ) {
191
- $premium_live_text = defined( 'YITH_WCAN_FREE_INIT' ) ? __( 'Premium live demo', 'yith-woocommerce-ajax-navigation' ) : __( 'Live demo', 'yith-woocommerce-ajax-navigation' );
192
- $links[] = '<a href="' . $this->_premium_live . '" target="_blank">' . $premium_live_text . '</a>';
193
194
- if ( defined( 'YITH_WCAN_FREE_INIT' ) ) {
195
- $links[] = '<a href="' . $this->get_premium_landing_uri() . '" target="_blank">' . __( 'Premium Version', 'yith-woocommerce-ajax-navigation' ) . '</a>';
196
- }
197
-
198
- return $links;
199
- }
200
201
- /**
202
* plugin_row_meta
203
*
204
* add the action links to plugin admin page
@@ -213,13 +208,19 @@ if ( ! class_exists( 'YITH_WCAN_Admin' ) ) {
213
* @author Andrea Grillo <andrea.grillo@yithemes.com>
214
* @use plugin_row_meta
215
*/
216
- public function plugin_row_meta( $plugin_meta, $plugin_file, $plugin_data, $status ) {
217
-
218
- if ( ( defined( 'YITH_WCAN_INIT' ) && YITH_WCAN_INIT == $plugin_file ) || ( defined( 'YITH_WCAN_FREE_INIT' ) && YITH_WCAN_FREE_INIT == $plugin_file ) ) {
219
- $plugin_meta[] = '<a href="' . $this->_official_documentation . '" target="_blank">' . __( 'Plugin Documentation', 'yith-woocommerce-ajax-navigation' ) . '</a>';
220
- }
221
- return $plugin_meta;
222
- }
223
224
/**
225
* Get the premium landing uri
43
/**
44
* @var string Official plugin documentation
45
*/
46
+ protected $_official_documentation = 'https://docs.yithemes.com/yith-woocommerce-ajax-product-filter/';
47
48
/**
49
* @var string Official plugin landing page
50
*/
51
+ protected $_premium_landing = 'https://yithemes.com/themes/plugins/yith-woocommerce-ajax-product-filter/';
52
53
/**
54
* @var string Official plugin landing page
55
*/
56
+ protected $_premium_live = 'https://plugins.yithemes.com/yith-woocommerce-ajax-product-filter/';
57
58
/**
59
* Constructor
73
add_action( 'yith_wcan_premium_tab', array( $this, 'premium_tab' ) );
74
add_action( 'yith_wcan_custom_style_tab', array( $this, 'custom_style_tab' ) );
75
76
+ /* === Show Plugin Information === */
77
+ add_filter( 'plugin_action_links_' . plugin_basename( YITH_WCAN_DIR . '/' . basename( YITH_WCAN_FILE ) ), array( $this, 'action_links' ) );
78
+ add_filter( 'yith_show_plugin_row_meta', array( $this, 'plugin_row_meta' ), 10, 5 );
79
80
// YITH WCAN Loaded
81
do_action( 'yith_wcan_loaded' );
187
* @return mixed
188
* @use plugin_action_links_{$plugin_file_name}
189
*/
190
+ public function action_links( $links ) {
191
+ $links = yith_add_action_links( $links, $this->_panel_page, false );
192
+ return $links;
193
+ }
194
195
196
+ /**
197
* plugin_row_meta
198
*
199
* add the action links to plugin admin page
208
* @author Andrea Grillo <andrea.grillo@yithemes.com>
209
* @use plugin_row_meta
210
*/
211
+ public function plugin_row_meta( $new_row_meta_args, $plugin_meta, $plugin_file, $plugin_data, $status, $init_file = 'YITH_WCAN_FREE_INIT' ) {
212
+ if ( defined( $init_file ) && constant( $init_file ) == $plugin_file ) {
213
+ $new_row_meta_args['slug'] = 'yith-woocommerce-ajax-product-filter';
214
+ }
215
+
216
+ if ( defined( 'YITH_WCAN_FREE_INIT' ) && YITH_WCAN_FREE_INIT == $plugin_file ) {
217
+ $new_row_meta_args['support'] = array(
218
+ 'url' => 'https://wordpress.org/support/plugin/yith-woocommerce-ajax-navigation'
219
+ );
220
+ }
221
+
222
+ return $new_row_meta_args;
223
+ }
224
225
/**
226
* Get the premium landing uri
includes/class.yith-wcan-frontend.php CHANGED
@@ -124,11 +124,24 @@ if ( ! class_exists( 'YITH_WCAN_Frontend' ) ) {
124
$queried_post_ids = array();
125
126
$problematic_theme = array(
127
- 'basel'
128
);
129
130
$is_qTranslateX_and_yit_core_1_0_0 = class_exists( 'QTX_Translator' ) && defined('YIT_CORE_VERSION') && '1.0.0' == YIT_CORE_VERSION;
131
- $is_problematic_theme = in_array( wp_get_theme()->get_template(), $problematic_theme );
132
133
if( $is_qTranslateX_and_yit_core_1_0_0 || $is_problematic_theme || class_exists( 'SiteOrigin_Panels' ) ){
134
add_filter( 'yith_wcan_skip_layered_nav_query', '__return_true' );
@@ -172,8 +185,8 @@ if ( ! class_exists( 'YITH_WCAN_Frontend' ) ) {
172
'update_post_meta_cache' => false,
173
'update_post_term_cache' => false,
174
'pagename' => '',
175
- 'wc_query' => 'get_products_in_view',
176
- 'suppress_filters' => true
177
)
178
);
179
@@ -220,7 +233,9 @@ if ( ! class_exists( 'YITH_WCAN_Frontend' ) ) {
220
wp_enqueue_style( 'yith-wcan-frontend', YITH_WCAN_URL . 'assets/css/frontend.css', false, $this->version );
221
wp_enqueue_script( 'yith-wcan-script', YITH_WCAN_URL . 'assets/js/yith-wcan-frontend' . $suffix . '.js', array( 'jquery' ), $this->version, true );
222
223
- $custom_style = yith_wcan_get_option( 'yith_wcan_custom_style', '' );
224
225
! empty( $custom_style ) && wp_add_inline_style( 'yith-wcan-frontend', sanitize_text_field( $custom_style ) );
226
@@ -246,6 +261,10 @@ if ( ! class_exists( 'YITH_WCAN_Frontend' ) ) {
246
'flatsome' => array(
247
'is_enabled' => function_exists( 'flatsome_option' ),
248
'lazy_load_enabled' => get_theme_mod( 'lazy_load_images' )
249
),
250
)
251
);
124
$queried_post_ids = array();
125
126
$problematic_theme = array(
127
+ 'basel',
128
+ 'ux-shop',
129
+ 'aurum',
130
+ 'aardvark'
131
);
132
133
+ $wp_theme = wp_get_theme();
134
+ $template_name = $wp_theme->get_template();
135
+
136
+ /**
137
+ * Support for Flatsome Theme lower then 3.6.0
138
+ */
139
+ if( 'flatsome' == $template_name && version_compare( '3.6.0', $wp_theme->Version, '<' ) ){
140
+ $problematic_theme[] = 'flatsome';
141
+ }
142
+
143
$is_qTranslateX_and_yit_core_1_0_0 = class_exists( 'QTX_Translator' ) && defined('YIT_CORE_VERSION') && '1.0.0' == YIT_CORE_VERSION;
144
+ $is_problematic_theme = in_array( $template_name, $problematic_theme );
145
146
if( $is_qTranslateX_and_yit_core_1_0_0 || $is_problematic_theme || class_exists( 'SiteOrigin_Panels' ) ){
147
add_filter( 'yith_wcan_skip_layered_nav_query', '__return_true' );
185
'update_post_meta_cache' => false,
186
'update_post_term_cache' => false,
187
'pagename' => '',
188
+ 'wc_query' => 'get_products_in_view', //Only for WC <= 2.6.x
189
+ 'suppress_filters' => true,
190
)
191
);
192
233
wp_enqueue_style( 'yith-wcan-frontend', YITH_WCAN_URL . 'assets/css/frontend.css', false, $this->version );
234
wp_enqueue_script( 'yith-wcan-script', YITH_WCAN_URL . 'assets/js/yith-wcan-frontend' . $suffix . '.js', array( 'jquery' ), $this->version, true );
235
236
+ $custom_style = yith_wcan_get_option( 'yith_wcan_custom_style', '' );
237
+ $current_theme = function_exists( 'wp_get_theme' ) ? wp_get_theme() : null;
238
+ $current_template = $current_theme instanceof WP_Theme ? $current_theme->get_template() : '';
239
240
! empty( $custom_style ) && wp_add_inline_style( 'yith-wcan-frontend', sanitize_text_field( $custom_style ) );
241
261
'flatsome' => array(
262
'is_enabled' => function_exists( 'flatsome_option' ),
263
'lazy_load_enabled' => get_theme_mod( 'lazy_load_images' )
264
+ ),
265
+ /* === YooThemes Theme Support === */
266
+ 'yootheme' => array(
267
+ 'is_enabled' => 'yootheme' === $current_template
268
),
269
)
270
);
includes/functions.yith-wcan.php CHANGED
@@ -554,18 +554,18 @@ if ( ! function_exists( 'yit_get_woocommerce_layered_nav_link' ) ) {
554
555
if ( defined( 'SHOP_IS_ON_FRONT' ) || ( is_shop() && ! is_product_category() ) ) {
556
$return = get_post_type_archive_link( 'product' );
557
- return apply_filters( 'yith_wcan_untrailingslashit', true ) && is_string( $return ) ? untrailingslashit( $return ) : $return;
558
}
559
560
elseif ( ! is_shop() && is_product_category( $source_id ) && false ) {
561
$return = get_term_link( get_queried_object()->slug, 'product_cat' );
562
- return apply_filters( 'yith_wcan_untrailingslashit', true ) && is_string( $return ) ? untrailingslashit( $return ) : $return;
563
}
564
565
else {
566
$return = get_post_type_archive_link( 'product' );
567
568
- return apply_filters( 'yith_wcan_untrailingslashit', true ) && is_string( $return ) ? untrailingslashit( $return ) : $return;
569
}
570
571
return $return;
@@ -790,12 +790,18 @@ if( ! function_exists( 'yith_wcan_wp_get_terms' ) ) {
790
global $wp_version;
791
792
if( version_compare( $wp_version, '4.6', '<' ) ){
793
- return get_terms( $args['taxonomy'], $args );
794
}
795
796
else {
797
- return get_terms( $args );
798
}
799
}
800
}
801
@@ -810,3 +816,23 @@ if( ! function_exists( 'yith_wcan_brands_enabled' ) ){
810
}
811
}
812
554
555
if ( defined( 'SHOP_IS_ON_FRONT' ) || ( is_shop() && ! is_product_category() ) ) {
556
$return = get_post_type_archive_link( 'product' );
557
+ return apply_filters( 'yith_wcan_untrailingslashit', false ) && is_string( $return ) ? untrailingslashit( $return ) : $return;
558
}
559
560
elseif ( ! is_shop() && is_product_category( $source_id ) && false ) {
561
$return = get_term_link( get_queried_object()->slug, 'product_cat' );
562
+ return apply_filters( 'yith_wcan_untrailingslashit', false ) && is_string( $return ) ? untrailingslashit( $return ) : $return;
563
}
564
565
else {
566
$return = get_post_type_archive_link( 'product' );
567
568
+ return apply_filters( 'yith_wcan_untrailingslashit', false ) && is_string( $return ) ? untrailingslashit( $return ) : $return;
569
}
570
571
return $return;
790
global $wp_version;
791
792
if( version_compare( $wp_version, '4.6', '<' ) ){
793
+ $terms = get_terms( $args['taxonomy'], $args );
794
}
795
796
else {
797
+ $terms = get_terms( $args );
798
}
799
+
800
+ if( ! is_array( $terms ) ){
801
+ $terms = array();
802
+ }
803
+
804
+ return $terms;
805
}
806
}
807
816
}
817
}
818
819
+ if( ! function_exists( 'yith_wcan_add_rel_nofollow_to_url' ) ){
820
+ /**
821
+ * Check if the user want to add the rel="nofollow" in filter uri
822
+ *
823
+ * @param bool $get_html_rel_attribute
824
+ *
825
+ * @return bool|string
826
+ */
827
+ function yith_wcan_add_rel_nofollow_to_url( $get_html_rel_attribute = false ){
828
+ $enable_seo = 'yes' == yith_wcan_get_option( 'yith_wcan_enable_seo' );
829
+ $enable_rel_nofollow = 'yes' == yith_wcan_get_option( 'yith_wcan_seo_rel_nofollow', 'no' );
830
+ $return = $enabled = $enable_seo && $enable_rel_nofollow;
831
+
832
+ if ( $enabled && $get_html_rel_attribute ) {
833
+ $return = 'rel="nofollow"';
834
+ }
835
+
836
+ return $return;
837
+ }
838
+ }
init.php CHANGED
@@ -1,16 +1,16 @@
1
<?php
2
/**
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: 3.5.1
7
- * Author: YITHEMES
8
- * Author URI: http://yithemes.com/
9
* Text Domain: yith-woocommerce-ajax-navigation
10
* Domain Path: /languages/
11
*
12
* WC requires at least: 2.2.0
13
- * WC tested up to: 3.3.3
14
*
15
* @author Your Inspiration Themes
16
* @package YITH WooCommerce Ajax Navigation
@@ -67,7 +67,7 @@ load_plugin_textdomain( 'yith-woocommerce-ajax-navigation', false, dirname( plug
67
! defined( 'YITH_WCAN' ) && define( 'YITH_WCAN', true );
68
! defined( 'YITH_WCAN_URL' ) && define( 'YITH_WCAN_URL', plugin_dir_url( __FILE__ ) );
69
! defined( 'YITH_WCAN_DIR' ) && define( 'YITH_WCAN_DIR', plugin_dir_path( __FILE__ ) );
70
- ! defined( 'YITH_WCAN_VERSION' ) && define( 'YITH_WCAN_VERSION', '3.5.1' );
71
! defined( 'YITH_WCAN_FREE_INIT') && define( 'YITH_WCAN_FREE_INIT', plugin_basename( __FILE__ ) );
72
! defined( 'YITH_WCAN_FILE' ) && define( 'YITH_WCAN_FILE', __FILE__ );
73
1
<?php
2
/**
3
* Plugin Name: YITH WooCommerce Ajax Product Filter
4
+ * Plugin URI: https://wordpress.org/plugins/yith-woocommerce-ajax-navigation/
5
+ * Description:<code>YITH WooCommerce AJAX Product Filter</code> allows your users to find the product they are looking for as quickly as possible. Thanks to the plugin you will be able to set up one or more search filters for your WooCommerce products, improve the user experience and give the impression of being in a big and reliable store. <a href="https://yithemes.com/" target="_blank">Find new awesome plugins by <strong>YITH</strong></a>
6
* Version: 3.5.1
7
+ * Author: YITH
8
+ * Author URI: https://yithemes.com/
9
* Text Domain: yith-woocommerce-ajax-navigation
10
* Domain Path: /languages/
11
*
12
* WC requires at least: 2.2.0
13
+ * WC tested up to: 3.5
14
*
15
* @author Your Inspiration Themes
16
* @package YITH WooCommerce Ajax Navigation
67
! defined( 'YITH_WCAN' ) && define( 'YITH_WCAN', true );
68
! defined( 'YITH_WCAN_URL' ) && define( 'YITH_WCAN_URL', plugin_dir_url( __FILE__ ) );
69
! defined( 'YITH_WCAN_DIR' ) && define( 'YITH_WCAN_DIR', plugin_dir_path( __FILE__ ) );
70
+ ! defined( 'YITH_WCAN_VERSION' ) && define( 'YITH_WCAN_VERSION', '3.6.0' );
71
! defined( 'YITH_WCAN_FREE_INIT') && define( 'YITH_WCAN_FREE_INIT', plugin_basename( __FILE__ ) );
72
! defined( 'YITH_WCAN_FILE' ) && define( 'YITH_WCAN_FILE', __FILE__ );
73
plugin-fw/assets/css/metaboxes.css CHANGED
@@ -631,4 +631,7 @@
631
float : right;
632
margin-right : 20px;
633
margin-top : 5px;
634
}
631
float : right;
632
margin-right : 20px;
633
margin-top : 5px;
634
+ z-index: 9999 !important;
635
+ position: absolute;
636
+ right: 0;
637
}
plugin-fw/assets/css/yith-fields.css CHANGED
@@ -7,6 +7,11 @@
7
clear : both;
8
}
9
10
.yith-disabled {
11
opacity : 0.3;
12
pointer-events : none;
@@ -187,6 +192,10 @@ ul.yit-icons-manager-list li.active {
187
}
188
189
/* ------- OnOff ------- */
190
.yith-plugin-fw-onoff-container input {
191
display : none;
192
}
@@ -352,4 +361,42 @@ ul.yit-icons-manager-list li.active {
352
/* ------- Buttons ------- */
353
.yith-plugin-fw-buttons-field-wrapper {
354
margin-top : 7px;
355
}
7
clear : both;
8
}
9
10
+ .yith-plugin-fw span.description.inline {
11
+ display : inline-block;
12
+ margin : 0 0 0 5px;
13
+ }
14
+
15
.yith-disabled {
16
opacity : 0.3;
17
pointer-events : none;
192
}
193
194
/* ------- OnOff ------- */
195
+ .yith-plugin-fw-onoff-container {
196
+ display : inline-block;
197
+ }
198
+
199
.yith-plugin-fw-onoff-container input {
200
display : none;
201
}
361
/* ------- Buttons ------- */
362
.yith-plugin-fw-buttons-field-wrapper {
363
margin-top : 7px;
364
+ }
365
+
366
+ /* ------- Select Images ------- */
367
+ .yith-plugin-fw-select-images__list {
368
+ margin : 0;
369
+ display : flex;
370
+ flex-wrap : wrap;
371
+ }
372
+
373
+ .yith-plugin-fw-select-images__item {
374
+ width : calc(20% - 10px);
375
+ min-width : 150px;
376
+ margin : 0 10px 10px 0;
377
+ padding : 10px;
378
+ box-sizing : border-box;
379
+ cursor : pointer;
380
+ transition : all .3s;
381
+ border : 2px solid #eee;
382
+ display : flex;
383
+ flex-direction : column;
384
+ justify-content : space-between;
385
+ }
386
+
387
+ .yith-plugin-fw-select-images__item:hover,
388
+ .yith-plugin-fw-select-images__item.yith-plugin-fw-select-images__item--selected {
389
+ border-color : #07bcce;
390
+ }
391
+
392
+ .yith-plugin-fw-select-images__item__label {
393
+ text-align : center;
394
+ font-weight : 600;
395
+ margin-bottom : 10px;
396
+ }
397
+
398
+ .yith-plugin-fw-select-images__item img {
399
+ display : block;
400
+ max-width : 100%;
401
+ margin : 0 auto;
402
}
plugin-fw/assets/css/yith-select2-no-wc.css ADDED
@@ -0,0 +1,741 @@
1
+ .select2-container {
2
+ -webkit-box-sizing : border-box;
3
+ box-sizing : border-box;
4
+ display : inline-block;
5
+ margin : 0;
6
+ position : relative;
7
+ vertical-align : middle
8
+ }
9
+
10
+ .select2-container .select2-selection--single {
11
+ -webkit-box-sizing : border-box;
12
+ box-sizing : border-box;
13
+ cursor : pointer;
14
+ display : block;
15
+ height : 28px;
16
+ margin : 0 0 -4px;
17
+ -moz-user-select : none;
18
+ -ms-user-select : none;
19
+ user-select : none;
20
+ -webkit-user-select : none
21
+ }
22
+
23
+ .select2-container .select2-selection--single .select2-selection__rendered {
24
+ display : block;
25
+ padding-left : 8px;
26
+ padding-right : 20px;
27
+ overflow : hidden;
28
+ text-overflow : ellipsis;
29
+ white-space : nowrap
30
+ }
31
+
32
+ .select2-container .select2-selection--single .select2-selection__clear {
33
+ position : relative
34
+ }
35
+
36
+ .select2-container[dir=rtl] .select2-selection--single .select2-selection__rendered {
37
+ padding-right : 8px;
38
+ padding-left : 20px
39
+ }
40
+
41
+ .select2-container .select2-selection--multiple {
42
+ -webkit-box-sizing : border-box;
43
+ box-sizing : border-box;
44
+ cursor : pointer;
45
+ display : block;
46
+ min-height : 32px;
47
+ -moz-user-select : none;
48
+ -ms-user-select : none;
49
+ user-select : none;
50
+ -webkit-user-select : none
51
+ }
52
+
53
+ .select2-container .select2-selection--multiple .select2-selection__rendered {
54
+ display : inline-block;
55
+ overflow : hidden;
56
+ padding-left : 8px;
57
+ text-overflow : ellipsis;
58
+ white-space : nowrap
59
+ }
60
+
61
+ .select2-container .select2-search--inline {
62
+ float : left;
63
+ padding : 0
64
+ }
65
+
66
+ .select2-container .select2-search--inline .select2-search__field {
67
+ -webkit-box-sizing : border-box;
68
+ box-sizing : border-box;
69
+ border : none;
70
+ font-size : 100%;
71
+ margin : 0;
72
+ padding : 0
73
+ }
74
+
75
+ .select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button {
76
+ -webkit-appearance : none
77
+ }
78
+
79
+ .select2-dropdown {
80
+ background-color : #fff;
81
+ border : 1px solid #aaa;
82
+ border-radius : 4px;
83
+ -webkit-box-sizing : border-box;
84
+ box-sizing : border-box;
85
+ display : block;
86
+ position : absolute;
87
+ left : -100000px;
88
+ width : 100%;
89
+ z-index : 1051
90
+ }
91
+
92
+ .select2-results {
93
+ display : block
94
+ }
95
+
96
+ .select2-results__options {
97
+ list-style : none;
98
+ margin : 0;
99
+ padding : 0
100
+ }
101
+
102
+ .select2-results__option {
103
+ padding : 6px;
104
+ -moz-user-select : none;
105
+ -ms-user-select : none;
106
+ user-select : none;
107
+ -webkit-user-select : none
108
+ }
109
+
110
+ .select2-results__option[aria-selected], .select2-results__option[data-selected] {
111
+ cursor : pointer
112
+ }
113
+
114
+ .select2-container--open .select2-dropdown {
115
+ left : 0
116
+ }
117
+
118
+ .select2-container--open .select2-dropdown--above {
119
+ border-bottom : none;
120
+ border-bottom-left-radius : 0;
121
+ border-bottom-right-radius : 0
122
+ }
123
+
124
+ .select2-container--open .select2-dropdown--below {
125
+ border-top : none;
126
+ border-top-left-radius : 0;
127
+ border-top-right-radius : 0
128
+ }
129
+
130
+ .select2-search--dropdown {
131
+ display : block;
132
+ padding : 4px
133
+ }
134
+
135
+ .select2-search--dropdown .select2-search__field {
136
+ padding : 4px;
137
+ width : 100%;
138
+ -webkit-box-sizing : border-box;
139
+ box-sizing : border-box
140
+ }
141
+
142
+ .select2-search--dropdown .select2-search__field::-webkit-search-cancel-button {
143
+ -webkit-appearance : none
144
+ }
145
+
146
+ .select2-search--dropdown.select2-search--hide {
147
+ display : none
148
+ }
149
+
150
+ .select2-close-mask {
151
+ border : 0;
152
+ margin : 0;
153
+ padding : 0;
154
+ display : block;
155
+ position : fixed;
156
+ left : 0;
157
+ top : 0;
158
+ min-height : 100%;
159
+ min-width : 100%;
160
+ height : auto;
161
+ width : auto;
162
+ opacity : 0;
163
+ z-index : 99;
164
+ background-color : #fff
165
+ }
166
+
167
+ .select2-hidden-accessible {
168
+ border : 0 !important;
169
+ clip : rect(0 0 0 0) !important;
170
+ height : 1px !important;
171
+ margin : -1px !important;
172
+ overflow : hidden !important;
173
+ padding : 0 !important;
174
+ position : absolute !important;
175
+ width : 1px !important
176
+ }
177
+
178
+ .select2-container--default .select2-selection--single {
179
+ background-color : #fff;
180
+ border : 1px solid #aaa;
181
+ border-radius : 4px
182
+ }
183
+
184
+ .select2-container--default .select2-selection--single .select2-selection__rendered {
185
+ color : #444;
186
+ line-height : 28px
187
+ }
188
+
189
+ .select2-container--default .select2-selection--single .select2-selection__clear {
190
+ cursor : pointer;
191
+ float : right;
192
+ font-weight : 700
193
+ }
194
+
195
+ .select2-container--default .select2-selection--single .select2-selection__placeholder {
196
+ color : #999
197
+ }
198
+
199
+ .select2-container--default .select2-selection--single .select2-selection__arrow {
200
+ height : 26px;
201
+ position : absolute;
202
+ top : 1px;
203
+ right : 1px;
204
+ width : 20px
205
+ }
206
+
207
+ .select2-container--default .select2-selection--single .select2-selection__arrow b {
208
+ border-color : #888 transparent transparent transparent;
209
+ border-style : solid;
210
+ border-width : 5px 4px 0 4px;
211
+ height : 0;
212
+ left : 50%;
213
+ margin-left : -4px;
214
+ margin-top : -2px;
215
+ position : absolute;
216
+ top : 50%;
217
+ width : 0
218
+ }
219
+
220
+ .select2-container--default[dir=rtl] .select2-selection--single .select2-selection__clear {
221
+ float : left
222
+ }
223
+
224
+ .select2-container--default[dir=rtl] .select2-selection--single .select2-selection__arrow {
225
+ left : 1px;
226
+ right : auto
227
+ }
228
+
229
+ .select2-container--default.select2-container--disabled .select2-selection--single {
230
+ background-color : #eee;
231
+ cursor : default
232
+ }
233
+
234
+ .select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear {
235
+ display : none
236
+ }
237
+
238
+ .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
239
+ border-color : transparent transparent #888 transparent;
240
+ border-width : 0 4px 5px 4px
241
+ }
242
+
243
+ .select2-container--default .select2-selection--multiple {
244
+ background-color : #fff;
245
+ border : 1px solid #aaa;
246
+ cursor : text;
247
+ }
248
+
249
+ .select2-container--default .select2-selection--multiple .select2-selection__rendered {
250
+ -webkit-box-sizing : border-box;
251
+ box-sizing : border-box;
252
+ list-style : none;
253
+ margin : 0;
254
+ padding : 0 5px;
255
+ width : 100%
256
+ }
257
+
258
+ .select2-container--default .select2-selection--multiple .select2-selection__rendered li {
259
+ list-style : none;
260
+ margin : 5px 5px 0 0
261
+ }
262
+
263
+ .select2-container--default .select2-selection--multiple .select2-selection__rendered li:before {
264
+ content : '';
265
+ display : none
266
+ }
267
+
268
+ .select2-container--default .select2-selection--multiple .select2-selection__placeholder {
269
+ color : #999;
270
+ margin-top : 5px;
271
+ float : left
272
+ }
273
+
274
+ .select2-container--default .select2-selection--multiple .select2-selection__clear {
275
+ cursor : pointer;
276
+ float : right;
277
+ font-weight : 700;
278
+ margin-top : 5px;
279
+ margin-right : 10px
280
+ }
281
+
282
+ .select2-container--default .select2-selection--multiple .select2-selection__choice {
283
+ background-color : #e4e4e4;
284
+ border : 1px solid #aaa;
285
+ border-radius : 4px;
286
+ cursor : default;
287
+ float : left;
288
+ margin-right : 5px;
289
+ margin-top : 5px;
290
+ padding : 0 5px
291
+ }
292
+
293
+ .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
294
+ color : #999;
295
+ cursor : pointer;
296
+ display : inline-block;
297
+ font-weight : 700;
298
+ margin-right : 2px
299
+ }
300
+
301
+ .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
302
+ color : #333
303
+ }
304
+
305
+ .select2-container--default[dir=rtl] .select2-selection--multiple .select2-search--inline, .select2-container--default[dir=rtl] .select2-selection--multiple .select2-selection__choice, .select2-container--default[dir=rtl] .select2-selection--multiple .select2-selection__placeholder {
306
+ float : right
307
+ }
308
+
309
+ .select2-container--default[dir=rtl] .select2-selection--multiple .select2-selection__choice {
310
+ margin-left : 5px;
311
+ margin-right : auto
312
+ }
313
+
314
+ .select2-container--default[dir=rtl] .select2-selection--multiple .select2-selection__choice__remove {
315
+ margin-left : 2px;
316
+ margin-right : auto
317
+ }
318
+
319
+ .select2-container--default.select2-container--focus .select2-selection--multiple {
320
+ border : solid #000 1px;
321
+ outline : 0
322
+ }
323
+
324
+ .select2-container--default.select2-container--disabled .select2-selection--multiple {
325
+ background-color : #eee;
326
+ cursor : default
327
+ }
328
+
329
+ .select2-container--default.select2-container--disabled .select2-selection__choice__remove {
330
+ display : none
331
+ }
332
+
333
+ .select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple, .select2-container--default.select2-container--open.select2-container--above .select2-selection--single {
334
+ border-top-left-radius : 0;
335
+ border-top-right-radius : 0
336
+ }
337
+
338
+ .select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple, .select2-container--default.select2-container--open.select2-container--below .select2-selection--single {
339
+ border-bottom-left-radius : 0;
340
+ border-bottom-right-radius : 0
341
+ }
342
+
343
+ .select2-container--default .select2-search--dropdown .select2-search__field {
344
+ border : 1px solid #aaa
345
+ }
346
+
347
+ .select2-container--default .select2-search--inline .select2-search__field {
348
+ background : 0 0;
349
+ border : none;
350
+ outline : 0;
351
+ -webkit-box-shadow : none;
352
+ box-shadow : none;
353
+ -webkit-appearance : textfield
354
+ }
355
+
356
+ .select2-container--default .select2-results > .select2-results__options {
357
+ max-height : 200px;
358
+ overflow-y : auto
359
+ }
360
+
361
+ .select2-container--default .select2-results__option[role=group] {
362
+ padding : 0
363
+ }
364
+
365
+ .select2-container--default .select2-results__option[aria-disabled=true] {
366
+ color : #999
367
+ }
368
+
369
+ .select2-container--default .select2-results__option[aria-selected=true], .select2-container--default .select2-results__option[data-selected=true] {
370
+ background-color : #ddd
371
+ }
372
+
373
+ .select2-container--default .select2-results__option .select2-results__option {
374
+ padding-left : 1em
375
+ }
376
+
377
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__group {
378
+ padding-left : 0
379
+ }
380
+
381
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__option {
382
+ margin-left : -1em;
383
+ padding-left : 2em
384
+ }
385
+
386
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
387
+ margin-left : -2em;
388
+ padding-left : 3em
389
+ }
390
+
391
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
392
+ margin-left : -3em;
393
+ padding-left : 4em
394
+ }
395
+
396
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
397
+ margin-left : -4em;
398
+ padding-left : 5em
399
+ }
400
+
401
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
402
+ margin-left : -5em;
403
+ padding-left : 6em
404
+ }
405
+
406
+ .select2-container--default .select2-results__option--highlighted[aria-selected], .select2-container--default .select2-results__option--highlighted[data-selected] {
407
+ background-color : #0073aa;
408
+ color : #fff
409
+ }
410
+
411
+ .select2-container--default .select2-results__group {
412
+ cursor : default;
413
+ display : block;
414
+ padding : 6px
415
+ }
416
+
417
+ .select2-container--classic .select2-selection--single {
418
+ background-color : #f7f7f7;
419
+ border : 1px solid #aaa;
420
+ border-radius : 4px;
421
+ outline : 0;
422
+ background-image : -webkit-gradient(linear, left top, left bottom, color-stop(50%, #fff), to(#eee));
423
+ background-image : -webkit-linear-gradient(top, #fff 50%, #eee 100%);
424
+ background-image : linear-gradient(to bottom, #fff 50%, #eee 100%);
425
+ background-repeat : repeat-x
426
+ }
427
+
428
+ .select2-container--classic .select2-selection--single:focus {
429
+ border : 1px solid #0073aa
430
+ }
431
+
432
+ .select2-container--classic .select2-selection--single .select2-selection__rendered {
433
+ color : #444;
434
+ line-height : 28px
435
+ }
436
+
437
+ .select2-container--classic .select2-selection--single .select2-selection__clear {
438
+ cursor : pointer;
439
+ float : right;
440
+ font-weight : 700;
441
+ margin-right : 10px
442
+ }
443
+
444
+ .select2-container--classic .select2-selection--single .select2-selection__placeholder {
445
+ color : #999
446
+ }
447
+
448
+ .select2-container--classic .select2-selection--single .select2-selection__arrow {
449
+ background-color : #ddd;
450
+ border : none;
451
+ border-left : 1px solid #aaa;
452
+ border-top-right-radius : 4px;
453
+ border-bottom-right-radius : 4px;
454
+ height : 26px;
455
+ position : absolute;
456
+ top : 1px;
457
+ right : 1px;
458
+ width : 20px;
459
+ background-image : -webkit-gradient(linear, left top, left bottom, color-stop(50%, #eee), to(#ccc));
460
+ background-image : -webkit-linear-gradient(top, #eee 50%, #ccc 100%);
461
+ background-image : linear-gradient(to bottom, #eee 50%, #ccc 100%);
462
+ background-repeat : repeat-x
463
+ }
464
+
465
+ .select2-container--classic .select2-selection--single .select2-selection__arrow b {
466
+ border-color : #888 transparent transparent transparent;
467
+ border-style : solid;
468
+ border-width : 5px 4px 0 4px;
469
+ height : 0;
470
+ left : 50%;
471
+ margin-left : -4px;
472
+ margin-top : -2px;
473
+ position : absolute;
474
+ top : 50%;
475
+ width : 0
476
+ }
477
+
478
+ .select2-container--classic[dir=rtl] .select2-selection--single .select2-selection__clear {
479
+ float : left
480
+ }
481
+
482
+ .select2-container--classic[dir=rtl] .select2-selection--single .select2-selection__arrow {
483
+ border : none;
484
+ border-right : 1px solid #aaa;
485
+ border-radius : 0;
486
+ border-top-left-radius : 4px;
487
+ border-bottom-left-radius : 4px;
488
+ left : 1px;
489
+ right : auto
490
+ }
491
+
492
+ .select2-container--classic.select2-container--open .select2-selection--single {
493
+ border : 1px solid #0073aa
494
+ }
495
+
496
+ .select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow {
497
+ background : 0 0;
498
+ border : none
499
+ }
500
+
501
+ .select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b {
502
+ border-color : transparent transparent #888 transparent;
503
+ border-width : 0 4px 5px 4px
504
+ }
505
+
506
+ .select2-container--classic.select2-container--open.select2-container--above .select2-selection--single {
507
+ border-top : none;
508
+ border-top-left-radius : 0;
509
+ border-top-right-radius : 0;
510
+ background-image : -webkit-gradient(linear, left top, left bottom, from(white), color-stop(50%, #eee));
511
+ background-image : -webkit-linear-gradient(top, #fff 0, #eee 50%);
512
+ background-image : linear-gradient(to bottom, #fff 0, #eee 50%);
513
+ background-repeat : repeat-x
514
+ }
515
+
516
+ .select2-container--classic.select2-container--open.select2-container--below .select2-selection--single {
517
+ border-bottom : none;
518
+ border-bottom-left-radius : 0;
519
+ border-bottom-right-radius : 0;
520
+ background-image : -webkit-gradient(linear, left top, left bottom, color-stop(50%, #eee), to(white));
521
+ background-image : -webkit-linear-gradient(top, #eee 50%, #fff 100%);
522
+ background-image : linear-gradient(to bottom, #eee 50%, #fff 100%);
523
+ background-repeat : repeat-x
524
+ }
525
+
526
+ .select2-container--classic .select2-selection--multiple {
527
+ background-color : #fff;
528
+ border : 1px solid #aaa;
529
+ border-radius : 4px;
530
+ cursor : text;
531
+ outline : 0
532
+ }
533
+
534
+ .select2-container--classic .select2-selection--multiple:focus {
535
+ border : 1px solid #0073aa
536
+ }
537
+
538
+ .select2-container--classic .select2-selection--multiple .select2-selection__rendered {
539
+ list-style : none;
540
+ margin : 0;
541
+ padding : 0 5px
542
+ }
543
+
544
+ .select2-container--classic .select2-selection--multiple .select2-selection__clear {
545
+ display : none
546
+ }
547
+
548
+ .select2-container--classic .select2-selection--multiple .select2-selection__choice {
549
+ background-color : #e4e4e4;
550
+ border : 1px solid #aaa;
551
+ border-radius : 4px;
552
+ cursor : default;
553
+ float : left;
554
+ margin-right : 5px;
555
+ margin-top : 5px;
556
+ padding : 0 5px
557
+ }
558
+
559
+ .select2-container--classic .select2-selection--multiple .select2-selection__choice__remove {
560
+ color : #888;
561
+ cursor : pointer;
562
+ display : inline-block;
563
+ font-weight : 700;
564
+ margin-right : 2px
565
+ }
566
+
567
+ .select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover {
568
+ color : #555
569
+ }
570
+
571
+ .select2-container--classic[dir=rtl] .select2-selection--multiple .select2-selection__choice {
572
+ float : right
573
+ }
574
+
575
+ .select2-container--classic[dir=rtl] .select2-selection--multiple .select2-selection__choice {
576
+ margin-left : 5px;
577
+ margin-right : auto
578
+ }
579
+
580
+ .select2-container--classic[dir=rtl] .select2-selection--multiple .select2-selection__choice__remove {
581
+ margin-left : 2px;
582
+ margin-right : auto
583
+ }
584
+
585
+ .select2-container--classic.select2-container--open .select2-selection--multiple {
586
+ border : 1px solid #0073aa
587
+ }
588
+
589
+ .select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple {
590
+ border-top : none;
591
+ border-top-left-radius : 0;
592
+ border-top-right-radius : 0
593
+ }
594
+
595
+ .select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple {
596
+ border-bottom : none;
597
+ border-bottom-left-radius : 0;
598
+ border-bottom-right-radius : 0
599
+ }
600
+
601
+ .select2-container--classic .select2-search--dropdown .select2-search__field {
602
+ border : 1px solid #aaa;
603
+ outline : 0
604
+ }
605
+
606
+ .select2-container--classic .select2-search--inline .select2-search__field {
607
+ outline : 0;
608
+ -webkit-box-shadow : none;
609
+ box-shadow : none
610
+ }
611
+
612
+ .select2-container--classic .select2-dropdown {
613
+ background-color : #fff;
614
+ border : 1px solid transparent
615
+ }
616
+
617
+ .select2-container--classic .select2-dropdown--above {
618
+ border-bottom : none
619
+ }
620
+
621
+ .select2-container--classic .select2-dropdown--below {
622
+ border-top : none
623
+ }
624
+
625
+ .select2-container--classic .select2-results > .select2-results__options {
626
+ max-height : 200px;
627
+ overflow-y : auto
628
+ }
629
+
630
+ .select2-container--classic .select2-results__option[role=group] {
631
+ padding : 0
632
+ }
633
+
634
+ .select2-container--classic .select2-results__option[aria-disabled=true] {
635
+ color : grey
636
+ }
637
+
638
+ .select2-container--classic .select2-results__option--highlighted[aria-selected], .select2-container--classic .select2-results__option--highlighted[data-selected] {
639
+ background-color : #3875d7;
640
+ color : #fff
641
+ }
642
+
643
+ .select2-container--classic .select2-results__group {
644
+ cursor : default;
645
+ display : block;
646
+ padding : 6px
647
+ }
648
+
649
+ .select2-container--classic.select2-container--open .select2-dropdown {
650
+ border-color : #0073aa
651
+ }
652
+
653
+
654
+ .select2-drop, .select2-dropdown {
655
+ z-index : 999999 !important
656
+ }
657
+
658
+ .select2-results {
659
+ line-height : 1.5em
660
+ }
661
+
662
+ .select2-results .select2-results__group, .select2-results .select2-results__option {
663
+ margin : 0;
664
+ padding : 8px
665
+ }
666
+
667
+ .select2-results .description {
668
+ display : block;
669
+ color : #999;
670
+ padding-top : 4px
671
+ }
672
+
673
+ .select2-dropdown {
674
+ border-color : #ddd
675
+ }
676
+
677
+ .select2-dropdown--below {
678
+ -webkit-box-shadow : 0 1px 1px rgba(0, 0, 0, .1);
679
+ box-shadow : 0 1px 1px rgba(0, 0, 0, .1)
680
+ }
681
+
682
+ .select2-dropdown--above {
683
+ -webkit-box-shadow : 0 -1px 1px rgba(0, 0, 0, .1);
684
+ box-shadow : 0 -1px 1px rgba(0, 0, 0, .1)
685
+ }
686
+
687
+ .select2-container .select2-selection__rendered.ui-sortable li {
688
+ cursor : move
689
+ }
690
+
691
+ .select2-container .select2-selection {
692
+ border-color : #ddd
693
+ }
694
+
695
+ .select2-container .select2-search__field {
696
+ min-width : 150px
697
+ }
698
+
699
+ .select2-container .select2-selection--single {
700
+ height : 32px
701
+ }
702
+
703
+ .select2-container .select2-selection--single .select2-selection__rendered {
704
+ line-height : 32px;
705
+ padding-right : 24px
706
+ }
707
+
708
+ .select2-container .select2-selection--single .select2-selection__arrow {
709
+ right : 3px;
710
+ height : 30px
711
+ }
712
+
713
+ .select2-container .select2-selection--multiple {
714
+ min-height : 28px;
715
+ border-radius : 0;
716
+ line-height : 1.5
717
+ }
718
+
719
+ .select2-container .select2-selection--multiple li {
720
+ margin : 0
721
+ }
722
+
723
+ .select2-container .select2-selection--multiple .select2-selection__choice {
724
+ padding : 2px 6px
725
+ }
726
+
727
+ .select2-container .select2-selection--multiple .select2-selection__choice .description {
728
+ display : none
729
+ }
730
+
731
+ .select2-container .select2-selection__clear {
732
+ color : #999;
733
+ margin-top : -1px
734
+ }
735
+
736
+ .select2-container .select2-search--inline .select2-search__field {
737
+ font-family : inherit;
738
+ font-size : inherit;
739
+ font-weight : inherit;
740
+ padding : 3px 0
741
+ }
plugin-fw/assets/js/jquery.colorbox.min.js CHANGED
@@ -1,24 +1,33 @@
1
- (function(c,p,A){function g(a,d,F){a=p.createElement(a);d&&(a.id="cbox"+d);F&&(a.style.cssText=F);return c(a)}function R(){return A.innerHeight?A.innerHeight:c(A).height()}function M(a,d){d!==Object(d)&&(d={});this.cache={};this.el=a;this.value=function(a){var b;void 0===this.cache[a]&&(b=c(this.el).attr("data-cbox-"+a),void 0!==b?this.cache[a]=b:void 0!==d[a]?this.cache[a]=d[a]:void 0!==S[a]&&(this.cache[a]=S[a]));return this.cache[a]};this.get=function(a){a=this.value(a);return c.isFunction(a)?
2
- a.call(this.el,this):a}}function N(a){var d=k.length;a=(m+a)%d;return 0>a?d+a:a}function n(a,d){return Math.round((/%/.test(a)?("x"===d?w.width():R())/100:1)*parseInt(a,10))}function da(a,d){return a.get("photo")||a.get("photoRegex").test(d)}function ea(a,d){return a.get("retinaUrl")&&1<A.devicePixelRatio?d.replace(a.get("photoRegex"),a.get("retinaSuffix")):d}function fa(a){"contains"in f[0]&&!f[0].contains(a.target)&&a.target!==q[0]&&(a.stopPropagation(),f.focus())}function G(a){G.str!==a&&(f.add(q).removeClass(G.str).addClass(a),
3
- G.str=a)}function ja(b){m=0;b&&!1!==b&&"nofollow"!==b?(k=c(".cboxElement").filter(function(){var a=c.data(this,"colorbox");return(new M(this,a)).get("rel")===b}),m=k.index(a.el),-1===m&&(k=k.add(a.el),m=k.length-1)):k=c(a.el)}function C(a){c(p).trigger(a);r.triggerHandler(a)}function O(b){var d;if(!H){d=c(b).data("colorbox");a=new M(b,d);ja(a.get("rel"));if(!x){x=I=!0;G(a.get("className"));f.css({visibility:"hidden",display:"block",opacity:""});h=g("div","LoadedContent","width:0; height:0; overflow:hidden; visibility:hidden");
4
- u.css({width:"",height:""}).append(h);t=T.height()+U.height()+u.outerHeight(!0)-u.height();v=V.width()+W.width()+u.outerWidth(!0)-u.width();y=h.outerHeight(!0);z=h.outerWidth(!0);b=n(a.get("initialWidth"),"x");d=n(a.get("initialHeight"),"y");var F=a.get("maxWidth"),B=a.get("maxHeight");a.w=Math.max((!1!==F?Math.min(b,n(F,"x")):b)-z-v,0);a.h=Math.max((!1!==B?Math.min(d,n(B,"y")):d)-y-t,0);h.css({width:"",height:a.h});l.position();C("cbox_open");a.get("onOpen");X.add(Y).hide();f.focus();a.get("trapFocus")&&
5
- p.addEventListener&&(p.addEventListener("focus",fa,!0),r.one("cbox_closed",function(){p.removeEventListener("focus",fa,!0)}));if(a.get("returnFocus"))r.one("cbox_closed",function(){c(a.el).focus()})}b=parseFloat(a.get("opacity"));q.css({opacity:b===b?b:"",cursor:a.get("overlayClose")?"pointer":"",visibility:"visible"}).show();a.get("closeButton")?P.html(a.get("close")).appendTo(u):P.appendTo("<div/>");ka()}}function ga(){f||(Z=!1,w=c(A),f=g("div").attr({id:"colorbox","class":!1===c.support.opacity?
6
- "cboxIE":"",role:"dialog",tabindex:"-1"}).hide(),q=g("div","Overlay").hide(),Q=c([g("div","LoadingOverlay")[0],g("div","LoadingGraphic")[0]]),D=g("div","Wrapper"),u=g("div","Content").append(Y=g("div","Title"),aa=g("div","Current"),J=c('<button type="button"/>').attr({id:"cboxPrevious"}),K=c('<button type="button"/>').attr({id:"cboxNext"}),E=g("button","Slideshow"),Q),P=c('<button type="button"/>').attr({id:"cboxClose"}),D.append(g("div").append(g("div","TopLeft"),T=g("div","TopCenter"),g("div","TopRight")),
7
- g("div",!1,"clear:left").append(V=g("div","MiddleLeft"),u,W=g("div","MiddleRight")),g("div",!1,"clear:left").append(g("div","BottomLeft"),U=g("div","BottomCenter"),g("div","BottomRight"))).find("div div").css({"float":"left"}),L=g("div",!1,"position:absolute; width:9999px; visibility:hidden; display:none; max-width:none;"),X=K.add(J).add(aa).add(E));p.body&&!f.parent().length&&c(p.body).append(q,f.append(D,L))}function la(){function b(a){1<a.which||a.shiftKey||a.altKey||a.metaKey||a.ctrlKey||(a.preventDefault(),
8
- O(this))}if(f){if(!Z)if(Z=!0,K.click(function(){l.next()}),J.click(function(){l.prev()}),P.click(function(){l.close()}),q.click(function(){a.get("overlayClose")&&l.close()}),c(p).bind("keydown.cbox",function(b){var c=b.keyCode;x&&a.get("escKey")&&27===c&&(b.preventDefault(),l.close());x&&a.get("arrowKey")&&k[1]&&!b.altKey&&(37===c?(b.preventDefault(),J.click()):39===c&&(b.preventDefault(),K.click()))}),c.isFunction(c.fn.on))c(p).on("click.cbox",".cboxElement",b);else c(".cboxElement").live("click.cbox",
9
- b);return!0}return!1}function ka(){var b,d,f=l.prep,B,h=++ba;I=!0;e=!1;C("cbox_purge");C("cbox_load");a.get("onLoad");a.h=a.get("height")?n(a.get("height"),"y")-y-t:a.get("innerHeight")&&n(a.get("innerHeight"),"y");a.w=a.get("width")?n(a.get("width"),"x")-z-v:a.get("innerWidth")&&n(a.get("innerWidth"),"x");a.mw=a.w;a.mh=a.h;a.get("maxWidth")&&(a.mw=n(a.get("maxWidth"),"x")-z-v,a.mw=a.w&&a.w<a.mw?a.w:a.mw);a.get("maxHeight")&&(a.mh=n(a.get("maxHeight"),"y")-y-t,a.mh=a.h&&a.h<a.mh?a.h:a.mh);b=a.get("href");
10
- ha=setTimeout(function(){Q.show()},100);if(a.get("inline")){var ca=c(b);B=c("<div>").hide().insertBefore(ca);r.one("cbox_purge",function(){B.replaceWith(ca)});f(ca)}else a.get("iframe")?f(" "):a.get("html")?f(a.get("html")):da(a,b)?(b=ea(a,b),e=a.get("createImg"),c(e).addClass("cboxPhoto").bind("error.cbox",function(){f(g("div","Error").html(a.get("imgError")))}).one("load",function(){h===ba&&setTimeout(function(){var b;a.get("retinaImage")&&1<A.devicePixelRatio&&(e.height/=A.devicePixelRatio,e.width/=
11
- A.devicePixelRatio);a.get("scalePhotos")&&(d=function(){e.height-=e.height*b;e.width-=e.width*b},a.mw&&e.width>a.mw&&(b=(e.width-a.mw)/e.width,d()),a.mh&&e.height>a.mh&&(b=(e.height-a.mh)/e.height,d()));a.h&&(e.style.marginTop=Math.max(a.mh-e.height,0)/2+"px");k[1]&&(a.get("loop")||k[m+1])&&(e.style.cursor="pointer",c(e).bind("click.cbox",function(){l.next()}));e.style.width=e.width+"px";e.style.height=e.height+"px";f(e)},1)}),e.src=b):b&&L.load(b,a.get("data"),function(b,d){h===ba&&f("error"===d?
12
- g("div","Error").html(a.get("xhrError")):c(this).contents())})}var S={html:!1,photo:!1,iframe:!1,inline:!1,transition:"elastic",speed:300,fadeOut:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,opacity:.9,preloading:!0,className:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:void 0,closeButton:!0,fastIframe:!0,open:!1,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,
13
- slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",photoRegex:/\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr|svg)((#|\?).*)?#x2F;i,retinaImage:!1,retinaUrl:!1,retinaSuffix:"@2x.$1",current:"image {current} of {total}",previous:"previous",next:"next",close:"close",xhrError:"This content failed to load.",imgError:"This image failed to load.",returnFocus:!0,trapFocus:!0,onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,rel:function(){return this.rel},href:function(){return c(this).attr("href")},
14
- title:function(){return this.title},createImg:function(){var a=new Image,d=c(this).data("cbox-img-attrs");"object"===typeof d&&c.each(d,function(c,d){a[c]=d});return a},createIframe:function(){var a=p.createElement("iframe"),d=c(this).data("cbox-iframe-attrs");"object"===typeof d&&c.each(d,function(c,d){a[c]=d});"frameBorder"in a&&(a.frameBorder=0);"allowTransparency"in a&&(a.allowTransparency="true");a.name=(new Date).getTime();a.allowFullscreen=!0;return a}},q,f,D,u,T,V,W,U,k,w,h,L,Q,Y,aa,E,K,J,
15
- P,X,r=c("<a/>"),a,t,v,y,z,m,e,x,I,H,ha,l,ba=0,ia={},Z,ma=function(){function b(){clearTimeout(n)}function c(){if(a.get("loop")||k[m+1])b(),n=setTimeout(l.next,a.get("slideshowSpeed"))}function e(){E.html(a.get("slideshowStop")).unbind("click.cbox").one("click.cbox",B);r.bind("cbox_complete",c).bind("cbox_load",b);f.removeClass("cboxSlideshow_off").addClass("cboxSlideshow_on")}function B(){b();r.unbind("cbox_complete",c).unbind("cbox_load",b);E.html(a.get("slideshowStart")).unbind("click.cbox").one("click.cbox",
16
- function(){l.next();e()});f.removeClass("cboxSlideshow_on").addClass("cboxSlideshow_off")}function g(){h=!1;E.hide();b();r.unbind("cbox_complete",c).unbind("cbox_load",b);f.removeClass("cboxSlideshow_off cboxSlideshow_on")}var h,n;return function(){h?a.get("slideshow")||(r.unbind("cbox_cleanup",g),g()):a.get("slideshow")&&k[1]&&(h=!0,r.one("cbox_cleanup",g),a.get("slideshowAuto")?e():B(),E.show())}}();c.colorbox||(c(ga),l=c.fn.colorbox=c.colorbox=function(a,d){var f,e=this;a=a||{};c.isFunction(e)&&
17
- (e=c("<a/>"),a.open=!0);if(!e[0])return e;ga();la()&&(d&&(a.onComplete=d),e.each(function(){var d=c.data(this,"colorbox")||{};c.data(this,"colorbox",c.extend(d,a))}).addClass("cboxElement"),f=new M(e[0],a),f.get("open")&&O(e[0]));return e},l.position=function(b,d){function e(){T[0].style.width=U[0].style.width=u[0].style.width=parseInt(f[0].style.width,10)-v+"px";u[0].style.height=V[0].style.height=W[0].style.height=parseInt(f[0].style.height,10)-t+"px"}var g,h=0,k=0,m=f.offset(),p,r;w.unbind("resize.cbox");
18
- f.css({top:-9E4,left:-9E4});p=w.scrollTop();r=w.scrollLeft();a.get("fixed")?(m.top-=p,m.left-=r,f.css({position:"fixed"})):(h=p,k=r,f.css({position:"absolute"}));k=!1!==a.get("right")?k+Math.max(w.width()-a.w-z-v-n(a.get("right"),"x"),0):!1!==a.get("left")?k+n(a.get("left"),"x"):k+Math.round(Math.max(w.width()-a.w-z-v,0)/2);h=!1!==a.get("bottom")?h+Math.max(R()-a.h-y-t-n(a.get("bottom"),"y"),0):!1!==a.get("top")?h+n(a.get("top"),"y"):h+Math.round(Math.max(R()-a.h-y-t,0)/2);f.css({top:m.top,left:m.left,
19
- visibility:"visible"});D[0].style.width=D[0].style.height="9999px";g={width:a.w+z+v,height:a.h+y+t,top:h,left:k};if(b){var q=0;c.each(g,function(a){g[a]!==ia[a]&&(q=b)});b=q}ia=g;b||f.css(g);f.dequeue().animate(g,{duration:b||0,complete:function(){e();I=!1;D[0].style.width=a.w+z+v+"px";D[0].style.height=a.h+y+t+"px";a.get("reposition")&&setTimeout(function(){w.bind("resize.cbox",l.position)},1);c.isFunction(d)&&d()},step:e})},l.resize=function(b){var c;x&&(b=b||{},b.width&&(a.w=n(b.width,"x")-z-v),
20
- b.innerWidth&&(a.w=n(b.innerWidth,"x")),h.css({width:a.w}),b.height&&(a.h=n(b.height,"y")-y-t),b.innerHeight&&(a.h=n(b.innerHeight,"y")),b.innerHeight||b.height||(c=h.scrollTop(),h.css({height:"auto"}),a.h=h.height()),h.css({height:a.h}),c&&h.scrollTop(c),l.position("none"===a.get("transition")?0:a.get("speed")))},l.prep=function(b){function d(){a.w=a.w||h.width();a.w=a.mw&&a.mw<a.w?a.mw:a.w;return a.w}function n(){a.h=a.h||h.height();a.h=a.mh&&a.mh<a.h?a.mh:a.h;return a.h}if(x){var q,t="none"===
21
- a.get("transition")?0:a.get("speed");h.remove();h=g("div","LoadedContent").append(b);h.hide().appendTo(L.show()).css({width:d(),overflow:a.get("scrolling")?"auto":"hidden"}).css({height:n()}).prependTo(u);L.hide();c(e).css({"float":"none"});G(a.get("className"));q=function(){function b(){!1===c.support.opacity&&f[0].style.removeAttribute("filter")}var d=k.length,e,g;x&&(g=function(){clearTimeout(ha);Q.hide();C("cbox_complete");a.get("onComplete")},Y.html(a.get("title")).show(),h.show(),1<d?("string"===
22
- typeof a.get("current")&&aa.html(a.get("current").replace("{current}",m+1).replace("{total}",d)).show(),K[a.get("loop")||m<d-1?"show":"hide"]().html(a.get("next")),J[a.get("loop")||m?"show":"hide"]().html(a.get("previous")),ma(),a.get("preloading")&&c.each([N(-1),N(1)],function(){var a,b=k[this];a=new M(b,c.data(b,"colorbox"));(b=a.get("href"))&&da(a,b)&&(b=ea(a,b),a=p.createElement("img"),a.src=b)})):X.hide(),a.get("iframe")?(e=a.get("createIframe"),a.get("scrolling")||(e.scrolling="no"),c(e).attr({src:a.get("href"),
23
- "class":"cboxIframe"}).one("load",g).appendTo(h),r.one("cbox_purge",function(){e.src="//about:blank"}),a.get("fastIframe")&&c(e).trigger("load")):g(),"fade"===a.get("transition")?f.fadeTo(t,1,b):b())};"fade"===a.get("transition")?f.fadeTo(t,0,function(){l.position(0,q)}):l.position(t,q)}},l.next=function(){!I&&k[1]&&(a.get("loop")||k[m+1])&&(m=N(1),O(k[m]))},l.prev=function(){!I&&k[1]&&(a.get("loop")||m)&&(m=N(-1),O(k[m]))},l.close=function(){x&&!H&&(H=!0,x=!1,C("cbox_cleanup"),a.get("onCleanup"),
24
- w.unbind(".cbox"),q.fadeTo(a.get("fadeOut")||0,0),f.stop().fadeTo(a.get("fadeOut")||0,0,function(){f.hide();q.hide();C("cbox_purge");h.remove();setTimeout(function(){H=!1;C("cbox_closed");a.get("onClosed")},1)}))},l.remove=function(){f&&(f.stop(),c.colorbox.close(),f.stop(!1,!0).remove(),q.remove(),H=!1,f=null,c(".cboxElement").removeData("colorbox").removeClass("cboxElement"),c(p).unbind("click.cbox").unbind("keydown.cbox"))},l.element=function(){return c(a.el)},l.settings=S)})(jQuery,document,window);
1
+ /*
2
+ Colorbox 1.6.3
3
+ license: MIT
4
+ http://www.jacklmoore.com/colorbox
5
+ */
6
+ var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(b,h,g){b instanceof String&&(b=String(b));for(var d=b.length,r=0;r<d;r++){var C=b[r];if(h.call(g,C,r,b))return{i:r,v:C}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(b,h,g){b!=Array.prototype&&b!=Object.prototype&&(b[h]=g.value)};
7
+ $jscomp.getGlobal=function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global&&null!=global?global:b};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(b,h,g,d){if(h){g=$jscomp.global;b=b.split(".");for(d=0;d<b.length-1;d++){var r=b[d];r in g||(g[r]={});g=g[r]}b=b[b.length-1];d=g[b];h=h(d);h!=d&&null!=h&&$jscomp.defineProperty(g,b,{configurable:!0,writable:!0,value:h})}};
8
+ $jscomp.polyfill("Array.prototype.find",function(b){return b?b:function(b,g){return $jscomp.findInternal(this,b,g).v}},"es6","es3");
9
+ (function(b,h,g){function d(a,f,H){a=h.createElement(a);f&&(a.id="cbox"+f);H&&(a.style.cssText=H);return b(a)}function r(){return g.innerHeight?g.innerHeight:b(g).height()}function C(a,f){f!==Object(f)&&(f={});this.cache={};this.el=a;this.value=function(a){if(void 0===this.cache[a]){var c=b(this.el).attr("data-cbox-"+a);void 0!==c?this.cache[a]=c:void 0!==f[a]?this.cache[a]=f[a]:void 0!==S[a]&&(this.cache[a]=S[a])}return this.cache[a]};this.get=function(a){a=this.value(a);return b.isFunction(a)?a.call(this.el,
10
+ this):a}}function O(a){var c=n.length;a=(p+a)%c;return 0>a?c+a:a}function q(a,b){return Math.round((/%/.test(a)?("x"===b?x.width():r())/100:1)*parseInt(a,10))}function ca(a,b){return a.get("photo")||a.get("photoRegex").test(b)}function da(a,b){return a.get("retinaUrl")&&1<g.devicePixelRatio?b.replace(a.get("photoRegex"),a.get("retinaSuffix")):b}function ea(a){"contains"in k[0]&&!k[0].contains(a.target)&&a.target!==y[0]&&(a.stopPropagation(),k.focus())}function I(a){I.str!==a&&(k.add(y).removeClass(I.str).addClass(a),
11
+ I.str=a)}function ja(c){p=0;c&&!1!==c&&"nofollow"!==c?(n=b(".cboxElement").filter(function(){var a=b.data(this,"colorbox");return(new C(this,a)).get("rel")===c}),p=n.index(a.el),-1===p&&(n=n.add(a.el),p=n.length-1)):n=b(a.el)}function E(a){b(h).trigger(a);t.triggerHandler(a)}function P(c){if(!J){var f=b(c).data("colorbox");a=new C(c,f);ja(a.get("rel"));if(!z){z=K=!0;I(a.get("className"));k.css({visibility:"hidden",display:"block",opacity:""});l=d("div","LoadedContent","width:0; height:0; overflow:hidden; visibility:hidden");
12
+ u.css({width:"",height:""}).append(l);v=T.height()+U.height()+u.outerHeight(!0)-u.height();w=V.width()+W.width()+u.outerWidth(!0)-u.width();A=l.outerHeight(!0);B=l.outerWidth(!0);c=q(a.get("initialWidth"),"x");f=q(a.get("initialHeight"),"y");var H=a.get("maxWidth"),e=a.get("maxHeight");a.w=Math.max((!1!==H?Math.min(c,q(H,"x")):c)-B-w,0);a.h=Math.max((!1!==e?Math.min(f,q(e,"y")):f)-A-v,0);l.css({width:"",height:a.h});m.position();E("cbox_open");a.get("onOpen");X.add(Y).hide();k.focus();a.get("trapFocus")&&
13
+ h.addEventListener&&(h.addEventListener("focus",ea,!0),t.one("cbox_closed",function(){h.removeEventListener("focus",ea,!0)}));if(a.get("returnFocus"))t.one("cbox_closed",function(){b(a.el).focus()})}c=parseFloat(a.get("opacity"));y.css({opacity:c===c?c:"",cursor:a.get("overlayClose")?"pointer":"",visibility:"visible"}).show();a.get("closeButton")?Q.html(a.get("close")).appendTo(u):Q.appendTo("<div/>");ka()}}function fa(){k||(Z=!1,x=b(g),k=d("div").attr({id:"colorbox","class":!1===b.support.opacity?
14
+ "cboxIE":"",role:"dialog",tabindex:"-1"}).hide(),y=d("div","Overlay").hide(),R=b([d("div","LoadingOverlay")[0],d("div","LoadingGraphic")[0]]),F=d("div","Wrapper"),u=d("div","Content").append(Y=d("div","Title"),aa=d("div","Current"),L=b('<button type="button"/>').attr({id:"cboxPrevious"}),M=b('<button type="button"/>').attr({id:"cboxNext"}),G=d("button","Slideshow"),R),Q=b('<button type="button"/>').attr({id:"cboxClose"}),F.append(d("div").append(d("div","TopLeft"),T=d("div","TopCenter"),d("div","TopRight")),
15
+ d("div",!1,"clear:left").append(V=d("div","MiddleLeft"),u,W=d("div","MiddleRight")),d("div",!1,"clear:left").append(d("div","BottomLeft"),U=d("div","BottomCenter"),d("div","BottomRight"))).find("div div").css({"float":"left"}),N=d("div",!1,"position:absolute; width:9999px; visibility:hidden; display:none; max-width:none;"),X=M.add(L).add(aa).add(G));h.body&&!k.parent().length&&b(h.body).append(y,k.append(F,N))}function la(){function c(a){1<a.which||a.shiftKey||a.altKey||a.metaKey||a.ctrlKey||(a.preventDefault(),
16
+ P(this))}if(k){if(!Z)if(Z=!0,M.click(function(){m.next()}),L.click(function(){m.prev()}),Q.click(function(){m.close()}),y.click(function(){a.get("overlayClose")&&m.close()}),b(h).bind("keydown.cbox",function(b){var c=b.keyCode;z&&a.get("escKey")&&27===c&&(b.preventDefault(),m.close());z&&a.get("arrowKey")&&n[1]&&!b.altKey&&(37===c?(b.preventDefault(),L.click()):39===c&&(b.preventDefault(),M.click()))}),b.isFunction(b.fn.on))b(h).on("click.cbox",".cboxElement",c);else b(".cboxElement").live("click.cbox",
17
+ c);return!0}return!1}function ka(){var c,f=m.prep,k=++ba;K=!0;e=!1;E("cbox_purge");E("cbox_load");a.get("onLoad");a.h=a.get("height")?q(a.get("height"),"y")-A-v:a.get("innerHeight")&&q(a.get("innerHeight"),"y");a.w=a.get("width")?q(a.get("width"),"x")-B-w:a.get("innerWidth")&&q(a.get("innerWidth"),"x");a.mw=a.w;a.mh=a.h;a.get("maxWidth")&&(a.mw=q(a.get("maxWidth"),"x")-B-w,a.mw=a.w&&a.w<a.mw?a.w:a.mw);a.get("maxHeight")&&(a.mh=q(a.get("maxHeight"),"y")-A-v,a.mh=a.h&&a.h<a.mh?a.h:a.mh);var D=a.get("href");
18
+ ha=setTimeout(function(){R.show()},100);if(a.get("inline")){var h=b(D);var l=b("<div>").hide().insertBefore(h);t.one("cbox_purge",function(){l.replaceWith(h)});f(h)}else a.get("iframe")?f(" "):a.get("html")?f(a.get("html")):ca(a,D)?(D=da(a,D),e=a.get("createImg"),b(e).addClass("cboxPhoto").bind("error.cbox",function(){f(d("div","Error").html(a.get("imgError")))}).one("load",function(){k===ba&&setTimeout(function(){a.get("retinaImage")&&1<g.devicePixelRatio&&(e.height/=g.devicePixelRatio,e.width/=
19
+ g.devicePixelRatio);if(a.get("scalePhotos")){c=function(){e.height-=e.height*d;e.width-=e.width*d};if(a.mw&&e.width>a.mw){var d=(e.width-a.mw)/e.width;c()}a.mh&&e.height>a.mh&&(d=(e.height-a.mh)/e.height,c())}a.h&&(e.style.marginTop=Math.max(a.mh-e.height,0)/2+"px");n[1]&&(a.get("loop")||n[p+1])&&(e.style.cursor="pointer",b(e).bind("click.cbox",function(){m.next()}));e.style.width=e.width+"px";e.style.height=e.height+"px";f(e)},1)}),e.src=D):D&&N.load(D,a.get("data"),function(c,e){k===ba&&f("error"===
20
+ e?d("div","Error").html(a.get("xhrError")):b(this).contents())})}var S={html:!1,photo:!1,iframe:!1,inline:!1,transition:"elastic",speed:300,fadeOut:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,opacity:.9,preloading:!0,className:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:void 0,closeButton:!0,fastIframe:!0,open:!1,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,
21
+ slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",photoRegex:/\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr|svg)((#|\?).*)?#x2F;i,retinaImage:!1,retinaUrl:!1,retinaSuffix:"@2x.$1",current:"image {current} of {total}",previous:"previous",next:"next",close:"close",xhrError:"This content failed to load.",imgError:"This image failed to load.",returnFocus:!0,trapFocus:!0,onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,rel:function(){return this.rel},href:function(){return b(this).attr("href")},
22
+ title:function(){return this.title},createImg:function(){var a=new Image,f=b(this).data("cbox-img-attrs");"object"===typeof f&&b.each(f,function(b,c){a[b]=c});return a},createIframe:function(){var a=h.createElement("iframe"),f=b(this).data("cbox-iframe-attrs");"object"===typeof f&&b.each(f,function(b,c){a[b]=c});"frameBorder"in a&&(a.frameBorder=0);"allowTransparency"in a&&(a.allowTransparency="true");a.name=(new Date).getTime();a.allowFullscreen=!0;return a}},y,k,F,u,T,V,W,U,n,x,l,N,R,Y,aa,G,M,L,
23
+ Q,X,t=b("<a/>"),a,v,w,A,B,p,e,z,K,J,ha,ba=0,ia={},Z,ma=function(){function b(){clearTimeout(l)}function f(){if(a.get("loop")||n[p+1])b(),l=setTimeout(m.next,a.get("slideshowSpeed"))}function d(){G.html(a.get("slideshowStop")).unbind("click.cbox").one("click.cbox",e);t.bind("cbox_complete",f).bind("cbox_load",b);k.removeClass("cboxSlideshow_off").addClass("cboxSlideshow_on")}function e(){b();t.unbind("cbox_complete",f).unbind("cbox_load",b);G.html(a.get("slideshowStart")).unbind("click.cbox").one("click.cbox",
24
+ function(){m.next();d()});k.removeClass("cboxSlideshow_on").addClass("cboxSlideshow_off")}function h(){g=!1;G.hide();b();t.unbind("cbox_complete",f).unbind("cbox_load",b);k.removeClass("cboxSlideshow_off cboxSlideshow_on")}var g,l;return function(){g?a.get("slideshow")||(t.unbind("cbox_cleanup",h),h()):a.get("slideshow")&&n[1]&&(g=!0,t.one("cbox_cleanup",h),a.get("slideshowAuto")?d():e(),G.show())}}();if(!b.colorbox){b(fa);var m=b.fn.colorbox=b.colorbox=function(a,f){var c=this;a=a||{};b.isFunction(c)&&
25
+ (c=b("<a/>"),a.open=!0);if(!c[0])return c;fa();la()&&(f&&(a.onComplete=f),c.each(function(){var c=b.data(this,"colorbox")||{};b.data(this,"colorbox",b.extend(c,a))}).addClass("cboxElement"),f=new C(c[0],a),f.get("open")&&P(c[0]));return c};m.position=function(c,f){function d(){T[0].style.width=U[0].style.width=u[0].style.width=parseInt(k[0].style.width,10)-w+"px";u[0].style.height=V[0].style.height=W[0].style.height=parseInt(k[0].style.height,10)-v+"px"}var e=0,h=0,g=k.offset();x.unbind("resize.cbox");
26
+ k.css({top:-9E4,left:-9E4});var l=x.scrollTop();var n=x.scrollLeft();a.get("fixed")?(g.top-=l,g.left-=n,k.css({position:"fixed"})):(e=l,h=n,k.css({position:"absolute"}));h=!1!==a.get("right")?h+Math.max(x.width()-a.w-B-w-q(a.get("right"),"x"),0):!1!==a.get("left")?h+q(a.get("left"),"x"):h+Math.round(Math.max(x.width()-a.w-B-w,0)/2);e=!1!==a.get("bottom")?e+Math.max(r()-a.h-A-v-q(a.get("bottom"),"y"),0):!1!==a.get("top")?e+q(a.get("top"),"y"):e+Math.round(Math.max(r()-a.h-A-v,0)/2);k.css({top:g.top,
27
+ left:g.left,visibility:"visible"});F[0].style.width=F[0].style.height="9999px";var p={width:a.w+B+w,height:a.h+A+v,top:e,left:h};if(c){var t=0;b.each(p,function(a){p[a]!==ia[a]&&(t=c)});c=t}ia=p;c||k.css(p);k.dequeue().animate(p,{duration:c||0,complete:function(){d();K=!1;F[0].style.width=a.w+B+w+"px";F[0].style.height=a.h+A+v+"px";a.get("reposition")&&setTimeout(function(){x.bind("resize.cbox",m.position)},1);b.isFunction(f)&&f()},step:d})};m.resize=function(b){if(z){b=b||{};b.width&&(a.w=q(b.width,
28
+ "x")-B-w);b.innerWidth&&(a.w=q(b.innerWidth,"x"));l.css({width:a.w});b.height&&(a.h=q(b.height,"y")-A-v);b.innerHeight&&(a.h=q(b.innerHeight,"y"));if(!b.innerHeight&&!b.height){var c=l.scrollTop();l.css({height:"auto"});a.h=l.height()}l.css({height:a.h});c&&l.scrollTop(c);m.position("none"===a.get("transition")?0:a.get("speed"))}};m.prep=function(c){if(z){var f="none"===a.get("transition")?0:a.get("speed");l.remove();l=d("div","LoadedContent").append(c);l.hide().appendTo(N.show()).css({width:function(){a.w=
29
+ a.w||l.width();a.w=a.mw&&a.mw<a.w?a.mw:a.w;return a.w}(),overflow:a.get("scrolling")?"auto":"hidden"}).css({height:function(){a.h=a.h||l.height();a.h=a.mh&&a.mh<a.h?a.mh:a.h;return a.h}()}).prependTo(u);N.hide();b(e).css({"float":"none"});I(a.get("className"));var g=function(){function c(){!1===b.support.opacity&&k[0].style.removeAttribute("filter")}var d=n.length;if(z){var e=function(){clearTimeout(ha);R.hide();E("cbox_complete");a.get("onComplete")};Y.html(a.get("title")).show();l.show();1<d?("string"===
30
+ typeof a.get("current")&&aa.html(a.get("current").replace("{current}",p+1).replace("{total}",d)).show(),M[a.get("loop")||p<d-1?"show":"hide"]().html(a.get("next")),L[a.get("loop")||p?"show":"hide"]().html(a.get("previous")),ma(),a.get("preloading")&&b.each([O(-1),O(1)],function(){var a=n[this];var c=new C(a,b.data(a,"colorbox"));(a=c.get("href"))&&ca(c,a)&&(a=da(c,a),c=h.createElement("img"),c.src=a)})):X.hide();if(a.get("iframe")){var g=a.get("createIframe");a.get("scrolling")||(g.scrolling="no");
31
+ b(g).attr({src:a.get("href"),"class":"cboxIframe"}).one("load",e).appendTo(l);t.one("cbox_purge",function(){g.src="//about:blank"});a.get("fastIframe")&&b(g).trigger("load")}else e();"fade"===a.get("transition")?k.fadeTo(f,1,c):c()}};"fade"===a.get("transition")?k.fadeTo(f,0,function(){m.position(0,g)}):m.position(f,g)}};m.next=function(){!K&&n[1]&&(a.get("loop")||n[p+1])&&(p=O(1),P(n[p]))};m.prev=function(){!K&&n[1]&&(a.get("loop")||p)&&(p=O(-1),P(n[p]))};m.close=function(){z&&!J&&(J=!0,z=!1,E("cbox_cleanup"),
32
+ a.get("onCleanup"),x.unbind(".cbox"),y.fadeTo(a.get("fadeOut")||0,0),k.stop().fadeTo(a.get("fadeOut")||0,0,function(){k.hide();y.hide();E("cbox_purge");l.remove();setTimeout(function(){J=!1;E("cbox_closed");a.get("onClosed")},1)}))};m.remove=function(){k&&(k.stop(),b.colorbox.close(),k.stop(!1,!0).remove(),y.remove(),J=!1,k=null,b(".cboxElement").removeData("colorbox").removeClass("cboxElement"),b(h).unbind("click.cbox").unbind("keydown.cbox"))};m.element=function(){return b(a.el)};m.settings=S}})(jQuery,
33
+ document,window);
plugin-fw/assets/js/metabox.min.js CHANGED
@@ -1,4 +1,7 @@
1
- (function(a){function h(b,c,d,e){var f=!0;if("string"==typeof c){":radio"==c.substr(0,6)&&(c+=":checked");var g=a(c).val();"checkbox"==a(c).attr("type")&&(g=a(c).is(":checked")?"yes":"no");d=d.split(",");for(c=0;c<d.length;c++)if(g!=d[c])f=!1;else{f=!0;break}}d=a(b);b=a(b+"-container").parent();e=e.split("-");for(var h in e)if(g=e[h],f)switch(g){case "disable":b.removeClass("yith-disabled");d.attr("disabled",!1);break;case "hideme":d.show();break;default:b.show()}else switch(g){case "disable":b.addClass("yith-disabled");
2
- d.attr("disabled",!0);break;case "hideme":d.hide();break;default:b.hide()}}a(".metaboxes-tab").each(function(){a(".tabs-panel",this).hide();var b=wpCookies.get("active_metabox_tab"),b=null==b?a("ul.metaboxes-tabs li:first-child a",this).attr("href"):"#"+b;a(b).show();a(".metaboxes-tabs a",this).click(function(b){if(a(this).parent().hasClass("tabs"))b.preventDefault();else return b=a(this).attr("href"),a(this).parent().addClass("tabs").siblings("li").removeClass("tabs"),a(this).closest(".metaboxes-tab").find(".tabs-panel").hide(),
3
- a(b).show(),!1})});var k=a("#_active_page_options-container").parent().html();a("#_active_page_options-container").parent().remove();a(k).insertAfter("#yit-post-setting .handlediv");a(k).insertAfter("#yit-page-setting .handlediv");a("#_active_page_options-container").on("click",function(){a("#_active_page_options").is(":checked")?a("#yit-page-setting .inside .metaboxes-tab, #yit-post-setting .inside .metaboxes-tab").css({opacity:1,"pointer-events":"auto"}):a("#yit-page-setting .inside .metaboxes-tab, #yit-post-setting .inside .metaboxes-tab").css({opacity:.5,
4
- "pointer-events":"none"})}).click();a(".metaboxes-tab [data-dep-target]").each(function(){var b=a(this),c="#"+b.data("dep-target"),d="#"+b.data("dep-id"),e=b.data("dep-value"),f=b.data("dep-type");h(c,d,e.toString(),f);a(d).on("change",function(){h(c,d,e.toString(),f)}).change()})})(jQuery);
1
+ var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(a,e,c){a instanceof String&&(a=String(a));for(var b=a.length,d=0;d<b;d++){var f=a[d];if(e.call(c,f,d,a))return{i:d,v:f}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,e,c){a!=Array.prototype&&a!=Object.prototype&&(a[e]=c.value)};
2
+ $jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(a,e,c,b){if(e){c=$jscomp.global;a=a.split(".");for(b=0;b<a.length-1;b++){var d=a[b];d in c||(c[d]={});c=c[d]}a=a[a.length-1];b=c[a];e=e(b);e!=b&&null!=e&&$jscomp.defineProperty(c,a,{configurable:!0,writable:!0,value:e})}};
3
+ $jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(a,c){return $jscomp.findInternal(this,a,c).v}},"es6","es3");
4
+ (function(a){function e(b,d,c,e){var f=!0;if("string"==typeof d){":radio"==d.substr(0,6)&&(d+=":checked");var g=a(d).val();"checkbox"==a(d).attr("type")&&(g=a(d).is(":checked")?"yes":"no");c=c.split(",");for(d=0;d<c.length;d++)if(g!=c[d])f=!1;else{f=!0;break}}c=a(b);b=a(b+"-container").parent();e=e.split("-");for(var h in e)if(g=e[h],f)switch(g){case "disable":b.removeClass("yith-disabled");c.attr("disabled",!1);break;case "hideme":c.show();break;default:b.show()}else switch(g){case "disable":b.addClass("yith-disabled");
5
+ c.attr("disabled",!0);break;case "hideme":c.hide();break;default:b.hide()}}a(".metaboxes-tab").each(function(){a(".tabs-panel",this).hide();var b=wpCookies.get("active_metabox_tab");b=null==b?a("ul.metaboxes-tabs li:first-child a",this).attr("href"):"#"+b;a(b).show();a(".metaboxes-tabs a",this).click(function(b){if(a(this).parent().hasClass("tabs"))b.preventDefault();else return b=a(this).attr("href"),a(this).parent().addClass("tabs").siblings("li").removeClass("tabs"),a(this).closest(".metaboxes-tab").find(".tabs-panel").hide(),
6
+ a(b).show(),!1})});var c=a("#_active_page_options-container").parent().html();a("#_active_page_options-container").parent().remove();a(c).insertAfter("#yit-post-setting .handlediv");a(c).insertAfter("#yit-page-setting .handlediv");a("#_active_page_options-container").on("click",function(){a("#_active_page_options").is(":checked")?a("#yit-page-setting .inside .metaboxes-tab, #yit-post-setting .inside .metaboxes-tab").css({opacity:1,"pointer-events":"auto"}):a("#yit-page-setting .inside .metaboxes-tab, #yit-post-setting .inside .metaboxes-tab").css({opacity:.5,
7
+ "pointer-events":"none"})}).click();a(".metaboxes-tab [data-dep-target]").each(function(){var b=a(this),c="#"+b.data("dep-target"),f="#"+b.data("dep-id"),h=b.data("dep-value"),k=b.data("dep-type");e(c,f,h.toString(),k);a(f).on("change",function(){e(c,f,h.toString(),k)}).change()})})(jQuery);
plugin-fw/assets/js/multisite-updater.js CHANGED
@@ -6,18 +6,18 @@
6
* It is also available through the world-wide-web at this URL:
7
* http://www.gnu.org/licenses/gpl-3.0.txt
8
*/
9
- (function ($) {
10
11
- var plugins_menu_item = $( '#menu-plugins' ),
12
- update = plugins_menu_item.find('.update-plugins'),
13
- count = update.find(".update-count").text(),
14
- registered = plugins.registered,
15
- activated = plugins.activated;
16
17
- if( count == 0 || count == ''){
18
var update_row = '<span class="update-plugins"><span class="plugin-count"></span></span>';
19
- count = 0;
20
- plugins_menu_item.find( '.wp-menu-name').append( update_row );
21
}
22
23
/**
@@ -38,51 +38,47 @@
38
*
39
* @return void
40
*/
41
- function update_plugins_row( registered, activated, count, localize ){
42
- for( var init in registered ){
43
- var plugin = registered[init];
44
- for( var headers in plugin ){
45
46
- if( headers == 'slug' || version_compare( plugin[headers].Version, plugin[headers].Latest, '>=' ) ) {
47
continue;
48
}
49
50
- count = parseInt(count) + 1;
51
- $(".plugin-count").empty().html(count);
52
53
- var regex = new RegExp(' ', 'g'),
54
- info = plugin[headers],
55
- name = '' + info.Name,
56
- id = name.replace(regex, '-').trim(),
57
- row = '*[data-slug="' + id.toLowerCase() +'"]';
58
59
- $(row).addClass("update");
60
61
var html = '<tr class="plugin-update-tr">' +
62
- '<td colspan="3" class="plugin-update colspanchange">' +
63
- '<div class="update-message">' + localize.strings.new_version.replace( '%plugin_name%', name ) +
64
- '<a class="thickbox" href="' + localize.details_url[init] + '">' + localize.strings.latest.replace( '%latest%', plugin[headers].Latest ) + '</a>';
65
66
- if( typeof activated[init] == "undefined" ) {
67
68
html = html +
69
- ' <em>' + localize.strings.unavailable + '</em>' +
70
- localize.strings.activate.replace( '%activate_link%', localize.licence_activation_url ).replace( '%plugin_name%', name );
71
} else {
72
html = html +
73
- '. <a href="' + localize.update_url[init] + '">' + localize.strings.update_now + '</a>';
74
- }
75
-
76
- if( typeof localize.changelogs[init] != 'undefined' ){
77
- html = html + localize.changelogs[init];
78
}
79
80
html = html +
81
- '</div>' +
82
- '</td>' +
83
- '</tr>';
84
85
- $(html).insertAfter(row);
86
}
87
}
88
}
@@ -96,7 +92,7 @@
96
*
97
* @see php.js library http://phpjs.org/
98
*/
99
- function version_compare(v1, v2, operator) {
100
// discuss at: http://phpjs.org/functions/version_compare/
101
// original by: Philippe Jausions (http://pear.php.net/user/jausions)
102
// original by: Aidan Lister (http://aidanlister.com/)
@@ -113,21 +109,21 @@
113
// example 4: version_compare('4.1.0.52','4.01.0.51');
114
// returns 4: 1
115
116
- this.php_js = this.php_js || {};
117
this.php_js.ENV = this.php_js.ENV || {};
118
// END REDUNDANT
119
// Important: compare must be initialized at 0.
120
- var i = 0,
121
- x = 0,
122
- compare = 0,
123
- // vm maps textual PHP versions to negatives so they're less than 0.
124
- // PHP currently defines these as CASE-SENSITIVE. It is important to
125
- // leave these as negatives so that they can come before numerical versions
126
- // and as if no letters were there to begin with.
127
- // (1alpha is < 1 and < 1.1 but > 1dev1)
128
- // If a non-numerical value can't be mapped to this table, it receives
129
- // -7 as its value.
130
- vm = {
131
'dev' : -6,
132
'alpha': -5,
133
'a' : -5,
@@ -139,54 +135,54 @@
139
'p' : 1,
140
'pl' : 1
141
},
142
- // This function will be called to prepare each version argument.
143
- // It replaces every _, -, and + with a dot.
144
- // It surrounds any nonsequence of numbers/dots with dots.
145
- // It replaces sequences of dots with a single dot.
146
- // version_compare('4..0', '4.0') == 0
147
- // Important: A string of 0 length needs to be converted into a value
148
- // even less than an unexisting value in vm (-7), hence [-8].
149
- // It's also important to not strip spaces because of this.
150
- // version_compare('', ' ') == 1
151
- prepVersion = function (v) {
152
v = ('' + v)
153
- .replace(/[_\-+]/g, '.');
154
- v = v.replace(/([^.\d]+)/g, '.$1.')
155
- .replace(/\.{2,}/g, '.');
156
- return (!v.length ? [-8] : v.split('.'));
157
};
158
// This converts a version component to a number.
159
// Empty component becomes 0.
160
// Non-numerical component becomes a negative number.
161
// Numerical component becomes itself as an integer.
162
- numVersion = function (v) {
163
- return !v ? 0 : (isNaN(v) ? vm[v] || -7 : parseInt(v, 10));
164
};
165
- v1 = prepVersion(v1);
166
- v2 = prepVersion(v2);
167
- x = Math.max(v1.length, v2.length);
168
- for (i = 0; i < x; i++) {
169
- if (v1[i] == v2[i]) {
170
continue;
171
}
172
- v1[i] = numVersion(v1[i]);
173
- v2[i] = numVersion(v2[i]);
174
- if (v1[i] < v2[i]) {
175
compare = -1;
176
break;
177
- } else if (v1[i] > v2[i]) {
178
compare = 1;
179
break;
180
}
181
}
182
- if (!operator) {
183
return compare;
184
}
185
186
// Important: operator is CASE-SENSITIVE.
187
// "No operator" seems to be treated as "<."
188
// Any other values seem to make the function return null.
189
- switch (operator) {
190
case '>':
191
case 'gt':
192
return (compare > 0);
@@ -217,6 +213,6 @@
217
$( 'body' ).on( 'click', '.yit-changelog-button', function () {
218
$( '#TB_window' ).remove();
219
} );
220
-
221
222
- })(jQuery);
6
* It is also available through the world-wide-web at this URL:
7
* http://www.gnu.org/licenses/gpl-3.0.txt
8
*/
9
+ (function ( $ ) {
10
11
+ var plugins_menu_item = $( '#menu-plugins' ),
12
+ update = plugins_menu_item.find( '.update-plugins' ),
13
+ count = update.find( ".update-count" ).text(),
14
+ registered = plugins.registered,
15
+ activated = plugins.activated;
16
17
+ if ( count == 0 || count == '' ) {
18
var update_row = '<span class="update-plugins"><span class="plugin-count"></span></span>';
19
+ count = 0;
20
+ plugins_menu_item.find( '.wp-menu-name' ).append( update_row );
21
}
22
23
/**
38
*
39
* @return void
40
*/
41
+ function update_plugins_row( registered, activated, count, localize ) {
42
+ for ( var init in registered ) {
43
+ var plugin = registered[ init ];
44
+ for ( var headers in plugin ) {
45
46
+ if ( headers == 'slug' || version_compare( plugin[ headers ].Version, plugin[ headers ].Latest, '>=' ) ) {
47
continue;
48
}
49
50
+ count = parseInt( count ) + 1;
51
+ $( ".plugin-count" ).empty().html( count );
52
53
+ var regex = new RegExp( ' ', 'g' ),
54
+ info = plugin[ headers ],
55
+ name = '' + info.Name,
56
+ id = name.replace( regex, '-' ).trim(),
57
+ row = '*[data-slug="' + id.toLowerCase() + '"]';
58
59
+ $( row ).addClass( "update" );
60
61
var html = '<tr class="plugin-update-tr">' +
62
+ '<td colspan="3" class="plugin-update colspanchange">' +
63
+ '<div class="update-message">' + localize.strings.new_version.replace( '%plugin_name%', name ) +
64
+ '<a class="thickbox open-plugin-details-modal" href="' + localize.details_url[ init ] + '">' + localize.strings.latest.replace( '%latest%', plugin[ headers ].Latest ) + '</a>';
65
66
+ if ( typeof activated[ init ] == "undefined" ) {
67
68
html = html +
69
+ ' <em>' + localize.strings.unavailable + '</em>' +
70
+ localize.strings.activate.replace( '%activate_link%', localize.licence_activation_url ).replace( '%plugin_name%', name );
71
} else {
72
html = html +
73
+ '. <a href="' + localize.update_url[ init ] + '">' + localize.strings.update_now + '</a>';
74
}
75
76
html = html +
77
+ '</div>' +
78
+ '</td>' +
79
+ '</tr>';
80
81
+ $( html ).insertAfter( row );
82
}
83
}
84
}
92
*
93
* @see php.js library http://phpjs.org/
94
*/
95
+ function version_compare( v1, v2, operator ) {
96
// discuss at: http://phpjs.org/functions/version_compare/
97
// original by: Philippe Jausions (http://pear.php.net/user/jausions)
98
// original by: Aidan Lister (http://aidanlister.com/)
109
// example 4: version_compare('4.1.0.52','4.01.0.51');
110
// returns 4: 1
111
112
+ this.php_js = this.php_js || {};
113
this.php_js.ENV = this.php_js.ENV || {};
114
// END REDUNDANT
115
// Important: compare must be initialized at 0.
116
+ var i = 0,
117
+ x = 0,
118
+ compare = 0,
119
+ // vm maps textual PHP versions to negatives so they're less than 0.
120
+ // PHP currently defines these as CASE-SENSITIVE. It is important to
121
+ // leave these as negatives so that they can come before numerical versions
122
+ // and as if no letters were there to begin with.
123
+ // (1alpha is < 1 and < 1.1 but > 1dev1)
124
+ // If a non-numerical value can't be mapped to this table, it receives
125
+ // -7 as its value.
126
+ vm = {
127
'dev' : -6,
128
'alpha': -5,
129
'a' : -5,
135
'p' : 1,
136
'pl' : 1
137
},
138
+ // This function will be called to prepare each version argument.
139
+ // It replaces every _, -, and + with a dot.
140
+ // It surrounds any nonsequence of numbers/dots with dots.
141
+ // It replaces sequences of dots with a single dot.
142
+ // version_compare('4..0', '4.0') == 0
143
+ // Important: A string of 0 length needs to be converted into a value
144
+ // even less than an unexisting value in vm (-7), hence [-8].
145
+ // It's also important to not strip spaces because of this.
146
+ // version_compare('', ' ') == 1
147
+ prepVersion = function ( v ) {
148
v = ('' + v)
149
+ .replace( /[_\-+]/g, '.' );
150
+ v = v.replace( /([^.\d]+)/g, '.$1.' )
151
+ .replace( /\.{2,}/g, '.' );
152
+ return (!v.length ? [ -8 ] : v.split( '.' ));
153
};
154
// This converts a version component to a number.
155
// Empty component becomes 0.
156
// Non-numerical component becomes a negative number.
157
// Numerical component becomes itself as an integer.
158
+ numVersion = function ( v ) {
159
+ return !v ? 0 : (isNaN( v ) ? vm[ v ] || -7 : parseInt( v, 10 ));
160
};
161
+ v1 = prepVersion( v1 );
162
+ v2 = prepVersion( v2 );
163
+ x = Math.max( v1.length, v2.length );
164
+ for ( i = 0; i < x; i++ ) {
165
+ if ( v1[ i ] == v2[ i ] ) {
166
continue;
167
}
168
+ v1[ i ] = numVersion( v1[ i ] );
169
+ v2[ i ] = numVersion( v2[ i ] );
170
+ if ( v1[ i ] < v2[ i ] ) {
171
compare = -1;
172
break;
173
+ } else if ( v1[ i ] > v2[ i ] ) {
174
compare = 1;
175
break;
176
}
177
}
178
+ if ( !operator ) {
179
return compare;
180
}
181
182
// Important: operator is CASE-SENSITIVE.
183
// "No operator" seems to be treated as "<."
184
// Any other values seem to make the function return null.
185
+ switch ( operator ) {
186
case '>':
187
case 'gt':
188
return (compare > 0);
213
$( 'body' ).on( 'click', '.yit-changelog-button', function () {
214
$( '#TB_window' ).remove();
215
} );
216
217
+
218
+ })( jQuery );
plugin-fw/assets/js/multisite-updater.min.js CHANGED
@@ -1,4 +1,7 @@
1
- (function(e){function n(c,d,e){this.php_js=this.php_js||{};this.php_js.ENV=this.php_js.ENV||{};var a=0,f=0,b=0,g={dev:-6,alpha:-5,a:-5,beta:-4,b:-4,RC:-3,rc:-3,"#":-2,p:1,pl:1},a=function(a){a=(""+a).replace(/[_\-+]/g,".");a=a.replace(/([^.\d]+)/g,".$1.").replace(/\.{2,}/g,".");return a.length?a.split("."):[-8]};numVersion=function(a){return a?isNaN(a)?g[a]||-7:parseInt(a,10):0};c=a(c);d=a(d);f=Math.max(c.length,d.length);for(a=0;a<f;a++)if(c[a]!=d[a])if(c[a]=numVersion(c[a]),d[a]=numVersion(d[a]),
2
- c[a]<d[a]){b=-1;break}else if(c[a]>d[a]){b=1;break}if(!e)return b;switch(e){case ">":case "gt":return 0<b;case ">=":case "ge":return 0<=b;case "<=":case "le":return 0>=b;case "==":case "=":case "eq":return 0===b;case "<>":case "!=":case "ne":return 0!==b;case "":case "<":case "lt":return 0>b;default:return null}}var l=e("#menu-plugins"),h=l.find(".update-plugins").find(".update-count").text(),p=plugins.registered,q=plugins.activated;if(0==h||""==h)h=0,l.find(".wp-menu-name").append('<span class="update-plugins"><span class="plugin-count"></span></span>');
3
- (function(c,d,h,a){for(var f in c){var b=c[f],g;for(g in b)if("slug"!=g&&!n(b[g].Version,b[g].Latest,">=")){h=parseInt(h)+1;e(".plugin-count").empty().html(h);var m=""+b[g].Name,l='*[data-slug="'+m.replace(RegExp(" ","g"),"-").trim().toLowerCase()+'"]';e(l).addClass("update");var k='<tr class="plugin-update-tr"><td colspan="3" class="plugin-update colspanchange"><div class="update-message">'+a.strings.new_version.replace("%plugin_name%",m)+'<a class="thickbox" href="'+a.details_url[f]+'">'+a.strings.latest.replace("%latest%",
4
- b[g].Latest)+"</a>",k="undefined"==typeof d[f]?k+" <em>"+a.strings.unavailable+"</em>"+a.strings.activate.replace("%activate_link%",a.licence_activation_url).replace("%plugin_name%",m):k+'. <a href="'+a.update_url[f]+'">'+a.strings.update_now+"</a>";"undefined"!=typeof a.changelogs[f]&&(k+=a.changelogs[f]);k+="</div></td></tr>";e(k).insertAfter(l)}}})(p,q,h,plugins);e("body").on("click",".yit-changelog-button",function(){e("#TB_window").remove()})})(jQuery);
1
+ var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(a,f,b){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var h=a[e];if(f.call(b,h,e,a))return{i:e,v:h}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,f,b){a!=Array.prototype&&a!=Object.prototype&&(a[f]=b.value)};
2
+ $jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(a,f,b,d){if(f){b=$jscomp.global;a=a.split(".");for(d=0;d<a.length-1;d++){var e=a[d];e in b||(b[e]={});b=b[e]}a=a[a.length-1];d=b[a];f=f(d);f!=d&&null!=f&&$jscomp.defineProperty(b,a,{configurable:!0,writable:!0,value:f})}};
3
+ $jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(a,b){return $jscomp.findInternal(this,a,b).v}},"es6","es3");
4
+ (function(a){function f(a,b,d){this.php_js=this.php_js||{};this.php_js.ENV=this.php_js.ENV||{};var c=0,f=0,g=0,e={dev:-6,alpha:-5,a:-5,beta:-4,b:-4,RC:-3,rc:-3,"#":-2,p:1,pl:1};c=function(a){a=(""+a).replace(/[_\-+]/g,".");a=a.replace(/([^.\d]+)/g,".$1.").replace(/\.{2,}/g,".");return a.length?a.split("."):[-8]};numVersion=function(a){return a?isNaN(a)?e[a]||-7:parseInt(a,10):0};a=c(a);b=c(b);f=Math.max(a.length,b.length);for(c=0;c<f;c++)if(a[c]!=b[c])if(a[c]=numVersion(a[c]),b[c]=numVersion(b[c]),
5
+ a[c]<b[c]){g=-1;break}else if(a[c]>b[c]){g=1;break}if(!d)return g;switch(d){case ">":case "gt":return 0<g;case ">=":case "ge":return 0<=g;case "<=":case "le":return 0>=g;case "==":case "=":case "eq":return 0===g;case "<>":case "!=":case "ne":return 0!==g;case "":case "<":case "lt":return 0>g;default:return null}}var b=a("#menu-plugins"),d=b.find(".update-plugins").find(".update-count").text(),e=plugins.registered,h=plugins.activated;if(0==d||""==d)d=0,b.find(".wp-menu-name").append('<span class="update-plugins"><span class="plugin-count"></span></span>');
6
+ (function(b,d,e,c){for(var h in b){var g=b[h],k;for(k in g)if("slug"!=k&&!f(g[k].Version,g[k].Latest,">=")){e=parseInt(e)+1;a(".plugin-count").empty().html(e);var m=""+g[k].Name,n='*[data-slug="'+m.replace(/ /g,"-").trim().toLowerCase()+'"]';a(n).addClass("update");var l='<tr class="plugin-update-tr"><td colspan="3" class="plugin-update colspanchange"><div class="update-message">'+c.strings.new_version.replace("%plugin_name%",m)+'<a class="thickbox open-plugin-details-modal" href="'+c.details_url[h]+
7
+ '">'+c.strings.latest.replace("%latest%",g[k].Latest)+"</a>";l="undefined"==typeof d[h]?l+" <em>"+c.strings.unavailable+"</em>"+c.strings.activate.replace("%activate_link%",c.licence_activation_url).replace("%plugin_name%",m):l+'. <a href="'+c.update_url[h]+'">'+c.strings.update_now+"</a>";l+="</div></td></tr>";a(l).insertAfter(n)}}})(e,h,d,plugins);a("body").on("click",".yit-changelog-button",function(){a("#TB_window").remove()})})(jQuery);
plugin-fw/assets/js/yit-cpt-unlimited.min.js CHANGED
@@ -1,2 +1,2 @@
1
- (function(c){c(".wrap h1, .wrap h2").on("click","a.multi-uploader",function(f){f.preventDefault();var a,b=c(this),d=!1;b.next("span.spinner").css("display","inline-block");a||(a=wp.media.frames.file_frame=wp.media({title:b.data("uploader_title"),button:{text:b.data("uploader_button_text")},library:{type:"image"},multiple:!0}),a.on("select",function(){var e=[];a.state().get("selection").map(function(a){a=a.toJSON();e.push({id:a.id,url:a.url,title:a.title})});c.post(ajaxurl,{images:e,post_type:typenow,action:"yit_cptu_multiuploader"},
2
- function(a){location.reload()});b.next("span.spinner").css("display","inline-block");d=!0}),a.on("close",function(){d||b.next("span.spinner").hide()}));a.open()})})(jQuery);
1
+ (function(d){d(".wrap h1, .wrap h2").on("click","a.multi-uploader",function(g){g.preventDefault();var b=d(this),e=!1;b.next("span.spinner").css("display","inline-block");if(!c){var c=wp.media.frames.file_frame=wp.media({title:b.data("uploader_title"),button:{text:b.data("uploader_button_text")},library:{type:"image"},multiple:!0});c.on("select",function(){var f=[];c.state().get("selection").map(function(a){a=a.toJSON();f.push({id:a.id,url:a.url,title:a.title})});d.post(ajaxurl,{images:f,post_type:typenow,
2
+ action:"yit_cptu_multiuploader"},function(a){location.reload()});b.next("span.spinner").css("display","inline-block");e=!0});c.on("close",function(){e||b.next("span.spinner").hide()})}c.open()})})(jQuery);
plugin-fw/assets/js/yit-wp-pointer.min.js CHANGED
@@ -1,3 +1,6 @@
1
- jQuery(document).ready(function(b){var c=custom_pointer.pointers[0],d=c.options,a=b(c.target),e=c.pointer_id;b(a).find(".wp-submenu li a").each(function(){var f=b(this),h=f.attr("href"),h=h.replace("admin.php?page=","");if(h==e){var k=f.add(a),g=a.find(c.target.replace("#","."));a.toggleClass("wp-no-current-submenu wp-menu-open wp-has-current-submenu");f.pointer({pointerClass:"yit-wp-pointer",content:d.content,position:d.position,open:function(){k.toggleClass("yit-pointer-selected-row");g.addClass("yit-pointer")},
2
- close:function(){a.toggleClass("wp-no-current-submenu wp-menu-open wp-has-current-submenu");k.toggleClass("yit-pointer-selected-row");g.removeClass("yit-pointer");b.ajax({type:"POST",url:ajaxurl,data:{action:"dismiss-wp-pointer",pointer:e},success:function(a){}})}}).pointer("open")}else if("yith_default_pointer"==e){var k=f.add(a),g=a.find(c.target.replace("#",".")),l=b(c.target);l.addClass("wp-has-current-submenu");g.pointer({pointerClass:"yit-wp-pointer",content:d.content,position:d.position,open:function(){l.addClass("yit-pointer-selected-row")},
3
- close:function(){l.removeClass("yit-pointer-selected-row wp-has-current-submenu");b.ajax({type:"POST",url:ajaxurl,data:{action:"dismiss-wp-pointer",pointer:e},success:function(a){}})}}).pointer("open")}})});
1
+ var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(a,c,b){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var f=a[e];if(c.call(b,f,e,a))return{i:e,v:f}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,c,b){a!=Array.prototype&&a!=Object.prototype&&(a[c]=b.value)};
2
+ $jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(a,c,b,d){if(c){b=$jscomp.global;a=a.split(".");for(d=0;d<a.length-1;d++){var e=a[d];e in b||(b[e]={});b=b[e]}a=a[a.length-1];d=b[a];c=c(d);c!=d&&null!=c&&$jscomp.defineProperty(b,a,{configurable:!0,writable:!0,value:c})}};
3
+ $jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(a,b){return $jscomp.findInternal(this,a,b).v}},"es6","es3");
4
+ jQuery(document).ready(function(a){var c=custom_pointer.pointers[0],b=c.options,d=a(c.target),e=c.pointer_id;a(d).find(".wp-submenu li a").each(function(){var f=a(this),h=f.attr("href");h=h.replace("admin.php?page=","");if(h==e){var k=f.add(d),g=d.find(c.target.replace("#","."));d.toggleClass("wp-no-current-submenu wp-menu-open wp-has-current-submenu");f.pointer({pointerClass:"yit-wp-pointer",content:b.content,position:b.position,open:function(){k.toggleClass("yit-pointer-selected-row");g.addClass("yit-pointer")},
5
+ close:function(){d.toggleClass("wp-no-current-submenu wp-menu-open wp-has-current-submenu");k.toggleClass("yit-pointer-selected-row");g.removeClass("yit-pointer");a.ajax({type:"POST",url:ajaxurl,data:{action:"dismiss-wp-pointer",pointer:e},success:function(a){}})}}).pointer("open")}else if("yith_default_pointer"==e){k=f.add(d);g=d.find(c.target.replace("#","."));var l=a(c.target);l.addClass("wp-has-current-submenu");g.pointer({pointerClass:"yit-wp-pointer",content:b.content,position:b.position,open:function(){l.addClass("yit-pointer-selected-row")},
6
+ close:function(){l.removeClass("yit-pointer-selected-row wp-has-current-submenu");a.ajax({type:"POST",url:ajaxurl,data:{action:"dismiss-wp-pointer",pointer:e},success:function(a){}})}}).pointer("open")}})});
plugin-fw/assets/js/yith-enhanced-select-wc-2.6.min.js CHANGED
@@ -1,5 +1,5 @@
1
- jQuery(document).ready(function(a){a(document.body).on("yith-framework-enhanced-select-init",function(){a(":input.yith-post-search").filter(":not(.enhanced)").each(function(){var d=a.extend({action:"yith_plugin_fw_json_search_posts",security:yith_framework_enhanced_select_params.search_posts_nonce,post_type:"post"},a(this).data()),c={allowClear:a(this).data("allow_clear")?!0:!1,placeholder:a(this).data("placeholder"),minimumInputLength:a(this).data("minimum_input_length")?a(this).data("minimum_input_length"):
2
- "3",escapeMarkup:function(b){return b},ajax:{url:yith_framework_enhanced_select_params.ajax_url,dataType:"json",quietMillis:250,data:function(b){d.term=b;return d},results:function(b){var c=[];b&&a.each(b,function(b,a){c.push({id:b,text:a})});return{results:c}},cache:!0}};!0===a(this).data("multiple")?(c.multiple=!0,c.initSelection=function(b,c){var f=a.parseJSON(b.attr("data-selected")),e=[];a(b.val().split(",")).each(function(b,a){e.push({id:a,text:f[a]})});return c(e)},c.formatSelection=function(b){return'<div class="selected-option" data-id="'+
3
- b.id+'">'+b.text+"</div>"}):(c.multiple=!1,c.initSelection=function(b,a){var c={id:b.val(),text:b.attr("data-selected")};return a(c)});a(this).select2(c).addClass("enhanced")});a(":input.yith-term-search").filter(":not(.enhanced)").each(function(){var d=a.extend({action:"yith_plugin_fw_json_search_terms",security:yith_framework_enhanced_select_params.search_terms_nonce,taxonomy:"category"},a(this).data()),c={allowClear:a(this).data("allow_clear")?!0:!1,placeholder:a(this).data("placeholder"),minimumInputLength:a(this).data("minimum_input_length")?
4
- a(this).data("minimum_input_length"):"3",escapeMarkup:function(b){return b},ajax:{url:yith_framework_enhanced_select_params.ajax_url,dataType:"json",quietMillis:250,data:function(b){d.term=b;return d},results:function(b){var c=[];b&&a.each(b,function(b,a){c.push({id:b,text:a})});return{results:c}},cache:!0}};!0===a(this).data("multiple")?(c.multiple=!0,c.initSelection=function(b,c){var d=a.parseJSON(b.attr("data-selected")),e=[];a(b.val().split(",")).each(function(b,a){e.push({id:a,text:d[a]})});
5
- return c(e)},c.formatSelection=function(a){return'<div class="selected-option" data-id="'+a.id+'">'+a.text+"</div>"}):(c.multiple=!1,c.initSelection=function(a,c){var d={id:a.val(),text:a.attr("data-selected")};return c(d)});a(this).select2(c).addClass("enhanced")})}).trigger("yith-framework-enhanced-select-init")});
1
+ jQuery(document).ready(function(b){b(document.body).on("yith-framework-enhanced-select-init",function(){b(":input.yith-post-search").filter(":not(.enhanced)").each(function(){var d=b.extend({action:"yith_plugin_fw_json_search_posts",security:yith_framework_enhanced_select_params.search_posts_nonce,post_type:"post"},b(this).data()),c={allowClear:b(this).data("allow_clear")?!0:!1,placeholder:b(this).data("placeholder"),minimumInputLength:b(this).data("minimum_input_length")?b(this).data("minimum_input_length"):
2
+ "3",escapeMarkup:function(a){return a},ajax:{url:yith_framework_enhanced_select_params.ajax_url,dataType:"json",quietMillis:250,data:function(a){d.term=a;return d},results:function(a){var c=[];a&&b.each(a,function(a,b){c.push({id:a,text:b})});return{results:c}},cache:!0}};!0===b(this).data("multiple")?(c.multiple=!0,c.initSelection=function(a,c){var f=b.parseJSON(a.attr("data-selected")),e=[];b(a.val().split(",")).each(function(a,b){e.push({id:b,text:f[b]})});return c(e)},c.formatSelection=function(a){return'<div class="selected-option" data-id="'+
3
+ a.id+'">'+a.text+"</div>"}):(c.multiple=!1,c.initSelection=function(a,b){a={id:a.val(),text:a.attr("data-selected")};return b(a)});b(this).select2(c).addClass("enhanced")});b(":input.yith-term-search").filter(":not(.enhanced)").each(function(){var d=b.extend({action:"yith_plugin_fw_json_search_terms",security:yith_framework_enhanced_select_params.search_terms_nonce,taxonomy:"category"},b(this).data()),c={allowClear:b(this).data("allow_clear")?!0:!1,placeholder:b(this).data("placeholder"),minimumInputLength:b(this).data("minimum_input_length")?
4
+ b(this).data("minimum_input_length"):"3",escapeMarkup:function(a){return a},ajax:{url:yith_framework_enhanced_select_params.ajax_url,dataType:"json",quietMillis:250,data:function(a){d.term=a;return d},results:function(a){var c=[];a&&b.each(a,function(a,b){c.push({id:a,text:b})});return{results:c}},cache:!0}};!0===b(this).data("multiple")?(c.multiple=!0,c.initSelection=function(a,c){var d=b.parseJSON(a.attr("data-selected")),e=[];b(a.val().split(",")).each(function(a,b){e.push({id:b,text:d[b]})});
5
+ return c(e)},c.formatSelection=function(a){return'<div class="selected-option" data-id="'+a.id+'">'+a.text+"</div>"}):(c.multiple=!1,c.initSelection=function(a,b){a={id:a.val(),text:a.attr("data-selected")};return b(a)});b(this).select2(c).addClass("enhanced")})}).trigger("yith-framework-enhanced-select-init")});
plugin-fw/assets/js/yith-enhanced-select.min.js CHANGED
@@ -1,5 +1,8 @@
1
- jQuery(document).ready(function(a){a(document.body).on("yith-framework-enhanced-select-init",function(){a(".yith-post-search").filter(":not(.enhanced)").each(function(){var e=a.extend({action:"yith_plugin_fw_json_search_posts",security:yith_framework_enhanced_select_params.search_posts_nonce,post_type:"post"},a(this).data()),f={allowClear:a(this).data("allow_clear")?!0:!1,placeholder:a(this).data("placeholder"),minimumInputLength:a(this).data("minimum_input_length")?a(this).data("minimum_input_length"):
2
- "3",escapeMarkup:function(a){return a},ajax:{url:ajaxurl,dataType:"json",quietMillis:250,data:function(b){return a.extend({term:b.term},e)},processResults:function(b){var c=[];b&&a.each(b,function(a,b){c.push({id:a,text:b})});return{results:c}},cache:!0}};a(this).select2(f).addClass("enhanced");if(a(this).data("sortable")){var c=a(this),d=a(this).next(".select2-container").find("ul.select2-selection__rendered");d.sortable({placeholder:"ui-state-highlight select2-selection__choice",forcePlaceholderSize:!0,
3
- items:"li:not(.select2-search__field)",tolerance:"pointer",stop:function(){a(d.find(".select2-selection__choice").get().reverse()).each(function(){var b=a(this).data("data").id,b=c.find('option[value="'+b+'"]')[0];c.prepend(b)})}})}});a(".yith-term-search").filter(":not(.enhanced)").each(function(){var e=a.extend({action:"yith_plugin_fw_json_search_terms",security:yith_framework_enhanced_select_params.search_terms_nonce,taxonomy:"category"},a(this).data()),f={allowClear:a(this).data("allow_clear")?
4
- !0:!1,placeholder:a(this).data("placeholder"),minimumInputLength:a(this).data("minimum_input_length")?a(this).data("minimum_input_length"):"3",escapeMarkup:function(a){return a},ajax:{url:ajaxurl,dataType:"json",quietMillis:250,data:function(b){return a.extend({term:b.term},e)},processResults:function(b){var c=[];b&&a.each(b,function(a,b){c.push({id:a,text:b})});return{results:c}},cache:!0}};a(this).select2(f).addClass("enhanced");if(a(this).data("sortable")){var c=a(this),d=a(this).next(".select2-container").find("ul.select2-selection__rendered");
5
- d.sortable({placeholder:"ui-state-highlight select2-selection__choice",forcePlaceholderSize:!0,items:"li:not(.select2-search__field)",tolerance:"pointer",stop:function(){a(d.find(".select2-selection__choice").get().reverse()).each(function(){var b=a(this).data("data").id,b=c.find('option[value="'+b+'"]')[0];c.prepend(b)})}})}})}).trigger("yith-framework-enhanced-select-init")});
1
+ var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(a,f,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var b=a[e];if(f.call(c,b,e,a))return{i:e,v:b}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,f,c){a!=Array.prototype&&a!=Object.prototype&&(a[f]=c.value)};
2
+ $jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(a,f,c,d){if(f){c=$jscomp.global;a=a.split(".");for(d=0;d<a.length-1;d++){var e=a[d];e in c||(c[e]={});c=c[e]}a=a[a.length-1];d=c[a];f=f(d);f!=d&&null!=f&&$jscomp.defineProperty(c,a,{configurable:!0,writable:!0,value:f})}};
3
+ $jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(a,c){return $jscomp.findInternal(this,a,c).v}},"es6","es3");
4
+ jQuery(document).ready(function(a){a(document.body).on("yith-framework-enhanced-select-init",function(){a(".yith-post-search").filter(":not(.enhanced)").each(function(){var f=a.extend({action:"yith_plugin_fw_json_search_posts",security:yith_framework_enhanced_select_params.search_posts_nonce,post_type:"post"},a(this).data()),c={allowClear:a(this).data("allow_clear")?!0:!1,placeholder:a(this).data("placeholder"),minimumInputLength:a(this).data("minimum_input_length")?a(this).data("minimum_input_length"):
5
+ "3",escapeMarkup:function(a){return a},ajax:{url:ajaxurl,dataType:"json",quietMillis:250,data:function(b){return a.extend({term:b.term},f)},processResults:function(b){var c=[];b&&a.each(b,function(a,b){c.push({id:a,text:b})});return{results:c}},cache:!0}};a(this).select2(c).addClass("enhanced");if(a(this).data("sortable")){var d=a(this),e=a(this).next(".select2-container").find("ul.select2-selection__rendered");e.sortable({placeholder:"ui-state-highlight select2-selection__choice",forcePlaceholderSize:!0,
6
+ items:"li:not(.select2-search__field)",tolerance:"pointer",stop:function(){a(e.find(".select2-selection__choice").get().reverse()).each(function(){var b=a(this).data("data").id;b=d.find('option[value="'+b+'"]')[0];d.prepend(b)})}})}});a(".yith-term-search").filter(":not(.enhanced)").each(function(){var f=a.extend({action:"yith_plugin_fw_json_search_terms",security:yith_framework_enhanced_select_params.search_terms_nonce,taxonomy:"category"},a(this).data()),c={allowClear:a(this).data("allow_clear")?
7
+ !0:!1,placeholder:a(this).data("placeholder"),minimumInputLength:a(this).data("minimum_input_length")?a(this).data("minimum_input_length"):"3",escapeMarkup:function(a){return a},ajax:{url:ajaxurl,dataType:"json",quietMillis:250,data:function(b){return a.extend({term:b.term},f)},processResults:function(b){var c=[];b&&a.each(b,function(a,b){c.push({id:a,text:b})});return{results:c}},cache:!0}};a(this).select2(c).addClass("enhanced");if(a(this).data("sortable")){var d=a(this),e=a(this).next(".select2-container").find("ul.select2-selection__rendered");
8
+ e.sortable({placeholder:"ui-state-highlight select2-selection__choice",forcePlaceholderSize:!0,items:"li:not(.select2-search__field)",tolerance:"pointer",stop:function(){a(e.find(".select2-selection__choice").get().reverse()).each(function(){var b=a(this).data("data").id;b=d.find('option[value="'+b+'"]')[0];d.prepend(b)})}})}})}).trigger("yith-framework-enhanced-select-init")});
plugin-fw/assets/js/yith-fields.js CHANGED
@@ -74,12 +74,12 @@ jQuery( function ( $ ) {
74
var custom_uploader_states = [
75
// Main states.
76
new wp.media.controller.Library( {
77
- library : wp.media.query(),
78
- multiple : false,
79
- title : 'Choose Image',
80
- priority : 20,
81
- filterable: 'uploaded'
82
- } )
83
];
84
85
// Create the media frame.
@@ -145,10 +145,10 @@ jQuery( function ( $ ) {
145
},
146
states: [
147
new wp.media.controller.Library( {
148
- title : $t.data( 'choose' ),
149
- filterable: 'all',
150
- multiple : true
151
- } )
152
]
153
} );
154
@@ -193,7 +193,7 @@ jQuery( function ( $ ) {
193
194
$t.find( 'li.image' ).css( 'cursor', 'default' ).each( function () {
195
var attachment_id = $( this ).attr( 'data-attachment_id' );
196
- attachment_ids = attachment_ids + attachment_id + ',';
197
} );
198
199
$t.closest( '.image-gallery' ).find( '.image_gallery_ids' ).val( attachment_ids );
@@ -212,7 +212,7 @@ jQuery( function ( $ ) {
212
213
$gallery.find( 'li.image' ).css( 'cursor', 'default' ).each( function () {
214
var attachment_id = $( this ).attr( 'data-attachment_id' );
215
- attachment_ids = attachment_ids + attachment_id + ',';
216
} );
217
218
$image_gallery_ids.val( attachment_ids );
@@ -283,7 +283,7 @@ jQuery( function ( $ ) {
283
range: 'min',
284
step : step,
285
286
- create: function() {
287
$( this ).find( '.ui-slider-handle' ).text( $( this ).slider( "value" ) );
288
},
289
@@ -347,4 +347,18 @@ jQuery( function ( $ ) {
347
} );
348
} );
349
350
} );
74
var custom_uploader_states = [
75
// Main states.
76
new wp.media.controller.Library( {
77
+ library : wp.media.query(),
78
+ multiple : false,
79
+ title : 'Choose Image',
80
+ priority : 20,
81
+ filterable: 'uploaded'
82
+ } )
83
];
84
85
// Create the media frame.
145
},
146
states: [
147
new wp.media.controller.Library( {
148
+ title : $t.data( 'choose' ),
149
+ filterable: 'all',
150
+ multiple : true
151
+ } )
152
]
153
} );
154
193
194
$t.find( 'li.image' ).css( 'cursor', 'default' ).each( function () {
195
var attachment_id = $( this ).attr( 'data-attachment_id' );
196
+ attachment_ids = attachment_ids + attachment_id + ',';
197
} );
198
199
$t.closest( '.image-gallery' ).find( '.image_gallery_ids' ).val( attachment_ids );
212
213
$gallery.find( 'li.image' ).css( 'cursor', 'default' ).each( function () {
214
var attachment_id = $( this ).attr( 'data-attachment_id' );
215
+ attachment_ids = attachment_ids + attachment_id + ',';
216
} );
217
218
$image_gallery_ids.val( attachment_ids );
283
range: 'min',
284
step : step,
285
286
+ create: function () {
287
$( this ).find( '.ui-slider-handle' ).text( $( this ).slider( "value" ) );
288
},
289
347
} );
348
} );
349
350
+ /** Select Images */
351
+ $( document ).on( 'click', '.yith-plugin-fw-select-images__item', function () {
352
+ var item = $( this ),
353
+ key = item.data( 'key' ),
354
+ wrapper = item.closest( '.yith-plugin-fw-select-images__wrapper' ),
355
+ items = wrapper.find( '.yith-plugin-fw-select-images__item' ),
356
+ select = wrapper.find( 'select' ).first();
357
+
358
+ if ( select.length ) {
359
+ select.val( key );
360
+ items.removeClass( 'yith-plugin-fw-select-images__item--selected' );
361
+ item.addClass( 'yith-plugin-fw-select-images__item--selected' );
362
+ }
363
+ } );
364
} );
plugin-fw/assets/js/yith-fields.min.js CHANGED
@@ -1,15 +1,15 @@
1
- var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(a,g,e){a instanceof String&&(a=String(a));for(var d=a.length,h=0;h<d;h++){var l=a[h];if(g.call(e,l,h,a))return{i:h,v:l}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,g,e){a!=Array.prototype&&a!=Object.prototype&&(a[g]=e.value)};
2
- $jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(a,g,e,d){if(g){e=$jscomp.global;a=a.split(".");for(d=0;d<a.length-1;d++){var h=a[d];h in e||(e[h]={});e=e[h]}a=a[a.length-1];d=e[a];g=g(d);g!=d&&null!=g&&$jscomp.defineProperty(e,a,{configurable:!0,writable:!0,value:g})}};
3
- $jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(a,e){return $jscomp.findInternal(this,a,e).v}},"es6","es3");
4
- jQuery(function(a){var g=a(".yith-plugin-fw-datepicker"),e=a(".yith-plugin-fw-colorpicker"),d=a(".yith-plugin-fw-upload-img-url"),h=a(".add_media"),l=a(".yith-plugin-fw .image-gallery ul.slides-wrapper"),m=a(".yith-plugin-fw-onoff-container span"),n=a(".yith-plugin-fw-sidebar-layout"),p=a(".yith-plugin-fw .yith-plugin-fw-slider-container .ui-slider-horizontal"),q=a(".codemirror"),r=a(".yit-icons-manager-wrapper");g.each(function(){var b=a(this).data();a(this).datepicker(b)});e.wpColorPicker({clear:function(){var b=
5
- a(this);b.val(b.data("default-color"));b.change()}});e.each(function(){var b=a(this).data("variations-label");a(this).parent().parent().find("a.wp-color-result").attr("title",b)});"undefined"!==typeof wp&&"undefined"!==typeof wp.media&&(d.change(function(){var b=a(this).val(),c=a(this).parent().find(".yith-plugin-fw-upload-img-preview").first();1>c.length&&(c=a(this).parent().parent().find(".yith-plugin-fw-upload-img-preview").first());/(http|ftp|https):\/\/[a-zA-Z0-9@?^=%&amp;:/~+#-_.]*.(gif|jpg|jpeg|png|ico)/.test(b)?
6
c.html('<img src="'+b+'" style="max-width:100px; max-height:100px;" />'):c.html("")}).trigger("change"),a(document).on("click",".yith-plugin-fw-upload-button",function(b){b.preventDefault();var c=a(this).attr("id").replace(/-button#x2F;,"");if(!f){b=[new wp.media.controller.Library({library:wp.media.query(),multiple:!1,title:"Choose Image",priority:20,filterable:"uploaded"})];var f=wp.media.frames.downloadable_file=wp.media({title:"Choose Image",library:{type:""},button:{text:"Choose Image"},multiple:!1,
7
- states:b});f.on("select",function(){var b=f.state().get("selection").first().toJSON();a("#"+c).val(b.url);a("#"+c+"-yith-attachment-id")&&a("#"+c+"-yith-attachment-id").val(b.id);d.trigger("change")})}f.open()}),a(document).on("click",".yith-plugin-fw-upload-button-reset",function(b){var c=a(this);b=c.attr("id");c=c.attr("id").replace(/-button-reset#x2F;,"");b=a("#"+b).data("default");a("#"+c).val(b);d.trigger("change")}));h.on("click",function(){});"undefined"!==typeof wp&&"undefined"!==typeof wp.media&&
8
- (a(document).on("click",".yith-plugin-fw .image-gallery-button",function(b){var c=a(this);b=c.closest(".image-gallery");var f=b.find(".image_gallery_ids"),k=f.val(),e=b.find("ul.slides-wrapper"),d=wp.media.frames.image_gallery=wp.media({title:c.data("choose"),button:{text:c.data("update")},states:[new wp.media.controller.Library({title:c.data("choose"),filterable:"all",multiple:!0})]});d.on("select",function(){d.state().get("selection").map(function(a){a=a.toJSON();a.id&&(k=k?k+","+a.id:a.id,e.append('<li class="image" data-attachment_id="'+
9
- a.id+'"><img src="'+a.sizes.thumbnail.url+'"/><ul class="actions"><li><a href="#" class="delete" title="'+c.data("delete")+'">x</a></li></ul></li>'))});f.val(k)});d.open()}),l.each(function(){var b=a(this);b.sortable({items:"li.image",cursor:"move",scrollSensitivity:40,forcePlaceholderSize:!0,forceHelperSize:!1,helper:"clone",opacity:.65,start:function(a,b){b.item.css("background-color","#f6f6f6")},stop:function(a,b){b.item.removeAttr("style")},update:function(c,f){var k="";b.find("li.image").css("cursor",
10
"default").each(function(){var b=a(this).attr("data-attachment_id");k=k+b+","});b.closest(".image-gallery").find(".image_gallery_ids").val(k)}})}),l.on("click","a.delete",function(){var b=a(this).closest(".image-gallery"),c=a(this).closest(".image-gallery ul.slides-wrapper");b=b.find(".image_gallery_ids");var f="";a(this).closest("li.image").remove();c.find("li.image").css("cursor","default").each(function(){var b=a(this).attr("data-attachment_id");f=f+b+","});b.val(f)}));m.on("click",function(){var b=
11
a(this).prev("input");b.prop("checked")?b.prop("checked",!1).attr("value","no").removeClass("onoffchecked"):b.prop("checked",!0).attr("value","yes").addClass("onoffchecked");b.change()});n.each(function(){a(this).find("img").on("click",function(){var b=a(this).closest(".yith-plugin-fw-sidebar-layout"),c=b.find(".yith-plugin-fw-sidebar-layout-sidebar-left-container");b=b.find(".yith-plugin-fw-sidebar-layout-sidebar-right-container");var f=a(this).data("type");a(this).parent().children(":radio").attr("checked",
12
- !1);a(this).prev(":radio").attr("checked",!0);if("undefined"!=typeof f)switch(f){case "left":c.show();b.hide();break;case "right":b.show();c.hide();break;case "double":c.show();b.show();break;default:c.hide(),b.hide()}})});p.each(function(){var b=a(this).data("val"),c=a(this).data("min"),f=a(this).data("max"),e=a(this).data("step"),d=a(this).data("labels");a(this).slider({value:b,min:c,max:f,range:"min",step:e,create:function(){a(this).find(".ui-slider-handle").text(a(this).slider("value"))},slide:function(b,
13
c){a(this).find("input").val(c.value);a(this).find(".ui-slider-handle").text(c.value);a(this).siblings(".feedback").find("strong").text(c.value+d)}})});q.each(function(b,c){b=CodeMirror.fromTextArea(c,{lineNumbers:1,mode:"javascript",showCursorWhenSelecting:!0});a(c).data("codemirrorInstance",b)});a(document).on("click",".yith-plugin-fw-select-all",function(){a("#"+a(this).data("select-id")).find("option").prop("selected",!0).trigger("change")});a(document).on("click",".yith-plugin-fw-deselect-all",
14
- function(){a("#"+a(this).data("select-id")).find("option").prop("selected",!1).trigger("change")});r.each(function(){var b=a(this),c=b.find(".yit-icons-manager-icon-preview").first(),e=b.find(".yit-icons-manager-icon-text");b.on("click",".yit-icons-manager-list li",function(d){d=a(d.target).closest("li");var f=d.data("font"),g=d.data("icon"),h=d.data("key"),k=d.data("name");c.attr("data-font",f);c.attr("data-icon",g);c.attr("data-key",h);c.attr("data-name",k);e.val(f+":"+k);b.find(".yit-icons-manager-list li").removeClass("active");
15
- d.addClass("active")});b.on("click",".yit-icons-manager-action-set-default",function(){b.find(".yit-icons-manager-list li.default").trigger("click")})})});
1
+ var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(a,g,d){a instanceof String&&(a=String(a));for(var e=a.length,h=0;h<e;h++){var l=a[h];if(g.call(d,l,h,a))return{i:h,v:l}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,g,d){a!=Array.prototype&&a!=Object.prototype&&(a[g]=d.value)};
2
+ $jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(a,g,d,e){if(g){d=$jscomp.global;a=a.split(".");for(e=0;e<a.length-1;e++){var h=a[e];h in d||(d[h]={});d=d[h]}a=a[a.length-1];e=d[a];g=g(e);g!=e&&null!=g&&$jscomp.defineProperty(d,a,{configurable:!0,writable:!0,value:g})}};
3
+ $jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(a,d){return $jscomp.findInternal(this,a,d).v}},"es6","es3");
4
+ jQuery(function(a){var g=a(".yith-plugin-fw-datepicker"),d=a(".yith-plugin-fw-colorpicker"),e=a(".yith-plugin-fw-upload-img-url"),h=a(".add_media"),l=a(".yith-plugin-fw .image-gallery ul.slides-wrapper"),m=a(".yith-plugin-fw-onoff-container span"),n=a(".yith-plugin-fw-sidebar-layout"),p=a(".yith-plugin-fw .yith-plugin-fw-slider-container .ui-slider-horizontal"),q=a(".codemirror"),r=a(".yit-icons-manager-wrapper");g.each(function(){var b=a(this).data();a(this).datepicker(b)});d.wpColorPicker({clear:function(){var b=
5
+ a(this);b.val(b.data("default-color"));b.change()}});d.each(function(){var b=a(this).data("variations-label");a(this).parent().parent().find("a.wp-color-result").attr("title",b)});"undefined"!==typeof wp&&"undefined"!==typeof wp.media&&(e.change(function(){var b=a(this).val(),c=a(this).parent().find(".yith-plugin-fw-upload-img-preview").first();1>c.length&&(c=a(this).parent().parent().find(".yith-plugin-fw-upload-img-preview").first());/(http|ftp|https):\/\/[a-zA-Z0-9@?^=%&amp;:/~+#-_.]*.(gif|jpg|jpeg|png|ico)/.test(b)?
6
c.html('<img src="'+b+'" style="max-width:100px; max-height:100px;" />'):c.html("")}).trigger("change"),a(document).on("click",".yith-plugin-fw-upload-button",function(b){b.preventDefault();var c=a(this).attr("id").replace(/-button#x2F;,"");if(!f){b=[new wp.media.controller.Library({library:wp.media.query(),multiple:!1,title:"Choose Image",priority:20,filterable:"uploaded"})];var f=wp.media.frames.downloadable_file=wp.media({title:"Choose Image",library:{type:""},button:{text:"Choose Image"},multiple:!1,
7
+ states:b});f.on("select",function(){var b=f.state().get("selection").first().toJSON();a("#"+c).val(b.url);a("#"+c+"-yith-attachment-id")&&a("#"+c+"-yith-attachment-id").val(b.id);e.trigger("change")})}f.open()}),a(document).on("click",".yith-plugin-fw-upload-button-reset",function(b){var c=a(this);b=c.attr("id");c=c.attr("id").replace(/-button-reset#x2F;,"");b=a("#"+b).data("default");a("#"+c).val(b);e.trigger("change")}));h.on("click",function(){});"undefined"!==typeof wp&&"undefined"!==typeof wp.media&&
8
+ (a(document).on("click",".yith-plugin-fw .image-gallery-button",function(b){var c=a(this);b=c.closest(".image-gallery");var f=b.find(".image_gallery_ids"),k=f.val(),d=b.find("ul.slides-wrapper"),e=wp.media.frames.image_gallery=wp.media({title:c.data("choose"),button:{text:c.data("update")},states:[new wp.media.controller.Library({title:c.data("choose"),filterable:"all",multiple:!0})]});e.on("select",function(){e.state().get("selection").map(function(a){a=a.toJSON();a.id&&(k=k?k+","+a.id:a.id,d.append('<li class="image" data-attachment_id="'+
9
+ a.id+'"><img src="'+a.sizes.thumbnail.url+'"/><ul class="actions"><li><a href="#" class="delete" title="'+c.data("delete")+'">x</a></li></ul></li>'))});f.val(k)});e.open()}),l.each(function(){var b=a(this);b.sortable({items:"li.image",cursor:"move",scrollSensitivity:40,forcePlaceholderSize:!0,forceHelperSize:!1,helper:"clone",opacity:.65,start:function(a,b){b.item.css("background-color","#f6f6f6")},stop:function(a,b){b.item.removeAttr("style")},update:function(c,f){var k="";b.find("li.image").css("cursor",
10
"default").each(function(){var b=a(this).attr("data-attachment_id");k=k+b+","});b.closest(".image-gallery").find(".image_gallery_ids").val(k)}})}),l.on("click","a.delete",function(){var b=a(this).closest(".image-gallery"),c=a(this).closest(".image-gallery ul.slides-wrapper");b=b.find(".image_gallery_ids");var f="";a(this).closest("li.image").remove();c.find("li.image").css("cursor","default").each(function(){var b=a(this).attr("data-attachment_id");f=f+b+","});b.val(f)}));m.on("click",function(){var b=
11
a(this).prev("input");b.prop("checked")?b.prop("checked",!1).attr("value","no").removeClass("onoffchecked"):b.prop("checked",!0).attr("value","yes").addClass("onoffchecked");b.change()});n.each(function(){a(this).find("img").on("click",function(){var b=a(this).closest(".yith-plugin-fw-sidebar-layout"),c=b.find(".yith-plugin-fw-sidebar-layout-sidebar-left-container");b=b.find(".yith-plugin-fw-sidebar-layout-sidebar-right-container");var f=a(this).data("type");a(this).parent().children(":radio").attr("checked",
12
+ !1);a(this).prev(":radio").attr("checked",!0);if("undefined"!=typeof f)switch(f){case "left":c.show();b.hide();break;case "right":b.show();c.hide();break;case "double":c.show();b.show();break;default:c.hide(),b.hide()}})});p.each(function(){var b=a(this).data("val"),c=a(this).data("min"),f=a(this).data("max"),k=a(this).data("step"),d=a(this).data("labels");a(this).slider({value:b,min:c,max:f,range:"min",step:k,create:function(){a(this).find(".ui-slider-handle").text(a(this).slider("value"))},slide:function(b,
13
c){a(this).find("input").val(c.value);a(this).find(".ui-slider-handle").text(c.value);a(this).siblings(".feedback").find("strong").text(c.value+d)}})});q.each(function(b,c){b=CodeMirror.fromTextArea(c,{lineNumbers:1,mode:"javascript",showCursorWhenSelecting:!0});a(c).data("codemirrorInstance",b)});a(document).on("click",".yith-plugin-fw-select-all",function(){a("#"+a(this).data("select-id")).find("option").prop("selected",!0).trigger("change")});a(document).on("click",".yith-plugin-fw-deselect-all",
14
+ function(){a("#"+a(this).data("select-id")).find("option").prop("selected",!1).trigger("change")});r.each(function(){var b=a(this),c=b.find(".yit-icons-manager-icon-preview").first(),f=b.find(".yit-icons-manager-icon-text");b.on("click",".yit-icons-manager-list li",function(d){d=a(d.target).closest("li");var e=d.data("font"),g=d.data("icon"),k=d.data("key"),h=d.data("name");c.attr("data-font",e);c.attr("data-icon",g);c.attr("data-key",k);c.attr("data-name",h);f.val(e+":"+h);b.find(".yit-icons-manager-list li").removeClass("active");
15
+ d.addClass("active")});b.on("click",".yit-icons-manager-action-set-default",function(){b.find(".yit-icons-manager-list li.default").trigger("click")})});a(document).on("click",".yith-plugin-fw-select-images__item",function(){var b=a(this),c=b.data("key"),d=b.closest(".yith-plugin-fw-select-images__wrapper"),e=d.find(".yith-plugin-fw-select-images__item");d=d.find("select").first();d.length&&(d.val(c),e.removeClass("yith-plugin-fw-select-images__item--selected"),b.addClass("yith-plugin-fw-select-images__item--selected"))})});
plugin-fw/init.php CHANGED
@@ -1,13 +1,13 @@
1
<?php
2
/**
3
* Framework Name: YIT Plugin Framework
4
- * Version: 3.0.13
5
- * Author: Yithemes
6
* Text Domain: yith-plugin-fw
7
* Domain Path: /languages/
8
*
9
* @author Your Inspiration Themes
10
- * @version 3.0.13
11
*/
12
/**
13
* This file belongs to the YIT Plugin Framework.
1
<?php
2
/**
3
* Framework Name: YIT Plugin Framework
4
+ * Version: 3.0.24
5
+ * Author: YITHEMES
6
* Text Domain: yith-plugin-fw
7
* Domain Path: /languages/
8
*
9
* @author Your Inspiration Themes
10
+ * @version 3.0.24
11
*/
12
/**
13
* This file belongs to the YIT Plugin Framework.
plugin-fw/languages/yith-plugin-fw-es_ES.mo CHANGED
Binary file
plugin-fw/languages/yith-plugin-fw-es_ES.po CHANGED
@@ -4,15 +4,15 @@ msgid ""
4
msgstr ""
5
"Project-Id-Version: YITH Plugin Starter 1.0.0 Plugin FW\n"
6
"Report-Msgid-Bugs-To: Your Inspiration Themes <plugins@yithemes.com>\n"
7
- "POT-Creation-Date: 2016-07-06 15:18+0200\n"
8
- "PO-Revision-Date: 2016-07-06 15:19+0200\n"
9
"Last-Translator: \n"
10
"Language-Team: Your Inspiration Themes <info@yithemes.com>\n"
11
"Language: es_ES\n"
12
"MIME-Version: 1.0\n"
13
"Content-Type: text/plain; charset=UTF-8\n"
14
"Content-Transfer-Encoding: 8bit\n"
15
- "X-Generator: Poedit 1.8.8\n"
16
"X-Poedit-KeywordsList: __;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;"
17
"_nx_noop:1,2,3c;esc_attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;"
18
"esc_html_x:1,2c\n"
@@ -22,6 +22,42 @@ msgstr ""
22
"X-Textdomain-Support: yes\n"
23
"X-Poedit-SearchPath-0: .\n"
24
25
#: lib/yit-cpt-unlimited.php:460 lib/yit-cpt-unlimited.php:574
26
#: lib/yit-cpt-unlimited.php:719 lib/yit-cpt-unlimited.php:1632
27
#, php-format
@@ -81,7 +117,7 @@ msgctxt "taxonomy singular name"
81
msgid "Category"
82
msgstr "Categoría"
83
84
- #: lib/yit-cpt-unlimited.php:627
85
msgid "Search Categories"
86
msgstr "Buscar Categorías"
87
@@ -127,7 +163,7 @@ msgid "%s Settings"
127
msgstr "%s Ajustes"
128
129
#: lib/yit-cpt-unlimited.php:1048 lib/yit-cpt-unlimited.php:1196
130
- #: lib/yit-cpt-unlimited.php:1202 lib/yit-plugin-panel.php:74
131
msgid "Settings"
132
msgstr "Ajustes"
133
@@ -214,8 +250,8 @@ msgstr "Enlaces rápidos"
214
msgid "Show frontend of the %s"
215
msgstr "Mostrar parte delantera de %s"
216
217
- #: lib/yit-cpt-unlimited.php:1482 templates/metaboxes/types/customtabs.php:46
218
- #: templates/metaboxes/types/customtabs.php:90
219
msgid "Name"
220
msgstr "Nombre"
221
@@ -228,106 +264,97 @@ msgstr "Añadir %s desde imágenes"
228
msgid "Upload multiple files"
229
msgstr "Cargar archivos múltiples"
230
231
- #: lib/yit-plugin-panel-sidebar.php:421 templates/panel/sidebar/sidebar.php:3
232
- msgid "Hide sidebar"
233
- msgstr "Ocultar barra lateral"
234
-
235
- #: lib/yit-plugin-panel-sidebar.php:422 templates/panel/sidebar/sidebar.php:3
236
- msgid "Show sidebar"
237
- msgstr "Mostrar barra lateral"
238
-
239
- #: lib/yit-plugin-panel-wc.php:374
240
msgid "The changes you have made will be lost if you leave this page."
241
msgstr "Los cambios que has hecho se perderán si sales de esta página."
242
243
- #: lib/yit-plugin-panel.php:73
244
msgid "Plugin Settings"
245
msgstr "Ajustes del plugin"
246
247
- #: lib/yit-plugin-panel.php:297 lib/yit-plugin-panel.php:300
248
msgid "How to install premium version"
249
msgstr "Cómo instalar la versión premium"
250
251
- #: lib/yit-plugin-panel.php:352 lib/yit-plugin-subpanel.php:146
252
#: templates/panel/woocommerce/woocommerce-form.php:11
253
msgid "Save Changes"
254
msgstr "Guardar cambios"
255
256
- #: lib/yit-plugin-panel.php:355
257
#: templates/panel/woocommerce/woocommerce-form.php:14
258
msgid ""
259
"If you continue with this action, you will reset all options in this page."