Version Description
- Fixed: multiple wrap
Download this release
Release Info
Developer | yithemes |
Plugin | YITH WooCommerce Zoom Magnifier |
Version | 1.1.5 |
Comparing to | |
See all releases |
Code changes from version 1.1.4 to 1.1.5
- README.md +2 -2
- README.txt +9 -6
- assets/js/yith_magnifier.min.js +20 -20
- class.yith-wcmg.php +1 -1
- init.php +1 -1
README.md
CHANGED
@@ -8,7 +8,7 @@ The Wordpress plugin also adds a slider below the featured image with your produ
|
|
8 |
|
9 |
Working demo are available:
|
10 |
|
11 |
-
**[LIVE DEMO 1](http://
|
12 |
|
13 |
|
14 |
-
Full documentation is available [here](http://yithemes.com/docs-plugins/
|
8 |
|
9 |
Working demo are available:
|
10 |
|
11 |
+
**[LIVE DEMO 1](http://preview.yithemes.com/room09/product/africa-style/)** - **[LIVE DEMO 2](http://preview.yithemes.com/bazar/shop/ankle-shoes/)**
|
12 |
|
13 |
|
14 |
+
Full documentation is available [here](http://yithemes.com/docs-plugins/yith_woocommerce_magnifier/).
|
README.txt
CHANGED
@@ -3,8 +3,8 @@
|
|
3 |
Contributors: yithemes
|
4 |
Tags: zoom, magnifier, woocommerce, products, themes, yit, e-commerce, shop
|
5 |
Requires at least: 3.5.1
|
6 |
-
Tested up to: 4.
|
7 |
-
Stable tag: 1.1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -20,10 +20,10 @@ The Wordpress plugin also adds a slider below the featured image with your produ
|
|
20 |
|
21 |
Working demo are available:
|
22 |
|
23 |
-
**[LIVE DEMO 1](http://
|
24 |
|
25 |
|
26 |
-
Full documentation is available [here](http://yithemes.com/docs-plugins/
|
27 |
|
28 |
|
29 |
= Installation =
|
@@ -36,7 +36,7 @@ YITH WooCommerce Zoom Magnifier will add a new tab called "Magnifier" below the
|
|
36 |
|
37 |
= Developer =
|
38 |
|
39 |
-
Are you a developer? Want to customize the templates or the style of the plugin? Read on the [documentation](http://yithemes.com/docs-plugins/
|
40 |
|
41 |
= Support =
|
42 |
|
@@ -69,6 +69,9 @@ The size of the Zoom Image is automatically setted. If you want to change these
|
|
69 |
2. The Magnifier settings page
|
70 |
|
71 |
== Changelog ==
|
|
|
|
|
|
|
72 |
|
73 |
= 1.1.4 =
|
74 |
|
@@ -147,7 +150,7 @@ If you have created your own language pack, or have an update for an existing on
|
|
147 |
|
148 |
== Documentation ==
|
149 |
|
150 |
-
Full documentation is available [here](http://yithemes.com/docs-plugins/
|
151 |
|
152 |
== Upgrade notice ==
|
153 |
|
3 |
Contributors: yithemes
|
4 |
Tags: zoom, magnifier, woocommerce, products, themes, yit, e-commerce, shop
|
5 |
Requires at least: 3.5.1
|
6 |
+
Tested up to: 4.1
|
7 |
+
Stable tag: 1.1.5
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
20 |
|
21 |
Working demo are available:
|
22 |
|
23 |
+
**[LIVE DEMO 1](http://preview.yithemes.com/room09/product/africa-style/)** - **[LIVE DEMO 2](http://preview.yithemes.com/bazar/shop/ankle-shoes/)**
|
24 |
|
25 |
|
26 |
+
Full documentation is available [here](http://yithemes.com/docs-plugins/yith_woocommerce_magnifier/).
|
27 |
|
28 |
|
29 |
= Installation =
|
36 |
|
37 |
= Developer =
|
38 |
|
39 |
+
Are you a developer? Want to customize the templates or the style of the plugin? Read on the [documentation](http://yithemes.com/docs-plugins/yith_woocommerce_magnifier/) and discover how to do that.
|
40 |
|
41 |
= Support =
|
42 |
|
69 |
2. The Magnifier settings page
|
70 |
|
71 |
== Changelog ==
|
72 |
+
= 1.1.5 =
|
73 |
+
|
74 |
+
* Fixed: multiple wrap
|
75 |
|
76 |
= 1.1.4 =
|
77 |
|
150 |
|
151 |
== Documentation ==
|
152 |
|
153 |
+
Full documentation is available [here](http://yithemes.com/docs-plugins/yith_woocommerce_magnifier/).
|
154 |
|
155 |
== Upgrade notice ==
|
156 |
|
assets/js/yith_magnifier.min.js
CHANGED
@@ -1,27 +1,27 @@
|
|
1 |
/**
|
2 |
* YITH Magnifier
|
3 |
-
*
|
4 |
* @version 0.1
|
5 |
* @author Your Inspiration Themes Team <info@yithemes.com>
|
6 |
*
|
7 |
* MIT License.
|
8 |
*/
|
9 |
-
(function(
|
10 |
-
|
11 |
-
|
12 |
-
onMove:function(){return!1},onClick:function(){return!1},elements:{zoom:b(".yith_magnifier_zoom"),zoomImage:b(".yith_magnifier_zoom img"),gallery:b(".yith_magnifier_gallery li a")}};b.yith_magnifier.prototype={_init:function(a){var
|
13 |
-
_initGallery:function(){var a=this,
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
(this.softFocus.remove(),this.softFocus=null);0<this.element.find(".yith_magnifier_loading").length&&this.element.find(".yith_magnifier_loading").remove()},_isPhone:function(){var a=navigator.userAgent.toLowerCase();return a.match(/iphone/i)||a.match(/ipod/i)||a.match(/android/i)},destroy:function(){this.zoom&&this.zoom.unwrap();this.mouseTrap&&(this.mouseTrap.unbind(),this.mouseTrap.remove(),this.mouseTrap=null);this.zoomDiv&&
|
26 |
-
|
27 |
-
|
1 |
/**
|
2 |
* YITH Magnifier
|
3 |
+
*
|
4 |
* @version 0.1
|
5 |
* @author Your Inspiration Themes Team <info@yithemes.com>
|
6 |
*
|
7 |
* MIT License.
|
8 |
*/
|
9 |
+
(function(s,b,r){b.fn.imagesLoaded===r&&function(a,b){a.fn.imagesLoaded=function(e){function d(){var b=a(l),c=a(q);h&&(q.length?h.reject(g,b,c):h.resolve(g));a.isFunction(e)&&e.call(k,g,b,c)}function p(a){c(a.target,"error"===a.type)}function c(b,c){"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw=="!==b.src&&-1===a.inArray(b,m)&&(m.push(b),c?q.push(b):l.push(b),a.data(b,"imagesLoaded",{isBroken:c,src:b.src}),n&&h.notifyWith(a(b),[c,g,a(l),a(q)]),g.length===m.length&&(setTimeout(d),
|
10 |
+
g.unbind(".imagesLoaded",p)))}var k=this,h=a.isFunction(a.Deferred)?a.Deferred():0,n=a.isFunction(h.notify),g=k.find("img").add(k.filter("img")),m=[],l=[],q=[];a.isPlainObject(e)&&a.each(e,function(a,b){if("callback"===a)e=b;else if(h)h[a](b)});g.length?g.bind("load.imagesLoaded error.imagesLoaded",p).each(function(e,d){var h=d.src,g=a.data(d,"imagesLoaded");if(g&&g.src===h)c(d,g.isBroken);else if(d.complete&&d.naturalWidth!==b)c(d,0===d.naturalWidth||0===d.naturalHeight);else if(d.readyState||d.complete)d.src=
|
11 |
+
"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==",d.src=h}):d();return h?h.promise(k):k}}(jQuery);b.yith_magnifier=function(a,f){this.t=f;this.element=b(f);this._init(a)};b.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},
|
12 |
+
onEnter:function(){return!1},onLeave:function(){return!1},onMove:function(){return!1},onClick:function(){return!1},elements:{zoom:b(".yith_magnifier_zoom"),zoomImage:b(".yith_magnifier_zoom img"),gallery:b(".yith_magnifier_gallery li a")}};b.yith_magnifier.prototype={_init:function(a){var f=this;b.each(b.yith_magnifier.defaults.elements,function(a,d){b.yith_magnifier.defaults.elements[a]=b(d,f)});f.options=b.extend(!0,{},b.yith_magnifier.defaults,a);f.isPhone=f._isPhone();f._loading();f.element.imagesLoaded(function(){f.options.onLoad();
|
13 |
+
f._initZoom();f._initGallery()})},_initGallery:function(){var a=this,f=a.options.elements,e=f.gallery,d=f.zoom,p=f.zoomImage;if(0<e.length){if(e.on("click",function(c){c.preventDefault();c=b(this);a.destroy();d.attr("href",this.href);p.attr("src",c.data("small")).attr("title","").attr("title",c.attr("title"));b.data(a.t,"yith_magnifier",new b.yith_magnifier(a.options,a.element))}),a.options.enableSlider)e.parents("ul")[a.options.slider](a.options.sliderOptions)}else e.on("click",function(a){a.preventDefault();
|
14 |
+
return!1})},_loading:function(){if(this.options.disableRightClick)b(document).on("contextmenu",function(a){return!1});if(this.mouseTrap===r){var a=this.options.elements.zoom.width();b('<div class="yith_magnifier_loading">'+this.options.loadingLabel+"</div>").css({width:a/3,left:a/2-a/6,opacity:.5}).appendTo(this.options.elements.zoom.parent())}},_initZoom:function(){var a=this;a.zoom=a.options.elements.zoom;a.zoomImage=a.options.elements.zoomImage;a.zoom.wrap('<div class="yith_magnifier_zoom_wrap"></div>');
|
15 |
+
a.IMG_zoomImage=new Image;a.IMG_zoomImage.src=a.zoom.attr("href");a.IMG_smallImage=new Image;a.IMG_smallImage.src=a.zoomImage.attr("src");b.browser.msie&&8==b.browser.version?b(a.IMG_zoomImage).load(function(){a._initTrap()}):b([a.IMG_zoomImage,a.IMG_smallImage]).imagesLoaded(function(){a._initTrap()})},_initTrap:function(){var a=this,f=a.IMG_zoomImage;a.mx=0;a.my=0;a.controlTimer=0;a.lens=null;a.tint=null;a.softFocus=null;a.zoomDiv=null;a.cw=0;a.ch=0;a.zw=0;a.destU=0;a.destV=0;a.currU=0;a.currV=
|
16 |
+
0;a.mouseTrap=null;var e=a.options.elements.zoom,d=a.options.elements.zoomImage;b(".yith_magnifier_loading").remove();this.element.find(".yith_magnifier_mousetrap")&&this.element.find(".yith_magnifier_mousetrap").remove();this.mouseTrap=b('<div class="yith_magnifier_mousetrap" />').css({width:"100%",height:"100%",top:0,left:0}).appendTo(e.parent());var p="ontouchstart"in document.documentElement?!0:!1;this.mouseTrap.on("touchmove mousemove",this,function(b){a.options.onMove();a.mx="undefined"!=typeof b.originalEvent.touches?
|
17 |
+
b.originalEvent.touches[0].pageX:b.pageX;a.my="undefined"!=typeof b.originalEvent.touches?b.originalEvent.touches[0].pageY:b.pageY}).on("touchend mouseleave",this,function(b){clearTimeout(a.controlTimer);a.lens&&a.lens.fadeOut(299);a.tint&&a.tint.fadeOut(299);a.softFocus&&a.softFocus.fadeOut(299);a.zoomDiv.fadeOut(300,function(){a._onLeave()});return!1}).on("touchstart click",this,function(b){a.options.onClick()}).on("touchstart mouseenter",this,function(c){a.options.onEnter();p&&c.preventDefault();
|
18 |
+
a.mx="undefined"!=typeof c.originalEvent.touches?c.originalEvent.touches[0].pageX:c.pageX;a.my="undefined"!=typeof c.originalEvent.touches?c.originalEvent.touches[0].pageY:c.pageY;a.zw=c.data;a.zoomDiv&&(a.zoomDiv.stop(!0,!1),a.zoomDiv.remove());c=a.options.adjustX;var k=a.options.adjustY,h=d.outerWidth(),n=d.outerHeight(),g=a.options.zoomWidth,m=a.options.zoomHeight;"auto"==a.options.zoomWidth&&(g=h);"auto"==a.options.zoomHeight&&(m=n);var l=e.parent();switch(a.options.position){case "top":k-=m;
|
19 |
+
break;case "right":c+=h;break;case "bottom":k+=n;break;case "left":c-=g;break;case "inside":g=h;m=n;break;default:l=b("#"+a.options.position),l.length?(g=l.innerWidth(),m=l.innerHeight()):(l=e,c+=h,k+=n)}a.isPhone&&"inside"==a.options.phoneBehavior&&(g=h,m=n,k=c=0);a.zoomDiv=b('<div class="yith_magnifier_zoom_magnifier" />').css({left:c,top:k,width:g,height:m,backgroundImage:"url("+f.src+")"}).appendTo(l);d.attr("title")&&a.options.showTitle&&b('<div class="yith_magnifier_title">'+d.attr("title")+
|
20 |
+
"</div>").appendTo(a.zoomDiv);a.isPhone?"disable"!=a.options.phoneBehavior?a.zoomDiv.fadeIn(500):a.lens.fadeOut(299):a.zoomDiv.fadeIn(500);a.lens&&(a.lens.remove(),a.lens=null);a.cw=1>=f.width?d.outerWidth()/f.naturalWidth*a.zoomDiv.width():d.outerWidth()/f.width*a.zoomDiv.width();a.ch=1>=f.height?d.outerHeight()/f.naturalHeight*a.zoomDiv.height():d.outerHeight()/f.height*a.zoomDiv.height();a.lens=b('<div class="yith_magnifier_lens" />').css({width:a.cw,height:a.ch}).appendTo(e);a.mouseTrap.css("cursor",
|
21 |
+
a.lens.css("cursor"));c=!1;a.options.tint&&(a.tint=b("<div />").css({display:"none",position:"absolute",left:0,top:0,width:d.outerWidth(),height:d.outerHeight(),backgroundColor:a.options.tint,opacity:a.options.tintOpacity}).appendTo(e),a.lens.append(b("<img />",{src:d.attr("src")})),c=!0,a.tint.fadeIn(500));a.options.softFocus&&(a.softFocus=b("<div />").css({position:"absolute",display:"none",top:"1px",left:"1px",width:d.outerWidth(),height:d.outerHeight(),opacity:.5}).appendTo(e),a.softFocus.append(b("<img />",
|
22 |
+
{src:d.attr("src")})),0==a.lens.find("img").length&&a.lens.append(b("<img />",{src:d.attr("src")})),c=!0,a.softFocus.fadeIn(500));c||a.lens.css("opacity",a.options.lensOpacity);"inside"!==a.options.position&&a.lens.fadeIn(500);a.zw._controlLoop()})},_controlLoop:function(){var a=this;if(this.lens){var b=this.mx-this.zoomImage.offset().left-.5*this.cw>>0,e=this.my-this.zoomImage.offset().top-.5*this.ch>>0;0>b?b=0:b>this.zoomImage.outerWidth()-this.cw&&(b=this.zoomImage.outerWidth()-this.cw);0>e?e=
|
23 |
+
0:e>this.zoomImage.outerHeight()-this.ch&&(e=this.zoomImage.outerHeight()-this.ch);this.lens.css({left:b-2,top:e-1});this.lens.find("img").css({width:this.zoomImage.outerWidth(),height:this.zoomImage.outerHeight(),marginLeft:-b+"px ",marginTop:-e+"px"});this.destU=1>=this.IMG_zoomImage.width?b/this.zoomImage.outerWidth()*this.IMG_zoomImage.naturalWidth>>0:b/this.zoomImage.outerWidth()*this.IMG_zoomImage.width>>0;this.destV=1>=this.IMG_zoomImage.height?e/this.zoomImage.outerHeight()*this.IMG_zoomImage.naturalHeight>>
|
24 |
+
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(){a._controlLoop()},30)},_onLeave:function(){this.options.onLeave();this.zoomDiv&&(this.zoomDiv.remove(),this.zoomDiv=null);this._removeElements()},_removeElements:function(){this.lens&&(this.lens.remove(),
|
25 |
+
this.lens=null);this.tint&&(this.tint.remove(),this.tint=null);this.softFocus&&(this.softFocus.remove(),this.softFocus=null);0<this.element.find(".yith_magnifier_loading").length&&this.element.find(".yith_magnifier_loading").remove()},_isPhone:function(){var a=navigator.userAgent.toLowerCase();return a.match(/iphone/i)||a.match(/ipod/i)||a.match(/android/i)},destroy:function(){this.zoom&&this.zoom.unwrap();this.mouseTrap&&(this.mouseTrap.unbind(),this.mouseTrap.remove(),this.mouseTrap=null);this.zoomDiv&&
|
26 |
+
(this.zoomDiv.remove(),this.zoomDiv=null);this.options.disableRightClick&&b(document).unbind();this._removeElements();this.options.elements.gallery.unbind();this.element.removeData("yith_magnifier")}};b.fn.yith_magnifier=function(a){if("string"===typeof a){var f=Array.prototype.slice.call(arguments,1);this.each(function(){var e=b.data(this,"yith_magnifier");e?b.isFunction(e[a])&&"_"!==a.charAt(0)?e[a].apply(e,f):b.error("no such method '"+a+"' for yith_magnifier instance"):b.error("cannot call methods on yith_magnifier prior to initialization; attempted to call method '"+
|
27 |
+
a+"'")})}else this.each(function(){b.data(this,"yith_magnifier")?b.error("yith_magnifier already istantiated."):b.data(this,"yith_magnifier",new b.yith_magnifier(a,this))});return this}})(window,jQuery);
|
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.1.
|
26 |
|
27 |
/**
|
28 |
* Plugin object
|
22 |
* @var string
|
23 |
* @since 1.0.0
|
24 |
*/
|
25 |
+
public $version = '1.1.5';
|
26 |
|
27 |
/**
|
28 |
* Plugin object
|
init.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: YITH WooCommerce Zoom Magnifier
|
4 |
* Plugin URI: http://yithemes.com/
|
5 |
* Description: YITH WooCommerce Zoom Magnifier enables you to add a zoom effect to product images.
|
6 |
-
* Version: 1.1.
|
7 |
* Author: Your Inspiration Themes
|
8 |
* Author URI: http://yithemes.com/
|
9 |
* Text Domain: yit
|
3 |
* Plugin Name: YITH WooCommerce Zoom Magnifier
|
4 |
* Plugin URI: http://yithemes.com/
|
5 |
* Description: YITH WooCommerce Zoom Magnifier enables you to add a zoom effect to product images.
|
6 |
+
* Version: 1.1.5
|
7 |
* Author: Your Inspiration Themes
|
8 |
* Author URI: http://yithemes.com/
|
9 |
* Text Domain: yit
|