Version Description
Fix: pre PHP5.4 compatibility. Switch to wp_add_inline_script() script printing.
=
Download this release
Release Info
Developer | RavanH |
Plugin | Easy FancyBox |
Version | 1.7 |
Comparing to | |
See all releases |
Code changes from version 1.6.3 to 1.7
- easy-fancybox.php +3 -3
- fancybox/jquery.fancybox-1.3.8.min.css +0 -1
- fancybox/jquery.fancybox-1.3.8.min.js +0 -1
- fancybox/{jquery.fancybox-1.3.8.css → jquery.fancybox.css} +9 -11
- fancybox/{jquery.fancybox-1.3.8.js → jquery.fancybox.js} +115 -53
- fancybox/jquery.fancybox.min.css +1 -0
- fancybox/jquery.fancybox.min.js +1 -0
- inc/class-easyfancybox-admin.php +9 -9
- inc/class-easyfancybox-options.php +1435 -1415
- inc/class-easyfancybox.php +205 -218
- inc/translation-strings.php +14 -7
- readme.txt +42 -47
easy-fancybox.php
CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://status301.net/wordpress-plugins/easy-fancybox/
|
|
5 |
Description: Easily enable the <a href="http://fancybox.net/">FancyBox jQuery extension</a> on all image, SWF, PDF, YouTube, Dailymotion and Vimeo links. Also supports iFrame and inline content.
|
6 |
Text Domain: easy-fancybox
|
7 |
Domain Path: languages
|
8 |
-
Version: 1.
|
9 |
Author: RavanH
|
10 |
Author URI: http://status301.net/
|
11 |
*/
|
@@ -37,8 +37,8 @@ if ( ! defined( 'ABSPATH' ) ) exit;
|
|
37 |
* CONSTANTS
|
38 |
**************/
|
39 |
|
40 |
-
define( 'EASY_FANCYBOX_VERSION', '1.
|
41 |
-
define( 'FANCYBOX_VERSION', '1.3.
|
42 |
define( 'MOUSEWHEEL_VERSION', '3.1.13' );
|
43 |
define( 'EASING_VERSION', '1.4.0' );
|
44 |
define( 'METADATA_VERSION', '2.22.1' );
|
5 |
Description: Easily enable the <a href="http://fancybox.net/">FancyBox jQuery extension</a> on all image, SWF, PDF, YouTube, Dailymotion and Vimeo links. Also supports iFrame and inline content.
|
6 |
Text Domain: easy-fancybox
|
7 |
Domain Path: languages
|
8 |
+
Version: 1.7
|
9 |
Author: RavanH
|
10 |
Author URI: http://status301.net/
|
11 |
*/
|
37 |
* CONSTANTS
|
38 |
**************/
|
39 |
|
40 |
+
define( 'EASY_FANCYBOX_VERSION', '1.7' );
|
41 |
+
define( 'FANCYBOX_VERSION', '1.3.9' );
|
42 |
define( 'MOUSEWHEEL_VERSION', '3.1.13' );
|
43 |
define( 'EASING_VERSION', '1.4.0' );
|
44 |
define( 'METADATA_VERSION', '2.22.1' );
|
fancybox/jquery.fancybox-1.3.8.min.css
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
#fancybox-close,#fancybox-content,#fancybox-content>div,#fancybox-content>div>div,#fancybox-frame,#fancybox-left,#fancybox-loading,#fancybox-loading div,#fancybox-outer,#fancybox-overlay,#fancybox-right,#fancybox-title,#fancybox-title div,#fancybox-wrap,.fancy-ico,.fancybox-bg{box-sizing:content-box;-moz-box-sizing:content-box}#fancybox-loading{position:fixed;top:50%;left:50%;width:40px;height:40px;margin-top:-20px;margin-left:-20px;cursor:pointer;overflow:hidden;z-index:111104;display:none}#fancybox-loading div,#fancybox-overlay,#fancybox-wrap{left:0;top:0;position:absolute}#fancybox-loading div{width:40px;height:480px;background-image:url(fancybox.png)}#fancybox-overlay{width:100%;z-index:111100;display:none}#fancybox-tmp{padding:0;margin:0;border:0;overflow:auto;display:none}#fancybox-wrap{padding:20px;z-index:111101;outline:0;display:none}#fancybox-content,#fancybox-outer{position:relative;background:#fff}#fancybox-outer{width:100%;height:100%;box-shadow:0 0 20px #111;-moz-box-shadow:0 0 20px #111;-webkit-box-shadow:0 0 20px #111}#fancybox-content{width:0;height:0;padding:0;outline:0;overflow:hidden;z-index:111102;border:0 solid #fff;-moz-background-clip:padding;-webkit-background-clip:padding;background-clip:padding-box}#fancybox-content>div{max-width:100%;max-height:100%}#fancybox-hide-sel-frame{position:absolute;top:0;left:0;width:100%;height:100%;background:0 0;z-index:111101}#fancybox-close{position:absolute;top:-15px;right:-15px;width:30px;height:30px;background:url(fancybox.png) -40px 0;cursor:pointer;z-index:111103;display:none}#fancybox-left-ico,#fancybox-right-ico{background-image:url(fancybox.png)}#fancybox-frame,#fancybox-img{border:none;height:100%;width:100%}#fancybox-error{color:#444;font:400 12px/20px Arial;padding:14px;margin:0}#fancybox-img{padding:0;margin:0;outline:0;line-height:0;vertical-align:top;max-width:none!important;max-height:none!important}#fancybox-frame{display:block;-webkit-overflow-scrolling:touch;z-index:0;-webkit-transform: translateZ(0px);-webkit-transform: translate3d(0,0,0);-webkit-perspective:1000}#fancybox-left,#fancybox-right{position:absolute;bottom:0;height:100%;width:35%;cursor:pointer;background:initial;outline:0;z-index:111102;display:none}#fancybox-left{left:0}.rtl #fancybox-left{left:auto;right:0}#fancybox-right{right:0}.rtl #fancybox-right{left:0;right:auto}#fancybox-left-ico,#fancybox-right-ico{position:absolute;top:50%;left:-9999px;width:30px;height:30px;margin-top:-15px;cursor:pointer;z-index:111102;display:block}#fancybox-left-ico{background-position:-40px -30px}.rtl #fancybox-left-ico{background-position:-40px -60px;right:-9999px}#fancybox-right-ico{background-position:-40px -60px}.rtl #fancybox-right-ico{background-position:-40px -30px;right:-9999px}#fancybox-left:hover,#fancybox-right:hover{visibility:visible}#fancybox-left:hover span{left:20px}.rtl #fancybox-left:hover span{right:20px}#fancybox-right:hover span{left:auto;right:20px}.rtl #fancybox-right:hover span{right:auto;left:20px}#fancybox-title{font-family:Helvetica;font-size:12px;z-index:111102}.fancybox-title-inside{padding-bottom:10px;text-align:center;color:#333;position:relative}.fancybox-title-outside{padding-top:10px;color:#fff}.fancybox-title-over{position:absolute;bottom:0;left:0;color:#FFF;text-align:left}.rtl .fancybox-title-over{text-align:right}#fancybox-title-over{padding:10px;background:rgba(0,0,0,.64);display:block}.fancybox-title-float{position:absolute;left:0;bottom:-20px;height:32px}#fancybox-title-float-wrap{border:none;border-collapse:collapse;width:auto}#fancybox-title-float-wrap td{border:none;white-space:nowrap}#fancybox-title-float-left{padding:0 0 0 15px;background:url(fancybox.png) -40px -90px no-repeat}#fancybox-title-float-main{color:#fff;line-height:29px;font-weight:700;padding:0 0 3px;background:url(fancybox-x.png) 0 -40px}#fancybox-title-float-right{padding:0 0 0 15px;background:url(fancybox.png) -55px -90px no-repeat}.fancybox-hidden{display:none}
|
|
fancybox/jquery.fancybox-1.3.8.min.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
!function(a){var b,c,d,e,f,g,h,i,j,k,w,A,B,l=0,m={},n=[],o=0,p={},q=[],r=null,s=new Image,t=/\.(jpg|gif|png|bmp|jpeg|webp)(.*)?$/i,u=/[^\.]\.(swf)\s*$/i,v=/[^\.]\.(svg)\s*$/i,x=1,y=0,z="",C=!1,D=a.extend(a("<div/>")[0],{prop:0}),E=navigator.userAgent.match(/msie [6]/i)&&!window.XMLHttpRequest,F=void 0!==document.createTouch,G=function(){c.hide(),s.onerror=s.onload=null,r&&r.abort(),b.empty()},H=function(){if(!1===m.onError(n,l,m))return c.hide(),void(C=!1);m.titleShow=!1,m.width="auto",m.height="auto",b.html('<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>'),J()},I=function(){var e,f,h,i,j,k,d=n[l];if(G(),m=a.extend({},a.fn.fancybox.defaults,void 0===a(d).data("fancybox")?m:a(d).data("fancybox")),!1===(k=m.onStart(n,l,m)))return void(C=!1);if("object"==typeof k&&(m=a.extend(m,k)),h=m.title||(d.nodeName?a(d).attr("title"):d.title)||"",d.nodeName&&!m.orig&&(m.orig=a(d).find("img:first").length?a(d).find("img:first"):a(d)),""===h&&m.orig&&(h=m.titleFromAlt?m.orig.attr("alt"):m.orig.attr("title")),e=m.href||(d.nodeName?a(d).attr("href"):d.href)||null,(/^(?:javascript)/i.test(e)||"#"==e)&&(e=null),m.type?(f=m.type,e||(e=m.content)):m.content?f="html":e&&(f=e.match(t)||a(d).hasClass("image")?"image":e.match(u)?"swf":e.match(v)?"svg":a(d).hasClass("iframe")?"iframe":0===e.indexOf("#")?"inline":"ajax"),!f)return void H();switch("inline"==f&&(d=e.substr(e.indexOf("#")),f=a(d).length>0?"inline":"ajax"),m.type=f,m.href=e,m.title=h,m.autoDimensions&&("html"==m.type||"inline"==m.type||"ajax"==m.type?(m.width="auto",m.height="auto"):m.autoDimensions=!1),m.modal&&(m.overlayShow=!0,m.hideOnOverlayClick=!1,m.hideOnContentClick=!1,m.enableEscapeButton=!1,m.showCloseButton=!1),m.padding=parseInt(m.padding,10),m.margin=parseInt(m.margin,10),b.css("padding",m.padding+m.margin),a(".fancybox-inline-tmp").off("fancybox-cancel").on("fancybox-change",function(){a(this).replaceWith(g.children())}),f){case"html":b.html(m.content),J();break;case"inline":if(!0===a(d).parent().is("#fancybox-content"))return void(C=!1);a('<div class="fancybox-inline-tmp" />').hide().insertBefore(a(d)).on("fancybox-cleanup",function(){a(this).replaceWith(g.children())}).on("fancybox-cancel",function(){a(this).replaceWith(b.children())}),a(d).appendTo(b),J();break;case"image":C=!1,a.fancybox.showActivity(),s=new Image,s.onerror=function(){H()},s.onload=function(){C=!0,s.onerror=s.onload=null,K()},s.src=e;break;case"swf":m.scrolling="no",i='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+m.width+'" height="'+m.height+'"><param name="movie" value="'+e+'"></param>',j="",a.each(m.swf,function(a,b){i+='<param name="'+a+'" value="'+b+'"></param>',j+=" "+a+'="'+b+'"'}),i+='<embed src="'+e+'" type="application/x-shockwave-flash" width="'+m.width+'" height="'+m.height+'"'+j+"></embed></object>",b.html(i),J();break;case"svg":m.scrolling="no",i='<object width="'+m.width+'" height="'+m.height+'" data="'+e+'"></object>',b.html(i),J();break;case"ajax":C=!1,a.fancybox.showActivity(),m.ajax.win=m.ajax.success,r=a.ajax(a.extend({},m.ajax,{url:e,data:m.ajax.data||{},error:function(a,b,c){a.status>0&&H()},success:function(a,d,f){if(200==("object"==typeof f?f:r).status){if("function"==typeof m.ajax.win){if(!1===(k=m.ajax.win(e,a,d,f)))return void c.hide();"string"!=typeof k&&"object"!=typeof k||(a=k)}b.html(a),J()}}}));break;case"iframe":L()}},J=function(){var c=m.width,d=m.height,e=0==a(window).width()?window.innerWidth:a(window).width(),f=0==a(window).height()?window.innerHeight:a(window).height();c=c.toString().indexOf("%")>-1?parseInt((e-2*m.margin)*parseFloat(c)/100,10)+"px":"auto"==c?"auto":c+"px",d=d.toString().indexOf("%")>-1?parseInt((f-2*m.margin)*parseFloat(d)/100,10)+"px":"auto"==d?"auto":d+"px",b.wrapInner('<div style="width:'+c+";height:"+d+";overflow: "+("auto"==m.scrolling?"auto":"yes"==m.scrolling?"scroll":"hidden")+';position:relative;"></div>'),m.width=b.width(),m.height=b.height(),L()},K=function(){m.width=s.width,m.height=s.height,a("<img />").attr({id:"fancybox-img",src:s.src,alt:m.title}).appendTo(b),L()},L=function(){var f,r;return c.hide(),e.is(":visible")&&!1===p.onCleanup(q,o,p)?(a(".fancybox-inline-tmp").trigger("fancybox-cancel"),void(C=!1)):(C=!0,a(g.add(d)).off(),a(window).off("resize.fb scroll.fb"),a(document).off("keydown.fb"),e.is(":visible")&&"outside"!==p.titlePosition&&e.css("height",e.height()),q=n,o=l,p=m,p.overlayShow?(d.css({"background-color":p.overlayColor,opacity:p.overlayOpacity,cursor:p.hideOnOverlayClick?"pointer":"auto",height:a(document).height()}),d.is(":visible")||(E&&a("select:not(#fancybox-tmp select)").filter(function(){return"hidden"!==this.style.visibility}).css({visibility:"hidden"}).one("fancybox-cleanup",function(){this.style.visibility="inherit"}),d.show())):d.hide(),B=T(),N(),e.is(":visible")?(a(h.add(j).add(k)).hide(),f=e.position(),A={top:f.top,left:f.left,width:e.width(),height:e.height()},r=A.width==B.width&&A.height==B.height,void g.fadeTo(p.changeFade,.3,function(){var c=function(){g.html(b.contents()).fadeTo(p.changeFade,1,P)};a(".fancybox-inline-tmp").trigger("fancybox-change"),g.empty().removeAttr("filter").css({"border-width":p.padding,width:B.width-2*p.padding,height:m.autoDimensions?"auto":B.height-y-2*p.padding}),r?c():(D.prop=0,a(D).animate({prop:1},{duration:p.changeSpeed,easing:p.easingChange,step:R,complete:c}))})):(e.removeAttr("style"),g.css("border-width",p.padding),"elastic"==p.transitionIn?(A=V(),g.html(b.contents()),e.show(),p.opacity&&(B.opacity=0),D.prop=0,void a(D).animate({prop:1},{duration:p.speedIn,easing:p.easingIn,step:R,complete:P})):("inside"==p.titlePosition&&y>0&&i.show(),g.css({width:B.width-2*p.padding,height:m.autoDimensions?"auto":B.height-y-2*p.padding}).html(b.contents()),void e.css(B).fadeIn("none"==p.transitionIn?0:p.speedIn,P))))},M=function(a){return!(!a||!a.length)&&("float"==p.titlePosition?'<table id="fancybox-title-float-wrap" style="border-spacing:0;border-collapse:collapse"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">'+a+'</td><td id="fancybox-title-float-right"></td></tr></table>':'<div id="fancybox-title-'+p.titlePosition+'">'+a+"</div>")},N=function(){if(z=p.title||"",y=0,i.empty().removeAttr("style").removeClass(),!1===p.titleShow)return void i.hide();if(!(z=a.isFunction(p.titleFormat)?p.titleFormat(z,q,o,p):M(z))||""===z)return void i.hide();switch(i.addClass("fancybox-title-"+p.titlePosition).html(z).appendTo("body").show(),p.titlePosition){case"inside":i.css({width:B.width-2*p.padding,marginLeft:p.padding,marginRight:p.padding}),y=i.outerHeight(!0),i.appendTo(f),B.height+=y;break;case"over":i.css({marginLeft:p.padding,width:B.width-2*p.padding,bottom:p.padding}).appendTo(f);break;case"float":i.css("left",-1*parseInt((i.width()-B.width-40)/2,10)).appendTo(e);break;default:i.css({width:B.width-2*p.padding,paddingLeft:p.padding,paddingRight:p.padding}).appendTo(e)}i.hide()},O=function(){if((p.enableEscapeButton||p.enableKeyboardNav)&&a(document).on("keydown.fb",function(b){27==b.keyCode&&p.enableEscapeButton?(b.preventDefault(),a.fancybox.close()):37!=b.keyCode&&39!=b.keyCode||!p.enableKeyboardNav||"INPUT"===b.target.tagName||"TEXTAREA"===b.target.tagName||"SELECT"===b.target.tagName?9==b.keyCode&&p.enableKeyboardNav&&"INPUT"!==b.target.tagName&&"TEXTAREA"!==b.target.tagName&&"SELECT"!==b.target.tagName&&(b.preventDefault(),a.fancybox[b.shiftKey?"prev":"next"]()):(b.preventDefault(),a.fancybox[37==b.keyCode?"prev":"next"]())}),!p.showNavArrows)return j.hide(),void k.hide();(p.cyclic&&q.length>1||0!==o)&&j.show(),(p.cyclic&&q.length>1||o!=q.length-1)&&k.show()},P=function(){a.support.opacity||(g.css("filter",0),e.css("filter",0)),m.autoDimensions&&g.css("height","auto"),e.css("height","auto"),z&&z.length&&i.show(),p.showCloseButton&&h.show(),O(),p.hideOnContentClick&&g.on("click",a.fancybox.close),p.hideOnOverlayClick&&d.on("click",a.fancybox.close),p.autoResize&&a(window).on("resize.fb",a.fancybox.resize),p.centerOnScroll&&a(window).on("scroll.fb",a.fancybox.center),a.fn.mousewheel&&e.on("mousewheel.fb",function(b,c){C?b.preventDefault():"image"!=p.type||0!=a(b.target).outerHeight()&&a(b.target).prop("scrollHeight")!==a(b.target).outerHeight()||(b.preventDefault(),a.fancybox[c>0?"prev":"next"]())}),"iframe"==p.type&&a('<iframe id="fancybox-frame" name="fancybox-frame'+(new Date).getTime()+'"'+(navigator.userAgent.match(/msie [6]/i)?' allowtransparency="true""':"")+' style="border:0;margin:0;overflow:'+("auto"==m.scrolling?"auto":"yes"==m.scrolling?"scroll":"hidden")+'" src="'+p.href+'"'+(!1===p.allowfullscreen?"":" allowfullscreen")+' tabindex="999"></iframe>').appendTo(g).focus(),e.show(),C=!1,a.fancybox.center(),p.onComplete(q,o,p),Q()},Q=function(){var b,c;q.length-1>o&&void 0!==(b=q[o+1])&&void 0!==b.href&&(b.href.match(t)||a(b).hasClass("image"))&&(c=new Image,c.src=b.href),o>0&&void 0!==(b=q[o-1])&&void 0!==b.href&&(b.href.match(t)||a(b).hasClass("image"))&&(c=new Image,c.src=b.href)},R=function(a){var b={width:parseInt(A.width+(B.width-A.width)*a,10),height:parseInt(A.height+(B.height-A.height)*a,10),top:parseInt(A.top+(B.top-A.top)*a,10),left:parseInt(A.left+(B.left-A.left)*a,10)};void 0!==B.opacity&&(b.opacity=a<.5?.5:a),e.css(b),g.css({width:b.width-2*p.padding,height:b.height-y*a-2*p.padding})},S=function(){return[0==a(window).width()?window.innerWidth:a(window).width()-2*p.margin,0==a(window).height()?window.innerHeight:a(window).height()-2*p.margin,a(document).scrollLeft()+p.margin,a(document).scrollTop()+p.margin]},T=function(){var e,a=S(),b={},c=p.autoScale,d=2*p.padding;return p.width.toString().indexOf("%")>-1?b.width=parseInt(a[0]*parseFloat(p.width)/100,10):b.width=p.width+d,p.height.toString().indexOf("%")>-1?b.height=parseInt(a[1]*parseFloat(p.height)/100,10):b.height=p.height+d,c&&(b.width>a[0]||b.height>a[1])&&("image"==m.type||"svg"==m.type||"swf"==m.type?(e=p.width/p.height,b.width>a[0]&&(b.width=a[0],b.height=parseInt((b.width-d)/e+d,10)),b.height>a[1]&&(b.height=a[1],b.width=parseInt((b.height-d)*e+d,10))):(b.width=Math.min(b.width,a[0]),b.height=Math.min(b.height,a[1]))),b.top=parseInt(Math.max(a[3]-20,a[3]+.5*(a[1]-b.height-40)),10),b.left=parseInt(Math.max(a[2]-20,a[2]+.5*(a[0]-b.width-40)),10),b},U=function(a){var b=a.offset();return b.top+=parseInt(a.css("paddingTop"),10)||0,b.left+=parseInt(a.css("paddingLeft"),10)||0,b.top+=parseInt(a.css("border-top-width"),10)||0,b.left+=parseInt(a.css("border-left-width"),10)||0,b.width=a.width(),b.height=a.height(),b},V=function(){var d,e,b=!!m.orig&&a(m.orig),c={};return b&&b.length?(d=U(b),c={width:d.width+2*p.padding,height:d.height+2*p.padding,top:d.top-p.padding-20,left:d.left-p.padding-20}):(e=S(),c={width:2*p.padding,height:2*p.padding,top:parseInt(e[3]+.5*e[1],10),left:parseInt(e[2]+.5*e[0],10)}),c},W=function(){if(!c.is(":visible"))return void clearInterval(w);a("div",c).css("top",-40*x+"px"),x=(x+1)%12};a.fn.fancybox=function(b){return a(this).length?(a(this).data("fancybox",a.extend({},b,a.metadata?a(this).metadata():{})).off("click.fb").on("click.fb",function(b){if(b.preventDefault(),!C){C=!0,a(this).blur(),n=[],l=0;var c=a(this).attr("rel")||"";""==c||""==c.replace(/alternate|external|help|license|nofollow|noreferrer|noopener|\s+/gi,"")?n.push(this):(n=a('a[rel="'+c+'"], area[rel="'+c+'"]'),l=n.index(this)),I()}}),this):this},a.fancybox=function(b){var c;if(!C){if(C=!0,c=void 0!==arguments[1]?arguments[1]:{},n=[],l=parseInt(c.index,10)||0,a.isArray(b)){for(var d=0,e=b.length;d<e;d++)"object"==typeof b[d]?a(b[d]).data("fancybox",a.extend({},c,b[d])):b[d]=a({}).data("fancybox",a.extend({content:b[d]},c));n=jQuery.merge(n,b)}else"object"==typeof b?a(b).data("fancybox",a.extend({},c,b)):b=a({}).data("fancybox",a.extend({content:b},c)),n.push(b);(l>n.length||l<0)&&(l=0),I()}},a.fancybox.showActivity=function(){clearInterval(w),c.show(),w=setInterval(W,66)},a.fancybox.hideActivity=function(){c.hide()},a.fancybox.next=function(){return a.fancybox.pos(o+1)},a.fancybox.prev=function(){return a.fancybox.pos(o-1)},a.fancybox.pos=function(a){C||(a=parseInt(a),n=q,a>-1&&a<q.length?(l=a,I()):p.cyclic&&q.length>1&&(l=a>=q.length?0:q.length-1,I()))},a.fancybox.cancel=function(){C||(C=!0,a(".fancybox-inline-tmp").trigger("fancybox-cancel"),G(),m.onCancel(n,l,m),C=!1)},a.fancybox.close=function(){function b(){d.fadeOut("fast"),i.empty().hide(),e.hide(),a(".fancybox-inline-tmp").trigger("fancybox-cleanup"),g.empty(),p.onClosed(q,o,p),q=m=[],o=l=0,p=m={},C=!1}if(!C&&!e.is(":hidden")){if(C=!0,p&&!1===p.onCleanup(q,o,p))return void(C=!1);if(G(),a(h.add(j).add(k)).hide(),a(g.add(d)).off(),a(window).off("resize.fb scroll.fb mousewheel.fb"),a(document).off("keydown.fb"),g.find("iframe#fancybox-frame").attr("src",E&&/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank"),"inside"!==p.titlePosition&&i.empty(),e.stop(),"elastic"==p.transitionOut){A=V();var c=e.position();B={top:c.top,left:c.left,width:e.width(),height:e.height()},p.opacity&&(B.opacity=1),i.empty().hide(),D.prop=1,a(D).animate({prop:0},{duration:p.speedOut,easing:p.easingOut,step:R,complete:b})}else e.fadeOut("none"==p.transitionOut?0:p.speedOut,b)}},a.fancybox.resize=function(){d.is(":visible")&&d.css("height",a(document).height()),F||a.fancybox.center(!0)},a.fancybox.center=function(){var a,b;C||(b=!0===arguments[0]?1:0,a=S(),!b&&(e.width()>a[0]||e.height()>a[1])||e.stop().animate({top:parseInt(Math.max(a[3]-20,a[3]+.5*(a[1]-g.height()-40)-p.padding)),left:parseInt(Math.max(a[2]-20,a[2]+.5*(a[0]-g.width()-40)-p.padding))},"number"==typeof arguments[0]?arguments[0]:200))},a.fancybox.init=function(){a("#fancybox-wrap").length||(a("body").append(b=a('<div id="fancybox-tmp"></div>'),c=a('<div id="fancybox-loading"><div></div></div>'),d=a('<div id="fancybox-overlay"></div>'),e=a('<div id="fancybox-wrap"></div>')),f=a('<div id="fancybox-outer"></div>').append('<div class="fancybox-bg" id="fancybox-bg-n"></div><div class="fancybox-bg" id="fancybox-bg-ne"></div><div class="fancybox-bg" id="fancybox-bg-e"></div><div class="fancybox-bg" id="fancybox-bg-se"></div><div class="fancybox-bg" id="fancybox-bg-s"></div><div class="fancybox-bg" id="fancybox-bg-sw"></div><div class="fancybox-bg" id="fancybox-bg-w"></div><div class="fancybox-bg" id="fancybox-bg-nw"></div>').appendTo(e),f.append(g=a('<div id="fancybox-content"></div>'),h=a('<a id="fancybox-close"></a>'),i=a('<div id="fancybox-title"></div>'),j=a('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),k=a('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>')),h.click(a.fancybox.close),c.click(a.fancybox.cancel),j.click(function(b){b.preventDefault(),a.fancybox.prev()}),k.click(function(b){b.preventDefault(),a.fancybox.next()}),a.support.opacity||e.addClass("fancybox-ie"),E&&(c.addClass("fancybox-ie6"),e.addClass("fancybox-ie6"),a('<iframe id="fancybox-hide-sel-frame" src="'+(/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank")+'" style="overflow:hidden;border:0" tabindex="-1"></iframe>').prependTo(f)))},a.fn.fancybox.defaults={padding:10,margin:40,opacity:!1,modal:!1,cyclic:!1,allowfullscreen:!1,scrolling:"auto",width:560,height:340,autoScale:!0,autoDimensions:!0,centerOnScroll:!F,autoResize:!0,ajax:{},swf:{wmode:"opaque"},svg:{wmode:"opaque"},hideOnOverlayClick:!0,hideOnContentClick:!1,overlayShow:!0,overlayOpacity:.7,overlayColor:"#777",titleShow:!0,titlePosition:"float",titleFormat:null,titleFromAlt:!1,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",easingIn:"swing",easingOut:"swing",showCloseButton:!0,showNavArrows:!0,enableEscapeButton:!0,enableKeyboardNav:!0,onStart:function(){},onCancel:function(){},onComplete:function(){},onCleanup:function(){},onClosed:function(){},onError:function(){}},a(document).ready(function(){a.fancybox.init()})}(jQuery);
|
|
fancybox/{jquery.fancybox-1.3.8.css → jquery.fancybox.css}
RENAMED
@@ -95,7 +95,9 @@
|
|
95 |
padding: 0;
|
96 |
outline: none;
|
97 |
position: relative;
|
98 |
-
overflow: hidden
|
|
|
|
|
99 |
z-index: 111102;
|
100 |
border: 0px solid #fff;
|
101 |
background: #fff;
|
@@ -133,7 +135,6 @@
|
|
133 |
|
134 |
#fancybox-error {
|
135 |
color: #444;
|
136 |
-
font: normal 12px/20px Arial;
|
137 |
padding: 14px;
|
138 |
margin: 0;
|
139 |
}
|
@@ -156,7 +157,8 @@
|
|
156 |
|
157 |
#fancybox-frame {
|
158 |
display: block;
|
159 |
-
|
|
|
160 |
z-index: 0; /* z-index bug with -webkit-overflow-scrolling */
|
161 |
-webkit-transform: translateZ(0px);
|
162 |
-webkit-transform: translate3d(0,0,0);
|
@@ -225,10 +227,6 @@
|
|
225 |
right:-9999px
|
226 |
}
|
227 |
|
228 |
-
#fancybox-left:hover, #fancybox-right:hover {
|
229 |
-
visibility: visible; /* IE6 */
|
230 |
-
}
|
231 |
-
|
232 |
#fancybox-left:hover span {
|
233 |
left: 20px;
|
234 |
}
|
@@ -248,8 +246,6 @@
|
|
248 |
}
|
249 |
|
250 |
#fancybox-title {
|
251 |
-
font-family: Helvetica;
|
252 |
-
font-size: 12px;
|
253 |
z-index: 111102;
|
254 |
}
|
255 |
|
@@ -263,6 +259,7 @@
|
|
263 |
.fancybox-title-outside {
|
264 |
padding-top: 10px;
|
265 |
color: #fff;
|
|
|
266 |
}
|
267 |
|
268 |
.fancybox-title-over {
|
@@ -296,7 +293,7 @@
|
|
296 |
width: auto;
|
297 |
}
|
298 |
|
299 |
-
#fancybox-title-float-wrap td {
|
300 |
border: none;
|
301 |
white-space: nowrap;
|
302 |
}
|
@@ -309,7 +306,8 @@
|
|
309 |
#fancybox-title-float-main {
|
310 |
color: #fff;
|
311 |
line-height: 29px;
|
312 |
-
font-weight:
|
|
|
313 |
padding: 0 0 3px 0;
|
314 |
background: url('fancybox-x.png') 0px -40px;
|
315 |
}
|
95 |
padding: 0;
|
96 |
outline: none;
|
97 |
position: relative;
|
98 |
+
/*overflow: hidden;*/
|
99 |
+
-webkit-overflow-scrolling:touch;
|
100 |
+
overflow-y:auto;
|
101 |
z-index: 111102;
|
102 |
border: 0px solid #fff;
|
103 |
background: #fff;
|
135 |
|
136 |
#fancybox-error {
|
137 |
color: #444;
|
|
|
138 |
padding: 14px;
|
139 |
margin: 0;
|
140 |
}
|
157 |
|
158 |
#fancybox-frame {
|
159 |
display: block;
|
160 |
+
width: 100%;
|
161 |
+
height: 100%;
|
162 |
z-index: 0; /* z-index bug with -webkit-overflow-scrolling */
|
163 |
-webkit-transform: translateZ(0px);
|
164 |
-webkit-transform: translate3d(0,0,0);
|
227 |
right:-9999px
|
228 |
}
|
229 |
|
|
|
|
|
|
|
|
|
230 |
#fancybox-left:hover span {
|
231 |
left: 20px;
|
232 |
}
|
246 |
}
|
247 |
|
248 |
#fancybox-title {
|
|
|
|
|
249 |
z-index: 111102;
|
250 |
}
|
251 |
|
259 |
.fancybox-title-outside {
|
260 |
padding-top: 10px;
|
261 |
color: #fff;
|
262 |
+
font-weight: 600;
|
263 |
}
|
264 |
|
265 |
.fancybox-title-over {
|
293 |
width: auto;
|
294 |
}
|
295 |
|
296 |
+
#fancybox-title-float-wrap tr,#fancybox-title-float-wrap td {
|
297 |
border: none;
|
298 |
white-space: nowrap;
|
299 |
}
|
306 |
#fancybox-title-float-main {
|
307 |
color: #fff;
|
308 |
line-height: 29px;
|
309 |
+
font-weight: 600;
|
310 |
+
font-size: 14px;
|
311 |
padding: 0 0 3px 0;
|
312 |
background: url('fancybox-x.png') 0px -40px;
|
313 |
}
|
fancybox/{jquery.fancybox-1.3.8.js → jquery.fancybox.js}
RENAMED
@@ -7,7 +7,7 @@
|
|
7 |
* Copyright (c) 2008 - 2010 Janis Skarnelis
|
8 |
* That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated.
|
9 |
*
|
10 |
-
* Version: 1.3.4 (11/11/2010) patched and appended to 1.3.
|
11 |
* Requires: jQuery v1.7+
|
12 |
*
|
13 |
* Dual licensed under the MIT and GPL licenses:
|
@@ -28,9 +28,11 @@
|
|
28 |
* Patched for jQuery 1.9+ compat by Sabel http://sabel.bluegfx.de/wordpress/wp-content/uploads/2013/03/jquery.fancybox-1.3.4.js
|
29 |
* Line 858: exclude more rel attribute values
|
30 |
* Added SVG support by Simon Maillard simon@ogesta.fr
|
|
|
|
|
31 |
*/
|
32 |
-
|
33 |
-
var tmp, loading, overlay, wrap, outer, content, close, title, nav_left, nav_right,
|
34 |
|
35 |
selectedIndex = 0, selectedOpts = {}, selectedArray = [], currentIndex = 0, currentOpts = {}, currentArray = [],
|
36 |
|
@@ -42,14 +44,14 @@
|
|
42 |
|
43 |
isIE6 = navigator.userAgent.match(/msie [6]/i) && !window.XMLHttpRequest,
|
44 |
|
45 |
-
isTouch = document.createTouch !== undefined
|
46 |
|
47 |
/*
|
48 |
* Private methods
|
49 |
*/
|
50 |
|
51 |
_abort = function() {
|
52 |
-
|
53 |
|
54 |
imgPreloader.onerror = imgPreloader.onload = null;
|
55 |
|
@@ -62,7 +64,7 @@
|
|
62 |
|
63 |
_error = function() {
|
64 |
if (false === selectedOpts.onError(selectedArray, selectedIndex, selectedOpts)) {
|
65 |
-
|
66 |
busy = false;
|
67 |
return;
|
68 |
}
|
@@ -90,6 +92,11 @@
|
|
90 |
|
91 |
selectedOpts = $.extend({}, $.fn.fancybox.defaults, (typeof $(obj).data('fancybox') == 'undefined' ? selectedOpts : $(obj).data('fancybox')));
|
92 |
|
|
|
|
|
|
|
|
|
|
|
93 |
ret = selectedOpts.onStart(selectedArray, selectedIndex, selectedOpts);
|
94 |
|
95 |
if (ret === false) {
|
@@ -106,7 +113,7 @@
|
|
106 |
}
|
107 |
|
108 |
if (title === '' && selectedOpts.orig) {
|
109 |
-
title = selectedOpts.titleFromAlt ? selectedOpts.orig.attr('alt') :
|
110 |
}
|
111 |
|
112 |
href = selectedOpts.href || (obj.nodeName ? $(obj).attr('href') : obj.href) || null;
|
@@ -125,6 +132,9 @@
|
|
125 |
} else if (selectedOpts.content) {
|
126 |
type = 'html';
|
127 |
|
|
|
|
|
|
|
128 |
} else if (href) {
|
129 |
if (href.match(imgRegExp) || $(obj).hasClass("image")) {
|
130 |
type = 'image';
|
@@ -135,9 +145,6 @@
|
|
135 |
} else if (href.match(svgRegExp)) {
|
136 |
type = 'svg';
|
137 |
|
138 |
-
} else if ($(obj).hasClass("iframe")) {
|
139 |
-
type = 'iframe';
|
140 |
-
|
141 |
} else if (href.indexOf("#") === 0) {
|
142 |
type = 'inline';
|
143 |
|
@@ -151,6 +158,10 @@
|
|
151 |
return;
|
152 |
}
|
153 |
|
|
|
|
|
|
|
|
|
154 |
if (type == 'inline') {
|
155 |
obj = href.substr(href.indexOf("#"));
|
156 |
type = $(obj).length > 0 ? 'inline' : 'ajax';
|
@@ -213,6 +224,8 @@
|
|
213 |
break;
|
214 |
|
215 |
case 'image':
|
|
|
|
|
216 |
busy = false;
|
217 |
|
218 |
$.fancybox.showActivity();
|
@@ -236,6 +249,7 @@
|
|
236 |
|
237 |
case 'swf':
|
238 |
selectedOpts.scrolling = 'no';
|
|
|
239 |
|
240 |
str = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="' + selectedOpts.width + '" height="' + selectedOpts.height + '"><param name="movie" value="' + href + '"></param>';
|
241 |
emb = '';
|
@@ -254,6 +268,7 @@
|
|
254 |
|
255 |
case 'svg':
|
256 |
selectedOpts.scrolling = 'no';
|
|
|
257 |
|
258 |
str = '<object width="' + selectedOpts.width + '" height="' + selectedOpts.height + '" data="' + href + '"></object>';
|
259 |
|
@@ -284,7 +299,7 @@
|
|
284 |
ret = selectedOpts.ajax.win(href, data, textStatus, XMLHttpRequest);
|
285 |
|
286 |
if (ret === false) {
|
287 |
-
|
288 |
return;
|
289 |
} else if (typeof ret == 'string' || typeof ret == 'object') {
|
290 |
data = ret;
|
@@ -300,6 +315,9 @@
|
|
300 |
break;
|
301 |
|
302 |
case 'iframe':
|
|
|
|
|
|
|
303 |
_show();
|
304 |
break;
|
305 |
}
|
@@ -350,7 +368,9 @@
|
|
350 |
_show = function() {
|
351 |
var pos, equal;
|
352 |
|
353 |
-
|
|
|
|
|
354 |
|
355 |
if (wrap.is(":visible") && false === currentOpts.onCleanup(currentArray, currentIndex, currentOpts)) {
|
356 |
$('.fancybox-inline-tmp').trigger('fancybox-cancel');
|
@@ -363,7 +383,7 @@
|
|
363 |
|
364 |
$(content.add( overlay )).off();
|
365 |
|
366 |
-
$(window).off("resize.fb scroll.fb");
|
367 |
$(document).off('keydown.fb');
|
368 |
|
369 |
if (wrap.is(":visible") && currentOpts.titlePosition !== 'outside') {
|
@@ -390,7 +410,6 @@
|
|
390 |
this.style.visibility = 'inherit';
|
391 |
});
|
392 |
}
|
393 |
-
|
394 |
overlay.show();
|
395 |
}
|
396 |
} else {
|
@@ -433,7 +452,6 @@
|
|
433 |
|
434 |
if (equal) {
|
435 |
finish_resizing();
|
436 |
-
|
437 |
} else {
|
438 |
fx.prop = 0;
|
439 |
|
@@ -538,12 +556,10 @@
|
|
538 |
'width' : final_pos.width - (currentOpts.padding * 2),
|
539 |
'marginLeft' : currentOpts.padding,
|
540 |
'marginRight' : currentOpts.padding
|
541 |
-
});
|
542 |
|
543 |
titleHeight = title.outerHeight(true);
|
544 |
|
545 |
-
title.appendTo( outer );
|
546 |
-
|
547 |
final_pos.height += titleHeight;
|
548 |
break;
|
549 |
|
@@ -559,8 +575,8 @@
|
|
559 |
|
560 |
case 'float':
|
561 |
title
|
562 |
-
.css('left', parseInt((title.width() - final_pos.width
|
563 |
-
.appendTo(
|
564 |
break;
|
565 |
|
566 |
default:
|
@@ -615,7 +631,7 @@
|
|
615 |
}
|
616 |
|
617 |
if (selectedOpts.autoDimensions) {
|
618 |
-
content.css('height',
|
619 |
}
|
620 |
|
621 |
wrap.css('height', 'auto');
|
@@ -652,13 +668,18 @@
|
|
652 |
e.preventDefault();
|
653 |
} else if ( currentOpts.type == 'image' && ( $(e.target).outerHeight() == 0 || $(e.target).prop('scrollHeight') === $(e.target).outerHeight() ) ) {
|
654 |
e.preventDefault();
|
655 |
-
$.fancybox[ delta > 0 ? 'prev' : 'next']();
|
656 |
}
|
657 |
});
|
658 |
}
|
659 |
|
660 |
if (currentOpts.type == 'iframe') {
|
661 |
-
$('<iframe id="fancybox-frame" name="fancybox-frame' + new Date().getTime() + '"' + (navigator.userAgent.match(/msie [6]/i) ? ' allowtransparency="true""' : '')
|
|
|
|
|
|
|
|
|
|
|
662 |
}
|
663 |
|
664 |
wrap.show();
|
@@ -717,8 +738,8 @@
|
|
717 |
|
718 |
_get_viewport = function() {
|
719 |
return [
|
720 |
-
|
721 |
-
|
722 |
$(document).scrollLeft() + currentOpts.margin,
|
723 |
$(document).scrollTop() + currentOpts.margin
|
724 |
];
|
@@ -727,7 +748,6 @@
|
|
727 |
_get_zoom_to = function () {
|
728 |
var view = _get_viewport(),
|
729 |
to = {},
|
730 |
-
resize = currentOpts.autoScale,
|
731 |
double_padding = currentOpts.padding * 2,
|
732 |
ratio;
|
733 |
|
@@ -743,9 +763,9 @@
|
|
743 |
to.height = currentOpts.height + double_padding;
|
744 |
}
|
745 |
|
746 |
-
if (
|
747 |
-
if (
|
748 |
-
ratio =
|
749 |
|
750 |
if ((to.width ) > view[0]) {
|
751 |
to.width = view[0];
|
@@ -756,7 +776,6 @@
|
|
756 |
to.height = view[1];
|
757 |
to.width = parseInt(((to.height - double_padding) * ratio) + double_padding, 10);
|
758 |
}
|
759 |
-
|
760 |
} else {
|
761 |
to.width = Math.min(to.width, view[0]);
|
762 |
to.height = Math.min(to.height, view[1]);
|
@@ -796,7 +815,7 @@
|
|
796 |
from = {
|
797 |
width : pos.width + (currentOpts.padding * 2),
|
798 |
height : pos.height + (currentOpts.padding * 2),
|
799 |
-
top
|
800 |
left : pos.left - currentOpts.padding - 20
|
801 |
};
|
802 |
|
@@ -806,8 +825,8 @@
|
|
806 |
from = {
|
807 |
width : currentOpts.padding * 2,
|
808 |
height : currentOpts.padding * 2,
|
809 |
-
top
|
810 |
-
left : parseInt(view[2] + view[0] * 0.5, 10)
|
811 |
};
|
812 |
}
|
813 |
|
@@ -820,7 +839,7 @@
|
|
820 |
return;
|
821 |
}
|
822 |
|
823 |
-
$('div', loading).css('top', (loadingFrame * -40) + 'px');
|
824 |
|
825 |
loadingFrame = (loadingFrame + 1) % 12;
|
826 |
};
|
@@ -860,7 +879,7 @@
|
|
860 |
selectedIndex = selectedArray.index( this );
|
861 |
}
|
862 |
|
863 |
-
_start();
|
864 |
|
865 |
return;
|
866 |
});
|
@@ -881,7 +900,7 @@
|
|
881 |
selectedArray = [];
|
882 |
selectedIndex = parseInt(opts.index, 10) || 0;
|
883 |
|
884 |
-
if ($.isArray(obj)) {
|
885 |
for (var i = 0, j = obj.length; i < j; i++) {
|
886 |
if (typeof obj[i] == 'object') {
|
887 |
$(obj[i]).data('fancybox', $.extend({}, opts, obj[i]));
|
@@ -893,7 +912,7 @@
|
|
893 |
selectedArray = jQuery.merge(selectedArray, obj);
|
894 |
|
895 |
} else {
|
896 |
-
if (typeof obj == 'object') {
|
897 |
$(obj).data('fancybox', $.extend({}, opts, obj));
|
898 |
} else {
|
899 |
obj = $({}).data('fancybox', $.extend({content : obj}, opts));
|
@@ -913,7 +932,7 @@
|
|
913 |
clearInterval(loadingTimer);
|
914 |
|
915 |
loading.show();
|
916 |
-
loadingTimer = setInterval(_animate_loading, 66);
|
917 |
};
|
918 |
|
919 |
$.fancybox.hideActivity = function() {
|
@@ -921,11 +940,11 @@
|
|
921 |
};
|
922 |
|
923 |
$.fancybox.next = function() {
|
924 |
-
return $.fancybox.pos( currentIndex + 1);
|
925 |
};
|
926 |
|
927 |
$.fancybox.prev = function() {
|
928 |
-
return $.fancybox.pos( currentIndex - 1);
|
929 |
};
|
930 |
|
931 |
$.fancybox.pos = function(pos) {
|
@@ -940,7 +959,6 @@
|
|
940 |
if (pos > -1 && pos < currentArray.length) {
|
941 |
selectedIndex = pos;
|
942 |
_start();
|
943 |
-
|
944 |
} else if (currentOpts.cyclic && currentArray.length > 1) {
|
945 |
selectedIndex = pos >= currentArray.length ? 0 : currentArray.length - 1;
|
946 |
_start();
|
@@ -984,7 +1002,7 @@
|
|
984 |
|
985 |
$(content.add( overlay )).off();
|
986 |
|
987 |
-
$(window).off("resize.fb scroll.fb mousewheel.fb");
|
988 |
$(document).off('keydown.fb');
|
989 |
|
990 |
content.find('iframe#fancybox-frame').attr('src', isIE6 && /^https/i.test(window.location.href || '') ? 'javascript:void(false)' : 'about:blank');
|
@@ -1020,7 +1038,7 @@
|
|
1020 |
var pos = wrap.position();
|
1021 |
|
1022 |
final_pos = {
|
1023 |
-
top
|
1024 |
left : pos.left,
|
1025 |
width : wrap.width(),
|
1026 |
height : wrap.height()
|
@@ -1044,17 +1062,59 @@
|
|
1044 |
} else {
|
1045 |
wrap.fadeOut( currentOpts.transitionOut == 'none' ? 0 : currentOpts.speedOut, _cleanup);
|
1046 |
}
|
|
|
1047 |
};
|
1048 |
|
1049 |
$.fancybox.resize = function() {
|
1050 |
-
|
1051 |
-
overlay.css('height', $(document).height());
|
1052 |
-
}
|
1053 |
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
1057 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1058 |
};
|
1059 |
|
1060 |
$.fancybox.center = function() {
|
@@ -1076,7 +1136,7 @@
|
|
1076 |
.animate({
|
1077 |
'top' : parseInt(Math.max(view[3] - 20, view[3] + ((view[1] - content.height() - 40) * 0.5) - currentOpts.padding)),
|
1078 |
'left' : parseInt(Math.max(view[2] - 20, view[2] + ((view[0] - content.width() - 40) * 0.5) - currentOpts.padding))
|
1079 |
-
}, typeof arguments[0] == 'number' ? arguments[0] :
|
1080 |
};
|
1081 |
|
1082 |
$.fancybox.init = function() {
|
@@ -1144,7 +1204,9 @@
|
|
1144 |
autoScale : true,
|
1145 |
autoDimensions : true,
|
1146 |
centerOnScroll : !isTouch,
|
1147 |
-
autoResize : true,
|
|
|
|
|
1148 |
|
1149 |
ajax : {},
|
1150 |
swf : { wmode: 'opaque' },
|
@@ -1160,7 +1222,7 @@
|
|
1160 |
titleShow : true,
|
1161 |
titlePosition : 'float', // 'float', 'outside', 'inside' or 'over'
|
1162 |
titleFormat : null,
|
1163 |
-
titleFromAlt :
|
1164 |
|
1165 |
transitionIn : 'fade', // 'elastic', 'fade' or 'none'
|
1166 |
transitionOut : 'fade', // 'elastic', 'fade' or 'none'
|
7 |
* Copyright (c) 2008 - 2010 Janis Skarnelis
|
8 |
* That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated.
|
9 |
*
|
10 |
+
* Version: 1.3.4 (11/11/2010) patched and appended to 1.3.9
|
11 |
* Requires: jQuery v1.7+
|
12 |
*
|
13 |
* Dual licensed under the MIT and GPL licenses:
|
28 |
* Patched for jQuery 1.9+ compat by Sabel http://sabel.bluegfx.de/wordpress/wp-content/uploads/2013/03/jquery.fancybox-1.3.4.js
|
29 |
* Line 858: exclude more rel attribute values
|
30 |
* Added SVG support by Simon Maillard simon@ogesta.fr
|
31 |
+
* iframe content with fixed width/height settings respect aspect ratio on small screens
|
32 |
+
* true frame resizing on screen reorientation, added recenter public method
|
33 |
*/
|
34 |
+
(function($) {
|
35 |
+
var tmp, loading, overlay, wrap, outer, content, close, title, nav_left, nav_right, resize_timeout,
|
36 |
|
37 |
selectedIndex = 0, selectedOpts = {}, selectedArray = [], currentIndex = 0, currentOpts = {}, currentArray = [],
|
38 |
|
44 |
|
45 |
isIE6 = navigator.userAgent.match(/msie [6]/i) && !window.XMLHttpRequest,
|
46 |
|
47 |
+
isTouch = document.createTouch !== undefined;
|
48 |
|
49 |
/*
|
50 |
* Private methods
|
51 |
*/
|
52 |
|
53 |
_abort = function() {
|
54 |
+
$.fancybox.hideActivity();
|
55 |
|
56 |
imgPreloader.onerror = imgPreloader.onload = null;
|
57 |
|
64 |
|
65 |
_error = function() {
|
66 |
if (false === selectedOpts.onError(selectedArray, selectedIndex, selectedOpts)) {
|
67 |
+
$.fancybox.hideActivity();
|
68 |
busy = false;
|
69 |
return;
|
70 |
}
|
92 |
|
93 |
selectedOpts = $.extend({}, $.fn.fancybox.defaults, (typeof $(obj).data('fancybox') == 'undefined' ? selectedOpts : $(obj).data('fancybox')));
|
94 |
|
95 |
+
if ( document.documentElement.clientWidth < selectedOpts.minViewportWidth ) {
|
96 |
+
busy = false;
|
97 |
+
return;
|
98 |
+
}
|
99 |
+
|
100 |
ret = selectedOpts.onStart(selectedArray, selectedIndex, selectedOpts);
|
101 |
|
102 |
if (ret === false) {
|
113 |
}
|
114 |
|
115 |
if (title === '' && selectedOpts.orig) {
|
116 |
+
title = selectedOpts.orig.attr('title') || (selectedOpts.titleFromAlt ? selectedOpts.orig.attr('alt') : '');
|
117 |
}
|
118 |
|
119 |
href = selectedOpts.href || (obj.nodeName ? $(obj).attr('href') : obj.href) || null;
|
132 |
} else if (selectedOpts.content) {
|
133 |
type = 'html';
|
134 |
|
135 |
+
} else if ( $(obj).hasClass('iframe') ) {
|
136 |
+
type = 'iframe';
|
137 |
+
|
138 |
} else if (href) {
|
139 |
if (href.match(imgRegExp) || $(obj).hasClass("image")) {
|
140 |
type = 'image';
|
145 |
} else if (href.match(svgRegExp)) {
|
146 |
type = 'svg';
|
147 |
|
|
|
|
|
|
|
148 |
} else if (href.indexOf("#") === 0) {
|
149 |
type = 'inline';
|
150 |
|
158 |
return;
|
159 |
}
|
160 |
|
161 |
+
if ($(obj).hasClass('modal')) {
|
162 |
+
selectedOpts.modal = true;
|
163 |
+
}
|
164 |
+
|
165 |
if (type == 'inline') {
|
166 |
obj = href.substr(href.indexOf("#"));
|
167 |
type = $(obj).length > 0 ? 'inline' : 'ajax';
|
224 |
break;
|
225 |
|
226 |
case 'image':
|
227 |
+
selectedOpts.keepRatio = true;
|
228 |
+
|
229 |
busy = false;
|
230 |
|
231 |
$.fancybox.showActivity();
|
249 |
|
250 |
case 'swf':
|
251 |
selectedOpts.scrolling = 'no';
|
252 |
+
selectedOpts.keepRatio = true;
|
253 |
|
254 |
str = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="' + selectedOpts.width + '" height="' + selectedOpts.height + '"><param name="movie" value="' + href + '"></param>';
|
255 |
emb = '';
|
268 |
|
269 |
case 'svg':
|
270 |
selectedOpts.scrolling = 'no';
|
271 |
+
selectedOpts.keepRatio = true;
|
272 |
|
273 |
str = '<object width="' + selectedOpts.width + '" height="' + selectedOpts.height + '" data="' + href + '"></object>';
|
274 |
|
299 |
ret = selectedOpts.ajax.win(href, data, textStatus, XMLHttpRequest);
|
300 |
|
301 |
if (ret === false) {
|
302 |
+
$.fancybox.hideActivity();
|
303 |
return;
|
304 |
} else if (typeof ret == 'string' || typeof ret == 'object') {
|
305 |
data = ret;
|
315 |
break;
|
316 |
|
317 |
case 'iframe':
|
318 |
+
|
319 |
+
$.fancybox.showActivity();
|
320 |
+
|
321 |
_show();
|
322 |
break;
|
323 |
}
|
368 |
_show = function() {
|
369 |
var pos, equal;
|
370 |
|
371 |
+
if (selectedOpts.type !== 'iframe') {
|
372 |
+
$.fancybox.hideActivity();
|
373 |
+
}
|
374 |
|
375 |
if (wrap.is(":visible") && false === currentOpts.onCleanup(currentArray, currentIndex, currentOpts)) {
|
376 |
$('.fancybox-inline-tmp').trigger('fancybox-cancel');
|
383 |
|
384 |
$(content.add( overlay )).off();
|
385 |
|
386 |
+
$(window).off("orientationchange.fb resize.fb scroll.fb");
|
387 |
$(document).off('keydown.fb');
|
388 |
|
389 |
if (wrap.is(":visible") && currentOpts.titlePosition !== 'outside') {
|
410 |
this.style.visibility = 'inherit';
|
411 |
});
|
412 |
}
|
|
|
413 |
overlay.show();
|
414 |
}
|
415 |
} else {
|
452 |
|
453 |
if (equal) {
|
454 |
finish_resizing();
|
|
|
455 |
} else {
|
456 |
fx.prop = 0;
|
457 |
|
556 |
'width' : final_pos.width - (currentOpts.padding * 2),
|
557 |
'marginLeft' : currentOpts.padding,
|
558 |
'marginRight' : currentOpts.padding
|
559 |
+
}).appendTo( outer );
|
560 |
|
561 |
titleHeight = title.outerHeight(true);
|
562 |
|
|
|
|
|
563 |
final_pos.height += titleHeight;
|
564 |
break;
|
565 |
|
575 |
|
576 |
case 'float':
|
577 |
title
|
578 |
+
.css('left', parseInt( ( title.width() - final_pos.width ) / 2, 10 ) * -1 )
|
579 |
+
.appendTo( outer );
|
580 |
break;
|
581 |
|
582 |
default:
|
631 |
}
|
632 |
|
633 |
if (selectedOpts.autoDimensions) {
|
634 |
+
content.css('height','auto');
|
635 |
}
|
636 |
|
637 |
wrap.css('height', 'auto');
|
668 |
e.preventDefault();
|
669 |
} else if ( currentOpts.type == 'image' && ( $(e.target).outerHeight() == 0 || $(e.target).prop('scrollHeight') === $(e.target).outerHeight() ) ) {
|
670 |
e.preventDefault();
|
671 |
+
$.fancybox[ delta > 0 ? 'prev' : 'next' ]();
|
672 |
}
|
673 |
});
|
674 |
}
|
675 |
|
676 |
if (currentOpts.type == 'iframe') {
|
677 |
+
$('<iframe id="fancybox-frame" name="fancybox-frame' + new Date().getTime() + '"' + (navigator.userAgent.match(/msie [6]/i) ? ' allowtransparency="true""' : '')
|
678 |
+
+ ' style="border:0;margin:0;overflow:' + (selectedOpts.scrolling == 'auto' ? 'auto' : (selectedOpts.scrolling == 'yes' ? 'scroll' : 'hidden')) + '" src="'
|
679 |
+
+ currentOpts.href + '"' + (false === currentOpts.allowfullscreen ? '' : ' allowfullscreen') + ' tabindex="999"></iframe>')
|
680 |
+
.appendTo(content).load(function() {
|
681 |
+
$.fancybox.hideActivity();
|
682 |
+
}).focus();
|
683 |
}
|
684 |
|
685 |
wrap.show();
|
738 |
|
739 |
_get_viewport = function() {
|
740 |
return [
|
741 |
+
document.documentElement.clientWidth - (currentOpts.margin * 2),
|
742 |
+
document.documentElement.clientHeight - (currentOpts.margin * 2),
|
743 |
$(document).scrollLeft() + currentOpts.margin,
|
744 |
$(document).scrollTop() + currentOpts.margin
|
745 |
];
|
748 |
_get_zoom_to = function () {
|
749 |
var view = _get_viewport(),
|
750 |
to = {},
|
|
|
751 |
double_padding = currentOpts.padding * 2,
|
752 |
ratio;
|
753 |
|
763 |
to.height = currentOpts.height + double_padding;
|
764 |
}
|
765 |
|
766 |
+
if (currentOpts.autoScale && (to.width > view[0] || to.height > view[1])) {
|
767 |
+
if (currentOpts.keepRatio) {
|
768 |
+
ratio = currentOpts.width / currentOpts.height;
|
769 |
|
770 |
if ((to.width ) > view[0]) {
|
771 |
to.width = view[0];
|
776 |
to.height = view[1];
|
777 |
to.width = parseInt(((to.height - double_padding) * ratio) + double_padding, 10);
|
778 |
}
|
|
|
779 |
} else {
|
780 |
to.width = Math.min(to.width, view[0]);
|
781 |
to.height = Math.min(to.height, view[1]);
|
815 |
from = {
|
816 |
width : pos.width + (currentOpts.padding * 2),
|
817 |
height : pos.height + (currentOpts.padding * 2),
|
818 |
+
top : pos.top - currentOpts.padding - 20,
|
819 |
left : pos.left - currentOpts.padding - 20
|
820 |
};
|
821 |
|
825 |
from = {
|
826 |
width : currentOpts.padding * 2,
|
827 |
height : currentOpts.padding * 2,
|
828 |
+
top : parseInt((view[3] + view[1]) * 0.5, 10),
|
829 |
+
left : parseInt((view[2] + view[0]) * 0.5, 10)
|
830 |
};
|
831 |
}
|
832 |
|
839 |
return;
|
840 |
}
|
841 |
|
842 |
+
$('div', loading).css('top', (loadingFrame * - 40 ) + 'px');
|
843 |
|
844 |
loadingFrame = (loadingFrame + 1) % 12;
|
845 |
};
|
879 |
selectedIndex = selectedArray.index( this );
|
880 |
}
|
881 |
|
882 |
+
_start(e);
|
883 |
|
884 |
return;
|
885 |
});
|
900 |
selectedArray = [];
|
901 |
selectedIndex = parseInt(opts.index, 10) || 0;
|
902 |
|
903 |
+
if ( $.isArray(obj) ) {
|
904 |
for (var i = 0, j = obj.length; i < j; i++) {
|
905 |
if (typeof obj[i] == 'object') {
|
906 |
$(obj[i]).data('fancybox', $.extend({}, opts, obj[i]));
|
912 |
selectedArray = jQuery.merge(selectedArray, obj);
|
913 |
|
914 |
} else {
|
915 |
+
if ( typeof obj == 'object' ) {
|
916 |
$(obj).data('fancybox', $.extend({}, opts, obj));
|
917 |
} else {
|
918 |
obj = $({}).data('fancybox', $.extend({content : obj}, opts));
|
932 |
clearInterval(loadingTimer);
|
933 |
|
934 |
loading.show();
|
935 |
+
loadingTimer = setInterval( _animate_loading, 66 );
|
936 |
};
|
937 |
|
938 |
$.fancybox.hideActivity = function() {
|
940 |
};
|
941 |
|
942 |
$.fancybox.next = function() {
|
943 |
+
return $.fancybox.pos( currentIndex + 1 );
|
944 |
};
|
945 |
|
946 |
$.fancybox.prev = function() {
|
947 |
+
return $.fancybox.pos( currentIndex - 1 );
|
948 |
};
|
949 |
|
950 |
$.fancybox.pos = function(pos) {
|
959 |
if (pos > -1 && pos < currentArray.length) {
|
960 |
selectedIndex = pos;
|
961 |
_start();
|
|
|
962 |
} else if (currentOpts.cyclic && currentArray.length > 1) {
|
963 |
selectedIndex = pos >= currentArray.length ? 0 : currentArray.length - 1;
|
964 |
_start();
|
1002 |
|
1003 |
$(content.add( overlay )).off();
|
1004 |
|
1005 |
+
$(window).off("orientationchange.fb resize.fb scroll.fb mousewheel.fb");
|
1006 |
$(document).off('keydown.fb');
|
1007 |
|
1008 |
content.find('iframe#fancybox-frame').attr('src', isIE6 && /^https/i.test(window.location.href || '') ? 'javascript:void(false)' : 'about:blank');
|
1038 |
var pos = wrap.position();
|
1039 |
|
1040 |
final_pos = {
|
1041 |
+
top : pos.top ,
|
1042 |
left : pos.left,
|
1043 |
width : wrap.width(),
|
1044 |
height : wrap.height()
|
1062 |
} else {
|
1063 |
wrap.fadeOut( currentOpts.transitionOut == 'none' ? 0 : currentOpts.speedOut, _cleanup);
|
1064 |
}
|
1065 |
+
|
1066 |
};
|
1067 |
|
1068 |
$.fancybox.resize = function() {
|
1069 |
+
var pos;
|
|
|
|
|
1070 |
|
1071 |
+
clearTimeout( resize_timeout );
|
1072 |
+
|
1073 |
+
resize_timeout = setTimeout( function() {
|
1074 |
+
var finish_resizing = function() {
|
1075 |
+
if (selectedOpts.autoDimensions) {
|
1076 |
+
content.css('height','auto');
|
1077 |
+
}
|
1078 |
+
|
1079 |
+
wrap.css('height', 'auto');
|
1080 |
+
|
1081 |
+
if (titleStr && titleStr.length) {
|
1082 |
+
title.show();
|
1083 |
+
}
|
1084 |
+
|
1085 |
+
busy = false;
|
1086 |
+
|
1087 |
+
$.fancybox.center(true);
|
1088 |
+
};
|
1089 |
+
|
1090 |
+
if (overlay.is(':visible')) {
|
1091 |
+
overlay.css('height', $(document).height());
|
1092 |
+
}
|
1093 |
+
|
1094 |
+
pos = wrap.position(),
|
1095 |
+
|
1096 |
+
start_pos = {
|
1097 |
+
top : pos.top,
|
1098 |
+
left : pos.left,
|
1099 |
+
width : wrap.width(),
|
1100 |
+
height : wrap.height()
|
1101 |
+
};
|
1102 |
+
|
1103 |
+
final_pos = _get_zoom_to();
|
1104 |
+
|
1105 |
+
busy = true;
|
1106 |
+
|
1107 |
+
_process_title();
|
1108 |
+
|
1109 |
+
fx.prop = 0;
|
1110 |
+
|
1111 |
+
$(fx).animate({prop: 1}, {
|
1112 |
+
duration : currentOpts.changeSpeed,
|
1113 |
+
easing : currentOpts.easingChange,
|
1114 |
+
step : _draw,
|
1115 |
+
complete : finish_resizing
|
1116 |
+
});
|
1117 |
+
}, 500 );
|
1118 |
};
|
1119 |
|
1120 |
$.fancybox.center = function() {
|
1136 |
.animate({
|
1137 |
'top' : parseInt(Math.max(view[3] - 20, view[3] + ((view[1] - content.height() - 40) * 0.5) - currentOpts.padding)),
|
1138 |
'left' : parseInt(Math.max(view[2] - 20, view[2] + ((view[0] - content.width() - 40) * 0.5) - currentOpts.padding))
|
1139 |
+
}, typeof arguments[0] == 'number' ? arguments[0] : 300);
|
1140 |
};
|
1141 |
|
1142 |
$.fancybox.init = function() {
|
1204 |
autoScale : true,
|
1205 |
autoDimensions : true,
|
1206 |
centerOnScroll : !isTouch,
|
1207 |
+
autoResize : true,
|
1208 |
+
keepRatio : false,
|
1209 |
+
minViewportWidth : 0,
|
1210 |
|
1211 |
ajax : {},
|
1212 |
swf : { wmode: 'opaque' },
|
1222 |
titleShow : true,
|
1223 |
titlePosition : 'float', // 'float', 'outside', 'inside' or 'over'
|
1224 |
titleFormat : null,
|
1225 |
+
titleFromAlt : true,
|
1226 |
|
1227 |
transitionIn : 'fade', // 'elastic', 'fade' or 'none'
|
1228 |
transitionOut : 'fade', // 'elastic', 'fade' or 'none'
|
fancybox/jquery.fancybox.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
#fancybox-loading,#fancybox-loading div,#fancybox-overlay,#fancybox-wrap,.fancybox-bg,#fancybox-outer,#fancybox-content,#fancybox-content>div,#fancybox-content>div>div,#fancybox-frame,#fancybox-close,#fancybox-title,#fancybox-title div,#fancybox-left,#fancybox-right,.fancy-ico{box-sizing:content-box;-moz-box-sizing:content-box}#fancybox-loading{position:fixed;top:50%;left:50%;width:40px;height:40px;margin-top:-20px;margin-left:-20px;cursor:pointer;overflow:hidden;z-index:111104;display:none}#fancybox-loading div{position:absolute;top:0;left:0;width:40px;height:480px;background-image:url('fancybox.png')}#fancybox-overlay{position:absolute;top:0;left:0;width:100%;z-index:111100;display:none}#fancybox-tmp{padding:0;margin:0;border:0;overflow:auto;display:none}#fancybox-wrap{position:absolute;top:0;left:0;padding:20px;z-index:111101;outline:0;display:none}#fancybox-outer{position:relative;width:100%;height:100%;background:#fff;box-shadow:0 0 20px #111;-moz-box-shadow:0 0 20px #111;-webkit-box-shadow:0 0 20px #111}#fancybox-content{width:0;height:0;padding:0;outline:0;position:relative;-webkit-overflow-scrolling:touch;overflow-y:auto;z-index:111102;border:0 solid #fff;background:#fff;-moz-background-clip:padding;-webkit-background-clip:padding;background-clip:padding-box}#fancybox-content>div{max-width:100%;max-height:100%}#fancybox-hide-sel-frame{position:absolute;top:0;left:0;width:100%;height:100%;background:transparent;z-index:111101}#fancybox-close{position:absolute;top:-15px;right:-15px;width:30px;height:30px;background:transparent url('fancybox.png') -40px 0;cursor:pointer;z-index:111103;display:none}#fancybox-error{color:#444;padding:14px;margin:0}#fancybox-frame,#fancybox-img{width:100%;height:100%;border:0}#fancybox-img{padding:0;margin:0;outline:0;line-height:0;vertical-align:top;max-width:none!important;max-height:none!important}#fancybox-frame{display:block;width:100%;height:100%;z-index:0;-webkit-transform:translateZ(0px);-webkit-transform:translate3d(0,0,0);-webkit-perspective:1000}#fancybox-left,#fancybox-right{position:absolute;bottom:0;height:100%;width:35%;cursor:pointer;background:initial;outline:0;z-index:111102;display:none}#fancybox-left{left:0}.rtl #fancybox-left{left:auto;right:0}#fancybox-right{right:0}.rtl #fancybox-right{left:0;right:auto}#fancybox-left-ico,#fancybox-right-ico{position:absolute;top:50%;left:-9999px;width:30px;height:30px;margin-top:-15px;cursor:pointer;z-index:111102;display:block}#fancybox-left-ico{background-image:url('fancybox.png');background-position:-40px -30px}.rtl #fancybox-left-ico{background-position:-40px -60px;right:-9999px}#fancybox-right-ico{background-image:url('fancybox.png');background-position:-40px -60px}.rtl #fancybox-right-ico{background-position:-40px -30px;right:-9999px}#fancybox-left:hover span{left:20px}.rtl #fancybox-left:hover span{right:20px}#fancybox-right:hover span{left:auto;right:20px}.rtl #fancybox-right:hover span{right:auto;left:20px}#fancybox-title{z-index:111102}.fancybox-title-inside{padding-bottom:10px;text-align:center;color:#333;position:relative}.fancybox-title-outside{padding-top:10px;color:#fff;font-weight:600}.fancybox-title-over{position:absolute;bottom:0;left:0;color:#FFF;text-align:left}.rtl .fancybox-title-over{text-align:right}#fancybox-title-over{padding:10px;background:rgba(0,0,0,.64);display:block}.fancybox-title-float{position:absolute;left:0;bottom:-20px;height:32px}#fancybox-title-float-wrap{border:0;border-collapse:collapse;width:auto}#fancybox-title-float-wrap tr,#fancybox-title-float-wrap td{border:0;white-space:nowrap}#fancybox-title-float-left{padding:0 0 0 15px;background:url('fancybox.png') -40px -90px no-repeat}#fancybox-title-float-main{color:#fff;line-height:29px;font-weight:600;font-size:14px;padding:0 0 3px 0;background:url('fancybox-x.png') 0 -40px}#fancybox-title-float-right{padding:0 0 0 15px;background:url('fancybox.png') -55px -90px no-repeat}.fancybox-hidden{display:none}
|
fancybox/jquery.fancybox.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(function(l){var D,j,B,r,c,z,w,G,v,i,F,g=0,y={},h=[],d=0,a={},e=[],k=null,E=new Image(),u=/\.(jpg|gif|png|bmp|jpeg|webp)(.*)?$/i,p=/[^\.]\.(swf)\s*$/i,A=/[^\.]\.(svg)\s*$/i,m,o=1,q=0,b="",t,n,C=false,f=l.extend(l("<div/>")[0],{prop:0}),x=navigator.userAgent.match(/msie [6]/i)&&!window.XMLHttpRequest,s=document.createTouch!==undefined;_abort=function(){l.fancybox.hideActivity();E.onerror=E.onload=null;if(k){k.abort()}D.empty()},_error=function(){if(false===y.onError(h,g,y)){l.fancybox.hideActivity();C=false;return}y.titleShow=false;y.width="auto";y.height="auto";D.html('<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>');_process_inline()},_start=function(){var L=h[g],I,K,N,M,H,J;_abort();y=l.extend({},l.fn.fancybox.defaults,(typeof l(L).data("fancybox")=="undefined"?y:l(L).data("fancybox")));if(document.documentElement.clientWidth<y.minViewportWidth){C=false;return}J=y.onStart(h,g,y);if(J===false){C=false;return}else{if(typeof J=="object"){y=l.extend(y,J)}}N=y.title||(L.nodeName?l(L).attr("title"):L.title)||"";if(L.nodeName&&!y.orig){y.orig=l(L).find("img:first").length?l(L).find("img:first"):l(L)}if(N===""&&y.orig){N=y.orig.attr("title")||(y.titleFromAlt?y.orig.attr("alt"):"")}I=y.href||(L.nodeName?l(L).attr("href"):L.href)||null;if((/^(?:javascript)/i).test(I)||I=="#"){I=null}if(y.type){K=y.type;if(!I){I=y.content}}else{if(y.content){K="html"}else{if(l(L).hasClass("iframe")){K="iframe"}else{if(I){if(I.match(u)||l(L).hasClass("image")){K="image"}else{if(I.match(p)){K="swf"}else{if(I.match(A)){K="svg"}else{if(I.indexOf("#")===0){K="inline"}else{K="ajax"}}}}}}}}if(!K){_error();return}if(l(L).hasClass("modal")){y.modal=true}if(K=="inline"){L=I.substr(I.indexOf("#"));K=l(L).length>0?"inline":"ajax"}y.type=K;y.href=I;y.title=N;if(y.autoDimensions){if(y.type=="html"||y.type=="inline"||y.type=="ajax"){y.width="auto";y.height="auto"}else{y.autoDimensions=false}}if(y.modal){y.overlayShow=true;y.hideOnOverlayClick=false;y.hideOnContentClick=false;y.enableEscapeButton=false;y.showCloseButton=false}y.padding=parseInt(y.padding,10);y.margin=parseInt(y.margin,10);D.css("padding",(y.padding+y.margin));l(".fancybox-inline-tmp").off("fancybox-cancel").on("fancybox-change",function(){l(this).replaceWith(z.children())});switch(K){case"html":D.html(y.content);_process_inline();break;case"inline":if(l(L).parent().is("#fancybox-content")===true){C=false;return}l('<div class="fancybox-inline-tmp" />').hide().insertBefore(l(L)).on("fancybox-cleanup",function(){l(this).replaceWith(z.children())}).on("fancybox-cancel",function(){l(this).replaceWith(D.children())});l(L).appendTo(D);_process_inline();break;case"image":y.keepRatio=true;C=false;l.fancybox.showActivity();E=new Image();E.onerror=function(){_error()};E.onload=function(){C=true;E.onerror=E.onload=null;_process_image()};E.src=I;break;case"swf":y.scrolling="no";y.keepRatio=true;M='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+y.width+'" height="'+y.height+'"><param name="movie" value="'+I+'"></param>';H="";l.each(y.swf,function(O,P){M+='<param name="'+O+'" value="'+P+'"></param>';H+=" "+O+'="'+P+'"'});M+='<embed src="'+I+'" type="application/x-shockwave-flash" width="'+y.width+'" height="'+y.height+'"'+H+"></embed></object>";D.html(M);_process_inline();break;case"svg":y.scrolling="no";y.keepRatio=true;M='<object width="'+y.width+'" height="'+y.height+'" data="'+I+'"></object>';D.html(M);_process_inline();break;case"ajax":C=false;l.fancybox.showActivity();y.ajax.win=y.ajax.success;k=l.ajax(l.extend({},y.ajax,{url:I,data:y.ajax.data||{},error:function(O,Q,P){if(O.status>0){_error()}},success:function(P,R,O){var Q=typeof O=="object"?O:k;if(Q.status==200){if(typeof y.ajax.win=="function"){J=y.ajax.win(I,P,R,O);if(J===false){l.fancybox.hideActivity();return}else{if(typeof J=="string"||typeof J=="object"){P=J}}}D.html(P);_process_inline()}}}));break;case"iframe":l.fancybox.showActivity();_show();break}},_process_inline=function(){var I=y.width,J=y.height,K=l(window).width()==0?window.innerWidth:l(window).width(),H=l(window).height()==0?window.innerHeight:l(window).height();if(I.toString().indexOf("%")>-1){I=parseInt((K-(y.margin*2))*parseFloat(I)/100,10)+"px"}else{I=I=="auto"?"auto":I+"px"}if(J.toString().indexOf("%")>-1){J=parseInt((H-(y.margin*2))*parseFloat(J)/100,10)+"px"}else{J=J=="auto"?"auto":J+"px"}D.wrapInner('<div style="width:'+I+";height:"+J+";overflow: "+(y.scrolling=="auto"?"auto":(y.scrolling=="yes"?"scroll":"hidden"))+';position:relative;"></div>');y.width=D.width();y.height=D.height();_show()},_process_image=function(){y.width=E.width;y.height=E.height;l("<img />").attr({id:"fancybox-img",src:E.src,alt:y.title}).appendTo(D);_show()},_show=function(){var I,H;if(y.type!=="iframe"){l.fancybox.hideActivity()}if(r.is(":visible")&&false===a.onCleanup(e,d,a)){l(".fancybox-inline-tmp").trigger("fancybox-cancel");C=false;return}C=true;l(z.add(B)).off();l(window).off("orientationchange.fb resize.fb scroll.fb");l(document).off("keydown.fb");if(r.is(":visible")&&a.titlePosition!=="outside"){r.css("height",r.height())}e=h;d=g;a=y;if(a.overlayShow){B.css({"background-color":a.overlayColor,opacity:a.overlayOpacity,cursor:a.hideOnOverlayClick?"pointer":"auto",height:l(document).height()});if(!B.is(":visible")){if(x){l("select:not(#fancybox-tmp select)").filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one("fancybox-cleanup",function(){this.style.visibility="inherit"})}B.show()}}else{B.hide()}n=_get_zoom_to();_process_title();if(r.is(":visible")){l(w.add(v).add(i)).hide();I=r.position(),t={top:I.top,left:I.left,width:r.width(),height:r.height()};H=(t.width==n.width&&t.height==n.height);z.fadeTo(a.changeFade,0.3,function(){var J=function(){z.html(D.contents()).fadeTo(a.changeFade,1,_finish)};l(".fancybox-inline-tmp").trigger("fancybox-change");z.empty().removeAttr("filter").css({"border-width":a.padding,width:n.width-a.padding*2,height:y.autoDimensions?"auto":n.height-q-a.padding*2});if(H){J()}else{f.prop=0;l(f).animate({prop:1},{duration:a.changeSpeed,easing:a.easingChange,step:_draw,complete:J})}});return}r.removeAttr("style");z.css("border-width",a.padding);if(a.transitionIn=="elastic"){t=_get_zoom_from();z.html(D.contents());r.show();if(a.opacity){n.opacity=0}f.prop=0;l(f).animate({prop:1},{duration:a.speedIn,easing:a.easingIn,step:_draw,complete:_finish});return}if(a.titlePosition=="inside"&&q>0){G.show()}z.css({width:n.width-a.padding*2,height:y.autoDimensions?"auto":n.height-q-a.padding*2}).html(D.contents());r.css(n).fadeIn(a.transitionIn=="none"?0:a.speedIn,_finish)},_format_title=function(H){if(H&&H.length){if(a.titlePosition=="float"){return'<table id="fancybox-title-float-wrap" style="border-spacing:0;border-collapse:collapse"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">'+H+'</td><td id="fancybox-title-float-right"></td></tr></table>'}return'<div id="fancybox-title-'+a.titlePosition+'">'+H+"</div>"}return false},_process_title=function(){b=a.title||"";q=0;G.empty().removeAttr("style").removeClass();if(a.titleShow===false){G.hide();return}b=l.isFunction(a.titleFormat)?a.titleFormat(b,e,d,a):_format_title(b);if(!b||b===""){G.hide();return}G.addClass("fancybox-title-"+a.titlePosition).html(b).appendTo("body").show();switch(a.titlePosition){case"inside":G.css({width:n.width-(a.padding*2),marginLeft:a.padding,marginRight:a.padding}).appendTo(c);q=G.outerHeight(true);n.height+=q;break;case"over":G.css({marginLeft:a.padding,width:n.width-(a.padding*2),bottom:a.padding}).appendTo(c);break;case"float":G.css("left",parseInt((G.width()-n.width)/2,10)*-1).appendTo(c);break;default:G.css({width:n.width-(a.padding*2),paddingLeft:a.padding,paddingRight:a.padding}).appendTo(r);break}G.hide()},_set_navigation=function(){if(a.enableEscapeButton||a.enableKeyboardNav){l(document).on("keydown.fb",function(H){if(H.keyCode==27&&a.enableEscapeButton){H.preventDefault();l.fancybox.close()}else{if((H.keyCode==37||H.keyCode==39)&&a.enableKeyboardNav&&H.target.tagName!=="INPUT"&&H.target.tagName!=="TEXTAREA"&&H.target.tagName!=="SELECT"){H.preventDefault();l.fancybox[H.keyCode==37?"prev":"next"]()}else{if((H.keyCode==9)&&a.enableKeyboardNav&&H.target.tagName!=="INPUT"&&H.target.tagName!=="TEXTAREA"&&H.target.tagName!=="SELECT"){H.preventDefault();l.fancybox[H.shiftKey?"prev":"next"]()}}}})}if(!a.showNavArrows){v.hide();i.hide();return}if((a.cyclic&&e.length>1)||d!==0){v.show()}if((a.cyclic&&e.length>1)||d!=(e.length-1)){i.show()}},_finish=function(){if(!l.support.opacity){z.css("filter",0);r.css("filter",0)}if(y.autoDimensions){z.css("height","auto")}r.css("height","auto");if(b&&b.length){G.show()}if(a.showCloseButton){w.show()}_set_navigation();if(a.hideOnContentClick){z.on("click",l.fancybox.close)}if(a.hideOnOverlayClick){B.on("click",l.fancybox.close)}if(a.autoResize){l(window).on("resize.fb",l.fancybox.resize)}if(a.centerOnScroll){l(window).on("scroll.fb",l.fancybox.center)}if(l.fn.mousewheel){r.on("mousewheel.fb",function(H,I){if(C){H.preventDefault()}else{if(a.type=="image"&&(l(H.target).outerHeight()==0||l(H.target).prop("scrollHeight")===l(H.target).outerHeight())){H.preventDefault();l.fancybox[I>0?"prev":"next"]()}}})}if(a.type=="iframe"){l('<iframe id="fancybox-frame" name="fancybox-frame'+new Date().getTime()+'"'+(navigator.userAgent.match(/msie [6]/i)?' allowtransparency="true""':"")+' style="border:0;margin:0;overflow:'+(y.scrolling=="auto"?"auto":(y.scrolling=="yes"?"scroll":"hidden"))+'" src="'+a.href+'"'+(false===a.allowfullscreen?"":" allowfullscreen")+' tabindex="999"></iframe>').appendTo(z).load(function(){l.fancybox.hideActivity()}).focus()}r.show();C=false;l.fancybox.center();a.onComplete(e,d,a);_preload_images()},_preload_images=function(){var H,I;if((e.length-1)>d){H=e[d+1];if(typeof H!=="undefined"&&typeof H.href!=="undefined"&&(H.href.match(u)||l(H).hasClass("image"))){I=new Image();I.src=H.href}}if(d>0){H=e[d-1];if(typeof H!=="undefined"&&typeof H.href!=="undefined"&&(H.href.match(u)||l(H).hasClass("image"))){I=new Image();I.src=H.href}}},_draw=function(I){var H={width:parseInt(t.width+(n.width-t.width)*I,10),height:parseInt(t.height+(n.height-t.height)*I,10),top:parseInt(t.top+(n.top-t.top)*I,10),left:parseInt(t.left+(n.left-t.left)*I,10)};if(typeof n.opacity!=="undefined"){H.opacity=I<0.5?0.5:I}r.css(H);z.css({width:H.width-a.padding*2,height:H.height-(q*I)-a.padding*2})},_get_viewport=function(){return[document.documentElement.clientWidth-(a.margin*2),document.documentElement.clientHeight-(a.margin*2),l(document).scrollLeft()+a.margin,l(document).scrollTop()+a.margin]},_get_zoom_to=function(){var H=_get_viewport(),K={},I=a.padding*2,J;if(a.width.toString().indexOf("%")>-1){K.width=parseInt((H[0]*parseFloat(a.width))/100,10)}else{K.width=a.width+I}if(a.height.toString().indexOf("%")>-1){K.height=parseInt((H[1]*parseFloat(a.height))/100,10)}else{K.height=a.height+I}if(a.autoScale&&(K.width>H[0]||K.height>H[1])){if(a.keepRatio){J=a.width/a.height;if((K.width)>H[0]){K.width=H[0];K.height=parseInt(((K.width-I)/J)+I,10)}if((K.height)>H[1]){K.height=H[1];K.width=parseInt(((K.height-I)*J)+I,10)}}else{K.width=Math.min(K.width,H[0]);K.height=Math.min(K.height,H[1])}}K.top=parseInt(Math.max(H[3]-20,H[3]+((H[1]-K.height-40)*0.5)),10);K.left=parseInt(Math.max(H[2]-20,H[2]+((H[0]-K.width-40)*0.5)),10);return K},_get_obj_pos=function(H){var I=H.offset();I.top+=parseInt(H.css("paddingTop"),10)||0;I.left+=parseInt(H.css("paddingLeft"),10)||0;I.top+=parseInt(H.css("border-top-width"),10)||0;I.left+=parseInt(H.css("border-left-width"),10)||0;I.width=H.width();I.height=H.height();return I},_get_zoom_from=function(){var K=y.orig?l(y.orig):false,J={},I,H;if(K&&K.length){I=_get_obj_pos(K);J={width:I.width+(a.padding*2),height:I.height+(a.padding*2),top:I.top-a.padding-20,left:I.left-a.padding-20}}else{H=_get_viewport();J={width:a.padding*2,height:a.padding*2,top:parseInt((H[3]+H[1])*0.5,10),left:parseInt((H[2]+H[0])*0.5,10)}}return J},_animate_loading=function(){if(!j.is(":visible")){clearInterval(m);return}l("div",j).css("top",(o*-40)+"px");o=(o+1)%12};l.fn.fancybox=function(H){if(!l(this).length){return this}l(this).data("fancybox",l.extend({},H,(l.metadata?l(this).metadata():{}))).off("click.fb").on("click.fb",function(J){J.preventDefault();if(C){return}C=true;l(this).blur();h=[];g=0;var I=l(this).attr("rel")||"";if(I==""||I.replace(/alternate|external|help|license|nofollow|noreferrer|noopener|\s+/gi,"")==""){h.push(this)}else{h=l('a[rel="'+I+'"], area[rel="'+I+'"]');g=h.index(this)}_start(J);return});return this};l.fancybox=function(K){var J;if(C){return}C=true;J=typeof arguments[1]!=="undefined"?arguments[1]:{};h=[];g=parseInt(J.index,10)||0;if(l.isArray(K)){for(var I=0,H=K.length;I<H;I++){if(typeof K[I]=="object"){l(K[I]).data("fancybox",l.extend({},J,K[I]))}else{K[I]=l({}).data("fancybox",l.extend({content:K[I]},J))}}h=jQuery.merge(h,K)}else{if(typeof K=="object"){l(K).data("fancybox",l.extend({},J,K))}else{K=l({}).data("fancybox",l.extend({content:K},J))}h.push(K)}if(g>h.length||g<0){g=0}_start()};l.fancybox.showActivity=function(){clearInterval(m);j.show();m=setInterval(_animate_loading,66)};l.fancybox.hideActivity=function(){j.hide()};l.fancybox.next=function(){return l.fancybox.pos(d+1)};l.fancybox.prev=function(){return l.fancybox.pos(d-1)};l.fancybox.pos=function(H){if(C){return}H=parseInt(H);h=e;if(H>-1&&H<e.length){g=H;_start()}else{if(a.cyclic&&e.length>1){g=H>=e.length?0:e.length-1;_start()}}return};l.fancybox.cancel=function(){if(C){return}C=true;l(".fancybox-inline-tmp").trigger("fancybox-cancel");_abort();y.onCancel(h,g,y);C=false};l.fancybox.close=function(){if(C||r.is(":hidden")){return}C=true;if(a&&false===a.onCleanup(e,d,a)){C=false;return}_abort();l(w.add(v).add(i)).hide();l(z.add(B)).off();l(window).off("orientationchange.fb resize.fb scroll.fb mousewheel.fb");l(document).off("keydown.fb");z.find("iframe#fancybox-frame").attr("src",x&&/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank");if(a.titlePosition!=="inside"){G.empty()}r.stop();function H(){B.fadeOut("fast");G.empty().hide();r.hide();l(".fancybox-inline-tmp").trigger("fancybox-cleanup");z.empty();a.onClosed(e,d,a);e=y=[];d=g=0;a=y={};C=false}if(a.transitionOut=="elastic"){t=_get_zoom_from();var I=r.position();n={top:I.top,left:I.left,width:r.width(),height:r.height()};if(a.opacity){n.opacity=1}G.empty().hide();f.prop=1;l(f).animate({prop:0},{duration:a.speedOut,easing:a.easingOut,step:_draw,complete:H})}else{r.fadeOut(a.transitionOut=="none"?0:a.speedOut,H)}};l.fancybox.resize=function(){var H;clearTimeout(F);F=setTimeout(function(){var I=function(){if(y.autoDimensions){z.css("height","auto")}r.css("height","auto");if(b&&b.length){G.show()}C=false;l.fancybox.center(true)};if(B.is(":visible")){B.css("height",l(document).height())}H=r.position(),t={top:H.top,left:H.left,width:r.width(),height:r.height()};n=_get_zoom_to();C=true;_process_title();f.prop=0;l(f).animate({prop:1},{duration:a.changeSpeed,easing:a.easingChange,step:_draw,complete:I})},500)};l.fancybox.center=function(){var H,I;if(C){return}I=arguments[0]===true?1:0;H=_get_viewport();if(!I&&(r.width()>H[0]||r.height()>H[1])){return}r.stop().animate({top:parseInt(Math.max(H[3]-20,H[3]+((H[1]-z.height()-40)*0.5)-a.padding)),left:parseInt(Math.max(H[2]-20,H[2]+((H[0]-z.width()-40)*0.5)-a.padding))},typeof arguments[0]=="number"?arguments[0]:300)};l.fancybox.init=function(){if(l("#fancybox-wrap").length){return}l("body").append(D=l('<div id="fancybox-tmp"></div>'),j=l('<div id="fancybox-loading"><div></div></div>'),B=l('<div id="fancybox-overlay"></div>'),r=l('<div id="fancybox-wrap"></div>'));c=l('<div id="fancybox-outer"></div>').append('<div class="fancybox-bg" id="fancybox-bg-n"></div><div class="fancybox-bg" id="fancybox-bg-ne"></div><div class="fancybox-bg" id="fancybox-bg-e"></div><div class="fancybox-bg" id="fancybox-bg-se"></div><div class="fancybox-bg" id="fancybox-bg-s"></div><div class="fancybox-bg" id="fancybox-bg-sw"></div><div class="fancybox-bg" id="fancybox-bg-w"></div><div class="fancybox-bg" id="fancybox-bg-nw"></div>').appendTo(r);c.append(z=l('<div id="fancybox-content"></div>'),w=l('<a id="fancybox-close"></a>'),G=l('<div id="fancybox-title"></div>'),v=l('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),i=l('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>'));w.click(l.fancybox.close);j.click(l.fancybox.cancel);v.click(function(H){H.preventDefault();l.fancybox.prev()});i.click(function(H){H.preventDefault();l.fancybox.next()});if(!l.support.opacity){r.addClass("fancybox-ie")}if(x){j.addClass("fancybox-ie6");r.addClass("fancybox-ie6");l('<iframe id="fancybox-hide-sel-frame" src="'+(/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank")+'" style="overflow:hidden;border:0" tabindex="-1"></iframe>').prependTo(c)}};l.fn.fancybox.defaults={padding:10,margin:40,opacity:false,modal:false,cyclic:false,allowfullscreen:false,scrolling:"auto",width:560,height:340,autoScale:true,autoDimensions:true,centerOnScroll:!s,autoResize:true,keepRatio:false,minViewportWidth:0,ajax:{},swf:{wmode:"opaque"},svg:{wmode:"opaque"},hideOnOverlayClick:true,hideOnContentClick:false,overlayShow:true,overlayOpacity:0.7,overlayColor:"#777",titleShow:true,titlePosition:"float",titleFormat:null,titleFromAlt:true,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",easingIn:"swing",easingOut:"swing",showCloseButton:true,showNavArrows:true,enableEscapeButton:true,enableKeyboardNav:true,onStart:function(){},onCancel:function(){},onComplete:function(){},onCleanup:function(){},onClosed:function(){},onError:function(){}};l(document).ready(function(){l.fancybox.init()})})(jQuery);
|
inc/class-easyfancybox-admin.php
CHANGED
@@ -18,7 +18,7 @@ class easyFancyBox_Admin extends easyFancyBox {
|
|
18 |
add_settings_section('fancybox_section', __('FancyBox','easy-fancybox'), array(__CLASS__, 'settings_section'), 'media');
|
19 |
}
|
20 |
|
21 |
-
public static function register_settings( $args =
|
22 |
if ( empty( $args ) ) $args = parent::$options;
|
23 |
foreach ($args as $key => $value) {
|
24 |
// check to see if the section is enabled, else skip to next
|
@@ -57,13 +57,16 @@ class easyFancyBox_Admin extends easyFancyBox {
|
|
57 |
// add our FancyBox Media Settings Section on Settings > Media admin page
|
58 |
public static function settings_section() {
|
59 |
echo '<style type="text/css">.options-media-php br { display: initial; }</style><!-- undo WP style rule introduced in 4.9 on settings-media -->
|
60 |
-
<p><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=ravanhagen%40gmail%2ecom&item_name=Easy%20FancyBox&item_number='.EASY_FANCYBOX_VERSION.'&no_shipping=0&tax=0&charset=UTF%2d8¤cy_code=EUR" title="'.__('Donate to keep the Easy FancyBox plugin development going!','easy-fancybox').'"
|
|
|
|
|
|
|
61 |
|
62 |
/* Black Friday offer */
|
63 |
if ( !class_exists('easyFancyBox_Advanced')
|
64 |
&& current_user_can( 'install_plugins' )
|
65 |
-
&& strtotime('now') > strtotime('23-11-
|
66 |
-
&& strtotime('now') < strtotime('
|
67 |
echo '<p style="background-color:#F9D400;padding:5px 10px;border-radius:15px;box-shadow:#333 0 1px 1px;color:#000;">
|
68 |
<strong>Easy FancyBox advanced options at 30% OFF!</strong>
|
69 |
Black Friday to Cyber Monday: THE BIG 30 SALE at Status301.
|
@@ -215,14 +218,11 @@ class easyFancyBox_Admin extends easyFancyBox {
|
|
215 |
return $setting;
|
216 |
}
|
217 |
|
218 |
-
|
219 |
/***********************
|
220 |
ACTIONS & FILTERS
|
221 |
***********************/
|
222 |
|
223 |
public static function admin_notice() {
|
224 |
-
global $current_user ;
|
225 |
-
|
226 |
/* Version Nag */
|
227 |
if ( self::$do_compat_warning && current_user_can( 'install_plugins' ) && !get_user_meta($current_user->ID, 'easy_fancybox_ignore_notice') ) {
|
228 |
echo '<div class="update-nag"><p>';
|
@@ -240,7 +240,7 @@ class easyFancyBox_Admin extends easyFancyBox {
|
|
240 |
load_plugin_textdomain('easy-fancybox', false, dirname( parent::$plugin_basename ) . '/languages' );
|
241 |
}
|
242 |
|
243 |
-
public static function
|
244 |
/* Dismissable notice */
|
245 |
/* If user clicks to ignore the notice, add that to their user meta */
|
246 |
global $current_user;
|
@@ -268,6 +268,6 @@ class easyFancyBox_Admin extends easyFancyBox {
|
|
268 |
|
269 |
add_action('admin_init', array(__CLASS__, 'add_settings_section'));
|
270 |
add_action('admin_init', array(__CLASS__, 'register_settings'));
|
271 |
-
add_action('admin_init', array(__CLASS__, '
|
272 |
}
|
273 |
}
|
18 |
add_settings_section('fancybox_section', __('FancyBox','easy-fancybox'), array(__CLASS__, 'settings_section'), 'media');
|
19 |
}
|
20 |
|
21 |
+
public static function register_settings( $args = array() ) {
|
22 |
if ( empty( $args ) ) $args = parent::$options;
|
23 |
foreach ($args as $key => $value) {
|
24 |
// check to see if the section is enabled, else skip to next
|
57 |
// add our FancyBox Media Settings Section on Settings > Media admin page
|
58 |
public static function settings_section() {
|
59 |
echo '<style type="text/css">.options-media-php br { display: initial; }</style><!-- undo WP style rule introduced in 4.9 on settings-media -->
|
60 |
+
<p><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=ravanhagen%40gmail%2ecom&item_name=Easy%20FancyBox&item_number='.EASY_FANCYBOX_VERSION.'&no_shipping=0&tax=0&charset=UTF%2d8¤cy_code=EUR" title="'.__('Donate to keep the Easy FancyBox plugin development going!','easy-fancybox').'">
|
61 |
+
<img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" style="border:none;float:right;margin:5px 0 0 10px" alt="'.__('Donate to keep the Easy FancyBox plugin development going!','easy-fancybox').'" width="92" height="26" /></a>';
|
62 |
+
echo sprintf(__('The options in this section are provided by the plugin %s and determine the <strong>Media Lightbox</strong> overlay appearance and behavior controlled by %s.','easy-fancybox'),'<strong><a href="http://status301.net/wordpress-plugins/easy-fancybox/">'.__('Easy FancyBox','easy-fancybox').'</a></strong>','<strong><a href="http://fancybox.net/">'.__('FancyBox','easy-fancybox').'</a></strong>');
|
63 |
+
echo '</p><p>'.__('First enable each sub-section that you need. Then save and come back to adjust its specific settings.','easy-fancybox').' '.__('Note: Each additional sub-section and features like <em>Auto-detection</em>, <em>Elastic transitions</em> and all <em>Easing effects</em> (except Swing) will have some extra impact on client-side page speed. Enable only those sub-sections and options that you actually need on your site.','easy-fancybox').' '.__('Some setting like Transition options are unavailable for SWF video, PDF and iFrame content to ensure browser compatibility and readability.','easy-fancybox').'</p>';
|
64 |
|
65 |
/* Black Friday offer */
|
66 |
if ( !class_exists('easyFancyBox_Advanced')
|
67 |
&& current_user_can( 'install_plugins' )
|
68 |
+
&& strtotime('now') > strtotime('23-11-2018')
|
69 |
+
&& strtotime('now') < strtotime('27-11-2018') ) {
|
70 |
echo '<p style="background-color:#F9D400;padding:5px 10px;border-radius:15px;box-shadow:#333 0 1px 1px;color:#000;">
|
71 |
<strong>Easy FancyBox advanced options at 30% OFF!</strong>
|
72 |
Black Friday to Cyber Monday: THE BIG 30 SALE at Status301.
|
218 |
return $setting;
|
219 |
}
|
220 |
|
|
|
221 |
/***********************
|
222 |
ACTIONS & FILTERS
|
223 |
***********************/
|
224 |
|
225 |
public static function admin_notice() {
|
|
|
|
|
226 |
/* Version Nag */
|
227 |
if ( self::$do_compat_warning && current_user_can( 'install_plugins' ) && !get_user_meta($current_user->ID, 'easy_fancybox_ignore_notice') ) {
|
228 |
echo '<div class="update-nag"><p>';
|
240 |
load_plugin_textdomain('easy-fancybox', false, dirname( parent::$plugin_basename ) . '/languages' );
|
241 |
}
|
242 |
|
243 |
+
public static function admin_init() {
|
244 |
/* Dismissable notice */
|
245 |
/* If user clicks to ignore the notice, add that to their user meta */
|
246 |
global $current_user;
|
268 |
|
269 |
add_action('admin_init', array(__CLASS__, 'add_settings_section'));
|
270 |
add_action('admin_init', array(__CLASS__, 'register_settings'));
|
271 |
+
add_action('admin_init', array(__CLASS__, 'admin_init'));
|
272 |
}
|
273 |
}
|
inc/class-easyfancybox-options.php
CHANGED
@@ -10,1545 +10,1565 @@ class easyFancyBox_Options extends easyFancyBox {
|
|
10 |
|
11 |
parent::$options = array (
|
12 |
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
),
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
),
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
),
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
),
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
),
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
),
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
),
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
),
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
),
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
)
|
90 |
),
|
91 |
-
|
92 |
-
),
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
),
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
),
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
),
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
),
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
)
|
142 |
)
|
143 |
),
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
),
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
),
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
|
|
170 |
),
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
|
|
181 |
),
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
|
|
191 |
),
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
|
|
201 |
),
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
|
|
215 |
),
|
216 |
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
),
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
),
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
),
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
),
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
),
|
267 |
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
),
|
272 |
-
'centerOnScroll' => array (
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
278 |
),
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
|
|
|
|
|
|
|
|
|
|
285 |
),
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
'step' => '100',
|
299 |
-
'min' => '0',
|
300 |
-
'max' => '6000',
|
301 |
-
'sanitize_callback' => 'intval',
|
302 |
-
'class' => 'small-text',
|
303 |
-
'default' => '',
|
304 |
-
),
|
305 |
-
'speedOut' => array (
|
306 |
-
'id' => 'fancybox_speedOut',
|
307 |
-
'title' => __('Closing speed','easy-fancybox'),
|
308 |
-
'label_for' => 'fancybox_speedOut',
|
309 |
-
'input' => 'number',
|
310 |
-
'step' => '100',
|
311 |
-
'min' => '0',
|
312 |
-
'max' => '6000',
|
313 |
-
'sanitize_callback' => 'intval',
|
314 |
-
'class' => 'small-text',
|
315 |
-
'default' => '',
|
316 |
-
'description' => '<br />' . __('Duration in milliseconds. Higher is slower.','easy-fancybox') . ' <em>' . __('Default:','easy-fancybox') . ' 300</em><br />'
|
317 |
)
|
318 |
)
|
319 |
),
|
320 |
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
),
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
),
|
340 |
-
|
341 |
-
|
342 |
),
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
),
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
|
|
|
|
371 |
),
|
372 |
-
'
|
|
|
|
|
|
|
373 |
),
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
),
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
'description' => __('(leave empty to ignore)','easy-fancybox') . '<br/>'
|
391 |
),
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
),
|
399 |
-
*/
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
),
|
407 |
|
408 |
-
/* 'p2' => array (
|
409 |
-
|
410 |
-
|
411 |
),
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
),
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
),
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
),
|
433 |
-
*/
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
),
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
)
|
446 |
)
|
447 |
)
|
448 |
)
|
449 |
),
|
450 |
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
),
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
),
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
),
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
),
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
),
|
487 |
-
'default' => '',
|
488 |
-
'description' => '<em><a href="'.$url.'">' . __('More options »','easy-fancybox') . '</a></em><br />'
|
489 |
-
),
|
490 |
-
'type' => array (
|
491 |
-
'id' => 'fancybox_classType',
|
492 |
-
'title' => __('Force FancyBox to treat all media linked with class="fancybox" as images?','easy-fancybox'),
|
493 |
-
'label_for' => 'fancybox_classType',
|
494 |
-
'input' => 'select',
|
495 |
-
'options' => array(
|
496 |
-
'image' => translate('Yes'),
|
497 |
-
'' => translate('No')
|
498 |
),
|
499 |
-
|
500 |
-
|
501 |
-
),
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
'input' => 'select',
|
511 |
-
'options' => array(
|
512 |
-
'none' => translate('None'),
|
513 |
-
'' => __('Fade','easy-fancybox'),
|
514 |
-
'elastic' => __('Elastic','easy-fancybox'),
|
515 |
),
|
516 |
-
|
517 |
-
|
518 |
-
),
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
'
|
524 |
-
|
525 |
-
'
|
526 |
-
'' =>
|
527 |
-
'
|
528 |
-
'
|
|
|
|
|
|
|
529 |
),
|
530 |
-
|
531 |
-
|
532 |
-
),
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
|
|
542 |
),
|
543 |
-
|
544 |
-
|
545 |
-
),
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
'easeOutBack' => __('easeOutBack','easy-fancybox')
|
556 |
),
|
557 |
-
|
558 |
-
|
559 |
-
),
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
'noquotes' => true,
|
571 |
-
'default' => '',
|
572 |
-
'description' => __('Close FancyBox when content is clicked','easy-fancybox')
|
573 |
-
),
|
574 |
-
'p1' => array (
|
575 |
-
'hide' => true,
|
576 |
-
'description' => '<br /><strong>' . __('Appearance','easy-fancybox') . '</strong><br />'
|
577 |
-
),
|
578 |
-
'titleShow' => array (
|
579 |
-
'id' => 'fancybox_titleShow',
|
580 |
-
'input' => 'checkbox',
|
581 |
-
'noquotes' => true,
|
582 |
-
'default' => '1',
|
583 |
-
'description' => __('Show title','easy-fancybox')
|
584 |
-
),
|
585 |
-
'titlePosition' => array (
|
586 |
-
'id' => 'fancybox_titlePosition',
|
587 |
-
'title' => __('Title Position','easy-fancybox'),
|
588 |
-
'label_for' => 'fancybox_titlePosition',
|
589 |
-
'input' => 'select',
|
590 |
-
'options' => array(
|
591 |
-
'' => __('Float','easy-fancybox'),
|
592 |
-
'outside' => __('Outside','easy-fancybox'),
|
593 |
-
'inside' => __('Inside','easy-fancybox'),
|
594 |
-
'over' => __('Overlay','easy-fancybox')
|
595 |
),
|
596 |
-
|
597 |
-
|
598 |
-
),
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
),
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
613 |
),
|
614 |
-
|
615 |
-
|
616 |
-
),
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
'
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
'' =>
|
629 |
-
'
|
630 |
-
|
631 |
),
|
632 |
-
|
633 |
-
|
634 |
-
),
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
'
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
'mouseWheel' => array (
|
650 |
-
'id' => 'fancybox_mouseWheel',
|
651 |
-
'hide' => true,
|
652 |
-
'input' => 'checkbox',
|
653 |
-
'default' => '1',
|
654 |
-
'description' => __('Include the Mousewheel jQuery extension script to allow gallery browsing by mousewheel action.','easy-fancybox')
|
655 |
-
),
|
656 |
-
'cyclic' => array (
|
657 |
-
'id' => 'fancybox_cyclic',
|
658 |
-
'input' => 'checkbox',
|
659 |
-
'noquotes' => true,
|
660 |
-
'default' => '',
|
661 |
-
'description' => __('Make galleries cyclic, allowing you to keep pressing next/back.','easy-fancybox')
|
662 |
-
),
|
663 |
-
'changeSpeed' => array (
|
664 |
-
'id' => 'fancybox_changeSpeed',
|
665 |
-
'title' => __('Change speed','easy-fancybox'),
|
666 |
-
'label_for' => 'fancybox_changeSpeed',
|
667 |
-
'input' => 'number',
|
668 |
-
'step' => '1',
|
669 |
-
'min' => '0',
|
670 |
-
'max' => '6000',
|
671 |
-
'sanitize_callback' => 'intval',
|
672 |
-
'class' => 'small-text',
|
673 |
-
'default' => '',
|
674 |
-
),
|
675 |
-
'changeFade' => array (
|
676 |
-
'id' => 'fancybox_changeFade',
|
677 |
-
'title' => __('Fade speed','easy-fancybox'),
|
678 |
-
'label_for' => 'fancybox_changeFade',
|
679 |
-
'input' => 'number',
|
680 |
-
'step' => '1',
|
681 |
-
'min' => '0',
|
682 |
-
'max' => '6000',
|
683 |
-
'sanitize_callback' => 'intval',
|
684 |
-
'class' => 'small-text',
|
685 |
-
'default' => '',
|
686 |
-
'description' => '<br />' . __('Duration in milliseconds. Higher is slower.','easy-fancybox') . ' <em>' . __('Default:','easy-fancybox') . ' 300</em><br /><br />'
|
687 |
-
),
|
688 |
-
'autoSelector' => array (
|
689 |
-
'id' => 'fancybox_autoSelector',
|
690 |
-
'hide' => true,
|
691 |
-
'input' => 'hidden',
|
692 |
-
'default' => 'div.gallery ' // add div.tiled-gallery for Tiled Galleries support
|
693 |
-
),
|
694 |
-
'onComplete' => array (
|
695 |
-
'id' => '',
|
696 |
-
'title' => __('Advanced','easy-fancybox'),
|
697 |
-
'input' => 'select',
|
698 |
-
'status' => 'disabled',
|
699 |
-
'options' => array(
|
700 |
-
'' => __('Slideshow','easy-fancybox')
|
701 |
),
|
702 |
-
|
703 |
-
|
704 |
-
),
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
714 |
),
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
719 |
)
|
720 |
),
|
721 |
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
),
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
),
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
),
|
738 |
-
|
739 |
-
|
740 |
-
),
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
),
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
),
|
758 |
-
|
759 |
-
|
760 |
-
),
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
),
|
771 |
-
|
772 |
-
|
773 |
-
),
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
),
|
785 |
-
|
786 |
-
|
787 |
-
),
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
),
|
798 |
-
|
799 |
-
|
800 |
-
),
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
),
|
812 |
-
|
813 |
-
|
814 |
-
),
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
),
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
)
|
829 |
)
|
830 |
),
|
831 |
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
),
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
),
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
),
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
),
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
),
|
865 |
-
|
866 |
-
|
867 |
-
),
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
),
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
),
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
),
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
|
906 |
-
),
|
907 |
-
|
908 |
-
|
909 |
-
|
910 |
-
|
911 |
-
|
912 |
-
|
913 |
-
|
914 |
-
|
915 |
-
|
916 |
),
|
917 |
-
|
|
|
918 |
),
|
919 |
-
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
),
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
),
|
930 |
-
|
931 |
-
|
932 |
),
|
933 |
-
|
934 |
-
|
935 |
-
//
|
936 |
-
|
937 |
-
//
|
938 |
),
|
939 |
-
|
940 |
),
|
941 |
|
942 |
-
|
943 |
-
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
|
949 |
-
),
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
),
|
958 |
-
|
959 |
-
|
960 |
-
|
961 |
-
),
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
),
|
966 |
-
|
967 |
-
|
968 |
-
),
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
),
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
),
|
990 |
-
|
991 |
-
|
992 |
-
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
-
|
1002 |
-
),
|
1003 |
-
|
1004 |
-
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
1008 |
-
|
1009 |
-
),
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
),
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
'
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
|
1029 |
-
|
1030 |
-
'
|
1031 |
-
|
|
|
1032 |
)
|
1033 |
)
|
1034 |
),
|
1035 |
|
1036 |
-
|
1037 |
-
|
1038 |
-
|
1039 |
-
|
1040 |
-
|
1041 |
-
|
1042 |
-
|
1043 |
-
),
|
1044 |
-
|
1045 |
-
|
1046 |
-
|
1047 |
-
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
),
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
),
|
1056 |
-
|
1057 |
-
|
1058 |
-
|
1059 |
-
),
|
1060 |
-
|
1061 |
-
|
1062 |
-
),
|
1063 |
-
|
1064 |
-
|
1065 |
-
|
1066 |
-
|
1067 |
-
|
1068 |
-
|
1069 |
-
|
1070 |
-
|
1071 |
-
|
1072 |
-
|
1073 |
-
),
|
1074 |
-
|
1075 |
-
|
1076 |
-
|
1077 |
-
|
1078 |
-
|
1079 |
-
|
1080 |
-
|
1081 |
-
|
1082 |
-
|
1083 |
-
),
|
1084 |
-
|
1085 |
-
|
1086 |
-
|
1087 |
-
|
1088 |
-
|
1089 |
-
|
1090 |
-
|
1091 |
-
|
1092 |
-
|
1093 |
-
|
1094 |
-
|
1095 |
-
|
1096 |
-
),
|
1097 |
-
|
1098 |
-
|
1099 |
-
|
1100 |
-
|
1101 |
-
|
1102 |
-
|
1103 |
-
),
|
1104 |
-
|
1105 |
-
|
1106 |
-
|
1107 |
-
|
1108 |
-
|
1109 |
-
|
1110 |
-
|
1111 |
-
|
1112 |
-
|
1113 |
-
|
1114 |
),
|
1115 |
-
|
1116 |
-
|
1117 |
-
|
1118 |
-
'
|
1119 |
-
|
1120 |
-
|
1121 |
-
|
1122 |
-
|
1123 |
-
|
1124 |
-
|
1125 |
-
'
|
1126 |
-
|
|
|
1127 |
)
|
1128 |
)
|
1129 |
),
|
1130 |
|
1131 |
-
|
1132 |
-
|
1133 |
-
|
1134 |
-
|
1135 |
-
|
1136 |
-
|
1137 |
-
|
1138 |
-
),
|
1139 |
-
|
1140 |
-
|
1141 |
-
|
1142 |
-
|
1143 |
-
|
1144 |
-
|
1145 |
-
|
1146 |
-
),
|
1147 |
-
|
1148 |
-
|
1149 |
-
|
1150 |
-
),
|
1151 |
-
|
1152 |
-
|
1153 |
-
|
1154 |
-
),
|
1155 |
-
|
1156 |
-
|
1157 |
-
),
|
1158 |
-
|
1159 |
-
|
1160 |
-
|
1161 |
-
|
1162 |
-
|
1163 |
-
|
1164 |
-
|
1165 |
-
|
1166 |
-
|
1167 |
-
|
1168 |
-
|
1169 |
-
|
1170 |
-
),
|
1171 |
-
|
1172 |
-
|
1173 |
-
|
1174 |
-
|
1175 |
-
|
1176 |
-
|
1177 |
-
|
1178 |
-
|
1179 |
-
|
1180 |
-
|
1181 |
-
|
1182 |
-
),
|
1183 |
-
|
1184 |
-
|
1185 |
-
|
1186 |
-
|
1187 |
-
|
1188 |
-
|
1189 |
-
|
1190 |
-
|
1191 |
-
|
1192 |
-
|
1193 |
-
|
1194 |
-
|
1195 |
-
),
|
1196 |
-
|
1197 |
-
|
1198 |
-
|
1199 |
-
|
1200 |
-
'
|
1201 |
-
|
1202 |
-
|
1203 |
-
|
1204 |
-
|
1205 |
-
|
1206 |
-
|
1207 |
-
'
|
1208 |
-
|
1209 |
-
'
|
1210 |
-
'
|
1211 |
-
'
|
|
|
|
|
|
|
|
|
1212 |
),
|
1213 |
-
|
1214 |
-
|
1215 |
-
|
1216 |
-
'
|
1217 |
-
|
1218 |
-
|
1219 |
-
|
1220 |
-
|
1221 |
-
|
1222 |
-
|
1223 |
-
'
|
1224 |
-
|
|
|
1225 |
)
|
1226 |
)
|
1227 |
),
|
1228 |
|
1229 |
-
|
1230 |
-
|
1231 |
-
|
1232 |
-
|
1233 |
-
|
1234 |
-
|
1235 |
-
|
1236 |
-
),
|
1237 |
-
|
1238 |
-
|
1239 |
-
|
1240 |
-
|
1241 |
-
|
1242 |
-
|
1243 |
-
|
1244 |
-
),
|
1245 |
-
|
1246 |
-
|
1247 |
-
|
1248 |
-
),
|
1249 |
-
|
1250 |
-
|
1251 |
-
|
1252 |
-
),
|
1253 |
-
|
1254 |
-
|
1255 |
-
),
|
1256 |
-
|
1257 |
-
|
1258 |
-
|
1259 |
-
|
1260 |
-
|
1261 |
-
|
1262 |
-
|
1263 |
-
|
1264 |
-
|
1265 |
-
|
1266 |
-
|
1267 |
-
|
1268 |
-
),
|
1269 |
-
|
1270 |
-
|
1271 |
-
|
1272 |
-
|
1273 |
-
|
1274 |
-
|
1275 |
-
|
1276 |
-
|
1277 |
-
|
1278 |
-
|
1279 |
-
|
1280 |
-
),
|
1281 |
-
|
1282 |
-
|
1283 |
-
|
1284 |
-
|
1285 |
-
|
1286 |
-
|
1287 |
-
|
1288 |
-
|
1289 |
-
|
1290 |
-
|
1291 |
-
|
1292 |
-
|
1293 |
-
),
|
1294 |
-
|
1295 |
-
|
1296 |
-
|
1297 |
-
|
1298 |
-
'
|
1299 |
-
|
1300 |
-
|
1301 |
-
|
1302 |
-
|
1303 |
-
|
1304 |
-
|
1305 |
-
'
|
1306 |
-
|
1307 |
-
'
|
1308 |
-
'
|
1309 |
-
'
|
|
|
|
|
|
|
|
|
1310 |
),
|
1311 |
-
|
1312 |
-
|
1313 |
-
|
1314 |
-
'
|
1315 |
-
|
1316 |
-
|
1317 |
-
|
1318 |
-
|
1319 |
-
|
1320 |
-
|
1321 |
-
'
|
1322 |
-
|
|
|
1323 |
)
|
1324 |
)
|
1325 |
),
|
1326 |
|
1327 |
-
|
1328 |
-
|
1329 |
-
|
1330 |
-
|
1331 |
-
|
1332 |
-
|
1333 |
-
|
1334 |
-
|
1335 |
-
|
1336 |
-
|
1337 |
-
|
1338 |
-
|
1339 |
-
|
1340 |
-
|
1341 |
-
|
1342 |
-
|
1343 |
-
|
1344 |
-
|
1345 |
-
|
1346 |
-
|
1347 |
-
|
1348 |
-
|
1349 |
-
|
1350 |
-
|
1351 |
-
|
1352 |
-
|
1353 |
-
|
1354 |
-
|
1355 |
-
|
1356 |
-
|
1357 |
-
|
1358 |
-
|
1359 |
-
|
1360 |
-
|
1361 |
-
|
1362 |
-
|
1363 |
-
|
1364 |
-
|
1365 |
-
|
1366 |
-
|
1367 |
-
|
1368 |
-
|
1369 |
-
|
1370 |
-
|
1371 |
-
|
1372 |
-
|
1373 |
-
|
1374 |
-
|
1375 |
-
|
1376 |
-
|
1377 |
-
|
1378 |
-
|
1379 |
-
|
1380 |
-
|
1381 |
-
|
1382 |
-
|
1383 |
-
|
1384 |
-
|
1385 |
-
|
1386 |
-
|
1387 |
-
|
1388 |
-
|
1389 |
-
|
1390 |
-
|
1391 |
-
|
1392 |
-
|
1393 |
-
|
1394 |
-
|
1395 |
-
|
1396 |
-
'
|
1397 |
-
|
1398 |
-
|
1399 |
-
|
1400 |
-
|
1401 |
-
|
1402 |
-
|
1403 |
-
'
|
1404 |
-
|
1405 |
-
|
1406 |
-
'
|
1407 |
-
'
|
1408 |
-
'
|
|
|
|
|
|
|
1409 |
),
|
1410 |
-
|
1411 |
-
|
1412 |
-
|
1413 |
-
'
|
1414 |
-
|
1415 |
-
|
1416 |
-
|
1417 |
-
|
1418 |
-
|
1419 |
-
|
1420 |
-
'
|
1421 |
-
|
|
|
1422 |
)
|
1423 |
)
|
1424 |
),
|
1425 |
|
1426 |
-
/* 'Tudou' => array(
|
1427 |
-
|
1428 |
-
|
1429 |
-
|
1430 |
-
|
1431 |
-
|
1432 |
-
|
1433 |
-
|
1434 |
-
|
1435 |
-
|
1436 |
-
|
1437 |
-
|
1438 |
-
|
1439 |
-
|
1440 |
-
|
1441 |
-
|
|
|
1442 |
)
|
1443 |
-
)
|
1444 |
-
),*/
|
1445 |
|
1446 |
-
/* 'Animoto' => array(),
|
1447 |
|
1448 |
-
Example ANIMOTO page link http://animoto.com/play/Kf9POzQMSOGWyu41gtOtsw should become
|
1449 |
-
http://static.animoto.com/swf/w.swf?w=swf/vp1&f=Kf9POzQMSOGWyu41gtOtsw&i=m
|
1450 |
|
1451 |
-
*/
|
1452 |
|
1453 |
-
|
1454 |
-
|
1455 |
-
|
1456 |
-
|
1457 |
-
|
1458 |
-
|
1459 |
-
|
1460 |
-
),
|
1461 |
-
|
1462 |
-
|
1463 |
-
|
1464 |
-
),
|
1465 |
-
|
1466 |
-
|
1467 |
-
|
1468 |
-
),
|
1469 |
-
|
1470 |
-
|
1471 |
-
),
|
1472 |
-
/*
|
1473 |
-
|
1474 |
-
|
1475 |
-
|
1476 |
-
|
1477 |
-
|
1478 |
-
|
1479 |
-
|
1480 |
-
|
1481 |
-
|
1482 |
-
|
|
|
|
|
|
|
1483 |
),
|
1484 |
-
|
1485 |
-
'
|
1486 |
-
|
1487 |
-
|
1488 |
-
|
1489 |
-
|
1490 |
-
|
1491 |
-
|
1492 |
-
|
1493 |
-
|
1494 |
-
|
1495 |
-
'
|
1496 |
-
|
1497 |
-
|
1498 |
-
|
1499 |
-
|
1500 |
-
|
1501 |
-
|
1502 |
-
|
1503 |
-
|
1504 |
-
'
|
1505 |
-
|
1506 |
-
|
1507 |
-
|
1508 |
-
|
1509 |
-
|
1510 |
-
|
1511 |
-
|
1512 |
-
|
1513 |
-
|
1514 |
-
|
1515 |
-
|
1516 |
-
|
1517 |
-
'
|
1518 |
-
|
1519 |
-
|
1520 |
-
|
1521 |
-
|
1522 |
-
|
1523 |
-
|
1524 |
-
'
|
1525 |
-
|
1526 |
-
|
1527 |
-
|
1528 |
-
|
1529 |
-
|
1530 |
-
|
1531 |
-
|
1532 |
-
|
1533 |
-
'float' => __('Float','easy-fancybox'),
|
1534 |
-
'outside' => __('Outside','easy-fancybox'),
|
1535 |
-
'inside' => __('Inside','easy-fancybox')
|
1536 |
),
|
1537 |
-
|
1538 |
-
|
1539 |
-
|
1540 |
-
'
|
1541 |
-
|
1542 |
-
|
1543 |
-
|
1544 |
-
|
1545 |
-
|
1546 |
-
|
1547 |
-
'
|
1548 |
-
|
1549 |
-
|
1550 |
-
|
1551 |
-
|
|
|
1552 |
)
|
1553 |
)
|
1554 |
)
|
10 |
|
11 |
parent::$options = array (
|
12 |
|
13 |
+
'Global' => array(
|
14 |
+
'title' => __('Global settings','easy-fancybox'),
|
15 |
+
'input' => 'deep',
|
16 |
+
'hide' => true,
|
17 |
+
'options' => array(
|
18 |
+
'Enable' => array (
|
19 |
+
'title' => __('Media','easy-fancybox'),
|
20 |
+
'input' => 'multiple',
|
21 |
+
'hide' => true,
|
22 |
+
'options' => array(
|
23 |
+
'p1' => array (
|
24 |
+
'hide' => true,
|
25 |
+
'description' => __('Enable FancyBox for','easy-fancybox') . '<br />'
|
26 |
),
|
27 |
+
'IMG' => array (
|
28 |
+
'id' => 'fancybox_enableImg',
|
29 |
+
'input' => 'checkbox',
|
30 |
+
'hide' => true,
|
31 |
+
'default' => ( function_exists('is_plugin_active_for_network') && is_plugin_active_for_network( plugin_basename( __FILE__ ) ) ) ? '' : '1',
|
32 |
+
'description' => '<strong>' . __('Images','easy-fancybox') . '</strong>'
|
33 |
),
|
34 |
+
'Inline' => array (
|
35 |
+
'id' => 'fancybox_enableInline',
|
36 |
+
'input' => 'checkbox',
|
37 |
+
'hide' => true,
|
38 |
+
'default' => '',
|
39 |
+
'description' => '<strong>' . __('Inline content','easy-fancybox') . '</strong>'
|
40 |
),
|
41 |
+
'PDF' => array (
|
42 |
+
'id' => 'fancybox_enablePDF',
|
43 |
+
'input' => 'checkbox',
|
44 |
+
'hide' => true,
|
45 |
+
'default' => '',
|
46 |
+
'description' => '<strong>' . __('PDF','easy-fancybox') . '</strong>'
|
47 |
),
|
48 |
+
'SWF' => array (
|
49 |
+
'id' => 'fancybox_enableSWF',
|
50 |
+
'input' => 'checkbox',
|
51 |
+
'hide' => true,
|
52 |
+
'default' => '',
|
53 |
+
'description' => '<strong>' . __('SWF','easy-fancybox') . '</strong>'
|
54 |
),
|
55 |
+
'SVG' => array (
|
56 |
+
'id' => 'fancybox_enableSVG',
|
57 |
+
'input' => 'checkbox',
|
58 |
+
'hide' => true,
|
59 |
+
'default' => '',
|
60 |
+
'description' => '<strong>' . __('SVG','easy-fancybox') . '</strong>'
|
61 |
),
|
62 |
+
'YouTube' => array (
|
63 |
+
'id' => 'fancybox_enableYoutube',
|
64 |
+
'input' => 'checkbox',
|
65 |
+
'hide' => true,
|
66 |
+
'default' => '',
|
67 |
+
'description' => '<strong>' . __('YouTube','easy-fancybox') . '</strong>'
|
68 |
),
|
69 |
+
'Vimeo' => array (
|
70 |
+
'id' => 'fancybox_enableVimeo',
|
71 |
+
'input' => 'checkbox',
|
72 |
+
'hide' => true,
|
73 |
+
'default' => '',
|
74 |
+
'description' => '<strong>' . __('Vimeo','easy-fancybox') . '</strong>'
|
75 |
),
|
76 |
+
'Dailymotion' => array (
|
77 |
+
'id' => 'fancybox_enableDailymotion',
|
78 |
+
'input' => 'checkbox',
|
79 |
+
'hide' => true,
|
80 |
+
'default' => '',
|
81 |
+
'description' => '<strong>' . __('Dailymotion','easy-fancybox') . '</strong>'
|
82 |
),
|
83 |
+
'iFrame' => array (
|
84 |
+
'id' => 'fancybox_enableiFrame',
|
85 |
+
'input' => 'checkbox',
|
86 |
+
'hide' => true,
|
87 |
+
'default' => '',
|
88 |
+
'description' => '<strong>' . __('iFrames','easy-fancybox') . '</strong>'
|
89 |
)
|
90 |
),
|
91 |
+
'description' => '<a href="'.$url.'"><strong><em>' . __('For advanced options and support, please get the Easy FancyBox - Pro extension.','easy-fancybox') . '</strong></a>'
|
92 |
+
),
|
93 |
+
'Overlay' => array (
|
94 |
+
'title' => __('Overlay','easy-fancybox'),
|
95 |
+
'input' => 'multiple',
|
96 |
+
'hide' => true,
|
97 |
+
'options' => array(
|
98 |
+
'overlayShow' => array (
|
99 |
+
'id' => 'fancybox_overlayShow',
|
100 |
+
'input' => 'checkbox',
|
101 |
+
'noquotes' => true,
|
102 |
+
'default' => '1',
|
103 |
+
'description' => __('Show the overlay around content opened in FancyBox.','easy-fancybox')
|
104 |
),
|
105 |
+
'hideOnOverlayClick' => array (
|
106 |
+
'id' => 'fancybox_hideOnOverlayClick',
|
107 |
+
'input' => 'checkbox',
|
108 |
+
'noquotes' => true,
|
109 |
+
'default' => '1',
|
110 |
+
'description' => __('Close FancyBox when overlay is clicked.','easy-fancybox')
|
111 |
),
|
112 |
+
'overlayOpacity' => array (
|
113 |
+
'id' => 'fancybox_overlayOpacity',
|
114 |
+
'title' => __('Opacity','easy-fancybox'),
|
115 |
+
'label_for' => 'fancybox_overlayOpacity',
|
116 |
+
'input' => 'number',
|
117 |
+
'step' => '0.1',
|
118 |
+
'min' => '0',
|
119 |
+
'max' => '1',
|
120 |
+
'class' => 'small-text',
|
121 |
+
'default' => '',
|
122 |
+
'description' => __('Value between 0 and 1. ','easy-fancybox') . ' <em>' . __('Default:','easy-fancybox') . ' 0.7</em><br />'
|
123 |
),
|
124 |
+
'overlayColor' => array (
|
125 |
+
'id' => 'fancybox_overlayColor',
|
126 |
+
'title' => __('Color','easy-fancybox'),
|
127 |
+
'label_for' => 'fancybox_overlayColor',
|
128 |
+
'input' => 'text',
|
129 |
+
'sanitize_callback' => 'colorval',
|
130 |
+
'class' => 'small-text',
|
131 |
+
'default' => '',
|
132 |
+
'description' => __('Enter an HTML color value.','easy-fancybox') . ' <em>' . __('Default:','easy-fancybox') . ' #777</em><br />'
|
133 |
),
|
134 |
+
'overlaySpotlight' => array (
|
135 |
+
'id' => 'fancybox_overlaySpotlight',
|
136 |
+
'input' => 'checkbox',
|
137 |
+
'hide' => true,
|
138 |
+
'status' => get_option('fancybox_overlaySpotlight') ? '' : 'disabled',
|
139 |
+
'default' => '',
|
140 |
+
'description' => get_option('fancybox_overlaySpotlight') ? __('Spotlight effect','easy-fancybox') : __('Spotlight effect','easy-fancybox') . '. <em><a href="'.$url.'">' . __('Make available »','easy-fancybox') . '</a></em>'
|
141 |
)
|
142 |
)
|
143 |
),
|
144 |
+
'Window' => array (
|
145 |
+
'title' => __('Window','easy-fancybox'),
|
146 |
+
'input' => 'multiple',
|
147 |
+
'hide' => true,
|
148 |
+
'options' => array(
|
149 |
+
'p1' => array (
|
150 |
+
'hide' => true,
|
151 |
+
'description' => '<strong>' . __('Appearance','easy-fancybox') . '</strong><br />'
|
152 |
),
|
153 |
+
'showCloseButton' => array (
|
154 |
+
'id' => 'fancybox_showCloseButton',
|
155 |
+
'input' => 'checkbox',
|
156 |
+
'noquotes' => true,
|
157 |
+
'default' => '1',
|
158 |
+
'description' => __('Show the (X) close button','easy-fancybox')
|
159 |
),
|
160 |
+
'backgroundColor' => array (
|
161 |
+
'id' => 'fancybox_backgroundColor',
|
162 |
+
'hide' => true,
|
163 |
+
'title' => __('Background color','easy-fancybox'),
|
164 |
+
'label_for' => 'fancybox_backgroundColor',
|
165 |
+
'input' => 'text',
|
166 |
+
'sanitize_callback' => 'colorval',
|
167 |
+
'status' => 'disabled',
|
168 |
+
'class' => 'small-text',
|
169 |
+
'default' => '',
|
170 |
+
'description' => ''
|
171 |
),
|
172 |
+
'textColor' => array (
|
173 |
+
'id' => 'fancybox_textColor',
|
174 |
+
'hide' => true,
|
175 |
+
'title' => __('Text color','easy-fancybox'),
|
176 |
+
'label_for' => 'fancybox_textColor',
|
177 |
+
'input' => 'text',
|
178 |
+
'sanitize_callback' => 'colorval',
|
179 |
+
'status' => 'disabled',
|
180 |
+
'class' => 'small-text',
|
181 |
+
'default' => '',
|
182 |
+
'description' => '<em><a href="'.$url.'">' . __('Make available »','easy-fancybox') . '</a></em><br />'
|
183 |
),
|
184 |
+
'titleColor' => array (
|
185 |
+
'id' => 'fancybox_titleColor',
|
186 |
+
'hide' => true,
|
187 |
+
'title' => __('Title color','easy-fancybox'),
|
188 |
+
'label_for' => 'fancybox_titleColor',
|
189 |
+
'input' => 'text',
|
190 |
+
'sanitize_callback' => 'colorval',
|
191 |
+
'class' => 'small-text',
|
192 |
+
'default' => '',
|
193 |
+
'description' => ''
|
194 |
),
|
195 |
+
'paddingColor' => array (
|
196 |
+
'id' => 'fancybox_paddingColor',
|
197 |
+
'hide' => true,
|
198 |
+
'title' => __('Border color','easy-fancybox'),
|
199 |
+
'label_for' => 'fancybox_paddingColor',
|
200 |
+
'input' => 'text',
|
201 |
+
'sanitize_callback' => 'colorval',
|
202 |
+
'class' => 'small-text',
|
203 |
+
'default' => '',
|
204 |
+
'description' => '<em>' . __('Default:','easy-fancybox') . ' #000 x #fff</em><br />' . __('Note:','easy-fancybox') . ' ' . __('Use RGBA notation for semi-transparent borders.','easy-fancybox') . ' <em>' . __('Example:','easy-fancybox') . ' rgba(10,10,30,0.7)</em><br />'
|
205 |
),
|
206 |
+
'borderRadius' => array (
|
207 |
+
'id' => 'fancybox_borderRadius',
|
208 |
+
'hide' => true,
|
209 |
+
'title' => __('Border radius','easy-fancybox'),
|
210 |
+
'label_for' => 'fancybox_borderRadius',
|
211 |
+
'input' => 'number',
|
212 |
+
'step' => '1',
|
213 |
+
'min' => '0',
|
214 |
+
'max' => '99',
|
215 |
+
'sanitize_callback' => 'intval',
|
216 |
+
'status' => 'disabled',
|
217 |
+
'class' => 'small-text',
|
218 |
+
'default' => '',
|
219 |
+
'description' => '<em><a href="'.$url.'">' . __('Make available »','easy-fancybox') . '</a></em><br />'
|
220 |
),
|
221 |
|
222 |
+
'p11' => array (
|
223 |
+
'hide' => true,
|
224 |
+
'description' => '<br /><strong>' . __('Dimensions','easy-fancybox') . '</strong><br />'
|
225 |
),
|
226 |
+
'width' => array (
|
227 |
+
'id' => 'fancybox_width',
|
228 |
+
'title' => translate('Width'),
|
229 |
+
'label_for' => 'fancybox_width',
|
230 |
+
'input' => 'text',
|
231 |
+
'sanitize_callback' => 'intval',
|
232 |
+
'class' => 'small-text',
|
233 |
+
'default' => '',
|
234 |
+
'description' => ' '
|
235 |
),
|
236 |
+
'height' => array (
|
237 |
+
'id' => 'fancybox_height',
|
238 |
+
'title' => translate('Height'),
|
239 |
+
'label_for' => 'fancybox_height',
|
240 |
+
'input' => 'text',
|
241 |
+
'sanitize_callback' => 'intval',
|
242 |
+
'class' => 'small-text',
|
243 |
+
'default' => '',
|
244 |
+
'description' => '<em>' . __('Default:','easy-fancybox') . ' 560 x 340</em><br />' . __('If content size is not set or cannot be determined automatically, these default dimensions will be used.','easy-fancybox') . '<br />'
|
245 |
),
|
246 |
+
'padding' => array (
|
247 |
+
'id' => 'fancybox_padding',
|
248 |
+
'title' => translate('Border'),
|
249 |
+
'label_for' => 'fancybox_padding',
|
250 |
+
'input' => 'number',
|
251 |
+
'step' => '1',
|
252 |
+
'min' => '0',
|
253 |
+
'max' => '100',
|
254 |
+
'sanitize_callback' => 'intval',
|
255 |
+
'class' => 'small-text',
|
256 |
+
'default' => '',
|
257 |
+
'description' => '<em>' . __('Default:','easy-fancybox') . ' 10</em><br />'
|
258 |
),
|
259 |
+
'margin' => array (
|
260 |
+
'id' => 'fancybox_margin',
|
261 |
+
'title' => __('Margin','easy-fancybox'),
|
262 |
+
'label_for' => 'fancybox_margin',
|
263 |
+
'input' => 'number',
|
264 |
+
'step' => '1',
|
265 |
+
'min' => '20',
|
266 |
+
'max' => '80',
|
267 |
+
'sanitize_callback' => 'intval',
|
268 |
+
'class' => 'small-text',
|
269 |
+
'default' => '20',
|
270 |
+
'description' => '<em>' . __('Default:','easy-fancybox') . ' 40</em><br />'
|
271 |
),
|
272 |
|
273 |
+
'p2' => array (
|
274 |
+
'hide' => true,
|
275 |
+
'description' => '<br /><strong>' . __('Behavior','easy-fancybox') . '</strong><br />'
|
276 |
),
|
277 |
+
/* 'centerOnScroll' => array (
|
278 |
+
'id' => 'fancybox_centerOnScroll',
|
279 |
+
'input' => 'checkbox',
|
280 |
+
'noquotes' => true,
|
281 |
+
'default' => '1',
|
282 |
+
'description' => __('Center while scrolling','easy-fancybox')
|
283 |
+
),*/
|
284 |
+
'enableEscapeButton' => array (
|
285 |
+
'id' => 'fancybox_enableEscapeButton',
|
286 |
+
'input' => 'checkbox',
|
287 |
+
'noquotes' => true,
|
288 |
+
'default' => '1',
|
289 |
+
'description' => __('Esc key stroke closes FancyBox','easy-fancybox')
|
290 |
),
|
291 |
+
'speedIn' => array (
|
292 |
+
'id' => 'fancybox_speedIn',
|
293 |
+
'title' => __('Opening speed','easy-fancybox'),
|
294 |
+
'label_for' => 'fancybox_speedIn',
|
295 |
+
'input' => 'number',
|
296 |
+
'step' => '100',
|
297 |
+
'min' => '0',
|
298 |
+
'max' => '6000',
|
299 |
+
'sanitize_callback' => 'intval',
|
300 |
+
'class' => 'small-text',
|
301 |
+
'default' => '',
|
302 |
),
|
303 |
+
'speedOut' => array (
|
304 |
+
'id' => 'fancybox_speedOut',
|
305 |
+
'title' => __('Closing speed','easy-fancybox'),
|
306 |
+
'label_for' => 'fancybox_speedOut',
|
307 |
+
'input' => 'number',
|
308 |
+
'step' => '100',
|
309 |
+
'min' => '0',
|
310 |
+
'max' => '6000',
|
311 |
+
'sanitize_callback' => 'intval',
|
312 |
+
'class' => 'small-text',
|
313 |
+
'default' => '',
|
314 |
+
'description' => '<br />' . __('Duration in milliseconds. Higher is slower.','easy-fancybox') . ' <em>' . __('Default:','easy-fancybox') . ' 300</em><br />'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
315 |
)
|
316 |
)
|
317 |
),
|
318 |
|
319 |
+
'Miscellaneous' => array (
|
320 |
+
'title' => __('Miscellaneous','easy-fancybox'),
|
321 |
+
'input' => 'multiple',
|
322 |
+
'hide' => true,
|
323 |
+
'options' => array(
|
324 |
+
'p0' => array (
|
325 |
+
'hide' => true,
|
326 |
+
'description' => '<strong>' . __('Auto popup','easy-fancybox') . '</strong><br />'
|
327 |
),
|
328 |
+
'autoClick' => array (
|
329 |
+
'id' => 'fancybox_autoClick',
|
330 |
+
'title' => __('Open on page load','easy-fancybox'),
|
331 |
+
'label_for' => 'fancybox_autoClick',
|
332 |
+
'hide' => true,
|
333 |
+
'input' => 'select',
|
334 |
+
'options' => array(
|
335 |
+
'' => translate('None'),
|
336 |
+
'1' => __('Link with ID "fancybox-auto"','easy-fancybox'),
|
337 |
),
|
338 |
+
'default' => '1',
|
339 |
+
'description' => '<em><a href="'.$url.'">' . __('More options »','easy-fancybox') . '</a></em><br />'
|
340 |
),
|
341 |
+
'delayClick' => array (
|
342 |
+
'id' => 'fancybox_delayClick',
|
343 |
+
'title' => __('Delay in milliseconds','easy-fancybox'),
|
344 |
+
'label_for' => 'fancybox_delayClick',
|
345 |
+
'hide' => true,
|
346 |
+
'input' => 'number',
|
347 |
+
'step' => '100',
|
348 |
+
'min' => '0',
|
349 |
+
'max' => '',
|
350 |
+
'sanitize_callback' => 'intval',
|
351 |
+
'class' => 'small-text',
|
352 |
+
'default' => '1000',
|
353 |
+
'description' => ' <em>' . __('Default:','easy-fancybox') . ' 1000</em><br />'
|
354 |
),
|
355 |
+
'jqCookie' => array (
|
356 |
+
'id' => '',
|
357 |
+
'title' => __('Hide popup after first visit?','easy-fancybox'),
|
358 |
+
'hide' => true,
|
359 |
+
'input' => 'select',
|
360 |
+
'status' => 'disabled',
|
361 |
+
'default' => '0',
|
362 |
+
'sanitize_callback' => 'intval',
|
363 |
+
'options' => array(
|
364 |
+
'0' => translate('No'),
|
365 |
+
'1' => __('1 Day','easy-fancybox'),
|
366 |
+
'7' => __('1 Week','easy-fancybox'),
|
367 |
+
'30' => __('1 Month','easy-fancybox'),
|
368 |
+
'365' => __('1 Year','easy-fancybox')
|
369 |
+
),
|
370 |
+
'description' => ' <em><a href="'.$url.'">' . __('Make available »','easy-fancybox') . '</a></em><br />'
|
371 |
),
|
372 |
+
'cookiePath' => array (
|
373 |
+
'id' => '',
|
374 |
+
'default' => '',
|
375 |
+
'hide' => true
|
376 |
),
|
377 |
+
'p1' => array (
|
378 |
+
'hide' => true,
|
379 |
+
'description' => '<br /><strong>' . __('Browser & device compatibility','easy-fancybox') . '</strong><br />'
|
380 |
),
|
381 |
+
'minViewportWidth' => array (
|
382 |
+
'id' => 'fancybox_minViewportWidth',
|
383 |
+
'title' => __('Minimum browser/device viewport width','easy-fancybox'),
|
384 |
+
'label_for' => 'fancybox_minViewportWidth',
|
385 |
+
'input' => 'number',
|
386 |
+
'step' => '1',
|
387 |
+
'min' => '320',
|
388 |
+
'max' => '900',
|
389 |
+
'sanitize_callback' => 'intval',
|
390 |
+
'class' => 'small-text',
|
391 |
+
'default' => '',
|
392 |
+
'description' => __('(leave empty to ignore)','easy-fancybox') . '<br/>'
|
|
|
393 |
),
|
394 |
+
/* 'forceNewtab' => array (
|
395 |
+
'id' => 'fancybox_forceNewtab',
|
396 |
+
'input' => 'checkbox',
|
397 |
+
'hide' => true,
|
398 |
+
'default' => '1',
|
399 |
+
'description' => __('Make media links open in a new tab when viewport falls below minimum width (above)','easy-fancybox')
|
400 |
),
|
401 |
+
*/
|
402 |
+
'compatIE8' => array (
|
403 |
+
'id' => 'fancybox_compatIE8',
|
404 |
+
'input' => 'checkbox',
|
405 |
+
'hide' => true,
|
406 |
+
'default' => '',
|
407 |
+
'description' => __('Include IE 8 compatibility style rules','easy-fancybox')
|
408 |
),
|
409 |
|
410 |
+
/* 'p2' => array (
|
411 |
+
'hide' => true,
|
412 |
+
'description' => '<br /><strong>' . __('Theme & plugins compatibility','easy-fancybox') . '</strong><br />'
|
413 |
),
|
414 |
+
'noFooter' => array (
|
415 |
+
'id' => 'fancybox_noFooter',
|
416 |
+
'input' => 'checkbox',
|
417 |
+
'hide' => true,
|
418 |
+
'default' => '',
|
419 |
+
'description' => __('Move scripts from footer to theme head section','easy-fancybox')
|
420 |
),
|
421 |
+
'nojQuery' => array (
|
422 |
+
'id' => 'fancybox_nojQuery',
|
423 |
+
'input' => 'checkbox',
|
424 |
+
'hide' => true,
|
425 |
+
'default' => '',
|
426 |
+
'description' => __('Do not include standard WordPress jQuery library','easy-fancybox')
|
427 |
),
|
428 |
+
'jqCompat' => array (
|
429 |
+
'id' => 'fancybox_jqCompat',
|
430 |
+
'input' => 'checkbox',
|
431 |
+
'hide' => true,
|
432 |
+
'default' => '',
|
433 |
+
'description' => __('Use jQuery pre-1.7 compatibility mode','easy-fancybox')
|
434 |
),
|
435 |
+
*/
|
436 |
+
'p3' => array (
|
437 |
+
'hide' => true,
|
438 |
+
'description' => '<br /><strong>' . __('Advanced','easy-fancybox') . '</strong><br />'
|
439 |
),
|
440 |
+
'metaData' => array (
|
441 |
+
'id' => 'fancybox_metaData',
|
442 |
+
'hide' => true,
|
443 |
+
'input' => 'checkbox',
|
444 |
+
'status' => get_option('fancybox_metaData') ? '' : 'disabled',
|
445 |
+
'default' => '',
|
446 |
+
'description' => get_option('fancybox_metaData') ? __('Include the Metadata jQuery extension script to allow passing custom parameters via link class.','easy-fancybox') : __('Include the Metadata jQuery extension script to allow passing custom parameters via link class.','easy-fancybox') . '. <em><a href="'.$url.'">' . __('Make available »','easy-fancybox') . '</a></em>'
|
447 |
)
|
448 |
)
|
449 |
)
|
450 |
)
|
451 |
),
|
452 |
|
453 |
+
'IMG' => array(
|
454 |
+
'title' => __('Images','easy-fancybox'),
|
455 |
+
'input' => 'multiple',
|
456 |
+
'options' => array(
|
457 |
+
'intro' => array (
|
458 |
+
'hide' => true,
|
459 |
+
'description' => __('To make images open in an overlay, add their extension to the Autodetect field or use the class "fancybox" for its link. Clear field to switch off all autodetection.','easy-fancybox') . '<br />'
|
460 |
+
),
|
461 |
+
'tag' => array (
|
462 |
+
'hide' => true,
|
463 |
+
'default' => 'a.fancybox,area.fancybox,li.fancybox a'
|
464 |
+
),
|
465 |
+
'class' => array (
|
466 |
+
'hide' => true,
|
467 |
+
'default' => 'fancybox image'
|
468 |
+
),
|
469 |
+
'autoAttribute' => array (
|
470 |
+
'id' => 'fancybox_autoAttribute',
|
471 |
+
'title' => __('Autodetect','easy-fancybox'),
|
472 |
+
'label_for' => 'fancybox_autoAttribute',
|
473 |
+
'input' => 'text',
|
474 |
+
'class' => 'regular-text',
|
475 |
+
'hide' => true,
|
476 |
+
'default' => '.jpg .jpeg .png .webp',
|
477 |
+
'selector' => 'href*=',
|
478 |
+
'description' => ' <em>' . __('Example:','easy-fancybox') . ' .jpg .jpeg .png .gif</em><br />'
|
479 |
+
),
|
480 |
+
'autoAttributeLimit' => array (
|
481 |
+
'id' => 'fancybox_autoAttributeLimit',
|
482 |
+
'title' => __('Apply to','easy-fancybox'),
|
483 |
+
'label_for' => 'fancybox_autoAttributeLimit',
|
484 |
+
'hide' => true,
|
485 |
+
'input' => 'select',
|
486 |
+
'options' => array(
|
487 |
+
'' => __('All image links', 'easy-fancybox')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
488 |
),
|
489 |
+
'default' => '',
|
490 |
+
'description' => '<em><a href="'.$url.'">' . __('More options »','easy-fancybox') . '</a></em><br />'
|
491 |
+
),
|
492 |
+
'type' => array (
|
493 |
+
'id' => 'fancybox_classType',
|
494 |
+
'title' => __('Force FancyBox to treat all media linked with class="fancybox" as images?','easy-fancybox'),
|
495 |
+
'label_for' => 'fancybox_classType',
|
496 |
+
'input' => 'select',
|
497 |
+
'options' => array(
|
498 |
+
'image' => translate('Yes'),
|
499 |
+
'' => translate('No')
|
|
|
|
|
|
|
|
|
|
|
500 |
),
|
501 |
+
'default' => get_option('fancybox_enableInline') ? 'image' : '',
|
502 |
+
'description' => '<br/>'
|
503 |
+
),
|
504 |
+
'p2' => array (
|
505 |
+
'hide' => true,
|
506 |
+
'description' => '<br /><strong>' . __('Behavior','easy-fancybox') . '</strong><br />'
|
507 |
+
),
|
508 |
+
'transitionIn' => array (
|
509 |
+
'id' => 'fancybox_transitionIn',
|
510 |
+
'title' => __('Transition In','easy-fancybox'),
|
511 |
+
'label_for' => 'fancybox_transitionIn',
|
512 |
+
'input' => 'select',
|
513 |
+
'options' => array(
|
514 |
+
'none' => translate('None'),
|
515 |
+
'' => __('Fade','easy-fancybox'),
|
516 |
+
'elastic' => __('Elastic','easy-fancybox'),
|
517 |
),
|
518 |
+
'default' => 'elastic',
|
519 |
+
'description' => ' '
|
520 |
+
),
|
521 |
+
'easingIn' => array (
|
522 |
+
'id' => 'fancybox_easingIn',
|
523 |
+
'title' => __('Easing In','easy-fancybox'),
|
524 |
+
'label_for' => 'fancybox_easingIn',
|
525 |
+
'input' => 'select',
|
526 |
+
'options' => array(
|
527 |
+
'linear' => __('Linear','easy-fancybox'),
|
528 |
+
'' => __('Swing','easy-fancybox'),
|
529 |
+
'easeInBack' => __('easeInBack','easy-fancybox'),
|
530 |
+
'easeOutBack' => __('easeOutBack','easy-fancybox')
|
531 |
),
|
532 |
+
'default' => 'easeOutBack',
|
533 |
+
'description' => ' <em><a href="'.$url.'">' . __('More options »','easy-fancybox') . '</a></em><br />'
|
534 |
+
),
|
535 |
+
'transitionOut' => array (
|
536 |
+
'id' => 'fancybox_transitionOut',
|
537 |
+
'title' => __('Transition Out','easy-fancybox'),
|
538 |
+
'label_for' => 'fancybox_transitionOut',
|
539 |
+
'input' => 'select',
|
540 |
+
'options' => array(
|
541 |
+
'none' => translate('None'),
|
542 |
+
'' => __('Fade','easy-fancybox'),
|
543 |
+
'elastic' => __('Elastic','easy-fancybox'),
|
|
|
544 |
),
|
545 |
+
'default' => 'elastic',
|
546 |
+
'description' => ' '
|
547 |
+
),
|
548 |
+
'easingOut' => array (
|
549 |
+
'id' => 'fancybox_easingOut',
|
550 |
+
'title' => __('Easing Out','easy-fancybox'),
|
551 |
+
'label_for' => 'fancybox_easingOut',
|
552 |
+
'input' => 'select',
|
553 |
+
'options' => array(
|
554 |
+
'linear' => __('Linear','easy-fancybox'),
|
555 |
+
'' => __('Swing','easy-fancybox'),
|
556 |
+
'easeInBack' => __('easeInBack','easy-fancybox'),
|
557 |
+
'easeOutBack' => __('easeOutBack','easy-fancybox')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
558 |
),
|
559 |
+
'default' => 'easeInBack',
|
560 |
+
'description' => ' <em><a href="'.$url.'">' . __('More options »','easy-fancybox') . '</a></em><br />' . __('Note:','easy-fancybox') . ' ' . __('Easing effects only apply when Transition is set to Elastic. ','easy-fancybox') . '<br /><br />'
|
561 |
+
),
|
562 |
+
'opacity' => array (
|
563 |
+
'id' => 'fancybox_opacity',
|
564 |
+
'input' => 'checkbox',
|
565 |
+
'noquotes' => true,
|
566 |
+
'default' => '',
|
567 |
+
'description' => __('Transparency fade during elastic transition. CAUTION: Use only when at least Transition In is set to Elastic!','easy-fancybox')
|
568 |
+
),
|
569 |
+
'hideOnContentClick' => array (
|
570 |
+
'id' => 'fancybox_hideOnContentClick',
|
571 |
+
'input' => 'checkbox',
|
572 |
+
'noquotes' => true,
|
573 |
+
'default' => '',
|
574 |
+
'description' => __('Close FancyBox when content is clicked','easy-fancybox')
|
575 |
+
),
|
576 |
+
'p1' => array (
|
577 |
+
'hide' => true,
|
578 |
+
'description' => '<br /><strong>' . __('Appearance','easy-fancybox') . '</strong><br />'
|
579 |
+
),
|
580 |
+
'titleShow' => array (
|
581 |
+
'id' => 'fancybox_titleShow',
|
582 |
+
'input' => 'checkbox',
|
583 |
+
'noquotes' => true,
|
584 |
+
'default' => '1',
|
585 |
+
'description' => __('Show title.','easy-fancybox') . ' ' . __('FancyBox will try to get a title from the link or thumbnail title attributes.','easy-fancybox')
|
586 |
+
),
|
587 |
+
'titlePosition' => array (
|
588 |
+
'id' => 'fancybox_titlePosition',
|
589 |
+
'title' => __('Title Position','easy-fancybox'),
|
590 |
+
'label_for' => 'fancybox_titlePosition',
|
591 |
+
'input' => 'select',
|
592 |
+
'options' => array(
|
593 |
+
'' => __('Float','easy-fancybox'),
|
594 |
+
'outside' => __('Outside','easy-fancybox'),
|
595 |
+
'inside' => __('Inside','easy-fancybox'),
|
596 |
+
'over' => __('Overlay','easy-fancybox')
|
597 |
),
|
598 |
+
'default' => 'over',
|
599 |
+
'description' => '<br />'
|
600 |
+
),
|
601 |
+
'titleFromAlt' => array (
|
602 |
+
'id' => 'fancybox_titleFromAlt',
|
603 |
+
'input' => 'checkbox',
|
604 |
+
'noquotes' => true,
|
605 |
+
'default' => '1',
|
606 |
+
'description' => __('Allow title from thumbnail alt attribute.','easy-fancybox')
|
607 |
+
),
|
608 |
+
'onStart' => array (
|
609 |
+
'id' => '',
|
610 |
+
'title' => __('Advanced','easy-fancybox'),
|
611 |
+
'input' => 'select',
|
612 |
+
'status' => 'disabled',
|
613 |
+
'options' => array(
|
614 |
+
'' => __('Hide/show title on mouse hover action','easy-fancybox')
|
615 |
),
|
616 |
+
'default' => '',
|
617 |
+
'description' => '<em><a href="'.$url.'">' . __('Make available »','easy-fancybox') . '</a></em><br />'
|
618 |
+
),
|
619 |
+
'p3' => array (
|
620 |
+
'hide' => true,
|
621 |
+
'description' => '<br /><strong>' . __('Gallery','easy-fancybox') . '</strong><br />'
|
622 |
+
),
|
623 |
+
'autoGallery' => array (
|
624 |
+
'id' => 'fancybox_autoGallery',
|
625 |
+
'title' => __('Autogallery','easy-fancybox'),
|
626 |
+
'label_for' => 'fancybox_autoGallery',
|
627 |
+
'hide' => true,
|
628 |
+
'input' => 'select',
|
629 |
+
'options' => array(
|
630 |
+
'' => translate('Disabled'),
|
631 |
+
'1' => __('WordPress galleries only','easy-fancybox'),
|
632 |
+
'2' => __('All in one gallery','easy-fancybox')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
633 |
),
|
634 |
+
'default' => '1',
|
635 |
+
'description' => '<em><a href="'.$url.'">' . __('More options »','easy-fancybox') . '</a></em><br />' . __('Note:','easy-fancybox') . ' ' . __('When disabled, you can use the rel attribute to manually group image links together.','easy-fancybox') . '<br /><br />'
|
636 |
+
),
|
637 |
+
'showNavArrows' => array (
|
638 |
+
'id' => 'fancybox_showNavArrows',
|
639 |
+
'input' => 'checkbox',
|
640 |
+
'noquotes' => true,
|
641 |
+
'default' => '1',
|
642 |
+
'description' => __('Show the gallery navigation arrows','easy-fancybox')
|
643 |
+
),
|
644 |
+
'enableKeyboardNav' => array (
|
645 |
+
'id' => 'fancybox_enableKeyboardNav',
|
646 |
+
'input' => 'checkbox',
|
647 |
+
'noquotes' => true,
|
648 |
+
'default' => '1',
|
649 |
+
'description' => __('Arrow key strokes browse the gallery','easy-fancybox')
|
650 |
+
),
|
651 |
+
'mouseWheel' => array (
|
652 |
+
'id' => 'fancybox_mouseWheel',
|
653 |
+
'hide' => true,
|
654 |
+
'input' => 'checkbox',
|
655 |
+
'default' => '1',
|
656 |
+
'description' => __('Include the Mousewheel jQuery extension script to allow gallery browsing by mousewheel action.','easy-fancybox')
|
657 |
+
),
|
658 |
+
'cyclic' => array (
|
659 |
+
'id' => 'fancybox_cyclic',
|
660 |
+
'input' => 'checkbox',
|
661 |
+
'noquotes' => true,
|
662 |
+
'default' => '',
|
663 |
+
'description' => __('Make galleries cyclic, allowing you to keep pressing next/back.','easy-fancybox')
|
664 |
+
),
|
665 |
+
'changeSpeed' => array (
|
666 |
+
'id' => 'fancybox_changeSpeed',
|
667 |
+
'title' => __('Change speed','easy-fancybox'),
|
668 |
+
'label_for' => 'fancybox_changeSpeed',
|
669 |
+
'input' => 'number',
|
670 |
+
'step' => '1',
|
671 |
+
'min' => '0',
|
672 |
+
'max' => '6000',
|
673 |
+
'sanitize_callback' => 'intval',
|
674 |
+
'class' => 'small-text',
|
675 |
+
'default' => '',
|
676 |
+
),
|
677 |
+
'changeFade' => array (
|
678 |
+
'id' => 'fancybox_changeFade',
|
679 |
+
'title' => __('Fade speed','easy-fancybox'),
|
680 |
+
'label_for' => 'fancybox_changeFade',
|
681 |
+
'input' => 'number',
|
682 |
+
'step' => '1',
|
683 |
+
'min' => '0',
|
684 |
+
'max' => '6000',
|
685 |
+
'sanitize_callback' => 'intval',
|
686 |
+
'class' => 'small-text',
|
687 |
+
'default' => '',
|
688 |
+
'description' => '<br />' . __('Duration in milliseconds. Higher is slower.','easy-fancybox') . ' <em>' . __('Default:','easy-fancybox') . ' 300</em><br /><br />'
|
689 |
+
),
|
690 |
+
'autoSelector' => array (
|
691 |
+
'id' => 'fancybox_autoSelector',
|
692 |
+
'hide' => true,
|
693 |
+
'input' => 'hidden',
|
694 |
+
'default' => 'div.gallery ' // add div.tiled-gallery for Tiled Galleries support
|
695 |
+
),
|
696 |
+
'onComplete' => array (
|
697 |
+
'id' => '',
|
698 |
+
'title' => __('Advanced','easy-fancybox'),
|
699 |
+
'input' => 'select',
|
700 |
+
'status' => 'disabled',
|
701 |
+
'options' => array(
|
702 |
+
'' => __('Slideshow','easy-fancybox')
|
703 |
),
|
704 |
+
'default' => '',
|
705 |
+
'description' => '<em><a href="'.$url.'">' . __('Make available »','easy-fancybox') . '</a></em>'
|
706 |
+
),
|
707 |
+
/* 'titleFormat' => array (
|
708 |
+
'id' => 'fancybox_titleFormat',
|
709 |
+
'title' => __('Title format','easy-fancybox'),
|
710 |
+
'label_for' => 'fancybox_titleFormat',
|
711 |
+
'input' => 'select',
|
712 |
+
'options' => array(
|
713 |
+
'' => __('Default FancyBox style','easy-fancybox'),
|
714 |
+
'function(title, currentArray, currentIndex, currentOpts) { return \'<div style="font-face:Arial,sans-serif;text-align:left"><span style="float:right;font-size:large"><a href="javascript:;" onclick="$.fancybox.close();">' . __('Close','easy-fancybox') . ' <img src="' . plugins_url(FANCYBOX_SUBDIR, __FILE__) . '/fancybox/fancy_close.png" /></a></span>\' + (title && title.length ? \'<b style="display:block;margin-right:80px">\' + title + \'</b>\' : \'\' ) + \'' . __('Image','easy-fancybox') . '\' + (currentIndex + 1) + \' ' . __('of','easy-fancybox') . ' \' + currentArray.length + \'</div>\';
|
715 |
+
}' => __('Mimic Lightbox2 style','easy-fancybox'),
|
716 |
+
),
|
717 |
+
'noquotes' => true,
|
718 |
+
'default' => '',
|
719 |
+
'description' => '<br />' . __('To improve Lightbox2 style disable Show close button and set titleposition to Inside or Outside','easy-fancybox') . '<br />'
|
720 |
+
),*/
|
721 |
)
|
722 |
),
|
723 |
|
724 |
+
'Inline' => array(
|
725 |
+
'title' => __('Inline content','easy-fancybox'),
|
726 |
+
'input' => 'multiple',
|
727 |
+
'options' => array(
|
728 |
+
'intro' => array (
|
729 |
+
'hide' => true,
|
730 |
+
'description' => __('To make inline content open in an overlay, wrap that content in a div with a unique ID, create a link with target "#uniqueID" and give it a class "fancybox-inline" attribute.','easy-fancybox') . '<br /><br />'
|
731 |
+
),
|
732 |
+
'tag' => array (
|
733 |
+
'hide' => true,
|
734 |
+
'default' => 'a.fancybox-inline,area.fancybox-inline,li.fancybox-inline a'
|
735 |
+
),
|
736 |
+
'class' => array (
|
737 |
+
'hide' => true,
|
738 |
+
'default' => 'fancybox-inline'
|
739 |
+
),
|
740 |
+
'type' => array (
|
741 |
+
'default' => 'inline'
|
742 |
+
),
|
743 |
+
'autoDimensions' => array (
|
744 |
+
'id' => 'fancybox_autoDimensions',
|
745 |
+
'input' => 'checkbox',
|
746 |
+
'noquotes' => true,
|
747 |
+
'default' => '1',
|
748 |
+
'description' => __('Try to adjust size to inline/html content. If unchecked the default dimensions will be used.','easy-fancybox') . ''
|
749 |
+
),
|
750 |
+
'scrolling' => array (
|
751 |
+
'id' => 'fancybox_InlineScrolling',
|
752 |
+
'title' => __('Scrolling','easy-fancybox'),
|
753 |
+
'label_for' => 'fancybox_InlineScrolling',
|
754 |
+
'input' => 'select',
|
755 |
+
'options' => array(
|
756 |
+
'auto' => __('Auto','easy-fancybox'),
|
757 |
+
'yes' => __('Always','easy-fancybox'),
|
758 |
+
'no' => __('Never','easy-fancybox')
|
759 |
),
|
760 |
+
'default' => 'no',
|
761 |
+
'description' => __('Define scrolling and scrollbar visibility.','easy-fancybox') . '<br /><br />'
|
762 |
+
),
|
763 |
+
'transitionIn' => array (
|
764 |
+
'id' => 'fancybox_transitionInInline',
|
765 |
+
'title' => __('Transition In','easy-fancybox'),
|
766 |
+
'label_for' => 'fancybox_transitionInInline',
|
767 |
+
'input' => 'select',
|
768 |
+
'options' => array(
|
769 |
+
'none' => translate('None'),
|
770 |
+
'' => __('Fade','easy-fancybox'),
|
771 |
+
'elastic' => __('Elastic','easy-fancybox'),
|
772 |
),
|
773 |
+
'default' => '',
|
774 |
+
'description' => ' '
|
775 |
+
),
|
776 |
+
'easingIn' => array (
|
777 |
+
'id' => 'fancybox_easingInInline',
|
778 |
+
'title' => __('Easing In','easy-fancybox'),
|
779 |
+
'label_for' => 'fancybox_easingInInline',
|
780 |
+
'input' => 'select',
|
781 |
+
'options' => array(
|
782 |
+
'linear' => __('Linear','easy-fancybox'),
|
783 |
+
'' => __('Swing','easy-fancybox'),
|
784 |
+
'easeInBack' => __('easeInBack','easy-fancybox'),
|
785 |
+
'easeOutBack' => __('easeOutBack','easy-fancybox')
|
786 |
),
|
787 |
+
'default' => 'easeOutBack',
|
788 |
+
'description' => ' <em><a href="'.$url.'">' . __('More options »','easy-fancybox') . '</a></em><br />'
|
789 |
+
),
|
790 |
+
'transitionOut' => array (
|
791 |
+
'id' => 'fancybox_transitionOutInline',
|
792 |
+
'title' => __('Transition Out','easy-fancybox'),
|
793 |
+
'label_for' => 'fancybox_transitionOutInline',
|
794 |
+
'input' => 'select',
|
795 |
+
'options' => array(
|
796 |
+
'none' => translate('None'),
|
797 |
+
'' => __('Fade','easy-fancybox'),
|
798 |
+
'elastic' => __('Elastic','easy-fancybox'),
|
799 |
),
|
800 |
+
'default' => '',
|
801 |
+
'description' => ' '
|
802 |
+
),
|
803 |
+
'easingOut' => array (
|
804 |
+
'id' => 'fancybox_easingOutInline',
|
805 |
+
'title' => __('Easing Out','easy-fancybox'),
|
806 |
+
'label_for' => 'fancybox_easingOutInline',
|
807 |
+
'input' => 'select',
|
808 |
+
'options' => array(
|
809 |
+
'linear' => __('Linear','easy-fancybox'),
|
810 |
+
'' => __('Swing','easy-fancybox'),
|
811 |
+
'easeInBack' => __('easeInBack','easy-fancybox'),
|
812 |
+
'easeOutBack' => __('easeOutBack','easy-fancybox')
|
813 |
),
|
814 |
+
'default' => 'easeInBack',
|
815 |
+
'description' => ' <em><a href="'.$url.'">' . __('More options »','easy-fancybox') . '</a></em><br />' . __('Note:','easy-fancybox') . ' ' . __('Easing effects only apply when Transition is set to Elastic. ','easy-fancybox') . '<br /><br />'
|
816 |
+
),
|
817 |
+
'opacity' => array (
|
818 |
+
'id' => 'fancybox_opacityInline',
|
819 |
+
'input' => 'checkbox',
|
820 |
+
'noquotes' => true,
|
821 |
+
'default' => '',
|
822 |
+
'description' => __('Transparency fade during elastic transition. CAUTION: Use only when at least Transition In is set to Elastic!','easy-fancybox')
|
823 |
+
),
|
824 |
+
'hideOnContentClick' => array (
|
825 |
+
'id' => 'fancybox_hideOnContentClickInline',
|
826 |
+
'input' => 'checkbox',
|
827 |
+
'noquotes' => true,
|
828 |
+
'default' => '',
|
829 |
+
'description' => __('Close FancyBox when content is clicked','easy-fancybox')
|
830 |
)
|
831 |
)
|
832 |
),
|
833 |
|
834 |
+
'PDF' => array(
|
835 |
+
'title' => __('PDF','easy-fancybox'),
|
836 |
+
'input' => 'multiple',
|
837 |
+
'options' => array(
|
838 |
+
'intro' => array (
|
839 |
+
'hide' => true,
|
840 |
+
'description' => __('To make any PDF document file open in an overlay, switch on Autodetect or use the class "fancybox-pdf" for its link.','easy-fancybox') . '<br />'
|
841 |
+
),
|
842 |
+
'autoAttribute' => array (
|
843 |
+
'id' => 'fancybox_autoAttributePDF',
|
844 |
+
'input' => 'checkbox',
|
845 |
+
'hide' => true,
|
846 |
+
'default' => '1',
|
847 |
+
'selector' => 'a[href*=".pdf"],area[href*=".pdf"],a[href*=".PDF"],area[href*=".PDF"]',
|
848 |
+
'description' => __('Autodetect','easy-fancybox')
|
849 |
+
),
|
850 |
+
'tag' => array (
|
851 |
+
'hide' => true,
|
852 |
+
'default' => 'a.fancybox-pdf,area.fancybox-pdf,li.fancybox-pdf a'
|
853 |
+
),
|
854 |
+
'class' => array (
|
855 |
+
'hide' => true,
|
856 |
+
'default' => 'fancybox-pdf'
|
857 |
+
),
|
858 |
+
'type' => array (
|
859 |
+
'id' => 'fancybox_PDFclassType',
|
860 |
+
'title' => __('Embed with','easy-fancybox'),
|
861 |
+
'label_for' => 'fancybox_PDFclassType',
|
862 |
+
'input' => 'select',
|
863 |
+
'options' => array(
|
864 |
+
'html' => __('Object tag (plus fall-back link)','easy-fancybox'),
|
865 |
+
'iframe' => __('iFrame tag (let browser decide)','easy-fancybox')
|
866 |
),
|
867 |
+
'default' => 'iframe',
|
868 |
+
'description' => ' <em><a href="'.$url.'">' . __('More options »','easy-fancybox') . '</a></em><br/><br/>'
|
869 |
+
),
|
870 |
+
'width' => array (
|
871 |
+
'id' => 'fancybox_PDFwidth',
|
872 |
+
'title' => translate('Width'),
|
873 |
+
'label_for' => 'fancybox_PDFwidth',
|
874 |
+
'input' => 'text',
|
875 |
+
'sanitize_callback' => 'intval',
|
876 |
+
'class' => 'small-text',
|
877 |
+
'default' => '90%',
|
878 |
+
'description' => ' '
|
879 |
+
),
|
880 |
+
'height' => array (
|
881 |
+
'id' => 'fancybox_PDFheight',
|
882 |
+
'title' => translate('Height'),
|
883 |
+
'label_for' => 'fancybox_PDFheight',
|
884 |
+
'input' => 'text',
|
885 |
+
'sanitize_callback' => 'intval',
|
886 |
+
'class' => 'small-text',
|
887 |
+
'default' => '90%'
|
888 |
+
),
|
889 |
+
'padding' => array (
|
890 |
+
'id' => 'fancybox_PDFpadding',
|
891 |
+
'title' => translate('Border'),
|
892 |
+
'label_for' => 'fancybox_PDFpadding',
|
893 |
+
'input' => 'number',
|
894 |
+
'step' => '1',
|
895 |
+
'min' => '0',
|
896 |
+
'max' => '100',
|
897 |
+
'sanitize_callback' => 'intval',
|
898 |
+
'class' => 'small-text',
|
899 |
+
'default' => '10',
|
900 |
+
'description' => '<br /><br />'
|
901 |
+
),
|
902 |
+
'titleShow' => array (
|
903 |
+
'id' => 'fancybox_PDFtitleShow',
|
904 |
+
'input' => 'checkbox',
|
905 |
+
'noquotes' => true,
|
906 |
+
'default' => '',
|
907 |
+
'description' => __('Show title.','easy-fancybox') . ' ' . __('FancyBox will try to get a title from the link or thumbnail title attributes.','easy-fancybox')
|
908 |
+
),
|
909 |
+
'titlePosition' => array (
|
910 |
+
'id' => 'fancybox_PDFtitlePosition',
|
911 |
+
'title' => __('Title Position','easy-fancybox'),
|
912 |
+
'label_for' => 'fancybox_PDFtitlePosition',
|
913 |
+
'input' => 'select',
|
914 |
+
'options' => array(
|
915 |
+
'float' => __('Float','easy-fancybox'),
|
916 |
+
'outside' => __('Outside','easy-fancybox'),
|
917 |
+
'inside' => __('Inside','easy-fancybox')
|
918 |
),
|
919 |
+
'default' => 'float',
|
920 |
+
'description' => '<br />'
|
921 |
),
|
922 |
+
'titleFromAlt' => array (
|
923 |
+
'id' => 'fancybox_PDFtitleFromAlt',
|
924 |
+
'input' => 'checkbox',
|
925 |
+
'noquotes' => true,
|
926 |
+
'default' => '1',
|
927 |
+
'description' => __('Allow title from thumbnail alt attribute.','easy-fancybox')
|
928 |
),
|
929 |
+
'autoDimensions' => array (
|
930 |
+
'noquotes' => true,
|
931 |
+
'default' => 'false'
|
932 |
),
|
933 |
+
'scrolling' => array (
|
934 |
+
'default' => 'no',
|
935 |
),
|
936 |
+
'onStart' => array (
|
937 |
+
'noquotes' => true,
|
938 |
+
// 'default' => 'function(selectedArray, selectedIndex, selectedOpts) { selectedOpts.content = \'<embed src="\' + selectedArray[selectedIndex].href + \'#toolbar=1&navpanes=0&nameddest=self&page=1&view=FitH,0&zoom=80,0,0" type="application/pdf" height="100%" width="100%" />\' }'
|
939 |
+
'default' => get_option('fancybox_PDFclassType','html') == 'iframe' ? '' : 'function(selectedArray,selectedIndex,selectedOpts){selectedOpts.content=\'<object data="\'+selectedArray[selectedIndex].href+\'" type="application/pdf" height="100%" width="100%"><a href="\'+selectedArray[selectedIndex].href+\'" style="display:block;position:absolute;top:48%;width:100%;text-align:center">\'+jQuery(selectedArray[selectedIndex]).html()+\'</a></object>\'}'
|
940 |
+
// 'default' => 'function(selectedArray, selectedIndex, selectedOpts) { selectedOpts.content = \'<embed src="\' + selectedArray[selectedIndex].href + \'" type="application/pdf" height="100%" width="100%" />\' }'
|
941 |
),
|
942 |
+
)
|
943 |
),
|
944 |
|
945 |
+
'SWF' => array(
|
946 |
+
'title' => __('SWF','easy-fancybox'),
|
947 |
+
'input' => 'multiple',
|
948 |
+
'options' => array(
|
949 |
+
'intro' => array (
|
950 |
+
'hide' => true,
|
951 |
+
'description' => __('To make any Flash (.swf) file open in an overlay, switch on Autodetect or use the class "fancybox-swf" for its link.','easy-fancybox') . '<br />'
|
952 |
+
),
|
953 |
+
'autoAttribute' => array (
|
954 |
+
'id' => 'fancybox_autoAttributeSWF',
|
955 |
+
'input' => 'checkbox',
|
956 |
+
'hide' => true,
|
957 |
+
'default' => '1',
|
958 |
+
'selector' => 'a[href*=".swf"],area[href*=".swf"],a[href*=".SWF"],area[href*=".SWF"]',
|
959 |
+
'description' => __('Autodetect','easy-fancybox') . '<br />'
|
960 |
+
),
|
961 |
+
'tag' => array (
|
962 |
+
'hide' => true,
|
963 |
+
'default' => 'a.fancybox-swf,area.fancybox-swf,li.fancybox-swf a'
|
964 |
+
),
|
965 |
+
'class' => array (
|
966 |
+
'hide' => true,
|
967 |
+
'default' => 'fancybox-swf'
|
968 |
+
),
|
969 |
+
'type' => array(
|
970 |
+
'default' => 'swf'
|
971 |
+
),
|
972 |
+
'width' => array (
|
973 |
+
'id' => 'fancybox_SWFWidth',
|
974 |
+
'title' => translate('Width'),
|
975 |
+
'label_for' => 'fancybox_SWFWidth',
|
976 |
+
'input' => 'text',
|
977 |
+
'sanitize_callback' => 'intval',
|
978 |
+
'class' => 'small-text',
|
979 |
+
'options' => array(),
|
980 |
+
'default' => '680',
|
981 |
+
'description' => ' '
|
982 |
+
),
|
983 |
+
'height' => array (
|
984 |
+
'id' => 'fancybox_SWFHeight',
|
985 |
+
'title' => translate('Height'),
|
986 |
+
'label_for' => 'fancybox_SWFHeight',
|
987 |
+
'input' => 'text',
|
988 |
+
'sanitize_callback' => 'intval',
|
989 |
+
'class' => 'small-text',
|
990 |
+
'options' => array(),
|
991 |
+
'default' => '495',
|
992 |
+
),
|
993 |
+
'padding' => array (
|
994 |
+
'id' => 'fancybox_SWFpadding',
|
995 |
+
'title' => translate('Border'),
|
996 |
+
'label_for' => 'fancybox_SWFpadding',
|
997 |
+
'input' => 'number',
|
998 |
+
'step' => '1',
|
999 |
+
'min' => '0',
|
1000 |
+
'max' => '100',
|
1001 |
+
'sanitize_callback' => 'intval',
|
1002 |
+
'class' => 'small-text',
|
1003 |
+
'default' => '0',
|
1004 |
+
'description' => '<br /><br />'
|
1005 |
+
),
|
1006 |
+
'titleShow' => array (
|
1007 |
+
'id' => 'fancybox_SWFtitleShow',
|
1008 |
+
'input' => 'checkbox',
|
1009 |
+
'noquotes' => true,
|
1010 |
+
'default' => '',
|
1011 |
+
'description' => __('Show title.','easy-fancybox') . ' ' . __('FancyBox will try to get a title from the link or thumbnail title attributes.','easy-fancybox')
|
1012 |
+
),
|
1013 |
+
'titlePosition' => array (
|
1014 |
+
'id' => 'fancybox_SWFtitlePosition',
|
1015 |
+
'title' => __('Title Position','easy-fancybox'),
|
1016 |
+
'label_for' => 'fancybox_SWFtitlePosition',
|
1017 |
+
'input' => 'select',
|
1018 |
+
'options' => array(
|
1019 |
+
'float' => __('Float','easy-fancybox'),
|
1020 |
+
'outside' => __('Outside','easy-fancybox'),
|
1021 |
+
'inside' => __('Inside','easy-fancybox')
|
1022 |
),
|
1023 |
+
'default' => 'float',
|
1024 |
+
'description' => '<br />'
|
1025 |
+
),
|
1026 |
+
'titleFromAlt' => array (
|
1027 |
+
'id' => 'fancybox_SWFtitleFromAlt',
|
1028 |
+
'input' => 'checkbox',
|
1029 |
+
'noquotes' => true,
|
1030 |
+
'default' => '1',
|
1031 |
+
'description' => __('Allow title from thumbnail alt attribute.','easy-fancybox')
|
1032 |
+
),
|
1033 |
+
'swf' => array (
|
1034 |
+
'noquotes' => true,
|
1035 |
+
'default' => '{\'wmode\':\'opaque\',\'allowfullscreen\':true}'
|
1036 |
)
|
1037 |
)
|
1038 |
),
|
1039 |
|
1040 |
+
'SVG' => array(
|
1041 |
+
'title' => __('SVG','easy-fancybox'),
|
1042 |
+
'input' => 'multiple',
|
1043 |
+
'options' => array(
|
1044 |
+
'intro' => array (
|
1045 |
+
'hide' => true,
|
1046 |
+
'description' => __('To make any SVG (.svg) file open in an overlay, switch on Autodetect or use the class "fancybox-svg" for its link.','easy-fancybox') . '<br />'
|
1047 |
+
),
|
1048 |
+
'autoAttribute' => array (
|
1049 |
+
'id' => 'fancybox_autoAttributeSVG',
|
1050 |
+
'input' => 'checkbox',
|
1051 |
+
'hide' => true,
|
1052 |
+
'default' => '1',
|
1053 |
+
'selector' => 'a[href*=".svg"],area[href*=".svg"],a[href*=".SVG"],area[href*=".SVG"]',
|
1054 |
+
'description' => __('Autodetect','easy-fancybox') . '<br />'
|
1055 |
+
),
|
1056 |
+
'tag' => array (
|
1057 |
+
'hide' => true,
|
1058 |
+
'default' => 'a.fancybox-svg,area.fancybox-svg,li.fancybox-svg a'
|
1059 |
+
),
|
1060 |
+
'class' => array (
|
1061 |
+
'hide' => true,
|
1062 |
+
'default' => 'fancybox-svg'
|
1063 |
+
),
|
1064 |
+
'type' => array(
|
1065 |
+
'default' => 'svg'
|
1066 |
+
),
|
1067 |
+
'width' => array (
|
1068 |
+
'id' => 'fancybox_SVGWidth',
|
1069 |
+
'title' => translate('Width'),
|
1070 |
+
'label_for' => 'fancybox_SVGWidth',
|
1071 |
+
'input' => 'text',
|
1072 |
+
'sanitize_callback' => 'intval',
|
1073 |
+
'class' => 'small-text',
|
1074 |
+
'options' => array(),
|
1075 |
+
'default' => '680',
|
1076 |
+
'description' => ' '
|
1077 |
+
),
|
1078 |
+
'height' => array (
|
1079 |
+
'id' => 'fancybox_SVGHeight',
|
1080 |
+
'title' => translate('Height'),
|
1081 |
+
'label_for' => 'fancybox_SVGHeight',
|
1082 |
+
'input' => 'text',
|
1083 |
+
'sanitize_callback' => 'intval',
|
1084 |
+
'class' => 'small-text',
|
1085 |
+
'options' => array(),
|
1086 |
+
'default' => '495',
|
1087 |
+
),
|
1088 |
+
'padding' => array (
|
1089 |
+
'id' => 'fancybox_SVGpadding',
|
1090 |
+
'title' => translate('Border'),
|
1091 |
+
'label_for' => 'fancybox_SVGpadding',
|
1092 |
+
'input' => 'number',
|
1093 |
+
'step' => '1',
|
1094 |
+
'min' => '0',
|
1095 |
+
'max' => '100',
|
1096 |
+
'sanitize_callback' => 'intval',
|
1097 |
+
'class' => 'small-text',
|
1098 |
+
'default' => '0',
|
1099 |
+
'description' => '<br /><br />'
|
1100 |
+
),
|
1101 |
+
'titleShow' => array (
|
1102 |
+
'id' => 'fancybox_SVGtitleShow',
|
1103 |
+
'input' => 'checkbox',
|
1104 |
+
'noquotes' => true,
|
1105 |
+
'default' => '',
|
1106 |
+
'description' => __('Show title.','easy-fancybox') . ' ' . __('FancyBox will try to get a title from the link or thumbnail title attributes.','easy-fancybox')
|
1107 |
+
),
|
1108 |
+
'titlePosition' => array (
|
1109 |
+
'id' => 'fancybox_SVGtitlePosition',
|
1110 |
+
'title' => __('Title Position','easy-fancybox'),
|
1111 |
+
'label_for' => 'fancybox_SVGtitlePosition',
|
1112 |
+
'input' => 'select',
|
1113 |
+
'options' => array(
|
1114 |
+
'float' => __('Float','easy-fancybox'),
|
1115 |
+
'outside' => __('Outside','easy-fancybox'),
|
1116 |
+
'inside' => __('Inside','easy-fancybox')
|
1117 |
+
//,'over' => __('Overlay','easy-fancybox')
|
1118 |
),
|
1119 |
+
'default' => 'float',
|
1120 |
+
'description' => '<br />'
|
1121 |
+
),
|
1122 |
+
'titleFromAlt' => array (
|
1123 |
+
'id' => 'fancybox_SVGtitleFromAlt',
|
1124 |
+
'input' => 'checkbox',
|
1125 |
+
'noquotes' => true,
|
1126 |
+
'default' => '1',
|
1127 |
+
'description' => __('Allow title from thumbnail alt attribute.','easy-fancybox')
|
1128 |
+
),
|
1129 |
+
'svg' => array (
|
1130 |
+
'noquotes' => true,
|
1131 |
+
'default' => '{\'wmode\':\'opaque\',\'allowfullscreen\':true}'
|
1132 |
)
|
1133 |
)
|
1134 |
),
|
1135 |
|
1136 |
+
'YouTube' => array(
|
1137 |
+
'title' => __('YouTube','easy-fancybox'),
|
1138 |
+
'input' => 'multiple',
|
1139 |
+
'options' => array(
|
1140 |
+
'intro' => array (
|
1141 |
+
'hide' => true,
|
1142 |
+
'description' => __('To make any YouTube movie open in an overlay, switch on Autodetect or use the class "fancybox-youtube" for its link.','easy-fancybox') . '<br />'
|
1143 |
+
),
|
1144 |
+
'autoAttribute' => array (
|
1145 |
+
'id' => 'fancybox_autoAttributeYoutube',
|
1146 |
+
'input' => 'checkbox',
|
1147 |
+
'hide' => true,
|
1148 |
+
'default' => '1',
|
1149 |
+
'selector' => 'a[href*="youtu.be/"],area[href*="youtu.be/"],a[href*="youtube.com/watch"],area[href*="youtube.com/watch"]',
|
1150 |
+
'description' => __('Autodetect','easy-fancybox') . '<br />'
|
1151 |
+
),
|
1152 |
+
'tag' => array (
|
1153 |
+
'hide' => true,
|
1154 |
+
'default' => 'a.fancybox-youtube,area.fancybox-youtube,li.fancybox-youtube a'
|
1155 |
+
),
|
1156 |
+
'class' => array (
|
1157 |
+
'hide' => true,
|
1158 |
+
'default' => 'fancybox-youtube'
|
1159 |
+
),
|
1160 |
+
'type' => array(
|
1161 |
+
'default' => 'iframe'
|
1162 |
+
),
|
1163 |
+
'width' => array (
|
1164 |
+
'id' => 'fancybox_YoutubeWidth',
|
1165 |
+
'title' => translate('Width'),
|
1166 |
+
'label_for' => 'fancybox_YoutubeWidth',
|
1167 |
+
'input' => 'number',
|
1168 |
+
'step' => '1',
|
1169 |
+
'min' => '420',
|
1170 |
+
'max' => '1500',
|
1171 |
+
'sanitize_callback' => 'intval',
|
1172 |
+
'class' => 'small-text',
|
1173 |
+
'default' => '640',
|
1174 |
+
'description' => ' '
|
1175 |
+
),
|
1176 |
+
'height' => array (
|
1177 |
+
'id' => 'fancybox_YoutubeHeight',
|
1178 |
+
'title' => translate('Height'),
|
1179 |
+
'label_for' => 'fancybox_YoutubeHeight',
|
1180 |
+
'input' => 'number',
|
1181 |
+
'step' => '1',
|
1182 |
+
'min' => '315',
|
1183 |
+
'max' => '900',
|
1184 |
+
'sanitize_callback' => 'intval',
|
1185 |
+
'class' => 'small-text',
|
1186 |
+
'default' => '360',
|
1187 |
+
),
|
1188 |
+
'padding' => array (
|
1189 |
+
'id' => 'fancybox_Youtubepadding',
|
1190 |
+
'title' => translate('Border'),
|
1191 |
+
'label_for' => 'fancybox_Youtubepadding',
|
1192 |
+
'input' => 'number',
|
1193 |
+
'step' => '1',
|
1194 |
+
'min' => '0',
|
1195 |
+
'max' => '100',
|
1196 |
+
'sanitize_callback' => 'intval',
|
1197 |
+
'class' => 'small-text',
|
1198 |
+
'default' => '0',
|
1199 |
+
'description' => '<br /><br />'
|
1200 |
+
),
|
1201 |
+
'keepRatio' => array(
|
1202 |
+
'noquotes' => true,
|
1203 |
+
'default' => '1'
|
1204 |
+
),
|
1205 |
+
'titleShow' => array (
|
1206 |
+
'id' => 'fancybox_YoutubetitleShow',
|
1207 |
+
'input' => 'checkbox',
|
1208 |
+
'noquotes' => true,
|
1209 |
+
'default' => '',
|
1210 |
+
'description' => __('Show title.','easy-fancybox') . ' ' . __('FancyBox will try to get a title from the link or thumbnail title attributes.','easy-fancybox')
|
1211 |
+
),
|
1212 |
+
'titlePosition' => array (
|
1213 |
+
'id' => 'fancybox_YoutubetitlePosition',
|
1214 |
+
'title' => __('Title Position','easy-fancybox'),
|
1215 |
+
'label_for' => 'fancybox_YoutubetitlePosition',
|
1216 |
+
'input' => 'select',
|
1217 |
+
'options' => array(
|
1218 |
+
'float' => __('Float','easy-fancybox'),
|
1219 |
+
'outside' => __('Outside','easy-fancybox'),
|
1220 |
+
'inside' => __('Inside','easy-fancybox')
|
1221 |
),
|
1222 |
+
'default' => 'float',
|
1223 |
+
'description' => '<br />'
|
1224 |
+
),
|
1225 |
+
'titleFromAlt' => array (
|
1226 |
+
'id' => 'fancybox_YoutubetitleFromAlt',
|
1227 |
+
'input' => 'checkbox',
|
1228 |
+
'noquotes' => true,
|
1229 |
+
'default' => '1',
|
1230 |
+
'description' => __('Allow title from thumbnail alt attribute.','easy-fancybox')
|
1231 |
+
),
|
1232 |
+
'onStart' => array (
|
1233 |
+
'noquotes' => true,
|
1234 |
+
'default' => 'function(selectedArray,selectedIndex,selectedOpts){selectedOpts.href=selectedArray[selectedIndex].href.replace(new RegExp(\'youtu.be\',\'i\'),\'www.youtube.com/embed\').replace(new RegExp(\'watch\\\?(.*)v=([a-z0-9\_\-]+)(&|&|\\\?)?(.*)\',\'i\'),\'embed/$2?$1$4\');var splitOn=selectedOpts.href.indexOf(\'?\');var urlParms=(splitOn>-1)?selectedOpts.href.substring(splitOn):"";selectedOpts.allowfullscreen=(urlParms.indexOf(\'fs=0\')>-1)?false:true}'
|
1235 |
)
|
1236 |
)
|
1237 |
),
|
1238 |
|
1239 |
+
'Vimeo' => array(
|
1240 |
+
'title' => __('Vimeo','easy-fancybox'),
|
1241 |
+
'input' => 'multiple',
|
1242 |
+
'options' => array(
|
1243 |
+
'intro' => array (
|
1244 |
+
'hide' => true,
|
1245 |
+
'description' => __('To make any Vimeo movie open in an overlay, switch on Autodetect or use the class "fancybox-vimeo" for its link.','easy-fancybox') . '<br />'
|
1246 |
+
),
|
1247 |
+
'autoAttribute' => array (
|
1248 |
+
'id' => 'fancybox_autoAttributeVimeo',
|
1249 |
+
'input' => 'checkbox',
|
1250 |
+
'hide' => true,
|
1251 |
+
'default' => '1',
|
1252 |
+
'selector' => 'a[href*="vimeo.com/"],area[href*="vimeo.com/"]',
|
1253 |
+
'description' => __('Autodetect','easy-fancybox') . '<br />'
|
1254 |
+
),
|
1255 |
+
'tag' => array (
|
1256 |
+
'hide' => true,
|
1257 |
+
'default' => 'a.fancybox-vimeo,area.fancybox-vimeo,li.fancybox-vimeo a'
|
1258 |
+
),
|
1259 |
+
'class' => array (
|
1260 |
+
'hide' => true,
|
1261 |
+
'default' => 'fancybox-vimeo'
|
1262 |
+
),
|
1263 |
+
'type' => array(
|
1264 |
+
'default' => 'iframe'
|
1265 |
+
),
|
1266 |
+
'width' => array (
|
1267 |
+
'id' => 'fancybox_VimeoWidth',
|
1268 |
+
'title' => translate('Width'),
|
1269 |
+
'label_for' => 'fancybox_VimeoWidth',
|
1270 |
+
'input' => 'number',
|
1271 |
+
'step' => '1',
|
1272 |
+
'min' => '400',
|
1273 |
+
'max' => '1500',
|
1274 |
+
'sanitize_callback' => 'intval',
|
1275 |
+
'class' => 'small-text',
|
1276 |
+
'default' => '500',
|
1277 |
+
'description' => ' '
|
1278 |
+
),
|
1279 |
+
'height' => array (
|
1280 |
+
'id' => 'fancybox_VimeoHeight',
|
1281 |
+
'title' => translate('Height'),
|
1282 |
+
'label_for' => 'fancybox_VimeoHeight',
|
1283 |
+
'input' => 'number',
|
1284 |
+
'step' => '1',
|
1285 |
+
'min' => '225',
|
1286 |
+
'max' => '900',
|
1287 |
+
'sanitize_callback' => 'intval',
|
1288 |
+
'class' => 'small-text',
|
1289 |
+
'default' => '281'
|
1290 |
+
),
|
1291 |
+
'padding' => array (
|
1292 |
+
'id' => 'fancybox_Vimeopadding',
|
1293 |
+
'title' => translate('Border'),
|
1294 |
+
'label_for' => 'fancybox_Vimeopadding',
|
1295 |
+
'input' => 'number',
|
1296 |
+
'step' => '1',
|
1297 |
+
'min' => '0',
|
1298 |
+
'max' => '100',
|
1299 |
+
'sanitize_callback' => 'intval',
|
1300 |
+
'class' => 'small-text',
|
1301 |
+
'default' => '0',
|
1302 |
+
'description' => '<br /><br />'
|
1303 |
+
),
|
1304 |
+
'keepRatio' => array(
|
1305 |
+
'noquotes' => true,
|
1306 |
+
'default' => '1'
|
1307 |
+
),
|
1308 |
+
'titleShow' => array (
|
1309 |
+
'id' => 'fancybox_VimeotitleShow',
|
1310 |
+
'input' => 'checkbox',
|
1311 |
+
'noquotes' => true,
|
1312 |
+
'default' => '',
|
1313 |
+
'description' => __('Show title.','easy-fancybox') . ' ' . __('FancyBox will try to get a title from the link or thumbnail title attributes.','easy-fancybox')
|
1314 |
+
),
|
1315 |
+
'titlePosition' => array (
|
1316 |
+
'id' => 'fancybox_VimeotitlePosition',
|
1317 |
+
'title' => __('Title Position','easy-fancybox'),
|
1318 |
+
'label_for' => 'fancybox_VimeotitlePosition',
|
1319 |
+
'input' => 'select',
|
1320 |
+
'options' => array(
|
1321 |
+
'float' => __('Float','easy-fancybox'),
|
1322 |
+
'outside' => __('Outside','easy-fancybox'),
|
1323 |
+
'inside' => __('Inside','easy-fancybox')
|
1324 |
),
|
1325 |
+
'default' => 'float',
|
1326 |
+
'description' => '<br />'
|
1327 |
+
),
|
1328 |
+
'titleFromAlt' => array (
|
1329 |
+
'id' => 'fancybox_VimeotitleFromAlt',
|
1330 |
+
'input' => 'checkbox',
|
1331 |
+
'noquotes' => true,
|
1332 |
+
'default' => '1',
|
1333 |
+
'description' => __('Allow title from thumbnail alt attribute.','easy-fancybox')
|
1334 |
+
),
|
1335 |
+
'onStart' => array (
|
1336 |
+
'noquotes' => true,
|
1337 |
+
'default' => 'function(selectedArray,selectedIndex,selectedOpts){selectedOpts.href=selectedArray[selectedIndex].href.replace(new RegExp(\'//(www\\.)?vimeo\\.com/([0-9]+)(&|\\\?)?(.*)\',\'i\'),\'//player.vimeo.com/video/$2?$4\');var splitOn=selectedOpts.href.indexOf(\'?\');var urlParms=(splitOn>-1)?selectedOpts.href.substring(splitOn):"";selectedOpts.allowfullscreen=(urlParms.indexOf(\'fullscreen=0\')>-1)?false:true}'
|
1338 |
)
|
1339 |
)
|
1340 |
),
|
1341 |
|
1342 |
+
'Dailymotion' => array(
|
1343 |
+
'title' => __('Dailymotion','easy-fancybox'),
|
1344 |
+
'input' => 'multiple',
|
1345 |
+
'options' => array(
|
1346 |
+
'intro' => array (
|
1347 |
+
'hide' => true,
|
1348 |
+
'description' => __('To make any Dailymotion movie open in an overlay, switch on Autodetect or use the class "fancybox-dailymotion" for its link.','easy-fancybox') . '<br />'
|
1349 |
+
),
|
1350 |
+
'autoAttribute' => array (
|
1351 |
+
'id' => 'fancybox_autoAttributeDailymotion',
|
1352 |
+
'input' => 'checkbox',
|
1353 |
+
'hide' => true,
|
1354 |
+
'default' => '1',
|
1355 |
+
'selector' => 'a[href*="dailymotion.com/"],area[href*="dailymotion.com/"]',
|
1356 |
+
'description' => __('Autodetect','easy-fancybox') . '<br />'
|
1357 |
+
),
|
1358 |
+
'tag' => array (
|
1359 |
+
'hide' => true,
|
1360 |
+
'default' => 'a.fancybox-dailymotion,area.fancybox-dailymotion,li.fancybox-dailymotion a'
|
1361 |
+
),
|
1362 |
+
'class' => array (
|
1363 |
+
'hide' => true,
|
1364 |
+
'default' => 'fancybox-dailymotion'
|
1365 |
+
),
|
1366 |
+
'type' => array(
|
1367 |
+
'default' => 'iframe'
|
1368 |
+
),
|
1369 |
+
'width' => array (
|
1370 |
+
'id' => 'fancybox_DailymotionWidth',
|
1371 |
+
'title' => translate('Width'),
|
1372 |
+
'label_for' => 'fancybox_DailymotionWidth',
|
1373 |
+
'input' => 'number',
|
1374 |
+
'step' => '1',
|
1375 |
+
'min' => '320',
|
1376 |
+
'max' => '1500',
|
1377 |
+
'sanitize_callback' => 'intval',
|
1378 |
+
'class' => 'small-text',
|
1379 |
+
'default' => '560',
|
1380 |
+
'description' => ' '
|
1381 |
+
),
|
1382 |
+
'height' => array (
|
1383 |
+
'id' => 'fancybox_DailymotionHeight',
|
1384 |
+
'title' => translate('Height'),
|
1385 |
+
'label_for' => 'fancybox_DailymotionHeight',
|
1386 |
+
'input' => 'number',
|
1387 |
+
'step' => '1',
|
1388 |
+
'min' => '180',
|
1389 |
+
'max' => '900',
|
1390 |
+
'sanitize_callback' => 'intval',
|
1391 |
+
'class' => 'small-text',
|
1392 |
+
'default' => '315'
|
1393 |
+
),
|
1394 |
+
'padding' => array (
|
1395 |
+
'id' => 'fancybox_DailymotionPadding',
|
1396 |
+
'title' => translate('Border'),
|
1397 |
+
'label_for' => 'fancybox_DailymotionPadding',
|
1398 |
+
'input' => 'number',
|
1399 |
+
'step' => '1',
|
1400 |
+
'min' => '0',
|
1401 |
+
'max' => '100',
|
1402 |
+
'sanitize_callback' => 'intval',
|
1403 |
+
'class' => 'small-text',
|
1404 |
+
'default' => '0',
|
1405 |
+
'description' => '<br /><br />'
|
1406 |
+
),
|
1407 |
+
'keepRatio' => array(
|
1408 |
+
'noquotes' => true,
|
1409 |
+
'default' => '1'
|
1410 |
+
),
|
1411 |
+
'titleShow' => array (
|
1412 |
+
'id' => 'fancybox_DailymotiontitleShow',
|
1413 |
+
'input' => 'checkbox',
|
1414 |
+
'noquotes' => true,
|
1415 |
+
'default' => '',
|
1416 |
+
'description' => __('Show title.','easy-fancybox') . ' ' . __('FancyBox will try to get a title from the link or thumbnail title attributes.','easy-fancybox')
|
1417 |
+
),
|
1418 |
+
'titlePosition' => array (
|
1419 |
+
'id' => 'fancybox_DailymotiontitlePosition',
|
1420 |
+
'title' => __('Title Position','easy-fancybox'),
|
1421 |
+
'label_for' => 'fancybox_DailymotiontitlePosition',
|
1422 |
+
'input' => 'select',
|
1423 |
+
'options' => array(
|
1424 |
+
'float' => __('Float','easy-fancybox'),
|
1425 |
+
'outside' => __('Outside','easy-fancybox'),
|
1426 |
+
'inside' => __('Inside','easy-fancybox')
|
1427 |
),
|
1428 |
+
'default' => 'float',
|
1429 |
+
'description' => '<br />'
|
1430 |
+
),
|
1431 |
+
'titleFromAlt' => array (
|
1432 |
+
'id' => 'fancybox_DailymotiontitleFromAlt',
|
1433 |
+
'input' => 'checkbox',
|
1434 |
+
'noquotes' => true,
|
1435 |
+
'default' => '1',
|
1436 |
+
'description' => __('Allow title from thumbnail alt attribute.','easy-fancybox')
|
1437 |
+
),
|
1438 |
+
'onStart' => array (
|
1439 |
+
'noquotes' => true,
|
1440 |
+
'default' => 'function(selectedArray,selectedIndex,selectedOpts){selectedOpts.href=selectedArray[selectedIndex].href.replace(new RegExp(\'/video/(.*)\',\'i\'),\'/embed/video/$1\');var splitOn=selectedOpts.href.indexOf(\'?\');var urlParms=(splitOn>-1)?selectedOpts.href.substring(splitOn):"";selectedOpts.allowfullscreen=(urlParms.indexOf(\'fullscreen=0\')>-1)?false:true}'
|
1441 |
)
|
1442 |
)
|
1443 |
),
|
1444 |
|
1445 |
+
/* 'Tudou' => array(
|
1446 |
+
'id' => 'fancybox_Tudou',
|
1447 |
+
'title' => __('Tudou','easy-fancybox'),
|
1448 |
+
'label_for' => '',
|
1449 |
+
'input' => 'multiple',
|
1450 |
+
'class' => '', 'description' => '',
|
1451 |
+
'options' => array(
|
1452 |
+
'autoAttributeTudou' => array (
|
1453 |
+
'id' => 'fancybox_autoAttributeTudou',
|
1454 |
+
'label_for' => '',
|
1455 |
+
'input' => 'checkbox',
|
1456 |
+
'class' => '',
|
1457 |
+
'options' => array(),
|
1458 |
+
'hide' => true,
|
1459 |
+
'default' => '1',
|
1460 |
+
'description' => __('Tudou links','easy-fancybox')
|
1461 |
+
)
|
1462 |
)
|
1463 |
+
),*/
|
|
|
1464 |
|
1465 |
+
/* 'Animoto' => array(),
|
1466 |
|
1467 |
+
Example ANIMOTO page link http://animoto.com/play/Kf9POzQMSOGWyu41gtOtsw should become
|
1468 |
+
http://static.animoto.com/swf/w.swf?w=swf/vp1&f=Kf9POzQMSOGWyu41gtOtsw&i=m
|
1469 |
|
1470 |
+
*/
|
1471 |
|
1472 |
+
'iFrame' => array(
|
1473 |
+
'title' => __('iFrames','easy-fancybox'),
|
1474 |
+
'input' => 'multiple',
|
1475 |
+
'options' => array(
|
1476 |
+
'intro' => array (
|
1477 |
+
'hide' => true,
|
1478 |
+
'description' => __('To make a website or HTML document open in an overlay, use the class "fancybox-iframe" for its link.','easy-fancybox') . '<br /><br />'
|
1479 |
+
),
|
1480 |
+
'tag' => array (
|
1481 |
+
'hide' => true,
|
1482 |
+
'default' => 'a.fancybox-iframe,area.fancybox-iframe,li.fancybox-iframe a'
|
1483 |
+
),
|
1484 |
+
'class' => array (
|
1485 |
+
'hide' => true,
|
1486 |
+
'default' => 'fancybox-iframe'
|
1487 |
+
),
|
1488 |
+
'type' => array (
|
1489 |
+
'default' => 'iframe'
|
1490 |
+
),
|
1491 |
+
/*
|
1492 |
+
* other than overflow:auto not supported on many browsers
|
1493 |
+
'scrolling' => array (
|
1494 |
+
'id' => 'fancybox_iFrameScrolling',
|
1495 |
+
'title' => __('Scrolling','easy-fancybox'),
|
1496 |
+
'label_for' => 'fancybox_iFrameScrolling',
|
1497 |
+
'input' => 'select',
|
1498 |
+
'options' => array(
|
1499 |
+
'auto' => __('Auto','easy-fancybox'),
|
1500 |
+
'yes' => __('Always','easy-fancybox'),
|
1501 |
+
'no' => __('Never','easy-fancybox')
|
1502 |
+
),
|
1503 |
+
'default' => 'auto',
|
1504 |
+
'description' => __('Define scrolling and scrollbar visibility.','easy-fancybox') . '<br />'
|
1505 |
),
|
1506 |
+
*/
|
1507 |
+
'width' => array (
|
1508 |
+
'id' => 'fancybox_iFramewidth',
|
1509 |
+
'title' => translate('Width'),
|
1510 |
+
'label_for' => 'fancybox_iFramewidth',
|
1511 |
+
'input' => 'text',
|
1512 |
+
'sanitize_callback' => 'intval',
|
1513 |
+
'class' => 'small-text',
|
1514 |
+
'default' => '70%',
|
1515 |
+
'description' => ' '
|
1516 |
+
),
|
1517 |
+
'height' => array (
|
1518 |
+
'id' => 'fancybox_iFrameheight',
|
1519 |
+
'title' => translate('Height'),
|
1520 |
+
'label_for' => 'fancybox_iFrameheight',
|
1521 |
+
'input' => 'text',
|
1522 |
+
'sanitize_callback' => 'intval',
|
1523 |
+
'class' => 'small-text',
|
1524 |
+
'default' => '90%',
|
1525 |
+
),
|
1526 |
+
'padding' => array (
|
1527 |
+
'id' => 'fancybox_iFramepadding',
|
1528 |
+
'title' => translate('Border'),
|
1529 |
+
'label_for' => 'fancybox_iFramepadding',
|
1530 |
+
'input' => 'number',
|
1531 |
+
'step' => '1',
|
1532 |
+
'min' => '0',
|
1533 |
+
'max' => '100',
|
1534 |
+
'sanitize_callback' => 'intval',
|
1535 |
+
'class' => 'small-text',
|
1536 |
+
'default' => '0',
|
1537 |
+
'description' => '<br /><br />'
|
1538 |
+
),
|
1539 |
+
'titleShow' => array (
|
1540 |
+
'id' => 'fancybox_iFrametitleShow',
|
1541 |
+
'input' => 'checkbox',
|
1542 |
+
'noquotes' => true,
|
1543 |
+
'default' => '',
|
1544 |
+
'description' => __('Show title.','easy-fancybox') . ' ' . __('FancyBox will try to get a title from the link or thumbnail title attributes.','easy-fancybox')
|
1545 |
+
),
|
1546 |
+
'titlePosition' => array (
|
1547 |
+
'id' => 'fancybox_iFrametitlePosition',
|
1548 |
+
'title' => __('Title Position','easy-fancybox'),
|
1549 |
+
'label_for' => 'fancybox_iFrametitlePosition',
|
1550 |
+
'input' => 'select',
|
1551 |
+
'options' => array(
|
1552 |
+
'float' => __('Float','easy-fancybox'),
|
1553 |
+
'outside' => __('Outside','easy-fancybox'),
|
1554 |
+
'inside' => __('Inside','easy-fancybox')
|
|
|
|
|
|
|
1555 |
),
|
1556 |
+
'default' => 'float',
|
1557 |
+
'description' => '<br />'
|
1558 |
+
),
|
1559 |
+
'titleFromAlt' => array (
|
1560 |
+
'id' => 'fancybox_iFrametitleFromAlt',
|
1561 |
+
'input' => 'checkbox',
|
1562 |
+
'noquotes' => true,
|
1563 |
+
'default' => '1',
|
1564 |
+
'description' => __('Allow title from thumbnail alt attribute.','easy-fancybox') . '<br/>'
|
1565 |
+
),
|
1566 |
+
'allowfullscreen' => array (
|
1567 |
+
'id' => 'fancybox_allowFullScreen',
|
1568 |
+
'input' => 'checkbox',
|
1569 |
+
'noquotes' => true,
|
1570 |
+
'default' => '',
|
1571 |
+
'description' => __('Allow embedded content to jump to full screen mode','easy-fancybox')
|
1572 |
)
|
1573 |
)
|
1574 |
)
|
inc/class-easyfancybox.php
CHANGED
@@ -8,51 +8,50 @@ class easyFancyBox {
|
|
8 |
|
9 |
protected static $plugin_basename;
|
10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
public static $add_scripts = false;
|
12 |
|
13 |
public static $options = array();
|
14 |
|
|
|
|
|
15 |
/**********************
|
16 |
MAIN SCRIPT OUTPUT
|
17 |
**********************/
|
18 |
|
19 |
-
public static function
|
20 |
|
21 |
if ( empty(self::$options) )
|
22 |
-
|
23 |
-
|
24 |
-
echo '
|
25 |
-
<!-- Easy FancyBox ' . EASY_FANCYBOX_VERSION . ' using FancyBox ' . FANCYBOX_VERSION . ' - RavanH (http://status301.net/wordpress-plugins/easy-fancybox/) -->';
|
26 |
|
27 |
// check for any enabled sections
|
28 |
-
foreach (self::$options['Global']['options']['Enable']['options'] as $value)
|
29 |
-
// anything enabled?
|
30 |
if ( isset($value['id']) && '1' == get_option($value['id'],$value['default']) ) {
|
31 |
self::$add_scripts = true;
|
32 |
break;
|
33 |
}
|
34 |
-
}
|
35 |
-
// and abort when none are active
|
36 |
-
if (!self::$add_scripts) {
|
37 |
-
echo '
|
38 |
-
<!-- Nothing enabled under Settings > Media > FancyBox. -->
|
39 |
|
40 |
-
|
|
|
41 |
return;
|
42 |
-
}
|
43 |
|
44 |
-
// begin output FancyBox settings
|
45 |
-
|
46 |
-
|
47 |
-
/* <![CDATA[ */
|
48 |
-
var fb_timeout = null;';
|
49 |
|
50 |
/*
|
51 |
* Global settings routine
|
52 |
*/
|
53 |
-
$more=0;
|
54 |
-
|
55 |
-
var fb_opts
|
56 |
foreach (self::$options['Global']['options'] as $globals) {
|
57 |
foreach ($globals['options'] as $_key => $_value) {
|
58 |
if ( isset($_value['id']) )
|
@@ -71,89 +70,91 @@ var fb_opts = {';
|
|
71 |
if( !isset($_value['hide']) && $parm!='' ) {
|
72 |
$quote = (is_numeric($parm) || (isset($_value['noquotes']) && $_value['noquotes'] == true) ) ? '' : '\'';
|
73 |
if ($more>0)
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
$more++;
|
78 |
} else {
|
79 |
${$_key} = $parm;
|
80 |
}
|
81 |
}
|
82 |
}
|
83 |
-
|
84 |
-
|
85 |
-
|
|
|
|
|
86 |
|
87 |
foreach (self::$options as $key => $value) {
|
88 |
// check if not enabled or hide=true then skip
|
89 |
if ( isset($value['hide']) || !get_option(self::$options['Global']['options']['Enable']['options'][$key]['id'], self::$options['Global']['options']['Enable']['options'][$key]['default']) )
|
90 |
continue;
|
91 |
|
92 |
-
|
93 |
-
|
|
|
94 |
/*
|
95 |
* Auto-detection routines (2x)
|
96 |
*/
|
97 |
-
$autoAttribute =
|
98 |
|
99 |
-
if(!empty($autoAttribute)) {
|
100 |
-
if(is_numeric($autoAttribute)) {
|
101 |
-
|
102 |
-
|
103 |
} else {
|
104 |
// set selectors
|
105 |
$file_types = array_filter( explode( ' ', str_replace( ',', ' ', $autoAttribute ) ) );
|
106 |
$more=0;
|
107 |
-
|
108 |
-
|
109 |
-
foreach ($file_types as $type) {
|
110 |
if ($type == "jpg" || $type == "jpeg" || $type == "png" || $type == "gif")
|
111 |
$type = '.'.$type;
|
112 |
if ($more>0)
|
113 |
-
|
114 |
-
|
115 |
$more++;
|
116 |
}
|
117 |
-
|
118 |
|
119 |
// class and rel depending on settings
|
120 |
if( '1' == get_option($value['options']['autoAttributeLimit']['id'],$value['options']['autoAttributeLimit']['default']) ) {
|
121 |
// add class
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
// and set rel
|
126 |
switch( get_option($value['options']['autoGallery']['id'],$value['options']['autoGallery']['default']) ) {
|
127 |
case '':
|
128 |
default :
|
129 |
-
|
130 |
break;
|
131 |
case '1':
|
132 |
-
|
133 |
break;
|
134 |
case '2':
|
135 |
-
|
136 |
}
|
137 |
} else {
|
138 |
// add class
|
139 |
-
|
140 |
-
|
141 |
// set rel
|
142 |
switch( get_option($value['options']['autoGallery']['id'],$value['options']['autoGallery']['default']) ) {
|
143 |
case '':
|
144 |
default :
|
145 |
-
|
146 |
break;
|
147 |
case '1':
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
break;
|
152 |
case '2':
|
153 |
-
|
154 |
}
|
155 |
}
|
156 |
-
|
157 |
}
|
158 |
}
|
159 |
|
@@ -162,240 +163,217 @@ var easy_fancybox_handler = function(){
|
|
162 |
*/
|
163 |
|
164 |
// prepare auto popup
|
165 |
-
if( $key == $autoClick )
|
166 |
$trigger = $value['options']['class']['default'];
|
167 |
|
168 |
-
|
169 |
-
|
170 |
|
171 |
// use each() to allow different metadata values per instance; fix by Elron. Thanks!
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
$more=0;
|
177 |
-
foreach ($value['options'] as $_key => $_value) {
|
178 |
-
if (isset($_value['id']) || isset($_value['default']))
|
179 |
-
$parm =
|
180 |
else
|
181 |
$parm = '';
|
182 |
|
183 |
-
if( isset($_value['input']) && 'checkbox'==$_value['input'] )
|
184 |
$parm = ( '1' == $parm ) ? 'true' : 'false';
|
185 |
|
186 |
-
if( !isset($_value['hide']) && $parm!='' ) {
|
187 |
-
$quote = (is_numeric($parm) || (isset($_value['noquotes']) && $_value['noquotes'] == true) ) ? '' : '\'';
|
188 |
-
if ($more>0)
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
$more++;
|
193 |
}
|
194 |
}
|
195 |
-
|
196 |
|
197 |
-
|
198 |
-
if ( '1' == get_option(self::$options['Global']['options']['Miscellaneous']['options']['metaData']['id'],self::$options['Global']['options']['Miscellaneous']['options']['metaData']['default']) )
|
199 |
-
echo ');} ';
|
200 |
|
201 |
-
|
|
|
202 |
|
|
|
203 |
}
|
204 |
|
205 |
-
|
206 |
-
};
|
207 |
-
|
208 |
|
209 |
if ( empty($delayClick) ) $delayClick = '0';
|
210 |
|
211 |
-
switch( $autoClick ) {
|
212 |
case '':
|
213 |
-
|
|
|
214 |
case '1':
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
219 |
case '99':
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
|
|
224 |
default :
|
225 |
-
if ( !empty($trigger) )
|
226 |
-
|
227 |
-
|
|
|
|
|
|
|
228 |
}
|
229 |
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
</script>
|
234 |
-
';
|
235 |
|
236 |
// HEADER STYLES //
|
237 |
|
238 |
// customized styles
|
239 |
$styles = '';
|
240 |
-
if (isset($overlaySpotlight) && 'true' == $overlaySpotlight)
|
241 |
$styles .= '
|
242 |
#fancybox-overlay{background-attachment:fixed;background-image:url("' . self::$plugin_url . 'images/light-mask.png");background-position:center;background-repeat:no-repeat;background-size:100% 100%}';
|
243 |
-
if (!empty($borderRadius))
|
244 |
$styles .= '
|
245 |
#fancybox-outer,#fancybox-content{border-radius:'.$borderRadius.'px}.fancybox-title-inside{padding-top:'.$borderRadius.'px;margin-top:-'.$borderRadius.'px !important;border-radius: 0 0 '.$borderRadius.'px '.$borderRadius.'px}';
|
246 |
-
if (!empty($backgroundColor))
|
247 |
$styles .= '
|
248 |
#fancybox-content{background:'.$backgroundColor.'}';
|
249 |
-
if (!empty($paddingColor))
|
250 |
$styles .= '
|
251 |
#fancybox-content{border-color:'.$paddingColor.'}#fancybox-outer{background:'.$paddingColor.'}'; //.fancybox-title-inside{background-color:'.$paddingColor.';margin-left:0 !important;margin-right:0 !important;width:100% !important;}
|
252 |
-
if (!empty($textColor))
|
253 |
$styles .= '
|
254 |
#fancybox-content{color:'.$textColor.'}';
|
255 |
-
if (!empty($titleColor))
|
256 |
$styles .= '
|
257 |
#fancybox-title,#fancybox-title-float-main{color:'.$titleColor.'}';
|
258 |
|
259 |
if ( !empty($styles) ) {
|
260 |
-
|
261 |
-
</style>
|
262 |
-
';
|
263 |
}
|
264 |
|
265 |
// running our IE alphaimageloader relative path styles here
|
266 |
if ( isset($compatIE8) && 'true' == $compatIE8 ) {
|
267 |
-
|
268 |
<style type="text/css">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
269 |
.fancybox-ie #fancybox-title-over{background-image:url(' . self::$plugin_url . 'fancybox/fancy_title_over.png); }
|
270 |
.fancybox-bg{position:absolute;padding:0;margin:0;border:0;width:20px;height:20px;z-index:111001;}
|
271 |
#fancybox-bg-n{top:-20px;left:0;width: 100%;}#fancybox-bg-ne{top:-20px;right:-20px;}#fancybox-bg-e{top:0;right:-20px;height:100%;}#fancybox-bg-se{bottom:-20px;right:-20px;}#fancybox-bg-s{bottom:-20px;left:0;width:100%;}#fancybox-bg-sw{bottom:-20px;left:-20px;}#fancybox-bg-w{top:0;left:-20px;height:100%;}#fancybox-bg-nw {top:-20px;left:-20px;}
|
272 |
.fancybox-ie .fancybox-bg{background:transparent !important;}
|
273 |
-
.fancybox-ie #fancybox-bg-n{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'
|
274 |
-
.fancybox-ie #fancybox-bg-ne{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'
|
275 |
-
.fancybox-ie #fancybox-bg-e{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'
|
276 |
-
.fancybox-ie #fancybox-bg-se{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'
|
277 |
-
.fancybox-ie #fancybox-bg-s{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'
|
278 |
-
.fancybox-ie #fancybox-bg-sw{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'
|
279 |
-
.fancybox-ie #fancybox-bg-w{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'
|
280 |
-
.fancybox-ie #fancybox-bg-nw{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
#fancybox-overlay{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'
|
285 |
-
|
286 |
-
|
287 |
-
</style>
|
288 |
<![endif]-->
|
289 |
';
|
290 |
}
|
|
|
291 |
|
|
|
|
|
|
|
292 |
|
|
|
293 |
}
|
294 |
|
295 |
/***********************
|
296 |
ACTIONS & FILTERS
|
297 |
***********************/
|
298 |
|
299 |
-
public static function
|
|
|
|
|
|
|
|
|
|
|
300 |
|
301 |
-
|
|
|
|
|
302 |
|
303 |
-
// ENQUEUE
|
304 |
-
// first get rid of previously registered variants of jquery.fancybox by other plugins or theme
|
305 |
-
wp_deregister_script('fancybox');
|
306 |
-
wp_deregister_script('jquery.fancybox');
|
307 |
-
wp_deregister_script('jquery_fancybox');
|
308 |
-
wp_deregister_script('jquery-fancybox');
|
309 |
// register main fancybox script
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
}
|
331 |
|
332 |
-
//
|
333 |
-
if ( '1' == get_option( self::$options['IMG']['options']['mouseWheel']['id'], self::$options['IMG']['options']['mouseWheel']['default']) ) {
|
334 |
-
|
335 |
-
wp_register_script('jquery-mousewheel', self::$plugin_url.'js/jquery.mousewheel.min.js', array('jquery'), MOUSEWHEEL_VERSION, true);
|
336 |
}
|
337 |
|
338 |
// metadata in Miscellaneous settings?
|
339 |
-
if ('1' == get_option( self::$options['Global']['options']['Miscellaneous']['options']['metaData']['id'], self::$options['Global']['options']['Miscellaneous']['options']['metaData']['default']) ) {
|
340 |
-
|
341 |
}
|
342 |
}
|
343 |
|
344 |
-
public static function enqueue_styles() {
|
345 |
-
// register style
|
346 |
-
wp_dequeue_style('fancybox');
|
347 |
-
if ( defined('WP_DEBUG') && true == WP_DEBUG )
|
348 |
-
wp_enqueue_style('fancybox', self::$plugin_url.'fancybox/jquery.fancybox-'.FANCYBOX_VERSION.'.css', false, EASY_FANCYBOX_VERSION, 'screen');
|
349 |
-
else
|
350 |
-
wp_enqueue_style('fancybox', self::$plugin_url.'fancybox/jquery.fancybox-'.FANCYBOX_VERSION.'.min.css', false, EASY_FANCYBOX_VERSION, 'screen');
|
351 |
-
}
|
352 |
-
|
353 |
-
public static function enqueue_footer_scripts() {
|
354 |
-
if (!self::$add_scripts)
|
355 |
-
return;
|
356 |
-
|
357 |
-
// FancyBox
|
358 |
-
wp_enqueue_script('jquery-fancybox');
|
359 |
-
|
360 |
-
// jQuery Easing, which is ot needed if jQueryUI Core Effects are loaded
|
361 |
-
if ( !wp_script_is( 'jquery-effects-core', 'enqueued' ) )
|
362 |
-
wp_enqueue_script('jquery-easing');
|
363 |
-
|
364 |
-
// jQuery Mousewheel, which is ot needed if jQueryUI Mouse is loaded
|
365 |
-
if ( !wp_script_is( 'jquery-ui-mouse', 'enqueued' ) )
|
366 |
-
wp_enqueue_script('jquery-mousewheel');
|
367 |
-
|
368 |
-
wp_enqueue_script('jquery-metadata');
|
369 |
-
|
370 |
-
}
|
371 |
-
|
372 |
-
public static function on_ready() {
|
373 |
-
|
374 |
-
if (!self::$add_scripts)
|
375 |
-
return; // abort mission, there is no need for any script files
|
376 |
-
|
377 |
-
// 'gform_post_render' for gForms content triggers an error... Why?
|
378 |
-
// 'post-load' is for Infinite Scroll by JetPack
|
379 |
-
|
380 |
-
// first exclude some links by adding nolightbox class:
|
381 |
-
// (1) nofancybox backwards compatibility and (2) tries to detect social sharing buttons with known issues
|
382 |
-
echo '<script type="text/javascript">' . PHP_EOL;
|
383 |
-
|
384 |
-
echo apply_filters( 'easy_fancybox_onready_handler', 'jQuery(easy_fancybox_handler);' ) . PHP_EOL;
|
385 |
-
|
386 |
-
echo apply_filters( 'easy_fancybox_onpostload_handler', 'jQuery(document.body).on(\'post-load\',easy_fancybox_handler);' ) . PHP_EOL;
|
387 |
-
|
388 |
-
echo apply_filters( 'easy_fancybox_onready_auto', 'jQuery(easy_fancybox_auto);' ) . PHP_EOL;
|
389 |
-
|
390 |
-
echo '</script>' . PHP_EOL;
|
391 |
-
}
|
392 |
-
|
393 |
// Hack to fix missing wmode in Youtube oEmbed code based on David C's code in the comments on
|
394 |
// http://www.mehigh.biz/wordpress/adding-wmode-transparent-to-wordpress-3-media-embeds.html
|
395 |
public static function add_video_wmode_opaque($html, $url, $attr) {
|
396 |
-
if (strpos($html, "<embed src=" ) !== false) {
|
397 |
$html = str_replace('</param><embed', '</param><param name="wmode" value="opaque"></param><embed wmode="opaque"', $html);
|
398 |
-
} elseif (strpos($html, 'youtube' ) !== false && strpos($html, 'wmode' ) == false ) {
|
399 |
$html = str_replace('feature=oembed', 'feature=oembed&wmode=opaque', $html);
|
400 |
} elseif ( strpos($html, "vimeo" ) !== false && strpos($html, 'wmode' ) == false ) {
|
401 |
$html = str_replace('" width', '?theme=none&wmode=opaque" width', $html);
|
@@ -405,9 +383,18 @@ var easy_fancybox_auto = function(){';
|
|
405 |
return $html;
|
406 |
}
|
407 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
408 |
public static function init() {
|
409 |
easyFancyBox_Options::load_defaults();
|
410 |
-
add_filter('embed_oembed_html', array(__CLASS__, 'add_video_wmode_opaque'), 10, 3);
|
411 |
}
|
412 |
|
413 |
/**********************
|
@@ -415,7 +402,6 @@ var easy_fancybox_auto = function(){';
|
|
415 |
**********************/
|
416 |
|
417 |
public function __construct( $file ) {
|
418 |
-
|
419 |
// VARS
|
420 |
self::$plugin_url = plugins_url( '/', $file );
|
421 |
self::$plugin_basename = plugin_basename( $file );
|
@@ -423,12 +409,13 @@ var easy_fancybox_auto = function(){';
|
|
423 |
require_once dirname(__FILE__) . '/class-easyfancybox-options.php';
|
424 |
|
425 |
// HOOKS //
|
426 |
-
add_action('init', array(__CLASS__, 'init'));
|
427 |
-
add_action('
|
428 |
-
add_action('
|
429 |
-
add_action('
|
430 |
-
|
431 |
-
|
|
|
|
|
432 |
}
|
433 |
-
|
434 |
}
|
8 |
|
9 |
protected static $plugin_basename;
|
10 |
|
11 |
+
private static $inline_script;
|
12 |
+
|
13 |
+
private static $inline_style;
|
14 |
+
|
15 |
+
private static $inline_style_ie8;
|
16 |
+
|
17 |
+
public static $onready_auto = false;
|
18 |
+
|
19 |
public static $add_scripts = false;
|
20 |
|
21 |
public static $options = array();
|
22 |
|
23 |
+
public static $events = array( 'post-load' );
|
24 |
+
|
25 |
/**********************
|
26 |
MAIN SCRIPT OUTPUT
|
27 |
**********************/
|
28 |
|
29 |
+
public static function main() {
|
30 |
|
31 |
if ( empty(self::$options) )
|
32 |
+
return;
|
|
|
|
|
|
|
33 |
|
34 |
// check for any enabled sections
|
35 |
+
foreach ( self::$options['Global']['options']['Enable']['options'] as $value )
|
|
|
36 |
if ( isset($value['id']) && '1' == get_option($value['id'],$value['default']) ) {
|
37 |
self::$add_scripts = true;
|
38 |
break;
|
39 |
}
|
|
|
|
|
|
|
|
|
|
|
40 |
|
41 |
+
// and abort when none are active
|
42 |
+
if ( !self::$add_scripts )
|
43 |
return;
|
|
|
44 |
|
45 |
+
// begin building output FancyBox settings
|
46 |
+
$script = '
|
47 |
+
var fb_timeout=null;';
|
|
|
|
|
48 |
|
49 |
/*
|
50 |
* Global settings routine
|
51 |
*/
|
52 |
+
$more = 0;
|
53 |
+
$script .= '
|
54 |
+
var fb_opts={';
|
55 |
foreach (self::$options['Global']['options'] as $globals) {
|
56 |
foreach ($globals['options'] as $_key => $_value) {
|
57 |
if ( isset($_value['id']) )
|
70 |
if( !isset($_value['hide']) && $parm!='' ) {
|
71 |
$quote = (is_numeric($parm) || (isset($_value['noquotes']) && $_value['noquotes'] == true) ) ? '' : '\'';
|
72 |
if ($more>0)
|
73 |
+
$script .= ',';
|
74 |
+
$script .= '\''.$_key.'\':';
|
75 |
+
$script .= $quote.$parm.$quote;
|
76 |
$more++;
|
77 |
} else {
|
78 |
${$_key} = $parm;
|
79 |
}
|
80 |
}
|
81 |
}
|
82 |
+
|
83 |
+
$script .= ' };
|
84 |
+
if(typeof easy_fancybox_handler===\'undefined\'){
|
85 |
+
var easy_fancybox_handler=function(){
|
86 |
+
jQuery(\'.nofancybox,a.pin-it-button,a[href*="pinterest.com/pin/create"]\').addClass(\'nolightbox\');';
|
87 |
|
88 |
foreach (self::$options as $key => $value) {
|
89 |
// check if not enabled or hide=true then skip
|
90 |
if ( isset($value['hide']) || !get_option(self::$options['Global']['options']['Enable']['options'][$key]['id'], self::$options['Global']['options']['Enable']['options'][$key]['default']) )
|
91 |
continue;
|
92 |
|
93 |
+
$script .= '
|
94 |
+
/* ' . $key . ' */';
|
95 |
+
|
96 |
/*
|
97 |
* Auto-detection routines (2x)
|
98 |
*/
|
99 |
+
$autoAttribute = isset($value['options']['autoAttribute']) ? get_option( $value['options']['autoAttribute']['id'], $value['options']['autoAttribute']['default'] ) : '';
|
100 |
|
101 |
+
if ( !empty($autoAttribute) ) {
|
102 |
+
if ( is_numeric($autoAttribute) ) {
|
103 |
+
$script .= '
|
104 |
+
jQuery(\''.$value['options']['autoAttribute']['selector'].'\').not(\'.nolightbox,li.nolightbox>a\').addClass(\''.$value['options']['class']['default'].'\');';
|
105 |
} else {
|
106 |
// set selectors
|
107 |
$file_types = array_filter( explode( ' ', str_replace( ',', ' ', $autoAttribute ) ) );
|
108 |
$more=0;
|
109 |
+
$script .= '
|
110 |
+
var fb_'.$key.'_select=\'';
|
111 |
+
foreach ( $file_types as $type ) {
|
112 |
if ($type == "jpg" || $type == "jpeg" || $type == "png" || $type == "gif")
|
113 |
$type = '.'.$type;
|
114 |
if ($more>0)
|
115 |
+
$script .= ',';
|
116 |
+
$script .= 'a['.$value['options']['autoAttribute']['selector'].'"'.$type.'"]:not(.nolightbox,li.nolightbox>a),area['.$value['options']['autoAttribute']['selector'].'"'.$type.'"]:not(.nolightbox)';
|
117 |
$more++;
|
118 |
}
|
119 |
+
$script .= '\';';
|
120 |
|
121 |
// class and rel depending on settings
|
122 |
if( '1' == get_option($value['options']['autoAttributeLimit']['id'],$value['options']['autoAttributeLimit']['default']) ) {
|
123 |
// add class
|
124 |
+
$script .= '
|
125 |
+
var fb_'.$key.'_sections=jQuery(\''.get_option($value['options']['autoSelector']['id'],$value['options']['autoSelector']['default']).'\');
|
126 |
+
fb_'.$key.'_sections.each(function(){jQuery(this).find(fb_'.$key.'_select).addClass(\''.$value['options']['class']['default'].'\')';
|
127 |
// and set rel
|
128 |
switch( get_option($value['options']['autoGallery']['id'],$value['options']['autoGallery']['default']) ) {
|
129 |
case '':
|
130 |
default :
|
131 |
+
$script .= '; });';
|
132 |
break;
|
133 |
case '1':
|
134 |
+
$script .= '.attr(\'rel\',\'gallery-\'+fb_'.$key.'_sections.index(this));});';
|
135 |
break;
|
136 |
case '2':
|
137 |
+
$script .= '.attr(\'rel\',\'gallery\');});';
|
138 |
}
|
139 |
} else {
|
140 |
// add class
|
141 |
+
$script .= '
|
142 |
+
jQuery(fb_'.$key.'_select).addClass(\''.$value['options']['class']['default'].'\')';
|
143 |
// set rel
|
144 |
switch( get_option($value['options']['autoGallery']['id'],$value['options']['autoGallery']['default']) ) {
|
145 |
case '':
|
146 |
default :
|
147 |
+
$script .= ';';
|
148 |
break;
|
149 |
case '1':
|
150 |
+
$script .= ';
|
151 |
+
var fb_'.$key.'_sections = jQuery(\''.get_option($value['options']['autoSelector']['id'],$value['options']['autoSelector']['default']).'\');
|
152 |
+
fb_'.$key.'_sections.each(function(){jQuery(this).find(fb_'.$key.'_select).attr(\'rel\',\'gallery-\'+fb_'.$key.'_sections.index(this));});';
|
153 |
break;
|
154 |
case '2':
|
155 |
+
$script .= '.attr(\'rel\',\'gallery\');';
|
156 |
}
|
157 |
}
|
|
|
158 |
}
|
159 |
}
|
160 |
|
163 |
*/
|
164 |
|
165 |
// prepare auto popup
|
166 |
+
if ( $key == $autoClick )
|
167 |
$trigger = $value['options']['class']['default'];
|
168 |
|
169 |
+
$script .= '
|
170 |
+
jQuery(\'' . $value['options']['tag']['default'] . '\')';
|
171 |
|
172 |
// use each() to allow different metadata values per instance; fix by Elron. Thanks!
|
173 |
+
$script .= '.each(function(){';
|
174 |
+
|
175 |
+
// filter here
|
176 |
+
$bind = 'jQuery(this).fancybox(jQuery.extend({},fb_opts,{';
|
177 |
+
$more = 0;
|
178 |
+
foreach ( $value['options'] as $_key => $_value ) {
|
179 |
+
if ( isset($_value['id']) || isset($_value['default']) )
|
180 |
+
$parm = isset($_value['id']) ? get_option($_value['id'], $_value['default']) : $_value['default'];
|
181 |
else
|
182 |
$parm = '';
|
183 |
|
184 |
+
if ( isset($_value['input']) && 'checkbox'==$_value['input'] )
|
185 |
$parm = ( '1' == $parm ) ? 'true' : 'false';
|
186 |
|
187 |
+
if ( !isset($_value['hide']) && $parm!='' ) {
|
188 |
+
$quote = ( is_numeric($parm) || ( isset($_value['noquotes']) && $_value['noquotes'] == true ) ) ? '' : '\'';
|
189 |
+
if ( $more > 0 )
|
190 |
+
$bind .= ',';
|
191 |
+
$bind .= '\''.$_key.'\':';
|
192 |
+
$bind .= $quote.$parm.$quote;
|
193 |
$more++;
|
194 |
}
|
195 |
}
|
196 |
+
$bind .= '}))';
|
197 |
|
198 |
+
$script .= apply_filters( 'easy_fancybox_bind', $bind );
|
|
|
|
|
199 |
|
200 |
+
// if ( '1' == get_option(self::$options['Global']['options']['Miscellaneous']['options']['metaData']['id'],self::$options['Global']['options']['Miscellaneous']['options']['metaData']['default']) )
|
201 |
+
// $script .= '});}';
|
202 |
|
203 |
+
$script .= '});';
|
204 |
}
|
205 |
|
206 |
+
$script .= '};
|
207 |
+
jQuery(\'a.fancybox-close\').on(\'click\',function(e){e.preventDefault();jQuery.fancybox.close()});
|
208 |
+
};';
|
209 |
|
210 |
if ( empty($delayClick) ) $delayClick = '0';
|
211 |
|
212 |
+
switch ( $autoClick ) {
|
213 |
case '':
|
214 |
+
break;
|
215 |
+
|
216 |
case '1':
|
217 |
+
$script .= '
|
218 |
+
var easy_fancybox_auto=function(){setTimeout(function(){jQuery(\'#fancybox-auto\').trigger(\'click\')},'.$delayClick.');};';
|
219 |
+
self::$onready_auto = true;
|
220 |
+
break;
|
221 |
+
|
222 |
+
case '2':
|
223 |
+
$script .= '
|
224 |
+
var easy_fancybox_auto=function(){setTimeout(function(){if(location.hash){jQuery(location.hash).trigger(\'click\');}},'.$delayClick.');};';
|
225 |
+
self::$onready_auto = true;
|
226 |
+
break;
|
227 |
+
|
228 |
case '99':
|
229 |
+
$script .= '
|
230 |
+
var easy_fancybox_auto=function(){setTimeout(function(){jQuery(\'a[class|="fancybox"]\').filter(\':first\').trigger(\'click\')},'.$delayClick.');};';
|
231 |
+
self::$onready_auto = true;
|
232 |
+
break;
|
233 |
+
|
234 |
default :
|
235 |
+
if ( !empty($trigger) ) {
|
236 |
+
$script .= '
|
237 |
+
var easy_fancybox_auto=function(){setTimeout(function(){jQuery(\'a[class*="'.$trigger.'"]\').filter(\':first\').trigger(\'click\')},'.$delayClick.');};';
|
238 |
+
self::$onready_auto = true;
|
239 |
+
}
|
240 |
+
break;
|
241 |
}
|
242 |
|
243 |
+
$script .= PHP_EOL;
|
244 |
+
|
245 |
+
self::$inline_script = apply_filters( 'easy_fancybox_inline_script', $script );
|
|
|
|
|
246 |
|
247 |
// HEADER STYLES //
|
248 |
|
249 |
// customized styles
|
250 |
$styles = '';
|
251 |
+
if ( isset($overlaySpotlight) && 'true' == $overlaySpotlight )
|
252 |
$styles .= '
|
253 |
#fancybox-overlay{background-attachment:fixed;background-image:url("' . self::$plugin_url . 'images/light-mask.png");background-position:center;background-repeat:no-repeat;background-size:100% 100%}';
|
254 |
+
if ( !empty($borderRadius) )
|
255 |
$styles .= '
|
256 |
#fancybox-outer,#fancybox-content{border-radius:'.$borderRadius.'px}.fancybox-title-inside{padding-top:'.$borderRadius.'px;margin-top:-'.$borderRadius.'px !important;border-radius: 0 0 '.$borderRadius.'px '.$borderRadius.'px}';
|
257 |
+
if ( !empty($backgroundColor) )
|
258 |
$styles .= '
|
259 |
#fancybox-content{background:'.$backgroundColor.'}';
|
260 |
+
if ( !empty($paddingColor) )
|
261 |
$styles .= '
|
262 |
#fancybox-content{border-color:'.$paddingColor.'}#fancybox-outer{background:'.$paddingColor.'}'; //.fancybox-title-inside{background-color:'.$paddingColor.';margin-left:0 !important;margin-right:0 !important;width:100% !important;}
|
263 |
+
if ( !empty($textColor) )
|
264 |
$styles .= '
|
265 |
#fancybox-content{color:'.$textColor.'}';
|
266 |
+
if ( !empty($titleColor) )
|
267 |
$styles .= '
|
268 |
#fancybox-title,#fancybox-title-float-main{color:'.$titleColor.'}';
|
269 |
|
270 |
if ( !empty($styles) ) {
|
271 |
+
self::$inline_style = $styles;
|
|
|
|
|
272 |
}
|
273 |
|
274 |
// running our IE alphaimageloader relative path styles here
|
275 |
if ( isset($compatIE8) && 'true' == $compatIE8 ) {
|
276 |
+
self::$inline_style_ie8 = '<!--[if lt IE 9]>
|
277 |
<style type="text/css">
|
278 |
+
/* IE6 */
|
279 |
+
#fancybox-left:hover,#fancybox-right:hover{visibility:visible}
|
280 |
+
.fancybox-ie6 #fancybox-close{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'.self::$plugin_url.'fancybox/fancy_close.png",sizingMethod="scale");}
|
281 |
+
.fancybox-ie6 #fancybox-left-ico{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'.self::$plugin_url.'fancybox/fancy_nav_left.png",sizingMethod="scale");}
|
282 |
+
.fancybox-ie6 #fancybox-right-ico{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'.self::$plugin_url.'fancybox/fancy_nav_right.png",sizingMethod="scale");}
|
283 |
+
.fancybox-ie6 #fancybox-title-over{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'.self::$plugin_url.'fancybox/fancy_title_over.png",sizingMethod="scale");zoom:1;}
|
284 |
+
.fancybox-ie6 #fancybox-title-float-left{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'.self::$plugin_url.'fancybox/fancy_title_left.png",sizingMethod="scale");}
|
285 |
+
.fancybox-ie6 #fancybox-title-float-main{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'.self::$plugin_url.'fancybox/fancy_title_main.png",sizingMethod="scale");}
|
286 |
+
.fancybox-ie6 #fancybox-title-float-right{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'.self::$plugin_url.'fancybox/fancy_title_right.png",sizingMethod="scale");}
|
287 |
+
.fancybox-ie6 #fancybox-bg-w,.fancybox-ie6 #fancybox-bg-e,.fancybox-ie6 #fancybox-left,.fancybox-ie6 #fancybox-right,#fancybox-hide-sel-frame{height: expression(this.parentNode.clientHeight + "px");}
|
288 |
+
#fancybox-loading.fancybox-ie6{position:absolute;margin-top:0;top:expression((-20+(document.documentElement.clientHeight?document.documentElement.clientHeight/2:document.body.clientHeight/2)+(ignoreMe=document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop))+"px");}
|
289 |
+
#fancybox-loading.fancybox-ie6 div{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'.self::$plugin_url.'fancybox/fancy_loading.png",sizingMethod="scale");}
|
290 |
+
/* IE6, IE7, IE8 */
|
291 |
.fancybox-ie #fancybox-title-over{background-image:url(' . self::$plugin_url . 'fancybox/fancy_title_over.png); }
|
292 |
.fancybox-bg{position:absolute;padding:0;margin:0;border:0;width:20px;height:20px;z-index:111001;}
|
293 |
#fancybox-bg-n{top:-20px;left:0;width: 100%;}#fancybox-bg-ne{top:-20px;right:-20px;}#fancybox-bg-e{top:0;right:-20px;height:100%;}#fancybox-bg-se{bottom:-20px;right:-20px;}#fancybox-bg-s{bottom:-20px;left:0;width:100%;}#fancybox-bg-sw{bottom:-20px;left:-20px;}#fancybox-bg-w{top:0;left:-20px;height:100%;}#fancybox-bg-nw {top:-20px;left:-20px;}
|
294 |
.fancybox-ie .fancybox-bg{background:transparent !important;}
|
295 |
+
.fancybox-ie #fancybox-bg-n{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'.self::$plugin_url.'fancybox/fancy_shadow_n.png",sizingMethod="scale");}
|
296 |
+
.fancybox-ie #fancybox-bg-ne{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'.self::$plugin_url.'fancybox/fancy_shadow_ne.png",sizingMethod="scale");}
|
297 |
+
.fancybox-ie #fancybox-bg-e{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'.self::$plugin_url.'fancybox/fancy_shadow_e.png",sizingMethod="scale");}
|
298 |
+
.fancybox-ie #fancybox-bg-se{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'.self::$plugin_url.'fancybox/fancy_shadow_se.png",sizingMethod="scale");}
|
299 |
+
.fancybox-ie #fancybox-bg-s{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'.self::$plugin_url.'fancybox/fancy_shadow_s.png",sizingMethod="scale");}
|
300 |
+
.fancybox-ie #fancybox-bg-sw{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'.self::$plugin_url.'fancybox/fancy_shadow_sw.png",sizingMethod="scale");}
|
301 |
+
.fancybox-ie #fancybox-bg-w{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'.self::$plugin_url.'fancybox/fancy_shadow_w.png",sizingMethod="scale");}
|
302 |
+
.fancybox-ie #fancybox-bg-nw{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'.self::$plugin_url.'fancybox/fancy_shadow_nw.png",sizingMethod="scale");}';
|
303 |
+
|
304 |
+
if ( isset($overlaySpotlight) && 'true' == $overlaySpotlight )
|
305 |
+
self::$inline_style_ie8 .= '
|
306 |
+
#fancybox-overlay{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'.self::$plugin_url.'images/light-mask.png",sizingMethod="scale");';
|
307 |
+
|
308 |
+
self::$inline_style_ie8 .= '</style>
|
|
|
309 |
<![endif]-->
|
310 |
';
|
311 |
}
|
312 |
+
}
|
313 |
|
314 |
+
public static function print_ie_inline_style() {
|
315 |
+
if ( !self::$add_scripts || empty(self::$inline_style_ie8) )
|
316 |
+
return;
|
317 |
|
318 |
+
print( self::$inline_style_ie8 );
|
319 |
}
|
320 |
|
321 |
/***********************
|
322 |
ACTIONS & FILTERS
|
323 |
***********************/
|
324 |
|
325 |
+
public static function enqueue_scripts() {
|
326 |
+
// make sure whe actually need to do anything
|
327 |
+
if ( !self::$add_scripts )
|
328 |
+
return;
|
329 |
+
|
330 |
+
$min = ( defined('WP_DEBUG') && true == WP_DEBUG ) ? '' : '.min';
|
331 |
|
332 |
+
// ENQUEUE STYLE
|
333 |
+
wp_enqueue_style( 'fancybox', self::$plugin_url.'fancybox/jquery.fancybox'.$min.'.css', false, FANCYBOX_VERSION, 'screen' );
|
334 |
+
wp_add_inline_style( 'fancybox', self::$inline_style );
|
335 |
|
336 |
+
// ENQUEUE SCRIPTS
|
|
|
|
|
|
|
|
|
|
|
337 |
// register main fancybox script
|
338 |
+
wp_enqueue_script( 'jquery-fancybox', self::$plugin_url.'fancybox/jquery.fancybox'.$min.'.js', array('jquery'), FANCYBOX_VERSION, true );
|
339 |
+
wp_add_inline_script( 'jquery-fancybox', self::$inline_script );
|
340 |
+
|
341 |
+
// jQuery Easing, which is ot needed if jQueryUI Core Effects are loaded
|
342 |
+
if ( !wp_script_is( 'jquery-effects-core', 'enqueued' ) ) {
|
343 |
+
$add_easing = false;
|
344 |
+
// test for easing in IMG settings
|
345 |
+
if ( get_option(self::$options['Global']['options']['Enable']['options']['IMG']['id'], self::$options['Global']['options']['Enable']['options']['IMG']['default'])
|
346 |
+
&& ( 'elastic' == get_option( self::$options['IMG']['options']['transitionIn']['id'], self::$options['IMG']['options']['transitionIn']['default'])
|
347 |
+
|| 'elastic' == get_option( self::$options['IMG']['options']['transitionOut']['id'], self::$options['IMG']['options']['transitionOut']['default']) ) )
|
348 |
+
$add_easing = true;
|
349 |
+
// test for easing in Inline settings
|
350 |
+
if ( get_option(self::$options['Global']['options']['Enable']['options']['Inline']['id'], self::$options['Global']['options']['Enable']['options']['Inline']['default'])
|
351 |
+
&& ( 'elastic' == get_option( self::$options['Inline']['options']['transitionIn']['id'], self::$options['Inline']['options']['transitionIn']['default'])
|
352 |
+
|| 'elastic' == get_option( self::$options['Inline']['options']['transitionOut']['id'], self::$options['Inline']['options']['transitionOut']['default']) ) )
|
353 |
+
$add_easing = true;
|
354 |
+
// enqueue easing?
|
355 |
+
if ( $add_easing ) {
|
356 |
+
wp_enqueue_script('jquery-easing', self::$plugin_url.'js/jquery.easing'.$min.'.js', array('jquery'), EASING_VERSION, true);
|
357 |
+
}
|
358 |
}
|
359 |
|
360 |
+
// jQuery Mousewheel, which is not needed if jQueryUI Mouse is loaded
|
361 |
+
if ( !wp_script_is( 'jquery-ui-mouse', 'enqueued' ) AND '1' == get_option( self::$options['IMG']['options']['mouseWheel']['id'], self::$options['IMG']['options']['mouseWheel']['default']) ) {
|
362 |
+
wp_enqueue_script('jquery-mousewheel', self::$plugin_url.'js/jquery.mousewheel'.$min.'.js', array('jquery'), MOUSEWHEEL_VERSION, true);
|
|
|
363 |
}
|
364 |
|
365 |
// metadata in Miscellaneous settings?
|
366 |
+
if ( '1' == get_option( self::$options['Global']['options']['Miscellaneous']['options']['metaData']['id'], self::$options['Global']['options']['Miscellaneous']['options']['metaData']['default']) ) {
|
367 |
+
wp_enqueue_script('jquery-metadata',self::$plugin_url.'js/jquery.metadata'.$min.'.js', array('jquery'), METADATA_VERSION, true);
|
368 |
}
|
369 |
}
|
370 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
371 |
// Hack to fix missing wmode in Youtube oEmbed code based on David C's code in the comments on
|
372 |
// http://www.mehigh.biz/wordpress/adding-wmode-transparent-to-wordpress-3-media-embeds.html
|
373 |
public static function add_video_wmode_opaque($html, $url, $attr) {
|
374 |
+
if ( strpos($html, "<embed src=" ) !== false ) {
|
375 |
$html = str_replace('</param><embed', '</param><param name="wmode" value="opaque"></param><embed wmode="opaque"', $html);
|
376 |
+
} elseif ( strpos($html, 'youtube' ) !== false && strpos($html, 'wmode' ) == false ) {
|
377 |
$html = str_replace('feature=oembed', 'feature=oembed&wmode=opaque', $html);
|
378 |
} elseif ( strpos($html, "vimeo" ) !== false && strpos($html, 'wmode' ) == false ) {
|
379 |
$html = str_replace('" width', '?theme=none&wmode=opaque" width', $html);
|
383 |
return $html;
|
384 |
}
|
385 |
|
386 |
+
public static function onready_callback( $content ) {
|
387 |
+
|
388 |
+
$content .= 'jQuery(easy_fancybox_handler);jQuery(document).on(\'' . implode(" ", self::$events) . '\',easy_fancybox_handler);' . PHP_EOL;
|
389 |
+
|
390 |
+
if ( self::$onready_auto )
|
391 |
+
$content .= apply_filters( 'easy_fancybox_onready_auto', 'jQuery(easy_fancybox_auto);' );
|
392 |
+
|
393 |
+
return $content;
|
394 |
+
}
|
395 |
+
|
396 |
public static function init() {
|
397 |
easyFancyBox_Options::load_defaults();
|
|
|
398 |
}
|
399 |
|
400 |
/**********************
|
402 |
**********************/
|
403 |
|
404 |
public function __construct( $file ) {
|
|
|
405 |
// VARS
|
406 |
self::$plugin_url = plugins_url( '/', $file );
|
407 |
self::$plugin_basename = plugin_basename( $file );
|
409 |
require_once dirname(__FILE__) . '/class-easyfancybox-options.php';
|
410 |
|
411 |
// HOOKS //
|
412 |
+
add_action( 'init', array(__CLASS__, 'init') );
|
413 |
+
add_action( 'wp_loaded', array(__CLASS__, 'main') );
|
414 |
+
add_action( 'wp_enqueue_scripts', array(__CLASS__, 'enqueue_scripts') );
|
415 |
+
add_action( 'wp_head', array(__CLASS__, 'print_ie_inline_style'), 11 );
|
416 |
+
|
417 |
+
// FILTERS
|
418 |
+
add_filter( 'embed_oembed_html', array(__CLASS__,'add_video_wmode_opaque'), 10, 3 );
|
419 |
+
add_filter( 'easy_fancybox_inline_script', array(__CLASS__,'onready_callback') );
|
420 |
}
|
|
|
421 |
}
|
inc/translation-strings.php
CHANGED
@@ -1,9 +1,7 @@
|
|
1 |
<?php return;
|
2 |
/**
|
3 |
-
* This file exists solely to store the plugin
|
4 |
-
*
|
5 |
-
*
|
6 |
-
* It is never included anywhere, used only for parsing.
|
7 |
*/
|
8 |
|
9 |
//
|
@@ -14,13 +12,14 @@ __('Get support here.','easy-fancybox');
|
|
14 |
__('Set a border radius to create rounded corners. Higher is rounder.','easy-fancybox');
|
15 |
|
16 |
// autopopup
|
|
|
17 |
__('First Image link','easy-fancybox');
|
18 |
__('First PDF link','easy-fancybox');
|
19 |
__('First SWF link','easy-fancybox');
|
20 |
__('First SVG link','easy-fancybox');
|
21 |
-
__('First YouTube link
|
22 |
-
__('First Vimeo link
|
23 |
-
__('First Dailymotion link
|
24 |
__('First iFrame link','easy-fancybox');
|
25 |
__('First of any link','easy-fancybox');
|
26 |
|
@@ -69,3 +68,11 @@ __('(3 seconds)','easy-fancybox');
|
|
69 |
__('(6 seconds)','easy-fancybox');
|
70 |
__('(9 seconds)','easy-fancybox');
|
71 |
__('(12 seconds)','easy-fancybox');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<?php return;
|
2 |
/**
|
3 |
+
* This file exists solely to store the plugin translation strings.
|
4 |
+
* It is never included anywhere, used only for PO parsing.
|
|
|
|
|
5 |
*/
|
6 |
|
7 |
//
|
12 |
__('Set a border radius to create rounded corners. Higher is rounder.','easy-fancybox');
|
13 |
|
14 |
// autopopup
|
15 |
+
__('Link with ID matching URL hash','easy-fancybox');
|
16 |
__('First Image link','easy-fancybox');
|
17 |
__('First PDF link','easy-fancybox');
|
18 |
__('First SWF link','easy-fancybox');
|
19 |
__('First SVG link','easy-fancybox');
|
20 |
+
__('First YouTube link','easy-fancybox');
|
21 |
+
__('First Vimeo link','easy-fancybox');
|
22 |
+
__('First Dailymotion link','easy-fancybox');
|
23 |
__('First iFrame link','easy-fancybox');
|
24 |
__('First of any link','easy-fancybox');
|
25 |
|
68 |
__('(6 seconds)','easy-fancybox');
|
69 |
__('(9 seconds)','easy-fancybox');
|
70 |
__('(12 seconds)','easy-fancybox');
|
71 |
+
|
72 |
+
/* Translators: %s is replaced by Easy FancyBox plugin title plus installation link */
|
73 |
+
__('To use the Easy Fancybox Pro advanced options, please install %s.','easy-fancybox');
|
74 |
+
__('Or disable the Easy Fancybox Pro plugin.','easy-fancybox');
|
75 |
+
|
76 |
+
__( 'Notice: The current Easy FancyBox plugin version is not fully compatible with your version of the Pro extension. Some advanced options may not be functional.', 'easy-fancybox' );
|
77 |
+
/* Translators: %s is replaced by a version number */
|
78 |
+
__( 'Please upgrade %s to verion %s or later.', 'easy-fancybox' );
|
readme.txt
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
Contributors: RavanH
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=ravanhagen%40gmail%2ecom&item_name=Easy%20FancyBox
|
4 |
Tags: fancybox, lightbox, gallery, image, photo, video, flash, overlay, youtube, vimeo, dailymotion, pdf, svg, iframe, swf, jquery, webp
|
5 |
-
Requires at least:
|
6 |
Tested up to: 4.9
|
7 |
-
Stable tag: 1.
|
8 |
|
9 |
Easily enable the FancyBox jQuery extension on just about all media links. Multi-Site compatible. Supports iFrame and Flash movies.
|
10 |
|
@@ -27,20 +27,15 @@ After activation, all links to **JPG, GIF and PNG images** are automatically ope
|
|
27 |
- iFrames
|
28 |
- PDF files
|
29 |
- Auto-popup on page load
|
30 |
-
- links inside Gravity Forms in ajax mode
|
31 |
|
32 |
-
For **advanced options** and **priority support**, there is a **[Pro extension](
|
33 |
|
34 |
-
See [
|
35 |
|
36 |
-
|
37 |
|
38 |
-
|
39 |
|
40 |
-
Visit [FancyBox](http://fancybox.net/) for more information, examples and the FancyBox Support Forum. Please consider a DONATION for continued development of the FancyBox project.
|
41 |
-
|
42 |
-
**Recommended:**
|
43 |
-
- For increased site performance, simply install and activate the plugin [Use Google Libraries](http://wordpress.org/plugins/use-google-libraries/) to load jQuery from Googles CDN.
|
44 |
|
45 |
= Contribute =
|
46 |
|
@@ -115,22 +110,11 @@ Yes, but _only_ if you used the option **Link To: Media File** when inserting th
|
|
115 |
|
116 |
= The lightbox does not look good on mobile devices. What can I do about that? =
|
117 |
|
118 |
-
The FancyBox 1.3.4 script that is used in this plugin was not developed with mobile devices in mind. The only way around this issue is currently to disable FancyBox for small screen sizes
|
119 |
-
|
120 |
-
`
|
121 |
-
<script type="text/javascript">
|
122 |
-
var pixelRatio = window.devicePixelRatio || 1;
|
123 |
-
if(window.innerWidth/pixelRatio < 641 ) {
|
124 |
-
easy_fancybox_handler = null;
|
125 |
-
};
|
126 |
-
</script>
|
127 |
-
`
|
128 |
-
|
129 |
-
Tweak the value 641 to target other screen sizes.
|
130 |
|
131 |
= Can I make a slideshow from my gallery? =
|
132 |
|
133 |
-
In the [Pro extension](
|
134 |
|
135 |
|
136 |
= Can I exclude images or other links from auto-attribution? =
|
@@ -360,6 +344,15 @@ Use the instructions above for inline content but this time give the link also `
|
|
360 |
|
361 |
Same can be done with an image, flash movie, PDF or iframe link! But please remember there can be only **one** item using the ID fancybox-auto per page...
|
362 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
363 |
|
364 |
= Can I make a menu item open in a FancyBox overlay ? =
|
365 |
|
@@ -378,37 +371,31 @@ If you are on an older version of WordPress or if you cannot use WP's Menus, you
|
|
378 |
Yes. Designed to work with **Network Activate** and does not require manual activation on each site in your network.
|
379 |
|
380 |
|
381 |
-
|
382 |
== Known Issues ==
|
383 |
|
384 |
= General =
|
385 |
|
386 |
-
- **Outbound links or Downloads tracking** in some of the stats plugins can interfere with FancyBox.
|
387 |
-
-
|
388 |
-
-
|
389 |
|
390 |
= Plugin conflicts =
|
391 |
|
392 |
-
- **Autoptimize** needs to have either (at least) the option "Force JavaScript in <head>" checked or both jQuery and the fancybox script files need to be excluded.
|
393 |
-
- **All in One SEO Pack** and **Analytics for WordPress** with outbound link tracking enabled. Disable that feature.
|
394 |
-
- **Better WP Security** randomly changes version numbers in linked file URLs, breaking the FancyBox stylesheet. Disable the option "Display random version number to all non-administrative users" in the Better WP Security settings.
|
395 |
-
- By default **Google Analytics for WordPress** converts links like `href="#anyID"` to `href="http://yoursite.url/page/#anyID"`, disabling inline content shown in FancyBox.
|
396 |
- **jQuery Updater** moves jQuery to version 2+ which is incompatible.
|
|
|
|
|
|
|
397 |
- Both the **uBillBoard** and **Camera slideshow** have their own easing script hard-coded which conflicts with the one in Easy FancyBox. The only way around the conflict is to set both the Easing In and Easing Out options on your Settings > Media page to **Swing**.
|
398 |
- **Wordpress Firewall 2** blocks access to image files needed for proper display of the FancyBox overlay in older IE and other non-css3 browsers.
|
399 |
- **WordPress Amazon Associate**: A script provided by Amazon and the FancyBox script are incompatible. Disabling _Product Preview_ in the **WP - Amazon > Settings** page should work around the issue.
|
400 |
-
- **WP Slimstat** with Track Outbound Clicks enabled, will break the light box effect on some browsers. Adding `fancybox` (or any of the other classes like `fancybox-youtube,fancybox-iframe,fancybox-inline` depending on which media should be displayed in FancyBox) to the Do Not Track field is reported to solve the issue. Slimstat also might interfere with the YouTube url conversion. When clicking a Youtube link, the movie opens in an overlay as it is supposed to but immediately after that, the complete page gets redirected to the original YouTube page. Adding a `class="noslimstat"` to the link is reported to work around the issue.
|
401 |
-
- When using **WP-Minify**, the javascript files like `fancybox/jquery.fancybox-X.X.X.pack.js` and others need to be excluded from minification.
|
402 |
-
- When using **W3 Total Cache**, minification needs to be switched off. You can try to run **WP-Minify** alongside W3TC to be able to exclude fancybox files (as suggested above) and still have page speed benefit from minification.
|
403 |
- **WP Supersized** uses the Animate Enhanced jQuery extension which causes a conflict with the Easing extension used by FancyBox resulting in a 0px sized lightbox frame and/or some kind of positioning issue with auto-centering.
|
404 |
|
405 |
= Theme conflicts =
|
406 |
|
407 |
-
- **Twenty Eleven** uses a very high stacking order (z-index: 9999) for the top image and menu div, resulting in FancyBox content being partially hidden under the page header. Work-around: Use the plugin [Custom CSS](http://wordpress.org/plugins/safecss/) or [Jetpack](http://wordpress.org/plugins/jetpack/) and add on the new Appearance > Edit CSS admin page the rule `#branding { z-index:999; }`
|
408 |
- Older versions of **Elegant Themes** have FancyBox integrated in a hard-coded way, making them incompatible with Easy FancyBox. In the latest versions of these themes, there is an option to disable the included FancyBox. Use this option to make your theme compatible with Easy FancyBox :)
|
409 |
-
- The **Mystique** theme has two
|
410 |
- **Imbalance** and other themes that uses the Photo Galleria jQuery extension: turn of the JSGallery option.
|
411 |
-
- Themes like **Envisioned**, **Chameleon** and many others have FancyBox baked in. There is no solution other than stripping the theme of all FancyBox related code or disable the plugin and use the theme provided version...
|
412 |
- Themes based on the **Thesis** framework might see issues in IE 8, for which [a hack has been proposed](http://voidzonemedia.com/solutions/thesis-ie8-remove-ie7-emulation/)
|
413 |
|
414 |
|
@@ -429,19 +416,18 @@ If, after activation, your images do not open in a FancyBox overlay, there are s
|
|
429 |
|
430 |
= General trouble shooting steps =
|
431 |
|
432 |
-
1. Switch off all other plugins and switch your sites appearance to the default Twenty
|
433 |
1. Switch back to your original theme and check if FancyBox is still working. If so, continue with the next step. If not, See the Theme Incompatibility checks below.
|
434 |
1. One by one, switch each plugin that you had running before back ON. Keep checking to see at which point FancyBox starts failing and you will hve found the conflicting plugin.
|
435 |
|
436 |
= Theme Incompatibility checks =
|
437 |
|
438 |
1. See known theme conflicts above first, then continue with these following steps.
|
439 |
-
1. Make sure your theme is capable of placing the needed javascript and css in the page header. Open any page on your site and view the source code by right-clicking on an empty section and selecting 'View source...' (or similar). There you will need to check of there are any references to javascript files like `jquery.fancybox
|
440 |
-
1. Check if your theme wraps post/page content in a div with class `hentry`. If it doesn't, you might need to edit the option `Section(s)` on **Settings > Media** to reflect the class (or ID) name of the div that holds post/page content.
|
441 |
1. Make sure that your theme does not load the main jQuery library file more than once. Look for references to javascript files like `jquery.js?ver=x.x.x` or `jquery.min.js` in the page source code. If you find more than one, try to find out in which theme template file that second reference is hard-coded and remove that line. Usually in header.php or footer.php
|
442 |
1. Check if your theme loads another or the same lightbox script. Look for references to Thickbox, Prettyphoto, Lightbox2, Colorbox or FancyBox script files or code. These are very likely to cause the incompatibility and you will either have to remove these by hacking your theme or switch to another theme.
|
443 |
|
444 |
-
If you still do not get to see your images in FancyBox, ask on the [Easy FancyBox WordPress forum](
|
445 |
|
446 |
= Plugin Incompatibility checks =
|
447 |
|
@@ -458,13 +444,23 @@ If you still do not get to see your images in FancyBox, ask on the [Easy FancyBo
|
|
458 |
|
459 |
== Upgrade Notice ==
|
460 |
|
461 |
-
= 1.
|
462 |
-
Switch to wp_add_inline_script()
|
463 |
|
464 |
== Changelog ==
|
465 |
|
466 |
-
= 1.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
467 |
* Switch to wp_add_inline_script() script printing, thanks @szepeviktor
|
|
|
|
|
468 |
* FIX: inline js minification incompatibility, thanks @alexiswilke
|
469 |
|
470 |
= 1.6.2 =
|
@@ -489,7 +485,6 @@ Switch to wp_add_inline_script() and fix inline js minification incompatibility
|
|
489 |
|
490 |
= 1.5.8 =
|
491 |
* FIX: variable variable php 7 compat
|
492 |
-
* Dropped IE6 support
|
493 |
* FIX: obj undefined in minified js
|
494 |
* FIX: nofancybox in menu ignored, thanks Trishah
|
495 |
* Color value sanitize
|
@@ -589,7 +584,7 @@ Switch to wp_add_inline_script() and fix inline js minification incompatibility
|
|
589 |
* Links with id **fancybox-auto** will be triggered on page load
|
590 |
* Anything with class **fancybox-hidden"** will be hidden
|
591 |
* Support for menu items in iframe
|
592 |
-
* Added class **
|
593 |
|
594 |
= 1.3.4.5 =
|
595 |
* FancyBox script version 1.3.4 (2010/11/11 - http://fancybox.net/changelog/)
|
2 |
Contributors: RavanH
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=ravanhagen%40gmail%2ecom&item_name=Easy%20FancyBox
|
4 |
Tags: fancybox, lightbox, gallery, image, photo, video, flash, overlay, youtube, vimeo, dailymotion, pdf, svg, iframe, swf, jquery, webp
|
5 |
+
Requires at least: 4.5
|
6 |
Tested up to: 4.9
|
7 |
+
Stable tag: 1.7
|
8 |
|
9 |
Easily enable the FancyBox jQuery extension on just about all media links. Multi-Site compatible. Supports iFrame and Flash movies.
|
10 |
|
27 |
- iFrames
|
28 |
- PDF files
|
29 |
- Auto-popup on page load
|
|
|
30 |
|
31 |
+
For **advanced options** and **priority support**, there is a **[Pro extension](https://premium.status301.net/downloads/easy-fancybox-pro/)** available.
|
32 |
|
33 |
+
See [FAQ's](https://wordpress.org/plugins/easy-fancybox/faq/) for instructions to manage YouTube, Dailymotion and Vimeo movies (and similar services) and tips to make inline content display in a FancyBox overlay.
|
34 |
|
35 |
+
Get support on the [Easy FancyBox web page](https://status301.net/wordpress-plugins/easy-fancybox/) or [WordPress forum](https://wordpress.org/support/plugin/easy-fancybox).
|
36 |
|
37 |
+
Visit [FancyBox](http://fancybox.net/) for more information and examples.
|
38 |
|
|
|
|
|
|
|
|
|
39 |
|
40 |
= Contribute =
|
41 |
|
110 |
|
111 |
= The lightbox does not look good on mobile devices. What can I do about that? =
|
112 |
|
113 |
+
The FancyBox 1.3.4 script that is used in this plugin was not developed with mobile devices in mind. The only way around this issue is currently to disable FancyBox for small screen sizes on **Settings > Media** in the section **Miscellaneous > Browser & device compatibility**.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
|
115 |
= Can I make a slideshow from my gallery? =
|
116 |
|
117 |
+
In the [Pro extension](https://premium.status301.net/downloads/easy-fancybox-pro/), there is an Advanced option called "Gallery Auto-rotation" for that.
|
118 |
|
119 |
|
120 |
= Can I exclude images or other links from auto-attribution? =
|
344 |
|
345 |
Same can be done with an image, flash movie, PDF or iframe link! But please remember there can be only **one** item using the ID fancybox-auto per page...
|
346 |
|
347 |
+
= Can I have a modal window ? =
|
348 |
+
|
349 |
+
Yes, just create a hidden inline content light box (can be auto-popup) as described above and give the link an extra class "modal". This will remove all options to close the light box, like the close button, an overlay click or escape key.
|
350 |
+
|
351 |
+
This means there is NO option to close the light box, unless you create a link like this:
|
352 |
+
|
353 |
+
`
|
354 |
+
<a href="#" class="fancybox-close">Enter this site</a>
|
355 |
+
`
|
356 |
|
357 |
= Can I make a menu item open in a FancyBox overlay ? =
|
358 |
|
371 |
Yes. Designed to work with **Network Activate** and does not require manual activation on each site in your network.
|
372 |
|
373 |
|
|
|
374 |
== Known Issues ==
|
375 |
|
376 |
= General =
|
377 |
|
378 |
+
- **Outbound links or Downloads tracking** in some of the stats plugins can interfere with FancyBox. Disable such option or exclude links manually with a class (see instructions for SlimStat below)
|
379 |
+
- Most plugins and themes that already include a light box script. Continue reading to see if you are using one of the know ones or follow the troubleshooting steps to find out what is conflicting on your site.
|
380 |
+
- Any theme that is missing the obligatory `<?php wp_footer(); ?>` call in the footer.php template.
|
381 |
|
382 |
= Plugin conflicts =
|
383 |
|
|
|
|
|
|
|
|
|
384 |
- **jQuery Updater** moves jQuery to version 2+ which is incompatible.
|
385 |
+
- **All in One SEO Pack** and **Analytics for WordPress** with outbound link tracking enabled. Disable that feature.
|
386 |
+
- **WP Slimstat** with Track Outbound Clicks enabled, will break the light box effect on some browsers. Adding `fancybox` (or any of the other classes like `fancybox-youtube,fancybox-iframe,fancybox-inline` depending on which media should be displayed in FancyBox) to the Do Not Track field is reported to solve the issue. Slimstat also might interfere with the YouTube url conversion. When clicking a Youtube link, the movie opens in an overlay as it is supposed to but immediately after that, the complete page gets redirected to the original YouTube page. Adding a `class="noslimstat"` to the link is reported to work around the issue.
|
387 |
+
- **Google Analytics for WordPress** converts links like `href="#anyID"` to `href="http://yoursite.url/page/#anyID"`, disabling inline content shown in FancyBox.
|
388 |
- Both the **uBillBoard** and **Camera slideshow** have their own easing script hard-coded which conflicts with the one in Easy FancyBox. The only way around the conflict is to set both the Easing In and Easing Out options on your Settings > Media page to **Swing**.
|
389 |
- **Wordpress Firewall 2** blocks access to image files needed for proper display of the FancyBox overlay in older IE and other non-css3 browsers.
|
390 |
- **WordPress Amazon Associate**: A script provided by Amazon and the FancyBox script are incompatible. Disabling _Product Preview_ in the **WP - Amazon > Settings** page should work around the issue.
|
|
|
|
|
|
|
391 |
- **WP Supersized** uses the Animate Enhanced jQuery extension which causes a conflict with the Easing extension used by FancyBox resulting in a 0px sized lightbox frame and/or some kind of positioning issue with auto-centering.
|
392 |
|
393 |
= Theme conflicts =
|
394 |
|
|
|
395 |
- Older versions of **Elegant Themes** have FancyBox integrated in a hard-coded way, making them incompatible with Easy FancyBox. In the latest versions of these themes, there is an option to disable the included FancyBox. Use this option to make your theme compatible with Easy FancyBox :)
|
396 |
+
- The **Mystique** theme has two options called "Lightbox" and "Optimize website for faster loading" that will break Easy FancyBox. Disable both in Mystique's options > Advanced.
|
397 |
- **Imbalance** and other themes that uses the Photo Galleria jQuery extension: turn of the JSGallery option.
|
398 |
+
- Themes like **Envisioned**, **Chameleon** and many others have FancyBox baked in. There is no solution other than stripping the theme of all FancyBox related code or better: disable the plugin and use the theme provided version...
|
399 |
- Themes based on the **Thesis** framework might see issues in IE 8, for which [a hack has been proposed](http://voidzonemedia.com/solutions/thesis-ie8-remove-ie7-emulation/)
|
400 |
|
401 |
|
416 |
|
417 |
= General trouble shooting steps =
|
418 |
|
419 |
+
1. Switch off all other plugins and switch your sites appearance to the default Twenty Seventeen theme. FancyBox should work now. If so, continue with the next step. If not, re-install the plugin and verify the basic steps above.
|
420 |
1. Switch back to your original theme and check if FancyBox is still working. If so, continue with the next step. If not, See the Theme Incompatibility checks below.
|
421 |
1. One by one, switch each plugin that you had running before back ON. Keep checking to see at which point FancyBox starts failing and you will hve found the conflicting plugin.
|
422 |
|
423 |
= Theme Incompatibility checks =
|
424 |
|
425 |
1. See known theme conflicts above first, then continue with these following steps.
|
426 |
+
1. Make sure your theme is capable of placing the needed javascript and css in the page header and footer. Open any page on your site and view the source code by right-clicking on an empty section and selecting 'View source...' (or similar). There you will need to check of there are any references to javascript files like `jquery.fancybox.min.js?ver=x.x.x` near the closing `</body>` tag. There should also be a `easy-fancybox.min.css?ver=x.x.x` in the head section... If it's not there, your theme is really out of date. Consider switching to a new theme fast!
|
|
|
427 |
1. Make sure that your theme does not load the main jQuery library file more than once. Look for references to javascript files like `jquery.js?ver=x.x.x` or `jquery.min.js` in the page source code. If you find more than one, try to find out in which theme template file that second reference is hard-coded and remove that line. Usually in header.php or footer.php
|
428 |
1. Check if your theme loads another or the same lightbox script. Look for references to Thickbox, Prettyphoto, Lightbox2, Colorbox or FancyBox script files or code. These are very likely to cause the incompatibility and you will either have to remove these by hacking your theme or switch to another theme.
|
429 |
|
430 |
+
If you still do not get to see your images in FancyBox, ask on the [Easy FancyBox WordPress forum](https://wordpress.org/tags/easy-fancybox) or go to the [development site](https://status301.net/wordpress-plugins/easy-fancybox/)
|
431 |
|
432 |
= Plugin Incompatibility checks =
|
433 |
|
444 |
|
445 |
== Upgrade Notice ==
|
446 |
|
447 |
+
= 1.7 =
|
448 |
+
Fix: pre PHP 5.4 compatibility. Switch to wp_add_inline_script() script printing.
|
449 |
|
450 |
== Changelog ==
|
451 |
|
452 |
+
= 1.7 =
|
453 |
+
* NEW: Aspect ratio for video frames on smaller screens
|
454 |
+
* NEW: Global minimum screen size
|
455 |
+
* NEW: Loading icon for video/iframe content
|
456 |
+
* NEW: Resize light box on device orientation or browser window size change
|
457 |
+
* NEW: Modal window class and close button class
|
458 |
+
* FIX: pre PHP 5.4 compatibility
|
459 |
+
* FIX: iPhone iframe scrolling
|
460 |
+
* FIX: Autoptimize compatibility
|
461 |
* Switch to wp_add_inline_script() script printing, thanks @szepeviktor
|
462 |
+
|
463 |
+
= 1.6.3 =
|
464 |
* FIX: inline js minification incompatibility, thanks @alexiswilke
|
465 |
|
466 |
= 1.6.2 =
|
485 |
|
486 |
= 1.5.8 =
|
487 |
* FIX: variable variable php 7 compat
|
|
|
488 |
* FIX: obj undefined in minified js
|
489 |
* FIX: nofancybox in menu ignored, thanks Trishah
|
490 |
* Color value sanitize
|
584 |
* Links with id **fancybox-auto** will be triggered on page load
|
585 |
* Anything with class **fancybox-hidden"** will be hidden
|
586 |
* Support for menu items in iframe
|
587 |
+
* Added class **nofancybox** for exclusion when auto-enabling
|
588 |
|
589 |
= 1.3.4.5 =
|
590 |
* FancyBox script version 1.3.4 (2010/11/11 - http://fancybox.net/changelog/)
|