Version Description
Bugfix release: prevent Inline content title.
=
Download this release
Release Info
Developer | RavanH |
Plugin | Easy FancyBox |
Version | 1.8.5 |
Comparing to | |
See all releases |
Code changes from version 1.8.2 to 1.8.5
- easy-fancybox.php +5 -5
- fancybox/jquery.fancybox.css +6 -1
- fancybox/jquery.fancybox.js +19 -15
- fancybox/jquery.fancybox.min.css +1 -1
- fancybox/jquery.fancybox.min.js +1 -1
- inc/class-easyfancybox-admin.php +21 -19
- inc/class-easyfancybox-options.php +0 -1603
- inc/class-easyfancybox.php +16 -7
- inc/easyfancybox-options.php +1602 -0
- readme.txt +18 -8
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.8.
|
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.8.
|
41 |
-
define( 'FANCYBOX_VERSION', '1.3.
|
42 |
define( 'MOUSEWHEEL_VERSION', '3.1.13' );
|
43 |
define( 'EASING_VERSION', '1.4.1' );
|
44 |
define( 'METADATA_VERSION', '2.22.1' );
|
@@ -48,9 +48,9 @@ define( 'METADATA_VERSION', '2.22.1' );
|
|
48 |
**************/
|
49 |
|
50 |
require_once dirname( __FILE__ ) . '/inc/class-easyfancybox.php';
|
51 |
-
|
52 |
|
53 |
if ( is_admin() ) {
|
54 |
require_once dirname( __FILE__ ) . '/inc/class-easyfancybox-admin.php';
|
55 |
-
|
56 |
}
|
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.8.5
|
9 |
Author: RavanH
|
10 |
Author URI: http://status301.net/
|
11 |
*/
|
37 |
* CONSTANTS
|
38 |
**************/
|
39 |
|
40 |
+
define( 'EASY_FANCYBOX_VERSION', '1.8.5' );
|
41 |
+
define( 'FANCYBOX_VERSION', '1.3.20' );
|
42 |
define( 'MOUSEWHEEL_VERSION', '3.1.13' );
|
43 |
define( 'EASING_VERSION', '1.4.1' );
|
44 |
define( 'METADATA_VERSION', '2.22.1' );
|
48 |
**************/
|
49 |
|
50 |
require_once dirname( __FILE__ ) . '/inc/class-easyfancybox.php';
|
51 |
+
new easyFancyBox( __FILE__ );
|
52 |
|
53 |
if ( is_admin() ) {
|
54 |
require_once dirname( __FILE__ ) . '/inc/class-easyfancybox-admin.php';
|
55 |
+
new easyFancyBox_Admin();
|
56 |
}
|
fancybox/jquery.fancybox.css
CHANGED
@@ -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.
|
11 |
*
|
12 |
* Dual licensed under the MIT and GPL licenses:
|
13 |
* http://www.opensource.org/licenses/mit-license.php
|
@@ -223,6 +223,11 @@
|
|
223 |
right:-9999px
|
224 |
}
|
225 |
|
|
|
|
|
|
|
|
|
|
|
226 |
#fancybox-left:hover span {
|
227 |
left: 20px;
|
228 |
}
|
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.17 (2018/05/12)
|
11 |
*
|
12 |
* Dual licensed under the MIT and GPL licenses:
|
13 |
* http://www.opensource.org/licenses/mit-license.php
|
223 |
right:-9999px
|
224 |
}
|
225 |
|
226 |
+
#fancybox-left:focus, #fancybox-right:focus {
|
227 |
+
outline: none;
|
228 |
+
background: initial;
|
229 |
+
}
|
230 |
+
|
231 |
#fancybox-left:hover span {
|
232 |
left: 20px;
|
233 |
}
|
fancybox/jquery.fancybox.js
CHANGED
@@ -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.
|
11 |
* Requires: jQuery v1.7+
|
12 |
*
|
13 |
* Dual licensed under the MIT and GPL licenses:
|
@@ -86,6 +86,10 @@
|
|
86 |
return;
|
87 |
}
|
88 |
|
|
|
|
|
|
|
|
|
89 |
ret = selectedOpts.onStart(selectedArray, selectedIndex, selectedOpts);
|
90 |
|
91 |
if (ret === false) {
|
@@ -329,8 +333,7 @@
|
|
329 |
},
|
330 |
|
331 |
_process_inline = function() {
|
332 |
-
var
|
333 |
-
w = selectedOpts.width,
|
334 |
h = selectedOpts.height,
|
335 |
ww = $(window).width() == 0 ? window.innerWidth : $(window).width(),
|
336 |
wh = $(window).height() == 0 ? window.innerHeight : $(window).height();
|
@@ -506,7 +509,7 @@
|
|
506 |
content
|
507 |
.css({
|
508 |
'width' : final_pos.width - currentOpts.padding * 2,
|
509 |
-
'height' :
|
510 |
})
|
511 |
.html( tmp.contents() );
|
512 |
|
@@ -680,7 +683,7 @@
|
|
680 |
|
681 |
if (currentOpts.type == 'iframe') {
|
682 |
$('<iframe id="fancybox-frame" name="fancybox-frame' + new Date().getTime() + '"' + (navigator.userAgent.match(/msie [6]/i) ? ' allowtransparency="true""' : '')
|
683 |
-
+ ' style="border:0;margin:0;overflow:' + (
|
684 |
+ currentOpts.href + '"' + (false === currentOpts.allowfullscreen ? '' : ' allowfullscreen') + ' allow="autoplay; encrypted-media" tabindex="999"></iframe>')
|
685 |
.appendTo(content).load(function() {
|
686 |
$.fancybox.hideActivity();
|
@@ -790,13 +793,16 @@
|
|
790 |
window.innerWidth || document.documentElement.clientWidth || document.getElementsByTagName('body')[0].clientWidth,
|
791 |
h = !isTouch && window.innerHeight && document.documentElement.clientHeight ?
|
792 |
Math.min(window.innerHeight, document.documentElement.clientHeight) :
|
793 |
-
window.innerHeight || document.documentElement.clientHeight || document.getElementsByTagName('body')[0].clientHeight
|
|
|
|
|
|
|
794 |
|
795 |
return [
|
796 |
-
w - (
|
797 |
-
h - (
|
798 |
-
$(document).scrollLeft() +
|
799 |
-
$(document).scrollTop() +
|
800 |
];
|
801 |
},
|
802 |
|
@@ -912,8 +918,6 @@
|
|
912 |
.data('fancybox', $.extend({}, options, ($.metadata ? $(this).metadata() : {})))
|
913 |
.off('click.fb')
|
914 |
.on('click.fb', function(e) {
|
915 |
-
e.preventDefault();
|
916 |
-
|
917 |
if (busy) {
|
918 |
return;
|
919 |
}
|
@@ -934,7 +938,7 @@
|
|
934 |
selectedIndex = selectedArray.index( this );
|
935 |
}
|
936 |
|
937 |
-
_start();
|
938 |
|
939 |
return;
|
940 |
});
|
@@ -1213,9 +1217,9 @@
|
|
1213 |
}
|
1214 |
|
1215 |
align = arguments[0] === true ? 1 : 0;
|
1216 |
-
view = _get_viewport();
|
1217 |
|
1218 |
-
if (!align && (wrap.width() > view[0] || wrap.height() > view[1])) {
|
1219 |
return;
|
1220 |
}
|
1221 |
|
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.20 (2018/06/15)
|
11 |
* Requires: jQuery v1.7+
|
12 |
*
|
13 |
* Dual licensed under the MIT and GPL licenses:
|
86 |
return;
|
87 |
}
|
88 |
|
89 |
+
if ('object' === typeof arguments[0] && 'click' === arguments[0].type) {
|
90 |
+
arguments[0].preventDefault();
|
91 |
+
}
|
92 |
+
|
93 |
ret = selectedOpts.onStart(selectedArray, selectedIndex, selectedOpts);
|
94 |
|
95 |
if (ret === false) {
|
333 |
},
|
334 |
|
335 |
_process_inline = function() {
|
336 |
+
var w = selectedOpts.width,
|
|
|
337 |
h = selectedOpts.height,
|
338 |
ww = $(window).width() == 0 ? window.innerWidth : $(window).width(),
|
339 |
wh = $(window).height() == 0 ? window.innerHeight : $(window).height();
|
509 |
content
|
510 |
.css({
|
511 |
'width' : final_pos.width - currentOpts.padding * 2,
|
512 |
+
'height' : currentOpts.autoDimensions ? 'auto' : final_pos.height - titleHeight - currentOpts.padding * 2
|
513 |
})
|
514 |
.html( tmp.contents() );
|
515 |
|
683 |
|
684 |
if (currentOpts.type == 'iframe') {
|
685 |
$('<iframe id="fancybox-frame" name="fancybox-frame' + new Date().getTime() + '"' + (navigator.userAgent.match(/msie [6]/i) ? ' allowtransparency="true""' : '')
|
686 |
+
+ ' style="border:0;margin:0;overflow:' + (currentOpts.scrolling == 'auto' ? 'auto' : (currentOpts.scrolling == 'yes' ? 'scroll' : 'hidden')) + '" src="'
|
687 |
+ currentOpts.href + '"' + (false === currentOpts.allowfullscreen ? '' : ' allowfullscreen') + ' allow="autoplay; encrypted-media" tabindex="999"></iframe>')
|
688 |
.appendTo(content).load(function() {
|
689 |
$.fancybox.hideActivity();
|
793 |
window.innerWidth || document.documentElement.clientWidth || document.getElementsByTagName('body')[0].clientWidth,
|
794 |
h = !isTouch && window.innerHeight && document.documentElement.clientHeight ?
|
795 |
Math.min(window.innerHeight, document.documentElement.clientHeight) :
|
796 |
+
window.innerHeight || document.documentElement.clientHeight || document.getElementsByTagName('body')[0].clientHeight,
|
797 |
+
margin;
|
798 |
+
|
799 |
+
margin = arguments[0] === true ? 0 : currentOpts.margin;
|
800 |
|
801 |
return [
|
802 |
+
w - (margin * 2),
|
803 |
+
h - (margin * 2),
|
804 |
+
$(document).scrollLeft() + margin,
|
805 |
+
$(document).scrollTop() + margin
|
806 |
];
|
807 |
},
|
808 |
|
918 |
.data('fancybox', $.extend({}, options, ($.metadata ? $(this).metadata() : {})))
|
919 |
.off('click.fb')
|
920 |
.on('click.fb', function(e) {
|
|
|
|
|
921 |
if (busy) {
|
922 |
return;
|
923 |
}
|
938 |
selectedIndex = selectedArray.index( this );
|
939 |
}
|
940 |
|
941 |
+
_start(e);
|
942 |
|
943 |
return;
|
944 |
});
|
1217 |
}
|
1218 |
|
1219 |
align = arguments[0] === true ? 1 : 0;
|
1220 |
+
view = _get_viewport(true);
|
1221 |
|
1222 |
+
if (!align && ((wrap.width() + 40) > view[0] || (wrap.height() + 40) > view[1])) {
|
1223 |
return;
|
1224 |
}
|
1225 |
|
fancybox/jquery.fancybox.min.css
CHANGED
@@ -1 +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;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;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;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;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}
|
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;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;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;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;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:focus,#fancybox-right:focus{outline:0;background:initial}#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
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(function(l){var D,j,B,r,c,z,w,H,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,G=/[^\.]\.(pdf)\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(I){if(false===y.onError(h,g,y)){l.fancybox.hideActivity();C=false;return}if(typeof I==="undefined"){I="Please try again later."}y.titleShow=false;y.width="auto";y.height="auto";D.html('<p id="fancybox-error">The requested content cannot be loaded.<br />'+I+"</p>");_process_inline()},_start=function(){var M=h[g],J,L,O,N,I,K;_abort();y=l.extend({},l.fn.fancybox.defaults,(typeof l(M).data("fancybox")=="undefined"?y:l(M).data("fancybox")));if(document.documentElement.clientWidth<y.minViewportWidth){C=false;return}K=y.onStart(h,g,y);if(K===false){C=false;return}else{if(typeof K=="object"){y=l.extend(y,K)}}O=y.title||(M.nodeName?l(M).attr("title"):M.title)||"";if(M.nodeName&&!y.orig){y.orig=l(M).find("img:first").length?l(M).find("img:first"):l(M)}if(O===""&&y.orig){O=y.orig.attr("title")||(y.titleFromAlt?y.orig.attr("alt"):"")}J=y.href||(M.nodeName?l(M).attr("href"):M.href)||null;if((/^(?:javascript)/i).test(J)||J=="#"){J=null}if(y.type){L=y.type;if(!J){J=y.content}}else{if(y.content){L="html"}else{if(l(M).hasClass("iframe")){L="iframe"}else{if(J){if(J.match(u)||l(M).hasClass("image")){L="image"}else{if(J.match(p)){L="swf"}else{if(J.match(A)){L="svg"}else{if(J.match(G)){L="pdf"}else{if(J.indexOf("#")===0){L="inline"}else{L="ajax"}}}}}}}}}if(!L){_error("No content type found.");return}if(l(M).hasClass("modal")){y.modal=true}if(L=="inline"){M=J.substr(J.indexOf("#"));L=l(M).length>0?"inline":"ajax"}y.type=L;y.href=J;y.title=O;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(L){case"html":D.html(y.content);_process_inline();break;case"inline":if(l(M).parent().is("#fancybox-content")===true){C=false;return}l('<div class="fancybox-inline-tmp" />').hide().insertBefore(l(M)).on("fancybox-cleanup",function(){l(this).replaceWith(z.children("div:first"))}).on("fancybox-cancel",function(){l(this).replaceWith(D.children("div:first"))});l(M).appendTo(D);_process_inline();break;case"image":y.keepRatio=true;C=false;l.fancybox.showActivity();E=new Image();E.onerror=function(){_error("No image found.")};E.onload=function(){C=true;E.onerror=E.onload=null;_process_image()};E.src=J;break;case"swf":y.scrolling="no";y.keepRatio=true;N='<object type="application/x-shockwave-flash" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+y.width+'" height="'+y.height+'"><param name="movie" value="'+J+'"></param>';I="";l.each(y.swf,function(P,Q){N+='<param name="'+P+'" value="'+Q+'"></param>';I+=" "+P+'="'+Q+'"'});N+='<embed src="'+J+'" type="application/x-shockwave-flash" width="'+y.width+'" height="'+y.height+'"'+I+"></embed></object>";D.html(N);_process_inline();break;case"svg":y.scrolling="no";y.keepRatio=true;N='<object type="image/svg+xml" width="'+y.width+'" height="'+y.height+'" data="'+J+'"></object>';D.html(N);_process_inline();break;case"pdf":y.scrolling="no";N='<object type="application/pdf" width="100%" height="100%" data="'+J+'"><a href="'+J+'" style="display:block;position:absolute;top:48%;width:100%;text-align:center">'+l(M).html()+"</a></object>";D.html(N);_process_inline();break;case"ajax":C=false;l.fancybox.showActivity();y.ajax.win=y.ajax.success;k=l.ajax(l.extend({},y.ajax,{url:J,data:y.ajax.data||{},error:function(P,R,Q){if(P.status>0){_error(Q)}},success:function(Q,S,P){var R=typeof P=="object"?P:k;if(R.status==200){if(typeof y.ajax.win=="function"){K=y.ajax.win(J,Q,S,P);if(K===false){l.fancybox.hideActivity();return}else{if(typeof K=="string"||typeof K=="object"){Q=K}}}if(Q.indexOf("<!DOCTYPE")>-1||Q.indexOf("<html")>-1||Q.indexOf("<body")>-1){_error("Unexpected response.")}else{D.html(Q);_process_inline()}}}}));break;case"iframe":l.fancybox.showActivity();_show();break}},_process_inline=function(){var J=y.width,K=y.height,L=l(window).width()==0?window.innerWidth:l(window).width(),I=l(window).height()==0?window.innerHeight:l(window).height();if(J.toString().indexOf("%")>-1){J=parseInt((L-(y.margin*2))*parseFloat(J)/100,10)+"px"}else{J=J=="auto"?"auto":J+"px"}if(K.toString().indexOf("%")>-1){K=parseInt((I-(y.margin*2))*parseFloat(K)/100,10)+"px"}else{K=K=="auto"?"auto":K+"px"}D.wrapInner('<div style="width:'+J+";height:"+K+";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 J,I;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();J=r.position(),t={top:J.top,left:J.left,width:r.width(),height:r.height()};I=(t.width==n.width&&t.height==n.height);z.fadeTo(a.changeFade,0.3,function(){var K=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:a.autoDimensions?"auto":n.height-q-a.padding*2});if(I){K()}else{f.prop=0;l(f).animate({prop:1},{duration:a.changeSpeed,easing:a.easingChange,step:_draw,complete:K})}});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){H.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(I){if(I&&I.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">'+I+'</td><td id="fancybox-title-float-right"></td></tr></table>'}return'<div id="fancybox-title-'+a.titlePosition+'">'+I+"</div>"}return false},_process_title=function(){b=a.title||"";q=0;H.empty().removeAttr("style").removeClass();if(a.titleShow===false){H.hide();return}b=l.isFunction(a.titleFormat)?a.titleFormat(b,e,d,a):_format_title(b);if(!b||b===""){H.hide();return}H.addClass("fancybox-title-"+a.titlePosition).html(b).appendTo("body").show();switch(a.titlePosition){case"inside":H.css({width:n.width-(a.padding*2),marginLeft:a.padding,marginRight:a.padding}).appendTo(c);q=H.outerHeight(true);n.height+=q;break;case"over":H.css({marginLeft:a.padding,width:n.width-(a.padding*2),bottom:a.padding}).appendTo(c);break;case"float":H.css("left",parseInt((H.width()-n.width)/2,10)*-1).appendTo(c);break;default:H.css({width:n.width-(a.padding*2),paddingLeft:a.padding,paddingRight:a.padding}).appendTo(r);break}H.hide()},_set_navigation=function(){if(a.enableEscapeButton||a.enableKeyboardNav){l(document).on("keydown.fb",function(I){if(I.keyCode==27&&a.enableEscapeButton){I.preventDefault();l.fancybox.close()}else{if((I.keyCode==37||I.keyCode==39)&&a.enableKeyboardNav&&I.target.tagName!=="INPUT"&&I.target.tagName!=="TEXTAREA"&&I.target.tagName!=="SELECT"){I.preventDefault();l.fancybox[I.keyCode==37?"prev":"next"]()}else{if((I.keyCode==9)&&a.enableKeyboardNav&&I.target.tagName!=="INPUT"&&I.target.tagName!=="TEXTAREA"&&I.target.tagName!=="SELECT"){I.preventDefault();l.fancybox[I.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(a.autoDimensions){z.css("height","auto")}r.css("height","auto");if(b&&b.length){H.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&&!s){l(window).on("scroll.fb",l.fancybox.center)}if(l.fn.mousewheel){r.on("mousewheel.fb",function(I,J){if(C){I.preventDefault()}else{if(a.type=="image"&&(l(I.target).outerHeight()==0||l(I.target).prop("scrollHeight")===l(I.target).outerHeight())){I.preventDefault();l.fancybox[J>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")+' allow="autoplay; encrypted-media" tabindex="999"></iframe>').appendTo(z).load(function(){l.fancybox.hideActivity()}).focus()}r.show();C=false;l.fancybox.center();a.onComplete(e,d,a);if(e.length>1){_preload_next();_preload_prev()}},_preload_next=function(){var I=typeof arguments[0]=="number"?arguments[0]:d+1;if(I>=e.length){if(a.cyclic){I=0}else{return}}if(I==d){a.enableKeyboardNav=false;r.off("mousewheel.fb");i.hide();return}if(_preload_image(I)){return}else{_preload_next(I+1)}},_preload_prev=function(){var I=typeof arguments[0]=="number"?arguments[0]:d-1;if(I<0){if(a.cyclic){I=e.length-1}else{return}}if(I==d){a.enableKeyboardNav=false;r.off("mousewheel.fb");v.hide();return}if(_preload_image(I)){return}else{_preload_prev(I-1)}},_preload_image=function(K){var J,I=e[K];if(typeof I!=="undefined"&&typeof I.href!=="undefined"&&I.href!==a.href&&(I.href.match(u)||l(I).hasClass("image"))){J=new Image();J.src=I.href;return true}else{return false}},_draw=function(J){var I={width:parseInt(t.width+(n.width-t.width)*J,10),height:parseInt(t.height+(n.height-t.height)*J,10),top:parseInt(t.top+(n.top-t.top)*J,10),left:parseInt(t.left+(n.left-t.left)*J,10)};if(typeof n.opacity!=="undefined"){I.opacity=J<0.5?0.5:J}r.css(I);z.css({width:I.width-a.padding*2,height:I.height-(q*J)-a.padding*2})},_get_viewport=function(){var I=!s&&window.innerWidth&&document.documentElement.clientWidth?Math.min(window.innerWidth,document.documentElement.clientWidth):window.innerWidth||document.documentElement.clientWidth||document.getElementsByTagName("body")[0].clientWidth,J=!s&&window.innerHeight&&document.documentElement.clientHeight?Math.min(window.innerHeight,document.documentElement.clientHeight):window.innerHeight||document.documentElement.clientHeight||document.getElementsByTagName("body")[0].clientHeight;return[I-(a.margin*2),J-(a.margin*2),l(document).scrollLeft()+a.margin,l(document).scrollTop()+a.margin]},_get_zoom_to=function(){var I=_get_viewport(),L={},J=a.padding*2,K;if(a.width.toString().indexOf("%")>-1){L.width=parseInt((I[0]*parseFloat(a.width))/100,10)}else{L.width=a.width+J}if(a.height.toString().indexOf("%")>-1){L.height=parseInt((I[1]*parseFloat(a.height))/100,10)}else{L.height=a.height+J}if(a.autoScale&&(L.width>I[0]||L.height>I[1])){if(a.keepRatio){K=a.width/a.height;if((L.width)>I[0]){L.width=I[0];L.height=parseInt(((L.width-J)/K)+J,10)}if((L.height)>I[1]){L.height=I[1];L.width=parseInt(((L.height-J)*K)+J,10)}}else{L.width=Math.min(L.width,I[0]);L.height=Math.min(L.height,I[1])}}L.top=parseInt(Math.max(I[3]-20,I[3]+((I[1]-L.height-40)*0.5)),10);L.left=parseInt(Math.max(I[2]-20,I[2]+((I[0]-L.width-40)*0.5)),10);return L},_get_obj_pos=function(I){var J=I.offset();J.top+=parseInt(I.css("paddingTop"),10)||0;J.left+=parseInt(I.css("paddingLeft"),10)||0;J.top+=parseInt(I.css("border-top-width"),10)||0;J.left+=parseInt(I.css("border-left-width"),10)||0;J.width=I.width();J.height=I.height();return J},_get_zoom_from=function(){var L=y.orig?l(y.orig):false,K={},J,I;if(L&&L.length){J=_get_obj_pos(L);K={width:J.width+(a.padding*2),height:J.height+(a.padding*2),top:J.top-a.padding-20,left:J.left-a.padding-20}}else{I=_get_viewport();K={width:a.padding*2,height:a.padding*2,top:parseInt((I[3]+I[1])*0.5,10),left:parseInt((I[2]+I[0])*0.5,10)}}return K},_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(I){if(!l(this).length){return this}l(this).data("fancybox",l.extend({},I,(l.metadata?l(this).metadata():{}))).off("click.fb").on("click.fb",function(K){K.preventDefault();if(C){return}C=true;l(this).blur();h=[];g=0;var J=l(this).attr("rel")||"";if(J==""||J.replace(/alternate|external|help|license|nofollow|noreferrer|noopener|\s+/gi,"")==""){h.push(this)}else{h=l('a[rel="'+J+'"], area[rel="'+J+'"]');g=h.index(this)}_start();return});return this};l.fancybox=function(L){var K;if(C){return}C=true;K=typeof arguments[1]!=="undefined"?arguments[1]:{};h=[];g=parseInt(K.index,10)||0;if(l.isArray(L)){for(var J=0,I=L.length;J<I;J++){if(typeof L[J]=="object"){l(L[J]).data("fancybox",l.extend({},K,L[J]))}else{L[J]=l({}).data("fancybox",l.extend({content:L[J]},K))}}h=jQuery.merge(h,L)}else{if(typeof L=="object"){l(L).data("fancybox",l.extend({},K,L))}else{L=l({}).data("fancybox",l.extend({content:L},K))}h.push(L)}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(){var I,J=typeof arguments[0]=="number"?arguments[0]:d+1;if(J>=e.length){if(a.cyclic){J=0}else{return}}I=e[J];if(J!=d&&typeof I!=="undefined"&&typeof I.href!=="undefined"&&I.href===a.href){l.fancybox.next(J+1)}else{l.fancybox.pos(J)}return};l.fancybox.prev=function(){var I,J=typeof arguments[0]=="number"?arguments[0]:d-1;if(J<0){if(a.cyclic){J=e.length-1}else{return}}I=e[J];if(J!=d&&typeof I!=="undefined"&&typeof I.href!=="undefined"&&I.href===a.href){l.fancybox.prev(J-1)}else{l.fancybox.pos(J)}return};l.fancybox.pos=function(I){if(C){return}I=parseInt(I);h=e;if(I>-1&&I<e.length){g=I;_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"){H.empty()}r.stop();function I(){B.fadeOut("fast");H.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 J=r.position();n={top:J.top,left:J.left,width:r.width(),height:r.height()};if(a.opacity){n.opacity=1}H.empty().hide();f.prop=1;l(f).animate({prop:0},{duration:a.speedOut,easing:a.easingOut,step:_draw,complete:I})}else{r.fadeOut(a.transitionOut=="none"?0:a.speedOut,I)}};l.fancybox.resize=function(){var I;clearTimeout(F);F=setTimeout(function(){var J=function(){if(y.autoDimensions){z.css("height","auto")}r.css("height","auto");if(b&&b.length){H.show()}C=false;l.fancybox.center(true)};if(B.is(":visible")){B.css("height",l(document).height())}I=r.position(),t={top:I.top,left:I.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:J})},500)};l.fancybox.center=function(){var I,J;if(C){return}J=arguments[0]===true?1:0;I=_get_viewport();if(!J&&(r.width()>I[0]||r.height()>I[1])){return}r.stop().animate({top:parseInt(Math.max(I[3]-20,I[3]+((I[1]-z.height()-40)*0.5)-a.padding)),left:parseInt(Math.max(I[2]-20,I[2]+((I[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>'),H=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(I){I.preventDefault();l.fancybox.prev()});i.click(function(I){I.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:false,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);
|
1 |
+
(function(l){var D,j,B,r,c,z,w,H,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,G=/[^\.]\.(pdf)\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(I){if(false===y.onError(h,g,y)){l.fancybox.hideActivity();C=false;return}if(typeof I==="undefined"){I="Please try again later."}y.titleShow=false;y.width="auto";y.height="auto";D.html('<p id="fancybox-error">The requested content cannot be loaded.<br />'+I+"</p>");_process_inline()},_start=function(){var M=h[g],J,L,O,N,I,K;_abort();y=l.extend({},l.fn.fancybox.defaults,(typeof l(M).data("fancybox")=="undefined"?y:l(M).data("fancybox")));if(document.documentElement.clientWidth<y.minViewportWidth){C=false;return}if("object"===typeof arguments[0]&&"click"===arguments[0].type){arguments[0].preventDefault()}K=y.onStart(h,g,y);if(K===false){C=false;return}else{if(typeof K=="object"){y=l.extend(y,K)}}O=y.title||(M.nodeName?l(M).attr("title"):M.title)||"";if(M.nodeName&&!y.orig){y.orig=l(M).find("img:first").length?l(M).find("img:first"):l(M)}if(O===""&&y.orig){O=y.orig.attr("title")||(y.titleFromAlt?y.orig.attr("alt"):"")}J=y.href||(M.nodeName?l(M).attr("href"):M.href)||null;if((/^(?:javascript)/i).test(J)||J=="#"){J=null}if(y.type){L=y.type;if(!J){J=y.content}}else{if(y.content){L="html"}else{if(l(M).hasClass("iframe")){L="iframe"}else{if(J){if(J.match(u)||l(M).hasClass("image")){L="image"}else{if(J.match(p)){L="swf"}else{if(J.match(A)){L="svg"}else{if(J.match(G)){L="pdf"}else{if(J.indexOf("#")===0){L="inline"}else{L="ajax"}}}}}}}}}if(!L){_error("No content type found.");return}if(l(M).hasClass("modal")){y.modal=true}if(L=="inline"){M=J.substr(J.indexOf("#"));L=l(M).length>0?"inline":"ajax"}y.type=L;y.href=J;y.title=O;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(L){case"html":D.html(y.content);_process_inline();break;case"inline":if(l(M).parent().is("#fancybox-content")===true){C=false;return}l('<div class="fancybox-inline-tmp" />').hide().insertBefore(l(M)).on("fancybox-cleanup",function(){l(this).replaceWith(z.children("div:first"))}).on("fancybox-cancel",function(){l(this).replaceWith(D.children("div:first"))});l(M).appendTo(D);_process_inline();break;case"image":y.keepRatio=true;C=false;l.fancybox.showActivity();E=new Image();E.onerror=function(){_error("No image found.")};E.onload=function(){C=true;E.onerror=E.onload=null;_process_image()};E.src=J;break;case"swf":y.scrolling="no";y.keepRatio=true;N='<object type="application/x-shockwave-flash" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+y.width+'" height="'+y.height+'"><param name="movie" value="'+J+'"></param>';I="";l.each(y.swf,function(P,Q){N+='<param name="'+P+'" value="'+Q+'"></param>';I+=" "+P+'="'+Q+'"'});N+='<embed src="'+J+'" type="application/x-shockwave-flash" width="'+y.width+'" height="'+y.height+'"'+I+"></embed></object>";D.html(N);_process_inline();break;case"svg":y.scrolling="no";y.keepRatio=true;N='<object type="image/svg+xml" width="'+y.width+'" height="'+y.height+'" data="'+J+'"></object>';D.html(N);_process_inline();break;case"pdf":y.scrolling="no";N='<object type="application/pdf" width="100%" height="100%" data="'+J+'"><a href="'+J+'" style="display:block;position:absolute;top:48%;width:100%;text-align:center">'+l(M).html()+"</a></object>";D.html(N);_process_inline();break;case"ajax":C=false;l.fancybox.showActivity();y.ajax.win=y.ajax.success;k=l.ajax(l.extend({},y.ajax,{url:J,data:y.ajax.data||{},error:function(P,R,Q){if(P.status>0){_error(Q)}},success:function(Q,S,P){var R=typeof P=="object"?P:k;if(R.status==200){if(typeof y.ajax.win=="function"){K=y.ajax.win(J,Q,S,P);if(K===false){l.fancybox.hideActivity();return}else{if(typeof K=="string"||typeof K=="object"){Q=K}}}if(Q.indexOf("<!DOCTYPE")>-1||Q.indexOf("<html")>-1||Q.indexOf("<body")>-1){_error("Unexpected response.")}else{D.html(Q);_process_inline()}}}}));break;case"iframe":l.fancybox.showActivity();_show();break}},_process_inline=function(){var J=y.width,K=y.height,L=l(window).width()==0?window.innerWidth:l(window).width(),I=l(window).height()==0?window.innerHeight:l(window).height();if(J.toString().indexOf("%")>-1){J=parseInt((L-(y.margin*2))*parseFloat(J)/100,10)+"px"}else{J=J=="auto"?"auto":J+"px"}if(K.toString().indexOf("%")>-1){K=parseInt((I-(y.margin*2))*parseFloat(K)/100,10)+"px"}else{K=K=="auto"?"auto":K+"px"}D.wrapInner('<div style="width:'+J+";height:"+K+";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 J,I;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();J=r.position(),t={top:J.top,left:J.left,width:r.width(),height:r.height()};I=(t.width==n.width&&t.height==n.height);z.fadeTo(a.changeFade,0.3,function(){var K=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:a.autoDimensions?"auto":n.height-q-a.padding*2});if(I){K()}else{f.prop=0;l(f).animate({prop:1},{duration:a.changeSpeed,easing:a.easingChange,step:_draw,complete:K})}});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){H.show()}z.css({width:n.width-a.padding*2,height:a.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(I){if(I&&I.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">'+I+'</td><td id="fancybox-title-float-right"></td></tr></table>'}return'<div id="fancybox-title-'+a.titlePosition+'">'+I+"</div>"}return false},_process_title=function(){b=a.title||"";q=0;H.empty().removeAttr("style").removeClass();if(a.titleShow===false){H.hide();return}b=l.isFunction(a.titleFormat)?a.titleFormat(b,e,d,a):_format_title(b);if(!b||b===""){H.hide();return}H.addClass("fancybox-title-"+a.titlePosition).html(b).appendTo("body").show();switch(a.titlePosition){case"inside":H.css({width:n.width-(a.padding*2),marginLeft:a.padding,marginRight:a.padding}).appendTo(c);q=H.outerHeight(true);n.height+=q;break;case"over":H.css({marginLeft:a.padding,width:n.width-(a.padding*2),bottom:a.padding}).appendTo(c);break;case"float":H.css("left",parseInt((H.width()-n.width)/2,10)*-1).appendTo(c);break;default:H.css({width:n.width-(a.padding*2),paddingLeft:a.padding,paddingRight:a.padding}).appendTo(r);break}H.hide()},_set_navigation=function(){if(a.enableEscapeButton||a.enableKeyboardNav){l(document).on("keydown.fb",function(I){if(I.keyCode==27&&a.enableEscapeButton){I.preventDefault();l.fancybox.close()}else{if((I.keyCode==37||I.keyCode==39)&&a.enableKeyboardNav&&I.target.tagName!=="INPUT"&&I.target.tagName!=="TEXTAREA"&&I.target.tagName!=="SELECT"){I.preventDefault();l.fancybox[I.keyCode==37?"prev":"next"]()}else{if((I.keyCode==9)&&a.enableKeyboardNav&&I.target.tagName!=="INPUT"&&I.target.tagName!=="TEXTAREA"&&I.target.tagName!=="SELECT"){I.preventDefault();l.fancybox[I.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(a.autoDimensions){z.css("height","auto")}r.css("height","auto");if(b&&b.length){H.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&&!s){l(window).on("scroll.fb",l.fancybox.center)}if(l.fn.mousewheel){r.on("mousewheel.fb",function(I,J){if(C){I.preventDefault()}else{if(a.type=="image"&&(l(I.target).outerHeight()==0||l(I.target).prop("scrollHeight")===l(I.target).outerHeight())){I.preventDefault();l.fancybox[J>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:'+(a.scrolling=="auto"?"auto":(a.scrolling=="yes"?"scroll":"hidden"))+'" src="'+a.href+'"'+(false===a.allowfullscreen?"":" allowfullscreen")+' allow="autoplay; encrypted-media" tabindex="999"></iframe>').appendTo(z).load(function(){l.fancybox.hideActivity()}).focus()}r.show();C=false;l.fancybox.center();a.onComplete(e,d,a);if(e.length>1){_preload_next();_preload_prev()}},_preload_next=function(){var I=typeof arguments[0]=="number"?arguments[0]:d+1;if(I>=e.length){if(a.cyclic){I=0}else{return}}if(I==d){a.enableKeyboardNav=false;r.off("mousewheel.fb");i.hide();return}if(_preload_image(I)){return}else{_preload_next(I+1)}},_preload_prev=function(){var I=typeof arguments[0]=="number"?arguments[0]:d-1;if(I<0){if(a.cyclic){I=e.length-1}else{return}}if(I==d){a.enableKeyboardNav=false;r.off("mousewheel.fb");v.hide();return}if(_preload_image(I)){return}else{_preload_prev(I-1)}},_preload_image=function(K){var J,I=e[K];if(typeof I!=="undefined"&&typeof I.href!=="undefined"&&I.href!==a.href&&(I.href.match(u)||l(I).hasClass("image"))){J=new Image();J.src=I.href;return true}else{return false}},_draw=function(J){var I={width:parseInt(t.width+(n.width-t.width)*J,10),height:parseInt(t.height+(n.height-t.height)*J,10),top:parseInt(t.top+(n.top-t.top)*J,10),left:parseInt(t.left+(n.left-t.left)*J,10)};if(typeof n.opacity!=="undefined"){I.opacity=J<0.5?0.5:J}r.css(I);z.css({width:I.width-a.padding*2,height:I.height-(q*J)-a.padding*2})},_get_viewport=function(){var I=!s&&window.innerWidth&&document.documentElement.clientWidth?Math.min(window.innerWidth,document.documentElement.clientWidth):window.innerWidth||document.documentElement.clientWidth||document.getElementsByTagName("body")[0].clientWidth,J=!s&&window.innerHeight&&document.documentElement.clientHeight?Math.min(window.innerHeight,document.documentElement.clientHeight):window.innerHeight||document.documentElement.clientHeight||document.getElementsByTagName("body")[0].clientHeight,K;K=arguments[0]===true?0:a.margin;return[I-(K*2),J-(K*2),l(document).scrollLeft()+K,l(document).scrollTop()+K]},_get_zoom_to=function(){var I=_get_viewport(),L={},J=a.padding*2,K;if(a.width.toString().indexOf("%")>-1){L.width=parseInt((I[0]*parseFloat(a.width))/100,10)}else{L.width=a.width+J}if(a.height.toString().indexOf("%")>-1){L.height=parseInt((I[1]*parseFloat(a.height))/100,10)}else{L.height=a.height+J}if(a.autoScale&&(L.width>I[0]||L.height>I[1])){if(a.keepRatio){K=a.width/a.height;if((L.width)>I[0]){L.width=I[0];L.height=parseInt(((L.width-J)/K)+J,10)}if((L.height)>I[1]){L.height=I[1];L.width=parseInt(((L.height-J)*K)+J,10)}}else{L.width=Math.min(L.width,I[0]);L.height=Math.min(L.height,I[1])}}L.top=parseInt(Math.max(I[3]-20,I[3]+((I[1]-L.height-40)*0.5)),10);L.left=parseInt(Math.max(I[2]-20,I[2]+((I[0]-L.width-40)*0.5)),10);return L},_get_obj_pos=function(I){var J=I.offset();J.top+=parseInt(I.css("paddingTop"),10)||0;J.left+=parseInt(I.css("paddingLeft"),10)||0;J.top+=parseInt(I.css("border-top-width"),10)||0;J.left+=parseInt(I.css("border-left-width"),10)||0;J.width=I.width();J.height=I.height();return J},_get_zoom_from=function(){var L=y.orig?l(y.orig):false,K={},J,I;if(L&&L.length){J=_get_obj_pos(L);K={width:J.width+(a.padding*2),height:J.height+(a.padding*2),top:J.top-a.padding-20,left:J.left-a.padding-20}}else{I=_get_viewport();K={width:a.padding*2,height:a.padding*2,top:parseInt((I[3]+I[1])*0.5,10),left:parseInt((I[2]+I[0])*0.5,10)}}return K},_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(I){if(!l(this).length){return this}l(this).data("fancybox",l.extend({},I,(l.metadata?l(this).metadata():{}))).off("click.fb").on("click.fb",function(K){if(C){return}C=true;l(this).blur();h=[];g=0;var J=l(this).attr("rel")||"";if(J==""||J.replace(/alternate|external|help|license|nofollow|noreferrer|noopener|\s+/gi,"")==""){h.push(this)}else{h=l('a[rel="'+J+'"], area[rel="'+J+'"]');g=h.index(this)}_start(K);return});return this};l.fancybox=function(L){var K;if(C){return}C=true;K=typeof arguments[1]!=="undefined"?arguments[1]:{};h=[];g=parseInt(K.index,10)||0;if(l.isArray(L)){for(var J=0,I=L.length;J<I;J++){if(typeof L[J]=="object"){l(L[J]).data("fancybox",l.extend({},K,L[J]))}else{L[J]=l({}).data("fancybox",l.extend({content:L[J]},K))}}h=jQuery.merge(h,L)}else{if(typeof L=="object"){l(L).data("fancybox",l.extend({},K,L))}else{L=l({}).data("fancybox",l.extend({content:L},K))}h.push(L)}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(){var I,J=typeof arguments[0]=="number"?arguments[0]:d+1;if(J>=e.length){if(a.cyclic){J=0}else{return}}I=e[J];if(J!=d&&typeof I!=="undefined"&&typeof I.href!=="undefined"&&I.href===a.href){l.fancybox.next(J+1)}else{l.fancybox.pos(J)}return};l.fancybox.prev=function(){var I,J=typeof arguments[0]=="number"?arguments[0]:d-1;if(J<0){if(a.cyclic){J=e.length-1}else{return}}I=e[J];if(J!=d&&typeof I!=="undefined"&&typeof I.href!=="undefined"&&I.href===a.href){l.fancybox.prev(J-1)}else{l.fancybox.pos(J)}return};l.fancybox.pos=function(I){if(C){return}I=parseInt(I);h=e;if(I>-1&&I<e.length){g=I;_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"){H.empty()}r.stop();function I(){B.fadeOut("fast");H.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 J=r.position();n={top:J.top,left:J.left,width:r.width(),height:r.height()};if(a.opacity){n.opacity=1}H.empty().hide();f.prop=1;l(f).animate({prop:0},{duration:a.speedOut,easing:a.easingOut,step:_draw,complete:I})}else{r.fadeOut(a.transitionOut=="none"?0:a.speedOut,I)}};l.fancybox.resize=function(){var I;clearTimeout(F);F=setTimeout(function(){var J=function(){if(y.autoDimensions){z.css("height","auto")}r.css("height","auto");if(b&&b.length){H.show()}C=false;l.fancybox.center(true)};if(B.is(":visible")){B.css("height",l(document).height())}I=r.position(),t={top:I.top,left:I.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:J})},500)};l.fancybox.center=function(){var I,J;if(C){return}J=arguments[0]===true?1:0;I=_get_viewport(true);if(!J&&((r.width()+40)>I[0]||(r.height()+40)>I[1])){return}r.stop().animate({top:parseInt(Math.max(I[3]-20,I[3]+((I[1]-z.height()-40)*0.5)-a.padding)),left:parseInt(Math.max(I[2]-20,I[2]+((I[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>'),H=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(I){I.preventDefault();l.fancybox.prev()});i.click(function(I){I.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:false,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
@@ -29,27 +29,29 @@ class easyFancyBox_Admin extends easyFancyBox {
|
|
29 |
|
30 |
switch($value['input']) {
|
31 |
case 'deep':
|
32 |
-
|
33 |
-
|
34 |
-
|
|
|
35 |
case 'multiple':
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
|
|
46 |
default:
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
}
|
54 |
}
|
55 |
}
|
29 |
|
30 |
switch($value['input']) {
|
31 |
case 'deep':
|
32 |
+
// go deeper by looping back on itself
|
33 |
+
self::register_settings($value['options']);
|
34 |
+
break;
|
35 |
+
|
36 |
case 'multiple':
|
37 |
+
add_settings_field( 'fancybox_'.$key, '<a name="'.$value['title'].'"></a>'.$value['title'], array(__CLASS__, 'settings_fields'), 'media', 'fancybox_section', $value);
|
38 |
+
foreach ( $value['options'] as $_value ) {
|
39 |
+
if ( !isset($_value['sanitize_callback']) )
|
40 |
+
$sanitize_callback = '';
|
41 |
+
else
|
42 |
+
$sanitize_callback = array(__CLASS__, $_value['sanitize_callback']);
|
43 |
+
if ( isset($_value['id']) )
|
44 |
+
register_setting( 'media', $_value['id'], $sanitize_callback );
|
45 |
+
}
|
46 |
+
break;
|
47 |
+
|
48 |
default:
|
49 |
+
if ( !isset($value['sanitize_callback']) )
|
50 |
+
$sanitize_callback = '';
|
51 |
+
else
|
52 |
+
$sanitize_callback = array(__CLASS__, $value['sanitize_callback']);
|
53 |
+
if ( isset($value['id']) )
|
54 |
+
register_setting( 'media', 'fancybox_'.$key, $sanitize_callback );
|
55 |
}
|
56 |
}
|
57 |
}
|
inc/class-easyfancybox-options.php
DELETED
@@ -1,1603 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Easy FancyBox Options Class
|
4 |
-
*/
|
5 |
-
|
6 |
-
class easyFancyBox_Options extends easyFancyBox {
|
7 |
-
|
8 |
-
public static function load_defaults() {
|
9 |
-
|
10 |
-
$url = "https://premium.status301.net/downloads/easy-fancybox-pro/";
|
11 |
-
|
12 |
-
if ( empty(parent::$options) )
|
13 |
-
parent::$options = array (
|
14 |
-
|
15 |
-
'Global' => array(
|
16 |
-
'title' => __('Global settings','easy-fancybox'),
|
17 |
-
'input' => 'deep',
|
18 |
-
'hide' => true,
|
19 |
-
'options' => array(
|
20 |
-
'Enable' => array (
|
21 |
-
'title' => __('Media','easy-fancybox'),
|
22 |
-
'input' => 'multiple',
|
23 |
-
'hide' => true,
|
24 |
-
'options' => array(
|
25 |
-
'p1' => array (
|
26 |
-
'hide' => true,
|
27 |
-
'description' => __('Enable FancyBox for','easy-fancybox') . '<br />'
|
28 |
-
),
|
29 |
-
'IMG' => array (
|
30 |
-
'id' => 'fancybox_enableImg',
|
31 |
-
'input' => 'checkbox',
|
32 |
-
'hide' => true,
|
33 |
-
'default' => ( function_exists('is_plugin_active_for_network') && is_plugin_active_for_network( parent::$plugin_basename ) ) ? '' : '1',
|
34 |
-
'description' => '<strong>' . __('Images','easy-fancybox') . '</strong>'
|
35 |
-
),
|
36 |
-
'Inline' => array (
|
37 |
-
'id' => 'fancybox_enableInline',
|
38 |
-
'input' => 'checkbox',
|
39 |
-
'hide' => true,
|
40 |
-
'default' => '',
|
41 |
-
'description' => '<strong>' . __('Inline content','easy-fancybox') . '</strong>'
|
42 |
-
),
|
43 |
-
'PDF' => array (
|
44 |
-
'id' => 'fancybox_enablePDF',
|
45 |
-
'input' => 'checkbox',
|
46 |
-
'hide' => true,
|
47 |
-
'default' => '',
|
48 |
-
'description' => '<strong>' . __('PDF','easy-fancybox') . '</strong>'
|
49 |
-
),
|
50 |
-
'SWF' => array (
|
51 |
-
'id' => 'fancybox_enableSWF',
|
52 |
-
'input' => 'checkbox',
|
53 |
-
'hide' => true,
|
54 |
-
'default' => '',
|
55 |
-
'description' => '<strong>' . __('SWF','easy-fancybox') . '</strong>'
|
56 |
-
),
|
57 |
-
'SVG' => array (
|
58 |
-
'id' => 'fancybox_enableSVG',
|
59 |
-
'input' => 'checkbox',
|
60 |
-
'hide' => true,
|
61 |
-
'default' => '',
|
62 |
-
'description' => '<strong>' . __('SVG','easy-fancybox') . '</strong>'
|
63 |
-
),
|
64 |
-
'YouTube' => array (
|
65 |
-
'id' => 'fancybox_enableYoutube',
|
66 |
-
'input' => 'checkbox',
|
67 |
-
'hide' => true,
|
68 |
-
'default' => '',
|
69 |
-
'description' => '<strong>' . __('YouTube','easy-fancybox') . '</strong>'
|
70 |
-
),
|
71 |
-
'Vimeo' => array (
|
72 |
-
'id' => 'fancybox_enableVimeo',
|
73 |
-
'input' => 'checkbox',
|
74 |
-
'hide' => true,
|
75 |
-
'default' => '',
|
76 |
-
'description' => '<strong>' . __('Vimeo','easy-fancybox') . '</strong>'
|
77 |
-
),
|
78 |
-
'Dailymotion' => array (
|
79 |
-
'id' => 'fancybox_enableDailymotion',
|
80 |
-
'input' => 'checkbox',
|
81 |
-
'hide' => true,
|
82 |
-
'default' => '',
|
83 |
-
'description' => '<strong>' . __('Dailymotion','easy-fancybox') . '</strong>'
|
84 |
-
),
|
85 |
-
'iFrame' => array (
|
86 |
-
'id' => 'fancybox_enableiFrame',
|
87 |
-
'input' => 'checkbox',
|
88 |
-
'hide' => true,
|
89 |
-
'default' => '',
|
90 |
-
'description' => '<strong>' . __('iFrames','easy-fancybox') . '</strong>'
|
91 |
-
)
|
92 |
-
),
|
93 |
-
'description' => '<a href="'.$url.'"><strong><em>' . __('For advanced options and support, please get the Easy FancyBox - Pro extension.','easy-fancybox') . '</strong></a>'
|
94 |
-
),
|
95 |
-
'Overlay' => array (
|
96 |
-
'title' => __('Overlay','easy-fancybox'),
|
97 |
-
'input' => 'multiple',
|
98 |
-
'hide' => true,
|
99 |
-
'options' => array(
|
100 |
-
'overlayShow' => array (
|
101 |
-
'id' => 'fancybox_overlayShow',
|
102 |
-
'input' => 'checkbox',
|
103 |
-
'noquotes' => true,
|
104 |
-
'default' => '1',
|
105 |
-
'description' => __('Show the overlay around content opened in FancyBox.','easy-fancybox')
|
106 |
-
),
|
107 |
-
'hideOnOverlayClick' => array (
|
108 |
-
'id' => 'fancybox_hideOnOverlayClick',
|
109 |
-
'input' => 'checkbox',
|
110 |
-
'noquotes' => true,
|
111 |
-
'default' => '1',
|
112 |
-
'description' => __('Close FancyBox when overlay is clicked.','easy-fancybox')
|
113 |
-
),
|
114 |
-
'overlayOpacity' => array (
|
115 |
-
'id' => 'fancybox_overlayOpacity',
|
116 |
-
'title' => __('Opacity','easy-fancybox'),
|
117 |
-
'label_for' => 'fancybox_overlayOpacity',
|
118 |
-
'input' => 'number',
|
119 |
-
'step' => '0.1',
|
120 |
-
'min' => '0',
|
121 |
-
'max' => '1',
|
122 |
-
'class' => 'small-text',
|
123 |
-
'default' => '',
|
124 |
-
'description' => __('Value between 0 and 1. ','easy-fancybox') . ' <em>' . __('Default:','easy-fancybox') . ' 0.7</em><br />'
|
125 |
-
),
|
126 |
-
'overlayColor' => array (
|
127 |
-
'id' => 'fancybox_overlayColor',
|
128 |
-
'title' => __('Color','easy-fancybox'),
|
129 |
-
'label_for' => 'fancybox_overlayColor',
|
130 |
-
'input' => 'text',
|
131 |
-
'sanitize_callback' => 'colorval',
|
132 |
-
'class' => 'small-text',
|
133 |
-
'default' => '',
|
134 |
-
'description' => __('Enter an HTML color value.','easy-fancybox') . ' <em>' . __('Default:','easy-fancybox') . ' #777</em><br />'
|
135 |
-
),
|
136 |
-
'overlaySpotlight' => array (
|
137 |
-
'id' => 'fancybox_overlaySpotlight',
|
138 |
-
'input' => 'checkbox',
|
139 |
-
'hide' => true,
|
140 |
-
'status' => get_option('fancybox_overlaySpotlight') ? '' : 'disabled',
|
141 |
-
'default' => '',
|
142 |
-
'description' => __('Spotlight effect','easy-fancybox') . ( get_option('fancybox_overlaySpotlight') ? '' : '. <em><a href="'.$url.'">' . __('Make available »','easy-fancybox') ) . '</a></em>'
|
143 |
-
)
|
144 |
-
)
|
145 |
-
),
|
146 |
-
'Window' => array (
|
147 |
-
'title' => __('Window','easy-fancybox'),
|
148 |
-
'input' => 'multiple',
|
149 |
-
'hide' => true,
|
150 |
-
'options' => array(
|
151 |
-
'p1' => array (
|
152 |
-
'hide' => true,
|
153 |
-
'description' => '<strong>' . __('Appearance','easy-fancybox') . '</strong><br />'
|
154 |
-
),
|
155 |
-
'showCloseButton' => array (
|
156 |
-
'id' => 'fancybox_showCloseButton',
|
157 |
-
'input' => 'checkbox',
|
158 |
-
'noquotes' => true,
|
159 |
-
'default' => '1',
|
160 |
-
'description' => __('Show the (X) close button','easy-fancybox')
|
161 |
-
),
|
162 |
-
'backgroundColor' => array (
|
163 |
-
'id' => 'fancybox_backgroundColor',
|
164 |
-
'hide' => true,
|
165 |
-
'title' => __('Background color','easy-fancybox'),
|
166 |
-
'label_for' => 'fancybox_backgroundColor',
|
167 |
-
'input' => 'text',
|
168 |
-
'sanitize_callback' => 'colorval',
|
169 |
-
'status' => 'disabled',
|
170 |
-
'class' => 'small-text',
|
171 |
-
'default' => '',
|
172 |
-
'description' => ''
|
173 |
-
),
|
174 |
-
'textColor' => array (
|
175 |
-
'id' => 'fancybox_textColor',
|
176 |
-
'hide' => true,
|
177 |
-
'title' => __('Text color','easy-fancybox'),
|
178 |
-
'label_for' => 'fancybox_textColor',
|
179 |
-
'input' => 'text',
|
180 |
-
'sanitize_callback' => 'colorval',
|
181 |
-
'status' => 'disabled',
|
182 |
-
'class' => 'small-text',
|
183 |
-
'default' => '',
|
184 |
-
'description' => '<em><a href="'.$url.'">' . __('Make available »','easy-fancybox') . '</a></em><br />'
|
185 |
-
),
|
186 |
-
'titleColor' => array (
|
187 |
-
'id' => 'fancybox_titleColor',
|
188 |
-
'hide' => true,
|
189 |
-
'title' => __('Title color','easy-fancybox'),
|
190 |
-
'label_for' => 'fancybox_titleColor',
|
191 |
-
'input' => 'text',
|
192 |
-
'sanitize_callback' => 'colorval',
|
193 |
-
'class' => 'small-text',
|
194 |
-
'default' => '',
|
195 |
-
'description' => ''
|
196 |
-
),
|
197 |
-
'paddingColor' => array (
|
198 |
-
'id' => 'fancybox_paddingColor',
|
199 |
-
'hide' => true,
|
200 |
-
'title' => __('Border color','easy-fancybox'),
|
201 |
-
'label_for' => 'fancybox_paddingColor',
|
202 |
-
'input' => 'text',
|
203 |
-
'sanitize_callback' => 'colorval',
|
204 |
-
'class' => 'small-text',
|
205 |
-
'default' => '',
|
206 |
-
'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 />'
|
207 |
-
),
|
208 |
-
'borderRadius' => array (
|
209 |
-
'id' => 'fancybox_borderRadius',
|
210 |
-
'hide' => true,
|
211 |
-
'title' => __('Border radius','easy-fancybox'),
|
212 |
-
'label_for' => 'fancybox_borderRadius',
|
213 |
-
'input' => 'number',
|
214 |
-
'step' => '1',
|
215 |
-
'min' => '0',
|
216 |
-
'max' => '99',
|
217 |
-
'sanitize_callback' => 'intval',
|
218 |
-
'status' => 'disabled',
|
219 |
-
'class' => 'small-text',
|
220 |
-
'default' => '',
|
221 |
-
'description' => '<em><a href="'.$url.'">' . __('Make available »','easy-fancybox') . '</a></em><br />'
|
222 |
-
),
|
223 |
-
|
224 |
-
'p11' => array (
|
225 |
-
'hide' => true,
|
226 |
-
'description' => '<br /><strong>' . __('Dimensions','easy-fancybox') . '</strong><br />'
|
227 |
-
),
|
228 |
-
'width' => array (
|
229 |
-
'id' => 'fancybox_width',
|
230 |
-
'title' => translate('Width'),
|
231 |
-
'label_for' => 'fancybox_width',
|
232 |
-
'input' => 'text',
|
233 |
-
'sanitize_callback' => 'intval',
|
234 |
-
'class' => 'small-text',
|
235 |
-
'default' => '',
|
236 |
-
'description' => ' '
|
237 |
-
),
|
238 |
-
'height' => array (
|
239 |
-
'id' => 'fancybox_height',
|
240 |
-
'title' => translate('Height'),
|
241 |
-
'label_for' => 'fancybox_height',
|
242 |
-
'input' => 'text',
|
243 |
-
'sanitize_callback' => 'intval',
|
244 |
-
'class' => 'small-text',
|
245 |
-
'default' => '',
|
246 |
-
'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 />'
|
247 |
-
),
|
248 |
-
'padding' => array (
|
249 |
-
'id' => 'fancybox_padding',
|
250 |
-
'title' => translate('Border'),
|
251 |
-
'label_for' => 'fancybox_padding',
|
252 |
-
'input' => 'number',
|
253 |
-
'step' => '1',
|
254 |
-
'min' => '0',
|
255 |
-
'max' => '100',
|
256 |
-
'sanitize_callback' => 'intval',
|
257 |
-
'class' => 'small-text',
|
258 |
-
'default' => '',
|
259 |
-
'description' => '<em>' . __('Default:','easy-fancybox') . ' 10</em><br />'
|
260 |
-
),
|
261 |
-
'margin' => array (
|
262 |
-
'id' => 'fancybox_margin',
|
263 |
-
'title' => __('Margin','easy-fancybox'),
|
264 |
-
'label_for' => 'fancybox_margin',
|
265 |
-
'input' => 'number',
|
266 |
-
'step' => '1',
|
267 |
-
'min' => '20',
|
268 |
-
'max' => '80',
|
269 |
-
'sanitize_callback' => 'intval',
|
270 |
-
'class' => 'small-text',
|
271 |
-
'default' => '20',
|
272 |
-
'description' => '<em>' . __('Default:','easy-fancybox') . ' 40</em><br />'
|
273 |
-
),
|
274 |
-
|
275 |
-
'p2' => array (
|
276 |
-
'hide' => true,
|
277 |
-
'description' => '<br /><strong>' . __('Behavior','easy-fancybox') . '</strong><br />'
|
278 |
-
),
|
279 |
-
'centerOnScroll' => array (
|
280 |
-
'id' => 'fancybox_centerOnScroll',
|
281 |
-
'input' => 'checkbox',
|
282 |
-
'noquotes' => true,
|
283 |
-
'default' => '',
|
284 |
-
'description' => __('Center while scrolling (disabled on touch devices)','easy-fancybox')
|
285 |
-
),
|
286 |
-
'enableEscapeButton' => array (
|
287 |
-
'id' => 'fancybox_enableEscapeButton',
|
288 |
-
'input' => 'checkbox',
|
289 |
-
'noquotes' => true,
|
290 |
-
'default' => '1',
|
291 |
-
'description' => __('Esc key stroke closes FancyBox','easy-fancybox')
|
292 |
-
),
|
293 |
-
'speedIn' => array (
|
294 |
-
'id' => 'fancybox_speedIn',
|
295 |
-
'title' => __('Opening speed','easy-fancybox'),
|
296 |
-
'label_for' => 'fancybox_speedIn',
|
297 |
-
'input' => 'number',
|
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 |
-
'mouseWheel' => array (
|
319 |
-
'id' => 'fancybox_mouseWheel',
|
320 |
-
'hide' => true,
|
321 |
-
'input' => 'checkbox',
|
322 |
-
'default' => '1',
|
323 |
-
'description' => __('Include the Mousewheel jQuery extension script to allow gallery browsing by mousewheel action.','easy-fancybox')
|
324 |
-
)
|
325 |
-
)
|
326 |
-
),
|
327 |
-
|
328 |
-
'Miscellaneous' => array (
|
329 |
-
'title' => __('Miscellaneous','easy-fancybox'),
|
330 |
-
'input' => 'multiple',
|
331 |
-
'hide' => true,
|
332 |
-
'options' => array(
|
333 |
-
'p0' => array (
|
334 |
-
'hide' => true,
|
335 |
-
'description' => '<strong>' . __('Auto popup','easy-fancybox') . '</strong><br />'
|
336 |
-
),
|
337 |
-
'autoClick' => array (
|
338 |
-
'id' => 'fancybox_autoClick',
|
339 |
-
'title' => __('Open on page load','easy-fancybox'),
|
340 |
-
'label_for' => 'fancybox_autoClick',
|
341 |
-
'hide' => true,
|
342 |
-
'input' => 'select',
|
343 |
-
'options' => array(
|
344 |
-
'' => translate('None'),
|
345 |
-
'1' => __('Link with ID "fancybox-auto"','easy-fancybox'),
|
346 |
-
),
|
347 |
-
'default' => '1',
|
348 |
-
'description' => '<em><a href="'.$url.'">' . __('More options »','easy-fancybox') . '</a></em><br />'
|
349 |
-
),
|
350 |
-
'delayClick' => array (
|
351 |
-
'id' => 'fancybox_delayClick',
|
352 |
-
'title' => __('Delay in milliseconds','easy-fancybox'),
|
353 |
-
'label_for' => 'fancybox_delayClick',
|
354 |
-
'hide' => true,
|
355 |
-
'input' => 'number',
|
356 |
-
'step' => '100',
|
357 |
-
'min' => '0',
|
358 |
-
'max' => '',
|
359 |
-
'sanitize_callback' => 'intval',
|
360 |
-
'class' => 'small-text',
|
361 |
-
'default' => '1000',
|
362 |
-
'description' => ' <em>' . __('Default:','easy-fancybox') . ' 1000</em><br />'
|
363 |
-
),
|
364 |
-
'jqCookie' => array (
|
365 |
-
'id' => '',
|
366 |
-
'title' => __('Hide popup after first visit?','easy-fancybox'),
|
367 |
-
'hide' => true,
|
368 |
-
'input' => 'select',
|
369 |
-
'status' => 'disabled',
|
370 |
-
'default' => '0',
|
371 |
-
'sanitize_callback' => 'intval',
|
372 |
-
'options' => array(
|
373 |
-
'0' => translate('No'),
|
374 |
-
'1' => __('1 Day','easy-fancybox'),
|
375 |
-
'7' => __('1 Week','easy-fancybox'),
|
376 |
-
'30' => __('1 Month','easy-fancybox'),
|
377 |
-
'365' => __('1 Year','easy-fancybox')
|
378 |
-
),
|
379 |
-
'description' => ' <em><a href="'.$url.'">' . __('Make available »','easy-fancybox') . '</a></em><br />'
|
380 |
-
),
|
381 |
-
'cookiePath' => array (
|
382 |
-
'id' => '',
|
383 |
-
'default' => '',
|
384 |
-
'hide' => true
|
385 |
-
),
|
386 |
-
'p1' => array (
|
387 |
-
'hide' => true,
|
388 |
-
'description' => '<br /><strong>' . __('Browser & device compatibility','easy-fancybox') . '</strong><br />'
|
389 |
-
),
|
390 |
-
'minViewportWidth' => array (
|
391 |
-
'id' => 'fancybox_minViewportWidth',
|
392 |
-
'title' => __('Minimum browser/device viewport width','easy-fancybox'),
|
393 |
-
'label_for' => 'fancybox_minViewportWidth',
|
394 |
-
'input' => 'number',
|
395 |
-
'step' => '1',
|
396 |
-
'min' => '320',
|
397 |
-
'max' => '900',
|
398 |
-
'sanitize_callback' => 'intval',
|
399 |
-
'class' => 'small-text',
|
400 |
-
'default' => '',
|
401 |
-
'description' => __('(leave empty to ignore)','easy-fancybox') . '<br/>'
|
402 |
-
),
|
403 |
-
/* 'forceNewtab' => array (
|
404 |
-
'id' => 'fancybox_forceNewtab',
|
405 |
-
'input' => 'checkbox',
|
406 |
-
'hide' => true,
|
407 |
-
'default' => '1',
|
408 |
-
'description' => __('Make media links open in a new tab when viewport falls below minimum width (above)','easy-fancybox')
|
409 |
-
),
|
410 |
-
*/
|
411 |
-
'compatIE8' => array (
|
412 |
-
'id' => 'fancybox_compatIE8',
|
413 |
-
'input' => 'checkbox',
|
414 |
-
'hide' => true,
|
415 |
-
'default' => '',
|
416 |
-
'description' => __('Include IE 8 compatibility style rules','easy-fancybox')
|
417 |
-
),
|
418 |
-
|
419 |
-
'p2' => array (
|
420 |
-
'hide' => true,
|
421 |
-
'description' => '<br /><strong>' . __('Theme & plugins compatibility','easy-fancybox') . '</strong><br />'
|
422 |
-
. __('Try to deactivate all conflicting light box scripts in your theme or other plugins. If this is not possible, try a higher script priority number which means scripts are added later, wich may allow them to override conflicting scripts. A lower priority number, excluding WordPress standard jQuery, or even moving the plugin scripts to the header may work in cases where there are blocking errors occuring in other script.','easy-fancybox') . '<br /><br />'
|
423 |
-
),
|
424 |
-
'scriptPriority' => array (
|
425 |
-
'id' => 'fancybox_scriptPriority',
|
426 |
-
'title' => __('FancyBox script priority','easy-fancybox'),
|
427 |
-
'label_for' => 'fancybox_scriptPriority',
|
428 |
-
'input' => 'number',
|
429 |
-
'step' => '1',
|
430 |
-
'min' => '-999',
|
431 |
-
'max' => '999',
|
432 |
-
'sanitize_callback' => 'intval',
|
433 |
-
'class' => 'small-text',
|
434 |
-
'default' => '10',
|
435 |
-
'description' => __('Default priority is 10.','easy-fancybox') . ' ' . __('Higher is later.','easy-fancybox') . '<br/>'
|
436 |
-
),
|
437 |
-
'noFooter' => array (
|
438 |
-
'id' => 'fancybox_noFooter',
|
439 |
-
'input' => 'checkbox',
|
440 |
-
'hide' => true,
|
441 |
-
'default' => '',
|
442 |
-
'description' => __('Move scripts from footer to theme head section (not recommended for site load times!)','easy-fancybox')
|
443 |
-
),
|
444 |
-
'nojQuery' => array (
|
445 |
-
'id' => 'fancybox_nojQuery',
|
446 |
-
'input' => 'checkbox',
|
447 |
-
'hide' => true,
|
448 |
-
'default' => '',
|
449 |
-
'description' => __('Do not include standard WordPress jQuery library (do this only if you are sure jQuery is included from another source!)','easy-fancybox')
|
450 |
-
),
|
451 |
-
'pre45Compat' => array (
|
452 |
-
'id' => 'fancybox_pre45Compat',
|
453 |
-
'input' => 'checkbox',
|
454 |
-
'hide' => true,
|
455 |
-
'default' => function_exists( 'wp_add_inline_script' ) ? '' : '1',
|
456 |
-
'description' => __('Do not use wp_add_inline_script/style functions (may solve issues with older script minification plugins)','easy-fancybox')
|
457 |
-
),
|
458 |
-
'p3' => array (
|
459 |
-
'hide' => true,
|
460 |
-
'description' => '<br /><strong>' . __('Advanced','easy-fancybox') . '</strong><br />'
|
461 |
-
),
|
462 |
-
'metaData' => array (
|
463 |
-
'id' => 'fancybox_metaData',
|
464 |
-
'hide' => true,
|
465 |
-
'input' => 'checkbox',
|
466 |
-
'status' => get_option('fancybox_metaData') ? '' : 'disabled',
|
467 |
-
'default' => '',
|
468 |
-
'description' => __('Include the Metadata jQuery extension script to allow passing custom parameters via link class.','easy-fancybox') . ( get_option('fancybox_metaData') ? '' : '. <em><a href="'.$url.'">' . __('Make available »','easy-fancybox') ) . '</a></em>'
|
469 |
-
)
|
470 |
-
)
|
471 |
-
)
|
472 |
-
)
|
473 |
-
),
|
474 |
-
|
475 |
-
'IMG' => array(
|
476 |
-
'title' => __('Images','easy-fancybox'),
|
477 |
-
'input' => 'multiple',
|
478 |
-
'options' => array(
|
479 |
-
'intro' => array (
|
480 |
-
'hide' => true,
|
481 |
-
'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 />'
|
482 |
-
),
|
483 |
-
'tag' => array (
|
484 |
-
'hide' => true,
|
485 |
-
'default' => 'a.fancybox,area.fancybox,li.fancybox a'
|
486 |
-
),
|
487 |
-
'class' => array (
|
488 |
-
'hide' => true,
|
489 |
-
'default' => 'fancybox image'
|
490 |
-
),
|
491 |
-
'autoAttribute' => array (
|
492 |
-
'id' => 'fancybox_autoAttribute',
|
493 |
-
'title' => __('Autodetect','easy-fancybox'),
|
494 |
-
'label_for' => 'fancybox_autoAttribute',
|
495 |
-
'input' => 'text',
|
496 |
-
'class' => 'regular-text',
|
497 |
-
'hide' => true,
|
498 |
-
'default' => '.jpg .jpeg .png .webp',
|
499 |
-
'selector' => 'href*=',
|
500 |
-
'description' => ' <em>' . __('Example:','easy-fancybox') . ' .jpg .jpeg .png .gif</em><br />'
|
501 |
-
),
|
502 |
-
'autoAttributeLimit' => array (
|
503 |
-
'id' => 'fancybox_autoAttributeLimit',
|
504 |
-
'title' => __('Apply to','easy-fancybox'),
|
505 |
-
'label_for' => 'fancybox_autoAttributeLimit',
|
506 |
-
'hide' => true,
|
507 |
-
'input' => 'select',
|
508 |
-
'options' => array(
|
509 |
-
'' => __('All image links', 'easy-fancybox')
|
510 |
-
),
|
511 |
-
'default' => '',
|
512 |
-
'description' => '<em><a href="'.$url.'">' . __('More options »','easy-fancybox') . '</a></em><br />'
|
513 |
-
),
|
514 |
-
'type' => array (
|
515 |
-
'id' => 'fancybox_classType',
|
516 |
-
'title' => __('Force FancyBox to treat all media linked with class="fancybox" as images?','easy-fancybox'),
|
517 |
-
'label_for' => 'fancybox_classType',
|
518 |
-
'input' => 'select',
|
519 |
-
'options' => array(
|
520 |
-
'image' => translate('Yes'),
|
521 |
-
'' => translate('No')
|
522 |
-
),
|
523 |
-
'default' => get_option('fancybox_enableInline') ? 'image' : '',
|
524 |
-
'description' => '<br/>'
|
525 |
-
),
|
526 |
-
'p2' => array (
|
527 |
-
'hide' => true,
|
528 |
-
'description' => '<br /><strong>' . __('Behavior','easy-fancybox') . '</strong><br />'
|
529 |
-
),
|
530 |
-
'transitionIn' => array (
|
531 |
-
'id' => 'fancybox_transitionIn',
|
532 |
-
'title' => __('Transition In','easy-fancybox'),
|
533 |
-
'label_for' => 'fancybox_transitionIn',
|
534 |
-
'input' => 'select',
|
535 |
-
'options' => array(
|
536 |
-
'none' => translate('None'),
|
537 |
-
'' => __('Fade','easy-fancybox'),
|
538 |
-
'elastic' => __('Elastic','easy-fancybox'),
|
539 |
-
),
|
540 |
-
'default' => 'elastic',
|
541 |
-
'description' => ' '
|
542 |
-
),
|
543 |
-
'easingIn' => array (
|
544 |
-
'id' => 'fancybox_easingIn',
|
545 |
-
'title' => __('Easing In','easy-fancybox'),
|
546 |
-
'label_for' => 'fancybox_easingIn',
|
547 |
-
'input' => 'select',
|
548 |
-
'options' => array(
|
549 |
-
'linear' => __('Linear','easy-fancybox'),
|
550 |
-
'' => __('Swing','easy-fancybox'),
|
551 |
-
'easeInBack' => __('easeInBack','easy-fancybox'),
|
552 |
-
'easeOutBack' => __('easeOutBack','easy-fancybox')
|
553 |
-
),
|
554 |
-
'default' => 'easeOutBack',
|
555 |
-
'description' => ' <em><a href="'.$url.'">' . __('More options »','easy-fancybox') . '</a></em><br />'
|
556 |
-
),
|
557 |
-
'transitionOut' => array (
|
558 |
-
'id' => 'fancybox_transitionOut',
|
559 |
-
'title' => __('Transition Out','easy-fancybox'),
|
560 |
-
'label_for' => 'fancybox_transitionOut',
|
561 |
-
'input' => 'select',
|
562 |
-
'options' => array(
|
563 |
-
'none' => translate('None'),
|
564 |
-
'' => __('Fade','easy-fancybox'),
|
565 |
-
'elastic' => __('Elastic','easy-fancybox'),
|
566 |
-
),
|
567 |
-
'default' => 'elastic',
|
568 |
-
'description' => ' '
|
569 |
-
),
|
570 |
-
'easingOut' => array (
|
571 |
-
'id' => 'fancybox_easingOut',
|
572 |
-
'title' => __('Easing Out','easy-fancybox'),
|
573 |
-
'label_for' => 'fancybox_easingOut',
|
574 |
-
'input' => 'select',
|
575 |
-
'options' => array(
|
576 |
-
'linear' => __('Linear','easy-fancybox'),
|
577 |
-
'' => __('Swing','easy-fancybox'),
|
578 |
-
'easeInBack' => __('easeInBack','easy-fancybox'),
|
579 |
-
'easeOutBack' => __('easeOutBack','easy-fancybox')
|
580 |
-
),
|
581 |
-
'default' => 'easeInBack',
|
582 |
-
'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 />'
|
583 |
-
),
|
584 |
-
'opacity' => array (
|
585 |
-
'id' => 'fancybox_opacity',
|
586 |
-
'input' => 'checkbox',
|
587 |
-
'noquotes' => true,
|
588 |
-
'default' => '',
|
589 |
-
'description' => __('Transparency fade during elastic transition. CAUTION: Use only when at least Transition In is set to Elastic!','easy-fancybox')
|
590 |
-
),
|
591 |
-
'hideOnContentClick' => array (
|
592 |
-
'id' => 'fancybox_hideOnContentClick',
|
593 |
-
'input' => 'checkbox',
|
594 |
-
'noquotes' => true,
|
595 |
-
'default' => '',
|
596 |
-
'description' => __('Close FancyBox when content is clicked','easy-fancybox')
|
597 |
-
),
|
598 |
-
'p1' => array (
|
599 |
-
'hide' => true,
|
600 |
-
'description' => '<br /><strong>' . __('Appearance','easy-fancybox') . '</strong><br />'
|
601 |
-
),
|
602 |
-
'titleShow' => array (
|
603 |
-
'id' => 'fancybox_titleShow',
|
604 |
-
'input' => 'checkbox',
|
605 |
-
'noquotes' => true,
|
606 |
-
'default' => '1',
|
607 |
-
'description' => __('Show title.','easy-fancybox') . ' ' . __('FancyBox will try to get a title from the link or thumbnail title attributes.','easy-fancybox')
|
608 |
-
),
|
609 |
-
'titlePosition' => array (
|
610 |
-
'id' => 'fancybox_titlePosition',
|
611 |
-
'title' => __('Title Position','easy-fancybox'),
|
612 |
-
'label_for' => 'fancybox_titlePosition',
|
613 |
-
'input' => 'select',
|
614 |
-
'options' => array(
|
615 |
-
'' => __('Float','easy-fancybox'),
|
616 |
-
'outside' => __('Outside','easy-fancybox'),
|
617 |
-
'inside' => __('Inside','easy-fancybox'),
|
618 |
-
'over' => __('Overlay','easy-fancybox')
|
619 |
-
),
|
620 |
-
'default' => 'over',
|
621 |
-
'description' => '<br />'
|
622 |
-
),
|
623 |
-
'titleFromAlt' => array (
|
624 |
-
'id' => 'fancybox_titleFromAlt',
|
625 |
-
'input' => 'checkbox',
|
626 |
-
'noquotes' => true,
|
627 |
-
'default' => '1',
|
628 |
-
'description' => __('Allow title from thumbnail alt attribute.','easy-fancybox')
|
629 |
-
),
|
630 |
-
'onStart' => array (
|
631 |
-
'id' => '',
|
632 |
-
'title' => __('Advanced','easy-fancybox'),
|
633 |
-
'input' => 'select',
|
634 |
-
'status' => 'disabled',
|
635 |
-
'options' => array(
|
636 |
-
'' => __('Hide/show title on mouse hover action','easy-fancybox')
|
637 |
-
),
|
638 |
-
'default' => '',
|
639 |
-
'description' => '<em><a href="'.$url.'">' . __('Make available »','easy-fancybox') . '</a></em><br />'
|
640 |
-
),
|
641 |
-
'p3' => array (
|
642 |
-
'hide' => true,
|
643 |
-
'description' => '<br /><strong>' . __('Gallery','easy-fancybox') . '</strong><br />'
|
644 |
-
),
|
645 |
-
'autoGallery' => array (
|
646 |
-
'id' => 'fancybox_autoGallery',
|
647 |
-
'title' => __('Autogallery','easy-fancybox'),
|
648 |
-
'label_for' => 'fancybox_autoGallery',
|
649 |
-
'hide' => true,
|
650 |
-
'input' => 'select',
|
651 |
-
'options' => array(
|
652 |
-
'' => translate('Disabled'),
|
653 |
-
'1' => __('WordPress galleries only','easy-fancybox'),
|
654 |
-
'2' => __('All in one gallery','easy-fancybox')
|
655 |
-
),
|
656 |
-
'default' => '1',
|
657 |
-
'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 />'
|
658 |
-
),
|
659 |
-
'showNavArrows' => array (
|
660 |
-
'id' => 'fancybox_showNavArrows',
|
661 |
-
'input' => 'checkbox',
|
662 |
-
'noquotes' => true,
|
663 |
-
'default' => '1',
|
664 |
-
'description' => __('Show the gallery navigation arrows','easy-fancybox')
|
665 |
-
),
|
666 |
-
'enableKeyboardNav' => array (
|
667 |
-
'id' => 'fancybox_enableKeyboardNav',
|
668 |
-
'input' => 'checkbox',
|
669 |
-
'noquotes' => true,
|
670 |
-
'default' => '1',
|
671 |
-
'description' => __('Arrow key strokes browse the gallery','easy-fancybox')
|
672 |
-
),
|
673 |
-
'cyclic' => array (
|
674 |
-
'id' => 'fancybox_cyclic',
|
675 |
-
'input' => 'checkbox',
|
676 |
-
'noquotes' => true,
|
677 |
-
'default' => '',
|
678 |
-
'description' => __('Make galleries cyclic, allowing you to keep pressing next/back.','easy-fancybox')
|
679 |
-
),
|
680 |
-
'changeSpeed' => array (
|
681 |
-
'id' => 'fancybox_changeSpeed',
|
682 |
-
'title' => __('Change speed','easy-fancybox'),
|
683 |
-
'label_for' => 'fancybox_changeSpeed',
|
684 |
-
'input' => 'number',
|
685 |
-
'step' => '1',
|
686 |
-
'min' => '0',
|
687 |
-
'max' => '6000',
|
688 |
-
'sanitize_callback' => 'intval',
|
689 |
-
'class' => 'small-text',
|
690 |
-
'default' => '',
|
691 |
-
),
|
692 |
-
'changeFade' => array (
|
693 |
-
'id' => 'fancybox_changeFade',
|
694 |
-
'title' => __('Fade speed','easy-fancybox'),
|
695 |
-
'label_for' => 'fancybox_changeFade',
|
696 |
-
'input' => 'number',
|
697 |
-
'step' => '1',
|
698 |
-
'min' => '0',
|
699 |
-
'max' => '6000',
|
700 |
-
'sanitize_callback' => 'intval',
|
701 |
-
'class' => 'small-text',
|
702 |
-
'default' => '',
|
703 |
-
'description' => '<br />' . __('Duration in milliseconds. Higher is slower.','easy-fancybox') . ' <em>' . __('Default:','easy-fancybox') . ' 300</em><br /><br />'
|
704 |
-
),
|
705 |
-
'autoSelector' => array (
|
706 |
-
'id' => 'fancybox_autoSelector',
|
707 |
-
'hide' => true,
|
708 |
-
'input' => 'hidden',
|
709 |
-
'default' => 'div.gallery,div.wp-block-gallery,div.tiled-gallery' // add div.tiled-gallery for Tiled Galleries support
|
710 |
-
),
|
711 |
-
'onComplete' => array (
|
712 |
-
'id' => '',
|
713 |
-
'title' => __('Advanced','easy-fancybox'),
|
714 |
-
'input' => 'select',
|
715 |
-
'status' => 'disabled',
|
716 |
-
'options' => array(
|
717 |
-
'' => __('Slideshow','easy-fancybox')
|
718 |
-
),
|
719 |
-
'default' => '',
|
720 |
-
'description' => '<em><a href="'.$url.'">' . __('Make available »','easy-fancybox') . '</a></em>'
|
721 |
-
),
|
722 |
-
/* 'titleFormat' => array (
|
723 |
-
'id' => 'fancybox_titleFormat',
|
724 |
-
'title' => __('Title format','easy-fancybox'),
|
725 |
-
'label_for' => 'fancybox_titleFormat',
|
726 |
-
'input' => 'select',
|
727 |
-
'options' => array(
|
728 |
-
'' => __('Default FancyBox style','easy-fancybox'),
|
729 |
-
'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>\';
|
730 |
-
}' => __('Mimic Lightbox2 style','easy-fancybox'),
|
731 |
-
),
|
732 |
-
'noquotes' => true,
|
733 |
-
'default' => '',
|
734 |
-
'description' => '<br />' . __('To improve Lightbox2 style disable Show close button and set titleposition to Inside or Outside','easy-fancybox') . '<br />'
|
735 |
-
),*/
|
736 |
-
)
|
737 |
-
),
|
738 |
-
|
739 |
-
'Inline' => array(
|
740 |
-
'title' => __('Inline content','easy-fancybox'),
|
741 |
-
'input' => 'multiple',
|
742 |
-
'options' => array(
|
743 |
-
'intro' => array (
|
744 |
-
'hide' => true,
|
745 |
-
'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 />'
|
746 |
-
),
|
747 |
-
'tag' => array (
|
748 |
-
'hide' => true,
|
749 |
-
'default' => 'a.fancybox-inline,area.fancybox-inline,li.fancybox-inline a'
|
750 |
-
),
|
751 |
-
'class' => array (
|
752 |
-
'hide' => true,
|
753 |
-
'default' => 'fancybox-inline'
|
754 |
-
),
|
755 |
-
'type' => array (
|
756 |
-
'default' => 'inline'
|
757 |
-
),
|
758 |
-
'autoDimensions' => array (
|
759 |
-
'id' => 'fancybox_autoDimensions',
|
760 |
-
'input' => 'checkbox',
|
761 |
-
'noquotes' => true,
|
762 |
-
'default' => '1',
|
763 |
-
'description' => __('Try to adjust size to inline/html content. If unchecked the default dimensions will be used.','easy-fancybox') . ''
|
764 |
-
),
|
765 |
-
'scrolling' => array (
|
766 |
-
'id' => 'fancybox_InlineScrolling',
|
767 |
-
'title' => __('Scrolling','easy-fancybox'),
|
768 |
-
'label_for' => 'fancybox_InlineScrolling',
|
769 |
-
'input' => 'select',
|
770 |
-
'options' => array(
|
771 |
-
'auto' => __('Auto','easy-fancybox'),
|
772 |
-
'yes' => __('Always','easy-fancybox'),
|
773 |
-
'no' => __('Never','easy-fancybox')
|
774 |
-
),
|
775 |
-
'default' => 'no',
|
776 |
-
'description' => __('Define scrolling and scrollbar visibility.','easy-fancybox') . '<br /><br />'
|
777 |
-
),
|
778 |
-
'transitionIn' => array (
|
779 |
-
'id' => 'fancybox_transitionInInline',
|
780 |
-
'title' => __('Transition In','easy-fancybox'),
|
781 |
-
'label_for' => 'fancybox_transitionInInline',
|
782 |
-
'input' => 'select',
|
783 |
-
'options' => array(
|
784 |
-
'none' => translate('None'),
|
785 |
-
'' => __('Fade','easy-fancybox'),
|
786 |
-
'elastic' => __('Elastic','easy-fancybox'),
|
787 |
-
),
|
788 |
-
'default' => '',
|
789 |
-
'description' => ' '
|
790 |
-
),
|
791 |
-
'easingIn' => array (
|
792 |
-
'id' => 'fancybox_easingInInline',
|
793 |
-
'title' => __('Easing In','easy-fancybox'),
|
794 |
-
'label_for' => 'fancybox_easingInInline',
|
795 |
-
'input' => 'select',
|
796 |
-
'options' => array(
|
797 |
-
'linear' => __('Linear','easy-fancybox'),
|
798 |
-
'' => __('Swing','easy-fancybox'),
|
799 |
-
'easeInBack' => __('easeInBack','easy-fancybox'),
|
800 |
-
'easeOutBack' => __('easeOutBack','easy-fancybox')
|
801 |
-
),
|
802 |
-
'default' => 'easeOutBack',
|
803 |
-
'description' => ' <em><a href="'.$url.'">' . __('More options »','easy-fancybox') . '</a></em><br />'
|
804 |
-
),
|
805 |
-
'transitionOut' => array (
|
806 |
-
'id' => 'fancybox_transitionOutInline',
|
807 |
-
'title' => __('Transition Out','easy-fancybox'),
|
808 |
-
'label_for' => 'fancybox_transitionOutInline',
|
809 |
-
'input' => 'select',
|
810 |
-
'options' => array(
|
811 |
-
'none' => translate('None'),
|
812 |
-
'' => __('Fade','easy-fancybox'),
|
813 |
-
'elastic' => __('Elastic','easy-fancybox'),
|
814 |
-
),
|
815 |
-
'default' => '',
|
816 |
-
'description' => ' '
|
817 |
-
),
|
818 |
-
'easingOut' => array (
|
819 |
-
'id' => 'fancybox_easingOutInline',
|
820 |
-
'title' => __('Easing Out','easy-fancybox'),
|
821 |
-
'label_for' => 'fancybox_easingOutInline',
|
822 |
-
'input' => 'select',
|
823 |
-
'options' => array(
|
824 |
-
'linear' => __('Linear','easy-fancybox'),
|
825 |
-
'' => __('Swing','easy-fancybox'),
|
826 |
-
'easeInBack' => __('easeInBack','easy-fancybox'),
|
827 |
-
'easeOutBack' => __('easeOutBack','easy-fancybox')
|
828 |
-
),
|
829 |
-
'default' => 'easeInBack',
|
830 |
-
'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 />'
|
831 |
-
),
|
832 |
-
'opacity' => array (
|
833 |
-
'id' => 'fancybox_opacityInline',
|
834 |
-
'input' => 'checkbox',
|
835 |
-
'noquotes' => true,
|
836 |
-
'default' => '',
|
837 |
-
'description' => __('Transparency fade during elastic transition. CAUTION: Use only when at least Transition In is set to Elastic!','easy-fancybox')
|
838 |
-
),
|
839 |
-
'hideOnContentClick' => array (
|
840 |
-
'id' => 'fancybox_hideOnContentClickInline',
|
841 |
-
'input' => 'checkbox',
|
842 |
-
'noquotes' => true,
|
843 |
-
'default' => '',
|
844 |
-
'description' => __('Close FancyBox when content is clicked','easy-fancybox')
|
845 |
-
)
|
846 |
-
)
|
847 |
-
),
|
848 |
-
|
849 |
-
'PDF' => array(
|
850 |
-
'title' => __('PDF','easy-fancybox'),
|
851 |
-
'input' => 'multiple',
|
852 |
-
'options' => array(
|
853 |
-
'intro' => array (
|
854 |
-
'hide' => true,
|
855 |
-
'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 />'
|
856 |
-
),
|
857 |
-
'autoAttribute' => array (
|
858 |
-
'id' => 'fancybox_autoAttributePDF',
|
859 |
-
'input' => 'checkbox',
|
860 |
-
'hide' => true,
|
861 |
-
'default' => '1',
|
862 |
-
'selector' => 'a[href*=".pdf"],area[href*=".pdf"],a[href*=".PDF"],area[href*=".PDF"]',
|
863 |
-
'description' => __('Autodetect','easy-fancybox')
|
864 |
-
),
|
865 |
-
'tag' => array (
|
866 |
-
'hide' => true,
|
867 |
-
'default' => 'a.fancybox-pdf,area.fancybox-pdf,li.fancybox-pdf a'
|
868 |
-
),
|
869 |
-
'class' => array (
|
870 |
-
'hide' => true,
|
871 |
-
'default' => 'fancybox-pdf'
|
872 |
-
),
|
873 |
-
'type' => array (
|
874 |
-
'default' => 'iframe'
|
875 |
-
),
|
876 |
-
'onStart' => array (
|
877 |
-
'id' => 'fancybox_PDFonStart',
|
878 |
-
'noquotes' => true,
|
879 |
-
'title' => __('Embed with','easy-fancybox'),
|
880 |
-
'label_for' => 'fancybox_PDFtitlePosition',
|
881 |
-
'input' => 'select',
|
882 |
-
'options' => array(
|
883 |
-
'function(a,i,o){o.type=\'pdf\';}' => __('Object tag (plus fall-back link)','easy-fancybox'),
|
884 |
-
'function(a,i,o){o.content=\'<embed src="\'+a[i].href+\'" type="application/pdf" height="100%" width="100%" />\'}' => __('Embed tag','easy-fancybox'),
|
885 |
-
'' => __('iFrame tag (let browser decide)','easy-fancybox'),
|
886 |
-
'function(a,i,o){o.href=\'https://docs.google.com/viewer?embedded=true&url=\'+a[i].href;}' => __('Google Docs Viewer (external)','easy-fancybox')
|
887 |
-
),
|
888 |
-
'default' => '',
|
889 |
-
// 'function(a,i,o){o.content=\'<object data="\'+a[i].href+\'" type="application/pdf" height="100%" width="100%"><a href="\'+a[i].href+\'" style="display:block;position:absolute;top:48%;width:100%;text-align:center">\'+jQuery(a[i]).html()+\'</a></object>\'}'
|
890 |
-
// 'function(a, i, o) { o.content = \'<embed src="\' + a[i].href + \'#toolbar=1&navpanes=0&nameddest=self&page=1&view=FitH,0&zoom=80,0,0" type="application/pdf" height="100%" width="100%" />\' }'
|
891 |
-
'description' => __('Note:','easy-fancybox') . ' ' . __('External viewers have bandwidth, usage rate and and file size limits.','easy-fancybox') . '<br /><br />' //' <em><a href="'.$url.'">' . __('More options »','easy-fancybox') . '</a></em><br /><br />'
|
892 |
-
),
|
893 |
-
'width' => array (
|
894 |
-
'id' => 'fancybox_PDFwidth',
|
895 |
-
'title' => translate('Width'),
|
896 |
-
'label_for' => 'fancybox_PDFwidth',
|
897 |
-
'input' => 'text',
|
898 |
-
'sanitize_callback' => 'intval',
|
899 |
-
'class' => 'small-text',
|
900 |
-
'default' => '90%',
|
901 |
-
'description' => ' '
|
902 |
-
),
|
903 |
-
'height' => array (
|
904 |
-
'id' => 'fancybox_PDFheight',
|
905 |
-
'title' => translate('Height'),
|
906 |
-
'label_for' => 'fancybox_PDFheight',
|
907 |
-
'input' => 'text',
|
908 |
-
'sanitize_callback' => 'intval',
|
909 |
-
'class' => 'small-text',
|
910 |
-
'default' => '90%'
|
911 |
-
),
|
912 |
-
'padding' => array (
|
913 |
-
'id' => 'fancybox_PDFpadding',
|
914 |
-
'title' => translate('Border'),
|
915 |
-
'label_for' => 'fancybox_PDFpadding',
|
916 |
-
'input' => 'number',
|
917 |
-
'step' => '1',
|
918 |
-
'min' => '0',
|
919 |
-
'max' => '100',
|
920 |
-
'sanitize_callback' => 'intval',
|
921 |
-
'class' => 'small-text',
|
922 |
-
'default' => '10',
|
923 |
-
'description' => '<br /><br />'
|
924 |
-
),
|
925 |
-
'titleShow' => array (
|
926 |
-
'id' => 'fancybox_PDFtitleShow',
|
927 |
-
'input' => 'checkbox',
|
928 |
-
'noquotes' => true,
|
929 |
-
'default' => '',
|
930 |
-
'description' => __('Show title.','easy-fancybox') . ' ' . __('FancyBox will try to get a title from the link or thumbnail title attributes.','easy-fancybox')
|
931 |
-
),
|
932 |
-
'titlePosition' => array (
|
933 |
-
'id' => 'fancybox_PDFtitlePosition',
|
934 |
-
'title' => __('Title Position','easy-fancybox'),
|
935 |
-
'label_for' => 'fancybox_PDFtitlePosition',
|
936 |
-
'input' => 'select',
|
937 |
-
'options' => array(
|
938 |
-
'float' => __('Float','easy-fancybox'),
|
939 |
-
'outside' => __('Outside','easy-fancybox'),
|
940 |
-
'inside' => __('Inside','easy-fancybox')
|
941 |
-
),
|
942 |
-
'default' => 'float',
|
943 |
-
'description' => '<br />'
|
944 |
-
),
|
945 |
-
'titleFromAlt' => array (
|
946 |
-
'id' => 'fancybox_PDFtitleFromAlt',
|
947 |
-
'input' => 'checkbox',
|
948 |
-
'noquotes' => true,
|
949 |
-
'default' => '1',
|
950 |
-
'description' => __('Allow title from thumbnail alt attribute.','easy-fancybox')
|
951 |
-
),
|
952 |
-
'autoDimensions' => array (
|
953 |
-
'noquotes' => true,
|
954 |
-
'default' => 'false'
|
955 |
-
),
|
956 |
-
'scrolling' => array (
|
957 |
-
'default' => 'no',
|
958 |
-
),
|
959 |
-
)
|
960 |
-
),
|
961 |
-
|
962 |
-
'SWF' => array(
|
963 |
-
'title' => __('SWF','easy-fancybox'),
|
964 |
-
'input' => 'multiple',
|
965 |
-
'options' => array(
|
966 |
-
'intro' => array (
|
967 |
-
'hide' => true,
|
968 |
-
'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 />'
|
969 |
-
),
|
970 |
-
'autoAttribute' => array (
|
971 |
-
'id' => 'fancybox_autoAttributeSWF',
|
972 |
-
'input' => 'checkbox',
|
973 |
-
'hide' => true,
|
974 |
-
'default' => '1',
|
975 |
-
'selector' => 'a[href*=".swf"],area[href*=".swf"],a[href*=".SWF"],area[href*=".SWF"]',
|
976 |
-
'description' => __('Autodetect','easy-fancybox') . '<br />'
|
977 |
-
),
|
978 |
-
'tag' => array (
|
979 |
-
'hide' => true,
|
980 |
-
'default' => 'a.fancybox-swf,area.fancybox-swf,li.fancybox-swf a'
|
981 |
-
),
|
982 |
-
'class' => array (
|
983 |
-
'hide' => true,
|
984 |
-
'default' => 'fancybox-swf'
|
985 |
-
),
|
986 |
-
'type' => array(
|
987 |
-
'default' => 'swf'
|
988 |
-
),
|
989 |
-
'width' => array (
|
990 |
-
'id' => 'fancybox_SWFWidth',
|
991 |
-
'title' => translate('Width'),
|
992 |
-
'label_for' => 'fancybox_SWFWidth',
|
993 |
-
'input' => 'text',
|
994 |
-
'sanitize_callback' => 'intval',
|
995 |
-
'class' => 'small-text',
|
996 |
-
'options' => array(),
|
997 |
-
'default' => '680',
|
998 |
-
'description' => ' '
|
999 |
-
),
|
1000 |
-
'height' => array (
|
1001 |
-
'id' => 'fancybox_SWFHeight',
|
1002 |
-
'title' => translate('Height'),
|
1003 |
-
'label_for' => 'fancybox_SWFHeight',
|
1004 |
-
'input' => 'text',
|
1005 |
-
'sanitize_callback' => 'intval',
|
1006 |
-
'class' => 'small-text',
|
1007 |
-
'options' => array(),
|
1008 |
-
'default' => '495',
|
1009 |
-
),
|
1010 |
-
'padding' => array (
|
1011 |
-
'id' => 'fancybox_SWFpadding',
|
1012 |
-
'title' => translate('Border'),
|
1013 |
-
'label_for' => 'fancybox_SWFpadding',
|
1014 |
-
'input' => 'number',
|
1015 |
-
'step' => '1',
|
1016 |
-
'min' => '0',
|
1017 |
-
'max' => '100',
|
1018 |
-
'sanitize_callback' => 'intval',
|
1019 |
-
'class' => 'small-text',
|
1020 |
-
'default' => '0',
|
1021 |
-
'description' => '<br /><br />'
|
1022 |
-
),
|
1023 |
-
'titleShow' => array (
|
1024 |
-
'id' => 'fancybox_SWFtitleShow',
|
1025 |
-
'input' => 'checkbox',
|
1026 |
-
'noquotes' => true,
|
1027 |
-
'default' => '',
|
1028 |
-
'description' => __('Show title.','easy-fancybox') . ' ' . __('FancyBox will try to get a title from the link or thumbnail title attributes.','easy-fancybox')
|
1029 |
-
),
|
1030 |
-
'titlePosition' => array (
|
1031 |
-
'id' => 'fancybox_SWFtitlePosition',
|
1032 |
-
'title' => __('Title Position','easy-fancybox'),
|
1033 |
-
'label_for' => 'fancybox_SWFtitlePosition',
|
1034 |
-
'input' => 'select',
|
1035 |
-
'options' => array(
|
1036 |
-
'float' => __('Float','easy-fancybox'),
|
1037 |
-
'outside' => __('Outside','easy-fancybox'),
|
1038 |
-
'inside' => __('Inside','easy-fancybox')
|
1039 |
-
),
|
1040 |
-
'default' => 'float',
|
1041 |
-
'description' => '<br />'
|
1042 |
-
),
|
1043 |
-
'titleFromAlt' => array (
|
1044 |
-
'id' => 'fancybox_SWFtitleFromAlt',
|
1045 |
-
'input' => 'checkbox',
|
1046 |
-
'noquotes' => true,
|
1047 |
-
'default' => '1',
|
1048 |
-
'description' => __('Allow title from thumbnail alt attribute.','easy-fancybox')
|
1049 |
-
),
|
1050 |
-
'swf' => array (
|
1051 |
-
'noquotes' => true,
|
1052 |
-
'default' => '{\'wmode\':\'opaque\',\'allowfullscreen\':true}'
|
1053 |
-
)
|
1054 |
-
)
|
1055 |
-
),
|
1056 |
-
|
1057 |
-
'SVG' => array(
|
1058 |
-
'title' => __('SVG','easy-fancybox'),
|
1059 |
-
'input' => 'multiple',
|
1060 |
-
'options' => array(
|
1061 |
-
'intro' => array (
|
1062 |
-
'hide' => true,
|
1063 |
-
'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 />'
|
1064 |
-
),
|
1065 |
-
'autoAttribute' => array (
|
1066 |
-
'id' => 'fancybox_autoAttributeSVG',
|
1067 |
-
'input' => 'checkbox',
|
1068 |
-
'hide' => true,
|
1069 |
-
'default' => '1',
|
1070 |
-
'selector' => 'a[href*=".svg"],area[href*=".svg"],a[href*=".SVG"],area[href*=".SVG"]',
|
1071 |
-
'description' => __('Autodetect','easy-fancybox') . '<br />'
|
1072 |
-
),
|
1073 |
-
'tag' => array (
|
1074 |
-
'hide' => true,
|
1075 |
-
'default' => 'a.fancybox-svg,area.fancybox-svg,li.fancybox-svg a'
|
1076 |
-
),
|
1077 |
-
'class' => array (
|
1078 |
-
'hide' => true,
|
1079 |
-
'default' => 'fancybox-svg'
|
1080 |
-
),
|
1081 |
-
'type' => array(
|
1082 |
-
'default' => 'svg'
|
1083 |
-
),
|
1084 |
-
'width' => array (
|
1085 |
-
'id' => 'fancybox_SVGWidth',
|
1086 |
-
'title' => translate('Width'),
|
1087 |
-
'label_for' => 'fancybox_SVGWidth',
|
1088 |
-
'input' => 'text',
|
1089 |
-
'sanitize_callback' => 'intval',
|
1090 |
-
'class' => 'small-text',
|
1091 |
-
'options' => array(),
|
1092 |
-
'default' => '680',
|
1093 |
-
'description' => ' '
|
1094 |
-
),
|
1095 |
-
'height' => array (
|
1096 |
-
'id' => 'fancybox_SVGHeight',
|
1097 |
-
'title' => translate('Height'),
|
1098 |
-
'label_for' => 'fancybox_SVGHeight',
|
1099 |
-
'input' => 'text',
|
1100 |
-
'sanitize_callback' => 'intval',
|
1101 |
-
'class' => 'small-text',
|
1102 |
-
'options' => array(),
|
1103 |
-
'default' => '495',
|
1104 |
-
),
|
1105 |
-
'padding' => array (
|
1106 |
-
'id' => 'fancybox_SVGpadding',
|
1107 |
-
'title' => translate('Border'),
|
1108 |
-
'label_for' => 'fancybox_SVGpadding',
|
1109 |
-
'input' => 'number',
|
1110 |
-
'step' => '1',
|
1111 |
-
'min' => '0',
|
1112 |
-
'max' => '100',
|
1113 |
-
'sanitize_callback' => 'intval',
|
1114 |
-
'class' => 'small-text',
|
1115 |
-
'default' => '0',
|
1116 |
-
'description' => '<br /><br />'
|
1117 |
-
),
|
1118 |
-
'titleShow' => array (
|
1119 |
-
'id' => 'fancybox_SVGtitleShow',
|
1120 |
-
'input' => 'checkbox',
|
1121 |
-
'noquotes' => true,
|
1122 |
-
'default' => '',
|
1123 |
-
'description' => __('Show title.','easy-fancybox') . ' ' . __('FancyBox will try to get a title from the link or thumbnail title attributes.','easy-fancybox')
|
1124 |
-
),
|
1125 |
-
'titlePosition' => array (
|
1126 |
-
'id' => 'fancybox_SVGtitlePosition',
|
1127 |
-
'title' => __('Title Position','easy-fancybox'),
|
1128 |
-
'label_for' => 'fancybox_SVGtitlePosition',
|
1129 |
-
'input' => 'select',
|
1130 |
-
'options' => array(
|
1131 |
-
'float' => __('Float','easy-fancybox'),
|
1132 |
-
'outside' => __('Outside','easy-fancybox'),
|
1133 |
-
'inside' => __('Inside','easy-fancybox')
|
1134 |
-
//,'over' => __('Overlay','easy-fancybox')
|
1135 |
-
),
|
1136 |
-
'default' => 'float',
|
1137 |
-
'description' => '<br />'
|
1138 |
-
),
|
1139 |
-
'titleFromAlt' => array (
|
1140 |
-
'id' => 'fancybox_SVGtitleFromAlt',
|
1141 |
-
'input' => 'checkbox',
|
1142 |
-
'noquotes' => true,
|
1143 |
-
'default' => '1',
|
1144 |
-
'description' => __('Allow title from thumbnail alt attribute.','easy-fancybox')
|
1145 |
-
),
|
1146 |
-
'svg' => array (
|
1147 |
-
'noquotes' => true,
|
1148 |
-
'default' => '{\'wmode\':\'opaque\',\'allowfullscreen\':true}'
|
1149 |
-
)
|
1150 |
-
)
|
1151 |
-
),
|
1152 |
-
|
1153 |
-
'YouTube' => array(
|
1154 |
-
'title' => __('YouTube','easy-fancybox'),
|
1155 |
-
'input' => 'multiple',
|
1156 |
-
'options' => array(
|
1157 |
-
'intro' => array (
|
1158 |
-
'hide' => true,
|
1159 |
-
'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 />'
|
1160 |
-
),
|
1161 |
-
'autoAttribute' => array (
|
1162 |
-
'id' => 'fancybox_autoAttributeYoutube',
|
1163 |
-
'input' => 'checkbox',
|
1164 |
-
'hide' => true,
|
1165 |
-
'default' => '1',
|
1166 |
-
'selector' => 'a[href*="youtu.be/"],area[href*="youtu.be/"],a[href*="youtube.com/watch"],area[href*="youtube.com/watch"]',
|
1167 |
-
'description' => __('Autodetect','easy-fancybox') . '<br />'
|
1168 |
-
),
|
1169 |
-
'tag' => array (
|
1170 |
-
'hide' => true,
|
1171 |
-
'default' => 'a.fancybox-youtube,area.fancybox-youtube,li.fancybox-youtube a'
|
1172 |
-
),
|
1173 |
-
'class' => array (
|
1174 |
-
'hide' => true,
|
1175 |
-
'default' => 'fancybox-youtube'
|
1176 |
-
),
|
1177 |
-
'type' => array(
|
1178 |
-
'default' => 'iframe'
|
1179 |
-
),
|
1180 |
-
'noCookie' => array (
|
1181 |
-
'id' => 'fancybox_YoutubenoCookie',
|
1182 |
-
'input' => 'checkbox',
|
1183 |
-
'hide' => true,
|
1184 |
-
'default' => '',
|
1185 |
-
'description' => __('Enable privacy-enhanced mode','easy-fancybox') . '<br />'
|
1186 |
-
),
|
1187 |
-
'width' => array (
|
1188 |
-
'id' => 'fancybox_YoutubeWidth',
|
1189 |
-
'title' => translate('Width'),
|
1190 |
-
'label_for' => 'fancybox_YoutubeWidth',
|
1191 |
-
'input' => 'number',
|
1192 |
-
'step' => '1',
|
1193 |
-
'min' => '420',
|
1194 |
-
'max' => '1500',
|
1195 |
-
'sanitize_callback' => 'intval',
|
1196 |
-
'class' => 'small-text',
|
1197 |
-
'default' => '640',
|
1198 |
-
'description' => ' '
|
1199 |
-
),
|
1200 |
-
'height' => array (
|
1201 |
-
'id' => 'fancybox_YoutubeHeight',
|
1202 |
-
'title' => translate('Height'),
|
1203 |
-
'label_for' => 'fancybox_YoutubeHeight',
|
1204 |
-
'input' => 'number',
|
1205 |
-
'step' => '1',
|
1206 |
-
'min' => '315',
|
1207 |
-
'max' => '900',
|
1208 |
-
'sanitize_callback' => 'intval',
|
1209 |
-
'class' => 'small-text',
|
1210 |
-
'default' => '360',
|
1211 |
-
),
|
1212 |
-
'padding' => array (
|
1213 |
-
'id' => 'fancybox_Youtubepadding',
|
1214 |
-
'title' => translate('Border'),
|
1215 |
-
'label_for' => 'fancybox_Youtubepadding',
|
1216 |
-
'input' => 'number',
|
1217 |
-
'step' => '1',
|
1218 |
-
'min' => '0',
|
1219 |
-
'max' => '100',
|
1220 |
-
'sanitize_callback' => 'intval',
|
1221 |
-
'class' => 'small-text',
|
1222 |
-
'default' => '0',
|
1223 |
-
'description' => '<br /><br />'
|
1224 |
-
),
|
1225 |
-
'keepRatio' => array(
|
1226 |
-
'noquotes' => true,
|
1227 |
-
'default' => '1'
|
1228 |
-
),
|
1229 |
-
'titleShow' => array (
|
1230 |
-
'id' => 'fancybox_YoutubetitleShow',
|
1231 |
-
'input' => 'checkbox',
|
1232 |
-
'noquotes' => true,
|
1233 |
-
'default' => '',
|
1234 |
-
'description' => __('Show title.','easy-fancybox') . ' ' . __('FancyBox will try to get a title from the link or thumbnail title attributes.','easy-fancybox')
|
1235 |
-
),
|
1236 |
-
'titlePosition' => array (
|
1237 |
-
'id' => 'fancybox_YoutubetitlePosition',
|
1238 |
-
'title' => __('Title Position','easy-fancybox'),
|
1239 |
-
'label_for' => 'fancybox_YoutubetitlePosition',
|
1240 |
-
'input' => 'select',
|
1241 |
-
'options' => array(
|
1242 |
-
'float' => __('Float','easy-fancybox'),
|
1243 |
-
'outside' => __('Outside','easy-fancybox'),
|
1244 |
-
'inside' => __('Inside','easy-fancybox')
|
1245 |
-
),
|
1246 |
-
'default' => 'float',
|
1247 |
-
'description' => '<br />'
|
1248 |
-
),
|
1249 |
-
'titleFromAlt' => array (
|
1250 |
-
'id' => 'fancybox_YoutubetitleFromAlt',
|
1251 |
-
'input' => 'checkbox',
|
1252 |
-
'noquotes' => true,
|
1253 |
-
'default' => '1',
|
1254 |
-
'description' => __('Allow title from thumbnail alt attribute.','easy-fancybox')
|
1255 |
-
),
|
1256 |
-
'onStart' => array (
|
1257 |
-
'noquotes' => true,
|
1258 |
-
'default' => get_option( 'fancybox_YoutubenoCookie' ) ?
|
1259 |
-
'function(a,i,o){o.href=a[i].href.replace(/https?:\/\/youtu\.be/gi,"https://www.youtube-nocookie.com/embed").replace(/https?:\/\/(?:www\.)?youtube\.com\/watch\?(.*)v=([a-z0-9\_\-]+)(?:&|&|\?)?(.*)/gi,"https://www.youtube-nocookie.com/embed/$2?$1$3");var splitOn=o.href.indexOf("?");var urlParms=(splitOn>-1)?o.href.substring(splitOn):"";o.allowfullscreen=(urlParms.indexOf("fs=0")>-1)?false:true}' :
|
1260 |
-
'function(a,i,o){o.href=a[i].href.replace(/https?:\/\/youtu\.be/gi,"https://www.youtube.com/embed").replace(/https?:\/\/(?:www\.)?youtube\.com\/watch\?(.*)v=([a-z0-9\_\-]+)(?:&|&|\?)?(.*)/gi,"https://www.youtube.com/embed/$2?$1$3");var splitOn=o.href.indexOf("?");var urlParms=(splitOn>-1)?o.href.substring(splitOn):"";o.allowfullscreen=(urlParms.indexOf("fs=0")>-1)?false:true}'
|
1261 |
-
)
|
1262 |
-
)
|
1263 |
-
),
|
1264 |
-
|
1265 |
-
'Vimeo' => array(
|
1266 |
-
'title' => __('Vimeo','easy-fancybox'),
|
1267 |
-
'input' => 'multiple',
|
1268 |
-
'options' => array(
|
1269 |
-
'intro' => array (
|
1270 |
-
'hide' => true,
|
1271 |
-
'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 />'
|
1272 |
-
),
|
1273 |
-
'autoAttribute' => array (
|
1274 |
-
'id' => 'fancybox_autoAttributeVimeo',
|
1275 |
-
'input' => 'checkbox',
|
1276 |
-
'hide' => true,
|
1277 |
-
'default' => '1',
|
1278 |
-
'selector' => 'a[href*="vimeo.com/"],area[href*="vimeo.com/"]',
|
1279 |
-
'description' => __('Autodetect','easy-fancybox') . '<br />'
|
1280 |
-
),
|
1281 |
-
'tag' => array (
|
1282 |
-
'hide' => true,
|
1283 |
-
'default' => 'a.fancybox-vimeo,area.fancybox-vimeo,li.fancybox-vimeo a'
|
1284 |
-
),
|
1285 |
-
'class' => array (
|
1286 |
-
'hide' => true,
|
1287 |
-
'default' => 'fancybox-vimeo'
|
1288 |
-
),
|
1289 |
-
'type' => array(
|
1290 |
-
'default' => 'iframe'
|
1291 |
-
),
|
1292 |
-
'width' => array (
|
1293 |
-
'id' => 'fancybox_VimeoWidth',
|
1294 |
-
'title' => translate('Width'),
|
1295 |
-
'label_for' => 'fancybox_VimeoWidth',
|
1296 |
-
'input' => 'number',
|
1297 |
-
'step' => '1',
|
1298 |
-
'min' => '400',
|
1299 |
-
'max' => '1500',
|
1300 |
-
'sanitize_callback' => 'intval',
|
1301 |
-
'class' => 'small-text',
|
1302 |
-
'default' => '500',
|
1303 |
-
'description' => ' '
|
1304 |
-
),
|
1305 |
-
'height' => array (
|
1306 |
-
'id' => 'fancybox_VimeoHeight',
|
1307 |
-
'title' => translate('Height'),
|
1308 |
-
'label_for' => 'fancybox_VimeoHeight',
|
1309 |
-
'input' => 'number',
|
1310 |
-
'step' => '1',
|
1311 |
-
'min' => '225',
|
1312 |
-
'max' => '900',
|
1313 |
-
'sanitize_callback' => 'intval',
|
1314 |
-
'class' => 'small-text',
|
1315 |
-
'default' => '281'
|
1316 |
-
),
|
1317 |
-
'padding' => array (
|
1318 |
-
'id' => 'fancybox_Vimeopadding',
|
1319 |
-
'title' => translate('Border'),
|
1320 |
-
'label_for' => 'fancybox_Vimeopadding',
|
1321 |
-
'input' => 'number',
|
1322 |
-
'step' => '1',
|
1323 |
-
'min' => '0',
|
1324 |
-
'max' => '100',
|
1325 |
-
'sanitize_callback' => 'intval',
|
1326 |
-
'class' => 'small-text',
|
1327 |
-
'default' => '0',
|
1328 |
-
'description' => '<br /><br />'
|
1329 |
-
),
|
1330 |
-
'keepRatio' => array(
|
1331 |
-
'noquotes' => true,
|
1332 |
-
'default' => '1'
|
1333 |
-
),
|
1334 |
-
'titleShow' => array (
|
1335 |
-
'id' => 'fancybox_VimeotitleShow',
|
1336 |
-
'input' => 'checkbox',
|
1337 |
-
'noquotes' => true,
|
1338 |
-
'default' => '',
|
1339 |
-
'description' => __('Show title.','easy-fancybox') . ' ' . __('FancyBox will try to get a title from the link or thumbnail title attributes.','easy-fancybox')
|
1340 |
-
),
|
1341 |
-
'titlePosition' => array (
|
1342 |
-
'id' => 'fancybox_VimeotitlePosition',
|
1343 |
-
'title' => __('Title Position','easy-fancybox'),
|
1344 |
-
'label_for' => 'fancybox_VimeotitlePosition',
|
1345 |
-
'input' => 'select',
|
1346 |
-
'options' => array(
|
1347 |
-
'float' => __('Float','easy-fancybox'),
|
1348 |
-
'outside' => __('Outside','easy-fancybox'),
|
1349 |
-
'inside' => __('Inside','easy-fancybox')
|
1350 |
-
),
|
1351 |
-
'default' => 'float',
|
1352 |
-
'description' => '<br />'
|
1353 |
-
),
|
1354 |
-
'titleFromAlt' => array (
|
1355 |
-
'id' => 'fancybox_VimeotitleFromAlt',
|
1356 |
-
'input' => 'checkbox',
|
1357 |
-
'noquotes' => true,
|
1358 |
-
'default' => '1',
|
1359 |
-
'description' => __('Allow title from thumbnail alt attribute.','easy-fancybox')
|
1360 |
-
),
|
1361 |
-
'onStart' => array (
|
1362 |
-
'noquotes' => true,
|
1363 |
-
'default' => 'function(a,i,o){o.href=a[i].href.replace(/https?:\/\/(?:www\.)?vimeo\.com\/([0-9]+)(?:&|&|\?)?(.*)/gi,"https://player.vimeo.com/video/$1?$2");var splitOn=o.href.indexOf("?");var urlParms=(splitOn>-1)?o.href.substring(splitOn):"";o.allowfullscreen=(urlParms.indexOf("fullscreen=0")>-1)?false:true}'
|
1364 |
-
)
|
1365 |
-
)
|
1366 |
-
),
|
1367 |
-
|
1368 |
-
'Dailymotion' => array(
|
1369 |
-
'title' => __('Dailymotion','easy-fancybox'),
|
1370 |
-
'input' => 'multiple',
|
1371 |
-
'options' => array(
|
1372 |
-
'intro' => array (
|
1373 |
-
'hide' => true,
|
1374 |
-
'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 />'
|
1375 |
-
),
|
1376 |
-
'autoAttribute' => array (
|
1377 |
-
'id' => 'fancybox_autoAttributeDailymotion',
|
1378 |
-
'input' => 'checkbox',
|
1379 |
-
'hide' => true,
|
1380 |
-
'default' => '1',
|
1381 |
-
'selector' => 'a[href*="dailymotion.com/"],area[href*="dailymotion.com/"]',
|
1382 |
-
'description' => __('Autodetect','easy-fancybox') . '<br />'
|
1383 |
-
),
|
1384 |
-
'tag' => array (
|
1385 |
-
'hide' => true,
|
1386 |
-
'default' => 'a.fancybox-dailymotion,area.fancybox-dailymotion,li.fancybox-dailymotion a'
|
1387 |
-
),
|
1388 |
-
'class' => array (
|
1389 |
-
'hide' => true,
|
1390 |
-
'default' => 'fancybox-dailymotion'
|
1391 |
-
),
|
1392 |
-
'type' => array(
|
1393 |
-
'default' => 'iframe'
|
1394 |
-
),
|
1395 |
-
'width' => array (
|
1396 |
-
'id' => 'fancybox_DailymotionWidth',
|
1397 |
-
'title' => translate('Width'),
|
1398 |
-
'label_for' => 'fancybox_DailymotionWidth',
|
1399 |
-
'input' => 'number',
|
1400 |
-
'step' => '1',
|
1401 |
-
'min' => '320',
|
1402 |
-
'max' => '1500',
|
1403 |
-
'sanitize_callback' => 'intval',
|
1404 |
-
'class' => 'small-text',
|
1405 |
-
'default' => '560',
|
1406 |
-
'description' => ' '
|
1407 |
-
),
|
1408 |
-
'height' => array (
|
1409 |
-
'id' => 'fancybox_DailymotionHeight',
|
1410 |
-
'title' => translate('Height'),
|
1411 |
-
'label_for' => 'fancybox_DailymotionHeight',
|
1412 |
-
'input' => 'number',
|
1413 |
-
'step' => '1',
|
1414 |
-
'min' => '180',
|
1415 |
-
'max' => '900',
|
1416 |
-
'sanitize_callback' => 'intval',
|
1417 |
-
'class' => 'small-text',
|
1418 |
-
'default' => '315'
|
1419 |
-
),
|
1420 |
-
'padding' => array (
|
1421 |
-
'id' => 'fancybox_DailymotionPadding',
|
1422 |
-
'title' => translate('Border'),
|
1423 |
-
'label_for' => 'fancybox_DailymotionPadding',
|
1424 |
-
'input' => 'number',
|
1425 |
-
'step' => '1',
|
1426 |
-
'min' => '0',
|
1427 |
-
'max' => '100',
|
1428 |
-
'sanitize_callback' => 'intval',
|
1429 |
-
'class' => 'small-text',
|
1430 |
-
'default' => '0',
|
1431 |
-
'description' => '<br /><br />'
|
1432 |
-
),
|
1433 |
-
'keepRatio' => array(
|
1434 |
-
'noquotes' => true,
|
1435 |
-
'default' => '1'
|
1436 |
-
),
|
1437 |
-
'titleShow' => array (
|
1438 |
-
'id' => 'fancybox_DailymotiontitleShow',
|
1439 |
-
'input' => 'checkbox',
|
1440 |
-
'noquotes' => true,
|
1441 |
-
'default' => '',
|
1442 |
-
'description' => __('Show title.','easy-fancybox') . ' ' . __('FancyBox will try to get a title from the link or thumbnail title attributes.','easy-fancybox')
|
1443 |
-
),
|
1444 |
-
'titlePosition' => array (
|
1445 |
-
'id' => 'fancybox_DailymotiontitlePosition',
|
1446 |
-
'title' => __('Title Position','easy-fancybox'),
|
1447 |
-
'label_for' => 'fancybox_DailymotiontitlePosition',
|
1448 |
-
'input' => 'select',
|
1449 |
-
'options' => array(
|
1450 |
-
'float' => __('Float','easy-fancybox'),
|
1451 |
-
'outside' => __('Outside','easy-fancybox'),
|
1452 |
-
'inside' => __('Inside','easy-fancybox')
|
1453 |
-
),
|
1454 |
-
'default' => 'float',
|
1455 |
-
'description' => '<br />'
|
1456 |
-
),
|
1457 |
-
'titleFromAlt' => array (
|
1458 |
-
'id' => 'fancybox_DailymotiontitleFromAlt',
|
1459 |
-
'input' => 'checkbox',
|
1460 |
-
'noquotes' => true,
|
1461 |
-
'default' => '1',
|
1462 |
-
'description' => __('Allow title from thumbnail alt attribute.','easy-fancybox')
|
1463 |
-
),
|
1464 |
-
'onStart' => array (
|
1465 |
-
'noquotes' => true,
|
1466 |
-
'default' => 'function(a,i,o){o.href=a[i].href.replace(/^https?:\/\/(?:www\.)dailymotion.com\/video\/(.*)/gi,"https://www.dailymotion.com/embed/video/$1");var splitOn=o.href.indexOf("?");var urlParms=(splitOn>-1)?o.href.substring(splitOn):"";o.allowfullscreen=(urlParms.indexOf("fullscreen=0")>-1)?false:true}'
|
1467 |
-
)
|
1468 |
-
)
|
1469 |
-
),
|
1470 |
-
|
1471 |
-
/* 'Tudou' => array(
|
1472 |
-
'id' => 'fancybox_Tudou',
|
1473 |
-
'title' => __('Tudou','easy-fancybox'),
|
1474 |
-
'label_for' => '',
|
1475 |
-
'input' => 'multiple',
|
1476 |
-
'class' => '', 'description' => '',
|
1477 |
-
'options' => array(
|
1478 |
-
'autoAttributeTudou' => array (
|
1479 |
-
'id' => 'fancybox_autoAttributeTudou',
|
1480 |
-
'label_for' => '',
|
1481 |
-
'input' => 'checkbox',
|
1482 |
-
'class' => '',
|
1483 |
-
'options' => array(),
|
1484 |
-
'hide' => true,
|
1485 |
-
'default' => '1',
|
1486 |
-
'description' => __('Tudou links','easy-fancybox')
|
1487 |
-
)
|
1488 |
-
)
|
1489 |
-
),*/
|
1490 |
-
|
1491 |
-
/* 'Animoto' => array(),
|
1492 |
-
|
1493 |
-
Example ANIMOTO page link http://animoto.com/play/Kf9POzQMSOGWyu41gtOtsw should become
|
1494 |
-
http://static.animoto.com/swf/w.swf?w=swf/vp1&f=Kf9POzQMSOGWyu41gtOtsw&i=m
|
1495 |
-
|
1496 |
-
*/
|
1497 |
-
|
1498 |
-
'iFrame' => array(
|
1499 |
-
'title' => __('iFrames','easy-fancybox'),
|
1500 |
-
'input' => 'multiple',
|
1501 |
-
'options' => array(
|
1502 |
-
'intro' => array (
|
1503 |
-
'hide' => true,
|
1504 |
-
'description' => __('To make a website or HTML document open in an overlay, use the class "fancybox-iframe" for its link.','easy-fancybox') . '<br /><br />'
|
1505 |
-
),
|
1506 |
-
'tag' => array (
|
1507 |
-
'hide' => true,
|
1508 |
-
'default' => 'a.fancybox-iframe,area.fancybox-iframe,li.fancybox-iframe a'
|
1509 |
-
),
|
1510 |
-
'class' => array (
|
1511 |
-
'hide' => true,
|
1512 |
-
'default' => 'fancybox-iframe'
|
1513 |
-
),
|
1514 |
-
'type' => array (
|
1515 |
-
'default' => 'iframe'
|
1516 |
-
),
|
1517 |
-
/*
|
1518 |
-
* other than overflow:auto not supported on many browsers
|
1519 |
-
'scrolling' => array (
|
1520 |
-
'id' => 'fancybox_iFrameScrolling',
|
1521 |
-
'title' => __('Scrolling','easy-fancybox'),
|
1522 |
-
'label_for' => 'fancybox_iFrameScrolling',
|
1523 |
-
'input' => 'select',
|
1524 |
-
'options' => array(
|
1525 |
-
'auto' => __('Auto','easy-fancybox'),
|
1526 |
-
'yes' => __('Always','easy-fancybox'),
|
1527 |
-
'no' => __('Never','easy-fancybox')
|
1528 |
-
),
|
1529 |
-
'default' => 'auto',
|
1530 |
-
'description' => __('Define scrolling and scrollbar visibility.','easy-fancybox') . '<br />'
|
1531 |
-
),
|
1532 |
-
*/
|
1533 |
-
'width' => array (
|
1534 |
-
'id' => 'fancybox_iFramewidth',
|
1535 |
-
'title' => translate('Width'),
|
1536 |
-
'label_for' => 'fancybox_iFramewidth',
|
1537 |
-
'input' => 'text',
|
1538 |
-
'sanitize_callback' => 'intval',
|
1539 |
-
'class' => 'small-text',
|
1540 |
-
'default' => '70%',
|
1541 |
-
'description' => ' '
|
1542 |
-
),
|
1543 |
-
'height' => array (
|
1544 |
-
'id' => 'fancybox_iFrameheight',
|
1545 |
-
'title' => translate('Height'),
|
1546 |
-
'label_for' => 'fancybox_iFrameheight',
|
1547 |
-
'input' => 'text',
|
1548 |
-
'sanitize_callback' => 'intval',
|
1549 |
-
'class' => 'small-text',
|
1550 |
-
'default' => '90%',
|
1551 |
-
),
|
1552 |
-
'padding' => array (
|
1553 |
-
'id' => 'fancybox_iFramepadding',
|
1554 |
-
'title' => translate('Border'),
|
1555 |
-
'label_for' => 'fancybox_iFramepadding',
|
1556 |
-
'input' => 'number',
|
1557 |
-
'step' => '1',
|
1558 |
-
'min' => '0',
|
1559 |
-
'max' => '100',
|
1560 |
-
'sanitize_callback' => 'intval',
|
1561 |
-
'class' => 'small-text',
|
1562 |
-
'default' => '0',
|
1563 |
-
'description' => '<br /><br />'
|
1564 |
-
),
|
1565 |
-
'titleShow' => array (
|
1566 |
-
'id' => 'fancybox_iFrametitleShow',
|
1567 |
-
'input' => 'checkbox',
|
1568 |
-
'noquotes' => true,
|
1569 |
-
'default' => '',
|
1570 |
-
'description' => __('Show title.','easy-fancybox') . ' ' . __('FancyBox will try to get a title from the link or thumbnail title attributes.','easy-fancybox')
|
1571 |
-
),
|
1572 |
-
'titlePosition' => array (
|
1573 |
-
'id' => 'fancybox_iFrametitlePosition',
|
1574 |
-
'title' => __('Title Position','easy-fancybox'),
|
1575 |
-
'label_for' => 'fancybox_iFrametitlePosition',
|
1576 |
-
'input' => 'select',
|
1577 |
-
'options' => array(
|
1578 |
-
'float' => __('Float','easy-fancybox'),
|
1579 |
-
'outside' => __('Outside','easy-fancybox'),
|
1580 |
-
'inside' => __('Inside','easy-fancybox')
|
1581 |
-
),
|
1582 |
-
'default' => 'float',
|
1583 |
-
'description' => '<br />'
|
1584 |
-
),
|
1585 |
-
'titleFromAlt' => array (
|
1586 |
-
'id' => 'fancybox_iFrametitleFromAlt',
|
1587 |
-
'input' => 'checkbox',
|
1588 |
-
'noquotes' => true,
|
1589 |
-
'default' => '1',
|
1590 |
-
'description' => __('Allow title from thumbnail alt attribute.','easy-fancybox') . '<br/>'
|
1591 |
-
),
|
1592 |
-
'allowfullscreen' => array (
|
1593 |
-
'id' => 'fancybox_allowFullScreen',
|
1594 |
-
'input' => 'checkbox',
|
1595 |
-
'noquotes' => true,
|
1596 |
-
'default' => '',
|
1597 |
-
'description' => __('Allow embedded content to jump to full screen mode','easy-fancybox')
|
1598 |
-
)
|
1599 |
-
)
|
1600 |
-
)
|
1601 |
-
);
|
1602 |
-
}
|
1603 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/class-easyfancybox.php
CHANGED
@@ -7,7 +7,7 @@ class easyFancyBox {
|
|
7 |
|
8 |
private static $plugin_url;
|
9 |
|
10 |
-
|
11 |
|
12 |
private static $inline_script;
|
13 |
|
@@ -31,14 +31,13 @@ class easyFancyBox {
|
|
31 |
|
32 |
private static function main() {
|
33 |
|
34 |
-
easyFancyBox_Options::load_defaults();
|
35 |
-
|
36 |
// check for any enabled sections
|
37 |
-
foreach ( self::$options['Global']['options']['Enable']['options'] as $value )
|
38 |
if ( isset($value['id']) && '1' == get_option($value['id'],$value['default']) ) {
|
39 |
self::$add_scripts = true;
|
40 |
break;
|
41 |
}
|
|
|
42 |
|
43 |
// and abort when none are active
|
44 |
if ( !self::$add_scripts )
|
@@ -430,12 +429,21 @@ var easy_fancybox_auto=function(){setTimeout(function(){jQuery(\'a[class*="'.$tr
|
|
430 |
update_option('easy_fancybox_version', EASY_FANCYBOX_VERSION);
|
431 |
}
|
432 |
|
433 |
-
public static function
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
434 |
$version = get_option('easy_fancybox_version', 0);
|
435 |
|
436 |
if ( version_compare( EASY_FANCYBOX_VERSION, $version, '>' ) )
|
437 |
self::upgrade($version);
|
|
|
438 |
|
|
|
439 |
// Treat settings and prepare inline scripts and styles, or log debug message
|
440 |
if ( self::main() ) {
|
441 |
$priority = get_option( 'fancybox_scriptPriority' );
|
@@ -457,9 +465,10 @@ var easy_fancybox_auto=function(){setTimeout(function(){jQuery(\'a[class*="'.$tr
|
|
457 |
self::$plugin_url = plugins_url( '/', $file );
|
458 |
self::$plugin_basename = plugin_basename( $file );
|
459 |
|
460 |
-
|
|
|
|
|
461 |
|
462 |
-
add_action( 'init', array(__CLASS__, 'init'), 9 );
|
463 |
add_filter( 'easy_fancybox_inline_script', array(__CLASS__,'onready_callback') );
|
464 |
}
|
465 |
}
|
7 |
|
8 |
private static $plugin_url;
|
9 |
|
10 |
+
public static $plugin_basename;
|
11 |
|
12 |
private static $inline_script;
|
13 |
|
31 |
|
32 |
private static function main() {
|
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 |
|
42 |
// and abort when none are active
|
43 |
if ( !self::$add_scripts )
|
429 |
update_option('easy_fancybox_version', EASY_FANCYBOX_VERSION);
|
430 |
}
|
431 |
|
432 |
+
public static function load_defaults() {
|
433 |
+
if ( empty(self::$options) ) {
|
434 |
+
include 'easyfancybox-options.php';
|
435 |
+
self::$options = $efb_options;
|
436 |
+
}
|
437 |
+
}
|
438 |
+
|
439 |
+
public static function maybe_upgrade() {
|
440 |
$version = get_option('easy_fancybox_version', 0);
|
441 |
|
442 |
if ( version_compare( EASY_FANCYBOX_VERSION, $version, '>' ) )
|
443 |
self::upgrade($version);
|
444 |
+
}
|
445 |
|
446 |
+
public static function load_main() {
|
447 |
// Treat settings and prepare inline scripts and styles, or log debug message
|
448 |
if ( self::main() ) {
|
449 |
$priority = get_option( 'fancybox_scriptPriority' );
|
465 |
self::$plugin_url = plugins_url( '/', $file );
|
466 |
self::$plugin_basename = plugin_basename( $file );
|
467 |
|
468 |
+
add_action( 'init', array(__CLASS__, 'maybe_upgrade') );
|
469 |
+
add_action( 'init', array(__CLASS__, 'load_defaults') );
|
470 |
+
add_action( 'init', array(__CLASS__, 'load_main'), 12 );
|
471 |
|
|
|
472 |
add_filter( 'easy_fancybox_inline_script', array(__CLASS__,'onready_callback') );
|
473 |
}
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Easy FancyBox options and their defaults array
|
4 |
+
*/
|
5 |
+
$efb_url = "https://premium.status301.net/downloads/easy-fancybox-pro/";
|
6 |
+
|
7 |
+
$efb_options = array (
|
8 |
+
'Global' => array(
|
9 |
+
'title' => __('Global settings','easy-fancybox'),
|
10 |
+
'input' => 'deep',
|
11 |
+
'hide' => true,
|
12 |
+
'options' => array(
|
13 |
+
'Enable' => array (
|
14 |
+
'title' => __('Media','easy-fancybox'),
|
15 |
+
'input' => 'multiple',
|
16 |
+
'hide' => true,
|
17 |
+
'options' => array(
|
18 |
+
'p1' => array (
|
19 |
+
'hide' => true,
|
20 |
+
'description' => __('Enable FancyBox for','easy-fancybox') . '<br />'
|
21 |
+
),
|
22 |
+
'IMG' => array (
|
23 |
+
'id' => 'fancybox_enableImg',
|
24 |
+
'input' => 'checkbox',
|
25 |
+
'hide' => true,
|
26 |
+
'default' => ( function_exists('is_plugin_active_for_network') && is_plugin_active_for_network( easyFancyBox::$plugin_basename ) ) ? '' : '1',
|
27 |
+
'description' => '<strong>' . __('Images','easy-fancybox') . '</strong>'
|
28 |
+
),
|
29 |
+
'Inline' => array (
|
30 |
+
'id' => 'fancybox_enableInline',
|
31 |
+
'input' => 'checkbox',
|
32 |
+
'hide' => true,
|
33 |
+
'default' => '',
|
34 |
+
'description' => '<strong>' . __('Inline content','easy-fancybox') . '</strong>'
|
35 |
+
),
|
36 |
+
'PDF' => array (
|
37 |
+
'id' => 'fancybox_enablePDF',
|
38 |
+
'input' => 'checkbox',
|
39 |
+
'hide' => true,
|
40 |
+
'default' => '',
|
41 |
+
'description' => '<strong>' . __('PDF','easy-fancybox') . '</strong>'
|
42 |
+
),
|
43 |
+
'SWF' => array (
|
44 |
+
'id' => 'fancybox_enableSWF',
|
45 |
+
'input' => 'checkbox',
|
46 |
+
'hide' => true,
|
47 |
+
'default' => '',
|
48 |
+
'description' => '<strong>' . __('SWF','easy-fancybox') . '</strong>'
|
49 |
+
),
|
50 |
+
'SVG' => array (
|
51 |
+
'id' => 'fancybox_enableSVG',
|
52 |
+
'input' => 'checkbox',
|
53 |
+
'hide' => true,
|
54 |
+
'default' => '',
|
55 |
+
'description' => '<strong>' . __('SVG','easy-fancybox') . '</strong>'
|
56 |
+
),
|
57 |
+
'YouTube' => array (
|
58 |
+
'id' => 'fancybox_enableYoutube',
|
59 |
+
'input' => 'checkbox',
|
60 |
+
'hide' => true,
|
61 |
+
'default' => '',
|
62 |
+
'description' => '<strong>' . __('YouTube','easy-fancybox') . '</strong>'
|
63 |
+
),
|
64 |
+
'Vimeo' => array (
|
65 |
+
'id' => 'fancybox_enableVimeo',
|
66 |
+
'input' => 'checkbox',
|
67 |
+
'hide' => true,
|
68 |
+
'default' => '',
|
69 |
+
'description' => '<strong>' . __('Vimeo','easy-fancybox') . '</strong>'
|
70 |
+
),
|
71 |
+
'Dailymotion' => array (
|
72 |
+
'id' => 'fancybox_enableDailymotion',
|
73 |
+
'input' => 'checkbox',
|
74 |
+
'hide' => true,
|
75 |
+
'default' => '',
|
76 |
+
'description' => '<strong>' . __('Dailymotion','easy-fancybox') . '</strong>'
|
77 |
+
),
|
78 |
+
'iFrame' => array (
|
79 |
+
'id' => 'fancybox_enableiFrame',
|
80 |
+
'input' => 'checkbox',
|
81 |
+
'hide' => true,
|
82 |
+
'default' => '',
|
83 |
+
'description' => '<strong>' . __('iFrames','easy-fancybox') . '</strong>'
|
84 |
+
)
|
85 |
+
),
|
86 |
+
'description' => '<a href="'.$efb_url.'"><strong><em>' . __('For advanced options and support, please get the Easy FancyBox - Pro extension.','easy-fancybox') . '</strong></a>'
|
87 |
+
),
|
88 |
+
'Overlay' => array (
|
89 |
+
'title' => __('Overlay','easy-fancybox'),
|
90 |
+
'input' => 'multiple',
|
91 |
+
'hide' => true,
|
92 |
+
'options' => array(
|
93 |
+
'overlayShow' => array (
|
94 |
+
'id' => 'fancybox_overlayShow',
|
95 |
+
'input' => 'checkbox',
|
96 |
+
'noquotes' => true,
|
97 |
+
'default' => '1',
|
98 |
+
'description' => __('Show the overlay around content opened in FancyBox.','easy-fancybox')
|
99 |
+
),
|
100 |
+
'hideOnOverlayClick' => array (
|
101 |
+
'id' => 'fancybox_hideOnOverlayClick',
|
102 |
+
'input' => 'checkbox',
|
103 |
+
'noquotes' => true,
|
104 |
+
'default' => '1',
|
105 |
+
'description' => __('Close FancyBox when overlay is clicked.','easy-fancybox')
|
106 |
+
),
|
107 |
+
'overlayOpacity' => array (
|
108 |
+
'id' => 'fancybox_overlayOpacity',
|
109 |
+
'title' => __('Opacity','easy-fancybox'),
|
110 |
+
'label_for' => 'fancybox_overlayOpacity',
|
111 |
+
'input' => 'number',
|
112 |
+
'step' => '0.1',
|
113 |
+
'min' => '0',
|
114 |
+
'max' => '1',
|
115 |
+
'class' => 'small-text',
|
116 |
+
'default' => '',
|
117 |
+
'description' => __('Value between 0 and 1. ','easy-fancybox') . ' <em>' . __('Default:','easy-fancybox') . ' 0.7</em><br />'
|
118 |
+
),
|
119 |
+
'overlayColor' => array (
|
120 |
+
'id' => 'fancybox_overlayColor',
|
121 |
+
'title' => __('Color','easy-fancybox'),
|
122 |
+
'label_for' => 'fancybox_overlayColor',
|
123 |
+
'input' => 'text',
|
124 |
+
'sanitize_callback' => 'colorval',
|
125 |
+
'class' => 'small-text',
|
126 |
+
'default' => '',
|
127 |
+
'description' => __('Enter an HTML color value.','easy-fancybox') . ' <em>' . __('Default:','easy-fancybox') . ' #777</em><br />'
|
128 |
+
),
|
129 |
+
'overlaySpotlight' => array (
|
130 |
+
'id' => 'fancybox_overlaySpotlight',
|
131 |
+
'input' => 'checkbox',
|
132 |
+
'hide' => true,
|
133 |
+
'status' => get_option('fancybox_overlaySpotlight') ? '' : 'disabled',
|
134 |
+
'default' => '',
|
135 |
+
'description' => __('Spotlight effect','easy-fancybox') . ( get_option('fancybox_overlaySpotlight') ? '' : '. <em><a href="'.$efb_url.'">' . __('Make available »','easy-fancybox') ) . '</a></em>'
|
136 |
+
)
|
137 |
+
)
|
138 |
+
),
|
139 |
+
'Window' => array (
|
140 |
+
'title' => __('Window','easy-fancybox'),
|
141 |
+
'input' => 'multiple',
|
142 |
+
'hide' => true,
|
143 |
+
'options' => array(
|
144 |
+
'p1' => array (
|
145 |
+
'hide' => true,
|
146 |
+
'description' => '<strong>' . __('Appearance','easy-fancybox') . '</strong><br />'
|
147 |
+
),
|
148 |
+
'showCloseButton' => array (
|
149 |
+
'id' => 'fancybox_showCloseButton',
|
150 |
+
'input' => 'checkbox',
|
151 |
+
'noquotes' => true,
|
152 |
+
'default' => '1',
|
153 |
+
'description' => __('Show the (X) close button','easy-fancybox')
|
154 |
+
),
|
155 |
+
'backgroundColor' => array (
|
156 |
+
'id' => 'fancybox_backgroundColor',
|
157 |
+
'hide' => true,
|
158 |
+
'title' => __('Background color','easy-fancybox'),
|
159 |
+
'label_for' => 'fancybox_backgroundColor',
|
160 |
+
'input' => 'text',
|
161 |
+
'sanitize_callback' => 'colorval',
|
162 |
+
'status' => 'disabled',
|
163 |
+
'class' => 'small-text',
|
164 |
+
'default' => '',
|
165 |
+
'description' => ''
|
166 |
+
),
|
167 |
+
'textColor' => array (
|
168 |
+
'id' => 'fancybox_textColor',
|
169 |
+
'hide' => true,
|
170 |
+
'title' => __('Text color','easy-fancybox'),
|
171 |
+
'label_for' => 'fancybox_textColor',
|
172 |
+
'input' => 'text',
|
173 |
+
'sanitize_callback' => 'colorval',
|
174 |
+
'status' => 'disabled',
|
175 |
+
'class' => 'small-text',
|
176 |
+
'default' => '',
|
177 |
+
'description' => '<em><a href="'.$efb_url.'">' . __('Make available »','easy-fancybox') . '</a></em><br />'
|
178 |
+
),
|
179 |
+
'titleColor' => array (
|
180 |
+
'id' => 'fancybox_titleColor',
|
181 |
+
'hide' => true,
|
182 |
+
'title' => __('Title color','easy-fancybox'),
|
183 |
+
'label_for' => 'fancybox_titleColor',
|
184 |
+
'input' => 'text',
|
185 |
+
'sanitize_callback' => 'colorval',
|
186 |
+
'class' => 'small-text',
|
187 |
+
'default' => '',
|
188 |
+
'description' => ''
|
189 |
+
),
|
190 |
+
'paddingColor' => array (
|
191 |
+
'id' => 'fancybox_paddingColor',
|
192 |
+
'hide' => true,
|
193 |
+
'title' => __('Border color','easy-fancybox'),
|
194 |
+
'label_for' => 'fancybox_paddingColor',
|
195 |
+
'input' => 'text',
|
196 |
+
'sanitize_callback' => 'colorval',
|
197 |
+
'class' => 'small-text',
|
198 |
+
'default' => '',
|
199 |
+
'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 />'
|
200 |
+
),
|
201 |
+
'borderRadius' => array (
|
202 |
+
'id' => 'fancybox_borderRadius',
|
203 |
+
'hide' => true,
|
204 |
+
'title' => __('Border radius','easy-fancybox'),
|
205 |
+
'label_for' => 'fancybox_borderRadius',
|
206 |
+
'input' => 'number',
|
207 |
+
'step' => '1',
|
208 |
+
'min' => '0',
|
209 |
+
'max' => '99',
|
210 |
+
'sanitize_callback' => 'intval',
|
211 |
+
'status' => 'disabled',
|
212 |
+
'class' => 'small-text',
|
213 |
+
'default' => '',
|
214 |
+
'description' => '<em><a href="'.$efb_url.'">' . __('Make available »','easy-fancybox') . '</a></em><br />'
|
215 |
+
),
|
216 |
+
|
217 |
+
'p11' => array (
|
218 |
+
'hide' => true,
|
219 |
+
'description' => '<br /><strong>' . __('Dimensions','easy-fancybox') . '</strong><br />'
|
220 |
+
),
|
221 |
+
'width' => array (
|
222 |
+
'id' => 'fancybox_width',
|
223 |
+
'title' => translate('Width'),
|
224 |
+
'label_for' => 'fancybox_width',
|
225 |
+
'input' => 'text',
|
226 |
+
'sanitize_callback' => 'intval',
|
227 |
+
'class' => 'small-text',
|
228 |
+
'default' => '',
|
229 |
+
'description' => ' '
|
230 |
+
),
|
231 |
+
'height' => array (
|
232 |
+
'id' => 'fancybox_height',
|
233 |
+
'title' => translate('Height'),
|
234 |
+
'label_for' => 'fancybox_height',
|
235 |
+
'input' => 'text',
|
236 |
+
'sanitize_callback' => 'intval',
|
237 |
+
'class' => 'small-text',
|
238 |
+
'default' => '',
|
239 |
+
'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 />'
|
240 |
+
),
|
241 |
+
'padding' => array (
|
242 |
+
'id' => 'fancybox_padding',
|
243 |
+
'title' => translate('Border'),
|
244 |
+
'label_for' => 'fancybox_padding',
|
245 |
+
'input' => 'number',
|
246 |
+
'step' => '1',
|
247 |
+
'min' => '0',
|
248 |
+
'max' => '100',
|
249 |
+
'sanitize_callback' => 'intval',
|
250 |
+
'class' => 'small-text',
|
251 |
+
'default' => '',
|
252 |
+
'description' => '<em>' . __('Default:','easy-fancybox') . ' 10</em><br />'
|
253 |
+
),
|
254 |
+
'margin' => array (
|
255 |
+
'id' => 'fancybox_margin',
|
256 |
+
'title' => __('Margin','easy-fancybox'),
|
257 |
+
'label_for' => 'fancybox_margin',
|
258 |
+
'input' => 'number',
|
259 |
+
'step' => '1',
|
260 |
+
'min' => '20',
|
261 |
+
'max' => '80',
|
262 |
+
'sanitize_callback' => 'intval',
|
263 |
+
'class' => 'small-text',
|
264 |
+
'default' => '20',
|
265 |
+
'description' => '<em>' . __('Default:','easy-fancybox') . ' 40</em><br />'
|
266 |
+
),
|
267 |
+
|
268 |
+
'p2' => array (
|
269 |
+
'hide' => true,
|
270 |
+
'description' => '<br /><strong>' . __('Behavior','easy-fancybox') . '</strong><br />'
|
271 |
+
),
|
272 |
+
'centerOnScroll' => array (
|
273 |
+
'id' => 'fancybox_centerOnScroll',
|
274 |
+
'input' => 'checkbox',
|
275 |
+
'noquotes' => true,
|
276 |
+
'default' => '',
|
277 |
+
'description' => __('Center while scrolling (always disabled on touch devices and when content, including the title, might be larger than the viewport)','easy-fancybox')
|
278 |
+
),
|
279 |
+
'enableEscapeButton' => array (
|
280 |
+
'id' => 'fancybox_enableEscapeButton',
|
281 |
+
'input' => 'checkbox',
|
282 |
+
'noquotes' => true,
|
283 |
+
'default' => '1',
|
284 |
+
'description' => __('Esc key stroke closes FancyBox','easy-fancybox')
|
285 |
+
),
|
286 |
+
'autoScale' => array (
|
287 |
+
'id' => 'fancybox_autoScale',
|
288 |
+
'input' => 'checkbox',
|
289 |
+
'noquotes' => true,
|
290 |
+
'default' => '1',
|
291 |
+
'description' => __('Scale large content down to fit in the browser viewport.','easy-fancybox')
|
292 |
+
),
|
293 |
+
'speedIn' => array (
|
294 |
+
'id' => 'fancybox_speedIn',
|
295 |
+
'title' => __('Opening speed','easy-fancybox'),
|
296 |
+
'label_for' => 'fancybox_speedIn',
|
297 |
+
'input' => 'number',
|
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 |
+
'mouseWheel' => array (
|
319 |
+
'id' => 'fancybox_mouseWheel',
|
320 |
+
'hide' => true,
|
321 |
+
'input' => 'checkbox',
|
322 |
+
'default' => '1',
|
323 |
+
'description' => __('Include the Mousewheel jQuery extension script to allow gallery browsing by mousewheel action.','easy-fancybox')
|
324 |
+
)
|
325 |
+
)
|
326 |
+
),
|
327 |
+
|
328 |
+
'Miscellaneous' => array (
|
329 |
+
'title' => __('Miscellaneous','easy-fancybox'),
|
330 |
+
'input' => 'multiple',
|
331 |
+
'hide' => true,
|
332 |
+
'options' => array(
|
333 |
+
'p0' => array (
|
334 |
+
'hide' => true,
|
335 |
+
'description' => '<strong>' . __('Auto popup','easy-fancybox') . '</strong><br />'
|
336 |
+
),
|
337 |
+
'autoClick' => array (
|
338 |
+
'id' => 'fancybox_autoClick',
|
339 |
+
'title' => __('Open on page load','easy-fancybox'),
|
340 |
+
'label_for' => 'fancybox_autoClick',
|
341 |
+
'hide' => true,
|
342 |
+
'input' => 'select',
|
343 |
+
'options' => array(
|
344 |
+
'' => translate('None'),
|
345 |
+
'1' => __('Link with ID "fancybox-auto"','easy-fancybox'),
|
346 |
+
),
|
347 |
+
'default' => '1',
|
348 |
+
'description' => '<em><a href="'.$efb_url.'">' . __('More options »','easy-fancybox') . '</a></em><br />'
|
349 |
+
),
|
350 |
+
'delayClick' => array (
|
351 |
+
'id' => 'fancybox_delayClick',
|
352 |
+
'title' => __('Delay in milliseconds','easy-fancybox'),
|
353 |
+
'label_for' => 'fancybox_delayClick',
|
354 |
+
'hide' => true,
|
355 |
+
'input' => 'number',
|
356 |
+
'step' => '100',
|
357 |
+
'min' => '0',
|
358 |
+
'max' => '',
|
359 |
+
'sanitize_callback' => 'intval',
|
360 |
+
'class' => 'small-text',
|
361 |
+
'default' => '1000',
|
362 |
+
'description' => ' <em>' . __('Default:','easy-fancybox') . ' 1000</em><br />'
|
363 |
+
),
|
364 |
+
'jqCookie' => array (
|
365 |
+
'id' => '',
|
366 |
+
'title' => __('Hide popup after first visit?','easy-fancybox'),
|
367 |
+
'hide' => true,
|
368 |
+
'input' => 'select',
|
369 |
+
'status' => 'disabled',
|
370 |
+
'default' => '0',
|
371 |
+
'sanitize_callback' => 'intval',
|
372 |
+
'options' => array(
|
373 |
+
'0' => translate('No'),
|
374 |
+
'1' => __('1 Day','easy-fancybox'),
|
375 |
+
'7' => __('1 Week','easy-fancybox'),
|
376 |
+
'30' => __('1 Month','easy-fancybox'),
|
377 |
+
'365' => __('1 Year','easy-fancybox')
|
378 |
+
),
|
379 |
+
'description' => ' <em><a href="'.$efb_url.'">' . __('Make available »','easy-fancybox') . '</a></em><br />'
|
380 |
+
),
|
381 |
+
'cookiePath' => array (
|
382 |
+
'id' => '',
|
383 |
+
'default' => '',
|
384 |
+
'hide' => true
|
385 |
+
),
|
386 |
+
'p1' => array (
|
387 |
+
'hide' => true,
|
388 |
+
'description' => '<br /><strong>' . __('Browser & device compatibility','easy-fancybox') . '</strong><br />'
|
389 |
+
),
|
390 |
+
'minViewportWidth' => array (
|
391 |
+
'id' => 'fancybox_minViewportWidth',
|
392 |
+
'title' => __('Minimum browser/device viewport width','easy-fancybox'),
|
393 |
+
'label_for' => 'fancybox_minViewportWidth',
|
394 |
+
'input' => 'number',
|
395 |
+
'step' => '1',
|
396 |
+
'min' => '320',
|
397 |
+
'max' => '900',
|
398 |
+
'sanitize_callback' => 'intval',
|
399 |
+
'class' => 'small-text',
|
400 |
+
'default' => '',
|
401 |
+
'description' => __('(leave empty to ignore)','easy-fancybox') . '<br/>'
|
402 |
+
),
|
403 |
+
/* 'forceNewtab' => array (
|
404 |
+
'id' => 'fancybox_forceNewtab',
|
405 |
+
'input' => 'checkbox',
|
406 |
+
'hide' => true,
|
407 |
+
'default' => '1',
|
408 |
+
'description' => __('Make media links open in a new tab when viewport falls below minimum width (above)','easy-fancybox')
|
409 |
+
),*/
|
410 |
+
'compatIE8' => array (
|
411 |
+
'id' => 'fancybox_compatIE8',
|
412 |
+
'input' => 'checkbox',
|
413 |
+
'hide' => true,
|
414 |
+
'default' => '',
|
415 |
+
'description' => __('Include IE 8 compatibility style rules','easy-fancybox')
|
416 |
+
),
|
417 |
+
'p2' => array (
|
418 |
+
'hide' => true,
|
419 |
+
'description' => '<br /><strong>' . __('Theme & plugins compatibility','easy-fancybox') . '</strong><br />'
|
420 |
+
. __('Try to deactivate all conflicting light box scripts in your theme or other plugins. If this is not possible, try a higher script priority number which means scripts are added later, wich may allow them to override conflicting scripts. A lower priority number, excluding WordPress standard jQuery, or even moving the plugin scripts to the header may work in cases where there are blocking errors occuring in other script.','easy-fancybox')
|
421 |
+
. '<br /><br />'
|
422 |
+
),
|
423 |
+
'scriptPriority' => array (
|
424 |
+
'id' => 'fancybox_scriptPriority',
|
425 |
+
'title' => __('FancyBox script priority','easy-fancybox'),
|
426 |
+
'label_for' => 'fancybox_scriptPriority',
|
427 |
+
'input' => 'number',
|
428 |
+
'step' => '1',
|
429 |
+
'min' => '-999',
|
430 |
+
'max' => '999',
|
431 |
+
'sanitize_callback' => 'intval',
|
432 |
+
'class' => 'small-text',
|
433 |
+
'default' => '10',
|
434 |
+
'description' => __('Default priority is 10.','easy-fancybox') . ' ' . __('Higher is later.','easy-fancybox') . '<br/>'
|
435 |
+
),
|
436 |
+
'noFooter' => array (
|
437 |
+
'id' => 'fancybox_noFooter',
|
438 |
+
'input' => 'checkbox',
|
439 |
+
'hide' => true,
|
440 |
+
'default' => '',
|
441 |
+
'description' => __('Move scripts from footer to theme head section (not recommended for site load times!)','easy-fancybox')
|
442 |
+
),
|
443 |
+
'nojQuery' => array (
|
444 |
+
'id' => 'fancybox_nojQuery',
|
445 |
+
'input' => 'checkbox',
|
446 |
+
'hide' => true,
|
447 |
+
'default' => '',
|
448 |
+
'description' => __('Do not include standard WordPress jQuery library (do this only if you are sure jQuery is included from another source!)','easy-fancybox')
|
449 |
+
),
|
450 |
+
'pre45Compat' => array (
|
451 |
+
'id' => 'fancybox_pre45Compat',
|
452 |
+
'input' => 'checkbox',
|
453 |
+
'hide' => true,
|
454 |
+
'default' => function_exists( 'wp_add_inline_script' ) ? '' : '1',
|
455 |
+
'description' => __('Do not use wp_add_inline_script/style functions (may solve issues with older script minification plugins)','easy-fancybox')
|
456 |
+
),
|
457 |
+
'p3' => array (
|
458 |
+
'hide' => true,
|
459 |
+
'description' => '<br /><strong>' . __('Advanced','easy-fancybox') . '</strong><br />'
|
460 |
+
),
|
461 |
+
'metaData' => array (
|
462 |
+
'id' => 'fancybox_metaData',
|
463 |
+
'hide' => true,
|
464 |
+
'input' => 'checkbox',
|
465 |
+
'status' => get_option('fancybox_metaData') ? '' : 'disabled',
|
466 |
+
'default' => '',
|
467 |
+
'description' => __('Include the Metadata jQuery extension script to allow passing custom parameters via link class.','easy-fancybox') . ( get_option('fancybox_metaData') ? '' : '. <em><a href="'.$efb_url.'">' . __('Make available »','easy-fancybox') ) . '</a></em>'
|
468 |
+
)
|
469 |
+
)
|
470 |
+
)
|
471 |
+
)
|
472 |
+
),
|
473 |
+
|
474 |
+
'IMG' => array(
|
475 |
+
'title' => __('Images','easy-fancybox'),
|
476 |
+
'input' => 'multiple',
|
477 |
+
'options' => array(
|
478 |
+
'intro' => array (
|
479 |
+
'hide' => true,
|
480 |
+
'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 />'
|
481 |
+
),
|
482 |
+
'tag' => array (
|
483 |
+
'hide' => true,
|
484 |
+
'default' => 'a.fancybox,area.fancybox,li.fancybox a'
|
485 |
+
),
|
486 |
+
'class' => array (
|
487 |
+
'hide' => true,
|
488 |
+
'default' => 'fancybox image'
|
489 |
+
),
|
490 |
+
'autoAttribute' => array (
|
491 |
+
'id' => 'fancybox_autoAttribute',
|
492 |
+
'title' => __('Autodetect','easy-fancybox'),
|
493 |
+
'label_for' => 'fancybox_autoAttribute',
|
494 |
+
'input' => 'text',
|
495 |
+
'class' => 'regular-text',
|
496 |
+
'hide' => true,
|
497 |
+
'default' => '.jpg .jpeg .png .webp',
|
498 |
+
'selector' => 'href*=',
|
499 |
+
'description' => ' <em>' . __('Example:','easy-fancybox') . ' .jpg .jpeg .png .gif</em><br />'
|
500 |
+
),
|
501 |
+
'autoAttributeLimit' => array (
|
502 |
+
'id' => 'fancybox_autoAttributeLimit',
|
503 |
+
'title' => __('Apply to','easy-fancybox'),
|
504 |
+
'label_for' => 'fancybox_autoAttributeLimit',
|
505 |
+
'hide' => true,
|
506 |
+
'input' => 'select',
|
507 |
+
'options' => array(
|
508 |
+
'' => __('All image links', 'easy-fancybox')
|
509 |
+
),
|
510 |
+
'default' => '',
|
511 |
+
'description' => '<em><a href="'.$efb_url.'">' . __('More options »','easy-fancybox') . '</a></em><br />'
|
512 |
+
),
|
513 |
+
'type' => array (
|
514 |
+
'id' => 'fancybox_classType',
|
515 |
+
'title' => __('Force FancyBox to treat all media linked with class="fancybox" as images?','easy-fancybox'),
|
516 |
+
'label_for' => 'fancybox_classType',
|
517 |
+
'input' => 'select',
|
518 |
+
'options' => array(
|
519 |
+
'image' => translate('Yes'),
|
520 |
+
'' => translate('No')
|
521 |
+
),
|
522 |
+
'default' => get_option('fancybox_enableInline') ? 'image' : '',
|
523 |
+
'description' => '<br/>'
|
524 |
+
),
|
525 |
+
'p2' => array (
|
526 |
+
'hide' => true,
|
527 |
+
'description' => '<br /><strong>' . __('Behavior','easy-fancybox') . '</strong><br />'
|
528 |
+
),
|
529 |
+
'transitionIn' => array (
|
530 |
+
'id' => 'fancybox_transitionIn',
|
531 |
+
'title' => __('Transition In','easy-fancybox'),
|
532 |
+
'label_for' => 'fancybox_transitionIn',
|
533 |
+
'input' => 'select',
|
534 |
+
'options' => array(
|
535 |
+
'none' => translate('None'),
|
536 |
+
'' => __('Fade','easy-fancybox'),
|
537 |
+
'elastic' => __('Elastic','easy-fancybox'),
|
538 |
+
),
|
539 |
+
'default' => 'elastic',
|
540 |
+
'description' => ' '
|
541 |
+
),
|
542 |
+
'easingIn' => array (
|
543 |
+
'id' => 'fancybox_easingIn',
|
544 |
+
'title' => __('Easing In','easy-fancybox'),
|
545 |
+
'label_for' => 'fancybox_easingIn',
|
546 |
+
'input' => 'select',
|
547 |
+
'options' => array(
|
548 |
+
'linear' => __('Linear','easy-fancybox'),
|
549 |
+
'' => __('Swing','easy-fancybox'),
|
550 |
+
'easeInBack' => __('easeInBack','easy-fancybox'),
|
551 |
+
'easeOutBack' => __('easeOutBack','easy-fancybox')
|
552 |
+
),
|
553 |
+
'default' => 'easeOutBack',
|
554 |
+
'description' => ' <em><a href="'.$efb_url.'">' . __('More options »','easy-fancybox') . '</a></em><br />'
|
555 |
+
),
|
556 |
+
'transitionOut' => array (
|
557 |
+
'id' => 'fancybox_transitionOut',
|
558 |
+
'title' => __('Transition Out','easy-fancybox'),
|
559 |
+
'label_for' => 'fancybox_transitionOut',
|
560 |
+
'input' => 'select',
|
561 |
+
'options' => array(
|
562 |
+
'none' => translate('None'),
|
563 |
+
'' => __('Fade','easy-fancybox'),
|
564 |
+
'elastic' => __('Elastic','easy-fancybox'),
|
565 |
+
),
|
566 |
+
'default' => 'elastic',
|
567 |
+
'description' => ' '
|
568 |
+
),
|
569 |
+
'easingOut' => array (
|
570 |
+
'id' => 'fancybox_easingOut',
|
571 |
+
'title' => __('Easing Out','easy-fancybox'),
|
572 |
+
'label_for' => 'fancybox_easingOut',
|
573 |
+
'input' => 'select',
|
574 |
+
'options' => array(
|
575 |
+
'linear' => __('Linear','easy-fancybox'),
|
576 |
+
'' => __('Swing','easy-fancybox'),
|
577 |
+
'easeInBack' => __('easeInBack','easy-fancybox'),
|
578 |
+
'easeOutBack' => __('easeOutBack','easy-fancybox')
|
579 |
+
),
|
580 |
+
'default' => 'easeInBack',
|
581 |
+
'description' => ' <em><a href="'.$efb_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 />'
|
582 |
+
),
|
583 |
+
'opacity' => array (
|
584 |
+
'id' => 'fancybox_opacity',
|
585 |
+
'input' => 'checkbox',
|
586 |
+
'noquotes' => true,
|
587 |
+
'default' => '',
|
588 |
+
'description' => __('Transparency fade during elastic transition. CAUTION: Use only when at least Transition In is set to Elastic!','easy-fancybox')
|
589 |
+
),
|
590 |
+
'hideOnContentClick' => array (
|
591 |
+
'id' => 'fancybox_hideOnContentClick',
|
592 |
+
'input' => 'checkbox',
|
593 |
+
'noquotes' => true,
|
594 |
+
'default' => '',
|
595 |
+
'description' => __('Close FancyBox when content is clicked','easy-fancybox')
|
596 |
+
),
|
597 |
+
'p1' => array (
|
598 |
+
'hide' => true,
|
599 |
+
'description' => '<br /><strong>' . __('Appearance','easy-fancybox') . '</strong><br />'
|
600 |
+
),
|
601 |
+
'titleShow' => array (
|
602 |
+
'id' => 'fancybox_titleShow',
|
603 |
+
'input' => 'checkbox',
|
604 |
+
'noquotes' => true,
|
605 |
+
'default' => '1',
|
606 |
+
'description' => __('Show title.','easy-fancybox') . ' ' . __('FancyBox will try to get a title from the link or thumbnail title attributes.','easy-fancybox')
|
607 |
+
),
|
608 |
+
'titlePosition' => array (
|
609 |
+
'id' => 'fancybox_titlePosition',
|
610 |
+
'title' => __('Title Position','easy-fancybox'),
|
611 |
+
'label_for' => 'fancybox_titlePosition',
|
612 |
+
'input' => 'select',
|
613 |
+
'options' => array(
|
614 |
+
'' => __('Float','easy-fancybox'),
|
615 |
+
'outside' => __('Outside','easy-fancybox'),
|
616 |
+
'inside' => __('Inside','easy-fancybox'),
|
617 |
+
'over' => __('Overlay','easy-fancybox')
|
618 |
+
),
|
619 |
+
'default' => 'over',
|
620 |
+
'description' => '<br />'
|
621 |
+
),
|
622 |
+
'titleFromAlt' => array (
|
623 |
+
'id' => 'fancybox_titleFromAlt',
|
624 |
+
'input' => 'checkbox',
|
625 |
+
'noquotes' => true,
|
626 |
+
'default' => '1',
|
627 |
+
'description' => __('Allow title from thumbnail alt attribute.','easy-fancybox')
|
628 |
+
),
|
629 |
+
'onStart' => array (
|
630 |
+
'id' => '',
|
631 |
+
'title' => __('Advanced','easy-fancybox'),
|
632 |
+
'input' => 'select',
|
633 |
+
'status' => 'disabled',
|
634 |
+
'options' => array(
|
635 |
+
'' => __('Hide/show title on mouse hover action','easy-fancybox')
|
636 |
+
),
|
637 |
+
'default' => '',
|
638 |
+
'description' => '<em><a href="'.$efb_url.'">' . __('Make available »','easy-fancybox') . '</a></em><br />'
|
639 |
+
),
|
640 |
+
'p3' => array (
|
641 |
+
'hide' => true,
|
642 |
+
'description' => '<br /><strong>' . __('Gallery','easy-fancybox') . '</strong><br />'
|
643 |
+
),
|
644 |
+
'autoGallery' => array (
|
645 |
+
'id' => 'fancybox_autoGallery',
|
646 |
+
'title' => __('Autogallery','easy-fancybox'),
|
647 |
+
'label_for' => 'fancybox_autoGallery',
|
648 |
+
'hide' => true,
|
649 |
+
'input' => 'select',
|
650 |
+
'options' => array(
|
651 |
+
'' => translate('Disabled'),
|
652 |
+
'1' => __('WordPress galleries only','easy-fancybox'),
|
653 |
+
'2' => __('All in one gallery','easy-fancybox')
|
654 |
+
),
|
655 |
+
'default' => '1',
|
656 |
+
'description' => '<em><a href="'.$efb_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 />'
|
657 |
+
),
|
658 |
+
'showNavArrows' => array (
|
659 |
+
'id' => 'fancybox_showNavArrows',
|
660 |
+
'input' => 'checkbox',
|
661 |
+
'noquotes' => true,
|
662 |
+
'default' => '1',
|
663 |
+
'description' => __('Show the gallery navigation arrows','easy-fancybox')
|
664 |
+
),
|
665 |
+
'enableKeyboardNav' => array (
|
666 |
+
'id' => 'fancybox_enableKeyboardNav',
|
667 |
+
'input' => 'checkbox',
|
668 |
+
'noquotes' => true,
|
669 |
+
'default' => '1',
|
670 |
+
'description' => __('Arrow key strokes browse the gallery','easy-fancybox')
|
671 |
+
),
|
672 |
+
'cyclic' => array (
|
673 |
+
'id' => 'fancybox_cyclic',
|
674 |
+
'input' => 'checkbox',
|
675 |
+
'noquotes' => true,
|
676 |
+
'default' => '',
|
677 |
+
'description' => __('Make galleries cyclic, allowing you to keep pressing next/back.','easy-fancybox')
|
678 |
+
),
|
679 |
+
'changeSpeed' => array (
|
680 |
+
'id' => 'fancybox_changeSpeed',
|
681 |
+
'title' => __('Change speed','easy-fancybox'),
|
682 |
+
'label_for' => 'fancybox_changeSpeed',
|
683 |
+
'input' => 'number',
|
684 |
+
'step' => '1',
|
685 |
+
'min' => '0',
|
686 |
+
'max' => '6000',
|
687 |
+
'sanitize_callback' => 'intval',
|
688 |
+
'class' => 'small-text',
|
689 |
+
'default' => '',
|
690 |
+
),
|
691 |
+
'changeFade' => array (
|
692 |
+
'id' => 'fancybox_changeFade',
|
693 |
+
'title' => __('Fade speed','easy-fancybox'),
|
694 |
+
'label_for' => 'fancybox_changeFade',
|
695 |
+
'input' => 'number',
|
696 |
+
'step' => '1',
|
697 |
+
'min' => '0',
|
698 |
+
'max' => '6000',
|
699 |
+
'sanitize_callback' => 'intval',
|
700 |
+
'class' => 'small-text',
|
701 |
+
'default' => '',
|
702 |
+
'description' => '<br />' . __('Duration in milliseconds. Higher is slower.','easy-fancybox') . ' <em>' . __('Default:','easy-fancybox') . ' 300</em><br /><br />'
|
703 |
+
),
|
704 |
+
'autoSelector' => array (
|
705 |
+
'id' => 'fancybox_autoSelector',
|
706 |
+
'hide' => true,
|
707 |
+
'input' => 'hidden',
|
708 |
+
'default' => 'div.gallery,div.wp-block-gallery,div.tiled-gallery' // add div.tiled-gallery for Tiled Galleries support
|
709 |
+
),
|
710 |
+
'onComplete' => array (
|
711 |
+
'id' => '',
|
712 |
+
'title' => __('Advanced','easy-fancybox'),
|
713 |
+
'input' => 'select',
|
714 |
+
'status' => 'disabled',
|
715 |
+
'options' => array(
|
716 |
+
'' => __('Slideshow','easy-fancybox')
|
717 |
+
),
|
718 |
+
'default' => '',
|
719 |
+
'description' => '<em><a href="'.$efb_url.'">' . __('Make available »','easy-fancybox') . '</a></em>'
|
720 |
+
),
|
721 |
+
/* 'titleFormat' => array (
|
722 |
+
'id' => 'fancybox_titleFormat',
|
723 |
+
'title' => __('Title format','easy-fancybox'),
|
724 |
+
'label_for' => 'fancybox_titleFormat',
|
725 |
+
'input' => 'select',
|
726 |
+
'options' => array(
|
727 |
+
'' => __('Default FancyBox style','easy-fancybox'),
|
728 |
+
'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>\';
|
729 |
+
}' => __('Mimic Lightbox2 style','easy-fancybox'),
|
730 |
+
),
|
731 |
+
'noquotes' => true,
|
732 |
+
'default' => '',
|
733 |
+
'description' => '<br />' . __('To improve Lightbox2 style disable Show close button and set titleposition to Inside or Outside','easy-fancybox') . '<br />'
|
734 |
+
),*/
|
735 |
+
)
|
736 |
+
),
|
737 |
+
|
738 |
+
'Inline' => array(
|
739 |
+
'title' => __('Inline content','easy-fancybox'),
|
740 |
+
'input' => 'multiple',
|
741 |
+
'options' => array(
|
742 |
+
'intro' => array (
|
743 |
+
'hide' => true,
|
744 |
+
'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 />'
|
745 |
+
),
|
746 |
+
'tag' => array (
|
747 |
+
'hide' => true,
|
748 |
+
'default' => 'a.fancybox-inline,area.fancybox-inline,li.fancybox-inline a'
|
749 |
+
),
|
750 |
+
'class' => array (
|
751 |
+
'hide' => true,
|
752 |
+
'default' => 'fancybox-inline'
|
753 |
+
),
|
754 |
+
'type' => array (
|
755 |
+
'default' => 'inline'
|
756 |
+
),
|
757 |
+
'autoDimensions' => array (
|
758 |
+
'id' => 'fancybox_autoDimensions',
|
759 |
+
'input' => 'checkbox',
|
760 |
+
'noquotes' => true,
|
761 |
+
'default' => '1',
|
762 |
+
'description' => __('Try to adjust size to inline/html content. If unchecked the default dimensions will be used.','easy-fancybox') . ''
|
763 |
+
),
|
764 |
+
'scrolling' => array (
|
765 |
+
'id' => 'fancybox_InlineScrolling',
|
766 |
+
'title' => __('Scrolling','easy-fancybox'),
|
767 |
+
'label_for' => 'fancybox_InlineScrolling',
|
768 |
+
'input' => 'select',
|
769 |
+
'options' => array(
|
770 |
+
'auto' => __('Auto','easy-fancybox'),
|
771 |
+
'yes' => __('Always','easy-fancybox'),
|
772 |
+
'no' => __('Never','easy-fancybox')
|
773 |
+
),
|
774 |
+
'default' => 'no',
|
775 |
+
'description' => __('Define scrolling and scrollbar visibility.','easy-fancybox') . '<br /><br />'
|
776 |
+
),
|
777 |
+
'transitionIn' => array (
|
778 |
+
'id' => 'fancybox_transitionInInline',
|
779 |
+
'title' => __('Transition In','easy-fancybox'),
|
780 |
+
'label_for' => 'fancybox_transitionInInline',
|
781 |
+
'input' => 'select',
|
782 |
+
'options' => array(
|
783 |
+
'none' => translate('None'),
|
784 |
+
'' => __('Fade','easy-fancybox'),
|
785 |
+
'elastic' => __('Elastic','easy-fancybox'),
|
786 |
+
),
|
787 |
+
'default' => '',
|
788 |
+
'description' => ' '
|
789 |
+
),
|
790 |
+
'easingIn' => array (
|
791 |
+
'id' => 'fancybox_easingInInline',
|
792 |
+
'title' => __('Easing In','easy-fancybox'),
|
793 |
+
'label_for' => 'fancybox_easingInInline',
|
794 |
+
'input' => 'select',
|
795 |
+
'options' => array(
|
796 |
+
'linear' => __('Linear','easy-fancybox'),
|
797 |
+
'' => __('Swing','easy-fancybox'),
|
798 |
+
'easeInBack' => __('easeInBack','easy-fancybox'),
|
799 |
+
'easeOutBack' => __('easeOutBack','easy-fancybox')
|
800 |
+
),
|
801 |
+
'default' => 'easeOutBack',
|
802 |
+
'description' => ' <em><a href="'.$efb_url.'">' . __('More options »','easy-fancybox') . '</a></em><br />'
|
803 |
+
),
|
804 |
+
'transitionOut' => array (
|
805 |
+
'id' => 'fancybox_transitionOutInline',
|
806 |
+
'title' => __('Transition Out','easy-fancybox'),
|
807 |
+
'label_for' => 'fancybox_transitionOutInline',
|
808 |
+
'input' => 'select',
|
809 |
+
'options' => array(
|
810 |
+
'none' => translate('None'),
|
811 |
+
'' => __('Fade','easy-fancybox'),
|
812 |
+
'elastic' => __('Elastic','easy-fancybox'),
|
813 |
+
),
|
814 |
+
'default' => '',
|
815 |
+
'description' => ' '
|
816 |
+
),
|
817 |
+
'easingOut' => array (
|
818 |
+
'id' => 'fancybox_easingOutInline',
|
819 |
+
'title' => __('Easing Out','easy-fancybox'),
|
820 |
+
'label_for' => 'fancybox_easingOutInline',
|
821 |
+
'input' => 'select',
|
822 |
+
'options' => array(
|
823 |
+
'linear' => __('Linear','easy-fancybox'),
|
824 |
+
'' => __('Swing','easy-fancybox'),
|
825 |
+
'easeInBack' => __('easeInBack','easy-fancybox'),
|
826 |
+
'easeOutBack' => __('easeOutBack','easy-fancybox')
|
827 |
+
),
|
828 |
+
'default' => 'easeInBack',
|
829 |
+
'description' => ' <em><a href="'.$efb_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 />'
|
830 |
+
),
|
831 |
+
'opacity' => array (
|
832 |
+
'id' => 'fancybox_opacityInline',
|
833 |
+
'input' => 'checkbox',
|
834 |
+
'noquotes' => true,
|
835 |
+
'default' => '',
|
836 |
+
'description' => __('Transparency fade during elastic transition. CAUTION: Use only when at least Transition In is set to Elastic!','easy-fancybox')
|
837 |
+
),
|
838 |
+
'hideOnContentClick' => array (
|
839 |
+
'id' => 'fancybox_hideOnContentClickInline',
|
840 |
+
'input' => 'checkbox',
|
841 |
+
'noquotes' => true,
|
842 |
+
'default' => '',
|
843 |
+
'description' => __('Close FancyBox when content is clicked','easy-fancybox')
|
844 |
+
),
|
845 |
+
'titleShow' => array (
|
846 |
+
'noquotes' => true,
|
847 |
+
'default' => 'false',
|
848 |
+
)
|
849 |
+
)
|
850 |
+
),
|
851 |
+
|
852 |
+
'PDF' => array(
|
853 |
+
'title' => __('PDF','easy-fancybox'),
|
854 |
+
'input' => 'multiple',
|
855 |
+
'options' => array(
|
856 |
+
'intro' => array (
|
857 |
+
'hide' => true,
|
858 |
+
'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 />'
|
859 |
+
),
|
860 |
+
'autoAttribute' => array (
|
861 |
+
'id' => 'fancybox_autoAttributePDF',
|
862 |
+
'input' => 'checkbox',
|
863 |
+
'hide' => true,
|
864 |
+
'default' => '1',
|
865 |
+
'selector' => 'a[href*=".pdf"],area[href*=".pdf"],a[href*=".PDF"],area[href*=".PDF"]',
|
866 |
+
'description' => __('Autodetect','easy-fancybox')
|
867 |
+
),
|
868 |
+
'tag' => array (
|
869 |
+
'hide' => true,
|
870 |
+
'default' => 'a.fancybox-pdf,area.fancybox-pdf,li.fancybox-pdf a'
|
871 |
+
),
|
872 |
+
'class' => array (
|
873 |
+
'hide' => true,
|
874 |
+
'default' => 'fancybox-pdf'
|
875 |
+
),
|
876 |
+
'type' => array (
|
877 |
+
'default' => 'iframe'
|
878 |
+
),
|
879 |
+
'onStart' => array (
|
880 |
+
'id' => 'fancybox_PDFonStart',
|
881 |
+
'noquotes' => true,
|
882 |
+
'title' => __('Embed with','easy-fancybox'),
|
883 |
+
'label_for' => 'fancybox_PDFtitlePosition',
|
884 |
+
'input' => 'select',
|
885 |
+
'options' => array(
|
886 |
+
'function(a,i,o){o.type=\'pdf\';}' => __('Object tag (plus fall-back link)','easy-fancybox'),
|
887 |
+
'function(a,i,o){o.content=\'<embed src="\'+a[i].href+\'" type="application/pdf" height="100%" width="100%" />\'}' => __('Embed tag','easy-fancybox'),
|
888 |
+
'' => __('iFrame tag (let browser decide)','easy-fancybox'),
|
889 |
+
'function(a,i,o){o.href=\'https://docs.google.com/viewer?embedded=true&url=\'+a[i].href;}' => __('Google Docs Viewer (external)','easy-fancybox')
|
890 |
+
),
|
891 |
+
'default' => '',
|
892 |
+
// 'function(a,i,o){o.content=\'<object data="\'+a[i].href+\'" type="application/pdf" height="100%" width="100%"><a href="\'+a[i].href+\'" style="display:block;position:absolute;top:48%;width:100%;text-align:center">\'+jQuery(a[i]).html()+\'</a></object>\'}'
|
893 |
+
// 'function(a, i, o) { o.content = \'<embed src="\' + a[i].href + \'#toolbar=1&navpanes=0&nameddest=self&page=1&view=FitH,0&zoom=80,0,0" type="application/pdf" height="100%" width="100%" />\' }'
|
894 |
+
'description' => __('Note:','easy-fancybox') . ' ' . __('External viewers have bandwidth, usage rate and and file size limits.','easy-fancybox') . '<br /><br />' //' <em><a href="'.$efb_url.'">' . __('More options »','easy-fancybox') . '</a></em><br /><br />'
|
895 |
+
),
|
896 |
+
'width' => array (
|
897 |
+
'id' => 'fancybox_PDFwidth',
|
898 |
+
'title' => translate('Width'),
|
899 |
+
'label_for' => 'fancybox_PDFwidth',
|
900 |
+
'input' => 'text',
|
901 |
+
'sanitize_callback' => 'intval',
|
902 |
+
'class' => 'small-text',
|
903 |
+
'default' => '90%',
|
904 |
+
'description' => ' '
|
905 |
+
),
|
906 |
+
'height' => array (
|
907 |
+
'id' => 'fancybox_PDFheight',
|
908 |
+
'title' => translate('Height'),
|
909 |
+
'label_for' => 'fancybox_PDFheight',
|
910 |
+
'input' => 'text',
|
911 |
+
'sanitize_callback' => 'intval',
|
912 |
+
'class' => 'small-text',
|
913 |
+
'default' => '90%'
|
914 |
+
),
|
915 |
+
'padding' => array (
|
916 |
+
'id' => 'fancybox_PDFpadding',
|
917 |
+
'title' => translate('Border'),
|
918 |
+
'label_for' => 'fancybox_PDFpadding',
|
919 |
+
'input' => 'number',
|
920 |
+
'step' => '1',
|
921 |
+
'min' => '0',
|
922 |
+
'max' => '100',
|
923 |
+
'sanitize_callback' => 'intval',
|
924 |
+
'class' => 'small-text',
|
925 |
+
'default' => '10',
|
926 |
+
'description' => '<br /><br />'
|
927 |
+
),
|
928 |
+
'titleShow' => array (
|
929 |
+
'id' => 'fancybox_PDFtitleShow',
|
930 |
+
'input' => 'checkbox',
|
931 |
+
'noquotes' => true,
|
932 |
+
'default' => '',
|
933 |
+
'description' => __('Show title.','easy-fancybox') . ' ' . __('FancyBox will try to get a title from the link or thumbnail title attributes.','easy-fancybox')
|
934 |
+
),
|
935 |
+
'titlePosition' => array (
|
936 |
+
'id' => 'fancybox_PDFtitlePosition',
|
937 |
+
'title' => __('Title Position','easy-fancybox'),
|
938 |
+
'label_for' => 'fancybox_PDFtitlePosition',
|
939 |
+
'input' => 'select',
|
940 |
+
'options' => array(
|
941 |
+
'float' => __('Float','easy-fancybox'),
|
942 |
+
'outside' => __('Outside','easy-fancybox'),
|
943 |
+
'inside' => __('Inside','easy-fancybox')
|
944 |
+
),
|
945 |
+
'default' => 'float',
|
946 |
+
'description' => '<br />'
|
947 |
+
),
|
948 |
+
'titleFromAlt' => array (
|
949 |
+
'id' => 'fancybox_PDFtitleFromAlt',
|
950 |
+
'input' => 'checkbox',
|
951 |
+
'noquotes' => true,
|
952 |
+
'default' => '1',
|
953 |
+
'description' => __('Allow title from thumbnail alt attribute.','easy-fancybox')
|
954 |
+
),
|
955 |
+
'autoDimensions' => array (
|
956 |
+
'noquotes' => true,
|
957 |
+
'default' => 'false'
|
958 |
+
),
|
959 |
+
'scrolling' => array (
|
960 |
+
'default' => 'no',
|
961 |
+
),
|
962 |
+
)
|
963 |
+
),
|
964 |
+
|
965 |
+
'SWF' => array(
|
966 |
+
'title' => __('SWF','easy-fancybox'),
|
967 |
+
'input' => 'multiple',
|
968 |
+
'options' => array(
|
969 |
+
'intro' => array (
|
970 |
+
'hide' => true,
|
971 |
+
'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 />'
|
972 |
+
),
|
973 |
+
'autoAttribute' => array (
|
974 |
+
'id' => 'fancybox_autoAttributeSWF',
|
975 |
+
'input' => 'checkbox',
|
976 |
+
'hide' => true,
|
977 |
+
'default' => '1',
|
978 |
+
'selector' => 'a[href*=".swf"],area[href*=".swf"],a[href*=".SWF"],area[href*=".SWF"]',
|
979 |
+
'description' => __('Autodetect','easy-fancybox') . '<br />'
|
980 |
+
),
|
981 |
+
'tag' => array (
|
982 |
+
'hide' => true,
|
983 |
+
'default' => 'a.fancybox-swf,area.fancybox-swf,li.fancybox-swf a'
|
984 |
+
),
|
985 |
+
'class' => array (
|
986 |
+
'hide' => true,
|
987 |
+
'default' => 'fancybox-swf'
|
988 |
+
),
|
989 |
+
'type' => array(
|
990 |
+
'default' => 'swf'
|
991 |
+
),
|
992 |
+
'width' => array (
|
993 |
+
'id' => 'fancybox_SWFWidth',
|
994 |
+
'title' => translate('Width'),
|
995 |
+
'label_for' => 'fancybox_SWFWidth',
|
996 |
+
'input' => 'text',
|
997 |
+
'sanitize_callback' => 'intval',
|
998 |
+
'class' => 'small-text',
|
999 |
+
'options' => array(),
|
1000 |
+
'default' => '680',
|
1001 |
+
'description' => ' '
|
1002 |
+
),
|
1003 |
+
'height' => array (
|
1004 |
+
'id' => 'fancybox_SWFHeight',
|
1005 |
+
'title' => translate('Height'),
|
1006 |
+
'label_for' => 'fancybox_SWFHeight',
|
1007 |
+
'input' => 'text',
|
1008 |
+
'sanitize_callback' => 'intval',
|
1009 |
+
'class' => 'small-text',
|
1010 |
+
'options' => array(),
|
1011 |
+
'default' => '495',
|
1012 |
+
),
|
1013 |
+
'padding' => array (
|
1014 |
+
'id' => 'fancybox_SWFpadding',
|
1015 |
+
'title' => translate('Border'),
|
1016 |
+
'label_for' => 'fancybox_SWFpadding',
|
1017 |
+
'input' => 'number',
|
1018 |
+
'step' => '1',
|
1019 |
+
'min' => '0',
|
1020 |
+
'max' => '100',
|
1021 |
+
'sanitize_callback' => 'intval',
|
1022 |
+
'class' => 'small-text',
|
1023 |
+
'default' => '0',
|
1024 |
+
'description' => '<br /><br />'
|
1025 |
+
),
|
1026 |
+
'titleShow' => array (
|
1027 |
+
'id' => 'fancybox_SWFtitleShow',
|
1028 |
+
'input' => 'checkbox',
|
1029 |
+
'noquotes' => true,
|
1030 |
+
'default' => '',
|
1031 |
+
'description' => __('Show title.','easy-fancybox') . ' ' . __('FancyBox will try to get a title from the link or thumbnail title attributes.','easy-fancybox')
|
1032 |
+
),
|
1033 |
+
'titlePosition' => array (
|
1034 |
+
'id' => 'fancybox_SWFtitlePosition',
|
1035 |
+
'title' => __('Title Position','easy-fancybox'),
|
1036 |
+
'label_for' => 'fancybox_SWFtitlePosition',
|
1037 |
+
'input' => 'select',
|
1038 |
+
'options' => array(
|
1039 |
+
'float' => __('Float','easy-fancybox'),
|
1040 |
+
'outside' => __('Outside','easy-fancybox'),
|
1041 |
+
'inside' => __('Inside','easy-fancybox')
|
1042 |
+
),
|
1043 |
+
'default' => 'float',
|
1044 |
+
'description' => '<br />'
|
1045 |
+
),
|
1046 |
+
'titleFromAlt' => array (
|
1047 |
+
'id' => 'fancybox_SWFtitleFromAlt',
|
1048 |
+
'input' => 'checkbox',
|
1049 |
+
'noquotes' => true,
|
1050 |
+
'default' => '1',
|
1051 |
+
'description' => __('Allow title from thumbnail alt attribute.','easy-fancybox')
|
1052 |
+
),
|
1053 |
+
'swf' => array (
|
1054 |
+
'noquotes' => true,
|
1055 |
+
'default' => '{\'wmode\':\'opaque\',\'allowfullscreen\':true}'
|
1056 |
+
)
|
1057 |
+
)
|
1058 |
+
),
|
1059 |
+
|
1060 |
+
'SVG' => array(
|
1061 |
+
'title' => __('SVG','easy-fancybox'),
|
1062 |
+
'input' => 'multiple',
|
1063 |
+
'options' => array(
|
1064 |
+
'intro' => array (
|
1065 |
+
'hide' => true,
|
1066 |
+
'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 />'
|
1067 |
+
),
|
1068 |
+
'autoAttribute' => array (
|
1069 |
+
'id' => 'fancybox_autoAttributeSVG',
|
1070 |
+
'input' => 'checkbox',
|
1071 |
+
'hide' => true,
|
1072 |
+
'default' => '1',
|
1073 |
+
'selector' => 'a[href*=".svg"],area[href*=".svg"],a[href*=".SVG"],area[href*=".SVG"]',
|
1074 |
+
'description' => __('Autodetect','easy-fancybox') . '<br />'
|
1075 |
+
),
|
1076 |
+
'tag' => array (
|
1077 |
+
'hide' => true,
|
1078 |
+
'default' => 'a.fancybox-svg,area.fancybox-svg,li.fancybox-svg a'
|
1079 |
+
),
|
1080 |
+
'class' => array (
|
1081 |
+
'hide' => true,
|
1082 |
+
'default' => 'fancybox-svg'
|
1083 |
+
),
|
1084 |
+
'type' => array(
|
1085 |
+
'default' => 'svg'
|
1086 |
+
),
|
1087 |
+
'width' => array (
|
1088 |
+
'id' => 'fancybox_SVGWidth',
|
1089 |
+
'title' => translate('Width'),
|
1090 |
+
'label_for' => 'fancybox_SVGWidth',
|
1091 |
+
'input' => 'text',
|
1092 |
+
'sanitize_callback' => 'intval',
|
1093 |
+
'class' => 'small-text',
|
1094 |
+
'options' => array(),
|
1095 |
+
'default' => '680',
|
1096 |
+
'description' => ' '
|
1097 |
+
),
|
1098 |
+
'height' => array (
|
1099 |
+
'id' => 'fancybox_SVGHeight',
|
1100 |
+
'title' => translate('Height'),
|
1101 |
+
'label_for' => 'fancybox_SVGHeight',
|
1102 |
+
'input' => 'text',
|
1103 |
+
'sanitize_callback' => 'intval',
|
1104 |
+
'class' => 'small-text',
|
1105 |
+
'options' => array(),
|
1106 |
+
'default' => '495',
|
1107 |
+
),
|
1108 |
+
'padding' => array (
|
1109 |
+
'id' => 'fancybox_SVGpadding',
|
1110 |
+
'title' => translate('Border'),
|
1111 |
+
'label_for' => 'fancybox_SVGpadding',
|
1112 |
+
'input' => 'number',
|
1113 |
+
'step' => '1',
|
1114 |
+
'min' => '0',
|
1115 |
+
'max' => '100',
|
1116 |
+
'sanitize_callback' => 'intval',
|
1117 |
+
'class' => 'small-text',
|
1118 |
+
'default' => '0',
|
1119 |
+
'description' => '<br /><br />'
|
1120 |
+
),
|
1121 |
+
'titleShow' => array (
|
1122 |
+
'id' => 'fancybox_SVGtitleShow',
|
1123 |
+
'input' => 'checkbox',
|
1124 |
+
'noquotes' => true,
|
1125 |
+
'default' => '',
|
1126 |
+
'description' => __('Show title.','easy-fancybox') . ' ' . __('FancyBox will try to get a title from the link or thumbnail title attributes.','easy-fancybox')
|
1127 |
+
),
|
1128 |
+
'titlePosition' => array (
|
1129 |
+
'id' => 'fancybox_SVGtitlePosition',
|
1130 |
+
'title' => __('Title Position','easy-fancybox'),
|
1131 |
+
'label_for' => 'fancybox_SVGtitlePosition',
|
1132 |
+
'input' => 'select',
|
1133 |
+
'options' => array(
|
1134 |
+
'float' => __('Float','easy-fancybox'),
|
1135 |
+
'outside' => __('Outside','easy-fancybox'),
|
1136 |
+
'inside' => __('Inside','easy-fancybox')
|
1137 |
+
//,'over' => __('Overlay','easy-fancybox')
|
1138 |
+
),
|
1139 |
+
'default' => 'float',
|
1140 |
+
'description' => '<br />'
|
1141 |
+
),
|
1142 |
+
'titleFromAlt' => array (
|
1143 |
+
'id' => 'fancybox_SVGtitleFromAlt',
|
1144 |
+
'input' => 'checkbox',
|
1145 |
+
'noquotes' => true,
|
1146 |
+
'default' => '1',
|
1147 |
+
'description' => __('Allow title from thumbnail alt attribute.','easy-fancybox')
|
1148 |
+
),
|
1149 |
+
'svg' => array (
|
1150 |
+
'noquotes' => true,
|
1151 |
+
'default' => '{\'wmode\':\'opaque\',\'allowfullscreen\':true}'
|
1152 |
+
)
|
1153 |
+
)
|
1154 |
+
),
|
1155 |
+
|
1156 |
+
'YouTube' => array(
|
1157 |
+
'title' => __('YouTube','easy-fancybox'),
|
1158 |
+
'input' => 'multiple',
|
1159 |
+
'options' => array(
|
1160 |
+
'intro' => array (
|
1161 |
+
'hide' => true,
|
1162 |
+
'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 />'
|
1163 |
+
),
|
1164 |
+
'autoAttribute' => array (
|
1165 |
+
'id' => 'fancybox_autoAttributeYoutube',
|
1166 |
+
'input' => 'checkbox',
|
1167 |
+
'hide' => true,
|
1168 |
+
'default' => '1',
|
1169 |
+
'selector' => 'a[href*="youtu.be/"],area[href*="youtu.be/"],a[href*="youtube.com/watch"],area[href*="youtube.com/watch"]',
|
1170 |
+
'description' => __('Autodetect','easy-fancybox') . '<br />'
|
1171 |
+
),
|
1172 |
+
'tag' => array (
|
1173 |
+
'hide' => true,
|
1174 |
+
'default' => 'a.fancybox-youtube,area.fancybox-youtube,li.fancybox-youtube a'
|
1175 |
+
),
|
1176 |
+
'class' => array (
|
1177 |
+
'hide' => true,
|
1178 |
+
'default' => 'fancybox-youtube'
|
1179 |
+
),
|
1180 |
+
'type' => array(
|
1181 |
+
'default' => 'iframe'
|
1182 |
+
),
|
1183 |
+
'noCookie' => array (
|
1184 |
+
'id' => 'fancybox_YoutubenoCookie',
|
1185 |
+
'input' => 'checkbox',
|
1186 |
+
'hide' => true,
|
1187 |
+
'default' => '',
|
1188 |
+
'description' => __('Enable privacy-enhanced mode','easy-fancybox') . '<br />'
|
1189 |
+
),
|
1190 |
+
'width' => array (
|
1191 |
+
'id' => 'fancybox_YoutubeWidth',
|
1192 |
+
'title' => translate('Width'),
|
1193 |
+
'label_for' => 'fancybox_YoutubeWidth',
|
1194 |
+
'input' => 'number',
|
1195 |
+
'step' => '1',
|
1196 |
+
'min' => '420',
|
1197 |
+
'max' => '1500',
|
1198 |
+
'sanitize_callback' => 'intval',
|
1199 |
+
'class' => 'small-text',
|
1200 |
+
'default' => '640',
|
1201 |
+
'description' => ' '
|
1202 |
+
),
|
1203 |
+
'height' => array (
|
1204 |
+
'id' => 'fancybox_YoutubeHeight',
|
1205 |
+
'title' => translate('Height'),
|
1206 |
+
'label_for' => 'fancybox_YoutubeHeight',
|
1207 |
+
'input' => 'number',
|
1208 |
+
'step' => '1',
|
1209 |
+
'min' => '315',
|
1210 |
+
'max' => '900',
|
1211 |
+
'sanitize_callback' => 'intval',
|
1212 |
+
'class' => 'small-text',
|
1213 |
+
'default' => '360',
|
1214 |
+
),
|
1215 |
+
'padding' => array (
|
1216 |
+
'id' => 'fancybox_Youtubepadding',
|
1217 |
+
'title' => translate('Border'),
|
1218 |
+
'label_for' => 'fancybox_Youtubepadding',
|
1219 |
+
'input' => 'number',
|
1220 |
+
'step' => '1',
|
1221 |
+
'min' => '0',
|
1222 |
+
'max' => '100',
|
1223 |
+
'sanitize_callback' => 'intval',
|
1224 |
+
'class' => 'small-text',
|
1225 |
+
'default' => '0',
|
1226 |
+
'description' => '<br /><br />'
|
1227 |
+
),
|
1228 |
+
'keepRatio' => array(
|
1229 |
+
'noquotes' => true,
|
1230 |
+
'default' => '1'
|
1231 |
+
),
|
1232 |
+
'titleShow' => array (
|
1233 |
+
'id' => 'fancybox_YoutubetitleShow',
|
1234 |
+
'input' => 'checkbox',
|
1235 |
+
'noquotes' => true,
|
1236 |
+
'default' => '',
|
1237 |
+
'description' => __('Show title.','easy-fancybox') . ' ' . __('FancyBox will try to get a title from the link or thumbnail title attributes.','easy-fancybox')
|
1238 |
+
),
|
1239 |
+
'titlePosition' => array (
|
1240 |
+
'id' => 'fancybox_YoutubetitlePosition',
|
1241 |
+
'title' => __('Title Position','easy-fancybox'),
|
1242 |
+
'label_for' => 'fancybox_YoutubetitlePosition',
|
1243 |
+
'input' => 'select',
|
1244 |
+
'options' => array(
|
1245 |
+
'float' => __('Float','easy-fancybox'),
|
1246 |
+
'outside' => __('Outside','easy-fancybox'),
|
1247 |
+
'inside' => __('Inside','easy-fancybox')
|
1248 |
+
),
|
1249 |
+
'default' => 'float',
|
1250 |
+
'description' => '<br />'
|
1251 |
+
),
|
1252 |
+
'titleFromAlt' => array (
|
1253 |
+
'id' => 'fancybox_YoutubetitleFromAlt',
|
1254 |
+
'input' => 'checkbox',
|
1255 |
+
'noquotes' => true,
|
1256 |
+
'default' => '1',
|
1257 |
+
'description' => __('Allow title from thumbnail alt attribute.','easy-fancybox')
|
1258 |
+
),
|
1259 |
+
'onStart' => array (
|
1260 |
+
'noquotes' => true,
|
1261 |
+
'default' => get_option( 'fancybox_YoutubenoCookie' ) ?
|
1262 |
+
'function(a,i,o){o.href=a[i].href.replace(/https?:\/\/youtu\.be/gi,"https://www.youtube-nocookie.com/embed").replace(/https?:\/\/(?:www\.)?youtube\.com\/watch\?(.*)v=([a-z0-9\_\-]+)(?:&|&|\?)?(.*)/gi,"https://www.youtube-nocookie.com/embed/$2?$1$3");var splitOn=o.href.indexOf("?");var urlParms=(splitOn>-1)?o.href.substring(splitOn):"";o.allowfullscreen=(urlParms.indexOf("fs=0")>-1)?false:true}' :
|
1263 |
+
'function(a,i,o){o.href=a[i].href.replace(/https?:\/\/youtu\.be/gi,"https://www.youtube.com/embed").replace(/https?:\/\/(?:www\.)?youtube\.com\/watch\?(.*)v=([a-z0-9\_\-]+)(?:&|&|\?)?(.*)/gi,"https://www.youtube.com/embed/$2?$1$3");var splitOn=o.href.indexOf("?");var urlParms=(splitOn>-1)?o.href.substring(splitOn):"";o.allowfullscreen=(urlParms.indexOf("fs=0")>-1)?false:true}'
|
1264 |
+
)
|
1265 |
+
)
|
1266 |
+
),
|
1267 |
+
|
1268 |
+
'Vimeo' => array(
|
1269 |
+
'title' => __('Vimeo','easy-fancybox'),
|
1270 |
+
'input' => 'multiple',
|
1271 |
+
'options' => array(
|
1272 |
+
'intro' => array (
|
1273 |
+
'hide' => true,
|
1274 |
+
'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 />'
|
1275 |
+
),
|
1276 |
+
'autoAttribute' => array (
|
1277 |
+
'id' => 'fancybox_autoAttributeVimeo',
|
1278 |
+
'input' => 'checkbox',
|
1279 |
+
'hide' => true,
|
1280 |
+
'default' => '1',
|
1281 |
+
'selector' => 'a[href*="vimeo.com/"],area[href*="vimeo.com/"]',
|
1282 |
+
'description' => __('Autodetect','easy-fancybox') . '<br />'
|
1283 |
+
),
|
1284 |
+
'tag' => array (
|
1285 |
+
'hide' => true,
|
1286 |
+
'default' => 'a.fancybox-vimeo,area.fancybox-vimeo,li.fancybox-vimeo a'
|
1287 |
+
),
|
1288 |
+
'class' => array (
|
1289 |
+
'hide' => true,
|
1290 |
+
'default' => 'fancybox-vimeo'
|
1291 |
+
),
|
1292 |
+
'type' => array(
|
1293 |
+
'default' => 'iframe'
|
1294 |
+
),
|
1295 |
+
'width' => array (
|
1296 |
+
'id' => 'fancybox_VimeoWidth',
|
1297 |
+
'title' => translate('Width'),
|
1298 |
+
'label_for' => 'fancybox_VimeoWidth',
|
1299 |
+
'input' => 'number',
|
1300 |
+
'step' => '1',
|
1301 |
+
'min' => '400',
|
1302 |
+
'max' => '1500',
|
1303 |
+
'sanitize_callback' => 'intval',
|
1304 |
+
'class' => 'small-text',
|
1305 |
+
'default' => '500',
|
1306 |
+
'description' => ' '
|
1307 |
+
),
|
1308 |
+
'height' => array (
|
1309 |
+
'id' => 'fancybox_VimeoHeight',
|
1310 |
+
'title' => translate('Height'),
|
1311 |
+
'label_for' => 'fancybox_VimeoHeight',
|
1312 |
+
'input' => 'number',
|
1313 |
+
'step' => '1',
|
1314 |
+
'min' => '225',
|
1315 |
+
'max' => '900',
|
1316 |
+
'sanitize_callback' => 'intval',
|
1317 |
+
'class' => 'small-text',
|
1318 |
+
'default' => '281'
|
1319 |
+
),
|
1320 |
+
'padding' => array (
|
1321 |
+
'id' => 'fancybox_Vimeopadding',
|
1322 |
+
'title' => translate('Border'),
|
1323 |
+
'label_for' => 'fancybox_Vimeopadding',
|
1324 |
+
'input' => 'number',
|
1325 |
+
'step' => '1',
|
1326 |
+
'min' => '0',
|
1327 |
+
'max' => '100',
|
1328 |
+
'sanitize_callback' => 'intval',
|
1329 |
+
'class' => 'small-text',
|
1330 |
+
'default' => '0',
|
1331 |
+
'description' => '<br /><br />'
|
1332 |
+
),
|
1333 |
+
'keepRatio' => array(
|
1334 |
+
'noquotes' => true,
|
1335 |
+
'default' => '1'
|
1336 |
+
),
|
1337 |
+
'titleShow' => array (
|
1338 |
+
'id' => 'fancybox_VimeotitleShow',
|
1339 |
+
'input' => 'checkbox',
|
1340 |
+
'noquotes' => true,
|
1341 |
+
'default' => '',
|
1342 |
+
'description' => __('Show title.','easy-fancybox') . ' ' . __('FancyBox will try to get a title from the link or thumbnail title attributes.','easy-fancybox')
|
1343 |
+
),
|
1344 |
+
'titlePosition' => array (
|
1345 |
+
'id' => 'fancybox_VimeotitlePosition',
|
1346 |
+
'title' => __('Title Position','easy-fancybox'),
|
1347 |
+
'label_for' => 'fancybox_VimeotitlePosition',
|
1348 |
+
'input' => 'select',
|
1349 |
+
'options' => array(
|
1350 |
+
'float' => __('Float','easy-fancybox'),
|
1351 |
+
'outside' => __('Outside','easy-fancybox'),
|
1352 |
+
'inside' => __('Inside','easy-fancybox')
|
1353 |
+
),
|
1354 |
+
'default' => 'float',
|
1355 |
+
'description' => '<br />'
|
1356 |
+
),
|
1357 |
+
'titleFromAlt' => array (
|
1358 |
+
'id' => 'fancybox_VimeotitleFromAlt',
|
1359 |
+
'input' => 'checkbox',
|
1360 |
+
'noquotes' => true,
|
1361 |
+
'default' => '1',
|
1362 |
+
'description' => __('Allow title from thumbnail alt attribute.','easy-fancybox')
|
1363 |
+
),
|
1364 |
+
'onStart' => array (
|
1365 |
+
'noquotes' => true,
|
1366 |
+
'default' => 'function(a,i,o){o.href=a[i].href.replace(/https?:\/\/(?:www\.)?vimeo\.com\/([0-9]+)(?:&|&|\?)?(.*)/gi,"https://player.vimeo.com/video/$1?$2");var splitOn=o.href.indexOf("?");var urlParms=(splitOn>-1)?o.href.substring(splitOn):"";o.allowfullscreen=(urlParms.indexOf("fullscreen=0")>-1)?false:true}'
|
1367 |
+
)
|
1368 |
+
)
|
1369 |
+
),
|
1370 |
+
|
1371 |
+
'Dailymotion' => array(
|
1372 |
+
'title' => __('Dailymotion','easy-fancybox'),
|
1373 |
+
'input' => 'multiple',
|
1374 |
+
'options' => array(
|
1375 |
+
'intro' => array (
|
1376 |
+
'hide' => true,
|
1377 |
+
'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 />'
|
1378 |
+
),
|
1379 |
+
'autoAttribute' => array (
|
1380 |
+
'id' => 'fancybox_autoAttributeDailymotion',
|
1381 |
+
'input' => 'checkbox',
|
1382 |
+
'hide' => true,
|
1383 |
+
'default' => '1',
|
1384 |
+
'selector' => 'a[href*="dailymotion.com/"],area[href*="dailymotion.com/"]',
|
1385 |
+
'description' => __('Autodetect','easy-fancybox') . '<br />'
|
1386 |
+
),
|
1387 |
+
'tag' => array (
|
1388 |
+
'hide' => true,
|
1389 |
+
'default' => 'a.fancybox-dailymotion,area.fancybox-dailymotion,li.fancybox-dailymotion a'
|
1390 |
+
),
|
1391 |
+
'class' => array (
|
1392 |
+
'hide' => true,
|
1393 |
+
'default' => 'fancybox-dailymotion'
|
1394 |
+
),
|
1395 |
+
'type' => array(
|
1396 |
+
'default' => 'iframe'
|
1397 |
+
),
|
1398 |
+
'width' => array (
|
1399 |
+
'id' => 'fancybox_DailymotionWidth',
|
1400 |
+
'title' => translate('Width'),
|
1401 |
+
'label_for' => 'fancybox_DailymotionWidth',
|
1402 |
+
'input' => 'number',
|
1403 |
+
'step' => '1',
|
1404 |
+
'min' => '320',
|
1405 |
+
'max' => '1500',
|
1406 |
+
'sanitize_callback' => 'intval',
|
1407 |
+
'class' => 'small-text',
|
1408 |
+
'default' => '560',
|
1409 |
+
'description' => ' '
|
1410 |
+
),
|
1411 |
+
'height' => array (
|
1412 |
+
'id' => 'fancybox_DailymotionHeight',
|
1413 |
+
'title' => translate('Height'),
|
1414 |
+
'label_for' => 'fancybox_DailymotionHeight',
|
1415 |
+
'input' => 'number',
|
1416 |
+
'step' => '1',
|
1417 |
+
'min' => '180',
|
1418 |
+
'max' => '900',
|
1419 |
+
'sanitize_callback' => 'intval',
|
1420 |
+
'class' => 'small-text',
|
1421 |
+
'default' => '315'
|
1422 |
+
),
|
1423 |
+
'padding' => array (
|
1424 |
+
'id' => 'fancybox_DailymotionPadding',
|
1425 |
+
'title' => translate('Border'),
|
1426 |
+
'label_for' => 'fancybox_DailymotionPadding',
|
1427 |
+
'input' => 'number',
|
1428 |
+
'step' => '1',
|
1429 |
+
'min' => '0',
|
1430 |
+
'max' => '100',
|
1431 |
+
'sanitize_callback' => 'intval',
|
1432 |
+
'class' => 'small-text',
|
1433 |
+
'default' => '0',
|
1434 |
+
'description' => '<br /><br />'
|
1435 |
+
),
|
1436 |
+
'keepRatio' => array(
|
1437 |
+
'noquotes' => true,
|
1438 |
+
'default' => '1'
|
1439 |
+
),
|
1440 |
+
'titleShow' => array (
|
1441 |
+
'id' => 'fancybox_DailymotiontitleShow',
|
1442 |
+
'input' => 'checkbox',
|
1443 |
+
'noquotes' => true,
|
1444 |
+
'default' => '',
|
1445 |
+
'description' => __('Show title.','easy-fancybox') . ' ' . __('FancyBox will try to get a title from the link or thumbnail title attributes.','easy-fancybox')
|
1446 |
+
),
|
1447 |
+
'titlePosition' => array (
|
1448 |
+
'id' => 'fancybox_DailymotiontitlePosition',
|
1449 |
+
'title' => __('Title Position','easy-fancybox'),
|
1450 |
+
'label_for' => 'fancybox_DailymotiontitlePosition',
|
1451 |
+
'input' => 'select',
|
1452 |
+
'options' => array(
|
1453 |
+
'float' => __('Float','easy-fancybox'),
|
1454 |
+
'outside' => __('Outside','easy-fancybox'),
|
1455 |
+
'inside' => __('Inside','easy-fancybox')
|
1456 |
+
),
|
1457 |
+
'default' => 'float',
|
1458 |
+
'description' => '<br />'
|
1459 |
+
),
|
1460 |
+
'titleFromAlt' => array (
|
1461 |
+
'id' => 'fancybox_DailymotiontitleFromAlt',
|
1462 |
+
'input' => 'checkbox',
|
1463 |
+
'noquotes' => true,
|
1464 |
+
'default' => '1',
|
1465 |
+
'description' => __('Allow title from thumbnail alt attribute.','easy-fancybox')
|
1466 |
+
),
|
1467 |
+
'onStart' => array (
|
1468 |
+
'noquotes' => true,
|
1469 |
+
'default' => 'function(a,i,o){o.href=a[i].href.replace(/^https?:\/\/(?:www\.)dailymotion.com\/video\/(.*)/gi,"https://www.dailymotion.com/embed/video/$1");var splitOn=o.href.indexOf("?");var urlParms=(splitOn>-1)?o.href.substring(splitOn):"";o.allowfullscreen=(urlParms.indexOf("fullscreen=0")>-1)?false:true}'
|
1470 |
+
)
|
1471 |
+
)
|
1472 |
+
),
|
1473 |
+
|
1474 |
+
/* 'Tudou' => array(
|
1475 |
+
'id' => 'fancybox_Tudou',
|
1476 |
+
'title' => __('Tudou','easy-fancybox'),
|
1477 |
+
'label_for' => '',
|
1478 |
+
'input' => 'multiple',
|
1479 |
+
'class' => '', 'description' => '',
|
1480 |
+
'options' => array(
|
1481 |
+
'autoAttributeTudou' => array (
|
1482 |
+
'id' => 'fancybox_autoAttributeTudou',
|
1483 |
+
'label_for' => '',
|
1484 |
+
'input' => 'checkbox',
|
1485 |
+
'class' => '',
|
1486 |
+
'options' => array(),
|
1487 |
+
'hide' => true,
|
1488 |
+
'default' => '1',
|
1489 |
+
'description' => __('Tudou links','easy-fancybox')
|
1490 |
+
)
|
1491 |
+
)
|
1492 |
+
),*/
|
1493 |
+
|
1494 |
+
/* 'Animoto' => array(),
|
1495 |
+
|
1496 |
+
Example ANIMOTO page link http://animoto.com/play/Kf9POzQMSOGWyu41gtOtsw should become
|
1497 |
+
http://static.animoto.com/swf/w.swf?w=swf/vp1&f=Kf9POzQMSOGWyu41gtOtsw&i=m
|
1498 |
+
|
1499 |
+
*/
|
1500 |
+
|
1501 |
+
'iFrame' => array(
|
1502 |
+
'title' => __('iFrames','easy-fancybox'),
|
1503 |
+
'input' => 'multiple',
|
1504 |
+
'options' => array(
|
1505 |
+
'intro' => array (
|
1506 |
+
'hide' => true,
|
1507 |
+
'description' => __('To make a website or HTML document open in an overlay, use the class "fancybox-iframe" for its link.','easy-fancybox') . '<br /><br />'
|
1508 |
+
),
|
1509 |
+
'tag' => array (
|
1510 |
+
'hide' => true,
|
1511 |
+
'default' => 'a.fancybox-iframe,area.fancybox-iframe,li.fancybox-iframe a'
|
1512 |
+
),
|
1513 |
+
'class' => array (
|
1514 |
+
'hide' => true,
|
1515 |
+
'default' => 'fancybox-iframe'
|
1516 |
+
),
|
1517 |
+
'type' => array (
|
1518 |
+
'default' => 'iframe'
|
1519 |
+
),
|
1520 |
+
/* other than overflow:auto not supported on many browsers
|
1521 |
+
'scrolling' => array (
|
1522 |
+
'id' => 'fancybox_iFrameScrolling',
|
1523 |
+
'title' => __('Scrolling','easy-fancybox'),
|
1524 |
+
'label_for' => 'fancybox_iFrameScrolling',
|
1525 |
+
'input' => 'select',
|
1526 |
+
'options' => array(
|
1527 |
+
'auto' => __('Auto','easy-fancybox'),
|
1528 |
+
'yes' => __('Always','easy-fancybox'),
|
1529 |
+
'no' => __('Never','easy-fancybox')
|
1530 |
+
),
|
1531 |
+
'default' => 'auto',
|
1532 |
+
'description' => __('Define scrolling and scrollbar visibility.','easy-fancybox') . '<br />'
|
1533 |
+
),*/
|
1534 |
+
'width' => array (
|
1535 |
+
'id' => 'fancybox_iFramewidth',
|
1536 |
+
'title' => translate('Width'),
|
1537 |
+
'label_for' => 'fancybox_iFramewidth',
|
1538 |
+
'input' => 'text',
|
1539 |
+
'sanitize_callback' => 'intval',
|
1540 |
+
'class' => 'small-text',
|
1541 |
+
'default' => '70%',
|
1542 |
+
'description' => ' '
|
1543 |
+
),
|
1544 |
+
'height' => array (
|
1545 |
+
'id' => 'fancybox_iFrameheight',
|
1546 |
+
'title' => translate('Height'),
|
1547 |
+
'label_for' => 'fancybox_iFrameheight',
|
1548 |
+
'input' => 'text',
|
1549 |
+
'sanitize_callback' => 'intval',
|
1550 |
+
'class' => 'small-text',
|
1551 |
+
'default' => '90%',
|
1552 |
+
),
|
1553 |
+
'padding' => array (
|
1554 |
+
'id' => 'fancybox_iFramepadding',
|
1555 |
+
'title' => translate('Border'),
|
1556 |
+
'label_for' => 'fancybox_iFramepadding',
|
1557 |
+
'input' => 'number',
|
1558 |
+
'step' => '1',
|
1559 |
+
'min' => '0',
|
1560 |
+
'max' => '100',
|
1561 |
+
'sanitize_callback' => 'intval',
|
1562 |
+
'class' => 'small-text',
|
1563 |
+
'default' => '0',
|
1564 |
+
'description' => '<br /><br />'
|
1565 |
+
),
|
1566 |
+
'titleShow' => array (
|
1567 |
+
'id' => 'fancybox_iFrametitleShow',
|
1568 |
+
'input' => 'checkbox',
|
1569 |
+
'noquotes' => true,
|
1570 |
+
'default' => '',
|
1571 |
+
'description' => __('Show title.','easy-fancybox') . ' ' . __('FancyBox will try to get a title from the link or thumbnail title attributes.','easy-fancybox')
|
1572 |
+
),
|
1573 |
+
'titlePosition' => array (
|
1574 |
+
'id' => 'fancybox_iFrametitlePosition',
|
1575 |
+
'title' => __('Title Position','easy-fancybox'),
|
1576 |
+
'label_for' => 'fancybox_iFrametitlePosition',
|
1577 |
+
'input' => 'select',
|
1578 |
+
'options' => array(
|
1579 |
+
'float' => __('Float','easy-fancybox'),
|
1580 |
+
'outside' => __('Outside','easy-fancybox'),
|
1581 |
+
'inside' => __('Inside','easy-fancybox')
|
1582 |
+
),
|
1583 |
+
'default' => 'float',
|
1584 |
+
'description' => '<br />'
|
1585 |
+
),
|
1586 |
+
'titleFromAlt' => array (
|
1587 |
+
'id' => 'fancybox_iFrametitleFromAlt',
|
1588 |
+
'input' => 'checkbox',
|
1589 |
+
'noquotes' => true,
|
1590 |
+
'default' => '1',
|
1591 |
+
'description' => __('Allow title from thumbnail alt attribute.','easy-fancybox') . '<br/>'
|
1592 |
+
),
|
1593 |
+
'allowfullscreen' => array (
|
1594 |
+
'id' => 'fancybox_allowFullScreen',
|
1595 |
+
'input' => 'checkbox',
|
1596 |
+
'noquotes' => true,
|
1597 |
+
'default' => '',
|
1598 |
+
'description' => __('Allow embedded content to jump to full screen mode','easy-fancybox')
|
1599 |
+
)
|
1600 |
+
)
|
1601 |
+
)
|
1602 |
+
);
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=ravan
|
|
4 |
Tags: fancybox, lightbox, gallery, image, photo, video, flash, overlay, youtube, vimeo, dailymotion, pdf, svg, iframe, swf, jquery, webp
|
5 |
Requires at least: 3.3
|
6 |
Tested up to: 4.9
|
7 |
-
Stable tag: 1.8.
|
8 |
|
9 |
Easily enable the FancyBox jQuery extension on just about all media links. Multi-Site compatible. Supports iFrame and Flash movies.
|
10 |
|
@@ -165,9 +165,7 @@ NetxGEN has its own built in FancyBox version along with a choice of other light
|
|
165 |
1. Go to your Settings > Media admin page and switch OFF the FancyBox "Auto-gallery" option in the Images section;
|
166 |
1. Go to Gallery > Other Options and set the Lightbox Effects option to "Custom" and click on **Show Advanced Settings**;
|
167 |
1. fill the Code field with
|
168 |
-
`
|
169 |
-
class="fancybox" rel="%GALLERY_NAME%"
|
170 |
-
`
|
171 |
1. Leave the other fields empty and save your settings.
|
172 |
|
173 |
|
@@ -184,7 +182,7 @@ It can be done manually (using the internal WordPress gallery feature, or not) _
|
|
184 |
<div class="fancybox-hidden">
|
185 |
`
|
186 |
|
187 |
-
**C.** Right after that starting on a new line, insert all other images you want to show in your gallery. You can even use the WordPress internal gallery feature with the shortcode `[gallery link="file"]`. NOTE: if the gallery thumbnail is attached to the post, it will be show a second time when flipping through the gallery in FancyBox. If you do not want that, use an image that is not attached to the post as gallery thumbnail.
|
188 |
|
189 |
**D.** Close the hidden div with the following code on a new line:
|
190 |
`
|
@@ -401,7 +399,7 @@ Yes. But it depends on you theme what you need to do to make it work. If you are
|
|
401 |
3. Enable the option "CSS Classes" under Advanced menu properties.
|
402 |
4. Now give the menu item you want to open in a FancyBox iframe the class `fancybox-iframe`.
|
403 |
|
404 |
-
If you are on an older version of WordPress or if you cannot use WP's Menus, you will need to do some heavy theme hacking to get it to work. Basically, what you need to achieve is that the menu item you want opened in a lightbox overlay, should get a class="fancybox-iframe"
|
405 |
|
406 |
|
407 |
= How can I make AJAX loaded content be seen by FancyBox ? =
|
@@ -497,12 +495,24 @@ If you still do not get to see your images in FancyBox, ask on the [Easy FancyBo
|
|
497 |
|
498 |
== Upgrade Notice ==
|
499 |
|
500 |
-
= 1.8.
|
501 |
-
Bugfix release:
|
502 |
|
503 |
|
504 |
== Changelog ==
|
505 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
506 |
= 1.8.2 =
|
507 |
* FIX: main method not returning true in some cases
|
508 |
* Force all hosted video to https
|
4 |
Tags: fancybox, lightbox, gallery, image, photo, video, flash, overlay, youtube, vimeo, dailymotion, pdf, svg, iframe, swf, jquery, webp
|
5 |
Requires at least: 3.3
|
6 |
Tested up to: 4.9
|
7 |
+
Stable tag: 1.8.5
|
8 |
|
9 |
Easily enable the FancyBox jQuery extension on just about all media links. Multi-Site compatible. Supports iFrame and Flash movies.
|
10 |
|
165 |
1. Go to your Settings > Media admin page and switch OFF the FancyBox "Auto-gallery" option in the Images section;
|
166 |
1. Go to Gallery > Other Options and set the Lightbox Effects option to "Custom" and click on **Show Advanced Settings**;
|
167 |
1. fill the Code field with
|
168 |
+
`class="fancybox" rel="%GALLERY_NAME%"`
|
|
|
|
|
169 |
1. Leave the other fields empty and save your settings.
|
170 |
|
171 |
|
182 |
<div class="fancybox-hidden">
|
183 |
`
|
184 |
|
185 |
+
**C.** Right after that starting on a new line, insert all other images you want to show in your gallery. You can even use the WordPress internal gallery feature with the shortcode `[ gallery link="file" ]`. NOTE: if the gallery thumbnail is attached to the post, it will be show a second time when flipping through the gallery in FancyBox. If you do not want that, use an image that is not attached to the post as gallery thumbnail.
|
186 |
|
187 |
**D.** Close the hidden div with the following code on a new line:
|
188 |
`
|
399 |
3. Enable the option "CSS Classes" under Advanced menu properties.
|
400 |
4. Now give the menu item you want to open in a FancyBox iframe the class `fancybox-iframe`.
|
401 |
|
402 |
+
If you are on an older version of WordPress or if you cannot use WP's Menus, you will need to do some heavy theme hacking to get it to work. Basically, what you need to achieve is that the menu item you want opened in a lightbox overlay, should get a `class="fancybox-iframe"` attribute.
|
403 |
|
404 |
|
405 |
= How can I make AJAX loaded content be seen by FancyBox ? =
|
495 |
|
496 |
== Upgrade Notice ==
|
497 |
|
498 |
+
= 1.8.5 =
|
499 |
+
Bugfix release: prevent Inline content title.
|
500 |
|
501 |
|
502 |
== Changelog ==
|
503 |
|
504 |
+
= 1.8.5 =
|
505 |
+
* FIX: prevent Inline content title
|
506 |
+
|
507 |
+
= 1.8.4 =
|
508 |
+
* Improved center on scroll behavior with title outside
|
509 |
+
* FIX: Pro options compatibility
|
510 |
+
|
511 |
+
= 1.8.3 =
|
512 |
+
* FIX: AutoScale option restored
|
513 |
+
* FIX: outline issue in Firefox
|
514 |
+
* Prevent SiteGround Optimizer warning about break outside loop
|
515 |
+
|
516 |
= 1.8.2 =
|
517 |
* FIX: main method not returning true in some cases
|
518 |
* Force all hosted video to https
|