YITH WooCommerce Zoom Magnifier - Version 1.2.9

Version Description

Download this release

Release Info

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

Code changes from version 1.2.8 to 1.2.9

README.txt CHANGED
@@ -4,7 +4,7 @@ Contributors: yithemes
4
  Tags: zoom, magnifier, woocommerce, product image, themes, yit, e-commerce, shop, thumbnail, thumbnail slider, zoom image, carousel, image carousel
5
  Requires at least: 3.5.1
6
  Tested up to: 4.3
7
- Stable tag: 1.2.8
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -59,6 +59,13 @@ The size of the Zoom Image is automatically setted. If you want to change these
59
 
60
  == Changelog ==
61
 
 
 
 
 
 
 
 
62
  = Version 1.2.8 - RELEASED: SEP 01, 2015 =
63
 
64
  * Fix: removed deprecated woocommerce_update_option_X hook.
4
  Tags: zoom, magnifier, woocommerce, product image, themes, yit, e-commerce, shop, thumbnail, thumbnail slider, zoom image, carousel, image carousel
5
  Requires at least: 3.5.1
6
  Tested up to: 4.3
7
+ Stable tag: 1.2.9
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
59
 
60
  == Changelog ==
61
 
62
+ = Version 1.2.9 - RELEASED: SEP 04, 2015 =
63
+
64
+ * Updated: Languages file
65
+ * Fix: Changed plugin text domain from yit to ywmz
66
+ * Fix: featured image shown one time on slider.
67
+ * Fix: div not shown if loading text is empty.
68
+
69
  = Version 1.2.8 - RELEASED: SEP 01, 2015 =
70
 
71
  * Fix: removed deprecated woocommerce_update_option_X hook.
assets/css/frontend.css CHANGED
@@ -57,3 +57,9 @@ span.onsale {
57
  z-index: 10000
58
  }
59
 
 
 
 
 
 
 
57
  z-index: 10000
58
  }
59
 
60
+ div.pp_woocommerce a.pp_expand {
61
+ display: inline;
62
+ bottom: 10px;
63
+ top: initial;
64
+ left: 10px;
65
+ }
assets/images/{yith-woocommerce-zoom-magnifier.jpg → yith-woocommerce-zoom-magnifier-video.jpg} RENAMED
File without changes
assets/js/frontend.js CHANGED
@@ -3,7 +3,7 @@
3
  *
4
  * @author Your Inspiration Themes
5
  * @package YITH WooCommerce Zoom Magnifier
6
- * @version 1.2.8
7
  */
