Version Description
- Fixed: Unwanted expand link on product image.
Download this release
Release Info
Developer | yithemes |
Plugin | YITH WooCommerce Zoom Magnifier |
Version | 1.1.7 |
Comparing to | |
See all releases |
Code changes from version 1.1.6 to 1.1.7
- README.txt +5 -1
- assets/js/yith_magnifier.js +0 -2
- assets/js/yith_magnifier.min.js +3 -3
- init.php +3 -3
- plugin-fw/assets/css/yit-plugin-panel.css +23 -12
- plugin-fw/lib/yit-plugin-panel-wc.php +0 -20
- plugin-fw/lib/yit-plugin-panel.php +30 -4
- plugin-fw/templates/panel/videobox.php +2 -2
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.1
|
7 |
-
Stable tag: 1.1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -58,6 +58,10 @@ The size of the Zoom Image is automatically setted. If you want to change these
|
|
58 |
|
59 |
== Changelog ==
|
60 |
|
|
|
|
|
|
|
|
|
61 |
= 1.1.6 =
|
62 |
|
63 |
* Added: the plugin can be disabled on mobile devices.
|
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.1
|
7 |
+
Stable tag: 1.1.7
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
58 |
|
59 |
== Changelog ==
|
60 |
|
61 |
+
= 1.1.7 =
|
62 |
+
|
63 |
+
* Fixed: Unwanted expand link on product image.
|
64 |
+
|
65 |
= 1.1.6 =
|
66 |
|
67 |
* Added: the plugin can be disabled on mobile devices.
|
assets/js/yith_magnifier.js
CHANGED
@@ -351,8 +351,6 @@
|
|
351 |
left: 0
|
352 |
}).appendTo(zoom.parent());
|
353 |
|
354 |
-
$('<a href="#" class="pp_expand" title="Expand the image" style="display: inline;">Expand</a>').appendTo(this.mouseTrap );
|
355 |
-
|
356 |
// Detect device type, normal mouse or touchy(ipad android) by albanx
|
357 |
var touchy = ("ontouchstart" in document.documentElement) ? true : false;
|
358 |
var event_move = 'touchmove mousemove';
|
351 |
left: 0
|
352 |
}).appendTo(zoom.parent());
|
353 |
|
|
|
|
|
354 |
// Detect device type, normal mouse or touchy(ipad android) by albanx
|
355 |
var touchy = ("ontouchstart" in document.documentElement) ? true : false;
|
356 |
var event_move = 'touchmove mousemove';
|
assets/js/yith_magnifier.min.js
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
/**
|
2 |
-
* YITH Magnifier
|
3 |
*
|
4 |
-
* @version
|
5 |
* @author Your Inspiration Themes Team <info@yithemes.com>
|
6 |
*
|
7 |
* MIT License.
|
8 |
*/
|
9 |
|
10 |
-
!function(t,i,
|
1 |
/**
|
2 |
+
* YITH WooCommerce Zoom Magnifier
|
3 |
*
|
4 |
+
* @version 1.1
|
5 |
* @author Your Inspiration Themes Team <info@yithemes.com>
|
6 |
*
|
7 |
* MIT License.
|
8 |
*/
|
9 |
|
10 |
+
!function(t,i,o){"use strict";i.fn.imagesLoaded===o&&!function(t,i){var o="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";t.fn.imagesLoaded=function(e){function n(){var i=t(c),o=t(d);h&&(d.length?h.reject(l,i,o):h.resolve(l)),t.isFunction(e)&&e.call(r,l,i,o)}function s(t){a(t.target,"error"===t.type)}function a(i,e){i.src!==o&&-1===t.inArray(i,u)&&(u.push(i),e?d.push(i):c.push(i),t.data(i,"imagesLoaded",{isBroken:e,src:i.src}),m&&h.notifyWith(t(i),[e,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(e)&&t.each(e,function(t,i){"callback"===t?e=i:h&&h[t](i)}),l.length?l.bind("load.imagesLoaded error.imagesLoaded",s).each(function(e,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=o,n.src=s))}):n(),h?h.promise(r):r}}(jQuery),i.yith_magnifier=function(t,o){this.t=o,this.element=i(o),this._init(t)},i.yith_magnifier.defaults={zoomWidth:"auto",zoomHeight:"auto",position:"right",tint:!1,tintOpacity:.5,lensOpacity:.5,softFocus:!1,smoothMove:3,showTitle:!0,titleOpacity:.5,adjustX:0,adjustY:0,phoneBehavior:"inside",loadingLabel:"Loading...",enableSlider:!0,slider:"carouFredSel",sliderOptions:{},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 o=this;i.each(i.yith_magnifier.defaults.elements,function(t,e){var n=i.yith_magnifier.defaults.elements;n[t]=i(e,o)}),o.options=i.extend(!0,{},i.yith_magnifier.defaults,t),o.isPhone=o._isPhone(),o._loading(),o.element.imagesLoaded(function(){o.options.onLoad(),o._initZoom(),o._initGallery()})},_initGallery:function(){var t=this,o=t.options.elements,e=o.gallery,n=o.zoom,s=o.zoomImage;e.length>0?(e.on("click",function(o){o.preventDefault();var e=i(this);t.destroy(),n.attr("href",this.href),s.attr("src",e.data("small")).attr("title","").attr("title",e.attr("title")),i.data(t.t,"yith_magnifier",new i.yith_magnifier(t.options,t.element))}),t.options.enableSlider&&e.parents("ul")[t.options.slider](t.options.sliderOptions)):e.on("click",function(t){return t.preventDefault(),!1})},_loading:function(){if(this.options.disableRightClick&&i(document).on("contextmenu",function(){return!1}),this.mouseTrap===o){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,o=t.IMG_zoomImage;t.IMG_smallImage}t.mx=0,t.my=0,t.controlTimer=0,t.lens=null,t.tint=null,t.softFocus=null,t.zoomDiv=null,t.cw=0,t.ch=0,t.zw=0,t.destU=0,t.destV=0,t.currU=0,t.currV=0,t.mouseTrap=null;var e=t.options.elements.zoom,n=t.options.elements.zoomImage;i(".yith_magnifier_loading").remove(),this.element.find(".yith_magnifier_mousetrap")&&this.element.find(".yith_magnifier_mousetrap").remove(),this.mouseTrap=i('<div class="yith_magnifier_mousetrap" />').css({width:"100%",height:"100%",top:0,left:0}).appendTo(e.parent());var s="ontouchstart"in document.documentElement?!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=e.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=e,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("+o.src+")"}).appendTo(d),n.attr("title")&&t.options.showTitle&&i('<div class="yith_magnifier_title">'+n.attr("title")+"</div>").appendTo(t.zoomDiv),t.isPhone?"disable"!=t.options.phoneBehavior?t.zoomDiv.fadeIn(500):t.lens.fadeOut(299):t.zoomDiv.fadeIn(500),t.lens&&(t.lens.remove(),t.lens=null),t.cw=o.width<=1?n.outerWidth()/o.naturalWidth*t.zoomDiv.width():n.outerWidth()/o.width*t.zoomDiv.width(),t.ch=o.height<=1?n.outerHeight()/o.naturalHeight*t.zoomDiv.height():n.outerHeight()/o.height*t.zoomDiv.height(),t.lens=i('<div class="yith_magnifier_lens" />').css({width:t.cw,height:t.ch}).appendTo(e),t.mouseTrap.css("cursor",t.lens.css("cursor"));var 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(e),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(e),t.softFocus.append(i("<img />",{src:n.attr("src")})),0==t.lens.find("img").length&&t.lens.append(i("<img />",{src:n.attr("src")})),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,o=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>o?o=0:o>this.zoomImage.outerHeight()-this.ch&&(o=this.zoomImage.outerHeight()-this.ch),this.lens.css({left:i-2,top:o-1}),this.lens.find("img").css({width:this.zoomImage.outerWidth(),height:this.zoomImage.outerHeight(),marginLeft:-i+"px ",marginTop:-o+"px"}),this.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?o/this.zoomImage.outerHeight()*this.IMG_zoomImage.naturalHeight>>0:o/this.zoomImage.outerHeight()*this.IMG_zoomImage.height>>0,this.currU+=(this.destU-this.currU)/this.options.smoothMove,this.currV+=(this.destV-this.currV)/this.options.smoothMove,this.zoomDiv.css("background-position",-(this.currU>>0)+"px "+(-(this.currV>>0)+"px"))}this.controlTimer=setTimeout(function(){t._controlLoop()},30)},_onLeave:function(){this.options.onLeave(),this.zoomDiv&&(this.zoomDiv.remove(),this.zoomDiv=null),this._removeElements()},_removeElements:function(){this.lens&&(this.lens.remove(),this.lens=null),this.tint&&(this.tint.remove(),this.tint=null),this.softFocus&&(this.softFocus.remove(),this.softFocus=null),this.element.find(".yith_magnifier_loading").length>0&&this.element.find(".yith_magnifier_loading").remove()},_isPhone:function(){var t=navigator.userAgent.toLowerCase();return t.match(/iphone/i)||t.match(/ipod/i)||t.match(/android/i)},destroy:function(){this.zoom&&this.zoom.unwrap(),this.mouseTrap&&(this.mouseTrap.unbind(),this.mouseTrap.remove(),this.mouseTrap=null),this.zoomDiv&&(this.zoomDiv.remove(),this.zoomDiv=null),this.options.disableRightClick&&i(document).unbind(),this._removeElements(),this.options.elements.gallery.unbind(),this.element.removeData("yith_magnifier")}},i.fn.yith_magnifier=function(t){if("string"==typeof t){var o=Array.prototype.slice.call(arguments,1);this.each(function(){var e=i.data(this,"yith_magnifier");return e?i.isFunction(e[t])&&"_"!==t.charAt(0)?void e[t].apply(e,o):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 o=i.data(this,"yith_magnifier");o?i.error("yith_magnifier already istantiated."):i.data(this,"yith_magnifier",new i.yith_magnifier(t,this))});return this}}(window,jQuery);
|
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.1.
|
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.1.
|
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.1.
|
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.1.7
|
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.1.7
|
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.1.7' );
|
69 |
}
|
70 |
|
71 |
if ( ! defined( 'YITH_YWZM_FILE' ) ) {
|
plugin-fw/assets/css/yit-plugin-panel.css
CHANGED
@@ -198,6 +198,7 @@
|
|
198 |
|
199 |
|
200 |
/* Style to woocommerce panel*/
|
|
|
201 |
#plugin-fw-wc{
|
202 |
padding-top: 20px;
|
203 |
}
|
@@ -212,49 +213,59 @@
|
|
212 |
padding:0px 10px 10px ;
|
213 |
border-bottom: 1px solid #eee;
|
214 |
}
|
215 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
216 |
width: 45%;
|
217 |
float: left;
|
218 |
padding-right: 2.5%;
|
219 |
border-right: 1px solid #ebebeb;
|
220 |
padding-bottom: 2em;
|
221 |
}
|
222 |
-
|
223 |
margin-right: 0;
|
224 |
padding-right: 0;
|
225 |
padding-left: 2.5%;
|
226 |
border: 0;
|
227 |
max-width: 49%;
|
228 |
}
|
229 |
-
|
230 |
font-size: 16px;
|
231 |
margin-bottom: 20px;
|
232 |
}
|
233 |
-
|
234 |
-
display: inline-block;
|
235 |
-
}
|
236 |
-
#plugin-fw-wc .yith-video-link {
|
237 |
width: 100%;
|
238 |
max-width: 200px;
|
239 |
float: left;
|
240 |
margin: 0 1.5em 1.5em 0;
|
241 |
}
|
242 |
-
|
243 |
width: 100%;
|
244 |
max-width: 200px;
|
245 |
float: left;
|
246 |
margin: 0 1.5em 1.5em 0;
|
247 |
}
|
248 |
-
|
249 |
max-width: 100%;
|
250 |
height: auto;
|
251 |
}
|
252 |
-
|
253 |
-
#plugin-fw-wc .yith-video-link img {
|
254 |
max-width: 100%;
|
255 |
height: auto;
|
256 |
}
|
257 |
-
|
258 |
display: none;
|
259 |
|
260 |
}
|
198 |
|
199 |
|
200 |
/* Style to woocommerce panel*/
|
201 |
+
|
202 |
#plugin-fw-wc{
|
203 |
padding-top: 20px;
|
204 |
}
|
213 |
padding:0px 10px 10px ;
|
214 |
border-bottom: 1px solid #eee;
|
215 |
}
|
216 |
+
|
217 |
+
/* === VIDEO BOX === */
|
218 |
+
|
219 |
+
.yith-videobox-wrapper {
|
220 |
+
padding-top: 20px;
|
221 |
+
}
|
222 |
+
.yith-videobox-wrapper h3{
|
223 |
+
padding:0px 10px 10px ;
|
224 |
+
border-bottom: 1px solid #eee;
|
225 |
+
}
|
226 |
+
|
227 |
+
.yith-videobox-wrapper .postbox {
|
228 |
+
display: inline-block;
|
229 |
+
}
|
230 |
+
.yith-videobox-wrapper .yith_videobox .column {
|
231 |
width: 45%;
|
232 |
float: left;
|
233 |
padding-right: 2.5%;
|
234 |
border-right: 1px solid #ebebeb;
|
235 |
padding-bottom: 2em;
|
236 |
}
|
237 |
+
.yith-videobox-wrapper .yith_videobox .column.two {
|
238 |
margin-right: 0;
|
239 |
padding-right: 0;
|
240 |
padding-left: 2.5%;
|
241 |
border: 0;
|
242 |
max-width: 49%;
|
243 |
}
|
244 |
+
.yith-videobox-wrapper .yith_videobox h2{
|
245 |
font-size: 16px;
|
246 |
margin-bottom: 20px;
|
247 |
}
|
248 |
+
.yith-videobox-wrapper .yith-video-link {
|
|
|
|
|
|
|
249 |
width: 100%;
|
250 |
max-width: 200px;
|
251 |
float: left;
|
252 |
margin: 0 1.5em 1.5em 0;
|
253 |
}
|
254 |
+
.yith-videobox-wrapper .yith-video-link {
|
255 |
width: 100%;
|
256 |
max-width: 200px;
|
257 |
float: left;
|
258 |
margin: 0 1.5em 1.5em 0;
|
259 |
}
|
260 |
+
.yith-videobox-wrapper .yith-image-frame img {
|
261 |
max-width: 100%;
|
262 |
height: auto;
|
263 |
}
|
264 |
+
.yith-videobox-wrapper .yith-video-link img {
|
|
|
265 |
max-width: 100%;
|
266 |
height: auto;
|
267 |
}
|
268 |
+
.yith-videobox-wrapper .yith-video-iframe {
|
269 |
display: none;
|
270 |
|
271 |
}
|
plugin-fw/lib/yit-plugin-panel-wc.php
CHANGED
@@ -232,26 +232,6 @@ if ( ! class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
|
|
232 |
}
|
233 |
}
|
234 |
|
235 |
-
/**
|
236 |
-
* Fire the action to print the custom tab
|
237 |
-
*
|
238 |
-
* @param $current_tab string
|
239 |
-
*
|
240 |
-
* @return void
|
241 |
-
* @since 1.0
|
242 |
-
* @author Antonino Scarfì <antonino.scarfi@yithemes.com>
|
243 |
-
*/
|
244 |
-
public function print_video_box() {
|
245 |
-
$file = $this->settings['options-path'] . '/video-box.php';
|
246 |
-
|
247 |
-
if ( ! file_exists( $file ) ) {
|
248 |
-
return;
|
249 |
-
}
|
250 |
-
|
251 |
-
$args = include_once( $file );
|
252 |
-
$this->yit_videobox( $args );
|
253 |
-
}
|
254 |
-
|
255 |
/**
|
256 |
* Update options
|
257 |
*
|
232 |
}
|
233 |
}
|
234 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
235 |
/**
|
236 |
* Update options
|
237 |
*
|
plugin-fw/lib/yit-plugin-panel.php
CHANGED
@@ -75,9 +75,6 @@ if ( ! class_exists( 'YIT_Plugin_Panel' ) ) {
|
|
75 |
add_action( 'admin_bar_menu', array( &$this, 'add_admin_bar_menu' ), 100 );
|
76 |
add_action( 'admin_init', array( &$this, 'add_fields' ) );
|
77 |
|
78 |
-
/* Add VideoBox and InfoBox */
|
79 |
-
add_action( 'woocommerce_admin_field_boxinfo', array( $this, 'add_infobox' ), 10, 1 );
|
80 |
-
add_action( 'woocommerce_admin_field_videobox', array( $this, 'add_videobox' ), 10, 1 );
|
81 |
}
|
82 |
|
83 |
add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
|
@@ -118,14 +115,18 @@ if ( ! class_exists( 'YIT_Plugin_Panel' ) ) {
|
|
118 |
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
119 |
*/
|
120 |
public function admin_enqueue_scripts() {
|
|
|
|
|
|
|
121 |
//scripts
|
122 |
wp_enqueue_media();
|
123 |
wp_enqueue_script( 'jquery-ui' );
|
124 |
wp_enqueue_script( 'jquery-ui-core' );
|
125 |
wp_enqueue_script( 'jquery-ui-slider' );
|
|
|
126 |
wp_enqueue_style( 'jquery-chosen', YIT_CORE_PLUGIN_URL . '/assets/css/chosen/chosen.css' );
|
127 |
wp_enqueue_script( 'jquery-chosen', YIT_CORE_PLUGIN_URL . '/assets/js/chosen/chosen.jquery.js', array( 'jquery' ), '1.1.0', true );
|
128 |
-
wp_enqueue_script( 'yit-plugin-panel', YIT_CORE_PLUGIN_URL . '/assets/js/yit-plugin-panel.
|
129 |
wp_register_script( 'codemirror', YIT_CORE_PLUGIN_URL . '/assets/js/codemirror/codemirror.js', array( 'jquery' ), $this->version, true );
|
130 |
wp_register_script( 'codemirror-javascript', YIT_CORE_PLUGIN_URL . '/assets/js/codemirror/javascript.js', array( 'jquery', 'codemirror' ), $this->version, true );
|
131 |
|
@@ -133,9 +134,14 @@ if ( ! class_exists( 'YIT_Plugin_Panel' ) ) {
|
|
133 |
wp_register_style( 'codemirror', YIT_CORE_PLUGIN_URL . '/assets/css/codemirror/codemirror.css' );
|
134 |
|
135 |
//styles
|
|
|
|
|
|
|
136 |
wp_enqueue_style( 'jquery-ui-overcast', YIT_CORE_PLUGIN_URL . '/assets/css/overcast/jquery-ui-1.8.9.custom.css', false, '1.8.9', 'all' );
|
137 |
wp_enqueue_style( 'yit-plugin-style', YIT_CORE_PLUGIN_URL . '/assets/css/yit-plugin-panel.css', $this->version );
|
138 |
wp_enqueue_style( 'raleway-font', '//fonts.googleapis.com/css?family=Raleway:400,500,600,700,800,100,200,300,900' );
|
|
|
|
|
139 |
}
|
140 |
|
141 |
/**
|
@@ -261,6 +267,7 @@ if ( ! class_exists( 'YIT_Plugin_Panel' ) ) {
|
|
261 |
return;
|
262 |
}
|
263 |
?>
|
|
|
264 |
<div id="wrap" class="plugin-option">
|
265 |
<?php $this->message(); ?>
|
266 |
<h2><?php echo $this->get_tab_title() ?></h2>
|
@@ -754,6 +761,25 @@ if ( ! class_exists( 'YIT_Plugin_Panel' ) ) {
|
|
754 |
}
|
755 |
}
|
756 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
757 |
}
|
758 |
|
759 |
}
|
75 |
add_action( 'admin_bar_menu', array( &$this, 'add_admin_bar_menu' ), 100 );
|
76 |
add_action( 'admin_init', array( &$this, 'add_fields' ) );
|
77 |
|
|
|
|
|
|
|
78 |
}
|
79 |
|
80 |
add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
|
115 |
* @author Emanuela Castorina <emanuela.castorina@yithemes.it>
|
116 |
*/
|
117 |
public function admin_enqueue_scripts() {
|
118 |
+
|
119 |
+
global $wp_scripts;
|
120 |
+
|
121 |
//scripts
|
122 |
wp_enqueue_media();
|
123 |
wp_enqueue_script( 'jquery-ui' );
|
124 |
wp_enqueue_script( 'jquery-ui-core' );
|
125 |
wp_enqueue_script( 'jquery-ui-slider' );
|
126 |
+
wp_enqueue_script( 'jquery-ui-dialog' );
|
127 |
wp_enqueue_style( 'jquery-chosen', YIT_CORE_PLUGIN_URL . '/assets/css/chosen/chosen.css' );
|
128 |
wp_enqueue_script( 'jquery-chosen', YIT_CORE_PLUGIN_URL . '/assets/js/chosen/chosen.jquery.js', array( 'jquery' ), '1.1.0', true );
|
129 |
+
wp_enqueue_script( 'yit-plugin-panel', YIT_CORE_PLUGIN_URL . '/assets/js/yit-plugin-panel.js', array( 'jquery', 'jquery-chosen' ), $this->version, true );
|
130 |
wp_register_script( 'codemirror', YIT_CORE_PLUGIN_URL . '/assets/js/codemirror/codemirror.js', array( 'jquery' ), $this->version, true );
|
131 |
wp_register_script( 'codemirror-javascript', YIT_CORE_PLUGIN_URL . '/assets/js/codemirror/javascript.js', array( 'jquery', 'codemirror' ), $this->version, true );
|
132 |
|
134 |
wp_register_style( 'codemirror', YIT_CORE_PLUGIN_URL . '/assets/css/codemirror/codemirror.css' );
|
135 |
|
136 |
//styles
|
137 |
+
|
138 |
+
$jquery_version = isset( $wp_scripts->registered['jquery-ui-core']->ver ) ? $wp_scripts->registered['jquery-ui-core']->ver : '1.9.2';
|
139 |
+
|
140 |
wp_enqueue_style( 'jquery-ui-overcast', YIT_CORE_PLUGIN_URL . '/assets/css/overcast/jquery-ui-1.8.9.custom.css', false, '1.8.9', 'all' );
|
141 |
wp_enqueue_style( 'yit-plugin-style', YIT_CORE_PLUGIN_URL . '/assets/css/yit-plugin-panel.css', $this->version );
|
142 |
wp_enqueue_style( 'raleway-font', '//fonts.googleapis.com/css?family=Raleway:400,500,600,700,800,100,200,300,900' );
|
143 |
+
|
144 |
+
wp_enqueue_style( 'jquery-ui-style', '//code.jquery.com/ui/' . $jquery_version . '/themes/smoothness/jquery-ui.css', array(), $jquery_version );
|
145 |
}
|
146 |
|
147 |
/**
|
267 |
return;
|
268 |
}
|
269 |
?>
|
270 |
+
<?php $this->print_video_box(); ?>
|
271 |
<div id="wrap" class="plugin-option">
|
272 |
<?php $this->message(); ?>
|
273 |
<h2><?php echo $this->get_tab_title() ?></h2>
|
761 |
}
|
762 |
}
|
763 |
|
764 |
+
/**
|
765 |
+
* Fire the action to print the custom tab
|
766 |
+
*
|
767 |
+
* @return void
|
768 |
+
* @since 1.0
|
769 |
+
* @author Antonino Scarfì <antonino.scarfi@yithemes.com>
|
770 |
+
*/
|
771 |
+
public function print_video_box() {
|
772 |
+
$file = $this->settings['options-path'] . '/video-box.php';
|
773 |
+
|
774 |
+
if ( ! file_exists( $file ) ) {
|
775 |
+
return;
|
776 |
+
}
|
777 |
+
|
778 |
+
$args = include_once( $file );
|
779 |
+
|
780 |
+
$this->add_videobox( $args );
|
781 |
+
}
|
782 |
+
|
783 |
}
|
784 |
|
785 |
}
|
plugin-fw/templates/panel/videobox.php
CHANGED
@@ -38,8 +38,8 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
38 |
* ),
|
39 |
*/
|
40 |
?>
|
41 |
-
<div id="normal-sortables" class="meta-box-sortables">
|
42 |
-
<div id="<?php echo $id ?>" class="postbox
|
43 |
<h3><span><?php echo $name ?></span></h3>
|
44 |
<div class="inside">
|
45 |
<div class="yith_videobox">
|
38 |
* ),
|
39 |
*/
|
40 |
?>
|
41 |
+
<div id="normal-sortables" class="meta-box-sortables yith-videobox-wrapper">
|
42 |
+
<div id="<?php echo $id ?>" class="postbox">
|
43 |
<h3><span><?php echo $name ?></span></h3>
|
44 |
<div class="inside">
|
45 |
<div class="yith_videobox">
|