8
  jQuery(document).ready(function ($) {
9
 
3
  *
4
  * @author Your Inspiration Themes
5
  * @package YITH WooCommerce Zoom Magnifier
6
+ * @version 1.2.9
7
  */
8
  jQuery(document).ready(function ($) {
9
 
assets/js/yith_magnifier.js CHANGED
@@ -7,8 +7,7 @@
7
  * MIT License.
8
  */
9
 
10
- ;
11
- (function (window, $, undefined) {
12
  'use strict';
13
 
14
  //include imagesLoaded plugin
@@ -23,8 +22,7 @@
23
  /*jshint curly: true, eqeqeq: true, noempty: true, strict: true, undef: true, browser: true */
24
  /*global jQuery: false */
25
 
26
- ;
27
- (function ($, undefined) {
28
  'use strict';
29
 
30
  // blank image data-uri bypasses webkit log warning (thx doug jones)
@@ -285,11 +283,13 @@
285
  if (this.mouseTrap === undefined) {
286
  var w = this.options.elements.zoom.width();
287
 
288
- $('<div class="yith_magnifier_loading">' + this.options.loadingLabel + '</div>').css({
289
- 'width': w,
290
- 'text-align': 'center',
291
- opacity: .5
292
- }).appendTo(this.options.elements.zoom.parent());
 
 
293
  }
294
  },
295
 
7
  * MIT License.
8
  */
9
 
10
+ ;(function (window, $, undefined) {
 
11
  'use strict';
12
 
13
  //include imagesLoaded plugin
22
  /*jshint curly: true, eqeqeq: true, noempty: true, strict: true, undef: true, browser: true */
23
  /*global jQuery: false */
24
 
25
+ ;(function ($, undefined) {
 
26
  'use strict';
27
 
28
  // blank image data-uri bypasses webkit log warning (thx doug jones)
283
  if (this.mouseTrap === undefined) {
284
  var w = this.options.elements.zoom.width();
285
 
286
+ if (this.options.loadingLabel) {
287
+ $('<div class="yith_magnifier_loading">' + this.options.loadingLabel + '</div>').css({
288
+ 'width': w,
289
+ 'text-align': 'center',
290
+ opacity: .5
291
+ }).appendTo(this.options.elements.zoom.parent());
292
+ }
293
  }
294
  },
295
 
assets/js/yith_magnifier.min.js CHANGED
@@ -1 +1 @@
1
- !function(t,i,e){"use strict";i.fn.imagesLoaded===e&&!function(t,i){var e="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";t.fn.imagesLoaded=function(o){function n(){var i=t(c),e=t(d);h&&(d.length?h.reject(l,i,e):h.resolve(l)),t.isFunction(o)&&o.call(r,l,i,e)}function s(t){a(t.target,"error"===t.type)}function a(i,o){i.src!==e&&-1===t.inArray(i,u)&&(u.push(i),o?d.push(i):c.push(i),t.data(i,"imagesLoaded",{isBroken:o,src:i.src}),m&&h.notifyWith(t(i),[o,l,t(c),t(d)]),l.length===u.length&&(setTimeout(n),l.unbind(".imagesLoaded",s)))}var r=this,h=t.isFunction(t.Deferred)?t.Deferred():0,m=t.isFunction(h.notify),l=r.find("img").add(r.filter("img")),u=[],c=[],d=[];return t.isPlainObject(o)&&t.each(o,function(t,i){"callback"===t?o=i:h&&h[t](i)}),l.length?l.bind("load.imagesLoaded error.imagesLoaded",s).each(function(o,n){var s=n.src,r=t.data(n,"imagesLoaded");return r&&r.src===s?void a(n,r.isBroken):n.complete&&n.naturalWidth!==i?void a(n,0===n.naturalWidth||0===n.naturalHeight):void((n.readyState||n.complete)&&(n.src=e,n.src=s))}):n(),h?h.promise(r):r}}(jQuery),i.yith_magnifier=function(t,e){this.t=e,this.element=i(e),this._init(t)},i.yith_magnifier.defaults={zoomWidth:"auto",zoomHeight:"auto",position:"right",tint:!1,tintOpacity:.5,lensOpacity:.5,softFocus:!1,smoothMove:3,showTitle:!0,titleOpacity:.5,adjustX:0,adjustY:0,phoneBehavior:"inside",loadingLabel:"Loading...",enableSlider:!0,slider:"carouFredSel",sliderOptions:{},onLoad:function(){return!1},onEnter:function(){return!1},onLeave:function(){return!1},onMove:function(){return!1},onClick:function(){return!1},elements:{zoom:i(".yith_magnifier_zoom"),zoomImage:i(".yith_magnifier_zoom img"),gallery:i(".yith_magnifier_gallery li a")}},i.yith_magnifier.prototype={_init:function(t){var e=this;i(document).trigger("yith_magnifier_before_init"),i.each(i.yith_magnifier.defaults.elements,function(t,o){var n=i.yith_magnifier.defaults.elements;n[t]=i(o,e)}),e.options=i.extend(!0,{},i.yith_magnifier.defaults,t),e.isPhone=e._isPhone(),e._loading(),e.element.imagesLoaded(function(){e.options.onLoad(),e._initZoom(),e._initGallery()}),i(document).trigger("yith_magnifier_after_init")},_initGallery:function(){var t=this,e=t.options.elements,o=e.gallery,n=e.zoom,s=e.zoomImage;o.length>0?(o.on("click",function(e){e.preventDefault();var o=i(this);t.destroy(),n.attr("href",this.href),s.attr("src",o.data("small")).attr("srcset",o.data("small")).attr("src-orig",o.data("small")).attr("title","").attr("title",o.attr("title")),i.data(t.t,"yith_magnifier",new i.yith_magnifier(t.options,t.element))}),t.options.enableSlider&&(o.closest("ul").trigger("yith_magnifier_slider_destroy"),o.closest("ul")[t.options.slider](t.options.sliderOptions))):o.on("click",function(t){return t.preventDefault(),!1})},_loading:function(){if(this.options.disableRightClick&&i(document).on("contextmenu",function(){return!1}),this.mouseTrap===e){var t=this.options.elements.zoom.width();i('<div class="yith_magnifier_loading">'+this.options.loadingLabel+"</div>").css({width:t,"text-align":"center",opacity:.5}).appendTo(this.options.elements.zoom.parent())}},_initZoom:function(){var t=this;t.zoom=t.options.elements.zoom,t.zoomImage=t.options.elements.zoomImage,t.zoom.wrap('<div class="yith_magnifier_zoom_wrap"></div>'),t.IMG_zoomImage=new Image,t.IMG_zoomImage.src=t.zoom.attr("href"),t.IMG_smallImage=new Image,t.IMG_smallImage.src=t.zoomImage.attr("src"),i.browser.msie&&8==i.browser.version?i(t.IMG_zoomImage).load(function(){t._initTrap()}):i([t.IMG_zoomImage,t.IMG_smallImage]).imagesLoaded(function(){t._initTrap()})},_initTrap:function(){{var t=this,e=t.IMG_zoomImage;t.IMG_smallImage}t.mx=0,t.my=0,t.controlTimer=0,t.lens=null,t.tint=null,t.softFocus=null,t.zoomDiv=null,t.cw=0,t.ch=0,t.zw=0,t.destU=0,t.destV=0,t.currU=0,t.currV=0,t.mouseTrap=null;var o=t.options.elements.zoom,n=t.options.elements.zoomImage;i(".yith_magnifier_loading").remove(),this.element.find(".yith_magnifier_mousetrap")&&this.element.find(".yith_magnifier_mousetrap").remove(),this.mouseTrap=i('<div class="yith_magnifier_mousetrap" />').css({width:"100%",height:"100%",top:0,left:0}).appendTo(o.parent());var s="ontouchstart"in document.documentElement?!0:!1,a="touchmove mousemove",r="touchend mouseleave",h="touchstart mouseenter",m="touchstart click";this.mouseTrap.on(a,this,function(i){t.options.onMove(),t.mx="undefined"!=typeof i.originalEvent.touches?i.originalEvent.touches[0].pageX:i.pageX,t.my="undefined"!=typeof i.originalEvent.touches?i.originalEvent.touches[0].pageY:i.pageY}).on(r,this,function(){return clearTimeout(t.controlTimer),t.lens&&t.lens.fadeOut(299),t.tint&&t.tint.fadeOut(299),t.softFocus&&t.softFocus.fadeOut(299),t.zoomDiv.fadeOut(300,function(){t._onLeave()}),!1}).on(m,this,function(){t.options.onClick()}).on(h,this,function(a){t.options.onEnter(),s&&a.preventDefault(),t.mx="undefined"!=typeof a.originalEvent.touches?a.originalEvent.touches[0].pageX:a.pageX,t.my="undefined"!=typeof a.originalEvent.touches?a.originalEvent.touches[0].pageY:a.pageY,t.zw=a.data,t.zoomDiv&&(t.zoomDiv.stop(!0,!1),t.zoomDiv.remove());var r=t.options.adjustX,h=t.options.adjustY,m=n.outerWidth(),l=n.outerHeight(),u=t.options.zoomWidth,c=t.options.zoomHeight;"auto"==t.options.zoomWidth&&(u=m),"auto"==t.options.zoomHeight&&(c=l);var d=o.parent();switch(t.options.position){case"top":h-=c;break;case"right":r+=m;break;case"bottom":h+=l;break;case"left":r-=u;break;case"inside":u=m,c=l;break;default:d=i("#"+t.options.position),d.length?(u=d.innerWidth(),c=d.innerHeight()):(d=o,r+=m,h+=l)}t.isPhone&&"inside"==t.options.phoneBehavior&&(u=m,c=l,r=0,h=0),t.zoomDiv=i('<div class="yith_magnifier_zoom_magnifier" />').css({left:r,top:h,width:u,height:c,"background-repeat":"no-repeat",backgroundImage:"url("+e.src+")"}).appendTo(d),n.attr("title")&&t.options.showTitle&&i('<div class="yith_magnifier_title">'+n.attr("title")+"</div>").appendTo(t.zoomDiv),t.isPhone?"disable"!=t.options.phoneBehavior?t.zoomDiv.fadeIn(500):t.lens.fadeOut(299):t.zoomDiv.fadeIn(500),t.lens&&(t.lens.remove(),t.lens=null),t.cw=e.width<=1?n.outerWidth()/e.naturalWidth*t.zoomDiv.width():n.outerWidth()/e.width*t.zoomDiv.width(),t.ch=e.height<=1?n.outerHeight()/e.naturalHeight*t.zoomDiv.height():n.outerHeight()/e.height*t.zoomDiv.height(),t.lens=i('<div class="yith_magnifier_lens" />').css({width:t.cw,height:t.ch}).appendTo(o),t.mouseTrap.css("cursor",t.lens.css("cursor"));var g=!1;t.options.tint&&(t.tint=i("<div />").css({display:"none",position:"absolute",left:0,top:0,width:n.outerWidth(),height:n.outerHeight(),backgroundColor:t.options.tint,opacity:t.options.tintOpacity}).appendTo(o),t.lens.append(i("<img />",{src:n.attr("src")})),g=!0,t.tint.fadeIn(500)),t.options.softFocus&&(t.softFocus=i("<div />").css({position:"absolute",display:"none",top:"1px",left:"1px",width:n.outerWidth(),height:n.outerHeight(),opacity:.5}).appendTo(o),t.softFocus.append(i("<img />",{src:n.attr("src")})),0==t.lens.find("img").length&&t.lens.append(i("<img />",{src:n.attr("src")})),g=!0,t.softFocus.fadeIn(500)),g||t.lens.css("opacity",t.options.lensOpacity),"inside"!==t.options.position&&t.lens.fadeIn(500),t.zw._controlLoop()})},_controlLoop:function(){var t=this;if(this.lens){var i=this.mx-this.zoomImage.offset().left-.5*this.cw>>0,e=this.my-this.zoomImage.offset().top-.5*this.ch>>0;0>i?i=0:i>this.zoomImage.outerWidth()-this.cw&&(i=this.zoomImage.outerWidth()-this.cw),0>e?e=0:e>this.zoomImage.outerHeight()-this.ch&&(e=this.zoomImage.outerHeight()-this.ch),this.lens.css({left:i-2,top:e-1}),this.lens.find("img").css({width:this.zoomImage.outerWidth(),height:this.zoomImage.outerHeight(),marginLeft:-i+"px ",marginTop:-e+"px"}),this.destU=this.IMG_zoomImage.width<=1?i/this.zoomImage.outerWidth()*this.IMG_zoomImage.naturalWidth>>0:i/this.zoomImage.outerWidth()*this.IMG_zoomImage.width>>0,this.destV=this.IMG_zoomImage.height<=1?e/this.zoomImage.outerHeight()*this.IMG_zoomImage.naturalHeight>>0:e/this.zoomImage.outerHeight()*this.IMG_zoomImage.height>>0,this.currU+=(this.destU-this.currU)/this.options.smoothMove,this.currV+=(this.destV-this.currV)/this.options.smoothMove,this.zoomDiv.css("background-position",-(this.currU>>0)+"px "+(-(this.currV>>0)+"px"))}this.controlTimer=setTimeout(function(){t._controlLoop()},30)},_onLeave:function(){this.options.onLeave(),this.zoomDiv&&(this.zoomDiv.remove(),this.zoomDiv=null),this._removeElements()},_removeElements:function(){this.lens&&(this.lens.remove(),this.lens=null),this.tint&&(this.tint.remove(),this.tint=null),this.softFocus&&(this.softFocus.remove(),this.softFocus=null),this.element.find(".yith_magnifier_loading").length>0&&this.element.find(".yith_magnifier_loading").remove()},_isPhone:function(){var t=navigator.userAgent.toLowerCase();return t.match(/iphone/i)||t.match(/ipod/i)||t.match(/android/i)},destroy:function(){this.zoom&&this.zoom.unwrap(),this.mouseTrap&&(this.mouseTrap.unbind(),this.mouseTrap.remove(),this.mouseTrap=null),this.zoomDiv&&(this.zoomDiv.remove(),this.zoomDiv=null),this.options.disableRightClick&&i(document).unbind(),this._removeElements(),this.options.elements.gallery.unbind(),this.element.removeData("yith_magnifier")}},i.fn.yith_magnifier=function(t){if("string"==typeof t){var e=Array.prototype.slice.call(arguments,1);this.each(function(){var o=i.data(this,"yith_magnifier");return o?i.isFunction(o[t])&&"_"!==t.charAt(0)?void o[t].apply(o,e):void i.error("no such method '"+t+"' for yith_magnifier instance"):void i.error("cannot call methods on yith_magnifier prior to initialization; attempted to call method '"+t+"'")})}else this.each(function(){var e=i.data(this,"yith_magnifier");e?i.error("yith_magnifier already istantiated."):i.data(this,"yith_magnifier",new i.yith_magnifier(t,this))});return this}}(window,jQuery);
1
+ !function(t,i,e){"use strict";i.fn.imagesLoaded===e&&!function(t,i){var e="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";t.fn.imagesLoaded=function(o){function n(){var i=t(c),e=t(d);h&&(d.length?h.reject(l,i,e):h.resolve(l)),t.isFunction(o)&&o.call(r,l,i,e)}function s(t){a(t.target,"error"===t.type)}function a(i,o){i.src!==e&&-1===t.inArray(i,u)&&(u.push(i),o?d.push(i):c.push(i),t.data(i,"imagesLoaded",{isBroken:o,src:i.src}),m&&h.notifyWith(t(i),[o,l,t(c),t(d)]),l.length===u.length&&(setTimeout(n),l.unbind(".imagesLoaded",s)))}var r=this,h=t.isFunction(t.Deferred)?t.Deferred():0,m=t.isFunction(h.notify),l=r.find("img").add(r.filter("img")),u=[],c=[],d=[];return t.isPlainObject(o)&&t.each(o,function(t,i){"callback"===t?o=i:h&&h[t](i)}),l.length?l.bind("load.imagesLoaded error.imagesLoaded",s).each(function(o,n){var s=n.src,r=t.data(n,"imagesLoaded");return r&&r.src===s?void a(n,r.isBroken):n.complete&&n.naturalWidth!==i?void a(n,0===n.naturalWidth||0===n.naturalHeight):void((n.readyState||n.complete)&&(n.src=e,n.src=s))}):n(),h?h.promise(r):r}}(jQuery),i.yith_magnifier=function(t,e){this.t=e,this.element=i(e),this._init(t)},i.yith_magnifier.defaults={zoomWidth:"auto",zoomHeight:"auto",position:"right",tint:!1,tintOpacity:.5,lensOpacity:.5,softFocus:!1,smoothMove:3,showTitle:!0,titleOpacity:.5,adjustX:0,adjustY:0,phoneBehavior:"inside",loadingLabel:"Loading...",enableSlider:!0,slider:"carouFredSel",sliderOptions:{},onLoad:function(){return!1},onEnter:function(){return!1},onLeave:function(){return!1},onMove:function(){return!1},onClick:function(){return!1},elements:{zoom:i(".yith_magnifier_zoom"),zoomImage:i(".yith_magnifier_zoom img"),gallery:i(".yith_magnifier_gallery li a")}},i.yith_magnifier.prototype={_init:function(t){var e=this;i(document).trigger("yith_magnifier_before_init"),i.each(i.yith_magnifier.defaults.elements,function(t,o){var n=i.yith_magnifier.defaults.elements;n[t]=i(o,e)}),e.options=i.extend(!0,{},i.yith_magnifier.defaults,t),e.isPhone=e._isPhone(),e._loading(),e.element.imagesLoaded(function(){e.options.onLoad(),e._initZoom(),e._initGallery()}),i(document).trigger("yith_magnifier_after_init")},_initGallery:function(){var t=this,e=t.options.elements,o=e.gallery,n=e.zoom,s=e.zoomImage;o.length>0?(o.on("click",function(e){e.preventDefault();var o=i(this);t.destroy(),n.attr("href",this.href),s.attr("src",o.data("small")).attr("srcset",o.data("small")).attr("src-orig",o.data("small")).attr("title","").attr("title",o.attr("title")),i.data(t.t,"yith_magnifier",new i.yith_magnifier(t.options,t.element))}),t.options.enableSlider&&(o.closest("ul").trigger("yith_magnifier_slider_destroy"),o.closest("ul")[t.options.slider](t.options.sliderOptions))):o.on("click",function(t){return t.preventDefault(),!1})},_loading:function(){if(this.options.disableRightClick&&i(document).on("contextmenu",function(){return!1}),this.mouseTrap===e){var t=this.options.elements.zoom.width();this.options.loadingLabel&&i('<div class="yith_magnifier_loading">'+this.options.loadingLabel+"</div>").css({width:t,"text-align":"center",opacity:.5}).appendTo(this.options.elements.zoom.parent())}},_initZoom:function(){var t=this;t.zoom=t.options.elements.zoom,t.zoomImage=t.options.elements.zoomImage,t.zoom.wrap('<div class="yith_magnifier_zoom_wrap"></div>'),t.IMG_zoomImage=new Image,t.IMG_zoomImage.src=t.zoom.attr("href"),t.IMG_smallImage=new Image,t.IMG_smallImage.src=t.zoomImage.attr("src"),i.browser.msie&&8==i.browser.version?i(t.IMG_zoomImage).load(function(){t._initTrap()}):i([t.IMG_zoomImage,t.IMG_smallImage]).imagesLoaded(function(){t._initTrap()})},_initTrap:function(){{var t=this,e=t.IMG_zoomImage;t.IMG_smallImage}t.mx=0,t.my=0,t.controlTimer=0,t.lens=null,t.tint=null,t.softFocus=null,t.zoomDiv=null,t.cw=0,t.ch=0,t.zw=0,t.destU=0,t.destV=0,t.currU=0,t.currV=0,t.mouseTrap=null;var o=t.options.elements.zoom,n=t.options.elements.zoomImage;i(".yith_magnifier_loading").remove(),this.element.find(".yith_magnifier_mousetrap")&&this.element.find(".yith_magnifier_mousetrap").remove(),this.mouseTrap=i('<div class="yith_magnifier_mousetrap" />').css({width:"100%",height:"100%",top:0,left:0}).appendTo(o.parent());var s="ontouchstart"in document.documentElement?!0:!1,a="touchmove mousemove",r="touchend mouseleave",h="touchstart mouseenter",m="touchstart click";this.mouseTrap.on(a,this,function(i){t.options.onMove(),t.mx="undefined"!=typeof i.originalEvent.touches?i.originalEvent.touches[0].pageX:i.pageX,t.my="undefined"!=typeof i.originalEvent.touches?i.originalEvent.touches[0].pageY:i.pageY}).on(r,this,function(){return clearTimeout(t.controlTimer),t.lens&&t.lens.fadeOut(299),t.tint&&t.tint.fadeOut(299),t.softFocus&&t.softFocus.fadeOut(299),t.zoomDiv.fadeOut(300,function(){t._onLeave()}),!1}).on(m,this,function(){t.options.onClick()}).on(h,this,function(a){t.options.onEnter(),s&&a.preventDefault(),t.mx="undefined"!=typeof a.originalEvent.touches?a.originalEvent.touches[0].pageX:a.pageX,t.my="undefined"!=typeof a.originalEvent.touches?a.originalEvent.touches[0].pageY:a.pageY,t.zw=a.data,t.zoomDiv&&(t.zoomDiv.stop(!0,!1),t.zoomDiv.remove());var r=t.options.adjustX,h=t.options.adjustY,m=n.outerWidth(),l=n.outerHeight(),u=t.options.zoomWidth,c=t.options.zoomHeight;"auto"==t.options.zoomWidth&&(u=m),"auto"==t.options.zoomHeight&&(c=l);var d=o.parent();switch(t.options.position){case"top":h-=c;break;case"right":r+=m;break;case"bottom":h+=l;break;case"left":r-=u;break;case"inside":u=m,c=l;break;default:d=i("#"+t.options.position),d.length?(u=d.innerWidth(),c=d.innerHeight()):(d=o,r+=m,h+=l)}t.isPhone&&"inside"==t.options.phoneBehavior&&(u=m,c=l,r=0,h=0),t.zoomDiv=i('<div class="yith_magnifier_zoom_magnifier" />').css({left:r,top:h,width:u,height:c,"background-repeat":"no-repeat",backgroundImage:"url("+e.src+")"}).appendTo(d),n.attr("title")&&t.options.showTitle&&i('<div class="yith_magnifier_title">'+n.attr("title")+"</div>").appendTo(t.zoomDiv),t.isPhone?"disable"!=t.options.phoneBehavior?t.zoomDiv.fadeIn(500):t.lens.fadeOut(299):t.zoomDiv.fadeIn(500),t.lens&&(t.lens.remove(),t.lens=null),t.cw=e.width<=1?n.outerWidth()/e.naturalWidth*t.zoomDiv.width():n.outerWidth()/e.width*t.zoomDiv.width(),t.ch=e.height<=1?n.outerHeight()/e.naturalHeight*t.zoomDiv.height():n.outerHeight()/e.height*t.zoomDiv.height(),t.lens=i('<div class="yith_magnifier_lens" />').css({width:t.cw,height:t.ch}).appendTo(o),t.mouseTrap.css("cursor",t.lens.css("cursor"));var g=!1;t.options.tint&&(t.tint=i("<div />").css({display:"none",position:"absolute",left:0,top:0,width:n.outerWidth(),height:n.outerHeight(),backgroundColor:t.options.tint,opacity:t.options.tintOpacity}).appendTo(o),t.lens.append(i("<img />",{src:n.attr("src")})),g=!0,t.tint.fadeIn(500)),t.options.softFocus&&(t.softFocus=i("<div />").css({position:"absolute",display:"none",top:"1px",left:"1px",width:n.outerWidth(),height:n.outerHeight(),opacity:.5}).appendTo(o),t.softFocus.append(i("<img />",{src:n.attr("src")})),0==t.lens.find("img").length&&t.lens.append(i("<img />",{src:n.attr("src")})),g=!0,t.softFocus.fadeIn(500)),g||t.lens.css("opacity",t.options.lensOpacity),"inside"!==t.options.position&&t.lens.fadeIn(500),t.zw._controlLoop()})},_controlLoop:function(){var t=this;if(this.lens){var i=this.mx-this.zoomImage.offset().left-.5*this.cw>>0,e=this.my-this.zoomImage.offset().top-.5*this.ch>>0;0>i?i=0:i>this.zoomImage.outerWidth()-this.cw&&(i=this.zoomImage.outerWidth()-this.cw),0>e?e=0:e>this.zoomImage.outerHeight()-this.ch&&(e=this.zoomImage.outerHeight()-this.ch),this.lens.css({left:i-2,top:e-1}),this.lens.find("img").css({width:this.zoomImage.outerWidth(),height:this.zoomImage.outerHeight(),marginLeft:-i+"px ",marginTop:-e+"px"}),this.destU=this.IMG_zoomImage.width<=1?i/this.zoomImage.outerWidth()*this.IMG_zoomImage.naturalWidth>>0:i/this.zoomImage.outerWidth()*this.IMG_zoomImage.width>>0,this.destV=this.IMG_zoomImage.height<=1?e/this.zoomImage.outerHeight()*this.IMG_zoomImage.naturalHeight>>0:e/this.zoomImage.outerHeight()*this.IMG_zoomImage.height>>0,this.currU+=(this.destU-this.currU)/this.options.smoothMove,this.currV+=(this.destV-this.currV)/this.options.smoothMove,this.zoomDiv.css("background-position",-(this.currU>>0)+"px "+(-(this.currV>>0)+"px"))}this.controlTimer=setTimeout(function(){t._controlLoop()},30)},_onLeave:function(){this.options.onLeave(),this.zoomDiv&&(this.zoomDiv.remove(),this.zoomDiv=null),this._removeElements()},_removeElements:function(){this.lens&&(this.lens.remove(),this.lens=null),this.tint&&(this.tint.remove(),this.tint=null),this.softFocus&&(this.softFocus.remove(),this.softFocus=null),this.element.find(".yith_magnifier_loading").length>0&&this.element.find(".yith_magnifier_loading").remove()},_isPhone:function(){var t=navigator.userAgent.toLowerCase();return t.match(/iphone/i)||t.match(/ipod/i)||t.match(/android/i)},destroy:function(){this.zoom&&this.zoom.unwrap(),this.mouseTrap&&(this.mouseTrap.unbind(),this.mouseTrap.remove(),this.mouseTrap=null),this.zoomDiv&&(this.zoomDiv.remove(),this.zoomDiv=null),this.options.disableRightClick&&i(document).unbind(),this._removeElements(),this.options.elements.gallery.unbind(),this.element.removeData("yith_magnifier")}},i.fn.yith_magnifier=function(t){if("string"==typeof t){var e=Array.prototype.slice.call(arguments,1);this.each(function(){var o=i.data(this,"yith_magnifier");return o?i.isFunction(o[t])&&"_"!==t.charAt(0)?void o[t].apply(o,e):void i.error("no such method '"+t+"' for yith_magnifier instance"):void i.error("cannot call methods on yith_magnifier prior to initialization; attempted to call method '"+t+"'")})}else this.each(function(){var e=i.data(this,"yith_magnifier");e?i.error("yith_magnifier already istantiated."):i.data(this,"yith_magnifier",new i.yith_magnifier(t,this))});return this}}(window,jQuery);
class.yith-wcmg-admin.php CHANGED
@@ -8,172 +8,170 @@
8
  */
9
 
10
  if ( ! defined( 'YITH_WCMG' ) ) {
11
- exit;
12
  } // Exit if accessed directly
13
 
14
  if ( ! class_exists( 'YITH_WCMG_Admin' ) ) {
15
- /**
16
- * Admin class.
17
- * The class manage all the admin behaviors.
18
- *
19
- * @since 1.0.0
20
- */
21
- class YITH_WCMG_Admin {
22
- /**
23
- * Plugin options
24
- *
25
- * @var array
26
- * @access public
27
- * @since 1.0.0
28
- */
29
- public $options = array();
30
-
31
- /**
32
- * Plugin version
33
- *
34
- * @var string
35
- * @since 1.0.0
36
- */
37
- public $version;
38
-
39
- /**
40
- * Various links
41
- *
42
- * @var string
43
- * @access public
44
- * @since 1.0.0
45
- */
46
- public $banner_url = 'http://cdn.yithemes.com/plugins/yith_magnifier.php?url';
47
- public $banner_img = 'http://cdn.yithemes.com/plugins/yith_magnifier.php';
48
- public $doc_url = 'http://yithemes.com/docs-plugins/yith_magnifier/';
49
-
50
- /**
51
- * Constructor
52
- *
53
- * @access public
54
- * @since 1.0.0
55
- */
56
- public function __construct( $version ) {
57
- $this->version = $version;
58
-
59
- //Actions
60
- add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_styles_scripts' ) );
61
-
62
- add_action( 'woocommerce_update_options_yith_wcmg', array( $this, 'update_options' ) );
63
-
64
- add_action( 'woocommerce_admin_field_banner', array( $this, 'admin_fields_banner' ) );
65
- add_action( 'admin_print_footer_scripts', array( $this, 'admin_fields_image_deps' ) );
66
-
67
- add_filter( 'woocommerce_catalog_settings', array( $this, 'add_catalog_image_size' ) );
68
-
69
- //Apply filters
70
- $this->banner_url = apply_filters( 'yith_wcmg_banner_url', $this->banner_url );
71
-
72
- // YITH WCMG Loaded
73
- do_action( 'yith_wcmg_loaded' );
74
- }
75
-
76
-
77
- /**
78
- * Add Zoom Image size to Woocommerce -> Catalog
79
- *
80
- * @access public
81
- *
82
- * @param array $settings
83
- *
84
- * @return array
85
- */
86
- public function add_catalog_image_size( $settings ) {
87
- $tmp = $settings[ count( $settings ) - 1 ];
88
- unset( $settings[ count( $settings ) - 1 ] );
89
-
90
- $settings[] = array(
91
- 'name' => __( 'Image Size', 'yit' ),
92
- 'desc' => __( 'The size of the images used within the magnifier box', 'yit' ),
93
- 'id' => 'woocommerce_magnifier_image',
94
- 'css' => '',
95
- 'type' => 'image_width',
96
- 'default' => array(
97
- 'width' => 600,
98
- 'height' => 600,
99
- 'crop' => true
100
- ),
101
- 'std' => array(
102
- 'width' => 600,
103
- 'height' => 600,
104
- 'crop' => true
105
- ),
106
- 'desc_tip' => true
107
- );
108
- $settings[] = $tmp;
109
-
110
- return $settings;
111
- }
112
-
113
- /**
114
- * Create new Woocommerce admin field: image deps
115
- *
116
- * @access public
117
- *
118
- * @param array $value
119
- *
120
- * @return void
121
- * @since 1.0.0
122
- */
123
- public function admin_fields_image_deps( $value ) {
124
- global $woocommerce;
125
-
126
- $force = get_option( 'yith_wcmg_force_sizes' ) == 'yes';
127
-
128
- if ( $force ) {
129
- $value['desc'] = 'These values ??are automatically calculated based on the values ??of the Single product. If you\'d like to customize yourself the values, please disable the "Forcing Zoom Image sizes" in "Magnifier" tab.';
130
- }
131
-
132
- if ( $force && isset( $_GET['page'] ) && isset( $_GET['tab'] ) && ( $_GET['page'] == 'woocommerce_settings' || $_GET['page'] == 'wc-settings' ) && $_GET['tab'] == 'catalog' ): ?>
133
- <script>
134
- jQuery(document).ready(function ($) {
135
- $('#woocommerce_magnifier_image-width, #woocommerce_magnifier_image-height, #woocommerce_magnifier_image-crop').attr('disabled', 'disabled');
136
-
137
- $('#shop_single_image_size-width, #shop_single_image_size-height').on('keyup', function () {
138
- var value = parseInt($(this).val());
139
- var input = (this.id).indexOf('width') >= 0 ? 'width' : 'height';
140
-
141
- if (!isNaN(value)) {
142
- $('#woocommerce_magnifier_image-' + input).val(value * 2);
143
- }
144
- });
145
-
146
- $('#shop_single_image_size-crop').on('change', function () {
147
- if ($(this).is(':checked')) {
148
- $('#woocommerce_magnifier_image-crop').attr('checked', 'checked');
149
- } else {
150
- $('#woocommerce_magnifier_image-crop').removeAttr('checked');
151
- }
152
- });
153
-
154
- $('#mainform').on('submit', function () {
155
- $(':disabled').removeAttr('disabled');
156
- });
157
- });
158
- </script>
159
- <?php endif;
160
- }
161
-
162
-
163
- /**
164
- * Enqueue admin styles and scripts
165
- *
166
- * @access public
167
- * @return void
168
- * @since 1.0.0
169
- */
170
- public function enqueue_styles_scripts() {
171
- wp_enqueue_script( 'jquery-ui' );
172
- wp_enqueue_script( 'jquery-ui-core' );
173
- wp_enqueue_script( 'jquery-ui-mouse' );
174
- wp_enqueue_script( 'jquery-ui-slider' );
175
-
176
- wp_enqueue_style( 'yith_wcmg_admin', YITH_WCMG_URL . 'assets/css/admin.css' );
177
- }
178
- }
179
  }
8
  */
9
 
10
  if ( ! defined( 'YITH_WCMG' ) ) {
11
+ exit;
12
  } // Exit if accessed directly
13
 
14
  if ( ! class_exists( 'YITH_WCMG_Admin' ) ) {
15
+ /**
16
+ * Admin class.
17
+ * The class manage all the admin behaviors.
18
+ *
19
+ * @since 1.0.0
20
+ */
21
+ class YITH_WCMG_Admin {
22
+ /**
23
+ * Plugin options
24
+ *
25
+ * @var array
26
+ * @access public
27
+ * @since 1.0.0
28
+ */
29
+ public $options = array();
30
+
31
+ /**
32
+ * Plugin version
33
+ *
34
+ * @var string
35
+ * @since 1.0.0
36
+ */
37
+ public $version;
38
+
39
+ /**
40
+ * Various links
41
+ *
42
+ * @var string
43
+ * @access public
44
+ * @since 1.0.0
45
+ */
46
+ public $banner_url = 'http://cdn.yithemes.com/plugins/yith_magnifier.php?url';
47
+ public $banner_img = 'http://cdn.yithemes.com/plugins/yith_magnifier.php';
48
+ public $doc_url = 'http://yithemes.com/docs-plugins/yith_magnifier/';
49
+
50
+ /**
51
+ * Constructor
52
+ *
53
+ * @access public
54
+ * @since 1.0.0
55
+ */
56
+ public function __construct( $version ) {
57
+ $this->version = $version;
58
+
59
+ //Actions
60
+ add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_styles_scripts' ) );
61
+
62
+ add_action( 'woocommerce_update_options_yith_wcmg', array( $this, 'update_options' ) );
63
+
64
+ add_action( 'woocommerce_admin_field_banner', array( $this, 'admin_fields_banner' ) );
65
+ add_action( 'admin_print_footer_scripts', array( $this, 'admin_fields_image_deps' ) );
66
+
67
+ add_filter( 'woocommerce_catalog_settings', array( $this, 'add_catalog_image_size' ) );
68
+
69
+ //Apply filters
70
+ $this->banner_url = apply_filters( 'yith_wcmg_banner_url', $this->banner_url );
71
+
72
+ // YITH WCMG Loaded
73
+ do_action( 'yith_wcmg_loaded' );
74
+ }
75
+
76
+ /**
77
+ * Add Zoom Image size to Woocommerce -> Catalog
78
+ *
79
+ * @access public
80
+ *
81
+ * @param array $settings
82
+ *
83
+ * @return array
84
+ */
85
+ public function add_catalog_image_size( $settings ) {
86
+ $tmp = $settings[count( $settings ) - 1];
87
+ unset( $settings[count( $settings ) - 1] );
88
+
89
+ $settings[] = array(
90
+ 'name' => __( 'Image Size', 'ywzm' ),
91
+ 'desc' => __( 'The size of the images used within the magnifier box', 'ywzm' ),
92
+ 'id' => 'woocommerce_magnifier_image',
93
+ 'css' => '',
94
+ 'type' => 'image_width',
95
+ 'default' => array(
96
+ 'width' => 600,
97
+ 'height' => 600,
98
+ 'crop' => true
99
+ ),
100
+ 'std' => array(
101
+ 'width' => 600,
102
+ 'height' => 600,
103
+ 'crop' => true
104
+ ),
105
+ 'desc_tip' => true
106
+ );
107
+ $settings[] = $tmp;
108
+ return $settings;
109
+ }
110
+
111
+ /**
112
+ * Create new Woocommerce admin field: image deps
113
+ *
114
+ * @access public
115
+ *
116
+ * @param array $value
117
+ *
118
+ * @return void
119
+ * @since 1.0.0
120
+ */
121
+ public function admin_fields_image_deps( $value ) {
122
+ global $woocommerce;
123
+
124
+ $force = get_option( 'yith_wcmg_force_sizes' ) == 'yes';
125
+
126
+ if ( $force ) {
127
+ $value['desc'] = 'These values ??are automatically calculated based on the values ??of the Single product. If you\'d like to customize yourself the values, please disable the "Forcing Zoom Image sizes" in "Magnifier" tab.';
128
+ }
129
+
130
+ if ( $force && isset( $_GET['page'] ) && isset( $_GET['tab'] ) && ( $_GET['page'] == 'woocommerce_settings' || $_GET['page'] == 'wc-settings' ) && $_GET['tab'] == 'catalog' ): ?>
131
+ <script>
132
+ jQuery(document).ready(function ($) {
133
+ $('#woocommerce_magnifier_image-width, #woocommerce_magnifier_image-height, #woocommerce_magnifier_image-crop').attr('disabled', 'disabled');
134
+
135
+ $('#shop_single_image_size-width, #shop_single_image_size-height').on('keyup', function () {
136
+ var value = parseInt($(this).val());
137
+ var input = (this.id).indexOf('width') >= 0 ? 'width' : 'height';
138
+
139
+ if (!isNaN(value)) {
140
+ $('#woocommerce_magnifier_image-' + input).val(value * 2);
141
+ }
142
+ });
143
+
144
+ $('#shop_single_image_size-crop').on('change', function () {
145
+ if ($(this).is(':checked')) {
146
+ $('#woocommerce_magnifier_image-crop').attr('checked', 'checked');
147
+ } else {
148
+ $('#woocommerce_magnifier_image-crop').removeAttr('checked');
149
+ }
150
+ });
151
+
152
+ $('#mainform').on('submit', function () {
153
+ $(':disabled').removeAttr('disabled');
154
+ });
155
+ });
156
+ </script>
157
+ <?php endif;
158
+ }
159
+
160
+
161
+ /**
162
+ * Enqueue admin styles and scripts
163
+ *
164
+ * @access public
165
+ * @return void
166
+ * @since 1.0.0
167
+ */
168
+ public function enqueue_styles_scripts() {
169
+ wp_enqueue_script( 'jquery-ui' );
170
+ wp_enqueue_script( 'jquery-ui-core' );
171
+ wp_enqueue_script( 'jquery-ui-mouse' );
172
+ wp_enqueue_script( 'jquery-ui-slider' );
173
+
174
+ wp_enqueue_style( 'yith_wcmg_admin', YITH_WCMG_URL . 'assets/css/admin.css' );
175
+ }
176
+ }
 
 
177
  }
class.yith-wcmg-frontend.php CHANGED
@@ -7,152 +7,151 @@
7
  * @version 1.1.2
8
  */
9
 
10
- if ( ! defined( 'YITH_WCMG' ) ) {
11
- exit;
12
  } // Exit if accessed directly
13
 
14
- if ( ! class_exists( 'YITH_WCMG_Frontend' ) ) {
15
- /**
16
- * Admin class.
17
- * The class manage all the Frontend behaviors.
18
- *
19
- * @since 1.0.0
20
- */
21
- class YITH_WCMG_Frontend {
22
- /**
23
- * Plugin version
24
- *
25
- * @var string
26
- * @since 1.0.0
27
- */
28
- public $version;
29
-
30
- /**
31
- * Constructor
32
- *
33
- * @access public
34
- * @since 1.0.0
35
- */
36
- public function __construct( $version ) {
37
- $this->version = $version;
38
-
39
- // add the action only when the loop is initializate
40
- add_action( 'template_redirect', array( $this, 'render' ) );
41
- }
42
-
43
- public function render() {
44
- if ( yith_wcmg_is_enabled() && ! $this->is_video_featured_enabled() ) {
45
- //change the templates
46
- remove_action( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_images', 20 );
47
- remove_action( 'woocommerce_product_thumbnails', 'woocommerce_show_product_thumbnails', 20 );
48
- add_action( 'woocommerce_before_single_product_summary', array( $this, 'show_product_images' ), 20 );
49
- add_action( 'woocommerce_product_thumbnails', array( $this, 'show_product_thumbnails' ), 20 );
50
-
51
- //custom styles and javascripts
52
- add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles_scripts' ) );
53
-
54
- //add attributes to product variations
55
- add_filter( 'woocommerce_available_variation', array( $this, 'available_variation' ), 10, 3 );
56
- }
57
- }
58
-
59
-
60
- /**
61
- * Change product-single.php template
62
- *
63
- * @access public
64
- * @return void
65
- * @since 1.0.0
66
- */
67
- public function show_product_images() {
68
-
69
- /** FIX WOO 2.1 */
70
- $wc_get_template = function_exists( 'wc_get_template' ) ? 'wc_get_template' : 'woocommerce_get_template';
71
-
72
- $wc_get_template( 'single-product/product-image-magnifier.php', array(), '', YITH_YWZM_DIR . 'templates/' );
73
- }
74
-
75
-
76
- /**
77
- * Change product-thumbnails.php template
78
- *
79
- * @access public
80
- * @return void
81
- * @since 1.0.0
82
- */
83
- public function show_product_thumbnails() {
84
-
85
- /** FIX WOO 2.1 */
86
- $wc_get_template = function_exists( 'wc_get_template' ) ? 'wc_get_template' : 'woocommerce_get_template';
87
-
88
- $wc_get_template( 'single-product/product-thumbnails-magnifier.php', array(), '', YITH_YWZM_DIR . 'templates/' );
89
- }
90
-
91
-
92
- /**
93
- * Enqueue styles and scripts
94
- *
95
- * @access public
96
- * @return void
97
- * @since 1.0.0
98
- */
99
- public function enqueue_styles_scripts() {
100
- global $post;
101
-
102
- $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
103
-
104
- wp_register_script( 'yith-magnifier-slider', YITH_WCMG_URL . 'assets/js/jquery.carouFredSel' . $suffix . '.js', array(
105
- 'jquery',
106
- 'jquery-migrate'
107
- ), '6.2.1', true );
108
-
109
- if ( is_product() || ( ! empty( $post->post_content ) && strstr( $post->post_content, '[product_page' ) ) ) {
110
- wp_enqueue_script( 'yith-magnifier-slider' );
111
- wp_enqueue_script( 'yith-magnifier', YITH_WCMG_URL . 'assets/js/yith_magnifier' . $suffix . '.js', array( 'jquery' ), $this->version, true );
112
- wp_enqueue_script( 'yith_wcmg_frontend', YITH_WCMG_URL . 'assets/js/frontend' . $suffix . '.js', array(
113
- 'jquery',
114
- 'yith-magnifier'
115
- ), $this->version, true );
116
- wp_enqueue_style( 'yith-magnifier', YITH_WCMG_URL . 'assets/css/yith_magnifier.css' );
117
-
118
- $css = file_exists( get_stylesheet_directory() . '/woocommerce/yith_magnifier.css' ) ? get_stylesheet_directory_uri() . '/woocommerce/yith_magnifier.css' : YITH_WCMG_URL . 'assets/css/frontend.css';
119
- wp_enqueue_style( 'yith_wcmg_frontend', $css );
120
- }
121
- }
122
-
123
-
124
- /**
125
- * Add attributes to product variations
126
- *
127
- * @access public
128
- * @return void
129
- * @since 1.0.0
130
- */
131
- public function available_variation( $data, $wc_prod, $variation ) {
132
-
133
- $attachment_id = get_post_thumbnail_id( $variation->get_variation_id() );
134
- $attachment = wp_get_attachment_image_src( $attachment_id, 'shop_magnifier' );
135
-
136
- $data['image_magnifier'] = $attachment ? current( $attachment ) : '';
137
-
138
- return $data;
139
- }
140
-
141
- /**
142
- * Detect if the featured video is enabled
143
- */
144
- public function is_video_featured_enabled() {
145
- global $post;
146
- if ( ! isset( $post->ID ) ) {
147
- return;
148
- }
149
-
150
- $featured_video = get_post_meta( $post->ID, '_video_url', true );
151
- if ( ! empty( $featured_video ) ) {
152
- return true;
153
- } else {
154
- return false;
155
- }
156
- }
157
- }
158
  }
7
  * @version 1.1.2
8
  */
9
 
10
+ if (!defined('YITH_WCMG')) {
11
+ exit;
12
  } // Exit if accessed directly
13
 
14
+ if (!class_exists('YITH_WCMG_Frontend')) {
15
+ /**
16
+ * Admin class.
17
+ * The class manage all the Frontend behaviors.
18
+ *
19
+ * @since 1.0.0
20
+ */
21
+ class YITH_WCMG_Frontend {
22
+ /**
23
+ * Plugin version
24
+ *
25
+ * @var string
26
+ * @since 1.0.0
27
+ */
28
+ public $version;
29
+
30
+ /**
31
+ * Constructor
32
+ *
33
+ * @access public
34
+ * @since 1.0.0
35
+ */
36
+ public function __construct($version) {
37
+ $this->version = $version;
38
+
39
+ // add the action only when the loop is initializate
40
+ add_action('template_redirect', array($this, 'render'));
41
+ }
42
+
43
+ public function render() {
44
+ if (yith_wcmg_is_enabled() && !$this->is_video_featured_enabled()) {
45
+ //change the templates
46
+ remove_action('woocommerce_before_single_product_summary', 'woocommerce_show_product_images', 20);
47
+ remove_action('woocommerce_product_thumbnails', 'woocommerce_show_product_thumbnails', 20);
48
+ add_action('woocommerce_before_single_product_summary', array($this, 'show_product_images'), 20);
49
+ add_action('woocommerce_product_thumbnails', array($this, 'show_product_thumbnails'), 20);
50
+
51
+ //custom styles and javascripts
52
+ add_action('wp_enqueue_scripts', array($this, 'enqueue_styles_scripts'));
53
+
54
+ //add attributes to product variations
55
+ add_filter('woocommerce_available_variation', array($this, 'available_variation'), 10, 3);
56
+ }
57
+ }
58
+
59
+
60
+ /**
61
+ * Change product-single.php template
62
+ *
63
+ * @access public
64
+ * @return void
65
+ * @since 1.0.0
66
+ */
67
+ public function show_product_images() {
68
+
69
+ /** FIX WOO 2.1 */
70
+ $wc_get_template = function_exists('wc_get_template') ? 'wc_get_template' : 'woocommerce_get_template';
71
+ $wc_get_template('single-product/product-image-magnifier.php', array(), '', YITH_YWZM_DIR . 'templates/');
72
+ }
73
+
74
+
75
+ /**
76
+ * Change product-thumbnails.php template
77
+ *
78
+ * @access public
79
+ * @return void
80
+ * @since 1.0.0
81
+ */
82
+ public function show_product_thumbnails() {
83
+
84
+ /** FIX WOO 2.1 */
85
+ $wc_get_template = function_exists('wc_get_template') ? 'wc_get_template' : 'woocommerce_get_template';
86
+
87
+ $wc_get_template('single-product/product-thumbnails-magnifier.php', array(), '', YITH_YWZM_DIR . 'templates/');
88
+ }
89
+
90
+
91
+ /**
92
+ * Enqueue styles and scripts
93
+ *
94
+ * @access public
95
+ * @return void
96
+ * @since 1.0.0
97
+ */
98
+ public function enqueue_styles_scripts() {
99
+ global $post;
100
+
101
+ $suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
102
+
103
+ wp_register_script('yith-magnifier-slider', YITH_WCMG_URL . 'assets/js/jquery.carouFredSel' . $suffix . '.js', array(
104
+ 'jquery',
105
+ 'jquery-migrate'
106
+ ), '6.2.1', true);
107
+
108
+ if (is_product() || (!empty($post->post_content) && strstr($post->post_content, '[product_page'))) {
109
+ wp_enqueue_script('yith-magnifier-slider');
110
+ wp_enqueue_script('yith-magnifier', YITH_WCMG_URL . 'assets/js/yith_magnifier' . $suffix . '.js', array('jquery'), $this->version, true);
111
+ wp_enqueue_script('yith_wcmg_frontend', YITH_WCMG_URL . 'assets/js/frontend' . $suffix . '.js', array(
112
+ 'jquery',
113
+ 'yith-magnifier'
114
+ ), $this->version, true);
115
+ wp_enqueue_style('yith-magnifier', YITH_WCMG_URL . 'assets/css/yith_magnifier.css');
116
+
117
+ $css = file_exists(get_stylesheet_directory() . '/woocommerce/yith_magnifier.css') ? get_stylesheet_directory_uri() . '/woocommerce/yith_magnifier.css' : YITH_WCMG_URL . 'assets/css/frontend.css';
118
+ wp_enqueue_style('yith_wcmg_frontend', $css);
119
+ }
120
+ }
121
+
122
+
123
+ /**
124
+ * Add attributes to product variations
125
+ *
126
+ * @access public
127
+ * @return void
128
+ * @since 1.0.0
129
+ */
130
+ public function available_variation($data, $wc_prod, $variation) {
131
+
132
+ $attachment_id = get_post_thumbnail_id($variation->get_variation_id());
133
+ $attachment = wp_get_attachment_image_src($attachment_id, 'shop_magnifier');
134
+
135
+ $data['image_magnifier'] = $attachment ? current($attachment) : '';
136
+
137
+ return $data;
138
+ }
139
+
140
+ /**
141
+ * Detect if the featured video is enabled
142
+ */
143
+ public function is_video_featured_enabled() {
144
+ global $post;
145
+ if (!isset($post->ID)) {
146
+ return;
147
+ }
148
+
149
+ $featured_video = get_post_meta($post->ID, '_video_url', true);
150
+ if (!empty($featured_video)) {
151
+ return true;
152
+ } else {
153
+ return false;
154
+ }
155
+ }
156
+ }
 
157
  }
class.yith-wcmg.php CHANGED
@@ -22,7 +22,7 @@ if( !class_exists( 'YITH_WCMG' ) ) {
22
  * @var string
23
  * @since 1.0.0
24
  */
25
- public $version = '1.2.8';
26
 
27
  /**
28
  * Plugin object
22
  * @var string
23
  * @since 1.0.0
24
  */
25
+ public $version = '1.2.9';
26
 
27
  /**
28
  * Plugin object
functions.yith-wcmg.php CHANGED
@@ -7,58 +7,69 @@
7
  * @version 1.1.2
8
  */
9
 
10
- if ( !defined( 'YITH_WCMG' ) ) { exit; } // Exit if accessed directly
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
 
12
- if( !function_exists( 'yith_wcmg_is_enabled' ) ) {
13
- /**
14
- * Locate the templates and return the path of the file found
15
- *
16
- * @param string $path
17
- * @param array $var
18
- * @return void
19
- * @since 1.0.0
20
- */
21
- function yith_wcmg_is_enabled() {
22
- return get_option('yith_wcmg_enable_plugin') == 'yes';
23
  }
24
  }
25
 
26
- if( !function_exists( 'yit_shop_single_w' ) ) {
27
- /**
28
- * Return the shop_single image width
29
- *
30
- * @return integer
31
- * @since 1.0.0
32
- */
33
- function yit_shop_single_w() {
34
- global $woocommerce;
35
- $size = yit_get_image_size('shop_single');
36
- return $size['width'];
37
- }
 
38
  }
39
 
40
- if( !function_exists( 'yit_shop_thumbnail_w' ) ) {
41
- /**
42
- * Return the shop_thumbnail image width
43
- *
44
- * @return integer
45
- * @since 1.0.0
46
- */
47
- function yit_shop_thumbnail_w() {
48
- global $woocommerce;
49
- $size = yit_get_image_size('shop_thumbnail');
50
- return $size['width'];
51
- }
 
52
  }
53
 
54
  /* FIX TO WOOCOMMERCE 2.1 */
55
- if( !function_exists( 'yit_get_image_size' ) ){
56
- function yit_get_image_size( $size ){
57
- if( function_exists('wc_get_image_size')){
58
- return wc_get_image_size( $size );
59
- }else{
60
- global $woocommerce;
61
- return $woocommerce->get_image_size( $size );
62
- }
63
- }
 
64
  }
7
  * @version 1.1.2
8
  */
9
 
10
+ if ( ! defined( 'YITH_WCMG' ) ) {
11
+ exit;
12
+ } // Exit if accessed directly
13
+
14
+ if ( ! function_exists( 'yith_wcmg_is_enabled' ) ) {
15
+ /**
16
+ * Check if the plugin is enabled for the current context
17
+ *
18
+ * @param string $path
19
+ * @param array $var
20
+ *
21
+ * @return void
22
+ * @since 1.0.0
23
+ */
24
+ function yith_wcmg_is_enabled() {
25
+ if ( wp_is_mobile() ) {
26
+ return ( 'yes' == get_option( 'yith_wcmg_enable_mobile' ) );
27
+ }
28
+
29
+ return get_option( 'yith_wcmg_enable_plugin' ) == 'yes';
30
 
 
 
 
 
 
 
 
 
 
 
 
31
  }
32
  }
33
 
34
+ if ( ! function_exists( 'yit_shop_single_w' ) ) {
35
+ /**
36
+ * Return the shop_single image width
37
+ *
38
+ * @return integer
39
+ * @since 1.0.0
40
+ */
41
+ function yit_shop_single_w() {
42
+ global $woocommerce;
43
+ $size = yit_get_image_size( 'shop_single' );
44
+
45
+ return $size['width'];
46
+ }
47
  }
48
 
49
+ if ( ! function_exists( 'yit_shop_thumbnail_w' ) ) {
50
+ /**
51
+ * Return the shop_thumbnail image width
52
+ *
53
+ * @return integer
54
+ * @since 1.0.0
55
+ */
56
+ function yit_shop_thumbnail_w() {
57
+ global $woocommerce;
58
+ $size = yit_get_image_size( 'shop_thumbnail' );
59
+
60
+ return $size['width'];
61
+ }
62
  }
63
 
64
  /* FIX TO WOOCOMMERCE 2.1 */
65
+ if ( ! function_exists( 'yit_get_image_size' ) ) {
66
+ function yit_get_image_size( $size ) {
67
+ if ( function_exists( 'wc_get_image_size' ) ) {
68
+ return wc_get_image_size( $size );
69
+ } else {
70
+ global $woocommerce;
71
+
72
+ return $woocommerce->get_image_size( $size );
73
+ }
74
+ }
75
  }
init.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: YITH WooCommerce Zoom Magnifier
4
  * Plugin URI: http://yithemes.com/themes/plugins/yith-woocommerce-zoom-magnifier/
5
  * Description: YITH WooCommerce Zoom Magnifier enables you to add a zoom effect to product images and a thumbnail slider for the product image gallery.
6
- * Version: 1.2.8
7
  * Author: Yithemes
8
  * Author URI: http://yithemes.com/
9
  * Text Domain: ywzm
@@ -11,7 +11,7 @@
11
  *
12
  * @author Your Inspiration Themes
13
  * @package YITH WooCommerce Magnifier
14
- * @version 1.2.8
15
  */
16
  /* Copyright 2013-2015 Your Inspiration Themes (email : plugins@yithemes.com)
17
 
@@ -65,7 +65,7 @@ if ( ! defined( 'YITH_YWZM_FREE_INIT' ) ) {
65
  }
66
 
67
  if ( ! defined( 'YITH_YWZM_VERSION' ) ) {
68
- define( 'YITH_YWZM_VERSION', '1.2.8' );
69
  }
70
 
71
  if ( ! defined( 'YITH_YWZM_FILE' ) ) {
3
  * Plugin Name: YITH WooCommerce Zoom Magnifier
4
  * Plugin URI: http://yithemes.com/themes/plugins/yith-woocommerce-zoom-magnifier/
5
  * Description: YITH WooCommerce Zoom Magnifier enables you to add a zoom effect to product images and a thumbnail slider for the product image gallery.
6
+ * Version: 1.2.9
7
  * Author: Yithemes
8
  * Author URI: http://yithemes.com/
9
  * Text Domain: ywzm
11
  *
12
  * @author Your Inspiration Themes
13
  * @package YITH WooCommerce Magnifier
14
+ * @version 1.2.9
15
  */
16
  /* Copyright 2013-2015 Your Inspiration Themes (email : plugins@yithemes.com)
17
 
65
  }
66
 
67
  if ( ! defined( 'YITH_YWZM_VERSION' ) ) {
68
+ define( 'YITH_YWZM_VERSION', '1.2.9' );
69
  }
70
 
71
  if ( ! defined( 'YITH_YWZM_FILE' ) ) {
languages/ywzm-it_IT.mo CHANGED
Binary file
languages/ywzm-it_IT.po CHANGED
@@ -1,15 +1,15 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: YITH WooCommerce Zoom Magnifier\n"
4
- "POT-Creation-Date: 2015-07-23 15:49+0200\n"
5
- "PO-Revision-Date: 2015-07-23 15:49+0200\n"
6
  "Last-Translator: \n"
7
  "Language-Team: Your Inspiration Themes <plugins@yithemes.com>\n"
8
  "Language: it_IT\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "X-Generator: Poedit 1.8.3\n"
13
  "X-Poedit-Basepath: ..\n"
14
  "Plural-Forms: nplurals=2; plural=n!=1;\n"
15
  "X-Poedit-KeywordsList: __ ;_e;_n:1,2;__ngettext:1,2;__ngettext_noop:1,2;"
@@ -18,11 +18,11 @@ msgstr ""
18
  "X-Poedit-SearchPath-0: .\n"
19
  "X-Poedit-SearchPathExcluded-0: plugin-fw\n"
20
 
21
- #: class.yith-wcmg-admin.php:91
22
  msgid "Image Size"
23
  msgstr "Dimensioni Immagine"
24
 
25
- #: class.yith-wcmg-admin.php:92 plugin-options/general-options.php:17
26
  msgid "The size of the images used within the magnifier box"
27
  msgstr "La dimensione delle immagini utilizzata nel riquadro di zoom"
28
 
@@ -42,7 +42,7 @@ msgstr ""
42
  "Non è possibile attivare la versione gratuita di YITH WooCommerce Zoom "
43
  "Magnifier mentre si utilizza quella premium."
44
 
45
- #: lib/class.yith-ywzm-custom-types.php:179
46
  msgid "Do you want to hard crop the image?"
47
  msgstr "Vuoi ritagliare l'immagine?"
48
 
@@ -80,7 +80,7 @@ msgid "Premium version"
80
  msgstr "Versione premium"
81
 
82
  #: lib/class.yith-ywzm-plugin-fw-loader.php:237
83
- #: plugin-options/general-options.php:214
84
  msgid "YITH WooCommerce Zoom Magnifier"
85
  msgstr "YITH WooCommerce Zoom Magnifier"
86
 
@@ -103,22 +103,28 @@ msgid "General Settings"
103
  msgstr "Impostazioni generali"
104
 
105
  #: plugin-options/general-options.php:42
106
- msgid "Activate YITH Magnifier"
107
- msgstr "Attiva YITH Magnifier"
108
 
109
  #: plugin-options/general-options.php:43
110
  msgid "Activate the plugin or use the WooCommerce default product image."
111
  msgstr "Attiva il plugin o usa le immagini prodotto di default di WooCommerce."
112
 
113
  #: plugin-options/general-options.php:50
114
- msgid "Activate the plugin on mobile device"
115
- msgstr "Attiva il plugin su dispositivi mobili"
 
 
 
 
 
 
116
 
117
- #: plugin-options/general-options.php:57
118
  msgid "Forced Image Size"
119
  msgstr "Dimensioni Immagini Forzate"
120
 
121
- #: plugin-options/general-options.php:58
122
  msgid ""
123
  "If disabled, you will able to customize the sizes of the zoomed images. "
124
  "Disable it at your own risk; the magnifier could not properly work with "
@@ -128,100 +134,100 @@ msgstr ""
128
  "delle immagini zoomate. Disabilitare a proprio rischio: lo zoom potrebbe non "
129
  "funzionare correttamente con immagini sproporzionate."
130
 
131
- #: plugin-options/general-options.php:72
132
  msgid "Magnifier Settings"
133
  msgstr "Impostazioni Zoom"
134
 
135
- #: plugin-options/general-options.php:78
136
  msgid "Zoom Box Width"
137
  msgstr "Larghezza Riquadro Zoom"
138
 
139
- #: plugin-options/general-options.php:79
140
  msgid "The width of the magnifier box (default: auto)"
141
  msgstr "La larghezza del riquadro di zoom (default: auto)"
142
 
143
- #: plugin-options/general-options.php:86
144
  msgid "Zoom Box Height"
145
  msgstr "Altezza Riquadro Zoom"
146
 
147
- #: plugin-options/general-options.php:87
148
  msgid "The height of the magnifier box (default: auto)"
149
  msgstr "L'altezza del riquadro di zoom (default: auto)"
150
 
151
- #: plugin-options/general-options.php:95
152
  msgid "Zoom Box Position"
153
  msgstr "Posizione Riquadro Zoom"
154
 
155
- #: plugin-options/general-options.php:96
156
  msgid "The magnifier position"
157
  msgstr "Dove apparirà la finestra di zoom"
158
 
159
- #: plugin-options/general-options.php:102
160
  msgid "Right"
161
  msgstr "Destra"
162
 
163
- #: plugin-options/general-options.php:103
164
- #: plugin-options/general-options.php:115
165
  msgid "Inside"
166
  msgstr "Interno"
167
 
168
- #: plugin-options/general-options.php:107
169
  msgid "Zoom Box Position for mobile devices"
170
  msgstr "Posizione Riquadro Zoom su dispositivi mobili"
171
 
172
- #: plugin-options/general-options.php:108
173
  msgid "The magnifier position for the mobile devices (iPhone, Android, etc.)"
174
  msgstr ""
175
  "Dove apparirà la finestra di zoom sui dispositivi mobili (iPhone, Android, "
176
  "etc.)"
177
 
178
- #: plugin-options/general-options.php:114
179
  msgid "Default"
180
  msgstr "Default"
181
 
182
- #: plugin-options/general-options.php:116
183
  msgid "Disable"
184
  msgstr "Disattiva"
185
 
186
- #: plugin-options/general-options.php:120
187
  msgid "Loading label"
188
  msgstr "Etichetta di caricamento"
189
 
190
- #: plugin-options/general-options.php:123
191
- #: plugin-options/general-options.php:124
192
  msgid "Loading..."
193
  msgstr "Caricamento..."
194
 
195
- #: plugin-options/general-options.php:128
196
  msgid "Lens Opacity"
197
  msgstr "Opacità Lenti"
198
 
199
- #: plugin-options/general-options.php:139
200
  msgid "Blur"
201
  msgstr "Sfocatura"
202
 
203
- #: plugin-options/general-options.php:140
204
  msgid "Add a blur effect to the small image on mouse hover."
205
  msgstr ""
206
  "Aggiungi un effetto di sfocatura all'immagine piccola al passaggio del mouse."
207
 
208
- #: plugin-options/general-options.php:151
209
  msgid "Slider Settings"
210
  msgstr "Impostazioni Slider"
211
 
212
- #: plugin-options/general-options.php:157
213
  msgid "Activate Slider"
214
  msgstr "Attiva Slider"
215
 
216
- #: plugin-options/general-options.php:158
217
  msgid "Activate Thumbnail Slider."
218
  msgstr "Attiva lo slider con anteprime."
219
 
220
- #: plugin-options/general-options.php:165
221
  msgid "Activate Responsive Slider"
222
  msgstr "Attiva Slider Responsive"
223
 
224
- #: plugin-options/general-options.php:166
225
  msgid ""
226
  "This option fits the thumbnails within the available space. Disable it if "
227
  "you want to manage freely the thumbnails (eg. add margins, paddings, etc.)"
@@ -230,27 +236,27 @@ msgstr ""
230
  "vuoi gestire liberamente le anteprime (per esempio aggiungere margini, "
231
  "padding, ecc.)"
232
 
233
- #: plugin-options/general-options.php:173
234
  msgid "Items"
235
  msgstr "Elementi"
236
 
237
- #: plugin-options/general-options.php:174
238
  msgid "Number of items to show"
239
  msgstr "Numero di elementi da mostrare"
240
 
241
- #: plugin-options/general-options.php:184
242
  msgid "Circular carousel"
243
  msgstr "Carosello circolare"
244
 
245
- #: plugin-options/general-options.php:185
246
  msgid "It defines whether the carousel should be circular."
247
  msgstr "Imposta se il carosello deve essere circolare."
248
 
249
- #: plugin-options/general-options.php:192
250
  msgid "Infinite carousel"
251
  msgstr "Carosello infinito"
252
 
253
- #: plugin-options/general-options.php:193
254
  msgid ""
255
  "It defines whether the carousel should be infinite. Note: It is possible to "
256
  "create a non-circular, infinite carousel, but it is not possible to create a "
@@ -260,15 +266,15 @@ msgstr ""
260
  "un carosello infinito non circolare, ma non puoi creare un carosello "
261
  "circolare non infinito."
262
 
263
- #: plugin-options/general-options.php:211
264
  msgid "Upgrade to the PREMIUM VERSION"
265
  msgstr "Aggiorna alla VERSIONE PREMIUM"
266
 
267
- #: plugin-options/general-options.php:215
268
  msgid "Discover The Advanced Features"
269
  msgstr "Scopri le caratteristiche avanzate"
270
 
271
- #: plugin-options/general-options.php:216
272
  msgid ""
273
  "Upgrade to the PREMIUM VERSION of YITH WOOCOMMERCE ZOOM MAGNIFIER to benefit "
274
  "from all features!"
@@ -276,7 +282,7 @@ msgstr ""
276
  "Aggiorna alla VERSIONE PREMIUM di YITH WOOCOMMERCE ZOOM MAGNIFIER per "
277
  "usufruire di tutte le caratteristiche!"
278
 
279
- #: plugin-options/general-options.php:220
280
  msgid ""
281
  "See YITH WooCommerce Zoom Magnifier plugin with full premium features in "
282
  "action"
@@ -284,14 +290,14 @@ msgstr ""
284
  "Guarda il plugin YITH WooCommerce Zoom Magnifier con tutte le "
285
  "caratteristiche premium in azione"
286
 
287
- #: plugin-options/general-options.php:222
288
  msgid "Get Support and Pro Features"
289
  msgstr "Ottieni il supporto e le caratteristiche premium"
290
 
291
- #: plugin-options/general-options.php:223
292
  msgid ""
293
  "Purchasing the premium version of the plugin, you will take advantage of the "
294
- "advanced features of the product and you will get one year of free updates "
295
  "and support through our platform available 24h/24."
296
  msgstr ""
297
  "Acquistando la versione premium del plugin potrai usufruire delle "
@@ -299,66 +305,161 @@ msgstr ""
299
  "aggiornamenti gratuiti e di supporto attraverso la nostra piattaforma "
300
  "disponibile 24h/24."
301
 
302
- #: yit-common/yith-panel.php:424
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
303
  msgid "Select a date"
304
  msgstr "Scegli una data"
305
 
306
- #: yit-common/yith-panel.php:425
307
  msgid "Hours"
308
  msgstr "Ore"
309
 
310
- #: yit-common/yith-panel.php:426 yit-common/yith-panel.php:427
311
  msgid "Minutes"
312
  msgstr "Minuti"
313
 
314
- #: yit-common/yith-panel.php:435
315
  msgid "Upload"
316
  msgstr "Carica"
317
 
318
- #: yit-common/yith-panel.php:472
319
  msgid "px"
320
  msgstr "px"
321
 
322
- #: yit-common/yith-panel.php:474
323
  msgid "em"
324
  msgstr "em"
325
 
326
- #: yit-common/yith-panel.php:476
327
  msgid "pt"
328
  msgstr "pt"
329
 
330
- #: yit-common/yith-panel.php:478
331
  msgid "rem"
332
  msgstr "rem"
333
 
334
- #: yit-common/yith-panel.php:490
335
  msgid "Select a font family"
336
  msgstr "Scegli una famiglia di caratteri"
337
 
338
- #: yit-common/yith-panel.php:500
339
  msgid "Regular"
340
  msgstr "Normale"
341
 
342
- #: yit-common/yith-panel.php:502
343
  msgid "Bold"
344
  msgstr "Grassetto"
345
 
346
- #: yit-common/yith-panel.php:504
347
  msgid "Extra bold"
348
  msgstr "Grassetto extra"
349
 
350
- #: yit-common/yith-panel.php:506
351
  msgid "Italic"
352
  msgstr "Corsivo"
353
 
354
- #: yit-common/yith-panel.php:508
355
  msgid "Italic bold"
356
  msgstr "Corsivo E Grassetto"
357
 
358
- #: yit-common/yith-panel.php:524
359
  msgid "Click to preview"
360
  msgstr "Premi per visualizzare l'anteprima"
361
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
362
  #~ msgid "product"
363
  #~ msgstr "prodotto"
364
 
@@ -419,25 +520,3 @@ msgstr "Premi per visualizzare l'anteprima"
419
 
420
  #~ msgid "Left"
421
  #~ msgstr "Sinistra"
422
-
423
- #~ msgid "Activate YITH WooCommerce Zoom Magnifier"
424
- #~ msgstr "Attiva YITH WooCommerce Zoom Magnifier"
425
-
426
- #~ msgid "Activate on mobile device"
427
- #~ msgstr "Attiva su dispositivi mobili"
428
-
429
- #~ msgid ""
430
- #~ "Set if zoom and slider functionalities should be shown also on mobile "
431
- #~ "devices."
432
- #~ msgstr ""
433
- #~ "Decidi se mostrare lo zoom e lo slider anche sui dispositivi mobili."
434
-
435
- #~ msgid ""
436
- #~ "Purchasing the premium version of the plugin, you will take advantage of "
437
- #~ "the advanced features of the product, and you will get one year of free "
438
- #~ "updates and support through our platform available 24h/24."
439
- #~ msgstr ""
440
- #~ "Acquistando la versione premium del plugin potrai usufruire delle "
441
- #~ "caratteristiche avanzate del prodotto, oltre a ottenere un anno di "
442
- #~ "aggiornamenti gratuiti e di supporto attraverso la nostra piattaforma "
443
- #~ "disponibile 24h/24."
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: YITH WooCommerce Zoom Magnifier\n"
4
+ "POT-Creation-Date: 2015-09-02 15:20+0200\n"
5
+ "PO-Revision-Date: 2015-09-02 15:38+0200\n"
6
  "Last-Translator: \n"
7
  "Language-Team: Your Inspiration Themes <plugins@yithemes.com>\n"
8
  "Language: it_IT\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 1.8.4\n"
13
  "X-Poedit-Basepath: ..\n"
14
  "Plural-Forms: nplurals=2; plural=n!=1;\n"
15
  "X-Poedit-KeywordsList: __ ;_e;_n:1,2;__ngettext:1,2;__ngettext_noop:1,2;"
18
  "X-Poedit-SearchPath-0: .\n"
19
  "X-Poedit-SearchPathExcluded-0: plugin-fw\n"
20
 
21
+ #: class.yith-wcmg-admin.php:90
22
  msgid "Image Size"
23
  msgstr "Dimensioni Immagine"
24
 
25
+ #: class.yith-wcmg-admin.php:91 plugin-options/general-options.php:17
26
  msgid "The size of the images used within the magnifier box"
27
  msgstr "La dimensione delle immagini utilizzata nel riquadro di zoom"
28
 
42
  "Non è possibile attivare la versione gratuita di YITH WooCommerce Zoom "
43
  "Magnifier mentre si utilizza quella premium."
44
 
45
+ #: lib/class.yith-ywzm-custom-types.php:159
46
  msgid "Do you want to hard crop the image?"
47
  msgstr "Vuoi ritagliare l'immagine?"
48
 
80
  msgstr "Versione premium"
81
 
82
  #: lib/class.yith-ywzm-plugin-fw-loader.php:237
83
+ #: plugin-options/general-options.php:216
84
  msgid "YITH WooCommerce Zoom Magnifier"
85
  msgstr "YITH WooCommerce Zoom Magnifier"
86
 
103
  msgstr "Impostazioni generali"
104
 
105
  #: plugin-options/general-options.php:42
106
+ msgid "Activate YITH WooCommerce Zoom Magnifier"
107
+ msgstr "Attiva YITH WooCommerce Zoom Magnifier"
108
 
109
  #: plugin-options/general-options.php:43
110
  msgid "Activate the plugin or use the WooCommerce default product image."
111
  msgstr "Attiva il plugin o usa le immagini prodotto di default di WooCommerce."
112
 
113
  #: plugin-options/general-options.php:50
114
+ msgid "Activate on mobile device"
115
+ msgstr "Attiva su dispositivi mobili"
116
+
117
+ #: plugin-options/general-options.php:51
118
+ msgid ""
119
+ "Set if zoom and slider functionalities should be shown also on mobile "
120
+ "devices."
121
+ msgstr "Decidi se mostrare lo zoom e lo slider anche sui dispositivi mobili."
122
 
123
+ #: plugin-options/general-options.php:59
124
  msgid "Forced Image Size"
125
  msgstr "Dimensioni Immagini Forzate"
126
 
127
+ #: plugin-options/general-options.php:60
128
  msgid ""
129
  "If disabled, you will able to customize the sizes of the zoomed images. "
130
  "Disable it at your own risk; the magnifier could not properly work with "
134
  "delle immagini zoomate. Disabilitare a proprio rischio: lo zoom potrebbe non "
135
  "funzionare correttamente con immagini sproporzionate."
136
 
137
+ #: plugin-options/general-options.php:74
138
  msgid "Magnifier Settings"
139
  msgstr "Impostazioni Zoom"
140
 
141
+ #: plugin-options/general-options.php:80
142
  msgid "Zoom Box Width"
143
  msgstr "Larghezza Riquadro Zoom"
144
 
145
+ #: plugin-options/general-options.php:81
146
  msgid "The width of the magnifier box (default: auto)"
147
  msgstr "La larghezza del riquadro di zoom (default: auto)"
148
 
149
+ #: plugin-options/general-options.php:88
150
  msgid "Zoom Box Height"
151
  msgstr "Altezza Riquadro Zoom"
152
 
153
+ #: plugin-options/general-options.php:89
154
  msgid "The height of the magnifier box (default: auto)"
155
  msgstr "L'altezza del riquadro di zoom (default: auto)"
156
 
157
+ #: plugin-options/general-options.php:97
158
  msgid "Zoom Box Position"
159
  msgstr "Posizione Riquadro Zoom"
160
 
161
+ #: plugin-options/general-options.php:98
162
  msgid "The magnifier position"
163
  msgstr "Dove apparirà la finestra di zoom"
164
 
165
+ #: plugin-options/general-options.php:104
166
  msgid "Right"
167
  msgstr "Destra"
168
 
169
+ #: plugin-options/general-options.php:105
170
+ #: plugin-options/general-options.php:117
171
  msgid "Inside"
172
  msgstr "Interno"
173
 
174
+ #: plugin-options/general-options.php:109
175
  msgid "Zoom Box Position for mobile devices"
176
  msgstr "Posizione Riquadro Zoom su dispositivi mobili"
177
 
178
+ #: plugin-options/general-options.php:110
179
  msgid "The magnifier position for the mobile devices (iPhone, Android, etc.)"
180
  msgstr ""
181
  "Dove apparirà la finestra di zoom sui dispositivi mobili (iPhone, Android, "
182
  "etc.)"
183
 
184
+ #: plugin-options/general-options.php:116
185
  msgid "Default"
186
  msgstr "Default"
187
 
188
+ #: plugin-options/general-options.php:118
189
  msgid "Disable"
190
  msgstr "Disattiva"
191
 
192
+ #: plugin-options/general-options.php:122
193
  msgid "Loading label"
194
  msgstr "Etichetta di caricamento"
195
 
196
+ #: plugin-options/general-options.php:125
197
+ #: plugin-options/general-options.php:126
198
  msgid "Loading..."
199
  msgstr "Caricamento..."
200
 
201
+ #: plugin-options/general-options.php:130
202
  msgid "Lens Opacity"
203
  msgstr "Opacità Lenti"
204
 
205
+ #: plugin-options/general-options.php:141
206
  msgid "Blur"
207
  msgstr "Sfocatura"
208
 
209
+ #: plugin-options/general-options.php:142
210
  msgid "Add a blur effect to the small image on mouse hover."
211
  msgstr ""
212
  "Aggiungi un effetto di sfocatura all'immagine piccola al passaggio del mouse."
213
 
214
+ #: plugin-options/general-options.php:153
215
  msgid "Slider Settings"
216
  msgstr "Impostazioni Slider"
217
 
218
+ #: plugin-options/general-options.php:159
219
  msgid "Activate Slider"
220
  msgstr "Attiva Slider"
221
 
222
+ #: plugin-options/general-options.php:160
223
  msgid "Activate Thumbnail Slider."
224
  msgstr "Attiva lo slider con anteprime."
225
 
226
+ #: plugin-options/general-options.php:167
227
  msgid "Activate Responsive Slider"
228
  msgstr "Attiva Slider Responsive"
229
 
230
+ #: plugin-options/general-options.php:168
231
  msgid ""
232
  "This option fits the thumbnails within the available space. Disable it if "
233
  "you want to manage freely the thumbnails (eg. add margins, paddings, etc.)"
236
  "vuoi gestire liberamente le anteprime (per esempio aggiungere margini, "
237
  "padding, ecc.)"
238
 
239
+ #: plugin-options/general-options.php:175
240
  msgid "Items"
241
  msgstr "Elementi"
242
 
243
+ #: plugin-options/general-options.php:176
244
  msgid "Number of items to show"
245
  msgstr "Numero di elementi da mostrare"
246
 
247
+ #: plugin-options/general-options.php:186
248
  msgid "Circular carousel"
249
  msgstr "Carosello circolare"
250
 
251
+ #: plugin-options/general-options.php:187
252
  msgid "It defines whether the carousel should be circular."
253
  msgstr "Imposta se il carosello deve essere circolare."
254
 
255
+ #: plugin-options/general-options.php:194
256
  msgid "Infinite carousel"
257
  msgstr "Carosello infinito"
258
 
259
+ #: plugin-options/general-options.php:195
260
  msgid ""
261
  "It defines whether the carousel should be infinite. Note: It is possible to "
262
  "create a non-circular, infinite carousel, but it is not possible to create a "
266
  "un carosello infinito non circolare, ma non puoi creare un carosello "
267
  "circolare non infinito."
268
 
269
+ #: plugin-options/general-options.php:213
270
  msgid "Upgrade to the PREMIUM VERSION"
271
  msgstr "Aggiorna alla VERSIONE PREMIUM"
272
 
273
+ #: plugin-options/general-options.php:217
274
  msgid "Discover The Advanced Features"
275
  msgstr "Scopri le caratteristiche avanzate"
276
 
277
+ #: plugin-options/general-options.php:218
278
  msgid ""
279
  "Upgrade to the PREMIUM VERSION of YITH WOOCOMMERCE ZOOM MAGNIFIER to benefit "
280
  "from all features!"
282
  "Aggiorna alla VERSIONE PREMIUM di YITH WOOCOMMERCE ZOOM MAGNIFIER per "
283
  "usufruire di tutte le caratteristiche!"
284
 
285
+ #: plugin-options/general-options.php:222
286
  msgid ""
287
  "See YITH WooCommerce Zoom Magnifier plugin with full premium features in "
288
  "action"
290
  "Guarda il plugin YITH WooCommerce Zoom Magnifier con tutte le "
291
  "caratteristiche premium in azione"
292
 
293
+ #: plugin-options/general-options.php:224
294
  msgid "Get Support and Pro Features"
295
  msgstr "Ottieni il supporto e le caratteristiche premium"
296
 
297
+ #: plugin-options/general-options.php:225
298
  msgid ""
299
  "Purchasing the premium version of the plugin, you will take advantage of the "
300
+ "advanced features of the product, and you will get one year of free updates "
301
  "and support through our platform available 24h/24."
302
  msgstr ""
303
  "Acquistando la versione premium del plugin potrai usufruire delle "
305
  "aggiornamenti gratuiti e di supporto attraverso la nostra piattaforma "
306
  "disponibile 24h/24."
307
 
308
+ #: templates/admin/premium.php:193
309
+ #, php-format
310
+ msgid ""
311
+ "Upgrade to the %1$s premium version %2$s of %1$s YITH WooCommerce Zoom "
312
+ "Magnifier %2$s to benefit from all features!"
313
+ msgstr ""
314
+ "Aggiorna alla %1$s versione premium %2$s di %1$s YITH WooCommerce Zoom "
315
+ "Magnifier %2$s per usufruire di tutte le funzionalità!"
316
+
317
+ #: templates/admin/premium.php:196
318
+ #, php-format
319
+ msgid "%1$sUPGRADE%2$s%3$sto the premium version%2$s"
320
+ msgstr "%1$sAGGIORNA%2$s%3$salla versione premium%2$s "
321
+
322
+ #: templates/admin/premium.php:202
323
+ #, php-format
324
+ msgid "%1$sPremium Features%2$s"
325
+ msgstr "%1$sFunzionalità premium%2$s"
326
+
327
+ #: templates/admin/premium.php:210
328
+ msgid "ZOOM BOX POSITION"
329
+ msgstr "POSIZIONE RIQUADRO ZOOM"
330
+
331
+ #: templates/admin/premium.php:213
332
+ #, php-format
333
+ msgid ""
334
+ "Choose where you want to show the %1$szoomed version%2$s of the image of "
335
+ "your products. Place it above or below the original image, on its left or "
336
+ "its right, or you can even place it over it.$2$s"
337
+ msgstr ""
338
+ "Scegli dove far apparire la %1$sversione ingrandita%2$s dell’immagine dei "
339
+ "tuoi prodotti. Posizionala in alto o in basso rispetto all’immagine "
340
+ "originale, alla sua destra o alla sua sinistra, o fa’ sì che si sovrapponga "
341
+ "ad essa.$2$s"
342
+
343
+ #: templates/admin/premium.php:223
344
+ msgid "ENLARGE THE IMAGES"
345
+ msgstr "ESPANDI L’IMMAGINE"
346
+
347
+ #: templates/admin/premium.php:225
348
+ msgid ""
349
+ "Just one click and the product image will appear in a bigger size in a modal "
350
+ "window. A further chance to let users analyze in a better way what you sell."
351
+ msgstr ""
352
+ "Un clic e l’immagine del prodotto apparirà a dimensioni maggiori e "
353
+ "all’interno di una finestra modale. Una possibilità in più per mettere "
354
+ "l’utente nelle condizioni di valutare al meglio ciò che vede."
355
+
356
+ #: templates/admin/premium.php:240
357
+ msgid "EXCLUDE PRODUCTS"
358
+ msgstr "ESCLUSIONE PRODOTTI"
359
+
360
+ #: templates/admin/premium.php:242
361
+ msgid ""
362
+ "Tailored options to limit the plugin features only to certain products. Some "
363
+ "of these could have too small images to be zoomed, or maybe being part of "
364
+ "categories that do not imply zoomed images. Select the products and the "
365
+ "categories to exclude and delete all your problems"
366
+ msgstr ""
367
+ "Opzioni su misura per limitare le funzionalità del plugin solo a determinati "
368
+ "prodotti. Alcuni di questi possono avere immagini troppo piccole per essere "
369
+ "zoomate o appartenere a categorie in cui lo zoom immagine non è necessario. "
370
+ "Seleziona i prodotti e le categorie da escludere e risolvi questo tipo di "
371
+ "problemi."
372
+
373
+ #: templates/admin/premium.php:251
374
+ #, php-format
375
+ msgid ""
376
+ "Upgrade to the %1$spremium version%2$s of %1$sYITH WooCommerce Zoom Magnifier"
377
+ "%2$s to benefit from all features!"
378
+ msgstr ""
379
+ "Aggiorna alla %1$sversione premium%2$s di %1$s YITH WooCommerce Zoom "
380
+ "Magnifier %2$s per usufruire di tutte le funzionalità!"
381
+
382
+ #: templates/admin/premium.php:254
383
+ #, php-format
384
+ msgid "%1$sUPGRADE%2$s %3$sto the premium version%2$s"
385
+ msgstr "%1$sAGGIORNA%2$s %3$salla versione premium%2$s "
386
+
387
+ #: yit-common/yith-panel.php:418
388
  msgid "Select a date"
389
  msgstr "Scegli una data"
390
 
391
+ #: yit-common/yith-panel.php:419
392
  msgid "Hours"
393
  msgstr "Ore"
394
 
395
+ #: yit-common/yith-panel.php:420 yit-common/yith-panel.php:421
396
  msgid "Minutes"
397
  msgstr "Minuti"
398
 
399
+ #: yit-common/yith-panel.php:429
400
  msgid "Upload"
401
  msgstr "Carica"
402
 
403
+ #: yit-common/yith-panel.php:466
404
  msgid "px"
405
  msgstr "px"
406
 
407
+ #: yit-common/yith-panel.php:468
408
  msgid "em"
409
  msgstr "em"
410
 
411
+ #: yit-common/yith-panel.php:470
412
  msgid "pt"
413
  msgstr "pt"
414
 
415
+ #: yit-common/yith-panel.php:472
416
  msgid "rem"
417
  msgstr "rem"
418
 
419
+ #: yit-common/yith-panel.php:484
420
  msgid "Select a font family"
421
  msgstr "Scegli una famiglia di caratteri"
422
 
423
+ #: yit-common/yith-panel.php:494
424
  msgid "Regular"
425
  msgstr "Normale"
426
 
427
+ #: yit-common/yith-panel.php:496
428
  msgid "Bold"
429
  msgstr "Grassetto"
430
 
431
+ #: yit-common/yith-panel.php:498
432
  msgid "Extra bold"
433
  msgstr "Grassetto extra"
434
 
435
+ #: yit-common/yith-panel.php:500
436
  msgid "Italic"
437
  msgstr "Corsivo"
438
 
439
+ #: yit-common/yith-panel.php:502
440
  msgid "Italic bold"
441
  msgstr "Corsivo E Grassetto"
442
 
443
+ #: yit-common/yith-panel.php:518
444
  msgid "Click to preview"
445
  msgstr "Premi per visualizzare l'anteprima"
446
 
447
+ #~ msgid "Activate YITH Magnifier"
448
+ #~ msgstr "Attiva YITH Magnifier"
449
+
450
+ #~ msgid "Activate the plugin on mobile device"
451
+ #~ msgstr "Attiva il plugin su dispositivi mobili"
452
+
453
+ #~ msgid ""
454
+ #~ "Purchasing the premium version of the plugin, you will take advantage of "
455
+ #~ "the advanced features of the product and you will get one year of free "
456
+ #~ "updates and support through our platform available 24h/24."
457
+ #~ msgstr ""
458
+ #~ "Acquistando la versione premium del plugin potrai usufruire delle "
459
+ #~ "caratteristiche avanzate del prodotto, oltre a ottenere un anno di "
460
+ #~ "aggiornamenti gratuiti e di supporto attraverso la nostra piattaforma "
461
+ #~ "disponibile 24h/24."
462
+
463
  #~ msgid "product"
464
  #~ msgstr "prodotto"
465
 
520
 
521
  #~ msgid "Left"
522
  #~ msgstr "Sinistra"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
languages/ywzm.pot CHANGED
@@ -2,7 +2,7 @@
2
  msgid ""
3
  msgstr ""
4
  "Project-Id-Version: YITH WooCommerce Order Tracking\n"
5
- "POT-Creation-Date: 2015-05-22 12:47+0100\n"
6
  "PO-Revision-Date: 2015-04-22 12:25+0100\n"
7
  "Last-Translator: \n"
8
  "Language-Team: Your Inspiration Themes <plugins@yithemes.com>\n"
@@ -10,7 +10,7 @@ msgstr ""
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
12
  "Content-Transfer-Encoding: 8bit\n"
13
- "X-Generator: Poedit 1.8\n"
14
  "X-Poedit-Basepath: ..\\\n"
15
  "Plural-Forms: nplurals=2; plural=n!=1;\n"
16
  "X-Poedit-KeywordsList: __ ;_e;_n:1,2;__ngettext:1,2;__ngettext_noop:1,2;"
@@ -19,18 +19,18 @@ msgstr ""
19
  "X-Poedit-SearchPath-0: .\n"
20
  "X-Poedit-SearchPathExcluded-0: plugin-fw\n"
21
 
22
- #: class.yith-wcmg-admin.php:91
23
  msgid "Image Size"
24
  msgstr ""
25
 
26
- #: class.yith-wcmg-admin.php:92 plugin-options/general-options.php:17
27
  msgid "The size of the images used within the magnifier box"
28
  msgstr ""
29
 
30
  #: init.php:43
31
  msgid ""
32
  "YITH WooCommerce Zoom Magnifier is enabled but not effective. It requires "
33
- "Woocommerce in order to work."
34
  msgstr ""
35
 
36
  #: init.php:52
@@ -39,7 +39,7 @@ msgid ""
39
  "you are using the premium one."
40
  msgstr ""
41
 
42
- #: lib/class.yith-ywzm-custom-types.php:179
43
  msgid "Do you want to hard crop the image?"
44
  msgstr ""
45
 
@@ -75,7 +75,7 @@ msgid "Premium version"
75
  msgstr ""
76
 
77
  #: lib/class.yith-ywzm-plugin-fw-loader.php:237
78
- #: plugin-options/general-options.php:214
79
  msgid "YITH WooCommerce Zoom Magnifier"
80
  msgstr ""
81
 
@@ -95,7 +95,7 @@ msgid "General Settings"
95
  msgstr ""
96
 
97
  #: plugin-options/general-options.php:42
98
- msgid "Activate YITH Magnifier"
99
  msgstr ""
100
 
101
  #: plugin-options/general-options.php:43
@@ -103,230 +103,236 @@ msgid "Activate the plugin or use the WooCommerce default product image."
103
  msgstr ""
104
 
105
  #: plugin-options/general-options.php:50
106
- msgid "Activate the plugin on mobile device"
 
 
 
 
 
 
107
  msgstr ""
108
 
109
- #: plugin-options/general-options.php:57
110
  msgid "Forced Image Size"
111
  msgstr ""
112
 
113
- #: plugin-options/general-options.php:58
114
  msgid ""
115
  "If disabled, you will able to customize the sizes of the zoomed images. "
116
  "Disable it at your own risk; the magnifier could not properly work with "
117
  "images out of proportion."
118
  msgstr ""
119
 
120
- #: plugin-options/general-options.php:72
121
  msgid "Magnifier Settings"
122
  msgstr ""
123
 
124
- #: plugin-options/general-options.php:78
125
  msgid "Zoom Box Width"
126
  msgstr ""
127
 
128
- #: plugin-options/general-options.php:79
129
  msgid "The width of the magnifier box (default: auto)"
130
  msgstr ""
131
 
132
- #: plugin-options/general-options.php:86
133
  msgid "Zoom Box Height"
134
  msgstr ""
135
 
136
- #: plugin-options/general-options.php:87
137
  msgid "The height of the magnifier box (default: auto)"
138
  msgstr ""
139
 
140
- #: plugin-options/general-options.php:95
141
  msgid "Zoom Box Position"
142
  msgstr ""
143
 
144
- #: plugin-options/general-options.php:96
145
  msgid "The magnifier position"
146
  msgstr ""
147
 
148
- #: plugin-options/general-options.php:102
149
  msgid "Right"
150
  msgstr ""
151
 
152
- #: plugin-options/general-options.php:103
153
- #: plugin-options/general-options.php:115
154
  msgid "Inside"
155
  msgstr ""
156
 
157
- #: plugin-options/general-options.php:107
158
  msgid "Zoom Box Position for mobile devices"
159
  msgstr ""
160
 
161
- #: plugin-options/general-options.php:108
162
  msgid "The magnifier position for the mobile devices (iPhone, Android, etc.)"
163
  msgstr ""
164
 
165
- #: plugin-options/general-options.php:114
166
  msgid "Default"
167
  msgstr ""
168
 
169
- #: plugin-options/general-options.php:116
170
  msgid "Disable"
171
  msgstr ""
172
 
173
- #: plugin-options/general-options.php:120
174
  msgid "Loading label"
175
  msgstr ""
176
 
177
- #: plugin-options/general-options.php:123
178
- #: plugin-options/general-options.php:124
179
  msgid "Loading..."
180
  msgstr ""
181
 
182
- #: plugin-options/general-options.php:128
183
  msgid "Lens Opacity"
184
  msgstr ""
185
 
186
- #: plugin-options/general-options.php:139
187
  msgid "Blur"
188
  msgstr ""
189
 
190
- #: plugin-options/general-options.php:140
191
  msgid "Add a blur effect to the small image on mouse hover."
192
  msgstr ""
193
 
194
- #: plugin-options/general-options.php:151
195
  msgid "Slider Settings"
196
  msgstr ""
197
 
198
- #: plugin-options/general-options.php:157
199
  msgid "Activate Slider"
200
  msgstr ""
201
 
202
- #: plugin-options/general-options.php:158
203
  msgid "Activate Thumbnail Slider."
204
  msgstr ""
205
 
206
- #: plugin-options/general-options.php:165
207
  msgid "Activate Responsive Slider"
208
  msgstr ""
209
 
210
- #: plugin-options/general-options.php:166
211
  msgid ""
212
  "This option fits the thumbnails within the available space. Disable it if "
213
  "you want to manage freely the thumbnails (eg. add margins, paddings, etc.)"
214
  msgstr ""
215
 
216
- #: plugin-options/general-options.php:173
217
  msgid "Items"
218
  msgstr ""
219
 
220
- #: plugin-options/general-options.php:174
221
  msgid "Number of items to show"
222
  msgstr ""
223
 
224
- #: plugin-options/general-options.php:184
225
  msgid "Circular carousel"
226
  msgstr ""
227
 
228
- #: plugin-options/general-options.php:185
229
  msgid "It defines whether the carousel should be circular."
230
  msgstr ""
231
 
232
- #: plugin-options/general-options.php:192
233
  msgid "Infinite carousel"
234
  msgstr ""
235
 
236
- #: plugin-options/general-options.php:193
237
  msgid ""
238
  "It defines whether the carousel should be infinite. Note: It is possible to "
239
  "create a non-circular, infinite carousel, but it is not possible to create a "
240
  "circular, non-infinite carousel."
241
  msgstr ""
242
 
243
- #: plugin-options/general-options.php:211
244
  msgid "Upgrade to the PREMIUM VERSION"
245
  msgstr ""
246
 
247
- #: plugin-options/general-options.php:215
248
  msgid "Discover The Advanced Features"
249
  msgstr ""
250
 
251
- #: plugin-options/general-options.php:216
252
  msgid ""
253
  "Upgrade to the PREMIUM VERSION of YITH WOOCOMMERCE ZOOM MAGNIFIER to benefit "
254
  "from all features!"
255
  msgstr ""
256
 
257
- #: plugin-options/general-options.php:220
258
  msgid ""
259
  "See YITH WooCommerce Zoom Magnifier plugin with full premium features in "
260
  "action"
261
  msgstr ""
262
 
263
- #: plugin-options/general-options.php:222
264
  msgid "Get Support and Pro Features"
265
  msgstr ""
266
 
267
- #: plugin-options/general-options.php:223
268
  msgid ""
269
  "Purchasing the premium version of the plugin, you will take advantage of the "
270
- "advanced features of the product and you will get one year of free updates "
271
  "and support through our platform available 24h/24."
272
  msgstr ""
273
 
274
- #: yit-common/yith-panel.php:424
275
  msgid "Select a date"
276
  msgstr ""
277
 
278
- #: yit-common/yith-panel.php:425
279
  msgid "Hours"
280
  msgstr ""
281
 
282
- #: yit-common/yith-panel.php:426 yit-common/yith-panel.php:427
283
  msgid "Minutes"
284
  msgstr ""
285
 
286
- #: yit-common/yith-panel.php:435
287
  msgid "Upload"
288
  msgstr ""
289
 
290
- #: yit-common/yith-panel.php:472
291
  msgid "px"
292
  msgstr ""
293
 
294
- #: yit-common/yith-panel.php:474
295
  msgid "em"
296
  msgstr ""
297
 
298
- #: yit-common/yith-panel.php:476
299
  msgid "pt"
300
  msgstr ""
301
 
302
- #: yit-common/yith-panel.php:478
303
  msgid "rem"
304
  msgstr ""
305
 
306
- #: yit-common/yith-panel.php:490
307
  msgid "Select a font family"
308
  msgstr ""
309
 
310
- #: yit-common/yith-panel.php:500
311
  msgid "Regular"
312
  msgstr ""
313
 
314
- #: yit-common/yith-panel.php:502
315
  msgid "Bold"
316
  msgstr ""
317
 
318
- #: yit-common/yith-panel.php:504
319
  msgid "Extra bold"
320
  msgstr ""
321
 
322
- #: yit-common/yith-panel.php:506
323
  msgid "Italic"
324
  msgstr ""
325
 
326
- #: yit-common/yith-panel.php:508
327
  msgid "Italic bold"
328
  msgstr ""
329
 
330
- #: yit-common/yith-panel.php:524
331
  msgid "Click to preview"
332
  msgstr ""
2
  msgid ""
3
  msgstr ""
4
  "Project-Id-Version: YITH WooCommerce Order Tracking\n"
5
+ "POT-Creation-Date: 2015-09-01 14:07+0100\n"
6
  "PO-Revision-Date: 2015-04-22 12:25+0100\n"
7
  "Last-Translator: \n"
8
  "Language-Team: Your Inspiration Themes <plugins@yithemes.com>\n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
12
  "Content-Transfer-Encoding: 8bit\n"
13
+ "X-Generator: Poedit 1.8.1\n"
14
  "X-Poedit-Basepath: ..\\\n"
15
  "Plural-Forms: nplurals=2; plural=n!=1;\n"
16
  "X-Poedit-KeywordsList: __ ;_e;_n:1,2;__ngettext:1,2;__ngettext_noop:1,2;"
19
  "X-Poedit-SearchPath-0: .\n"
20
  "X-Poedit-SearchPathExcluded-0: plugin-fw\n"
21
 
22
+ #: class.yith-wcmg-admin.php:90
23
  msgid "Image Size"
24
  msgstr ""
25
 
26
+ #: class.yith-wcmg-admin.php:91 plugin-options/general-options.php:17
27
  msgid "The size of the images used within the magnifier box"
28
  msgstr ""
29
 
30
  #: init.php:43
31
  msgid ""
32
  "YITH WooCommerce Zoom Magnifier is enabled but not effective. It requires "
33
+ "WooCommerce in order to work."
34
  msgstr ""
35
 
36
  #: init.php:52
39
  "you are using the premium one."
40
  msgstr ""
41
 
42
+ #: lib/class.yith-ywzm-custom-types.php:159
43
  msgid "Do you want to hard crop the image?"
44
  msgstr ""
45
 
75
  msgstr ""
76
 
77
  #: lib/class.yith-ywzm-plugin-fw-loader.php:237
78
+ #: plugin-options/general-options.php:216
79
  msgid "YITH WooCommerce Zoom Magnifier"
80
  msgstr ""
81
 
95
  msgstr ""
96
 
97
  #: plugin-options/general-options.php:42
98
+ msgid "Activate YITH WooCommerce Zoom Magnifier"
99
  msgstr ""
100
 
101
  #: plugin-options/general-options.php:43
103
  msgstr ""
104
 
105
  #: plugin-options/general-options.php:50
106
+ msgid "Activate on mobile device"
107
+ msgstr ""
108
+
109
+ #: plugin-options/general-options.php:51
110
+ msgid ""
111
+ "Set if zoom and slider functionalities should be shown also on mobile "
112
+ "devices."
113
  msgstr ""
114
 
115
+ #: plugin-options/general-options.php:59
116
  msgid "Forced Image Size"
117
  msgstr ""
118
 
119
+ #: plugin-options/general-options.php:60
120
  msgid ""
121
  "If disabled, you will able to customize the sizes of the zoomed images. "
122
  "Disable it at your own risk; the magnifier could not properly work with "
123
  "images out of proportion."
124
  msgstr ""
125
 
126
+ #: plugin-options/general-options.php:74
127
  msgid "Magnifier Settings"
128
  msgstr ""
129
 
130
+ #: plugin-options/general-options.php:80
131
  msgid "Zoom Box Width"
132
  msgstr ""
133
 
134
+ #: plugin-options/general-options.php:81
135
  msgid "The width of the magnifier box (default: auto)"
136
  msgstr ""
137
 
138
+ #: plugin-options/general-options.php:88
139
  msgid "Zoom Box Height"
140
  msgstr ""
141
 
142
+ #: plugin-options/general-options.php:89
143
  msgid "The height of the magnifier box (default: auto)"
144
  msgstr ""
145
 
146
+ #: plugin-options/general-options.php:97
147
  msgid "Zoom Box Position"
148
  msgstr ""
149
 
150
+ #: plugin-options/general-options.php:98
151
  msgid "The magnifier position"
152
  msgstr ""
153
 
154
+ #: plugin-options/general-options.php:104
155
  msgid "Right"
156
  msgstr ""
157
 
158
+ #: plugin-options/general-options.php:105
159
+ #: plugin-options/general-options.php:117
160
  msgid "Inside"
161
  msgstr ""
162
 
163
+ #: plugin-options/general-options.php:109
164
  msgid "Zoom Box Position for mobile devices"
165
  msgstr ""
166
 
167
+ #: plugin-options/general-options.php:110
168
  msgid "The magnifier position for the mobile devices (iPhone, Android, etc.)"
169
  msgstr ""
170
 
171
+ #: plugin-options/general-options.php:116
172
  msgid "Default"
173
  msgstr ""
174
 
175
+ #: plugin-options/general-options.php:118
176
  msgid "Disable"
177
  msgstr ""
178
 
179
+ #: plugin-options/general-options.php:122
180
  msgid "Loading label"
181
  msgstr ""
182
 
183
+ #: plugin-options/general-options.php:125
184
+ #: plugin-options/general-options.php:126
185
  msgid "Loading..."
186
  msgstr ""
187
 
188
+ #: plugin-options/general-options.php:130
189
  msgid "Lens Opacity"
190
  msgstr ""
191
 
192
+ #: plugin-options/general-options.php:141
193
  msgid "Blur"
194
  msgstr ""
195
 
196
+ #: plugin-options/general-options.php:142
197
  msgid "Add a blur effect to the small image on mouse hover."
198
  msgstr ""
199
 
200
+ #: plugin-options/general-options.php:153
201
  msgid "Slider Settings"
202
  msgstr ""
203
 
204
+ #: plugin-options/general-options.php:159
205
  msgid "Activate Slider"
206
  msgstr ""
207
 
208
+ #: plugin-options/general-options.php:160
209
  msgid "Activate Thumbnail Slider."
210
  msgstr ""
211
 
212
+ #: plugin-options/general-options.php:167
213
  msgid "Activate Responsive Slider"
214
  msgstr ""
215
 
216
+ #: plugin-options/general-options.php:168
217
  msgid ""
218
  "This option fits the thumbnails within the available space. Disable it if "
219
  "you want to manage freely the thumbnails (eg. add margins, paddings, etc.)"
220
  msgstr ""
221
 
222
+ #: plugin-options/general-options.php:175
223
  msgid "Items"
224
  msgstr ""
225
 
226
+ #: plugin-options/general-options.php:176
227
  msgid "Number of items to show"
228
  msgstr ""
229
 
230
+ #: plugin-options/general-options.php:186
231
  msgid "Circular carousel"
232
  msgstr ""
233
 
234
+ #: plugin-options/general-options.php:187
235
  msgid "It defines whether the carousel should be circular."
236
  msgstr ""
237
 
238
+ #: plugin-options/general-options.php:194
239
  msgid "Infinite carousel"
240
  msgstr ""
241
 
242
+ #: plugin-options/general-options.php:195
243
  msgid ""
244
  "It defines whether the carousel should be infinite. Note: It is possible to "
245
  "create a non-circular, infinite carousel, but it is not possible to create a "
246
  "circular, non-infinite carousel."
247
  msgstr ""
248
 
249
+ #: plugin-options/general-options.php:213
250
  msgid "Upgrade to the PREMIUM VERSION"
251
  msgstr ""
252
 
253
+ #: plugin-options/general-options.php:217
254
  msgid "Discover The Advanced Features"
255
  msgstr ""
256
 
257
+ #: plugin-options/general-options.php:218
258
  msgid ""
259
  "Upgrade to the PREMIUM VERSION of YITH WOOCOMMERCE ZOOM MAGNIFIER to benefit "
260
  "from all features!"
261
  msgstr ""
262
 
263
+ #: plugin-options/general-options.php:222
264
  msgid ""
265
  "See YITH WooCommerce Zoom Magnifier plugin with full premium features in "
266
  "action"
267
  msgstr ""
268
 
269
+ #: plugin-options/general-options.php:224
270
  msgid "Get Support and Pro Features"
271
  msgstr ""
272
 
273
+ #: plugin-options/general-options.php:225
274
  msgid ""
275
  "Purchasing the premium version of the plugin, you will take advantage of the "
276
+ "advanced features of the product, and you will get one year of free updates "
277
  "and support through our platform available 24h/24."
278
  msgstr ""
279
 
280
+ #: yit-common/yith-panel.php:418
281
  msgid "Select a date"
282
  msgstr ""
283
 
284
+ #: yit-common/yith-panel.php:419
285
  msgid "Hours"
286
  msgstr ""
287
 
288
+ #: yit-common/yith-panel.php:420 yit-common/yith-panel.php:421
289
  msgid "Minutes"
290
  msgstr ""
291
 
292
+ #: yit-common/yith-panel.php:429
293
  msgid "Upload"
294
  msgstr ""
295
 
296
+ #: yit-common/yith-panel.php:466
297
  msgid "px"
298
  msgstr ""
299
 
300
+ #: yit-common/yith-panel.php:468
301
  msgid "em"
302
  msgstr ""
303
 
304
+ #: yit-common/yith-panel.php:470
305
  msgid "pt"
306
  msgstr ""
307
 
308
+ #: yit-common/yith-panel.php:472
309
  msgid "rem"
310
  msgstr ""
311
 
312
+ #: yit-common/yith-panel.php:484
313
  msgid "Select a font family"
314
  msgstr ""
315
 
316
+ #: yit-common/yith-panel.php:494
317
  msgid "Regular"
318
  msgstr ""
319
 
320
+ #: yit-common/yith-panel.php:496
321
  msgid "Bold"
322
  msgstr ""
323
 
324
+ #: yit-common/yith-panel.php:498
325
  msgid "Extra bold"
326
  msgstr ""
327
 
328
+ #: yit-common/yith-panel.php:500
329
  msgid "Italic"
330
  msgstr ""
331
 
332
+ #: yit-common/yith-panel.php:502
333
  msgid "Italic bold"
334
  msgstr ""
335
 
336
+ #: yit-common/yith-panel.php:518
337
  msgid "Click to preview"
338
  msgstr ""
lib/class.yith-woocommerce-zoom-magnifier.php CHANGED
@@ -25,7 +25,7 @@ if ( ! class_exists( 'YITH_WooCommerce_Zoom_Magnifier' ) ) {
25
  * @var string
26
  * @since 1.0.0
27
  */
28
- public $version = '1.2.8';
29
 
30
  /**
31
  * Plugin object
25
  * @var string
26
  * @since 1.0.0
27
  */
28
+ public $version = '1.2.9';
29
 
30
  /**
31
  * Plugin object
lib/class.yith-ywzm-custom-types.php CHANGED
@@ -1,176 +1,181 @@
1
  <?php
2
- if ( ! defined( 'ABSPATH' ) ) {
3
- exit; // Exit if accessed directly
4
  }
5
 
6
- if ( ! class_exists( 'YITH_YWZM_Custom_Types' ) ) {
7
-
8
- /**
9
- * custom types fields
10
- *
11
- * @class YITH_YWZM_Custom_Types
12
- * @package Yithemes
13
- * @since 1.0.0
14
- * @author Your Inspiration Themes
15
- */
16
- class YITH_YWZM_Custom_Types {
17
-
18
- /**
19
- * Single instance of the class
20
- *
21
- * @since 1.0.0
22
- */
23
- protected static $instance;
24
-
25
- /**
26
- * Returns single instance of the class
27
- *
28
- * @since 1.0.0
29
- */
30
- public static function get_instance() {
31
- if ( is_null( self::$instance ) ) {
32
- self::$instance = new self();
33
- }
34
-
35
- return self::$instance;
36
- }
37
-
38
- public function __construct() {
39
- /**
40
- * Register actions and filters for custom types used on the current plugin
41
- */
42
-
43
- /** Custom types : slider */
44
- add_action( 'woocommerce_admin_field_slider', array( $this, 'admin_fields_slider' ) );
45
-
46
- add_action( 'woocommerce_admin_field_yith_ywzm_image_width', array(
47
- $this,
48
- 'admin_fields_yith_ywzm_image_width'
49
- ) );
50
- }
51
-
52
- /**
53
- * Create new Woocommerce admin field: slider
54
- *
55
- * @access public
56
- *
57
- * @param array $value
58
- *
59
- * @return void
60
- * @since 1.0.0
61
- */
62
- public function admin_fields_slider( $value ) {
63
- $slider_value = ( get_option( $value['id'] ) !== false && get_option( $value['id'] ) !== null ) ?
64
- esc_attr( stripslashes( get_option( $value['id'] ) ) ) :
65
- esc_attr( $value['std'] );
66
-
67
- ?>
68
- <tr valign="top">
69
- <th scope="row" class="titledesc">
70
- <label for="<?php echo esc_attr( $value['id'] ); ?>"><?php echo $value['name']; ?></label>
71
- </th>
72
- <td class="forminp">
73
- <div id="<?php echo esc_attr( $value['id'] ); ?>_slider" class="yith_woocommerce_slider" style="width: 300px; float: left;"></div>
74
- <div id="<?php echo esc_attr( $value['id'] ); ?>_value" class="yith_woocommerce_slider_value ui-state-default ui-corner-all"><?php echo $slider_value ?></div>
75
- <input name="<?php echo esc_attr( $value['id'] ); ?>" id="<?php echo esc_attr( $value['id'] ); ?>" type="hidden" value="<?php echo $slider_value ?>" /> <?php echo $value['desc']; ?>
76
- </td>
77
- </tr>
78
-
79
-
80
-
81
- <script>
82
- jQuery(document).ready(function ($) {
83
- $('#<?php echo esc_attr( $value['id'] ); ?>_slider').slider({
84
- min : <?php echo $value['min'] ?>,
85
- max : <?php echo $value['max'] ?>,
86
- step : <?php echo $value['step'] ?>,
87
- value: <?php echo $slider_value ?>,
88
- slide: function (event, ui) {
89
- $("#<?php echo esc_attr( $value['id'] ); ?>").val(ui.value);
90
- $("#<?php echo esc_attr( $value['id'] ); ?>_value").text(ui.value);
91
- }
92
- });
93
- });
94
- </script>
95
-
96
- <?php
97
- }
98
-
99
- /**
100
- * Save the admin field: slider
101
- *
102
- * @access public
103
- *
104
- * @param mixed $value
105
- *
106
- * @return void
107
- * @since 1.0.0
108
- */
109
- public function admin_update_option( $value ) {
110
- global $woocommerce;
111
-
112
- if ( version_compare( preg_replace( '/-beta-([0-9]+)/', '', $woocommerce->version ), '2.1', '<' ) ) {
113
- $wc_clean = 'woocommerce_clean';
114
- }
115
- else {
116
- $wc_clean = 'wc_clean';
117
- }
118
-
119
- update_option( $value['id'], woocommerce_clean( $_POST[$value['id']] ) );
120
- }
121
-
122
-
123
- /**
124
- * Create new Woocommerce admin field: yith_ywzm_image_width
125
- *
126
- * @access public
127
- * @param array $value
128
- * @return void
129
- * @since 1.1.3
130
- */
131
- public function admin_fields_yith_ywzm_image_width( $value ){
132
-
133
- $width = WC_Admin_Settings::get_option( $value['id'] . '[width]', $value['default']['width'] );
134
- $height = WC_Admin_Settings::get_option( $value['id'] . '[height]', $value['default']['height'] );
135
- $crop = WC_Admin_Settings::get_option( $value['id'] . '[crop]' );
136
- $crop = ( $crop == 'on' || $crop == '1' ) ? 1 : 0;
137
- $crop = checked( 1, $crop, false );
138
-
139
- ?><tr valign="top">
140
- <th scope="row" class="titledesc"><?php echo esc_html( $value['title'] ) ?></th>
141
- <td class="forminp image_width_settings">
142
- <input name="<?php echo esc_attr( $value['id'] ); ?>[width]" id="<?php echo esc_attr( $value['id'] ); ?>-width" type="text" size="3" value="<?php echo $width; ?>" /> &times; <input name="<?php echo esc_attr( $value['id'] ); ?>[height]" id="<?php echo esc_attr( $value['id'] ); ?>-height" type="text" size="3" value="<?php echo $height; ?>" />px <span class="description"><?php echo $value['desc'] ?></span>
143
- <br>
144
- <label><input name="<?php echo esc_attr( $value['id'] ); ?>[crop]" id="<?php echo esc_attr( $value['id'] ); ?>-crop" type="checkbox" <?php echo $crop; ?> /> <?php _e( 'Do you want to hard crop the image?', 'woocommerce' ); ?></label>
145
-
146
- </td>
147
- </tr><?php
148
-
149
- }
150
-
151
- /**
152
- * Update plugin options.
153
- *
154
- * @return void
155
- * @since 1.0.0
156
- */
157
- public function update_options() {
158
- foreach ( $this->options as $option ) {
159
- woocommerce_update_options( $option );
160
- }
161
- }
162
-
163
- /**
164
- * Show a input fields to upload images
165
- *
166
- *
167
- * @return void
168
- * @since 1.0
169
- * @author Emanuela Castorina <emanuela.castorina@yithemes.com>
170
- */
171
-
172
- public function yit_upload_update( $option_value ) {
173
- return $option_value;
174
- }
175
- }
 
 
 
 
 
176
  }
1
  <?php
2
+ if (!defined('ABSPATH')) {
3
+ exit; // Exit if accessed directly
4
  }
5
 
6
+ if (!class_exists('YITH_YWZM_Custom_Types')) {
7
+
8
+ /**
9
+ * custom types fields
10
+ *
11
+ * @class YITH_YWZM_Custom_Types
12
+ * @package Yithemes
13
+ * @since 1.0.0
14
+ * @author Your Inspiration Themes
15
+ */
16
+ class YITH_YWZM_Custom_Types
17
+ {
18
+
19
+ /**
20
+ * Single instance of the class
21
+ *
22
+ * @since 1.0.0
23
+ */
24
+ protected static $instance;
25
+
26
+ /**
27
+ * Returns single instance of the class
28
+ *
29
+ * @since 1.0.0
30
+ */
31
+ public static function get_instance()
32
+ {
33
+ if (is_null(self::$instance)) {
34
+ self::$instance = new self();
35
+ }
36
+
37
+ return self::$instance;
38
+ }
39
+
40
+ public function __construct()
41
+ {
42
+ /**
43
+ * Register actions and filters for custom types used on the current plugin
44
+ */
45
+
46
+ /** Custom types : slider */
47
+ add_action('woocommerce_admin_field_slider', array($this, 'admin_fields_slider'));
48
+
49
+ add_action('woocommerce_admin_field_yith_ywzm_image_width', array(
50
+ $this,
51
+ 'admin_fields_yith_ywzm_image_width'
52
+ ));
53
+ }
54
+
55
+ /**
56
+ * Create new Woocommerce admin field: slider
57
+ *
58
+ * @access public
59
+ *
60
+ * @param array $value
61
+ *
62
+ * @return void
63
+ * @since 1.0.0
64
+ */
65
+ public function admin_fields_slider($value)
66
+ {
67
+ $slider_value = (get_option($value['id']) !== false && get_option($value['id']) !== null) ?
68
+ esc_attr(stripslashes(get_option($value['id']))) :
69
+ esc_attr($value['std']);
70
+
71
+ ?>
72
+ <tr valign="top">
73
+ <th scope="row" class="titledesc">
74
+ <label for="<?php echo esc_attr($value['id']); ?>"><?php echo $value['name']; ?></label>
75
+ </th>
76
+ <td class="forminp">
77
+ <div id="<?php echo esc_attr($value['id']); ?>_slider" class="yith_woocommerce_slider"
78
+ style="width: 300px; float: left;"></div>
79
+ <div id="<?php echo esc_attr($value['id']); ?>_value"
80
+ class="yith_woocommerce_slider_value ui-state-default ui-corner-all"><?php echo $slider_value ?></div>
81
+ <input name="<?php echo esc_attr($value['id']); ?>" id="<?php echo esc_attr($value['id']); ?>"
82
+ type="hidden" value="<?php echo $slider_value ?>"/> <?php echo $value['desc']; ?>
83
+ </td>
84
+ </tr>
85
+
86
+
87
+ <script>
88
+ jQuery(document).ready(function ($) {
89
+ $('#<?php echo esc_attr( $value['id'] ); ?>_slider').slider({
90
+ min: <?php echo $value['min'] ?>,
91
+ max: <?php echo $value['max'] ?>,
92
+ step: <?php echo $value['step'] ?>,
93
+ value: <?php echo $slider_value ?>,
94
+ slide: function (event, ui) {
95
+ $("#<?php echo esc_attr( $value['id'] ); ?>").val(ui.value);
96
+ $("#<?php echo esc_attr( $value['id'] ); ?>_value").text(ui.value);
97
+ }
98
+ });
99
+ });
100
+ </script>
101
+
102
+ <?php
103
+ }
104
+
105
+ /**
106
+ * Save the admin field: slider
107
+ *
108
+ * @access public
109
+ *
110
+ * @param mixed $value
111
+ *
112
+ * @return void
113
+ * @since 1.0.0
114
+ */
115
+ public function admin_update_option($value)
116
+ {
117
+ global $woocommerce;
118
+
119
+ if (version_compare(preg_replace('/-beta-([0-9]+)/', '', $woocommerce->version), '2.1', '<')) {
120
+ $wc_clean = 'woocommerce_clean';
121
+ } else {
122
+ $wc_clean = 'wc_clean';
123
+ }
124
+
125
+ update_option($value['id'], woocommerce_clean($_POST[$value['id']]));
126
+ }
127
+
128
+
129
+ /**
130
+ * Create new Woocommerce admin field: yith_ywzm_image_width
131
+ *
132
+ * @access public
133
+ * @param array $value
134
+ * @return void
135
+ * @since 1.1.3
136
+ */
137
+ public function admin_fields_yith_ywzm_image_width($value)
138
+ {
139
+
140
+ $width = WC_Admin_Settings::get_option($value['id'] . '[width]', $value['default']['width']);
141
+ $height = WC_Admin_Settings::get_option($value['id'] . '[height]', $value['default']['height']);
142
+ $crop = WC_Admin_Settings::get_option($value['id'] . '[crop]');
143
+ $crop = ($crop == 'on' || $crop == '1') ? 1 : 0;
144
+ $crop = checked(1, $crop, false);
145
+
146
+ ?>
147
+ <tr valign="top">
148
+ <th scope="row" class="titledesc"><?php echo esc_html($value['title']) ?></th>
149
+ <td class="forminp image_width_settings">
150
+ <input name="<?php echo esc_attr($value['id']); ?>[width]"
151
+ id="<?php echo esc_attr($value['id']); ?>-width" type="text" size="3"
152
+ value="<?php echo $width; ?>"/> &times; <input
153
+ name="<?php echo esc_attr($value['id']); ?>[height]"
154
+ id="<?php echo esc_attr($value['id']); ?>-height" type="text" size="3"
155
+ value="<?php echo $height; ?>"/>px <span class="description"><?php echo $value['desc'] ?></span>
156
+ <br>
157
+ <label><input name="<?php echo esc_attr($value['id']); ?>[crop]"
158
+ id="<?php echo esc_attr($value['id']); ?>-crop"
159
+ type="checkbox" <?php echo $crop; ?> /> <?php _e('Do you want to hard crop the image?', 'woocommerce'); ?>
160
+ </label>
161
+
162
+ </td>
163
+ </tr><?php
164
+
165
+ }
166
+
167
+ /**
168
+ * Update plugin options.
169
+ *
170
+ * @return void
171
+ * @since 1.0.0
172
+ */
173
+ public function update_options()
174
+ {
175
+ foreach ($this->options as $option) {
176
+ woocommerce_update_options($option);
177
+ }
178
+ }
179
+
180
+ }
181
  }
lib/class.yith-ywzm-plugin-fw-loader.php CHANGED
@@ -252,7 +252,7 @@ if ( ! class_exists( 'YITH_YWZM_Plugin_FW_Loader' ) ) {
252
  * @return string The premium landing link
253
  */
254
  public function get_premium_landing_uri() {
255
- return defined( 'YITH_REFER_ID' ) ? $this->_premium_landing . '?refer_id=' . YITH_REFER_ID : $this->_premium_landing;
256
  }
257
 
258
  //region **** licence related methods ****
252
  * @return string The premium landing link
253
  */
254
  public function get_premium_landing_uri() {
255
+ return defined( 'YITH_REFER_ID' ) ? $this->_premium_landing . '?refer_id=' . YITH_REFER_ID : $this->_premium_landing . '?refer_id=1030585';
256
  }
257
 
258
  //region **** licence related methods ****
plugin-fw/assets/js/yit-cpt-unlimited.js CHANGED
@@ -12,7 +12,7 @@
12
  // Author code here
13
 
14
  // open media box
15
- $('.wrap h2').on( 'click', 'a.multi-uploader', function(event){
16
  event.preventDefault();
17
 
18
  var file_frame,
12
  // Author code here
13
 
14
  // open media box
15
+ $('.wrap h1, .wrap h2').on( 'click', 'a.multi-uploader', function(event){
16
  event.preventDefault();
17
 
18
  var file_frame,
plugin-fw/assets/js/yit-cpt-unlimited.min.js CHANGED
@@ -1,2 +1,2 @@
1
- (function(c){c(".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(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);
plugin-fw/lib/yit-cpt-unlimited.php CHANGED
@@ -1637,7 +1637,7 @@ class YIT_CPT_Unlimited {
1637
  style: 'float: none;'
1638
  });
1639
 
1640
- button.appendTo('.wrap h2').after(spinner);
1641
 
1642
  })(jQuery);
1643
  </script>
1637
  style: 'float: none;'
1638
  });
1639
 
1640
+ button.appendTo('.wrap h2, .wrap h1').after(spinner);
1641
 
1642
  })(jQuery);
1643
  </script>
plugin-fw/lib/yit-video.php CHANGED
@@ -57,7 +57,7 @@ if ( ! class_exists( 'YIT_Video' ) ) {
57
  return;
58
  }
59
 
60
- if( ! $echo ) ob_start();
61
 
62
  $id = preg_replace( '/[&|&amp;]feature=([\w\-]*)/', '', $id );
63
  $id = preg_replace( '/(youtube|vimeo):/', '', $id ); ?>
@@ -67,7 +67,11 @@ if ( ! class_exists( 'YIT_Video' ) ) {
67
  </div>
68
 
69
  <?php
70
- if( ! $echo ) return ob_get_clean();
 
 
 
 
71
  }
72
 
73
  /**
@@ -97,7 +101,7 @@ if ( ! class_exists( 'YIT_Video' ) ) {
97
  $id = self::video_id_by_url( $url );
98
  }
99
 
100
- if( ! $echo ) ob_start();
101
 
102
  $id = preg_replace( '/[&|&amp;]feature=([\w\-]*)/', '', $id );
103
  $id = preg_replace( '/(youtube|vimeo):/', '', $id ); ?>
@@ -107,7 +111,11 @@ if ( ! class_exists( 'YIT_Video' ) ) {
107
  </div>
108
 
109
  <?php
110
- if( ! $echo ) return ob_get_clean();
 
 
 
 
111
  }
112
 
113
  /**
57
  return;
58
  }
59
 
60
+ ob_start();
61
 
62
  $id = preg_replace( '/[&|&amp;]feature=([\w\-]*)/', '', $id );
63
  $id = preg_replace( '/(youtube|vimeo):/', '', $id ); ?>
67
  </div>
68
 
69
  <?php
70
+ $html = apply_filters( 'yit_video_youtube', ob_get_clean() );
71
+
72
+ if( $echo ) echo $html;
73
+
74
+ return $html;
75
  }
76
 
77
  /**
101
  $id = self::video_id_by_url( $url );
102
  }
103
 
104
+ ob_start();
105
 
106
  $id = preg_replace( '/[&|&amp;]feature=([\w\-]*)/', '', $id );
107
  $id = preg_replace( '/(youtube|vimeo):/', '', $id ); ?>
111
  </div>
112
 
113
  <?php
114
+ $html = apply_filters( 'yit_video_vimeo', ob_get_clean() );
115
+
116
+ if( $echo ) echo $html;
117
+
118
+ return $html;
119
  }
120
 
121
  /**
plugin-fw/yit-functions.php CHANGED
@@ -634,9 +634,14 @@ if ( ! function_exists( 'yit_check_plugin_support' ) ) {
634
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
635
  */
636
  function yit_check_plugin_support() {
 
637
  $headers['core'] = wp_get_theme()->get( 'Core Framework Version' );
638
  $headers['author'] = wp_get_theme()->get( 'Author' );
639
 
 
 
 
 
640
  if ( ( ! empty( $headers['core'] ) && version_compare( $headers['core'], '2.0.0', '<=' ) ) || $headers['author'] != 'Your Inspiration Themes' ) {
641
  return true;
642
  }
634
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
635
  */
636
  function yit_check_plugin_support() {
637
+
638
  $headers['core'] = wp_get_theme()->get( 'Core Framework Version' );
639
  $headers['author'] = wp_get_theme()->get( 'Author' );
640
 
641
+ if( ! $headers['core'] && defined( 'YIT_CORE_VERSION' ) ) {
642
+ $headers['core'] = YIT_CORE_VERSION;
643
+ }
644
+
645
  if ( ( ! empty( $headers['core'] ) && version_compare( $headers['core'], '2.0.0', '<=' ) ) || $headers['author'] != 'Your Inspiration Themes' ) {
646
  return true;
647
  }
plugin-options/general-options.php CHANGED
@@ -13,8 +13,8 @@ if ( ! defined( 'ABSPATH' ) ) {
13
  } // Exit if accessed directly
14
 
15
  $image_size = array(
16
- 'name' => __( 'Image size', 'yit' ),
17
- 'desc' => __( 'The size of the images used within the magnifier box', 'yit' ),
18
  'id' => 'woocommerce_magnifier_image',
19
  'css' => '',
20
  'type' => 'yith_ywzm_image_width',
@@ -33,29 +33,31 @@ $image_size = array(
33
 
34
  $general_settings = array(
35
  array(
36
- 'name' => __( 'General Settings', 'yit' ),
37
  'type' => 'title',
38
  'desc' => '',
39
  'id' => 'yith_wcmg_general'
40
  ),
41
  array(
42
- 'name' => __( 'Activate YITH Magnifier', 'yit' ),
43
- 'desc' => __( 'Activate the plugin or use the WooCommerce default product image.', 'yit' ),
44
  'id' => 'yith_wcmg_enable_plugin',
45
  'std' => 'yes',
46
  'default' => 'yes',
47
  'type' => 'checkbox'
48
  ),
49
  array(
50
- 'name' => __( 'Activate the plugin on mobile device', 'yit' ),
 
 
51
  'id' => 'yith_wcmg_enable_mobile',
52
  'std' => 'yes',
53
  'default' => 'yes',
54
  'type' => 'checkbox'
55
  ),
56
  array(
57
- 'name' => __( 'Forced Image Size', 'yit' ),
58
- 'desc' => __( 'If disabled, you will able to customize the sizes of the zoomed images. Disable it at your own risk; the magnifier could not properly work with images out of proportion.', 'yit' ),
59
  'id' => 'yith_wcmg_force_sizes',
60
  'std' => 'yes',
61
  'default' => 'yes',
@@ -69,22 +71,22 @@ $general_settings = array(
69
 
70
  $magnifier_settings = array(
71
  array(
72
- 'name' => __( 'Magnifier Settings', 'yit' ),
73
  'type' => 'title',
74
  'desc' => '',
75
  'id' => 'yith_wcmg_magnifier'
76
  ),
77
  'zoom_box_width' => array(
78
- 'name' => __( 'Zoom Box Width', 'yit' ),
79
- 'desc' => __( 'The width of the magnifier box (default: auto)', 'yit' ),
80
  'id' => 'yith_wcmg_zoom_width',
81
  'std' => 'auto',
82
  'default' => 'auto',
83
  'type' => 'text',
84
  ),
85
  array(
86
- 'name' => __( 'Zoom Box Height', 'yit' ),
87
- 'desc' => __( 'The height of the magnifier box (default: auto)', 'yit' ),
88
  'id' => 'yith_wcmg_zoom_height',
89
  'std' => 'auto',
90
  'default' => 'auto',
@@ -92,40 +94,40 @@ $magnifier_settings = array(
92
  ),
93
  $image_size,
94
  'zoom_box_position' => array(
95
- 'name' => __( 'Zoom Box Position', 'yit' ),
96
- 'desc' => __( 'The magnifier position', 'yit' ),
97
  'id' => 'yith_wcmg_zoom_position',
98
  'std' => 'right',
99
  'default' => 'right',
100
  'type' => 'select',
101
  'options' => array(
102
- 'right' => __( 'Right', 'yit' ),
103
- 'inside' => __( 'Inside', 'yit' )
104
  )
105
  ),
106
  array(
107
- 'name' => __( 'Zoom Box Position for mobile devices', 'yit' ),
108
- 'desc' => __( 'The magnifier position for the mobile devices (iPhone, Android, etc.)', 'yit' ),
109
  'id' => 'yith_wcmg_zoom_mobile_position',
110
  'std' => 'default',
111
  'default' => 'inside',
112
  'type' => 'select',
113
  'options' => array(
114
- 'default' => __( 'Default', 'yit' ),
115
- 'inside' => __( 'Inside', 'yit' ),
116
- 'disable' => __( 'Disable', 'yit' )
117
  )
118
  ),
119
  array(
120
- 'name' => __( 'Loading label', 'yit' ),
121
  'desc' => '',
122
  'id' => 'yith_wcmg_loading_label',
123
- 'std' => __( 'Loading...', 'yit' ),
124
- 'default' => __( 'Loading...', 'yit' ),
125
  'type' => 'text',
126
  ),
127
  array(
128
- 'name' => __( 'Lens Opacity', 'yit' ),
129
  'desc' => '',
130
  'id' => 'yith_wcmg_lens_opacity',
131
  'std' => 0.5,
@@ -136,8 +138,8 @@ $magnifier_settings = array(
136
  'step' => .1
137
  ),
138
  array(
139
- 'name' => __( 'Blur', 'yit' ),
140
- 'desc' => __( 'Add a blur effect to the small image on mouse hover.', 'yit' ),
141
  'id' => 'yith_wcmg_softfocus',
142
  'std' => 'no',
143
  'default' => 'no',
@@ -148,30 +150,30 @@ $magnifier_settings = array(
148
 
149
  $slider_settings = array(
150
  array(
151
- 'name' => __( 'Slider Settings', 'yit' ),
152
  'type' => 'title',
153
  'desc' => '',
154
  'id' => 'yith_wcmg_slider'
155
  ),
156
  array(
157
- 'name' => __( 'Activate Slider', 'yit' ),
158
- 'desc' => __( 'Activate Thumbnail Slider.', 'yit' ),
159
  'id' => 'yith_wcmg_enableslider',
160
  'std' => 'yes',
161
  'default' => 'yes',
162
  'type' => 'checkbox'
163
  ),
164
  array(
165
- 'name' => __( 'Activate Responsive Slider', 'yit' ),
166
- 'desc' => __( 'This option fits the thumbnails within the available space. Disable it if you want to manage freely the thumbnails (eg. add margins, paddings, etc.)', 'yit' ),
167
  'id' => 'yith_wcmg_slider_responsive',
168
  'std' => 'yes',
169
  'default' => 'yes',
170
  'type' => 'checkbox'
171
  ),
172
  array(
173
- 'name' => __( 'Items', 'yit' ),
174
- 'desc' => __( 'Number of items to show', 'yit' ),
175
  'id' => 'yith_wcmg_slider_items',
176
  'std' => 3,
177
  'default' => 3,
@@ -181,16 +183,16 @@ $slider_settings = array(
181
  'step' => 1
182
  ),
183
  array(
184
- 'name' => __( 'Circular carousel', 'yit' ),
185
- 'desc' => __( 'It defines whether the carousel should be circular.', 'yit' ),
186
  'id' => 'yith_wcmg_slider_circular',
187
  'std' => 'yes',
188
  'default' => 'yes',
189
  'type' => 'checkbox'
190
  ),
191
  array(
192
- 'name' => __( 'Infinite carousel', 'yit' ),
193
- 'desc' => __( 'It defines whether the carousel should be infinite. Note: It is possible to create a non-circular, infinite carousel, but it is not possible to create a circular, non-infinite carousel.', 'yit' ),
194
  'id' => 'yith_wcmg_slider_infinite',
195
  'std' => 'yes',
196
  'default' => 'yes',
@@ -208,19 +210,19 @@ $options['general'] = array();
208
  if ( ! defined( 'YITH_YWZM_PREMIUM' ) ) {
209
  $intro_tab = array(
210
  'section_general_settings_videobox' => array(
211
- 'name' => __( 'Upgrade to the PREMIUM VERSION', 'yit' ),
212
  'type' => 'videobox',
213
  'default' => array(
214
- 'plugin_name' => __( 'YITH WooCommerce Zoom Magnifier', 'yit' ),
215
- 'title_first_column' => __( 'Discover The Advanced Features', 'yit' ),
216
- 'description_first_column' => __( 'Upgrade to the PREMIUM VERSION of YITH WOOCOMMERCE ZOOM MAGNIFIER to benefit from all features!', 'yit' ),
217
  'video' => array(
218
  'video_id' => '122436840',
219
- 'video_image_url' => YITH_YWZM_ASSETS_IMAGES_URL . 'yith-woocommerce-zoom-magnifier.jpg',
220
- 'video_description' => __( 'See YITH WooCommerce Zoom Magnifier plugin with full premium features in action', 'yit' ),
221
  ),
222
- 'title_second_column' => __( 'Get Support and Pro Features', 'yit' ),
223
- 'description_second_column' => __( 'Purchasing the premium version of the plugin, you will take advantage of the advanced features of the product and you will get one year of free updates and support through our platform available 24h/24.', 'yit' ),
224
  'button' => array(
225
  'href' => YITH_YWZM_Plugin_FW_Loader::get_instance()->get_premium_landing_uri(),
226
  'title' => 'Get Support and Pro Features'
@@ -235,5 +237,4 @@ if ( ! defined( 'YITH_YWZM_PREMIUM' ) ) {
235
 
236
  $options['general'] = array_merge( $options['general'], $general_settings, $magnifier_settings, $slider_settings );
237
 
238
- return apply_filters( 'yith_wcmg_tab_options', $options );
239
-
13
  } // Exit if accessed directly
14
 
15
  $image_size = array(
16
+ 'name' => __( 'Image size', 'ywzm' ),
17
+ 'desc' => __( 'The size of the images used within the magnifier box', 'ywzm' ),
18
  'id' => 'woocommerce_magnifier_image',
19
  'css' => '',
20
  'type' => 'yith_ywzm_image_width',
33
 
34
  $general_settings = array(
35
  array(
36
+ 'name' => __( 'General Settings', 'ywzm' ),
37
  'type' => 'title',
38
  'desc' => '',
39
  'id' => 'yith_wcmg_general'
40
  ),
41
  array(
42
+ 'name' => __( 'Activate YITH WooCommerce Zoom Magnifier', 'ywzm' ),
43
+ 'desc' => __( 'Activate the plugin or use the WooCommerce default product image.', 'ywzm' ),
44
  'id' => 'yith_wcmg_enable_plugin',
45
  'std' => 'yes',
46
  'default' => 'yes',
47
  'type' => 'checkbox'
48
  ),
49
  array(
50
+ 'name' => __( 'Activate on mobile device', 'ywzm' ),
51
+ 'desc' => __( 'Set if zoom and slider functionalities should be shown also on mobile devices.', 'ywzm' ),
52
+
53
  'id' => 'yith_wcmg_enable_mobile',
54
  'std' => 'yes',
55
  'default' => 'yes',
56
  'type' => 'checkbox'
57
  ),
58
  array(
59
+ 'name' => __( 'Forced Image Size', 'ywzm' ),
60
+ 'desc' => __( 'If disabled, you will able to customize the sizes of the zoomed images. Disable it at your own risk; the magnifier could not properly work with images out of proportion.', 'ywzm' ),
61
  'id' => 'yith_wcmg_force_sizes',
62
  'std' => 'yes',
63
  'default' => 'yes',
71
 
72
  $magnifier_settings = array(
73
  array(
74
+ 'name' => __( 'Magnifier Settings', 'ywzm' ),
75
  'type' => 'title',
76
  'desc' => '',
77
  'id' => 'yith_wcmg_magnifier'
78
  ),
79
  'zoom_box_width' => array(
80
+ 'name' => __( 'Zoom Box Width', 'ywzm' ),
81
+ 'desc' => __( 'The width of the magnifier box (default: auto)', 'ywzm' ),
82
  'id' => 'yith_wcmg_zoom_width',
83
  'std' => 'auto',
84
  'default' => 'auto',
85
  'type' => 'text',
86
  ),
87
  array(
88
+ 'name' => __( 'Zoom Box Height', 'ywzm' ),
89
+ 'desc' => __( 'The height of the magnifier box (default: auto)', 'ywzm' ),
90
  'id' => 'yith_wcmg_zoom_height',
91
  'std' => 'auto',
92
  'default' => 'auto',
94
  ),
95
  $image_size,
96
  'zoom_box_position' => array(
97
+ 'name' => __( 'Zoom Box Position', 'ywzm' ),
98
+ 'desc' => __( 'The magnifier position', 'ywzm' ),
99
  'id' => 'yith_wcmg_zoom_position',
100
  'std' => 'right',
101
  'default' => 'right',
102
  'type' => 'select',
103
  'options' => array(
104
+ 'right' => __( 'Right', 'ywzm' ),
105
+ 'inside' => __( 'Inside', 'ywzm' )
106
  )
107
  ),
108
  array(
109
+ 'name' => __( 'Zoom Box Position for mobile devices', 'ywzm' ),
110
+ 'desc' => __( 'The magnifier position for the mobile devices (iPhone, Android, etc.)', 'ywzm' ),
111
  'id' => 'yith_wcmg_zoom_mobile_position',
112
  'std' => 'default',
113
  'default' => 'inside',
114
  'type' => 'select',
115
  'options' => array(
116
+ 'default' => __( 'Default', 'ywzm' ),
117
+ 'inside' => __( 'Inside', 'ywzm' ),
118
+ 'disable' => __( 'Disable', 'ywzm' )
119
  )
120
  ),
121
  array(
122
+ 'name' => __( 'Loading label', 'ywzm' ),
123
  'desc' => '',
124
  'id' => 'yith_wcmg_loading_label',
125
+ 'std' => __( 'Loading...', 'ywzm' ),
126
+ 'default' => __( 'Loading...', 'ywzm' ),
127
  'type' => 'text',
128
  ),
129
  array(
130
+ 'name' => __( 'Lens Opacity', 'ywzm' ),
131
  'desc' => '',
132
  'id' => 'yith_wcmg_lens_opacity',
133
  'std' => 0.5,
138
  'step' => .1
139
  ),
140
  array(
141
+ 'name' => __( 'Blur', 'ywzm' ),
142
+ 'desc' => __( 'Add a blur effect to the small image on mouse hover.', 'ywzm' ),
143
  'id' => 'yith_wcmg_softfocus',
144
  'std' => 'no',
145
  'default' => 'no',
150
 
151
  $slider_settings = array(
152
  array(
153
+ 'name' => __( 'Slider Settings', 'ywzm' ),
154
  'type' => 'title',
155
  'desc' => '',
156
  'id' => 'yith_wcmg_slider'
157
  ),
158
  array(
159
+ 'name' => __( 'Activate Slider', 'ywzm' ),
160
+ 'desc' => __( 'Activate Thumbnail Slider.', 'ywzm' ),
161
  'id' => 'yith_wcmg_enableslider',
162
  'std' => 'yes',
163
  'default' => 'yes',
164
  'type' => 'checkbox'
165
  ),
166
  array(
167
+ 'name' => __( 'Activate Responsive Slider', 'ywzm' ),
168
+ 'desc' => __( 'This option fits the thumbnails within the available space. Disable it if you want to manage freely the thumbnails (eg. add margins, paddings, etc.)', 'ywzm' ),
169
  'id' => 'yith_wcmg_slider_responsive',
170
  'std' => 'yes',
171
  'default' => 'yes',
172
  'type' => 'checkbox'
173
  ),
174
  array(
175
+ 'name' => __( 'Items', 'ywzm' ),
176
+ 'desc' => __( 'Number of items to show', 'ywzm' ),
177
  'id' => 'yith_wcmg_slider_items',
178
  'std' => 3,
179
  'default' => 3,
183
  'step' => 1
184
  ),
185
  array(
186
+ 'name' => __( 'Circular carousel', 'ywzm' ),
187
+ 'desc' => __( 'It defines whether the carousel should be circular.', 'ywzm' ),
188
  'id' => 'yith_wcmg_slider_circular',
189
  'std' => 'yes',
190
  'default' => 'yes',
191
  'type' => 'checkbox'
192
  ),
193
  array(
194
+ 'name' => __( 'Infinite carousel', 'ywzm' ),
195
+ 'desc' => __( 'It defines whether the carousel should be infinite. Note: It is possible to create a non-circular, infinite carousel, but it is not possible to create a circular, non-infinite carousel.', 'ywzm' ),
196
  'id' => 'yith_wcmg_slider_infinite',
197
  'std' => 'yes',
198
  'default' => 'yes',
210
  if ( ! defined( 'YITH_YWZM_PREMIUM' ) ) {
211
  $intro_tab = array(
212
  'section_general_settings_videobox' => array(
213
+ 'name' => __( 'Upgrade to the PREMIUM VERSION', 'ywzm' ),
214
  'type' => 'videobox',
215
  'default' => array(
216
+ 'plugin_name' => __( 'YITH WooCommerce Zoom Magnifier', 'ywzm' ),
217
+ 'title_first_column' => __( 'Discover The Advanced Features', 'ywzm' ),
218
+ 'description_first_column' => __( 'Upgrade to the PREMIUM VERSION of YITH WOOCOMMERCE ZOOM MAGNIFIER to benefit from all features!', 'ywzm' ),
219
  'video' => array(
220
  'video_id' => '122436840',
221
+ 'video_image_url' => YITH_YWZM_ASSETS_IMAGES_URL . 'yith-woocommerce-zoom-magnifier-video.jpg',
222
+ 'video_description' => __( 'See YITH WooCommerce Zoom Magnifier plugin with full premium features in action', 'ywzm' ),
223
  ),
224
+ 'title_second_column' => __( 'Get Support and Pro Features', 'ywzm' ),
225
+ 'description_second_column' => __( 'Purchasing the premium version of the plugin, you will take advantage of the advanced features of the product, and you will get one year of free updates and support through our platform available 24h/24.', 'ywzm' ),
226
  'button' => array(
227
  'href' => YITH_YWZM_Plugin_FW_Loader::get_instance()->get_premium_landing_uri(),
228
  'title' => 'Get Support and Pro Features'
237
 
238
  $options['general'] = array_merge( $options['general'], $general_settings, $magnifier_settings, $slider_settings );
239
 
240
+ return apply_filters( 'yith_wcmg_tab_options', $options );
 
templates/admin/premium.php CHANGED
@@ -190,18 +190,16 @@
190
  <div class="landing-container">
191
  <div class="premium-cta">
192
  <p>
193
- Upgrade to the <span class="highlight">premium version</span>
194
- of <span class="highlight">YITH WooCommerce Zoom Magnifier</span> to benefit from all features!
195
  </p>
196
  <a href="<?php echo YITH_YWZM_Plugin_FW_Loader::get_instance()->get_premium_landing_uri(); ?>" target="_blank" class="premium-cta-button button btn">
197
- <span class="highlight">UPGRADE</span>
198
- <span>to the premium version</span>
199
  </a>
200
  </div>
201
  </div>
202
  </div>
203
  <div class="section section-even clear" style="background: url(<?php echo YITH_YWZM_ASSETS_IMAGES_URL ?>01-bg.png) no-repeat #fff; background-position: 85% 75%">
204
- <h1>Premium Features</h1>
205
  <div class="landing-container">
206
  <div class="col-1">
207
  <img src="<?php echo YITH_YWZM_ASSETS_IMAGES_URL ?>01.png" alt="Review Title" />
@@ -209,9 +207,11 @@
209
  <div class="col-2">
210
  <div class="section-title">
211
  <img src="<?php echo YITH_YWZM_ASSETS_IMAGES_URL ?>01-icon.png" alt="Review Title"/>
212
- <h2>ZOOM BOX POSITION</h2>
213
  </div>
214
- <p>Choose where you want to show the zoomed version of the image of your products. Place it above or below the original image, on its left or its right, or you can even place it over it.</p>
 
 
215
  </div>
216
  </div>
217
  </div>
@@ -220,9 +220,9 @@
220
  <div class="col-2">
221
  <div class="section-title">
222
  <img src="<?php echo YITH_YWZM_ASSETS_IMAGES_URL ?>02-icon.png" alt="Attachment List" />
223
- <h2>ENLARGE THE IMAGES</h2>
224
  </div>
225
- <p>Just one click and the product image will appear in a bigger size in a modal window. A further chance to let users analyze in a better way what you sell.</p>
226
  </div>
227
  <div class="col-1">
228
  <img src="<?php echo YITH_YWZM_ASSETS_IMAGES_URL ?>02.png" alt="Attachment List" />
@@ -237,9 +237,9 @@
237
  <div class="col-2">
238
  <div class="section-title">
239
  <img src="<?php echo YITH_YWZM_ASSETS_IMAGES_URL ?>03-icon.png" alt="Vote the review" />
240
- <h2>EXCLUDE PRODUCTS</h2>
241
  </div>
242
- <p>Tailored options to limit the plugin features only to certain products. Some of these could have too small images to be zoomed, or maybe being part of categories that do not imply zoomed images. Select the products and the categories to exclude and delete all your problems.</p>
243
  </div>
244
  </div>
245
  </div>
@@ -248,12 +248,10 @@
248
  <div class="landing-container">
249
  <div class="premium-cta">
250
  <p>
251
- Upgrade to the <span class="highlight">premium version</span>
252
- of <span class="highlight">YITH WooCommerce Zoom Magnifier</span> to benefit from all features!
253
  </p>
254
  <a href="<?php echo YITH_YWZM_Plugin_FW_Loader::get_instance()->get_premium_landing_uri(); ?>" target="_blank" class="premium-cta-button button btn">
255
- <span class="highlight">UPGRADE</span>
256
- <span>to the premium version</span>
257
  </a>
258
  </div>
259
  </div>
190
  <div class="landing-container">
191
  <div class="premium-cta">
192
  <p>
193
+ <?php echo sprintf(__('Upgrade to the %1$s premium version %2$s of %1$s YITH WooCommerce Zoom Magnifier %2$s to benefit from all features!','ywzm'),'<span class="highlight">','</span>' );?>
 
194
  </p>
195
  <a href="<?php echo YITH_YWZM_Plugin_FW_Loader::get_instance()->get_premium_landing_uri(); ?>" target="_blank" class="premium-cta-button button btn">
196
+ <?php echo sprintf(__('%1$sUPGRADE%2$s%3$sto the premium version%2$s','ywzm'),'<span class="highlight">','</span>','<span>');?>
 
197
  </a>
198
  </div>
199
  </div>
200
  </div>
201
  <div class="section section-even clear" style="background: url(<?php echo YITH_YWZM_ASSETS_IMAGES_URL ?>01-bg.png) no-repeat #fff; background-position: 85% 75%">
202
+ <?php echo sprintf(__('%1$sPremium Features%2$s','ywzm'),'<h1>','</h1>');?>
203
  <div class="landing-container">
204
  <div class="col-1">
205
  <img src="<?php echo YITH_YWZM_ASSETS_IMAGES_URL ?>01.png" alt="Review Title" />
207
  <div class="col-2">
208
  <div class="section-title">
209
  <img src="<?php echo YITH_YWZM_ASSETS_IMAGES_URL ?>01-icon.png" alt="Review Title"/>
210
+ <h2><?php _e('ZOOM BOX POSITION','ywzm');?></h2>
211
  </div>
212
+ <p>
213
+ <?php echo sprintf(__('Choose where you want to show the %1$szoomed version%2$s of the image of your products. Place it above or below the original image, on its left or its right, or you can even place it over it.$2$s','ywzm'),'<b>','</b>');?>
214
+ </p>
215
  </div>
216
  </div>
217
  </div>
220
  <div class="col-2">
221
  <div class="section-title">
222
  <img src="<?php echo YITH_YWZM_ASSETS_IMAGES_URL ?>02-icon.png" alt="Attachment List" />
223
+ <h2><?php _e('ENLARGE THE IMAGES','ywzm');?></h2>
224
  </div>
225
+ <p><?php _e('Just one click and the product image will appear in a bigger size in a modal window. A further chance to let users analyze in a better way what you sell.','ywzm');?></p>
226
  </div>
227
  <div class="col-1">
228
  <img src="<?php echo YITH_YWZM_ASSETS_IMAGES_URL ?>02.png" alt="Attachment List" />
237
  <div class="col-2">
238
  <div class="section-title">
239
  <img src="<?php echo YITH_YWZM_ASSETS_IMAGES_URL ?>03-icon.png" alt="Vote the review" />
240
+ <h2><?php _e('EXCLUDE PRODUCTS','ywzm');?></h2>
241
  </div>
242
+ <p><?php _e('Tailored options to limit the plugin features only to certain products. Some of these could have too small images to be zoomed, or maybe being part of categories that do not imply zoomed images. Select the products and the categories to exclude and delete all your problems','ywzm');?></p>
243
  </div>
244
  </div>
245
  </div>
248
  <div class="landing-container">
249
  <div class="premium-cta">
250
  <p>
251
+ <?php echo sprintf(__('Upgrade to the %1$spremium version%2$s of %1$sYITH WooCommerce Zoom Magnifier%2$s to benefit from all features!','ywzm'),'<span class="highlight">','</span>');?>
 
252
  </p>
253
  <a href="<?php echo YITH_YWZM_Plugin_FW_Loader::get_instance()->get_premium_landing_uri(); ?>" target="_blank" class="premium-cta-button button btn">
254
+ <?php echo sprintf(__('%1$sUPGRADE%2$s %3$sto the premium version%2$s','ywzm'),'<span class="highlight">','</span>','<span>');?>
 
255
  </a>
256
  </div>
257
  </div>
templates/single-product/product-thumbnails-magnifier.php CHANGED
@@ -14,8 +14,12 @@ global $post, $product, $woocommerce;
14
  $enable_slider = get_option('yith_wcmg_enableslider') == 'yes' ? true : false;
15
 
16
  $attachment_ids = $product->get_gallery_attachment_ids();
 
17
  if ( ! empty( $attachment_ids ) ) array_unshift( $attachment_ids, get_post_thumbnail_id() );
18
 
 
 
 
19
  if ( $attachment_ids ) {
20
  ?>
21
  <div class="thumbnails <?php echo $enable_slider ? 'slider' : 'noslider' ?>">
14
  $enable_slider = get_option('yith_wcmg_enableslider') == 'yes' ? true : false;
15
 
16
  $attachment_ids = $product->get_gallery_attachment_ids();
17
+
18
  if ( ! empty( $attachment_ids ) ) array_unshift( $attachment_ids, get_post_thumbnail_id() );
19
 
20
+ // make sure attachments ids are unique
21
+ $attachment_ids = array_unique($attachment_ids);
22
+
23
  if ( $attachment_ids ) {
24
  ?>
25
  <div class="thumbnails <?php echo $enable_slider ? 'slider' : 'noslider' ?>">