Responsive Lightbox & Gallery - Version 1.4.9

Version Description

  • New: Hungarian translation, thanks to Zsolt Boda
  • Tweak: Remove direct http calls from Javascript to improve https protocol compatibility
Download this release

Release Info

Developer dfactory
Plugin Icon 128x128 Responsive Lightbox & Gallery
Version 1.4.9
Comparing to
See all releases

Code changes from version 1.4.8 to 1.4.9

assets/fancybox/jquery.fancybox-1.3.4.css CHANGED
@@ -324,15 +324,15 @@
324
 
325
  /* IE6 */
326
 
327
- .fancybox-ie6 #fancybox-close { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_close.png', sizingMethod='scale'); }
328
 
329
- .fancybox-ie6 #fancybox-left-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_nav_left.png', sizingMethod='scale'); }
330
- .fancybox-ie6 #fancybox-right-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_nav_right.png', sizingMethod='scale'); }
331
 
332
- .fancybox-ie6 #fancybox-title-over { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_over.png', sizingMethod='scale'); zoom: 1; }
333
- .fancybox-ie6 #fancybox-title-float-left { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_left.png', sizingMethod='scale'); }
334
- .fancybox-ie6 #fancybox-title-float-main { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_main.png', sizingMethod='scale'); }
335
- .fancybox-ie6 #fancybox-title-float-right { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_right.png', sizingMethod='scale'); }
336
 
337
  .fancybox-ie6 #fancybox-bg-w, .fancybox-ie6 #fancybox-bg-e, .fancybox-ie6 #fancybox-left, .fancybox-ie6 #fancybox-right, #fancybox-hide-sel-frame {
338
  height: expression(this.parentNode.clientHeight + "px");
@@ -343,17 +343,17 @@
343
  top: expression( (-20 + (document.documentElement.clientHeight ? document.documentElement.clientHeight/2 : document.body.clientHeight/2 ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop )) + 'px');
344
  }
345
 
346
- #fancybox-loading.fancybox-ie6 div { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_loading.png', sizingMethod='scale'); }
347
 
348
  /* IE6, IE7, IE8 */
349
 
350
  .fancybox-ie .fancybox-bg { background: transparent !important; }
351
 
352
- .fancybox-ie #fancybox-bg-n { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_n.png', sizingMethod='scale'); }
353
- .fancybox-ie #fancybox-bg-ne { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_ne.png', sizingMethod='scale'); }
354
- .fancybox-ie #fancybox-bg-e { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_e.png', sizingMethod='scale'); }
355
- .fancybox-ie #fancybox-bg-se { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_se.png', sizingMethod='scale'); }
356
- .fancybox-ie #fancybox-bg-s { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_s.png', sizingMethod='scale'); }
357
- .fancybox-ie #fancybox-bg-sw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_sw.png', sizingMethod='scale'); }
358
- .fancybox-ie #fancybox-bg-w { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_w.png', sizingMethod='scale'); }
359
- .fancybox-ie #fancybox-bg-nw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_nw.png', sizingMethod='scale'); }
324
 
325
  /* IE6 */
326
 
327
+ .fancybox-ie6 #fancybox-close { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_close.png', sizingMethod='scale', enabled='true'); }
328
 
329
+ .fancybox-ie6 #fancybox-left-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_nav_left.png', sizingMethod='scale', enabled='true'); }
330
+ .fancybox-ie6 #fancybox-right-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_nav_right.png', sizingMethod='scale', enabled='true'); }
331
 
332
+ .fancybox-ie6 #fancybox-title-over { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_over.png', sizingMethod='scale', enabled='true'); zoom: 1; }
333
+ .fancybox-ie6 #fancybox-title-float-left { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_left.png', sizingMethod='scale', enabled='true'); }
334
+ .fancybox-ie6 #fancybox-title-float-main { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_main.png', sizingMethod='scale', enabled='true'); }
335
+ .fancybox-ie6 #fancybox-title-float-right { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_right.png', sizingMethod='scale', enabled='true'); }
336
 
337
  .fancybox-ie6 #fancybox-bg-w, .fancybox-ie6 #fancybox-bg-e, .fancybox-ie6 #fancybox-left, .fancybox-ie6 #fancybox-right, #fancybox-hide-sel-frame {
338
  height: expression(this.parentNode.clientHeight + "px");
343
  top: expression( (-20 + (document.documentElement.clientHeight ? document.documentElement.clientHeight/2 : document.body.clientHeight/2 ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop )) + 'px');
344
  }
345
 
346
+ #fancybox-loading.fancybox-ie6 div { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_loading.png', sizingMethod='scale', enabled='true'); }
347
 
348
  /* IE6, IE7, IE8 */
349
 
350
  .fancybox-ie .fancybox-bg { background: transparent !important; }
351
 
352
+ .fancybox-ie #fancybox-bg-n { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_n.png', sizingMethod='scale', enabled='true'); }
353
+ .fancybox-ie #fancybox-bg-ne { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_ne.png', sizingMethod='scale', enabled='true'); }
354
+ .fancybox-ie #fancybox-bg-e { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_e.png', sizingMethod='scale', enabled='true'); }
355
+ .fancybox-ie #fancybox-bg-se { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_se.png', sizingMethod='scale', enabled='true'); }
356
+ .fancybox-ie #fancybox-bg-s { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_s.png', sizingMethod='scale', enabled='true'); }
357
+ .fancybox-ie #fancybox-bg-sw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_sw.png', sizingMethod='scale', enabled='true'); }
358
+ .fancybox-ie #fancybox-bg-w { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_w.png', sizingMethod='scale', enabled='true'); }
359
+ .fancybox-ie #fancybox-bg-nw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_nw.png', sizingMethod='scale', enabled='true'); }
assets/fancybox/jquery.fancybox-1.3.4.js CHANGED
@@ -67,14 +67,14 @@
67
  var matchesYoutube = videoURL.match(/(?:(?:http|https):\/\/)?(?:www\.)?youtube.com\/watch\?v=([a-zA-Z0-9\-_]+)/);
68
 
69
  if(matchesYoutube) {
70
- videoToShow = 'http://www.youtube.com/embed/'+matchesYoutube[1];
71
  return true;
72
  }
73
 
74
  var matchesVimeo = videoURL.match(/(?:(?:http|https):\/\/)?(?:www\.)?vimeo.com\/([0-9]+)/);
75
 
76
  if (matchesVimeo){
77
- videoToShow = 'http://player.vimeo.com/video/'+matchesVimeo[1];
78
  return true;
79
  }
80
 
67
  var matchesYoutube = videoURL.match(/(?:(?:http|https):\/\/)?(?:www\.)?youtube.com\/watch\?v=([a-zA-Z0-9\-_]+)/);
68
 
69
  if(matchesYoutube) {
70
+ videoToShow = '//www.youtube.com/embed/'+matchesYoutube[1];
71
  return true;
72
  }
73
 
74
  var matchesVimeo = videoURL.match(/(?:(?:http|https):\/\/)?(?:www\.)?vimeo.com\/([0-9]+)/);
75
 
76
  if (matchesVimeo){
77
+ videoToShow = '//player.vimeo.com/video/'+matchesVimeo[1];
78
  return true;
79
  }
80
 
assets/nivo/changelog.txt DELETED
@@ -1,4 +0,0 @@
1
- *** Nivo Lightbox Changelog ***
2
-
3
- 2013.08.01 - version 1.0
4
- * Initial release
 
 
 
 
assets/nivo/nivo-lightbox.min.js CHANGED
@@ -6,4 +6,4 @@
6
  * Free to use and abuse under the MIT license.
7
  * http://www.opensource.org/licenses/mit-license.php
8
  */
9
- (function(e,t,n,r){function o(t,n){this.el=t;this.$el=e(this.el);this.options=e.extend({},s,n);this._defaults=s;this._name=i;this.init()}var i="nivoLightbox",s={effect:"fade",theme:"default",keyboardNav:true,clickOverlayToClose:true,onInit:function(){},beforeShowLightbox:function(){},afterShowLightbox:function(e){},beforeHideLightbox:function(){},afterHideLightbox:function(){},onPrev:function(e){},onNext:function(e){},errorMessage:"The requested content cannot be loaded. Please try again later."};o.prototype={init:function(){var t=this;if(!e("html").hasClass("nivo-lightbox-notouch"))e("html").addClass("nivo-lightbox-notouch");if("ontouchstart"in n)e("html").removeClass("nivo-lightbox-notouch");this.$el.on("click",function(e){t.showLightbox(e)});if(this.options.keyboardNav){e("body").off("keyup").on("keyup",function(n){var r=n.keyCode?n.keyCode:n.which;if(r==27)t.destructLightbox();if(r==37)e(".nivo-lightbox-prev").trigger("click");if(r==39)e(".nivo-lightbox-next").trigger("click")})}this.options.onInit.call(this)},showLightbox:function(t){var n=this,r=this.$el;var i=this.checkContent(r);if(!i)return;t.preventDefault();this.options.beforeShowLightbox.call(this);var s=this.constructLightbox();if(!s)return;var o=s.find(".nivo-lightbox-content");if(!o)return;e("body").addClass("nivo-lightbox-body-effect-"+this.options.effect);this.processContent(o,r);if(this.$el.attr("data-lightbox-gallery")){var u=e('[data-lightbox-gallery="'+this.$el.attr("data-lightbox-gallery")+'"]');e(".nivo-lightbox-nav").show();e(".nivo-lightbox-prev").off("click").on("click",function(t){t.preventDefault();var i=u.index(r);r=u.eq(i-1);if(!e(r).length)r=u.last();n.processContent(o,r);n.options.onPrev.call(this,[r])});e(".nivo-lightbox-next").off("click").on("click",function(t){t.preventDefault();var i=u.index(r);r=u.eq(i+1);if(!e(r).length)r=u.first();n.processContent(o,r);n.options.onNext.call(this,[r])})}setTimeout(function(){s.addClass("nivo-lightbox-open");n.options.afterShowLightbox.call(this,[s])},1)},checkContent:function(e){var t=this,n=e.attr("href"),r=n.match(/(youtube|youtu|vimeo)\.(com|be)\/(watch\?v=([\w-]+)|([\w-]+))/);if(n.match(/\.(jpeg|jpg|gif|png)$/i)!==null){return true}else if(r){return true}else if(e.attr("data-lightbox-type")=="ajax"){return true}else if(n.substring(0,1)=="#"&&e.attr("data-lightbox-type")=="inline"){return true}else if(e.attr("data-lightbox-type")=="iframe"){return true}return false},processContent:function(n,r){var i=this,s=r.attr("href"),o=s.match(/(youtube|youtu|vimeo)\.(com|be)\/(watch\?v=([\w-]+)|([\w-]+))/);n.html("").addClass("nivo-lightbox-loading");if(this.isHidpi()&&r.attr("data-lightbox-hidpi")){s=r.attr("data-lightbox-hidpi")}if(s.match(/\.(jpeg|jpg|gif|png)$/i)!==null){var u=e("<img>",{src:s});u.one("load",function(){var r=e('<div class="nivo-lightbox-image" />');r.append(u);n.html(r).removeClass("nivo-lightbox-loading");r.css({"line-height":e(".nivo-lightbox-content").height()+"px",height:e(".nivo-lightbox-content").height()+"px"});e(t).resize(function(){r.css({"line-height":e(".nivo-lightbox-content").height()+"px",height:e(".nivo-lightbox-content").height()+"px"})})}).each(function(){if(this.complete)e(this).load()});u.error(function(){var t=e('<div class="nivo-lightbox-error"><p>'+i.options.errorMessage+"</p></div>");n.html(t).removeClass("nivo-lightbox-loading")})}else if(o){var a="",f="nivo-lightbox-video";if(o[1]=="youtube"){a="http://www.youtube.com/embed/"+o[4];f="nivo-lightbox-youtube"}if(o[1]=="youtu"){a="http://www.youtube.com/embed/"+o[3];f="nivo-lightbox-youtube"}if(o[1]=="vimeo"){a="http://player.vimeo.com/video/"+o[3];f="nivo-lightbox-vimeo"}if(a){var l=e("<iframe>",{src:a,"class":f,frameborder:0,vspace:0,hspace:0,scrolling:"auto"});n.html(l);l.load(function(){n.removeClass("nivo-lightbox-loading")})}}else if(r.attr("data-lightbox-type")=="ajax"){e.ajax({url:s,cache:false,success:function(r){var i=e('<div class="nivo-lightbox-ajax" />');i.append(r);n.html(i).removeClass("nivo-lightbox-loading");if(i.outerHeight()<n.height()){i.css({position:"relative",top:"50%","margin-top":-(i.outerHeight()/2)+"px"})}e(t).resize(function(){if(i.outerHeight()<n.height()){i.css({position:"relative",top:"50%","margin-top":-(i.outerHeight()/2)+"px"})}})},error:function(){var t=e('<div class="nivo-lightbox-error"><p>'+i.options.errorMessage+"</p></div>");n.html(t).removeClass("nivo-lightbox-loading")}})}else if(s.substring(0,1)=="#"&&r.attr("data-lightbox-type")=="inline"){if(e(s).length){var c=e('<div class="nivo-lightbox-inline" />');c.append(e(s).clone().show());n.html(c).removeClass("nivo-lightbox-loading");if(c.outerHeight()<n.height()){c.css({position:"relative",top:"50%","margin-top":-(c.outerHeight()/2)+"px"})}e(t).resize(function(){if(c.outerHeight()<n.height()){c.css({position:"relative",top:"50%","margin-top":-(c.outerHeight()/2)+"px"})}})}else{var h=e('<div class="nivo-lightbox-error"><p>'+i.options.errorMessage+"</p></div>");n.html(h).removeClass("nivo-lightbox-loading")}}else if(r.attr("data-lightbox-type")=="iframe"){var p=e("<iframe>",{src:s,"class":"nivo-lightbox-item",frameborder:0,vspace:0,hspace:0,scrolling:"auto"});n.html(p);p.load(function(){n.removeClass("nivo-lightbox-loading")})}else{return false}if(r.attr("title")){var d=e("<span>",{"class":"nivo-lightbox-title"});d.text(r.attr("title"));e(".nivo-lightbox-title-wrap").html(d)}else{e(".nivo-lightbox-title-wrap").html("")}},constructLightbox:function(){if(e(".nivo-lightbox-overlay").length)return e(".nivo-lightbox-overlay");var t=e("<div>",{"class":"nivo-lightbox-overlay nivo-lightbox-theme-"+this.options.theme+" nivo-lightbox-effect-"+this.options.effect});var n=e("<div>",{"class":"nivo-lightbox-wrap"});var r=e("<div>",{"class":"nivo-lightbox-content"});var i=e('<a href="#" class="nivo-lightbox-nav nivo-lightbox-prev">Previous</a><a href="#" class="nivo-lightbox-nav nivo-lightbox-next">Next</a>');var s=e('<a href="#" class="nivo-lightbox-close" title="Close">Close</a>');var o=e("<div>",{"class":"nivo-lightbox-title-wrap"});var u=0;if(u)t.addClass("nivo-lightbox-ie");n.append(r);n.append(o);t.append(n);t.append(i);t.append(s);e("body").append(t);var a=this;if(a.options.clickOverlayToClose){t.on("click",function(t){if(t.target===this||e(t.target).hasClass("nivo-lightbox-content")||e(t.target).hasClass("nivo-lightbox-image")){a.destructLightbox()}})}s.on("click",function(e){e.preventDefault();a.destructLightbox()});return t},destructLightbox:function(){var t=this;this.options.beforeHideLightbox.call(this);e(".nivo-lightbox-overlay").removeClass("nivo-lightbox-open");e(".nivo-lightbox-nav").hide();e("body").removeClass("nivo-lightbox-body-effect-"+t.options.effect);var n=0;if(n){e(".nivo-lightbox-overlay iframe").attr("src"," ");e(".nivo-lightbox-overlay iframe").remove()}e(".nivo-lightbox-prev").off("click");e(".nivo-lightbox-next").off("click");e(".nivo-lightbox-content").empty();this.options.afterHideLightbox.call(this)},isHidpi:function(){var e="(-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), (min-resolution: 1.5dppx)";if(t.devicePixelRatio>1)return true;if(t.matchMedia&&t.matchMedia(e).matches)return true;return false}};e.fn[i]=function(t){return this.each(function(){if(!e.data(this,i)){e.data(this,i,new o(this,t))}})}})(jQuery,window,document)
6
  * Free to use and abuse under the MIT license.
7
  * http://www.opensource.org/licenses/mit-license.php
8
  */
9
+ (function(e,t,n,r){function o(t,n){this.el=t;this.$el=e(this.el);this.options=e.extend({},s,n);this._defaults=s;this._name=i;this.init()}var i="nivoLightbox",s={effect:"fade",theme:"default",keyboardNav:true,clickOverlayToClose:true,onInit:function(){},beforeShowLightbox:function(){},afterShowLightbox:function(e){},beforeHideLightbox:function(){},afterHideLightbox:function(){},onPrev:function(e){},onNext:function(e){},errorMessage:"The requested content cannot be loaded. Please try again later."};o.prototype={init:function(){var t=this;if(!e("html").hasClass("nivo-lightbox-notouch"))e("html").addClass("nivo-lightbox-notouch");if("ontouchstart"in n)e("html").removeClass("nivo-lightbox-notouch");this.$el.on("click",function(e){t.showLightbox(e)});if(this.options.keyboardNav){e("body").off("keyup").on("keyup",function(n){var r=n.keyCode?n.keyCode:n.which;if(r==27)t.destructLightbox();if(r==37)e(".nivo-lightbox-prev").trigger("click");if(r==39)e(".nivo-lightbox-next").trigger("click")})}this.options.onInit.call(this)},showLightbox:function(t){var n=this,r=this.$el;var i=this.checkContent(r);if(!i)return;t.preventDefault();this.options.beforeShowLightbox.call(this);var s=this.constructLightbox();if(!s)return;var o=s.find(".nivo-lightbox-content");if(!o)return;e("body").addClass("nivo-lightbox-body-effect-"+this.options.effect);this.processContent(o,r);if(this.$el.attr("data-lightbox-gallery")){var u=e('[data-lightbox-gallery="'+this.$el.attr("data-lightbox-gallery")+'"]');e(".nivo-lightbox-nav").show();e(".nivo-lightbox-prev").off("click").on("click",function(t){t.preventDefault();var i=u.index(r);r=u.eq(i-1);if(!e(r).length)r=u.last();n.processContent(o,r);n.options.onPrev.call(this,[r])});e(".nivo-lightbox-next").off("click").on("click",function(t){t.preventDefault();var i=u.index(r);r=u.eq(i+1);if(!e(r).length)r=u.first();n.processContent(o,r);n.options.onNext.call(this,[r])})}setTimeout(function(){s.addClass("nivo-lightbox-open");n.options.afterShowLightbox.call(this,[s])},1)},checkContent:function(e){var t=this,n=e.attr("href"),r=n.match(/(youtube|youtu|vimeo)\.(com|be)\/(watch\?v=([\w-]+)|([\w-]+))/);if(n.match(/\.(jpeg|jpg|gif|png)$/i)!==null){return true}else if(r){return true}else if(e.attr("data-lightbox-type")=="ajax"){return true}else if(n.substring(0,1)=="#"&&e.attr("data-lightbox-type")=="inline"){return true}else if(e.attr("data-lightbox-type")=="iframe"){return true}return false},processContent:function(n,r){var i=this,s=r.attr("href"),o=s.match(/(youtube|youtu|vimeo)\.(com|be)\/(watch\?v=([\w-]+)|([\w-]+))/);n.html("").addClass("nivo-lightbox-loading");if(this.isHidpi()&&r.attr("data-lightbox-hidpi")){s=r.attr("data-lightbox-hidpi")}if(s.match(/\.(jpeg|jpg|gif|png)$/i)!==null){var u=e("<img>",{src:s});u.one("load",function(){var r=e('<div class="nivo-lightbox-image" />');r.append(u);n.html(r).removeClass("nivo-lightbox-loading");r.css({"line-height":e(".nivo-lightbox-content").height()+"px",height:e(".nivo-lightbox-content").height()+"px"});e(t).resize(function(){r.css({"line-height":e(".nivo-lightbox-content").height()+"px",height:e(".nivo-lightbox-content").height()+"px"})})}).each(function(){if(this.complete)e(this).load()});u.error(function(){var t=e('<div class="nivo-lightbox-error"><p>'+i.options.errorMessage+"</p></div>");n.html(t).removeClass("nivo-lightbox-loading")})}else if(o){var a="",f="nivo-lightbox-video";if(o[1]=="youtube"){a="//www.youtube.com/embed/"+o[4];f="nivo-lightbox-youtube"}if(o[1]=="youtu"){a="//www.youtube.com/embed/"+o[3];f="nivo-lightbox-youtube"}if(o[1]=="vimeo"){a="//player.vimeo.com/video/"+o[3];f="nivo-lightbox-vimeo"}if(a){var l=e("<iframe>",{src:a,"class":f,frameborder:0,vspace:0,hspace:0,scrolling:"auto"});n.html(l);l.load(function(){n.removeClass("nivo-lightbox-loading")})}}else if(r.attr("data-lightbox-type")=="ajax"){e.ajax({url:s,cache:false,success:function(r){var i=e('<div class="nivo-lightbox-ajax" />');i.append(r);n.html(i).removeClass("nivo-lightbox-loading");if(i.outerHeight()<n.height()){i.css({position:"relative",top:"50%","margin-top":-(i.outerHeight()/2)+"px"})}e(t).resize(function(){if(i.outerHeight()<n.height()){i.css({position:"relative",top:"50%","margin-top":-(i.outerHeight()/2)+"px"})}})},error:function(){var t=e('<div class="nivo-lightbox-error"><p>'+i.options.errorMessage+"</p></div>");n.html(t).removeClass("nivo-lightbox-loading")}})}else if(s.substring(0,1)=="#"&&r.attr("data-lightbox-type")=="inline"){if(e(s).length){var c=e('<div class="nivo-lightbox-inline" />');c.append(e(s).clone().show());n.html(c).removeClass("nivo-lightbox-loading");if(c.outerHeight()<n.height()){c.css({position:"relative",top:"50%","margin-top":-(c.outerHeight()/2)+"px"})}e(t).resize(function(){if(c.outerHeight()<n.height()){c.css({position:"relative",top:"50%","margin-top":-(c.outerHeight()/2)+"px"})}})}else{var h=e('<div class="nivo-lightbox-error"><p>'+i.options.errorMessage+"</p></div>");n.html(h).removeClass("nivo-lightbox-loading")}}else if(r.attr("data-lightbox-type")=="iframe"){var p=e("<iframe>",{src:s,"class":"nivo-lightbox-item",frameborder:0,vspace:0,hspace:0,scrolling:"auto"});n.html(p);p.load(function(){n.removeClass("nivo-lightbox-loading")})}else{return false}if(r.attr("title")){var d=e("<span>",{"class":"nivo-lightbox-title"});d.text(r.attr("title"));e(".nivo-lightbox-title-wrap").html(d)}else{e(".nivo-lightbox-title-wrap").html("")}},constructLightbox:function(){if(e(".nivo-lightbox-overlay").length)return e(".nivo-lightbox-overlay");var t=e("<div>",{"class":"nivo-lightbox-overlay nivo-lightbox-theme-"+this.options.theme+" nivo-lightbox-effect-"+this.options.effect});var n=e("<div>",{"class":"nivo-lightbox-wrap"});var r=e("<div>",{"class":"nivo-lightbox-content"});var i=e('<a href="#" class="nivo-lightbox-nav nivo-lightbox-prev">Previous</a><a href="#" class="nivo-lightbox-nav nivo-lightbox-next">Next</a>');var s=e('<a href="#" class="nivo-lightbox-close" title="Close">Close</a>');var o=e("<div>",{"class":"nivo-lightbox-title-wrap"});var u=0;if(u)t.addClass("nivo-lightbox-ie");n.append(r);n.append(o);t.append(n);t.append(i);t.append(s);e("body").append(t);var a=this;if(a.options.clickOverlayToClose){t.on("click",function(t){if(t.target===this||e(t.target).hasClass("nivo-lightbox-content")||e(t.target).hasClass("nivo-lightbox-image")){a.destructLightbox()}})}s.on("click",function(e){e.preventDefault();a.destructLightbox()});return t},destructLightbox:function(){var t=this;this.options.beforeHideLightbox.call(this);e(".nivo-lightbox-overlay").removeClass("nivo-lightbox-open");e(".nivo-lightbox-nav").hide();e("body").removeClass("nivo-lightbox-body-effect-"+t.options.effect);var n=0;if(n){e(".nivo-lightbox-overlay iframe").attr("src"," ");e(".nivo-lightbox-overlay iframe").remove()}e(".nivo-lightbox-prev").off("click");e(".nivo-lightbox-next").off("click");e(".nivo-lightbox-content").empty();this.options.afterHideLightbox.call(this)},isHidpi:function(){var e="(-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), (min-resolution: 1.5dppx)";if(t.devicePixelRatio>1)return true;if(t.matchMedia&&t.matchMedia(e).matches)return true;return false}};e.fn[i]=function(t){return this.each(function(){if(!e.data(this,i)){e.data(this,i,new o(this,t))}})}})(jQuery,window,document)
assets/prettyphoto/js/jquery.prettyPhoto.js CHANGED
@@ -4,4 +4,4 @@
4
  Author: Stephane Caron (http://www.no-margin-for-errors.com)
5
  Version: 3.1.5
6
  ------------------------------------------------------------------------- */
7
- (function(e){function t(){var e=location.href;hashtag=e.indexOf("#prettyPhoto")!==-1?decodeURI(e.substring(e.indexOf("#prettyPhoto")+1,e.length)):false;return hashtag}function n(){if(typeof theRel=="undefined")return;location.hash=theRel+"/"+rel_index+"/"}function r(){if(location.href.indexOf("#prettyPhoto")!==-1)location.hash="prettyPhoto"}function i(e,t){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var n="[\\?&]"+e+"=([^&#]*)";var r=new RegExp(n);var i=r.exec(t);return i==null?"":i[1]}e.prettyPhoto={version:"3.1.5"};e.fn.prettyPhoto=function(s){function g(){e(".pp_loaderIcon").hide();projectedTop=scroll_pos["scrollTop"]+(d/2-a["containerHeight"]/2);if(projectedTop<0)projectedTop=0;$ppt.fadeTo(settings.animation_speed,1);$pp_pic_holder.find(".pp_content").animate({height:a["contentHeight"],width:a["contentWidth"]},settings.animation_speed);$pp_pic_holder.animate({top:projectedTop,left:v/2-a["containerWidth"]/2<0?0:v/2-a["containerWidth"]/2,width:a["containerWidth"]},settings.animation_speed,function(){$pp_pic_holder.find(".pp_hoverContainer,#fullResImage").height(a["height"]).width(a["width"]);$pp_pic_holder.find(".pp_fade").fadeIn(settings.animation_speed);if(isSet&&S(pp_images[set_position])=="image"){$pp_pic_holder.find(".pp_hoverContainer").show()}else{$pp_pic_holder.find(".pp_hoverContainer").hide()}if(settings.allow_expand){if(a["resized"]){e("a.pp_expand,a.pp_contract").show()}else{e("a.pp_expand").hide()}}if(settings.autoplay_slideshow&&!m&&!f)e.prettyPhoto.startSlideshow();settings.changepicturecallback();f=true});C();s.ajaxcallback()}function y(t){$pp_pic_holder.find("#pp_full_res object,#pp_full_res embed").css("visibility","hidden");$pp_pic_holder.find(".pp_fade").fadeOut(settings.animation_speed,function(){e(".pp_loaderIcon").show();t()})}function b(t){t>1?e(".pp_nav").show():e(".pp_nav").hide()}function w(e,t){resized=false;E(e,t);imageWidth=e,imageHeight=t;if((p>v||h>d)&&doresize&&settings.allow_resize&&!u){resized=true,fitting=false;while(!fitting){if(p>v){imageWidth=v-200;imageHeight=t/e*imageWidth}else if(h>d){imageHeight=d-200;imageWidth=e/t*imageHeight}else{fitting=true}h=imageHeight,p=imageWidth}if(p>v||h>d){w(p,h)}E(imageWidth,imageHeight)}return{width:Math.floor(imageWidth),height:Math.floor(imageHeight),containerHeight:Math.floor(h),containerWidth:Math.floor(p)+settings.horizontal_padding*2,contentHeight:Math.floor(l),contentWidth:Math.floor(c),resized:resized}}function E(t,n){t=parseFloat(t);n=parseFloat(n);$pp_details=$pp_pic_holder.find(".pp_details");$pp_details.width(t);detailsHeight=parseFloat($pp_details.css("marginTop"))+parseFloat($pp_details.css("marginBottom"));$pp_details=$pp_details.clone().addClass(settings.theme).width(t).appendTo(e("body")).css({position:"absolute",top:-1e4});detailsHeight+=$pp_details.height();detailsHeight=detailsHeight<=34?36:detailsHeight;$pp_details.remove();$pp_title=$pp_pic_holder.find(".ppt");$pp_title.width(t);titleHeight=parseFloat($pp_title.css("marginTop"))+parseFloat($pp_title.css("marginBottom"));$pp_title=$pp_title.clone().appendTo(e("body")).css({position:"absolute",top:-1e4});titleHeight+=$pp_title.height();$pp_title.remove();l=n+detailsHeight;c=t;h=l+titleHeight+$pp_pic_holder.find(".pp_top").height()+$pp_pic_holder.find(".pp_bottom").height();p=t}function S(e){if(e.match(/youtube\.com\/watch/i)||e.match(/youtu\.be/i)){return"youtube"}else if(e.match(/vimeo\.com/i)){return"vimeo"}else if(e.match(/\b.mov\b/i)){return"quicktime"}else if(e.match(/\b.swf\b/i)){return"flash"}else if(e.match(/\biframe=true\b/i)){return"iframe"}else if(e.match(/\bajax=true\b/i)){return"ajax"}else if(e.match(/\bcustom=true\b/i)){return"custom"}else if(e.substr(0,1)=="#"){return"inline"}else{return"image"}}function x(){if(doresize&&typeof $pp_pic_holder!="undefined"){scroll_pos=T();contentHeight=$pp_pic_holder.height(),contentwidth=$pp_pic_holder.width();projectedTop=d/2+scroll_pos["scrollTop"]-contentHeight/2;if(projectedTop<0)projectedTop=0;if(contentHeight>d)return;$pp_pic_holder.css({top:projectedTop,left:v/2+scroll_pos["scrollLeft"]-contentwidth/2})}}function T(){if(self.pageYOffset){return{scrollTop:self.pageYOffset,scrollLeft:self.pageXOffset}}else if(document.documentElement&&document.documentElement.scrollTop){return{scrollTop:document.documentElement.scrollTop,scrollLeft:document.documentElement.scrollLeft}}else if(document.body){return{scrollTop:document.body.scrollTop,scrollLeft:document.body.scrollLeft}}}function N(){d=e(window).height(),v=e(window).width();if(typeof $pp_overlay!="undefined")$pp_overlay.height(e(document).height()).width(v)}function C(){if(isSet&&settings.overlay_gallery&&S(pp_images[set_position])=="image"){itemWidth=52+5;navWidth=settings.theme=="facebook"||settings.theme=="pp_default"?50:30;itemsPerPage=Math.floor((a["containerWidth"]-100-navWidth)/itemWidth);itemsPerPage=itemsPerPage<pp_images.length?itemsPerPage:pp_images.length;totalPage=Math.ceil(pp_images.length/itemsPerPage)-1;if(totalPage==0){navWidth=0;$pp_gallery.find(".pp_arrow_next,.pp_arrow_previous").hide()}else{$pp_gallery.find(".pp_arrow_next,.pp_arrow_previous").show()}galleryWidth=itemsPerPage*itemWidth;fullGalleryWidth=pp_images.length*itemWidth;$pp_gallery.css("margin-left",-(galleryWidth/2+navWidth/2)).find("div:first").width(galleryWidth+5).find("ul").width(fullGalleryWidth).find("li.selected").removeClass("selected");goToPage=Math.floor(set_position/itemsPerPage)<totalPage?Math.floor(set_position/itemsPerPage):totalPage;e.prettyPhoto.changeGalleryPage(goToPage);$pp_gallery_li.filter(":eq("+set_position+")").addClass("selected")}else{$pp_pic_holder.find(".pp_content").unbind("mouseenter mouseleave")}}function k(t){if(settings.social_tools)facebook_like_link=settings.social_tools.replace("{location_href}",encodeURIComponent(location.href));settings.markup=settings.markup.replace("{pp_social}","");e("body").append(settings.markup);$pp_pic_holder=e(".pp_pic_holder"),$ppt=e(".ppt"),$pp_overlay=e("div.pp_overlay");if(isSet&&settings.overlay_gallery){currentGalleryPage=0;toInject="";for(var n=0;n<pp_images.length;n++){if(!pp_images[n].match(/\b(jpg|jpeg|png|gif)\b/gi)){classname="default";img_src=""}else{classname="";img_src=pp_images[n]}toInject+="<li class='"+classname+"'><a href='#'><img src='"+img_src+"' width='50' alt='' /></a></li>"}toInject=settings.gallery_markup.replace(/{gallery}/g,toInject);$pp_pic_holder.find("#pp_full_res").after(toInject);$pp_gallery=e(".pp_pic_holder .pp_gallery"),$pp_gallery_li=$pp_gallery.find("li");$pp_gallery.find(".pp_arrow_next").click(function(){e.prettyPhoto.changeGalleryPage("next");e.prettyPhoto.stopSlideshow();return false});$pp_gallery.find(".pp_arrow_previous").click(function(){e.prettyPhoto.changeGalleryPage("previous");e.prettyPhoto.stopSlideshow();return false});$pp_pic_holder.find(".pp_content").hover(function(){$pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeIn()},function(){$pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeOut()});itemWidth=52+5;$pp_gallery_li.each(function(t){e(this).find("a").click(function(){e.prettyPhoto.changePage(t);e.prettyPhoto.stopSlideshow();return false})})}if(settings.slideshow){$pp_pic_holder.find(".pp_nav").prepend('<a href="#" class="pp_play">Play</a>');$pp_pic_holder.find(".pp_nav .pp_play").click(function(){e.prettyPhoto.startSlideshow();return false})}$pp_pic_holder.attr("class","pp_pic_holder "+settings.theme);$pp_overlay.css({opacity:0,height:e(document).height(),width:e(window).width()}).bind("click",function(){if(!settings.modal)e.prettyPhoto.close()});e("a.pp_close").bind("click",function(){e.prettyPhoto.close();return false});if(settings.allow_expand){e("a.pp_expand").bind("click",function(t){if(e(this).hasClass("pp_expand")){e(this).removeClass("pp_expand").addClass("pp_contract");doresize=false}else{e(this).removeClass("pp_contract").addClass("pp_expand");doresize=true}y(function(){e.prettyPhoto.open()});return false})}$pp_pic_holder.find(".pp_previous, .pp_nav .pp_arrow_previous").bind("click",function(){e.prettyPhoto.changePage("previous");e.prettyPhoto.stopSlideshow();return false});$pp_pic_holder.find(".pp_next, .pp_nav .pp_arrow_next").bind("click",function(){e.prettyPhoto.changePage("next");e.prettyPhoto.stopSlideshow();return false});x()}s=jQuery.extend({hook:"rel",animation_speed:"fast",ajaxcallback:function(){},slideshow:5e3,autoplay_slideshow:false,opacity:.8,show_title:true,allow_resize:true,allow_expand:true,default_width:500,default_height:344,counter_separator_label:"/",theme:"pp_default",horizontal_padding:20,hideflash:false,wmode:"opaque",autoplay:true,modal:false,deeplinking:true,overlay_gallery:true,overlay_gallery_max:30,keyboard_shortcuts:true,changepicturecallback:function(){},callback:function(){},ie6_fallback:true,markup:'<div class="pp_pic_holder"> <div class="ppt"> </div> <div class="pp_top"> <div class="pp_left"></div> <div class="pp_middle"></div> <div class="pp_right"></div> </div> <div class="pp_content_container"> <div class="pp_left"> <div class="pp_right"> <div class="pp_content"> <div class="pp_loaderIcon"></div> <div class="pp_fade"> <a href="#" class="pp_expand" title="Expand the image">Expand</a> <div class="pp_hoverContainer"> <a class="pp_next" href="#">next</a> <a class="pp_previous" href="#">previous</a> </div> <div id="pp_full_res"></div> <div class="pp_details"> <div class="pp_nav"> <a href="#" class="pp_arrow_previous">Previous</a> <p class="currentTextHolder">0/0</p> <a href="#" class="pp_arrow_next">Next</a> </div> <p class="pp_description"></p> <div class="pp_social">{pp_social}</div> <a class="pp_close" href="#">Close</a> </div> </div> </div> </div> </div> </div> <div class="pp_bottom"> <div class="pp_left"></div> <div class="pp_middle"></div> <div class="pp_right"></div> </div> </div> <div class="pp_overlay"></div>',gallery_markup:'<div class="pp_gallery"> <a href="#" class="pp_arrow_previous">Previous</a> <div> <ul> {gallery} </ul> </div> <a href="#" class="pp_arrow_next">Next</a> </div>',image_markup:'<img id="fullResImage" src="{path}" />',flash_markup:'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="{width}" height="{height}"><param name="wmode" value="{wmode}" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="{path}" /><embed src="{path}" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="{width}" height="{height}" wmode="{wmode}"></embed></object>',quicktime_markup:'<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="{height}" width="{width}"><param name="src" value="{path}"><param name="autoplay" value="{autoplay}"><param name="type" value="video/quicktime"><embed src="{path}" height="{height}" width="{width}" autoplay="{autoplay}" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/"></embed></object>',iframe_markup:'<iframe src ="{path}" width="{width}" height="{height}" frameborder="no"></iframe>',inline_markup:'<div class="pp_inline">{content}</div>',custom_markup:"",social_tools:'<div class="twitter"><a href="http://twitter.com/share" class="twitter-share-button" data-count="none">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="facebook"><iframe src="//www.facebook.com/plugins/like.php?locale=en_US&href={location_href}&layout=button_count&show_faces=true&width=500&action=like&font&colorscheme=light&height=23" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:23px;" allowTransparency="true"></iframe></div>'},s);var o=this,u=false,a,f,l,c,h,p,d=e(window).height(),v=e(window).width(),m;doresize=true,scroll_pos=T();e(window).unbind("resize.prettyphoto").bind("resize.prettyphoto",function(){x();N()});if(s.keyboard_shortcuts){e(document).unbind("keydown.prettyphoto").bind("keydown.prettyphoto",function(t){if(typeof $pp_pic_holder!="undefined"){if($pp_pic_holder.is(":visible")){switch(t.keyCode){case 37:e.prettyPhoto.changePage("previous");t.preventDefault();break;case 39:e.prettyPhoto.changePage("next");t.preventDefault();break;case 27:if(!settings.modal)e.prettyPhoto.close();t.preventDefault();break}}}})}e.prettyPhoto.initialize=function(){settings=s;if(settings.theme=="pp_default")settings.horizontal_padding=16;theRel=e(this).attr(settings.hook);galleryRegExp=/\[(?:.*)\]/;isSet=galleryRegExp.exec(theRel)?true:false;pp_images=isSet?jQuery.map(o,function(t,n){if(e(t).attr(settings.hook).indexOf(theRel)!=-1)return e(t).attr("href")}):e.makeArray(e(this).attr("href"));pp_titles=isSet?jQuery.map(o,function(t,n){if(e(t).attr(settings.hook).indexOf(theRel)!=-1)return e(t).find("img").attr("alt")?e(t).find("img").attr("alt"):""}):e.makeArray(e(this).find("img").attr("alt"));pp_descriptions=isSet?jQuery.map(o,function(t,n){if(e(t).attr(settings.hook).indexOf(theRel)!=-1)return e(t).attr("title")?e(t).attr("title"):""}):e.makeArray(e(this).attr("title"));if(pp_images.length>settings.overlay_gallery_max)settings.overlay_gallery=false;set_position=jQuery.inArray(e(this).attr("href"),pp_images);rel_index=isSet?set_position:e("a["+settings.hook+"^='"+theRel+"']").index(e(this));k(this);if(settings.allow_resize)e(window).bind("scroll.prettyphoto",function(){x()});e.prettyPhoto.open();return false};e.prettyPhoto.open=function(t){if(typeof settings=="undefined"){settings=s;pp_images=e.makeArray(arguments[0]);pp_titles=arguments[1]?e.makeArray(arguments[1]):e.makeArray("");pp_descriptions=arguments[2]?e.makeArray(arguments[2]):e.makeArray("");isSet=pp_images.length>1?true:false;set_position=arguments[3]?arguments[3]:0;k(t.target)}if(settings.hideflash)e("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility","hidden");b(e(pp_images).size());e(".pp_loaderIcon").show();if(settings.deeplinking)n();if(settings.social_tools){facebook_like_link=settings.social_tools.replace("{location_href}",encodeURIComponent(location.href));$pp_pic_holder.find(".pp_social").html(facebook_like_link)}if($ppt.is(":hidden"))$ppt.css("opacity",0).show();$pp_overlay.show().fadeTo(settings.animation_speed,settings.opacity);$pp_pic_holder.find(".currentTextHolder").text(set_position+1+settings.counter_separator_label+e(pp_images).size());if(typeof pp_descriptions[set_position]!="undefined"&&pp_descriptions[set_position]!=""){$pp_pic_holder.find(".pp_description").show().html(unescape(pp_descriptions[set_position]))}else{$pp_pic_holder.find(".pp_description").hide()}movie_width=parseFloat(i("width",pp_images[set_position]))?i("width",pp_images[set_position]):settings.default_width.toString();movie_height=parseFloat(i("height",pp_images[set_position]))?i("height",pp_images[set_position]):settings.default_height.toString();u=false;if(movie_height.indexOf("%")!=-1){movie_height=parseFloat(e(window).height()*parseFloat(movie_height)/100-150);u=true}if(movie_width.indexOf("%")!=-1){movie_width=parseFloat(e(window).width()*parseFloat(movie_width)/100-150);u=true}$pp_pic_holder.fadeIn(function(){settings.show_title&&pp_titles[set_position]!=""&&typeof pp_titles[set_position]!="undefined"?$ppt.html(unescape(pp_titles[set_position])):$ppt.html(" ");imgPreloader="";skipInjection=false;switch(S(pp_images[set_position])){case"image":imgPreloader=new Image;nextImage=new Image;if(isSet&&set_position<e(pp_images).size()-1)nextImage.src=pp_images[set_position+1];prevImage=new Image;if(isSet&&pp_images[set_position-1])prevImage.src=pp_images[set_position-1];$pp_pic_holder.find("#pp_full_res")[0].innerHTML=settings.image_markup.replace(/{path}/g,pp_images[set_position]);imgPreloader.onload=function(){a=w(imgPreloader.width,imgPreloader.height);g()};imgPreloader.onerror=function(){alert("Image cannot be loaded. Make sure the path is correct and image exist.");e.prettyPhoto.close()};imgPreloader.src=pp_images[set_position];break;case"youtube":a=w(movie_width,movie_height);movie_id=i("v",pp_images[set_position]);if(movie_id==""){movie_id=pp_images[set_position].split("youtu.be/");movie_id=movie_id[1];if(movie_id.indexOf("?")>0)movie_id=movie_id.substr(0,movie_id.indexOf("?"));if(movie_id.indexOf("&")>0)movie_id=movie_id.substr(0,movie_id.indexOf("&"))}movie="http://www.youtube.com/embed/"+movie_id;i("rel",pp_images[set_position])?movie+="?rel="+i("rel",pp_images[set_position]):movie+="?rel=1";if(settings.autoplay)movie+="&autoplay=1";toInject=settings.iframe_markup.replace(/{width}/g,a["width"]).replace(/{height}/g,a["height"]).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,movie);break;case"vimeo":a=w(movie_width,movie_height);movie_id=pp_images[set_position];var t=/http(s?):\/\/(www\.)?vimeo.com\/(\d+)/;var n=movie_id.match(t);movie="http://player.vimeo.com/video/"+n[3]+"?title=0&byline=0&portrait=0";if(settings.autoplay)movie+="&autoplay=1;";vimeo_width=a["width"]+"/embed/?moog_width="+a["width"];toInject=settings.iframe_markup.replace(/{width}/g,vimeo_width).replace(/{height}/g,a["height"]).replace(/{path}/g,movie);break;case"quicktime":a=w(movie_width,movie_height);a["height"]+=15;a["contentHeight"]+=15;a["containerHeight"]+=15;toInject=settings.quicktime_markup.replace(/{width}/g,a["width"]).replace(/{height}/g,a["height"]).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,pp_images[set_position]).replace(/{autoplay}/g,settings.autoplay);break;case"flash":a=w(movie_width,movie_height);flash_vars=pp_images[set_position];flash_vars=flash_vars.substring(pp_images[set_position].indexOf("flashvars")+10,pp_images[set_position].length);filename=pp_images[set_position];filename=filename.substring(0,filename.indexOf("?"));toInject=settings.flash_markup.replace(/{width}/g,a["width"]).replace(/{height}/g,a["height"]).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,filename+"?"+flash_vars);break;case"iframe":a=w(movie_width,movie_height);frame_url=pp_images[set_position];frame_url=frame_url.substr(0,frame_url.indexOf("iframe")-1);toInject=settings.iframe_markup.replace(/{width}/g,a["width"]).replace(/{height}/g,a["height"]).replace(/{path}/g,frame_url);break;case"ajax":doresize=false;a=w(movie_width,movie_height);doresize=true;skipInjection=true;e.get(pp_images[set_position],function(e){toInject=settings.inline_markup.replace(/{content}/g,e);$pp_pic_holder.find("#pp_full_res")[0].innerHTML=toInject;g()});break;case"custom":a=w(movie_width,movie_height);toInject=settings.custom_markup;break;case"inline":myClone=e(pp_images[set_position]).clone().append('<br clear="all" />').css({width:settings.default_width}).wrapInner('<div id="pp_full_res"><div class="pp_inline"></div></div>').appendTo(e("body")).show();doresize=false;a=w(e(myClone).width(),e(myClone).height());doresize=true;e(myClone).remove();toInject=settings.inline_markup.replace(/{content}/g,e(pp_images[set_position]).html());break}if(!imgPreloader&&!skipInjection){$pp_pic_holder.find("#pp_full_res")[0].innerHTML=toInject;g()}});return false};e.prettyPhoto.changePage=function(t){currentGalleryPage=0;if(t=="previous"){set_position--;if(set_position<0)set_position=e(pp_images).size()-1}else if(t=="next"){set_position++;if(set_position>e(pp_images).size()-1)set_position=0}else{set_position=t}rel_index=set_position;if(!doresize)doresize=true;if(settings.allow_expand){e(".pp_contract").removeClass("pp_contract").addClass("pp_expand")}y(function(){e.prettyPhoto.open()})};e.prettyPhoto.changeGalleryPage=function(e){if(e=="next"){currentGalleryPage++;if(currentGalleryPage>totalPage)currentGalleryPage=0}else if(e=="previous"){currentGalleryPage--;if(currentGalleryPage<0)currentGalleryPage=totalPage}else{currentGalleryPage=e}slide_speed=e=="next"||e=="previous"?settings.animation_speed:0;slide_to=currentGalleryPage*itemsPerPage*itemWidth;$pp_gallery.find("ul").animate({left:-slide_to},slide_speed)};e.prettyPhoto.startSlideshow=function(){if(typeof m=="undefined"){$pp_pic_holder.find(".pp_play").unbind("click").removeClass("pp_play").addClass("pp_pause").click(function(){e.prettyPhoto.stopSlideshow();return false});m=setInterval(e.prettyPhoto.startSlideshow,settings.slideshow)}else{e.prettyPhoto.changePage("next")}};e.prettyPhoto.stopSlideshow=function(){$pp_pic_holder.find(".pp_pause").unbind("click").removeClass("pp_pause").addClass("pp_play").click(function(){e.prettyPhoto.startSlideshow();return false});clearInterval(m);m=undefined};e.prettyPhoto.close=function(){if($pp_overlay.is(":animated"))return;e.prettyPhoto.stopSlideshow();$pp_pic_holder.stop().find("object,embed").css("visibility","hidden");e("div.pp_pic_holder,div.ppt,.pp_fade").fadeOut(settings.animation_speed,function(){e(this).remove()});$pp_overlay.fadeOut(settings.animation_speed,function(){if(settings.hideflash)e("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility","visible");e(this).remove();e(window).unbind("scroll.prettyphoto");r();settings.callback();doresize=true;f=false;delete settings})};if(!pp_alreadyInitialized&&t()){pp_alreadyInitialized=true;hashIndex=t();hashRel=hashIndex;hashIndex=hashIndex.substring(hashIndex.indexOf("/")+1,hashIndex.length-1);hashRel=hashRel.substring(0,hashRel.indexOf("/"));setTimeout(function(){e("a["+s.hook+"^='"+hashRel+"']:eq("+hashIndex+")").trigger("click")},50)}return this.unbind("click.prettyphoto").bind("click.prettyphoto",e.prettyPhoto.initialize)};})(jQuery);var pp_alreadyInitialized=false
4
  Author: Stephane Caron (http://www.no-margin-for-errors.com)
5
  Version: 3.1.5
6
  ------------------------------------------------------------------------- */
7
+ (function(e){function t(){var e=location.href;hashtag=e.indexOf("#prettyPhoto")!==-1?decodeURI(e.substring(e.indexOf("#prettyPhoto")+1,e.length)):false;return hashtag}function n(){if(typeof theRel=="undefined")return;location.hash=theRel+"/"+rel_index+"/"}function r(){if(location.href.indexOf("#prettyPhoto")!==-1)location.hash="prettyPhoto"}function i(e,t){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var n="[\\?&]"+e+"=([^&#]*)";var r=new RegExp(n);var i=r.exec(t);return i==null?"":i[1]}e.prettyPhoto={version:"3.1.5"};e.fn.prettyPhoto=function(s){function g(){e(".pp_loaderIcon").hide();projectedTop=scroll_pos["scrollTop"]+(d/2-a["containerHeight"]/2);if(projectedTop<0)projectedTop=0;$ppt.fadeTo(settings.animation_speed,1);$pp_pic_holder.find(".pp_content").animate({height:a["contentHeight"],width:a["contentWidth"]},settings.animation_speed);$pp_pic_holder.animate({top:projectedTop,left:v/2-a["containerWidth"]/2<0?0:v/2-a["containerWidth"]/2,width:a["containerWidth"]},settings.animation_speed,function(){$pp_pic_holder.find(".pp_hoverContainer,#fullResImage").height(a["height"]).width(a["width"]);$pp_pic_holder.find(".pp_fade").fadeIn(settings.animation_speed);if(isSet&&S(pp_images[set_position])=="image"){$pp_pic_holder.find(".pp_hoverContainer").show()}else{$pp_pic_holder.find(".pp_hoverContainer").hide()}if(settings.allow_expand){if(a["resized"]){e("a.pp_expand,a.pp_contract").show()}else{e("a.pp_expand").hide()}}if(settings.autoplay_slideshow&&!m&&!f)e.prettyPhoto.startSlideshow();settings.changepicturecallback();f=true});C();s.ajaxcallback()}function y(t){$pp_pic_holder.find("#pp_full_res object,#pp_full_res embed").css("visibility","hidden");$pp_pic_holder.find(".pp_fade").fadeOut(settings.animation_speed,function(){e(".pp_loaderIcon").show();t()})}function b(t){t>1?e(".pp_nav").show():e(".pp_nav").hide()}function w(e,t){resized=false;E(e,t);imageWidth=e,imageHeight=t;if((p>v||h>d)&&doresize&&settings.allow_resize&&!u){resized=true,fitting=false;while(!fitting){if(p>v){imageWidth=v-200;imageHeight=t/e*imageWidth}else if(h>d){imageHeight=d-200;imageWidth=e/t*imageHeight}else{fitting=true}h=imageHeight,p=imageWidth}if(p>v||h>d){w(p,h)}E(imageWidth,imageHeight)}return{width:Math.floor(imageWidth),height:Math.floor(imageHeight),containerHeight:Math.floor(h),containerWidth:Math.floor(p)+settings.horizontal_padding*2,contentHeight:Math.floor(l),contentWidth:Math.floor(c),resized:resized}}function E(t,n){t=parseFloat(t);n=parseFloat(n);$pp_details=$pp_pic_holder.find(".pp_details");$pp_details.width(t);detailsHeight=parseFloat($pp_details.css("marginTop"))+parseFloat($pp_details.css("marginBottom"));$pp_details=$pp_details.clone().addClass(settings.theme).width(t).appendTo(e("body")).css({position:"absolute",top:-1e4});detailsHeight+=$pp_details.height();detailsHeight=detailsHeight<=34?36:detailsHeight;$pp_details.remove();$pp_title=$pp_pic_holder.find(".ppt");$pp_title.width(t);titleHeight=parseFloat($pp_title.css("marginTop"))+parseFloat($pp_title.css("marginBottom"));$pp_title=$pp_title.clone().appendTo(e("body")).css({position:"absolute",top:-1e4});titleHeight+=$pp_title.height();$pp_title.remove();l=n+detailsHeight;c=t;h=l+titleHeight+$pp_pic_holder.find(".pp_top").height()+$pp_pic_holder.find(".pp_bottom").height();p=t}function S(e){if(e.match(/youtube\.com\/watch/i)||e.match(/youtu\.be/i)){return"youtube"}else if(e.match(/vimeo\.com/i)){return"vimeo"}else if(e.match(/\b.mov\b/i)){return"quicktime"}else if(e.match(/\b.swf\b/i)){return"flash"}else if(e.match(/\biframe=true\b/i)){return"iframe"}else if(e.match(/\bajax=true\b/i)){return"ajax"}else if(e.match(/\bcustom=true\b/i)){return"custom"}else if(e.substr(0,1)=="#"){return"inline"}else{return"image"}}function x(){if(doresize&&typeof $pp_pic_holder!="undefined"){scroll_pos=T();contentHeight=$pp_pic_holder.height(),contentwidth=$pp_pic_holder.width();projectedTop=d/2+scroll_pos["scrollTop"]-contentHeight/2;if(projectedTop<0)projectedTop=0;if(contentHeight>d)return;$pp_pic_holder.css({top:projectedTop,left:v/2+scroll_pos["scrollLeft"]-contentwidth/2})}}function T(){if(self.pageYOffset){return{scrollTop:self.pageYOffset,scrollLeft:self.pageXOffset}}else if(document.documentElement&&document.documentElement.scrollTop){return{scrollTop:document.documentElement.scrollTop,scrollLeft:document.documentElement.scrollLeft}}else if(document.body){return{scrollTop:document.body.scrollTop,scrollLeft:document.body.scrollLeft}}}function N(){d=e(window).height(),v=e(window).width();if(typeof $pp_overlay!="undefined")$pp_overlay.height(e(document).height()).width(v)}function C(){if(isSet&&settings.overlay_gallery&&S(pp_images[set_position])=="image"){itemWidth=52+5;navWidth=settings.theme=="facebook"||settings.theme=="pp_default"?50:30;itemsPerPage=Math.floor((a["containerWidth"]-100-navWidth)/itemWidth);itemsPerPage=itemsPerPage<pp_images.length?itemsPerPage:pp_images.length;totalPage=Math.ceil(pp_images.length/itemsPerPage)-1;if(totalPage==0){navWidth=0;$pp_gallery.find(".pp_arrow_next,.pp_arrow_previous").hide()}else{$pp_gallery.find(".pp_arrow_next,.pp_arrow_previous").show()}galleryWidth=itemsPerPage*itemWidth;fullGalleryWidth=pp_images.length*itemWidth;$pp_gallery.css("margin-left",-(galleryWidth/2+navWidth/2)).find("div:first").width(galleryWidth+5).find("ul").width(fullGalleryWidth).find("li.selected").removeClass("selected");goToPage=Math.floor(set_position/itemsPerPage)<totalPage?Math.floor(set_position/itemsPerPage):totalPage;e.prettyPhoto.changeGalleryPage(goToPage);$pp_gallery_li.filter(":eq("+set_position+")").addClass("selected")}else{$pp_pic_holder.find(".pp_content").unbind("mouseenter mouseleave")}}function k(t){if(settings.social_tools)facebook_like_link=settings.social_tools.replace("{location_href}",encodeURIComponent(location.href));settings.markup=settings.markup.replace("{pp_social}","");e("body").append(settings.markup);$pp_pic_holder=e(".pp_pic_holder"),$ppt=e(".ppt"),$pp_overlay=e("div.pp_overlay");if(isSet&&settings.overlay_gallery){currentGalleryPage=0;toInject="";for(var n=0;n<pp_images.length;n++){if(!pp_images[n].match(/\b(jpg|jpeg|png|gif)\b/gi)){classname="default";img_src=""}else{classname="";img_src=pp_images[n]}toInject+="<li class='"+classname+"'><a href='#'><img src='"+img_src+"' width='50' alt='' /></a></li>"}toInject=settings.gallery_markup.replace(/{gallery}/g,toInject);$pp_pic_holder.find("#pp_full_res").after(toInject);$pp_gallery=e(".pp_pic_holder .pp_gallery"),$pp_gallery_li=$pp_gallery.find("li");$pp_gallery.find(".pp_arrow_next").click(function(){e.prettyPhoto.changeGalleryPage("next");e.prettyPhoto.stopSlideshow();return false});$pp_gallery.find(".pp_arrow_previous").click(function(){e.prettyPhoto.changeGalleryPage("previous");e.prettyPhoto.stopSlideshow();return false});$pp_pic_holder.find(".pp_content").hover(function(){$pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeIn()},function(){$pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeOut()});itemWidth=52+5;$pp_gallery_li.each(function(t){e(this).find("a").click(function(){e.prettyPhoto.changePage(t);e.prettyPhoto.stopSlideshow();return false})})}if(settings.slideshow){$pp_pic_holder.find(".pp_nav").prepend('<a href="#" class="pp_play">Play</a>');$pp_pic_holder.find(".pp_nav .pp_play").click(function(){e.prettyPhoto.startSlideshow();return false})}$pp_pic_holder.attr("class","pp_pic_holder "+settings.theme);$pp_overlay.css({opacity:0,height:e(document).height(),width:e(window).width()}).bind("click",function(){if(!settings.modal)e.prettyPhoto.close()});e("a.pp_close").bind("click",function(){e.prettyPhoto.close();return false});if(settings.allow_expand){e("a.pp_expand").bind("click",function(t){if(e(this).hasClass("pp_expand")){e(this).removeClass("pp_expand").addClass("pp_contract");doresize=false}else{e(this).removeClass("pp_contract").addClass("pp_expand");doresize=true}y(function(){e.prettyPhoto.open()});return false})}$pp_pic_holder.find(".pp_previous, .pp_nav .pp_arrow_previous").bind("click",function(){e.prettyPhoto.changePage("previous");e.prettyPhoto.stopSlideshow();return false});$pp_pic_holder.find(".pp_next, .pp_nav .pp_arrow_next").bind("click",function(){e.prettyPhoto.changePage("next");e.prettyPhoto.stopSlideshow();return false});x()}s=jQuery.extend({hook:"rel",animation_speed:"fast",ajaxcallback:function(){},slideshow:5e3,autoplay_slideshow:false,opacity:.8,show_title:true,allow_resize:true,allow_expand:true,default_width:500,default_height:344,counter_separator_label:"/",theme:"pp_default",horizontal_padding:20,hideflash:false,wmode:"opaque",autoplay:true,modal:false,deeplinking:true,overlay_gallery:true,overlay_gallery_max:30,keyboard_shortcuts:true,changepicturecallback:function(){},callback:function(){},ie6_fallback:true,markup:'<div class="pp_pic_holder"> <div class="ppt"> </div> <div class="pp_top"> <div class="pp_left"></div> <div class="pp_middle"></div> <div class="pp_right"></div> </div> <div class="pp_content_container"> <div class="pp_left"> <div class="pp_right"> <div class="pp_content"> <div class="pp_loaderIcon"></div> <div class="pp_fade"> <a href="#" class="pp_expand" title="Expand the image">Expand</a> <div class="pp_hoverContainer"> <a class="pp_next" href="#">next</a> <a class="pp_previous" href="#">previous</a> </div> <div id="pp_full_res"></div> <div class="pp_details"> <div class="pp_nav"> <a href="#" class="pp_arrow_previous">Previous</a> <p class="currentTextHolder">0/0</p> <a href="#" class="pp_arrow_next">Next</a> </div> <p class="pp_description"></p> <div class="pp_social">{pp_social}</div> <a class="pp_close" href="#">Close</a> </div> </div> </div> </div> </div> </div> <div class="pp_bottom"> <div class="pp_left"></div> <div class="pp_middle"></div> <div class="pp_right"></div> </div> </div> <div class="pp_overlay"></div>',gallery_markup:'<div class="pp_gallery"> <a href="#" class="pp_arrow_previous">Previous</a> <div> <ul> {gallery} </ul> </div> <a href="#" class="pp_arrow_next">Next</a> </div>',image_markup:'<img id="fullResImage" src="{path}" />',flash_markup:'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="{width}" height="{height}"><param name="wmode" value="{wmode}" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="{path}" /><embed src="{path}" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="{width}" height="{height}" wmode="{wmode}"></embed></object>',quicktime_markup:'<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="//www.apple.com/qtactivex/qtplugin.cab" height="{height}" width="{width}"><param name="src" value="{path}"><param name="autoplay" value="{autoplay}"><param name="type" value="video/quicktime"><embed src="{path}" height="{height}" width="{width}" autoplay="{autoplay}" type="video/quicktime" pluginspage="//www.apple.com/quicktime/download/"></embed></object>',iframe_markup:'<iframe src ="{path}" width="{width}" height="{height}" frameborder="no"></iframe>',inline_markup:'<div class="pp_inline">{content}</div>',custom_markup:"",social_tools:'<div class="twitter"><a href="//twitter.com/share" class="twitter-share-button" data-count="none">Tweet</a><script type="text/javascript" src="//platform.twitter.com/widgets.js"></script></div><div class="facebook"><iframe src="//www.facebook.com/plugins/like.php?locale=en_US&href={location_href}&layout=button_count&show_faces=true&width=500&action=like&font&colorscheme=light&height=23" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:23px;" allowTransparency="true"></iframe></div>'},s);var o=this,u=false,a,f,l,c,h,p,d=e(window).height(),v=e(window).width(),m;doresize=true,scroll_pos=T();e(window).unbind("resize.prettyphoto").bind("resize.prettyphoto",function(){x();N()});if(s.keyboard_shortcuts){e(document).unbind("keydown.prettyphoto").bind("keydown.prettyphoto",function(t){if(typeof $pp_pic_holder!="undefined"){if($pp_pic_holder.is(":visible")){switch(t.keyCode){case 37:e.prettyPhoto.changePage("previous");t.preventDefault();break;case 39:e.prettyPhoto.changePage("next");t.preventDefault();break;case 27:if(!settings.modal)e.prettyPhoto.close();t.preventDefault();break}}}})}e.prettyPhoto.initialize=function(){settings=s;if(settings.theme=="pp_default")settings.horizontal_padding=16;theRel=e(this).attr(settings.hook);galleryRegExp=/\[(?:.*)\]/;isSet=galleryRegExp.exec(theRel)?true:false;pp_images=isSet?jQuery.map(o,function(t,n){if(e(t).attr(settings.hook).indexOf(theRel)!=-1)return e(t).attr("href")}):e.makeArray(e(this).attr("href"));pp_titles=isSet?jQuery.map(o,function(t,n){if(e(t).attr(settings.hook).indexOf(theRel)!=-1)return e(t).find("img").attr("alt")?e(t).find("img").attr("alt"):""}):e.makeArray(e(this).find("img").attr("alt"));pp_descriptions=isSet?jQuery.map(o,function(t,n){if(e(t).attr(settings.hook).indexOf(theRel)!=-1)return e(t).attr("title")?e(t).attr("title"):""}):e.makeArray(e(this).attr("title"));if(pp_images.length>settings.overlay_gallery_max)settings.overlay_gallery=false;set_position=jQuery.inArray(e(this).attr("href"),pp_images);rel_index=isSet?set_position:e("a["+settings.hook+"^='"+theRel+"']").index(e(this));k(this);if(settings.allow_resize)e(window).bind("scroll.prettyphoto",function(){x()});e.prettyPhoto.open();return false};e.prettyPhoto.open=function(t){if(typeof settings=="undefined"){settings=s;pp_images=e.makeArray(arguments[0]);pp_titles=arguments[1]?e.makeArray(arguments[1]):e.makeArray("");pp_descriptions=arguments[2]?e.makeArray(arguments[2]):e.makeArray("");isSet=pp_images.length>1?true:false;set_position=arguments[3]?arguments[3]:0;k(t.target)}if(settings.hideflash)e("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility","hidden");b(e(pp_images).size());e(".pp_loaderIcon").show();if(settings.deeplinking)n();if(settings.social_tools){facebook_like_link=settings.social_tools.replace("{location_href}",encodeURIComponent(location.href));$pp_pic_holder.find(".pp_social").html(facebook_like_link)}if($ppt.is(":hidden"))$ppt.css("opacity",0).show();$pp_overlay.show().fadeTo(settings.animation_speed,settings.opacity);$pp_pic_holder.find(".currentTextHolder").text(set_position+1+settings.counter_separator_label+e(pp_images).size());if(typeof pp_descriptions[set_position]!="undefined"&&pp_descriptions[set_position]!=""){$pp_pic_holder.find(".pp_description").show().html(unescape(pp_descriptions[set_position]))}else{$pp_pic_holder.find(".pp_description").hide()}movie_width=parseFloat(i("width",pp_images[set_position]))?i("width",pp_images[set_position]):settings.default_width.toString();movie_height=parseFloat(i("height",pp_images[set_position]))?i("height",pp_images[set_position]):settings.default_height.toString();u=false;if(movie_height.indexOf("%")!=-1){movie_height=parseFloat(e(window).height()*parseFloat(movie_height)/100-150);u=true}if(movie_width.indexOf("%")!=-1){movie_width=parseFloat(e(window).width()*parseFloat(movie_width)/100-150);u=true}$pp_pic_holder.fadeIn(function(){settings.show_title&&pp_titles[set_position]!=""&&typeof pp_titles[set_position]!="undefined"?$ppt.html(unescape(pp_titles[set_position])):$ppt.html(" ");imgPreloader="";skipInjection=false;switch(S(pp_images[set_position])){case"image":imgPreloader=new Image;nextImage=new Image;if(isSet&&set_position<e(pp_images).size()-1)nextImage.src=pp_images[set_position+1];prevImage=new Image;if(isSet&&pp_images[set_position-1])prevImage.src=pp_images[set_position-1];$pp_pic_holder.find("#pp_full_res")[0].innerHTML=settings.image_markup.replace(/{path}/g,pp_images[set_position]);imgPreloader.onload=function(){a=w(imgPreloader.width,imgPreloader.height);g()};imgPreloader.onerror=function(){alert("Image cannot be loaded. Make sure the path is correct and image exist.");e.prettyPhoto.close()};imgPreloader.src=pp_images[set_position];break;case"youtube":a=w(movie_width,movie_height);movie_id=i("v",pp_images[set_position]);if(movie_id==""){movie_id=pp_images[set_position].split("youtu.be/");movie_id=movie_id[1];if(movie_id.indexOf("?")>0)movie_id=movie_id.substr(0,movie_id.indexOf("?"));if(movie_id.indexOf("&")>0)movie_id=movie_id.substr(0,movie_id.indexOf("&"))}movie="//www.youtube.com/embed/"+movie_id;i("rel",pp_images[set_position])?movie+="?rel="+i("rel",pp_images[set_position]):movie+="?rel=1";if(settings.autoplay)movie+="&autoplay=1";toInject=settings.iframe_markup.replace(/{width}/g,a["width"]).replace(/{height}/g,a["height"]).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,movie);break;case"vimeo":a=w(movie_width,movie_height);movie_id=pp_images[set_position];var t=/http(s?):\/\/(www\.)?vimeo.com\/(\d+)/;var n=movie_id.match(t);movie="//player.vimeo.com/video/"+n[3]+"?title=0&byline=0&portrait=0";if(settings.autoplay)movie+="&autoplay=1;";vimeo_width=a["width"]+"/embed/?moog_width="+a["width"];toInject=settings.iframe_markup.replace(/{width}/g,vimeo_width).replace(/{height}/g,a["height"]).replace(/{path}/g,movie);break;case"quicktime":a=w(movie_width,movie_height);a["height"]+=15;a["contentHeight"]+=15;a["containerHeight"]+=15;toInject=settings.quicktime_markup.replace(/{width}/g,a["width"]).replace(/{height}/g,a["height"]).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,pp_images[set_position]).replace(/{autoplay}/g,settings.autoplay);break;case"flash":a=w(movie_width,movie_height);flash_vars=pp_images[set_position];flash_vars=flash_vars.substring(pp_images[set_position].indexOf("flashvars")+10,pp_images[set_position].length);filename=pp_images[set_position];filename=filename.substring(0,filename.indexOf("?"));toInject=settings.flash_markup.replace(/{width}/g,a["width"]).replace(/{height}/g,a["height"]).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,filename+"?"+flash_vars);break;case"iframe":a=w(movie_width,movie_height);frame_url=pp_images[set_position];frame_url=frame_url.substr(0,frame_url.indexOf("iframe")-1);toInject=settings.iframe_markup.replace(/{width}/g,a["width"]).replace(/{height}/g,a["height"]).replace(/{path}/g,frame_url);break;case"ajax":doresize=false;a=w(movie_width,movie_height);doresize=true;skipInjection=true;e.get(pp_images[set_position],function(e){toInject=settings.inline_markup.replace(/{content}/g,e);$pp_pic_holder.find("#pp_full_res")[0].innerHTML=toInject;g()});break;case"custom":a=w(movie_width,movie_height);toInject=settings.custom_markup;break;case"inline":myClone=e(pp_images[set_position]).clone().append('<br clear="all" />').css({width:settings.default_width}).wrapInner('<div id="pp_full_res"><div class="pp_inline"></div></div>').appendTo(e("body")).show();doresize=false;a=w(e(myClone).width(),e(myClone).height());doresize=true;e(myClone).remove();toInject=settings.inline_markup.replace(/{content}/g,e(pp_images[set_position]).html());break}if(!imgPreloader&&!skipInjection){$pp_pic_holder.find("#pp_full_res")[0].innerHTML=toInject;g()}});return false};e.prettyPhoto.changePage=function(t){currentGalleryPage=0;if(t=="previous"){set_position--;if(set_position<0)set_position=e(pp_images).size()-1}else if(t=="next"){set_position++;if(set_position>e(pp_images).size()-1)set_position=0}else{set_position=t}rel_index=set_position;if(!doresize)doresize=true;if(settings.allow_expand){e(".pp_contract").removeClass("pp_contract").addClass("pp_expand")}y(function(){e.prettyPhoto.open()})};e.prettyPhoto.changeGalleryPage=function(e){if(e=="next"){currentGalleryPage++;if(currentGalleryPage>totalPage)currentGalleryPage=0}else if(e=="previous"){currentGalleryPage--;if(currentGalleryPage<0)currentGalleryPage=totalPage}else{currentGalleryPage=e}slide_speed=e=="next"||e=="previous"?settings.animation_speed:0;slide_to=currentGalleryPage*itemsPerPage*itemWidth;$pp_gallery.find("ul").animate({left:-slide_to},slide_speed)};e.prettyPhoto.startSlideshow=function(){if(typeof m=="undefined"){$pp_pic_holder.find(".pp_play").unbind("click").removeClass("pp_play").addClass("pp_pause").click(function(){e.prettyPhoto.stopSlideshow();return false});m=setInterval(e.prettyPhoto.startSlideshow,settings.slideshow)}else{e.prettyPhoto.changePage("next")}};e.prettyPhoto.stopSlideshow=function(){$pp_pic_holder.find(".pp_pause").unbind("click").removeClass("pp_pause").addClass("pp_play").click(function(){e.prettyPhoto.startSlideshow();return false});clearInterval(m);m=undefined};e.prettyPhoto.close=function(){if($pp_overlay.is(":animated"))return;e.prettyPhoto.stopSlideshow();$pp_pic_holder.stop().find("object,embed").css("visibility","hidden");e("div.pp_pic_holder,div.ppt,.pp_fade").fadeOut(settings.animation_speed,function(){e(this).remove()});$pp_overlay.fadeOut(settings.animation_speed,function(){if(settings.hideflash)e("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility","visible");e(this).remove();e(window).unbind("scroll.prettyphoto");r();settings.callback();doresize=true;f=false;delete settings})};if(!pp_alreadyInitialized&&t()){pp_alreadyInitialized=true;hashIndex=t();hashRel=hashIndex;hashIndex=hashIndex.substring(hashIndex.indexOf("/")+1,hashIndex.length-1);hashRel=hashRel.substring(0,hashRel.indexOf("/"));setTimeout(function(){e("a["+s.hook+"^='"+hashRel+"']:eq("+hashIndex+")").trigger("click")},50)}return this.unbind("click.prettyphoto").bind("click.prettyphoto",e.prettyPhoto.initialize)};})(jQuery);var pp_alreadyInitialized=false
assets/swipebox/source/jquery.swipebox.min.js CHANGED
@@ -9,4 +9,4 @@
9
  * @version 1.2.4
10
  * @license MIT License
11
  */
12
- (function(e,t,n,r){n.swipebox=function(i,s){var o={useCSS:true,initialIndexOnArray:0,hideBarsDelay:3e3,videoMaxWidth:1140,vimeoColor:"CCCCCC",beforeOpen:null,afterClose:null},u=this,a=[],i=i,f=i.selector,l=n(f),c=t.createTouch!==r||"ontouchstart"in e||"onmsgesturechange"in e||navigator.msMaxTouchPoints,h=!!e.SVGSVGElement,p=e.innerWidth?e.innerWidth:n(e).width(),d=e.innerHeight?e.innerHeight:n(e).height(),v='<div id="swipebox-overlay"> <div id="swipebox-slider"></div> <div id="swipebox-caption"></div> <div id="swipebox-action"> <a id="swipebox-close"></a> <a id="swipebox-prev"></a> <a id="swipebox-next"></a> </div> </div>',m=0,g=0;u.settings={};u.init=function(){u.settings=n.extend({},o,s);if(n.isArray(i)){a=i;y.target=n(e);y.init(u.settings.initialIndexOnArray)}else{l.click(function(e){u.refresh();a=[];var t,r,i;if(!i){r="rel";i=n(this).attr(r)}if(i&&i!==""&&i!=="nofollow"){$elem=l.filter("["+r+'="'+i+'"]')}else{$elem=n(f)}$elem.each(function(){var e=null,t=null;if(n(this).attr("title"))e=n(this).attr("title");else if(n(this).children("img").attr("alt"))e=n(this).children("img").attr("alt");if(n(this).attr("href"))t=n(this).attr("href");a.push({href:t,title:e})});t=$elem.index(n(this));e.preventDefault();e.stopPropagation();y.target=n(e.target);y.init(t)})}};u.refresh=function(){if(!n.isArray(i)){y.destroy();$elem=n(f);y.actions()}};var y={init:function(e){if(u.settings.beforeOpen)u.settings.beforeOpen();this.target.trigger("swipebox-start");n.swipebox.isOpen=true;this.build();this.openSlide(e);this.openMedia(e);this.preloadMedia(e+1);this.preloadMedia(e-1)},build:function(){var e=this;n("body").append(v);if(e.doCssTrans()){n("#swipebox-slider").css({"-webkit-transition":"left 0.4s ease","-moz-transition":"left 0.4s ease","-o-transition":"left 0.4s ease","-khtml-transition":"left 0.4s ease",transition:"left 0.4s ease"});n("#swipebox-overlay").css({"-webkit-transition":"opacity 1s ease","-moz-transition":"opacity 1s ease","-o-transition":"opacity 1s ease","-khtml-transition":"opacity 1s ease",transition:"opacity 1s ease"});n("#swipebox-action, #swipebox-caption").css({"-webkit-transition":"0.5s","-moz-transition":"0.5s","-o-transition":"0.5s","-khtml-transition":"0.5s",transition:"0.5s"})}if(h){var t=n("#swipebox-action #swipebox-close").css("background-image");t=t.replace("png","svg");n("#swipebox-action #swipebox-prev,#swipebox-action #swipebox-next,#swipebox-action #swipebox-close").css({"background-image":t})}n.each(a,function(){n("#swipebox-slider").append('<div class="slide"></div>')});e.setDim();e.actions();e.keyboard();e.gesture();e.animBars();e.resize()},setDim:function(){var t,r,i={};if("onorientationchange"in e){e.addEventListener("orientationchange",function(){if(e.orientation==0){t=p;r=d}else if(e.orientation==90||e.orientation==-90){t=d;r=p}},false)}else{t=e.innerWidth?e.innerWidth:n(e).width();r=e.innerHeight?e.innerHeight:n(e).height()}i={width:t,height:r};n("#swipebox-overlay").css(i)},resize:function(){var t=this;n(e).resize(function(){t.setDim()}).resize()},supportTransition:function(){var e="transition WebkitTransition MozTransition OTransition msTransition KhtmlTransition".split(" ");for(var n=0;n<e.length;n++){if(t.createElement("div").style[e[n]]!==r){return e[n]}}return false},doCssTrans:function(){if(u.settings.useCSS&&this.supportTransition()){return true}},gesture:function(){if(c){var e=this,t=null,r=10,i={},s={};var o=n("#swipebox-caption, #swipebox-action");o.addClass("visible-bars");e.setTimeout();n("#swipebox-slider").bind("touchstart",function(e){n(this).addClass("touching");s=e.originalEvent.targetTouches[0];i.pageX=e.originalEvent.targetTouches[0].pageX;n(".touching").bind("touchmove",function(e){e.preventDefault();e.stopPropagation();s=e.originalEvent.targetTouches[0]});return false}).bind("touchend",function(u){u.preventDefault();u.stopPropagation();t=s.pageX-i.pageX;if(t>=r){e.getPrev()}else if(t<=-r){e.getNext()}else{if(!o.hasClass("visible-bars")){e.showBars();e.setTimeout()}else{e.clearTimeout();e.hideBars()}}n(".touching").off("touchmove").removeClass("touching")})}},setTimeout:function(){if(u.settings.hideBarsDelay>0){var t=this;t.clearTimeout();t.timeout=e.setTimeout(function(){t.hideBars()},u.settings.hideBarsDelay)}},clearTimeout:function(){e.clearTimeout(this.timeout);this.timeout=null},showBars:function(){var e=n("#swipebox-caption, #swipebox-action");if(this.doCssTrans()){e.addClass("visible-bars")}else{n("#swipebox-caption").animate({top:0},500);n("#swipebox-action").animate({bottom:0},500);setTimeout(function(){e.addClass("visible-bars")},1e3)}},hideBars:function(){var e=n("#swipebox-caption, #swipebox-action");if(this.doCssTrans()){e.removeClass("visible-bars")}else{n("#swipebox-caption").animate({top:"-50px"},500);n("#swipebox-action").animate({bottom:"-50px"},500);setTimeout(function(){e.removeClass("visible-bars")},1e3)}},animBars:function(){var e=this;var t=n("#swipebox-caption, #swipebox-action");t.addClass("visible-bars");e.setTimeout();if(!c){n("#swipebox-slider").click(function(n){if(!t.hasClass("visible-bars")){e.showBars();e.setTimeout()}else{e.clearTimeout();e.hideBars()}})}n("#swipebox-action").hover(function(){e.showBars();t.addClass("force-visible-bars");e.clearTimeout()},function(){t.removeClass("force-visible-bars");e.setTimeout()})},keyboard:function(){var t=this;n(e).bind("keyup",function(e){e.preventDefault();e.stopPropagation();if(e.keyCode==37){t.getPrev()}else if(e.keyCode==39){t.getNext()}else if(e.keyCode==27){t.closeSlide()}})},actions:function(){var e=this;if(a.length<2){n("#swipebox-prev, #swipebox-next").hide()}else{n("#swipebox-prev").bind("click",function(t){t.preventDefault();t.stopPropagation();e.getPrev();e.setTimeout()});n("#swipebox-next").bind("click",function(t){t.preventDefault();t.stopPropagation();e.getNext();e.setTimeout()})}n("#swipebox-close").bind("click",function(t){e.closeSlide()})},setSlide:function(e,t){t=t||false;var r=n("#swipebox-slider");if(this.doCssTrans()){r.css({left:-e*100+"%"})}else{r.animate({left:-e*100+"%"})}n("#swipebox-slider .slide").removeClass("current");n("#swipebox-slider .slide").eq(e).addClass("current");this.setTitle(e);if(t){r.fadeIn()}n("#swipebox-prev, #swipebox-next").removeClass("disabled");if(e==0){n("#swipebox-prev").addClass("disabled")}else if(e==a.length-1){n("#swipebox-next").addClass("disabled")}},openSlide:function(t){if(m==0&&g==0){m=n(e).scrollLeft();g=n(e).scrollTop()}n(e).scrollLeft(0);n(e).scrollTop(0);n("html").addClass("swipebox");n(e).trigger("resize");this.setSlide(t,true)},preloadMedia:function(e){var t=this,n=null;if(a[e]!==r)n=a[e].href;if(!t.isVideo(n)){setTimeout(function(){t.openMedia(e)},1e3)}else{t.openMedia(e)}},openMedia:function(e){var t=this,i=null;if(a[e]!==r)i=a[e].href;if(e<0||e>=a.length){return false}if(!t.isVideo(i)){t.loadMedia(i,function(){n("#swipebox-slider .slide").eq(e).html(this)})}else{n("#swipebox-slider .slide").eq(e).html(t.getVideo(i))}},setTitle:function(e,t){var i=null;n("#swipebox-caption").empty();if(a[e]!==r)i=a[e].title;if(i){n("#swipebox-caption").append(i)}},isVideo:function(e){if(e){if(e.match(/youtube\.com\/watch\?v=([a-zA-Z0-9\-_]+)/)||e.match(/vimeo\.com\/([0-9]*)/)){return true}}},getVideo:function(e){var t="";var n="";var r=e.match(/watch\?v=([a-zA-Z0-9\-_]+)/);var i=e.match(/vimeo\.com\/([0-9]*)/);if(r){t='<iframe width="560" height="315" src="//www.youtube.com/embed/'+r[1]+'" frameborder="0" allowfullscreen></iframe>'}else if(i){t='<iframe width="560" height="315" src="http://player.vimeo.com/video/'+i[1]+"?byline=0&portrait=0&color="+u.settings.vimeoColor+'" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>'}return'<div class="swipebox-video-container" style="max-width:'+u.settings.videoMaxWidth+'px"><div class="swipebox-video">'+t+"</div></div>"},loadMedia:function(e,t){if(!this.isVideo(e)){var r=n("<img>").on("load",function(){t.call(r)});r.attr("src",e)}},getNext:function(){var e=this;index=n("#swipebox-slider .slide").index(n("#swipebox-slider .slide.current"));if(index+1<a.length){index++;e.setSlide(index);e.preloadMedia(index+1)}else{n("#swipebox-slider").addClass("rightSpring");setTimeout(function(){n("#swipebox-slider").removeClass("rightSpring")},500)}},getPrev:function(){index=n("#swipebox-slider .slide").index(n("#swipebox-slider .slide.current"));if(index>0){index--;this.setSlide(index);this.preloadMedia(index-1)}else{n("#swipebox-slider").addClass("leftSpring");setTimeout(function(){n("#swipebox-slider").removeClass("leftSpring")},500)}},closeSlide:function(){n("html").removeClass("swipebox");n(e).trigger("resize");this.destroy();if(m!=0||g!=0){n(e).scrollLeft(m);n(e).scrollTop(g);m=0;g=0}},destroy:function(){n(e).unbind("keyup");n("#swipebox-slider").unbind("touchstart");n("#swipebox-slider").unbind("touchmove");n("#swipebox-slider").unbind("touchend");n("#swipebox-slider").unbind();n("#swipebox-overlay").remove();if(!n.isArray(i))i.removeData("_swipebox");if(this.target)this.target.trigger("swipebox-destroy");n.swipebox.isOpen=false;if(u.settings.afterClose)u.settings.afterClose()}};u.init()};n.fn.swipebox=function(e){if(!n.data(this,"_swipebox")){var t=new n.swipebox(this,e);this.data("_swipebox",t)}return this.data("_swipebox")}})(window,document,jQuery)
9
  * @version 1.2.4
10
  * @license MIT License
11
  */
12
+ (function(e,t,n,r){n.swipebox=function(i,s){var o={useCSS:true,initialIndexOnArray:0,hideBarsDelay:3e3,videoMaxWidth:1140,vimeoColor:"CCCCCC",beforeOpen:null,afterClose:null},u=this,a=[],i=i,f=i.selector,l=n(f),c=t.createTouch!==r||"ontouchstart"in e||"onmsgesturechange"in e||navigator.msMaxTouchPoints,h=!!e.SVGSVGElement,p=e.innerWidth?e.innerWidth:n(e).width(),d=e.innerHeight?e.innerHeight:n(e).height(),v='<div id="swipebox-overlay"> <div id="swipebox-slider"></div> <div id="swipebox-caption"></div> <div id="swipebox-action"> <a id="swipebox-close"></a> <a id="swipebox-prev"></a> <a id="swipebox-next"></a> </div> </div>',m=0,g=0;u.settings={};u.init=function(){u.settings=n.extend({},o,s);if(n.isArray(i)){a=i;y.target=n(e);y.init(u.settings.initialIndexOnArray)}else{l.click(function(e){u.refresh();a=[];var t,r,i;if(!i){r="rel";i=n(this).attr(r)}if(i&&i!==""&&i!=="nofollow"){$elem=l.filter("["+r+'="'+i+'"]')}else{$elem=n(f)}$elem.each(function(){var e=null,t=null;if(n(this).attr("title"))e=n(this).attr("title");else if(n(this).children("img").attr("alt"))e=n(this).children("img").attr("alt");if(n(this).attr("href"))t=n(this).attr("href");a.push({href:t,title:e})});t=$elem.index(n(this));e.preventDefault();e.stopPropagation();y.target=n(e.target);y.init(t)})}};u.refresh=function(){if(!n.isArray(i)){y.destroy();$elem=n(f);y.actions()}};var y={init:function(e){if(u.settings.beforeOpen)u.settings.beforeOpen();this.target.trigger("swipebox-start");n.swipebox.isOpen=true;this.build();this.openSlide(e);this.openMedia(e);this.preloadMedia(e+1);this.preloadMedia(e-1)},build:function(){var e=this;n("body").append(v);if(e.doCssTrans()){n("#swipebox-slider").css({"-webkit-transition":"left 0.4s ease","-moz-transition":"left 0.4s ease","-o-transition":"left 0.4s ease","-khtml-transition":"left 0.4s ease",transition:"left 0.4s ease"});n("#swipebox-overlay").css({"-webkit-transition":"opacity 1s ease","-moz-transition":"opacity 1s ease","-o-transition":"opacity 1s ease","-khtml-transition":"opacity 1s ease",transition:"opacity 1s ease"});n("#swipebox-action, #swipebox-caption").css({"-webkit-transition":"0.5s","-moz-transition":"0.5s","-o-transition":"0.5s","-khtml-transition":"0.5s",transition:"0.5s"})}if(h){var t=n("#swipebox-action #swipebox-close").css("background-image");t=t.replace("png","svg");n("#swipebox-action #swipebox-prev,#swipebox-action #swipebox-next,#swipebox-action #swipebox-close").css({"background-image":t})}n.each(a,function(){n("#swipebox-slider").append('<div class="slide"></div>')});e.setDim();e.actions();e.keyboard();e.gesture();e.animBars();e.resize()},setDim:function(){var t,r,i={};if("onorientationchange"in e){e.addEventListener("orientationchange",function(){if(e.orientation==0){t=p;r=d}else if(e.orientation==90||e.orientation==-90){t=d;r=p}},false)}else{t=e.innerWidth?e.innerWidth:n(e).width();r=e.innerHeight?e.innerHeight:n(e).height()}i={width:t,height:r};n("#swipebox-overlay").css(i)},resize:function(){var t=this;n(e).resize(function(){t.setDim()}).resize()},supportTransition:function(){var e="transition WebkitTransition MozTransition OTransition msTransition KhtmlTransition".split(" ");for(var n=0;n<e.length;n++){if(t.createElement("div").style[e[n]]!==r){return e[n]}}return false},doCssTrans:function(){if(u.settings.useCSS&&this.supportTransition()){return true}},gesture:function(){if(c){var e=this,t=null,r=10,i={},s={};var o=n("#swipebox-caption, #swipebox-action");o.addClass("visible-bars");e.setTimeout();n("#swipebox-slider").bind("touchstart",function(e){n(this).addClass("touching");s=e.originalEvent.targetTouches[0];i.pageX=e.originalEvent.targetTouches[0].pageX;n(".touching").bind("touchmove",function(e){e.preventDefault();e.stopPropagation();s=e.originalEvent.targetTouches[0]});return false}).bind("touchend",function(u){u.preventDefault();u.stopPropagation();t=s.pageX-i.pageX;if(t>=r){e.getPrev()}else if(t<=-r){e.getNext()}else{if(!o.hasClass("visible-bars")){e.showBars();e.setTimeout()}else{e.clearTimeout();e.hideBars()}}n(".touching").off("touchmove").removeClass("touching")})}},setTimeout:function(){if(u.settings.hideBarsDelay>0){var t=this;t.clearTimeout();t.timeout=e.setTimeout(function(){t.hideBars()},u.settings.hideBarsDelay)}},clearTimeout:function(){e.clearTimeout(this.timeout);this.timeout=null},showBars:function(){var e=n("#swipebox-caption, #swipebox-action");if(this.doCssTrans()){e.addClass("visible-bars")}else{n("#swipebox-caption").animate({top:0},500);n("#swipebox-action").animate({bottom:0},500);setTimeout(function(){e.addClass("visible-bars")},1e3)}},hideBars:function(){var e=n("#swipebox-caption, #swipebox-action");if(this.doCssTrans()){e.removeClass("visible-bars")}else{n("#swipebox-caption").animate({top:"-50px"},500);n("#swipebox-action").animate({bottom:"-50px"},500);setTimeout(function(){e.removeClass("visible-bars")},1e3)}},animBars:function(){var e=this;var t=n("#swipebox-caption, #swipebox-action");t.addClass("visible-bars");e.setTimeout();if(!c){n("#swipebox-slider").click(function(n){if(!t.hasClass("visible-bars")){e.showBars();e.setTimeout()}else{e.clearTimeout();e.hideBars()}})}n("#swipebox-action").hover(function(){e.showBars();t.addClass("force-visible-bars");e.clearTimeout()},function(){t.removeClass("force-visible-bars");e.setTimeout()})},keyboard:function(){var t=this;n(e).bind("keyup",function(e){e.preventDefault();e.stopPropagation();if(e.keyCode==37){t.getPrev()}else if(e.keyCode==39){t.getNext()}else if(e.keyCode==27){t.closeSlide()}})},actions:function(){var e=this;if(a.length<2){n("#swipebox-prev, #swipebox-next").hide()}else{n("#swipebox-prev").bind("click",function(t){t.preventDefault();t.stopPropagation();e.getPrev();e.setTimeout()});n("#swipebox-next").bind("click",function(t){t.preventDefault();t.stopPropagation();e.getNext();e.setTimeout()})}n("#swipebox-close").bind("click",function(t){e.closeSlide()})},setSlide:function(e,t){t=t||false;var r=n("#swipebox-slider");if(this.doCssTrans()){r.css({left:-e*100+"%"})}else{r.animate({left:-e*100+"%"})}n("#swipebox-slider .slide").removeClass("current");n("#swipebox-slider .slide").eq(e).addClass("current");this.setTitle(e);if(t){r.fadeIn()}n("#swipebox-prev, #swipebox-next").removeClass("disabled");if(e==0){n("#swipebox-prev").addClass("disabled")}else if(e==a.length-1){n("#swipebox-next").addClass("disabled")}},openSlide:function(t){if(m==0&&g==0){m=n(e).scrollLeft();g=n(e).scrollTop()}n(e).scrollLeft(0);n(e).scrollTop(0);n("html").addClass("swipebox");n(e).trigger("resize");this.setSlide(t,true)},preloadMedia:function(e){var t=this,n=null;if(a[e]!==r)n=a[e].href;if(!t.isVideo(n)){setTimeout(function(){t.openMedia(e)},1e3)}else{t.openMedia(e)}},openMedia:function(e){var t=this,i=null;if(a[e]!==r)i=a[e].href;if(e<0||e>=a.length){return false}if(!t.isVideo(i)){t.loadMedia(i,function(){n("#swipebox-slider .slide").eq(e).html(this)})}else{n("#swipebox-slider .slide").eq(e).html(t.getVideo(i))}},setTitle:function(e,t){var i=null;n("#swipebox-caption").empty();if(a[e]!==r)i=a[e].title;if(i){n("#swipebox-caption").append(i)}},isVideo:function(e){if(e){if(e.match(/youtube\.com\/watch\?v=([a-zA-Z0-9\-_]+)/)||e.match(/vimeo\.com\/([0-9]*)/)){return true}}},getVideo:function(e){var t="";var n="";var r=e.match(/watch\?v=([a-zA-Z0-9\-_]+)/);var i=e.match(/vimeo\.com\/([0-9]*)/);if(r){t='<iframe width="560" height="315" src="//www.youtube.com/embed/'+r[1]+'" frameborder="0" allowfullscreen></iframe>'}else if(i){t='<iframe width="560" height="315" src="//player.vimeo.com/video/'+i[1]+"?byline=0&portrait=0&color="+u.settings.vimeoColor+'" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>'}return'<div class="swipebox-video-container" style="max-width:'+u.settings.videoMaxWidth+'px"><div class="swipebox-video">'+t+"</div></div>"},loadMedia:function(e,t){if(!this.isVideo(e)){var r=n("<img>").on("load",function(){t.call(r)});r.attr("src",e)}},getNext:function(){var e=this;index=n("#swipebox-slider .slide").index(n("#swipebox-slider .slide.current"));if(index+1<a.length){index++;e.setSlide(index);e.preloadMedia(index+1)}else{n("#swipebox-slider").addClass("rightSpring");setTimeout(function(){n("#swipebox-slider").removeClass("rightSpring")},500)}},getPrev:function(){index=n("#swipebox-slider .slide").index(n("#swipebox-slider .slide.current"));if(index>0){index--;this.setSlide(index);this.preloadMedia(index-1)}else{n("#swipebox-slider").addClass("leftSpring");setTimeout(function(){n("#swipebox-slider").removeClass("leftSpring")},500)}},closeSlide:function(){n("html").removeClass("swipebox");n(e).trigger("resize");this.destroy();if(m!=0||g!=0){n(e).scrollLeft(m);n(e).scrollTop(g);m=0;g=0}},destroy:function(){n(e).unbind("keyup");n("#swipebox-slider").unbind("touchstart");n("#swipebox-slider").unbind("touchmove");n("#swipebox-slider").unbind("touchend");n("#swipebox-slider").unbind();n("#swipebox-overlay").remove();if(!n.isArray(i))i.removeData("_swipebox");if(this.target)this.target.trigger("swipebox-destroy");n.swipebox.isOpen=false;if(u.settings.afterClose)u.settings.afterClose()}};u.init()};n.fn.swipebox=function(e){if(!n.data(this,"_swipebox")){var t=new n.swipebox(this,e);this.data("_swipebox",t)}return this.data("_swipebox")}})(window,document,jQuery)
js/front.js CHANGED
@@ -28,7 +28,7 @@ jQuery(document).ready(function($) {
28
  deeplinking: (rlArgs.deeplinking === '1' ? true : false),
29
  overlay_gallery: (rlArgs.overlayGallery === '1' ? true : false),
30
  keyboard_shortcuts: (rlArgs.keyboardShortcuts === '1' ? true : false),
31
- social_tools: (rlArgs.social === '1' ? '<div class="pp_social"><div class="twitter"><a href="http://twitter.com/share" class="twitter-share-button" data-count="none">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="facebook"><iframe src="http://www.facebook.com/plugins/like.php?locale=en_US&href='+location.href+'&amp;layout=button_count&amp;show_faces=true&amp;width=500&amp;action=like&amp;font&amp;colorscheme=light&amp;height=23" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:23px;" allowTransparency="true"></iframe></div></div>' : ''),
32
  changepicturecallback: function(){},
33
  callback: function(){},
34
  ie6_fallback: true
28
  deeplinking: (rlArgs.deeplinking === '1' ? true : false),
29
  overlay_gallery: (rlArgs.overlayGallery === '1' ? true : false),
30
  keyboard_shortcuts: (rlArgs.keyboardShortcuts === '1' ? true : false),
31
+ social_tools: (rlArgs.social === '1' ? '<div class="pp_social"><div class="twitter"><a href="//twitter.com/share" class="twitter-share-button" data-count="none">Tweet</a><script type="text/javascript" src="//platform.twitter.com/widgets.js"></script></div><div class="facebook"><iframe src="//www.facebook.com/plugins/like.php?locale=en_US&href='+location.href+'&amp;layout=button_count&amp;show_faces=true&amp;width=500&amp;action=like&amp;font&amp;colorscheme=light&amp;height=23" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:23px;" allowTransparency="true"></iframe></div></div>' : ''),
32
  changepicturecallback: function(){},
33
  callback: function(){},
34
  ie6_fallback: true
languages/responsive-lightbox-hu_HU.mo ADDED
Binary file
languages/responsive-lightbox-hu_HU.po ADDED
@@ -0,0 +1,1113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Responsive Lightbox v1.4.8\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: \n"
6
+ "PO-Revision-Date: 2014-11-24 14:25+0100\n"
7
+ "Last-Translator: Bartosz Arendt <info@dfactory.eu>\n"
8
+ "Language-Team: \n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "Plural-Forms: nplurals=1; plural=0;\n"
13
+ "X-Generator: Poedit 1.6.10\n"
14
+ "X-Poedit-SourceCharset: utf-8\n"
15
+ "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
16
+ "_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
17
+ "X-Poedit-Basepath: ../\n"
18
+ "X-Textdomain-Support: yes\n"
19
+ "Language: hu_HU\n"
20
+ "X-Poedit-SearchPath-0: .\n"
21
+
22
+ # @ responsive-lightbox
23
+ #. translators: plugin header field 'Name'
24
+ #: responsive-lightbox.php:0 responsive-lightbox.php:1992
25
+ #: responsive-lightbox.php:1993 responsive-lightbox.php:2007
26
+ #: responsive-lightbox.php:2021
27
+ msgid "Responsive Lightbox"
28
+ msgstr ""
29
+
30
+ # @ responsive-lightbox
31
+ #. translators: plugin header field 'PluginURI'
32
+ #: responsive-lightbox.php:0
33
+ msgid "http://www.dfactory.eu/plugins/responsive-lightbox/"
34
+ msgstr ""
35
+
36
+ # @ responsive-lightbox
37
+ #. translators: plugin header field 'Description'
38
+ #: responsive-lightbox.php:0
39
+ msgid ""
40
+ "Responsive Lightbox allows users to view larger versions of images and "
41
+ "galleries in a lightbox (overlay) effect optimized for mobile devices."
42
+ msgstr ""
43
+ "A Responsive Lightbox segítségével a felhasználók a képek és galériák "
44
+ "nagyobb verzióit tekinthetik meg mobil eszközökre is optimalizált lightbox "
45
+ "effekttel."
46
+
47
+ # @ responsive-lightbox
48
+ #. translators: plugin header field 'Author'
49
+ #: responsive-lightbox.php:0
50
+ msgid "dFactory"
51
+ msgstr ""
52
+
53
+ # @ responsive-lightbox
54
+ #. translators: plugin header field 'AuthorURI'
55
+ #: responsive-lightbox.php:0
56
+ msgid "http://www.dfactory.eu/"
57
+ msgstr ""
58
+
59
+ # @ responsive-lightbox
60
+ #. translators: plugin header field 'Version'
61
+ #: responsive-lightbox.php:0
62
+ msgid "1.4.8"
63
+ msgstr ""
64
+
65
+ # @ responsive-lightbox
66
+ #: responsive-lightbox.php:294
67
+ msgid "prettyPhoto"
68
+ msgstr ""
69
+
70
+ # @ responsive-lightbox
71
+ #: responsive-lightbox.php:296
72
+ msgid "slow"
73
+ msgstr "lassú"
74
+
75
+ # @ responsive-lightbox
76
+ #: responsive-lightbox.php:297
77
+ msgid "normal"
78
+ msgstr "normál"
79
+
80
+ # @ responsive-lightbox
81
+ #: responsive-lightbox.php:298
82
+ msgid "fast"
83
+ msgstr "gyors"
84
+
85
+ # @ responsive-lightbox
86
+ #: responsive-lightbox.php:301
87
+ msgid "default"
88
+ msgstr "alapbeállítás"
89
+
90
+ # @ responsive-lightbox
91
+ #: responsive-lightbox.php:302
92
+ msgid "light rounded"
93
+ msgstr "világos kerekített"
94
+
95
+ # @ responsive-lightbox
96
+ #: responsive-lightbox.php:303
97
+ msgid "dark rounded"
98
+ msgstr "sötét kerekített"
99
+
100
+ # @ responsive-lightbox
101
+ #: responsive-lightbox.php:304
102
+ msgid "light square"
103
+ msgstr "világos négyzetes"
104
+
105
+ # @ responsive-lightbox
106
+ #: responsive-lightbox.php:305
107
+ msgid "dark square"
108
+ msgstr "sötét négyzetes"
109
+
110
+ # @ responsive-lightbox
111
+ #: responsive-lightbox.php:306
112
+ msgid "facebook"
113
+ msgstr ""
114
+
115
+ # @ responsive-lightbox
116
+ #: responsive-lightbox.php:309
117
+ msgid "window"
118
+ msgstr "ablak"
119
+
120
+ # @ responsive-lightbox
121
+ #: responsive-lightbox.php:310
122
+ msgid "transparent"
123
+ msgstr "átlátszó"
124
+
125
+ # @ responsive-lightbox
126
+ #: responsive-lightbox.php:311
127
+ msgid "opaque"
128
+ msgstr "áttetsző"
129
+
130
+ # @ responsive-lightbox
131
+ #: responsive-lightbox.php:312
132
+ msgid "direct"
133
+ msgstr "direkt"
134
+
135
+ # @ responsive-lightbox
136
+ #: responsive-lightbox.php:313
137
+ msgid "gpu"
138
+ msgstr ""
139
+
140
+ # @ responsive-lightbox
141
+ #: responsive-lightbox.php:317
142
+ msgid "SwipeBox"
143
+ msgstr ""
144
+
145
+ # @ responsive-lightbox
146
+ #: responsive-lightbox.php:319
147
+ msgid "CSS"
148
+ msgstr ""
149
+
150
+ # @ responsive-lightbox
151
+ #: responsive-lightbox.php:320
152
+ msgid "jQuery"
153
+ msgstr ""
154
+
155
+ # @ responsive-lightbox
156
+ #: responsive-lightbox.php:324
157
+ msgid "FancyBox"
158
+ msgstr ""
159
+
160
+ # @ responsive-lightbox
161
+ #: responsive-lightbox.php:326
162
+ msgid "elastic"
163
+ msgstr "rugalmas"
164
+
165
+ # @ responsive-lightbox
166
+ #: responsive-lightbox.php:327 responsive-lightbox.php:348
167
+ msgid "fade"
168
+ msgstr "áttűnés"
169
+
170
+ # @ responsive-lightbox
171
+ #: responsive-lightbox.php:328
172
+ msgid "none"
173
+ msgstr "nincs"
174
+
175
+ # @ responsive-lightbox
176
+ #: responsive-lightbox.php:331
177
+ msgid "auto"
178
+ msgstr "automata"
179
+
180
+ # @ responsive-lightbox
181
+ #: responsive-lightbox.php:332
182
+ msgid "yes"
183
+ msgstr "igen"
184
+
185
+ # @ responsive-lightbox
186
+ #: responsive-lightbox.php:333
187
+ msgid "no"
188
+ msgstr "nem"
189
+
190
+ # @ responsive-lightbox
191
+ #: responsive-lightbox.php:336
192
+ msgid "swing"
193
+ msgstr "lengés"
194
+
195
+ # @ responsive-lightbox
196
+ #: responsive-lightbox.php:337
197
+ msgid "linear"
198
+ msgstr "vonalas"
199
+
200
+ # @ responsive-lightbox
201
+ #: responsive-lightbox.php:340
202
+ msgid "outside"
203
+ msgstr "kívül"
204
+
205
+ # @ responsive-lightbox
206
+ #: responsive-lightbox.php:341
207
+ msgid "inside"
208
+ msgstr "belül"
209
+
210
+ # @ responsive-lightbox
211
+ #: responsive-lightbox.php:342
212
+ msgid "over"
213
+ msgstr "felett"
214
+
215
+ # @ responsive-lightbox
216
+ #: responsive-lightbox.php:346
217
+ msgid "Nivo Lightbox"
218
+ msgstr ""
219
+
220
+ # @ responsive-lightbox
221
+ #: responsive-lightbox.php:349
222
+ msgid "fade scale"
223
+ msgstr "áttűnés értéke"
224
+
225
+ # @ responsive-lightbox
226
+ #: responsive-lightbox.php:350
227
+ msgid "slide left"
228
+ msgstr "balra csúsztat"
229
+
230
+ # @ responsive-lightbox
231
+ #: responsive-lightbox.php:351
232
+ msgid "slide right"
233
+ msgstr "jobbra csúsztat"
234
+
235
+ # @ responsive-lightbox
236
+ #: responsive-lightbox.php:352
237
+ msgid "slide up"
238
+ msgstr "felfele csúsztat"
239
+
240
+ # @ responsive-lightbox
241
+ #: responsive-lightbox.php:353
242
+ msgid "slide down"
243
+ msgstr "lefele csúsztat"
244
+
245
+ # @ responsive-lightbox
246
+ #: responsive-lightbox.php:354
247
+ msgid "fall"
248
+ msgstr "esik"
249
+
250
+ # @ responsive-lightbox
251
+ #: responsive-lightbox.php:358
252
+ msgid "Image Lightbox"
253
+ msgstr ""
254
+
255
+ # @ responsive-lightbox
256
+ #: responsive-lightbox.php:363
257
+ msgid "Enable"
258
+ msgstr "Engedélyez"
259
+
260
+ # @ responsive-lightbox
261
+ #: responsive-lightbox.php:364
262
+ msgid "Disable"
263
+ msgstr "Tilt"
264
+
265
+ # @ responsive-lightbox
266
+ #: responsive-lightbox.php:368
267
+ msgid "Header"
268
+ msgstr "Fejléc"
269
+
270
+ # @ responsive-lightbox
271
+ #: responsive-lightbox.php:369
272
+ msgid "Footer"
273
+ msgstr "Lábléc"
274
+
275
+ # @ responsive-lightbox
276
+ #: responsive-lightbox.php:374 responsive-lightbox.php:475
277
+ msgid "General settings"
278
+ msgstr "Általános Beállítások"
279
+
280
+ # @ responsive-lightbox
281
+ #: responsive-lightbox.php:380 responsive-lightbox.php:489
282
+ msgid "Lightbox settings"
283
+ msgstr "Lightbox beállítások"
284
+
285
+ # @ responsive-lightbox
286
+ #: responsive-lightbox.php:476
287
+ msgid "Lightbox script"
288
+ msgstr "Lightbox szkript"
289
+
290
+ # @ responsive-lightbox
291
+ #: responsive-lightbox.php:477
292
+ msgid "Selector"
293
+ msgstr "Választó"
294
+
295
+ # @ responsive-lightbox
296
+ #: responsive-lightbox.php:478
297
+ msgid "Galleries"
298
+ msgstr "Galériák"
299
+
300
+ # @ responsive-lightbox
301
+ #: responsive-lightbox.php:479
302
+ msgid "Gallery image size"
303
+ msgstr "Galéria kép méret"
304
+
305
+ # @ responsive-lightbox
306
+ #: responsive-lightbox.php:480
307
+ msgid "Video links"
308
+ msgstr "Video linkek"
309
+
310
+ # @ responsive-lightbox
311
+ #: responsive-lightbox.php:481
312
+ msgid "Image links"
313
+ msgstr "Kép linkek"
314
+
315
+ # @ responsive-lightbox
316
+ #: responsive-lightbox.php:482
317
+ msgid "Single images as gallery"
318
+ msgstr "Egyedi képek galériaként"
319
+
320
+ # @ responsive-lightbox
321
+ #: responsive-lightbox.php:483
322
+ msgid "Custom events"
323
+ msgstr "Egyedi események"
324
+
325
+ # @ responsive-lightbox
326
+ #: responsive-lightbox.php:484
327
+ msgid "Loading place"
328
+ msgstr "Betöltési hely"
329
+
330
+ # @ responsive-lightbox
331
+ #: responsive-lightbox.php:485
332
+ msgid "Deactivation"
333
+ msgstr "Deaktiválás"
334
+
335
+ # @ responsive-lightbox
336
+ #: responsive-lightbox.php:493
337
+ msgid "Animation type"
338
+ msgstr "Animáció típus"
339
+
340
+ # @ responsive-lightbox
341
+ #: responsive-lightbox.php:494
342
+ msgid "Force PNG icons"
343
+ msgstr "PNG ikonok kényszerítése"
344
+
345
+ # @ responsive-lightbox
346
+ #: responsive-lightbox.php:495
347
+ msgid "Top and bottom bars"
348
+ msgstr "Felső és alsó sávok"
349
+
350
+ # @ responsive-lightbox
351
+ #: responsive-lightbox.php:496
352
+ msgid "Video max width"
353
+ msgstr "Max video szélesség"
354
+
355
+ # @ responsive-lightbox
356
+ #: responsive-lightbox.php:500 responsive-lightbox.php:557
357
+ msgid "Animation speed"
358
+ msgstr "Animáció sebesség"
359
+
360
+ # @ responsive-lightbox
361
+ #: responsive-lightbox.php:501
362
+ msgid "Slideshow"
363
+ msgstr "Diavetítés"
364
+
365
+ # @ responsive-lightbox
366
+ #: responsive-lightbox.php:502
367
+ msgid "Slideshow autoplay"
368
+ msgstr "Diavetítés automatikus lejátszás"
369
+
370
+ # @ responsive-lightbox
371
+ #: responsive-lightbox.php:503 responsive-lightbox.php:533
372
+ msgid "Opacity"
373
+ msgstr "Átlátszóság"
374
+
375
+ # @ responsive-lightbox
376
+ #: responsive-lightbox.php:504
377
+ msgid "Show title"
378
+ msgstr "Cím mutatása"
379
+
380
+ # @ responsive-lightbox
381
+ #: responsive-lightbox.php:505
382
+ msgid "Allow resize big images"
383
+ msgstr "Nagy kép átméretezés engedélyezése"
384
+
385
+ # @ responsive-lightbox
386
+ #: responsive-lightbox.php:506
387
+ msgid "Allow expand"
388
+ msgstr "Nyújtás engedélyezése"
389
+
390
+ # @ responsive-lightbox
391
+ #: responsive-lightbox.php:507 responsive-lightbox.php:545
392
+ msgid "Video width"
393
+ msgstr "Video szélesség"
394
+
395
+ # @ responsive-lightbox
396
+ #: responsive-lightbox.php:508 responsive-lightbox.php:546
397
+ msgid "Video height"
398
+ msgstr "Video magasság"
399
+
400
+ # @ responsive-lightbox
401
+ #: responsive-lightbox.php:509
402
+ msgid "Theme"
403
+ msgstr "Téma"
404
+
405
+ # @ responsive-lightbox
406
+ #: responsive-lightbox.php:510
407
+ msgid "Horizontal padding"
408
+ msgstr "Vízszintes padding"
409
+
410
+ # @ responsive-lightbox
411
+ #: responsive-lightbox.php:511
412
+ msgid "Hide Flash"
413
+ msgstr "Flash rejtése"
414
+
415
+ # @ responsive-lightbox
416
+ #: responsive-lightbox.php:512
417
+ msgid "Flash Window Mode (wmode)"
418
+ msgstr "Flash window mód (wmode)"
419
+
420
+ # @ responsive-lightbox
421
+ #: responsive-lightbox.php:513
422
+ msgid "Video autoplay"
423
+ msgstr "Video automata lejátszása"
424
+
425
+ # @ responsive-lightbox
426
+ #: responsive-lightbox.php:514 responsive-lightbox.php:522
427
+ msgid "Modal"
428
+ msgstr "Módbeli"
429
+
430
+ # @ responsive-lightbox
431
+ #: responsive-lightbox.php:515
432
+ msgid "Deeplinking"
433
+ msgstr "Mélylinkelés"
434
+
435
+ # @ responsive-lightbox
436
+ #: responsive-lightbox.php:516
437
+ msgid "Overlay gallery"
438
+ msgstr "Fedő (overlay) galéria"
439
+
440
+ # @ responsive-lightbox
441
+ #: responsive-lightbox.php:517
442
+ msgid "Keyboard shortcuts"
443
+ msgstr "Gyorsbillentyűk"
444
+
445
+ # @ responsive-lightbox
446
+ #: responsive-lightbox.php:518
447
+ msgid "Social (Twitter, Facebook)"
448
+ msgstr "Közösségi (Twitter, Facebook)"
449
+
450
+ # @ responsive-lightbox
451
+ #: responsive-lightbox.php:523
452
+ msgid "Show overlay"
453
+ msgstr "Fedő (overlay) mutatása"
454
+
455
+ # @ responsive-lightbox
456
+ #: responsive-lightbox.php:524
457
+ msgid "Show close button"
458
+ msgstr "Bezárás gomb megjelenítése"
459
+
460
+ # @ responsive-lightbox
461
+ #: responsive-lightbox.php:525
462
+ msgid "Enable escape button"
463
+ msgstr "Escape gomb engedélyezése"
464
+
465
+ # @ responsive-lightbox
466
+ #: responsive-lightbox.php:526
467
+ msgid "Hide on overlay click"
468
+ msgstr "Rejtés a fedőrétegre (overlay) kattintva"
469
+
470
+ # @ responsive-lightbox
471
+ #: responsive-lightbox.php:527
472
+ msgid "Hide on content click"
473
+ msgstr "Rejtés a tartalomra kattintva"
474
+
475
+ # @ responsive-lightbox
476
+ #: responsive-lightbox.php:528
477
+ msgid "Cyclic"
478
+ msgstr "Ciklikus"
479
+
480
+ # @ responsive-lightbox
481
+ #: responsive-lightbox.php:529
482
+ msgid "Show nav arrows"
483
+ msgstr "Navigációs nyilak megjelenítése"
484
+
485
+ # @ responsive-lightbox
486
+ #: responsive-lightbox.php:530
487
+ msgid "Auto scale"
488
+ msgstr "Automata méretezés"
489
+
490
+ # @ responsive-lightbox
491
+ #: responsive-lightbox.php:531
492
+ msgid "Scrolling (in/out)"
493
+ msgstr "Görgetés (be/ki)"
494
+
495
+ # @ responsive-lightbox
496
+ #: responsive-lightbox.php:532
497
+ msgid "Center on scroll"
498
+ msgstr "KÖzépre helyezés görgetéskor"
499
+
500
+ # @ responsive-lightbox
501
+ #: responsive-lightbox.php:534
502
+ msgid "Overlay opacity"
503
+ msgstr "Fedőréteg (overlay) átlátszósága"
504
+
505
+ # @ responsive-lightbox
506
+ #: responsive-lightbox.php:535
507
+ msgid "Overlay color"
508
+ msgstr "Fedőréteg színe"
509
+
510
+ # @ responsive-lightbox
511
+ #: responsive-lightbox.php:536
512
+ msgid "Title show"
513
+ msgstr "Cím megjelenítése"
514
+
515
+ # @ responsive-lightbox
516
+ #: responsive-lightbox.php:537
517
+ msgid "Title position"
518
+ msgstr "Cím pozíciója"
519
+
520
+ # @ responsive-lightbox
521
+ #: responsive-lightbox.php:538
522
+ msgid "Transition (in/out)"
523
+ msgstr "Átmenet (be/ki)"
524
+
525
+ # @ responsive-lightbox
526
+ #: responsive-lightbox.php:539
527
+ msgid "Easings (in/out)"
528
+ msgstr "Lazítás (be/ki)"
529
+
530
+ # @ responsive-lightbox
531
+ #: responsive-lightbox.php:540
532
+ msgid "Speed (in/out)"
533
+ msgstr "Sebesség (be/ki)"
534
+
535
+ # @ responsive-lightbox
536
+ #: responsive-lightbox.php:541
537
+ msgid "Change speed"
538
+ msgstr "Sebesség változtatása"
539
+
540
+ # @ responsive-lightbox
541
+ #: responsive-lightbox.php:542
542
+ msgid "Change fade"
543
+ msgstr "Átfedés változtatása"
544
+
545
+ # @ responsive-lightbox
546
+ #: responsive-lightbox.php:543
547
+ msgid "Padding"
548
+ msgstr "Padding"
549
+
550
+ # @ responsive-lightbox
551
+ #: responsive-lightbox.php:544
552
+ msgid "Margin"
553
+ msgstr "Margó"
554
+
555
+ # @ responsive-lightbox
556
+ #: responsive-lightbox.php:550
557
+ msgid "Effect"
558
+ msgstr "Hatás"
559
+
560
+ # @ responsive-lightbox
561
+ #: responsive-lightbox.php:551
562
+ msgid "Click overlay to close"
563
+ msgstr "Fedőrétegre kattintás bezárja"
564
+
565
+ # @ responsive-lightbox
566
+ #: responsive-lightbox.php:552
567
+ msgid "Keyboard navigation"
568
+ msgstr "Billentyűzet navigáció"
569
+
570
+ # @ responsive-lightbox
571
+ #: responsive-lightbox.php:553
572
+ msgid "Error message"
573
+ msgstr "Hibaüzenet"
574
+
575
+ # @ responsive-lightbox
576
+ #: responsive-lightbox.php:558
577
+ msgid "Preload next image"
578
+ msgstr "Következő kép előtöltése"
579
+
580
+ # @ responsive-lightbox
581
+ #: responsive-lightbox.php:559
582
+ msgid "Enable keyboard keys"
583
+ msgstr "Billentyű gombok engedélyezése"
584
+
585
+ # @ responsive-lightbox
586
+ #: responsive-lightbox.php:560
587
+ msgid "Quit after last image"
588
+ msgstr "Utolsó kép után kilép"
589
+
590
+ # @ responsive-lightbox
591
+ #: responsive-lightbox.php:561
592
+ msgid "Quit when image is clicked"
593
+ msgstr "Kilép a képre kattintáskor"
594
+
595
+ # @ responsive-lightbox
596
+ #: responsive-lightbox.php:562
597
+ msgid "Quit when anything but image is clicked"
598
+ msgstr "Kilép, ha bármi másra kattintanak, mint a kép"
599
+
600
+ # @ responsive-lightbox
601
+ #: responsive-lightbox.php:582
602
+ msgid "Select your preffered ligthbox effect script."
603
+ msgstr "Válaszd ki a kívánt lightbox szkriptet!"
604
+
605
+ # @ responsive-lightbox
606
+ #: responsive-lightbox.php:592
607
+ msgid "Select to which rel selector lightbox effect will be applied to."
608
+ msgstr "Válaszd ki, hogy mely rel-hez legyen a lightbox hozzárendelve "
609
+
610
+ # @ responsive-lightbox
611
+ #: responsive-lightbox.php:612
612
+ msgid "Enable triggering lightbox on custom jquery events."
613
+ msgstr "Lightbox indítás engedélyezése bizonyos jquery eseménykor"
614
+
615
+ # @ responsive-lightbox
616
+ #: responsive-lightbox.php:615
617
+ msgid "Enter a space separated list of events."
618
+ msgstr "Szóközzel elválasztott eseménylista megadása"
619
+
620
+ # @ responsive-lightbox
621
+ #: responsive-lightbox.php:636
622
+ msgid "Select where all the lightbox scripts should be placed."
623
+ msgstr "Válaszd ki hol legyenek a lightbox szkriptek elhelyezve!"
624
+
625
+ # @ responsive-lightbox
626
+ #: responsive-lightbox.php:654
627
+ msgid "Add lightbox to WordPress image galleries by default."
628
+ msgstr "Lightbox engedélyezése a WP képgalériákban alapbeállításként"
629
+
630
+ # @ responsive-lightbox
631
+ #: responsive-lightbox.php:674
632
+ msgid ""
633
+ "By default WP gallery links point to full size images only. Enable that to "
634
+ "modify the image size of native WP gallery image links."
635
+ msgstr ""
636
+ "Alapbeállításként a WP galéria linkek csak a teljes méretű képre mutatnak. "
637
+ "Engedélyezd, hogy az alap WP galéria képlinkek képméretét módosítsuk."
638
+
639
+ # @ responsive-lightbox
640
+ #: responsive-lightbox.php:684
641
+ msgid "full"
642
+ msgstr "teljes"
643
+
644
+ # @ responsive-lightbox
645
+ #: responsive-lightbox.php:693
646
+ msgid "Select image size for gallery image links."
647
+ msgstr "Képméret kiválasztása galéria kép linkeknél"
648
+
649
+ # @ responsive-lightbox
650
+ #: responsive-lightbox.php:712
651
+ msgid "Add lightbox to YouTube and Vimeo video links by default."
652
+ msgstr ""
653
+ "Lightbox hozzárendelése YoutTube és Vimeo videolinkekhez alapbeállításként"
654
+
655
+ # @ responsive-lightbox
656
+ #: responsive-lightbox.php:730
657
+ msgid "Add lightbox to WordPress image links by default."
658
+ msgstr "Lightbox hozzárendelése WP kép linkekhez alapbeállításként"
659
+
660
+ # @ responsive-lightbox
661
+ #: responsive-lightbox.php:748
662
+ msgid "Display single post images as a gallery."
663
+ msgstr "Egyedi bejegyzés-képek galériakénti megjelenítése"
664
+
665
+ # @ responsive-lightbox
666
+ #: responsive-lightbox.php:766
667
+ msgid "Delete settings on plugin deactivation."
668
+ msgstr "Beállítások törlése jelen bővítmény deaktiválásakor"
669
+
670
+ # @ responsive-lightbox
671
+ #: responsive-lightbox.php:784
672
+ msgid "Select a method of applying a lightbox effect."
673
+ msgstr "Válassz egy módszert a lightbox alkalmazására!"
674
+
675
+ # @ responsive-lightbox
676
+ #: responsive-lightbox.php:802
677
+ msgid ""
678
+ "Disable if you don't want to top and bottom bars to be hidden after a period "
679
+ "of time."
680
+ msgstr ""
681
+ "Tiltás, ha nem akarod, hogy a felső és alsó sávok rejtve legyenek adott idő "
682
+ "elteltével"
683
+
684
+ # @ responsive-lightbox
685
+ #: responsive-lightbox.php:805
686
+ msgid ""
687
+ "Enter the time after which the top and bottom bars will be hidden (when "
688
+ "hiding is enabled)."
689
+ msgstr ""
690
+ "Add meg az időt, ami után a felső és alsó sávok eltűnnek (ha a rejtés "
691
+ "engedélyezve van)!"
692
+
693
+ # @ responsive-lightbox
694
+ #: responsive-lightbox.php:816
695
+ msgid "Enter the max video width in a lightbox."
696
+ msgstr "Maximális video szélesség lightbox-nál"
697
+
698
+ # @ responsive-lightbox
699
+ #: responsive-lightbox.php:834
700
+ msgid ""
701
+ "Enable this if you're having problems with navigation icons not visible on "
702
+ "some devices."
703
+ msgstr ""
704
+ "Engedélyezd ezt, ha problémáid vannak a navigációs ikonok megjelenésével "
705
+ "bizonyos eszközökön"
706
+
707
+ # @ responsive-lightbox
708
+ #: responsive-lightbox.php:852
709
+ msgid "Select animation speed for lightbox effect."
710
+ msgstr "Válassz animációs sebességet lightbox-hoz"
711
+
712
+ # @ responsive-lightbox
713
+ #: responsive-lightbox.php:870
714
+ msgid "Display images as slideshow."
715
+ msgstr "Képek megjelenítése diavetítésként"
716
+
717
+ # @ responsive-lightbox
718
+ #: responsive-lightbox.php:873
719
+ msgid "Enter time (in miliseconds)."
720
+ msgstr "Idő (miliszekundum)"
721
+
722
+ # @ responsive-lightbox
723
+ #: responsive-lightbox.php:892
724
+ msgid "Automatically start slideshow."
725
+ msgstr "Diavetítés automata indítása"
726
+
727
+ # @ responsive-lightbox
728
+ #: responsive-lightbox.php:905
729
+ msgid "Value between 0 and 100, 100 for no opacity."
730
+ msgstr "Érték 0 és 100 között, ahol 100 a nem átlátszó"
731
+
732
+ # @ responsive-lightbox
733
+ #: responsive-lightbox.php:923
734
+ msgid "Display image tiltle."
735
+ msgstr "Kép cím megjelenítése"
736
+
737
+ # @ responsive-lightbox
738
+ #: responsive-lightbox.php:941
739
+ msgid "Resize the photos bigger than viewport."
740
+ msgstr "Fotók átméretezése nagyobbra, mint az ablak"
741
+
742
+ # @ responsive-lightbox
743
+ #: responsive-lightbox.php:959
744
+ msgid "Expands something."
745
+ msgstr "Kiterjeszt valamit"
746
+
747
+ # @ responsive-lightbox
748
+ #: responsive-lightbox.php:969 responsive-lightbox.php:979
749
+ msgid "in pixels"
750
+ msgstr "pixelben"
751
+
752
+ # @ responsive-lightbox
753
+ #: responsive-lightbox.php:997
754
+ msgid "Select theme for lightbox effect."
755
+ msgstr "Lightbox téma kiválasztása"
756
+
757
+ # @ responsive-lightbox
758
+ #: responsive-lightbox.php:1007
759
+ msgid "Horizontal padding (in pixels)."
760
+ msgstr "Vízszintes padding (pixelben)"
761
+
762
+ # @ responsive-lightbox
763
+ #: responsive-lightbox.php:1025
764
+ msgid ""
765
+ "Hides all the flash object on a page. Enable this if flash appears over "
766
+ "prettyPhoto."
767
+ msgstr ""
768
+ "Minden flash elrejtése az oldalon. Engedélyezd ezt, ha a flash a prettyPhoto "
769
+ "felett jelenik meg!"
770
+
771
+ # @ responsive-lightbox
772
+ #: responsive-lightbox.php:1043
773
+ msgid "Select flash window mode."
774
+ msgstr "Flash ablak üzemmód kiválasztása"
775
+
776
+ # @ responsive-lightbox
777
+ #: responsive-lightbox.php:1061
778
+ msgid "Automatically start videos."
779
+ msgstr "Videok automatikus indítása"
780
+
781
+ # @ responsive-lightbox
782
+ #: responsive-lightbox.php:1079
783
+ msgid "If set to true, only the close button will close the window."
784
+ msgstr "Ha ez be van kapcsolva csak a bezárás gomb zárja be az ablakot."
785
+
786
+ # @ responsive-lightbox
787
+ #: responsive-lightbox.php:1097
788
+ msgid "Allow prettyPhoto to update the url to enable deeplinking."
789
+ msgstr "PrettyPhoto frissítheti az URL-t a mélylinkeléshez"
790
+
791
+ # @ responsive-lightbox
792
+ #: responsive-lightbox.php:1115
793
+ msgid "If enabled, a gallery will overlay the fullscreen image on mouse over."
794
+ msgstr ""
795
+ "Ha ez be van kapcsolva az egér-föléhúzásra (OMO) egy galéria fog megjelenni "
796
+ "a teljes méretű kép felett "
797
+
798
+ # @ responsive-lightbox
799
+ #: responsive-lightbox.php:1133
800
+ msgid "Set to false if you open forms inside prettyPhoto."
801
+ msgstr "Kapcsold ki, ha űrlapokat nyitsz meg prettyPhoto-n belül!"
802
+
803
+ # @ responsive-lightbox
804
+ #: responsive-lightbox.php:1151
805
+ msgid "Display links to Facebook and Twitter."
806
+ msgstr "Facebook és Twitter linkek megjelenítése"
807
+
808
+ # @ responsive-lightbox
809
+ #: responsive-lightbox.php:1169
810
+ msgid "The transition type."
811
+ msgstr "Átmenet típusa"
812
+
813
+ # @ responsive-lightbox
814
+ #: responsive-lightbox.php:1179
815
+ msgid "Space between FancyBox wrapper and content."
816
+ msgstr "Köz a FancyBox keret (wrapper) és tartalom közt"
817
+
818
+ # @ responsive-lightbox
819
+ #: responsive-lightbox.php:1189
820
+ msgid "Space between viewport and FancyBox wrapper."
821
+ msgstr "Köz FancyBox keret (wrapper) és ablak közt"
822
+
823
+ # @ responsive-lightbox
824
+ #: responsive-lightbox.php:1207
825
+ msgid ""
826
+ "When true, \"overlayShow\" is set to TRUE and \"hideOnOverlayClick\", "
827
+ "\"hideOnContentClick\", \"enableEscapeButton\", \"showCloseButton\" are set "
828
+ "to FALSE."
829
+ msgstr ""
830
+ "Ha igaz, \"overlayShow\" értéke TRUE és \"hideOnOverlayClick\", "
831
+ "\"hideOnContentClick\", \"enableEscapeButton\", \"showCloseButton\" értéke "
832
+ "FALSE."
833
+
834
+ # @ responsive-lightbox
835
+ #: responsive-lightbox.php:1225
836
+ msgid "Toggle overlay."
837
+ msgstr "Váltás fedőréteg (overlay) közt"
838
+
839
+ # @ responsive-lightbox
840
+ #: responsive-lightbox.php:1243
841
+ msgid "Toggle close button."
842
+ msgstr "Bezárás gomb váltás"
843
+
844
+ # @ responsive-lightbox
845
+ #: responsive-lightbox.php:1261
846
+ msgid "Toggle if pressing Esc button closes FancyBox."
847
+ msgstr "Váltson, ha az ESC gomb megnyomása bezárja FancyBox-ot"
848
+
849
+ # @ responsive-lightbox
850
+ #: responsive-lightbox.php:1279
851
+ msgid "Toggle if clicking the overlay should close FancyBox."
852
+ msgstr "Váltás, hogy a fedőrétegre kattintás bezárja a FancyBox-ot"
853
+
854
+ # @ responsive-lightbox
855
+ #: responsive-lightbox.php:1297
856
+ msgid "Toggle if clicking the content should close FancyBox."
857
+ msgstr "Váltás, hogy a tartalomra kattintás bezárja a FancyBox-ot"
858
+
859
+ # @ responsive-lightbox
860
+ #: responsive-lightbox.php:1315
861
+ msgid ""
862
+ "When true, galleries will be cyclic, allowing you to keep pressing next/back."
863
+ msgstr ""
864
+ "Ha igaz, a galériák ciklikusak lesznek, lehetővé téve, hogy a következő/"
865
+ "előző gombokat lehessen nyomni."
866
+
867
+ # @ responsive-lightbox
868
+ #: responsive-lightbox.php:1333
869
+ msgid "Toggle navigation arrows."
870
+ msgstr "Navigációs nyilak váltása"
871
+
872
+ # @ responsive-lightbox
873
+ #: responsive-lightbox.php:1351
874
+ msgid "If true, FancyBox is scaled to fit in viewport."
875
+ msgstr "Ha igaz, FancyBox átméretezésre kerül, hogy beférjen az ablakba"
876
+
877
+ # @ responsive-lightbox
878
+ #: responsive-lightbox.php:1369
879
+ msgid "Set the overflow CSS property to create or hide scrollbars."
880
+ msgstr ""
881
+ "Add meg az overflow CSS értéket, hogy létrehozz, vagy rejtsd a görgetősávot"
882
+
883
+ # @ responsive-lightbox
884
+ #: responsive-lightbox.php:1387
885
+ msgid "When true, FancyBox is centered while scrolling page."
886
+ msgstr "Ha igaz, FancyBox középre lesz igazítva az oldal görgetésekor"
887
+
888
+ # @ responsive-lightbox
889
+ #: responsive-lightbox.php:1405
890
+ msgid "When true, transparency of content is changed for elastic transitions."
891
+ msgstr "Ha igaz, a tartalom átlátszóság változik nyújtott átmenetekkor"
892
+
893
+ # @ responsive-lightbox
894
+ #: responsive-lightbox.php:1418
895
+ msgid "Opacity of the overlay."
896
+ msgstr "Fedőréteg átlátszósága"
897
+
898
+ # @ responsive-lightbox
899
+ #: responsive-lightbox.php:1428
900
+ msgid "Color of the overlay."
901
+ msgstr "Fedőréteg színe"
902
+
903
+ # @ responsive-lightbox
904
+ #: responsive-lightbox.php:1446
905
+ msgid "Toggle title."
906
+ msgstr "Cím váltása"
907
+
908
+ # @ responsive-lightbox
909
+ #: responsive-lightbox.php:1464
910
+ msgid "The position of title."
911
+ msgstr "Cím helyzete"
912
+
913
+ # @ responsive-lightbox
914
+ #: responsive-lightbox.php:1482
915
+ msgid "Easing used for elastic animations."
916
+ msgstr "Nyúló animációk könnyítése"
917
+
918
+ # @ responsive-lightbox
919
+ #: responsive-lightbox.php:1492
920
+ msgid "Speed of the fade and elastic transitions, in milliseconds."
921
+ msgstr "Az áttűnő és nyúló átmenetek sebessége miliszekundumban"
922
+
923
+ # @ responsive-lightbox
924
+ #: responsive-lightbox.php:1502
925
+ msgid "Speed of resizing when changing gallery items, in milliseconds."
926
+ msgstr ""
927
+ "Az átméretezés sebssége galéria elemek közti váltáskor miliszekundumban"
928
+
929
+ # @ responsive-lightbox
930
+ #: responsive-lightbox.php:1512
931
+ msgid "Speed of the content fading while changing gallery items."
932
+ msgstr "Tartalom áttűnés sebessége galéria elemek közti váltáskor"
933
+
934
+ # @ responsive-lightbox
935
+ #: responsive-lightbox.php:1522
936
+ msgid "Width of the video."
937
+ msgstr "Video szélesség"
938
+
939
+ # @ responsive-lightbox
940
+ #: responsive-lightbox.php:1532
941
+ msgid "Height of the video."
942
+ msgstr "Video magasság"
943
+
944
+ # @ responsive-lightbox
945
+ #: responsive-lightbox.php:1550
946
+ msgid "The effect to use when showing the lightbox."
947
+ msgstr "Lightbox megjelenítési mód"
948
+
949
+ # @ responsive-lightbox
950
+ #: responsive-lightbox.php:1568
951
+ msgid "Enable/Disable keyboard navigation (left/right/escape)."
952
+ msgstr "Billentyűzet navigáció (bal/jobb/escape) engedélyezése/tiltása"
953
+
954
+ # @ responsive-lightbox
955
+ #: responsive-lightbox.php:1586
956
+ msgid "Eneble to close lightbox on overlay click."
957
+ msgstr "Lightbox bezárás engedélyezése fedőrétegre kattintáskor"
958
+
959
+ # @ responsive-lightbox
960
+ #: responsive-lightbox.php:1596
961
+ msgid "Error message if the content cannot be loaded."
962
+ msgstr "Hibaüzenet, ha a tartalmat nem lehet betölteni"
963
+
964
+ # @ responsive-lightbox
965
+ #: responsive-lightbox.php:1606
966
+ msgid "Animation speed."
967
+ msgstr "Animáció sebessége"
968
+
969
+ # @ responsive-lightbox
970
+ #: responsive-lightbox.php:1624
971
+ msgid "Silently preload the next image."
972
+ msgstr "Következő kép rejtett betöltése"
973
+
974
+ # @ responsive-lightbox
975
+ #: responsive-lightbox.php:1642
976
+ msgid "Enable keyboard shortcuts (arrows Left/Right and Esc)."
977
+ msgstr "Gyorsbillentyűk engedélyezése (cursor és Esc)"
978
+
979
+ # @ responsive-lightbox
980
+ #: responsive-lightbox.php:1660
981
+ msgid "Quit after viewing the last image."
982
+ msgstr "Utolsó kép után bezárás"
983
+
984
+ # @ responsive-lightbox
985
+ #: responsive-lightbox.php:1678
986
+ msgid "Quit when the viewed image is clicked."
987
+ msgstr "Bezárás a képre kattintáskor"
988
+
989
+ # @ responsive-lightbox
990
+ #: responsive-lightbox.php:1696
991
+ msgid "Quit when anything but the viewed image is clicked."
992
+ msgstr "Bezárás, ha bármi mást, mint a kép kattintanak"
993
+
994
+ # @ responsive-lightbox
995
+ #: responsive-lightbox.php:1938
996
+ msgid ""
997
+ "Changes were not saved because there was attempt to save settings of "
998
+ "inactive script. The site has been reloaded to the proper script settings."
999
+ msgstr ""
1000
+ "A változások nem kerültek mentése, mert egy inaktív szkript beállításait "
1001
+ "probáltuk menteni. Az oldal újratöltésre került a megfelelő szkript "
1002
+ "beállításokkal."
1003
+
1004
+ # @ responsive-lightbox
1005
+ #: responsive-lightbox.php:1948
1006
+ msgid "Settings restored to defaults."
1007
+ msgstr "Alapbeállítások visszaállítva"
1008
+
1009
+ # @ responsive-lightbox
1010
+ #: responsive-lightbox.php:1956
1011
+ msgid "Settings of SwipeBox script were restored to defaults."
1012
+ msgstr "SwipeBox szkript alapbeállításai visszaállítva"
1013
+
1014
+ # @ responsive-lightbox
1015
+ #: responsive-lightbox.php:1962
1016
+ msgid "Settings of prettyPhoto script were restored to defaults."
1017
+ msgstr "PrettyPhoto alapbeállításai visszaállítva"
1018
+
1019
+ # @ responsive-lightbox
1020
+ #: responsive-lightbox.php:1968
1021
+ msgid "Settings of FancyBox script were restored to defaults."
1022
+ msgstr "FancyBox alapbeállításai visszaállítva"
1023
+
1024
+ # @ responsive-lightbox
1025
+ #: responsive-lightbox.php:1974
1026
+ msgid "Settings of Nivo script were restored to defaults."
1027
+ msgstr "Nivo szkript alapbeállításai visszaállítva"
1028
+
1029
+ # @ responsive-lightbox
1030
+ #: responsive-lightbox.php:1978
1031
+ msgid ""
1032
+ "Changes were not set to defaults because there was attempt to reset settings "
1033
+ "of inactive script. The site has been reloaded to the proper script settings."
1034
+ msgstr ""
1035
+ "Alapbeállítások nem lettek visszaállítva, mert egy inaktív szkript "
1036
+ "beállításait probáltuk menteni. Az oldal újratöltésre került a megfelelő "
1037
+ "szkript beállításokkal."
1038
+
1039
+ # @ responsive-lightbox
1040
+ #: responsive-lightbox.php:2023
1041
+ msgid "Need support?"
1042
+ msgstr "Szoftvertámogatásra van szükséged?"
1043
+
1044
+ # @ responsive-lightbox
1045
+ #: responsive-lightbox.php:2024
1046
+ msgid ""
1047
+ "If you are having problems with this plugin, please talk about them in the"
1048
+ msgstr "Ha problémád van ezzel a bővítménnyel, kérjük egyeztess a"
1049
+
1050
+ # @ responsive-lightbox
1051
+ #: responsive-lightbox.php:2024
1052
+ msgid "Support forum"
1053
+ msgstr "Fórum"
1054
+
1055
+ # @ responsive-lightbox
1056
+ #: responsive-lightbox.php:2026
1057
+ msgid "Do you like this plugin?"
1058
+ msgstr "Kedveled ezt a bővítményt?"
1059
+
1060
+ # @ responsive-lightbox
1061
+ #: responsive-lightbox.php:2027
1062
+ msgid "Rate it 5"
1063
+ msgstr "Értékeld 5-ösre"
1064
+
1065
+ # @ responsive-lightbox
1066
+ #: responsive-lightbox.php:2027
1067
+ msgid "on WordPress.org"
1068
+ msgstr "a Wordpress.org-on"
1069
+
1070
+ # @ responsive-lightbox
1071
+ #: responsive-lightbox.php:2028
1072
+ msgid "Blog about it & link to the"
1073
+ msgstr "Írj róla blog bejegyzést és linkelj a "
1074
+
1075
+ # @ responsive-lightbox
1076
+ #: responsive-lightbox.php:2028
1077
+ msgid "plugin page"
1078
+ msgstr "bővítmény oldal"
1079
+
1080
+ # @ responsive-lightbox
1081
+ #: responsive-lightbox.php:2029
1082
+ msgid "Check out our other"
1083
+ msgstr "Ismerd meg a többi "
1084
+
1085
+ # @ responsive-lightbox
1086
+ #: responsive-lightbox.php:2029
1087
+ msgid "WordPress plugins"
1088
+ msgstr "Wordpress bővítményünket"
1089
+
1090
+ # @ responsive-lightbox
1091
+ #: responsive-lightbox.php:2055
1092
+ msgid "Reset to defaults"
1093
+ msgstr "Alapértékek visszaállítása"
1094
+
1095
+ # @ responsive-lightbox
1096
+ #: responsive-lightbox.php:2082
1097
+ msgid "Are you sure you want to reset these settings to defaults?"
1098
+ msgstr "Biztosan visszaállítod az alapértékeket?"
1099
+
1100
+ # @ responsive-lightbox
1101
+ #: responsive-lightbox.php:2083
1102
+ msgid "Are you sure you want to reset scripts settings to defaults?"
1103
+ msgstr "Biztosan visszaállítod a szkriptek alapbeállításait?"
1104
+
1105
+ # @ responsive-lightbox
1106
+ #: responsive-lightbox.php:2373
1107
+ msgid "Support"
1108
+ msgstr "Szoftvertámogatás"
1109
+
1110
+ # @ responsive-lightbox
1111
+ #: responsive-lightbox.php:2395
1112
+ msgid "Settings"
1113
+ msgstr "Beállítások"
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: dfactory
3
  Donate link: http://www.dfactory.eu/
4
  Tags: gallery, images, lightbox, links, photos, template, theme, photo, image, picture, slideshow, modal, overlay, YouTube, Vimeo, video, videos
5
  Requires at least: 3.3
6
- Tested up to: 4.0
7
- Stable tag: 1.4.8
8
  License: MIT License
9
  License URI: http://opensource.org/licenses/MIT
10
 
@@ -64,6 +64,10 @@ No questions yet.
64
 
65
  == Changelog ==
66
 
 
 
 
 
67
  = 1.4.8 =
68
  * Tweak: Nivo Lightbox updated to 1.2
69
  * Tweak: Confirmed WP 4.0 compatibility
@@ -172,6 +176,6 @@ Initial release
172
 
173
  == Upgrade Notice ==
174
 
175
- = 1.4.8 =
176
- * Tweak: Nivo Lightbox updated to 1.2
177
- * Tweak: Confirmed WP 4.0 compatibility
3
  Donate link: http://www.dfactory.eu/
4
  Tags: gallery, images, lightbox, links, photos, template, theme, photo, image, picture, slideshow, modal, overlay, YouTube, Vimeo, video, videos
5
  Requires at least: 3.3
6
+ Tested up to: 4.0.1
7
+ Stable tag: 1.4.9
8
  License: MIT License
9
  License URI: http://opensource.org/licenses/MIT
10
 
64
 
65
  == Changelog ==
66
 
67
+ = 1.4.9 =
68
+ * New: Hungarian translation, thanks to [Zsolt Boda](http://cmfrt.net/)
69
+ * Tweak: Remove direct http calls from Javascript to improve https protocol compatibility
70
+
71
  = 1.4.8 =
72
  * Tweak: Nivo Lightbox updated to 1.2
73
  * Tweak: Confirmed WP 4.0 compatibility
176
 
177
  == Upgrade Notice ==
178
 
179
+ = 1.4.9 =
180
+ * New: Hungarian translation, thanks to [Zsolt Boda](http://cmfrt.net/)
181
+ * Tweak: Remove direct http calls from Javascript to improve https protocole compatibility
responsive-lightbox.php CHANGED
@@ -1,8 +1,9 @@
1
  <?php
 
2
  /*
3
  Plugin Name: Responsive Lightbox
4
  Description: Responsive Lightbox allows users to view larger versions of images and galleries in a lightbox (overlay) effect optimized for mobile devices.
5
- Version: 1.4.8
6
  Author: dFactory
7
  Author URI: http://www.dfactory.eu/
8
  Plugin URI: http://www.dfactory.eu/plugins/responsive-lightbox/
@@ -24,2009 +25,1886 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
24
 
25
  class Responsive_Lightbox
26
  {
27
- private $defaults = array(
28
- 'settings' => array(
29
- 'script' => 'swipebox',
30
- 'selector' => 'lightbox',
31
- 'galleries' => true,
32
- 'enable_gallery_image_size' => false,
33
- 'gallery_image_size' => 'full',
34
- 'videos' => true,
35
- 'image_links' => true,
36
- 'images_as_gallery' => false,
37
- 'deactivation_delete' => false,
38
- 'loading_place' => 'header',
39
- 'enable_custom_events' => false,
40
- 'custom_events' => 'ajaxComplete'
41
- ),
42
- 'configuration' => array(
43
- 'prettyphoto' => array(
44
- 'animation_speed' => 'normal',
45
- 'slideshow' => false,
46
- 'slideshow_delay' => 5000,
47
- 'slideshow_autoplay' => false,
48
- 'opacity' => 75,
49
- 'show_title' => true,
50
- 'allow_resize' => true,
51
- 'allow_expand' => true,
52
- 'width' => 1080,
53
- 'height' => 720,
54
- 'separator' => '/',
55
- 'theme' => 'pp_default',
56
- 'horizontal_padding' => 20,
57
- 'hide_flash' => false,
58
- 'wmode' => 'opaque',
59
- 'video_autoplay' => false,
60
- 'modal' => false,
61
- 'deeplinking' => false,
62
- 'overlay_gallery' => true,
63
- 'keyboard_shortcuts' => true,
64
- 'social' => false
65
- ),
66
- 'swipebox' => array(
67
- 'animation' => 'css',
68
- 'force_png_icons' => false,
69
- 'hide_bars' => true,
70
- 'hide_bars_delay' => 5000,
71
- 'video_max_width' => 1080
72
- ),
73
- 'fancybox' => array(
74
- 'modal' => false,
75
- 'show_overlay' => true,
76
- 'show_close_button' => true,
77
- 'enable_escape_button' => true,
78
- 'hide_on_overlay_click' => true,
79
- 'hide_on_content_click' => false,
80
- 'cyclic' => false,
81
- 'show_nav_arrows' => true,
82
- 'auto_scale' => true,
83
- 'scrolling' => 'yes',
84
- 'center_on_scroll' => true,
85
- 'opacity' => true,
86
- 'overlay_opacity' => 70,
87
- 'overlay_color' => '#666',
88
- 'title_show' => true,
89
- 'title_position' => 'outside',
90
- 'transitions' => 'fade',
91
- 'easings' => 'swing',
92
- 'speeds' => 300,
93
- 'change_speed' => 300,
94
- 'change_fade' => 100,
95
- 'padding' => 5,
96
- 'margin' => 5,
97
- 'video_width' => 1080,
98
- 'video_height' => 720
99
- ),
100
- 'nivo' => array(
101
- 'effect' => 'fade',
102
- 'click_overlay_to_close' => true,
103
- 'keyboard_nav' => true,
104
- 'error_message' => 'The requested content cannot be loaded. Please try again later.'
105
- ),
106
- 'imagelightbox' => array(
107
- 'animation_speed' => 250,
108
- 'preload_next' => true,
109
- 'enable_keyboard' => true,
110
- 'quit_on_end' => false,
111
- 'quit_on_image_click' => false,
112
- 'quit_on_document_click' => true
113
- )
114
- ),
115
- 'version' => '1.4.8'
116
- );
117
- private $scripts = array();
118
- private $options = array();
119
- private $tabs = array();
120
- private $choices = array();
121
- private $loading_places = array();
122
- private $gallery_no = 0;
123
-
124
-
125
- public function __construct()
126
- {
127
- register_activation_hook(__FILE__, array(&$this, 'multisite_activation'));
128
- register_deactivation_hook(__FILE__, array(&$this, 'multisite_deactivation'));
129
-
130
- //changes from older versions
131
- $db_version = get_option('responsive_lightbox_version');
132
-
133
- if(version_compare(($db_version === FALSE ? '1.0.0' : $db_version), '1.0.5', '<'))
134
- {
135
- if(($array = get_option('rl_settings')) !== FALSE)
136
- {
137
- update_option('responsive_lightbox_settings', $array);
138
- delete_option('rl_settings');
139
- }
140
-
141
- if(($array = get_option('rl_configuration')) !== FALSE)
142
- {
143
- update_option('responsive_lightbox_configuration', $array);
144
- delete_option('rl_configuration');
145
- }
146
- }
147
-
148
- //update plugin version
149
- update_option('responsive_lightbox_version', $this->defaults['version'], '', 'no');
150
-
151
- $this->options['settings'] = array_merge($this->defaults['settings'], (($array = get_option('responsive_lightbox_settings')) === FALSE ? array() : $array));
152
-
153
- //for multi arrays we have to merge them separately
154
- $db_conf_opts = (($base = get_option('responsive_lightbox_configuration')) === FALSE ? array() : $base);
155
-
156
- foreach($this->defaults['configuration'] as $script => $settings)
157
- {
158
- $this->options['configuration'][$script] = array_merge($settings, (isset($db_conf_opts[$script]) ? $db_conf_opts[$script] : array()));
159
- }
160
-
161
- //actions
162
- add_action('plugins_loaded', array(&$this, 'load_textdomain'));
163
- add_action('plugins_loaded', array(&$this, 'load_defaults'));
164
- add_action('admin_init', array(&$this, 'register_settings'));
165
- add_action('admin_menu', array(&$this, 'admin_menu_options'));
166
- add_action('wp_enqueue_scripts', array(&$this, 'front_scripts_styles'));
167
- add_action('admin_enqueue_scripts', array(&$this, 'admin_scripts_styles'));
168
-
169
- //filters
170
- add_filter('plugin_action_links', array(&$this, 'plugin_settings_link'), 10, 2);
171
- add_filter('plugin_row_meta', array(&$this, 'plugin_extend_links'), 10, 2);
172
- add_filter('post_gallery', array(&$this, 'gallery_attributes'), 1000);
173
-
174
- if($this->options['settings']['galleries'] === true)
175
- add_filter('wp_get_attachment_link', array(&$this, 'add_gallery_lightbox_selector'), 1000, 6);
176
-
177
- if ($this->options['settings']['enable_gallery_image_size'] === true)
178
- add_filter('wp_get_attachment_link', array(&$this, 'gallery_attachment_link_filter'), 1001, 6);
179
-
180
- if($this->options['settings']['videos'] === true)
181
- add_filter('the_content', array(&$this, 'add_videos_lightbox_selector'));
182
-
183
- if($this->options['settings']['image_links'] === true || $this->options['settings']['images_as_gallery'] === true)
184
- add_filter('the_content', array(&$this, 'add_links_lightbox_selector'));
185
- }
186
-
187
-
188
- public function add_videos_lightbox_selector($content)
189
- {
190
- preg_match_all('/<a(.*?)href=(?:\'|")((?:(?:http|https):\/\/)?(?:www\.)?((youtube\.com\/watch\?v=[a-z0-9_\-]+)|(vimeo\.com\/[0-9]{8,})))(?:\'|")(.*?)>/i', $content, $links);
191
-
192
- if(isset($links[0]))
193
- {
194
- foreach($links[0] as $id => $link)
195
- {
196
- if(preg_match('/<a.*?rel=(?:\'|")(.*?)(?:\'|").*?>/', $link, $result) === 1)
197
- {
198
- if(isset($result[1]))
199
- {
200
- $new_rels = array();
201
- $rels = explode(' ', $result[1]);
202
-
203
- if(in_array($this->options['settings']['selector'], $rels, TRUE))
204
- {
205
- foreach($rels as $no => $rel)
206
- {
207
- if($rel !== $this->options['settings']['selector'])
208
- $new_rels[] = $rel;
209
- }
210
-
211
- $content = str_replace($link, preg_replace('/rel=(?:\'|")(.*?)(?:\'|")/', 'rel="'.(!empty($new_rel) ? simplode(' ', $new_rels).' ' : '').$this->options['settings']['selector'].'-video-'.$id.'"', $link), $content);
212
- }
213
- else
214
- $content = str_replace($link, preg_replace('/rel=(?:\'|")(.*?)(?:\'|")/', 'rel="'.($result[1] !== '' ? $result[1].' ' : '').$this->options['settings']['selector'].'-video-'.$id.'"', $link), $content);
215
- }
216
- }
217
- else
218
- $content = str_replace($link, '<a'.$links[1][$id].'href="'.$links[2][$id].'"'.$links[6][$id].' rel="'.$this->options['settings']['selector'].'-video-'.$id.'">', $content);
219
- }
220
- }
221
-
222
- return $content;
223
- }
224
-
225
-
226
- public function add_links_lightbox_selector($content)
227
- {
228
- preg_match_all('/<a(.*?)href=(?:\'|")([^<]*?).(bmp|gif|jpeg|jpg|png)(?:\'|")(.*?)>/i', $content, $links);
229
-
230
- if(isset($links[0]))
231
- {
232
- if($this->options['settings']['images_as_gallery'] === TRUE)
233
- $rel_hash = '[gallery-'.wp_generate_password(4, FALSE, FALSE).']';
234
-
235
- foreach($links[0] as $id => $link)
236
- {
237
- if(preg_match('/<a.*?rel=(?:\'|")(.*?)(?:\'|").*?>/', $link, $result) === 1)
238
- {
239
- if($this->options['settings']['images_as_gallery'] === TRUE)
240
- {
241
- $content = str_replace($link, preg_replace('/rel=(?:\'|")(.*?)(?:\'|")/', 'rel="'.$this->options['settings']['selector'].$rel_hash.'"'.($this->options['settings']['script'] === 'imagelightbox' ? ' data-imagelightbox="'.$id.'"' : ''), $link), $content);
242
- }
243
- else
244
- {
245
- if(isset($result[1]))
246
- {
247
- $new_rels = array();
248
- $rels = explode(' ', $result[1]);
249
-
250
- if(in_array($this->options['settings']['selector'], $rels, TRUE))
251
- {
252
- foreach($rels as $no => $rel)
253
- {
254
- if($rel !== $this->options['settings']['selector'])
255
- $new_rels[] = $rel;
256
- }
257
-
258
- $content = str_replace($link, preg_replace('/rel=(?:\'|")(.*?)(?:\'|")/', 'rel="'.(!empty($new_rels) ? implode(' ', $new_rels).' ' : '').$this->options['settings']['selector'].'-'.$id.'"'.($this->options['settings']['script'] === 'imagelightbox' ? ' data-imagelightbox="'.$id.'"' : ''), $link), $content);
259
- }
260
- else
261
- $content = str_replace($link, preg_replace('/rel=(?:\'|")(.*?)(?:\'|")/', 'rel="'.($result[1] !== '' ? $result[1].' ' : '').$this->options['settings']['selector'].'-'.$id.'"'.($this->options['settings']['script'] === 'imagelightbox' ? ' data-imagelightbox="'.$id.'"' : ''), $link), $content);
262
- }
263
- }
264
- }
265
- else
266
- $content = str_replace($link, '<a'.$links[1][$id].'href="'.$links[2][$id].'.'.$links[3][$id].'"'.$links[4][$id].' rel="'.$this->options['settings']['selector'].($this->options['settings']['images_as_gallery'] === TRUE ? $rel_hash : '-'.$id).'"'.($this->options['settings']['script'] === 'imagelightbox' ? ' data-imagelightbox="'.$id.'"' : '').'>', $content);
267
- }
268
- }
269
-
270
- return $content;
271
- }
272
-
273
-
274
- public function gallery_attributes($style)
275
- {
276
- ++$this->gallery_no;
277
-
278
- return $style;
279
- }
280
-
281
-
282
- public function add_gallery_lightbox_selector($link, $id, $size, $permalink, $icon, $text)
283
- {
284
- $link = (preg_match('/<a.*? rel=("|\').*?("|\')>/', $link) === 1 ? preg_replace('/(<a.*? rel=(?:"|\').*?)((?:"|\').*?>)/', '$1 '.$this->options['settings']['selector'].'[gallery-'.$this->gallery_no.']'.'$2', $link) : preg_replace('/(<a.*?)>/', '$1 rel="'.$this->options['settings']['selector'].'[gallery-'.$this->gallery_no.']'.'">', $link));
285
-
286
- return (preg_match('/<a.*? href=("|\').*?("|\')>/', $link) === 1 ? preg_replace('/(<a.*? href=(?:"|\')).*?((?:"|\').*?>)/', '$1'.wp_get_attachment_url($id).'$2', $link) : preg_replace('/(<a.*?)>/', '$1 href="'.wp_get_attachment_url($id).'">', $link));
287
- }
288
-
289
-
290
- public function load_defaults()
291
- {
292
- $this->scripts = array(
293
- 'prettyphoto' => array(
294
- 'name' => __('prettyPhoto', 'responsive-lightbox'),
295
- 'animation_speeds' => array(
296
- 'slow' => __('slow', 'responsive-lightbox'),
297
- 'normal' => __('normal', 'responsive-lightbox'),
298
- 'fast' => __('fast', 'responsive-lightbox')
299
- ),
300
- 'themes' => array(
301
- 'pp_default' => __('default', 'responsive-lightbox'),
302
- 'light_rounded' => __('light rounded', 'responsive-lightbox'),
303
- 'dark_rounded' => __('dark rounded', 'responsive-lightbox'),
304
- 'light_square' => __('light square', 'responsive-lightbox'),
305
- 'dark_square' => __('dark square', 'responsive-lightbox'),
306
- 'facebook' => __('facebook', 'responsive-lightbox')
307
- ),
308
- 'wmodes' => array(
309
- 'window' => __('window', 'responsive-lightbox'),
310
- 'transparent' => __('transparent', 'responsive-lightbox'),
311
- 'opaque' => __('opaque', 'responsive-lightbox'),
312
- 'direct' => __('direct', 'responsive-lightbox'),
313
- 'gpu' => __('gpu', 'responsive-lightbox')
314
- )
315
- ),
316
- 'swipebox' => array(
317
- 'name' => __('SwipeBox', 'responsive-lightbox'),
318
- 'animations' => array(
319
- 'css' => __('CSS', 'responsive-lightbox'),
320
- 'jquery' => __('jQuery', 'responsive-lightbox')
321
- )
322
- ),
323
- 'fancybox' => array(
324
- 'name' => __('FancyBox', 'responsive-lightbox'),
325
- 'transitions' => array(
326
- 'elastic' => __('elastic', 'responsive-lightbox'),
327
- 'fade' => __('fade', 'responsive-lightbox'),
328
- 'none' => __('none', 'responsive-lightbox')
329
- ),
330
- 'scrollings' => array(
331
- 'auto' => __('auto', 'responsive-lightbox'),
332
- 'yes' => __('yes', 'responsive-lightbox'),
333
- 'no' => __('no', 'responsive-lightbox')
334
- ),
335
- 'easings' => array(
336
- 'swing' => __('swing', 'responsive-lightbox'),
337
- 'linear' => __('linear', 'responsive-lightbox')
338
- ),
339
- 'positions' => array(
340
- 'outside' => __('outside', 'responsive-lightbox'),
341
- 'inside' => __('inside', 'responsive-lightbox'),
342
- 'over' => __('over', 'responsive-lightbox')
343
- )
344
- ),
345
- 'nivo' => array(
346
- 'name' => __('Nivo Lightbox', 'responsive-lightbox'),
347
- 'effects' => array(
348
- 'fade' => __('fade', 'responsive-lightbox'),
349
- 'fadeScale' => __('fade scale', 'responsive-lightbox'),
350
- 'slideLeft' => __('slide left', 'responsive-lightbox'),
351
- 'slideRight' => __('slide right', 'responsive-lightbox'),
352
- 'slideUp' => __('slide up', 'responsive-lightbox'),
353
- 'slideDown' => __('slide down', 'responsive-lightbox'),
354
- 'fall' => __('fall', 'responsive-lightbox')
355
- )
356
- ),
357
- 'imagelightbox' => array(
358
- 'name' => __('Image Lightbox', 'responsive-lightbox')
359
- )
360
- );
361
-
362
- $this->choices = array(
363
- 'yes' => __('Enable', 'responsive-lightbox'),
364
- 'no' => __('Disable', 'responsive-lightbox')
365
- );
366
-
367
- $this->loading_places = array(
368
- 'header' => __('Header', 'responsive-lightbox'),
369
- 'footer' => __('Footer', 'responsive-lightbox')
370
- );
371
-
372
- $this->tabs = array(
373
- 'general-settings' => array(
374
- 'name' => __('General settings', 'responsive-lightbox'),
375
- 'key' => 'responsive_lightbox_settings',
376
- 'submit' => 'save_rl_settings',
377
- 'reset' => 'reset_rl_settings',
378
- ),
379
- 'configuration' => array(
380
- 'name' => __('Lightbox settings', 'responsive-lightbox'),
381
- 'key' => 'responsive_lightbox_configuration',
382
- 'submit' => 'save_rl_configuration',
383
- 'reset' => 'reset_rl_configuration'
384
- )
385
- );
386
- }
387
-
388
-
389
- public function multisite_activation($networkwide)
390
- {
391
- if(is_multisite() && $networkwide)
392
- {
393
- global $wpdb;
394
-
395
- $activated_blogs = array();
396
- $current_blog_id = $wpdb->blogid;
397
- $blogs_ids = $wpdb->get_col($wpdb->prepare('SELECT blog_id FROM '.$wpdb->blogs, ''));
398
-
399
- foreach($blogs_ids as $blog_id)
400
- {
401
- switch_to_blog($blog_id);
402
- $this->activate_single();
403
- $activated_blogs[] = (int)$blog_id;
404
- }
405
-
406
- switch_to_blog($current_blog_id);
407
- update_site_option('responsive_lightbox_activated_blogs', $activated_blogs, array());
408
- }
409
- else
410
- $this->activate_single();
411
- }
412
-
413
-
414
- public function activate_single()
415
- {
416
- add_option('responsive_lightbox_settings', $this->defaults['settings'], '', 'no');
417
- add_option('responsive_lightbox_configuration', $this->defaults['configuration'], '', 'no');
418
- add_option('responsive_lightbox_version', $this->defaults['version'], '', 'no');
419
- }
420
-
421
-
422
- public function multisite_deactivation($networkwide)
423
- {
424
- if(is_multisite() && $networkwide)
425
- {
426
- global $wpdb;
427
-
428
- $current_blog_id = $wpdb->blogid;
429
- $blogs_ids = $wpdb->get_col($wpdb->prepare('SELECT blog_id FROM '.$wpdb->blogs, ''));
430
-
431
- if(($activated_blogs = get_site_option('responsive_lightbox_activated_blogs', FALSE, FALSE)) === FALSE)
432
- $activated_blogs = array();
433
-
434
- foreach($blogs_ids as $blog_id)
435
- {
436
- switch_to_blog($blog_id);
437
- $this->deactivate_single(TRUE);
438
-
439
- if(in_array((int)$blog_id, $activated_blogs, TRUE))
440
- unset($activated_blogs[array_search($blog_id, $activated_blogs)]);
441
- }
442
-
443
- switch_to_blog($current_blog_id);
444
- update_site_option('responsive_lightbox_activated_blogs', $activated_blogs);
445
- }
446
- else
447
- $this->deactivate_single();
448
- }
449
-
450
-
451
- public function deactivate_single($multi = FALSE)
452
- {
453
- if($multi === TRUE)
454
- {
455
- $options = get_option('responsive_lightbox_settings');
456
- $check = $options['deactivation_delete'];
457
- }
458
- else
459
- $check = $this->options['settings']['deactivation_delete'];
460
-
461
- if($check === TRUE)
462
- {
463
- delete_option('responsive_lightbox_settings');
464
- delete_option('responsive_lightbox_configuration');
465
- delete_option('responsive_lightbox_version');
466
- }
467
- }
468
-
469
-
470
- public function register_settings()
471
- {
472
- register_setting('responsive_lightbox_settings', 'responsive_lightbox_settings', array(&$this, 'validate_options'));
473
-
474
- //general settings
475
- add_settings_section('responsive_lightbox_settings', __('General settings', 'responsive-lightbox'), '', 'responsive_lightbox_settings');
476
- add_settings_field('rl_script', __('Lightbox script', 'responsive-lightbox'), array(&$this, 'rl_script'), 'responsive_lightbox_settings', 'responsive_lightbox_settings');
477
- add_settings_field('rl_selector', __('Selector', 'responsive-lightbox'), array(&$this, 'rl_selector'), 'responsive_lightbox_settings', 'responsive_lightbox_settings');
478
- add_settings_field('rl_galleries', __('Galleries', 'responsive-lightbox'), array(&$this, 'rl_galleries'), 'responsive_lightbox_settings', 'responsive_lightbox_settings');
479
- add_settings_field('rl_enable_gallery_image_size', __('Gallery image size', 'responsive-lightbox'), array(&$this, 'rl_enable_gallery_image_size'), 'responsive_lightbox_settings', 'responsive_lightbox_settings');
480
- add_settings_field('rl_videos', __('Video links', 'responsive-lightbox'), array(&$this, 'rl_videos'), 'responsive_lightbox_settings', 'responsive_lightbox_settings');
481
- add_settings_field('rl_image_links', __('Image links', 'responsive-lightbox'), array(&$this, 'rl_image_links'), 'responsive_lightbox_settings', 'responsive_lightbox_settings');
482
- add_settings_field('rl_images_as_gallery', __('Single images as gallery', 'responsive-lightbox'), array(&$this, 'rl_images_as_gallery'), 'responsive_lightbox_settings', 'responsive_lightbox_settings');
483
- add_settings_field('rl_enable_custom_events', __('Custom events', 'responsive-lightbox'), array(&$this, 'rl_enable_custom_events'), 'responsive_lightbox_settings', 'responsive_lightbox_settings');
484
- add_settings_field('rl_loading_place', __('Loading place', 'responsive-lightbox'), array(&$this, 'rl_loading_place'), 'responsive_lightbox_settings', 'responsive_lightbox_settings');
485
- add_settings_field('rl_deactivation_delete', __('Deactivation', 'responsive-lightbox'), array(&$this, 'rl_deactivation_delete'), 'responsive_lightbox_settings', 'responsive_lightbox_settings');
486
-
487
- //configuration
488
- register_setting('responsive_lightbox_configuration', 'responsive_lightbox_configuration', array(&$this, 'validate_options'));
489
- add_settings_section('responsive_lightbox_configuration', __('Lightbox settings', 'responsive-lightbox').': '.$this->scripts[$this->options['settings']['script']]['name'], '', 'responsive_lightbox_configuration');
490
-
491
- if($this->options['settings']['script'] === 'swipebox')
492
- {
493
- add_settings_field('rl_sb_animation', __('Animation type', 'responsive-lightbox'), array(&$this, 'rl_sb_animation'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
494
- add_settings_field('rl_sb_force_png_icons', __('Force PNG icons', 'responsive-lightbox'), array(&$this, 'rl_sb_force_png_icons'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
495
- add_settings_field('rl_sb_hide_bars', __('Top and bottom bars', 'responsive-lightbox'), array(&$this, 'rl_sb_hide_bars'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
496
- add_settings_field('rl_sb_video_max_width', __('Video max width', 'responsive-lightbox'), array(&$this, 'rl_sb_video_max_width'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
497
- }
498
- elseif($this->options['settings']['script'] === 'prettyphoto')
499
- {
500
- add_settings_field('rl_pp_animation_speed', __('Animation speed', 'responsive-lightbox'), array(&$this, 'rl_pp_animation_speed'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
501
- add_settings_field('rl_pp_slideshow', __('Slideshow', 'responsive-lightbox'), array(&$this, 'rl_pp_slideshow'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
502
- add_settings_field('rl_pp_slideshow_autoplay', __('Slideshow autoplay', 'responsive-lightbox'), array(&$this, 'rl_pp_slideshow_autoplay'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
503
- add_settings_field('rl_pp_opacity', __('Opacity', 'responsive-lightbox'), array(&$this, 'rl_pp_opacity'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
504
- add_settings_field('rl_pp_title', __('Show title', 'responsive-lightbox'), array(&$this, 'rl_pp_title'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
505
- add_settings_field('rl_pp_allow_resize', __('Allow resize big images', 'responsive-lightbox'), array(&$this, 'rl_pp_allow_resize'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
506
- add_settings_field('rl_pp_allow_expand', __('Allow expand', 'responsive-lightbox'), array(&$this, 'rl_pp_allow_expand'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
507
- add_settings_field('rl_pp_width', __('Video width', 'responsive-lightbox'), array(&$this, 'rl_pp_width'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
508
- add_settings_field('rl_pp_height', __('Video height', 'responsive-lightbox'), array(&$this, 'rl_pp_height'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
509
- add_settings_field('rl_pp_theme', __('Theme', 'responsive-lightbox'), array(&$this, 'rl_pp_theme'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
510
- add_settings_field('rl_pp_horizontal_padding', __('Horizontal padding', 'responsive-lightbox'), array(&$this, 'rl_pp_horizontal_padding'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
511
- add_settings_field('rl_pp_hide_flash', __('Hide Flash', 'responsive-lightbox'), array(&$this, 'rl_pp_hide_flash'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
512
- add_settings_field('rl_pp_wmode', __('Flash Window Mode (wmode)', 'responsive-lightbox'), array(&$this, 'rl_pp_wmode'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
513
- add_settings_field('rl_pp_video_autoplay', __('Video autoplay', 'responsive-lightbox'), array(&$this, 'rl_pp_video_autoplay'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
514
- add_settings_field('rl_pp_modal', __('Modal', 'responsive-lightbox'), array(&$this, 'rl_pp_modal'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
515
- add_settings_field('rl_pp_deeplinking', __('Deeplinking', 'responsive-lightbox'), array(&$this, 'rl_pp_deeplinking'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
516
- add_settings_field('rl_pp_overlay_gallery', __('Overlay gallery', 'responsive-lightbox'), array(&$this, 'rl_pp_overlay_gallery'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
517
- add_settings_field('rl_pp_keyboard_shortcuts', __('Keyboard shortcuts', 'responsive-lightbox'), array(&$this, 'rl_pp_keyboard_shortcuts'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
518
- add_settings_field('rl_pp_social', __('Social (Twitter, Facebook)', 'responsive-lightbox'), array(&$this, 'rl_pp_social'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
519
- }
520
- elseif($this->options['settings']['script'] === 'fancybox')
521
- {
522
- add_settings_field('rl_fb_modal', __('Modal', 'responsive-lightbox'), array(&$this, 'rl_fb_modal'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
523
- add_settings_field('rl_fb_show_overlay', __('Show overlay', 'responsive-lightbox'), array(&$this, 'rl_fb_show_overlay'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
524
- add_settings_field('rl_fb_show_close_button', __('Show close button', 'responsive-lightbox'), array(&$this, 'rl_fb_show_close_button'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
525
- add_settings_field('rl_fb_enable_escape_button', __('Enable escape button', 'responsive-lightbox'), array(&$this, 'rl_fb_enable_escape_button'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
526
- add_settings_field('rl_fb_hide_on_overlay_click', __('Hide on overlay click', 'responsive-lightbox'), array(&$this, 'rl_fb_hide_on_overlay_click'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
527
- add_settings_field('rl_fb_hide_on_content_click', __('Hide on content click', 'responsive-lightbox'), array(&$this, 'rl_fb_hide_on_content_click'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
528
- add_settings_field('rl_fb_cyclic', __('Cyclic', 'responsive-lightbox'), array(&$this, 'rl_fb_cyclic'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
529
- add_settings_field('rl_fb_show_nav_arrows', __('Show nav arrows', 'responsive-lightbox'), array(&$this, 'rl_fb_show_nav_arrows'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
530
- add_settings_field('rl_fb_auto_scale', __('Auto scale', 'responsive-lightbox'), array(&$this, 'rl_fb_auto_scale'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
531
- add_settings_field('rl_fb_scrolling', __('Scrolling (in/out)', 'responsive-lightbox'), array(&$this, 'rl_fb_scrolling'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
532
- add_settings_field('rl_fb_center_on_scroll', __('Center on scroll', 'responsive-lightbox'), array(&$this, 'rl_fb_center_on_scroll'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
533
- add_settings_field('rl_fb_opacity', __('Opacity', 'responsive-lightbox'), array(&$this, 'rl_fb_opacity'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
534
- add_settings_field('rl_fb_overlay_opacity', __('Overlay opacity', 'responsive-lightbox'), array(&$this, 'rl_fb_overlay_opacity'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
535
- add_settings_field('rl_fb_overlay_color', __('Overlay color', 'responsive-lightbox'), array(&$this, 'rl_fb_overlay_color'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
536
- add_settings_field('rl_fb_title_show', __('Title show', 'responsive-lightbox'), array(&$this, 'rl_fb_title_show'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
537
- add_settings_field('rl_fb_title_position', __('Title position', 'responsive-lightbox'), array(&$this, 'rl_fb_title_position'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
538
- add_settings_field('rl_fb_transitions', __('Transition (in/out)', 'responsive-lightbox'), array(&$this, 'rl_fb_transitions'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
539
- add_settings_field('rl_fb_easings', __('Easings (in/out)', 'responsive-lightbox'), array(&$this, 'rl_fb_easings'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
540
- add_settings_field('rl_fb_speeds', __('Speed (in/out)', 'responsive-lightbox'), array(&$this, 'rl_fb_speeds'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
541
- add_settings_field('rl_fb_change_speed', __('Change speed', 'responsive-lightbox'), array(&$this, 'rl_fb_change_speed'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
542
- add_settings_field('rl_fb_change_fade', __('Change fade', 'responsive-lightbox'), array(&$this, 'rl_fb_change_fade'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
543
- add_settings_field('rl_fb_padding', __('Padding', 'responsive-lightbox'), array(&$this, 'rl_fb_padding'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
544
- add_settings_field('rl_fb_margin', __('Margin', 'responsive-lightbox'), array(&$this, 'rl_fb_margin'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
545
- add_settings_field('rl_fb_video_width', __('Video width', 'responsive-lightbox'), array(&$this, 'rl_fb_video_width'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
546
- add_settings_field('rl_fb_video_height', __('Video height', 'responsive-lightbox'), array(&$this, 'rl_fb_video_height'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
547
- }
548
- elseif($this->options['settings']['script'] === 'nivo')
549
- {
550
- add_settings_field('rl_nv_effect', __('Effect', 'responsive-lightbox'), array(&$this, 'rl_nv_effect'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
551
- add_settings_field('rl_nv_click_overlay_to_close', __('Click overlay to close', 'responsive-lightbox'), array(&$this, 'rl_nv_click_overlay_to_close'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
552
- add_settings_field('rl_nv_keyboard_nav', __('Keyboard navigation', 'responsive-lightbox'), array(&$this, 'rl_nv_keyboard_nav'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
553
- add_settings_field('rl_nv_error_message', __('Error message', 'responsive-lightbox'), array(&$this, 'rl_nv_error_message'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
554
- }
555
- elseif($this->options['settings']['script'] === 'imagelightbox')
556
- {
557
- add_settings_field('rl_il_animation_speed', __('Animation speed', 'responsive-lightbox'), array(&$this, 'rl_il_animation_speed'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
558
- add_settings_field('rl_il_preload_next', __('Preload next image', 'responsive-lightbox'), array(&$this, 'rl_il_preload_next'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
559
- add_settings_field('rl_il_enable_keyboard', __('Enable keyboard keys', 'responsive-lightbox'), array(&$this, 'rl_il_enable_keyboard'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
560
- add_settings_field('rl_il_quit_on_end', __('Quit after last image', 'responsive-lightbox'), array(&$this, 'rl_il_quit_on_end'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
561
- add_settings_field('rl_il_quit_on_image_click', __('Quit when image is clicked', 'responsive-lightbox'), array(&$this, 'rl_il_quit_on_image_click'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
562
- add_settings_field('rl_il_quit_on_document_click', __('Quit when anything but image is clicked', 'responsive-lightbox'), array(&$this, 'rl_il_quit_on_document_click'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
563
- }
564
- }
565
-
566
-
567
- public function rl_script()
568
- {
569
- echo '
570
  <div id="rl_script" class="wplikebtns">';
571
 
572
- foreach($this->scripts as $val => $trans)
573
- {
574
- $val = esc_attr($val);
575
 
576
- echo '
577
- <input id="rl-script-'.$val.'" type="radio" name="responsive_lightbox_settings[script]" value="'.$val.'" '.checked($val, $this->options['settings']['script'], false).' />
578
- <label for="rl-script-'.$val.'">'.esc_html($trans['name']).'</label>';
579
- }
580
 
581
- echo '
582
- <p class="description">'.__('Select your preffered ligthbox effect script.', 'responsive-lightbox').'</p>
583
  </div>';
584
- }
585
 
586
 
587
- public function rl_selector()
588
- {
589
- echo '
590
  <div id="rl_selector">
591
- <input type="text" value="'.esc_attr($this->options['settings']['selector']).'" name="responsive_lightbox_settings[selector]" />
592
- <p class="description">'.__('Select to which rel selector lightbox effect will be applied to.', 'responsive-lightbox').'</p>
593
  </div>';
594
- }
595
 
596
 
597
- public function rl_enable_custom_events()
598
- {
599
- echo '
600
  <div id="rl_enable_custom_events" class="wplikebtns">';
601
 
602
- foreach($this->choices as $val => $trans)
603
- {
604
- $val = esc_attr($val);
605
 
606
- echo '
607
- <input id="rl-enable-custom-events-'.$val.'" type="radio" name="responsive_lightbox_settings[enable_custom_events]" value="'.$val.'" '.checked(($val === 'yes' ? true : false), $this->options['settings']['enable_custom_events'], false).' />
608
- <label for="rl-enable-custom-events-'.$val.'">'.esc_html($trans).'</label>';
609
- }
610
 
611
- echo '
612
- <p class="description">'.__('Enable triggering lightbox on custom jquery events.', 'responsive-lightbox').'</p>
613
- <div id="rl_custom_events"'.($this->options['settings']['enable_custom_events'] === false ? ' style="display: none;"' : '').'>
614
- <input type="text" name="responsive_lightbox_settings[custom_events]" value="'.esc_attr($this->options['settings']['custom_events']).'" />
615
- <p class="description">'.__('Enter a space separated list of events.', 'responsive-lightbox').'</p>
616
  </div>
617
  </div>';
618
- }
619
 
620
 
621
- public function rl_loading_place()
622
- {
623
- echo '
624
  <div id="rl_loading_place" class="wplikebtns">';
625
 
626
- foreach($this->loading_places as $val => $trans)
627
- {
628
- $val = esc_attr($val);
629
 
630
- echo '
631
- <input id="rl-loading-place-'.$val.'" type="radio" name="responsive_lightbox_settings[loading_place]" value="'.$val.'" '.checked($val, $this->options['settings']['loading_place'], false).' />
632
- <label for="rl-loading-place-'.$val.'">'.esc_html($trans).'</label>';
633
- }
634
 
635
- echo '
636
- <p class="description">'.__('Select where all the lightbox scripts should be placed.', 'responsive-lightbox').'</p>
637
  </div>';
638
- }
639
 
640
 
641
- public function rl_galleries()
642
- {
643
- echo '
644
  <div id="rl_galleries" class="wplikebtns">';
645
 
646
- foreach($this->choices as $val => $trans)
647
- {
648
- echo '
649
- <input id="rl-galleries-'.$val.'" type="radio" name="responsive_lightbox_settings[galleries]" value="'.esc_attr($val).'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['settings']['galleries'], FALSE).' />
650
- <label for="rl-galleries-'.$val.'">'.$trans.'</label>';
651
- }
652
-
653
- echo '
654
- <p class="description">'.__('Add lightbox to WordPress image galleries by default.', 'responsive-lightbox').'</p>
655
- </div>';
656
- }
657
-
658
-
659
- public function rl_enable_gallery_image_size()
660
- {
661
- echo '
662
  <div id="rl_enable_gallery_image_size" class="wplikebtns">';
663
 
664
- foreach($this->choices as $val => $trans)
665
- {
666
- $val = esc_attr($val);
667
-
668
- echo '
669
- <input id="rl-enable-gallery-image-size-'.$val.'" type="radio" name="responsive_lightbox_settings[enable_gallery_image_size]" value="'.$val.'" '.checked(($val === 'yes' ? true : false), $this->options['settings']['enable_gallery_image_size'], false).' />
670
- <label for="rl-enable-gallery-image-size-'.$val.'">'.esc_html($trans).'</label>';
671
- }
672
-
673
- echo '
674
- <p class="description">'.__('By default WP gallery links point to full size images only. Enable that to modify the image size of native WP gallery image links.', 'responsive-lightbox').'</p>';
675
-
676
- // get available image sizes
677
- $image_sizes = get_intermediate_image_sizes();
678
-
679
- // print_r($image_sizes);
680
-
681
- echo '
682
- <div id="rl_gallery_image_size"'.($this->options['settings']['enable_gallery_image_size'] === false ? ' style="display: none;"' : '').'>
683
- <select name="responsive_lightbox_settings[gallery_image_size]" value="'.esc_attr($this->options['settings']['gallery_image_size']).'" />
684
- <option value="full" '.selected($this->options['settings']['gallery_image_size'], 'full', false).'>'.esc_attr(__('full', 'responsive-lightbox')).'</option>';
685
-
686
- foreach ($image_sizes as $image_size)
687
- {
688
- echo '<option value="'.esc_attr($image_size).'" '.selected($this->options['settings']['gallery_image_size'], esc_attr($image_size), false).'>'.esc_attr($image_size).'</option>';
689
- }
690
-
691
- echo '
692
  </select>
693
- <p class="description">'.__('Select image size for gallery image links.', 'responsive-lightbox').'</p>
694
  </div>
695
  </div>';
696
- }
697
 
698
 
699
- public function rl_videos()
700
- {
701
- echo '
702
  <div id="rl_videos" class="wplikebtns">';
703
 
704
- foreach($this->choices as $val => $trans)
705
- {
706
- echo '
707
- <input id="rl-videos-'.$val.'" type="radio" name="responsive_lightbox_settings[videos]" value="'.esc_attr($val).'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['settings']['videos'], FALSE).' />
708
- <label for="rl-videos-'.$val.'">'.$trans.'</label>';
709
- }
710
 
711
- echo '
712
- <p class="description">'.__('Add lightbox to YouTube and Vimeo video links by default.', 'responsive-lightbox').'</p>
713
  </div>';
714
- }
715
 
716
 
717
- public function rl_image_links()
718
- {
719
- echo '
720
  <div id="rl_image_links" class="wplikebtns">';
721
 
722
- foreach($this->choices as $val => $trans)
723
- {
724
- echo '
725
- <input id="rl-image-links-'.$val.'" type="radio" name="responsive_lightbox_settings[image_links]" value="'.esc_attr($val).'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['settings']['image_links'], FALSE).' />
726
- <label for="rl-image-links-'.$val.'">'.$trans.'</label>';
727
- }
728
 
729
- echo '
730
- <p class="description">'.__('Add lightbox to WordPress image links by default.', 'responsive-lightbox').'</p>
731
  </div>';
732
- }
733
 
734
 
735
- public function rl_images_as_gallery()
736
- {
737
- echo '
738
  <div id="rl_images_as_gallery" class="wplikebtns">';
739
 
740
- foreach($this->choices as $val => $trans)
741
- {
742
- echo '
743
- <input id="rl-images-as-gallery-'.$val.'" type="radio" name="responsive_lightbox_settings[images_as_gallery]" value="'.esc_attr($val).'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['settings']['images_as_gallery'], FALSE).' />
744
- <label for="rl-images-as-gallery-'.$val.'">'.$trans.'</label>';
745
- }
746
 
747
- echo '
748
- <p class="description">'.__('Display single post images as a gallery.', 'responsive-lightbox').'</p>
749
  </div>';
750
- }
751
 
752
 
753
- public function rl_deactivation_delete()
754
- {
755
- echo '
756
  <div id="rl_deactivation_delete" class="wplikebtns">';
757
 
758
- foreach($this->choices as $val => $trans)
759
- {
760
- echo '
761
- <input id="rl-deactivation-delete-'.$val.'" type="radio" name="responsive_lightbox_settings[deactivation_delete]" value="'.esc_attr($val).'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['settings']['deactivation_delete'], FALSE).' />
762
- <label for="rl-deactivation-delete-'.$val.'">'.$trans.'</label>';
763
- }
764
 
765
- echo '
766
- <p class="description">'.__('Delete settings on plugin deactivation.', 'responsive-lightbox').'</p>
767
  </div>';
768
- }
769
 
770
 
771
- public function rl_sb_animation()
772
- {
773
- echo '
774
  <div id="rl_sb_animation" class="wplikebtns">';
775
 
776
- foreach($this->scripts['swipebox']['animations'] as $val => $trans)
777
- {
778
- echo '
779
- <input id="rl-sb-animation-'.$val.'" type="radio" name="responsive_lightbox_configuration[swipebox][animation]" value="'.esc_attr($val).'" '.checked($val, $this->options['configuration']['swipebox']['animation'], FALSE).' />
780
- <label for="rl-sb-animation-'.$val.'">'.$trans.'</label>';
781
- }
782
 
783
- echo '
784
- <p class="description">'.__('Select a method of applying a lightbox effect.', 'responsive-lightbox').'</p>
785
  </div>';
786
- }
787
 
788
 
789
- public function rl_sb_hide_bars()
790
- {
791
- echo '
792
  <div id="rl_sb_hide_bars" class="wplikebtns">';
793
 
794
- foreach($this->choices as $val => $trans)
795
- {
796
- echo '
797
- <input id="rl-sb-hide-bars-'.$val.'" type="radio" name="responsive_lightbox_configuration[swipebox][hide_bars]" value="'.esc_attr($val).'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['swipebox']['hide_bars'], FALSE).' />
798
- <label for="rl-sb-hide-bars-'.$val.'">'.$trans.'</label>';
799
- }
800
-
801
- echo '
802
- <p class="description">'.__('Disable if you don\'t want to top and bottom bars to be hidden after a period of time.', 'responsive-lightbox').'</p>
803
- <div id="rl_sb_hide_bars_delay"'.($this->options['configuration']['swipebox']['hide_bars'] === FALSE ? ' style="display: none;"' : '').'>
804
- <input type="text" name="responsive_lightbox_configuration[swipebox][hide_bars_delay]" value="'.esc_attr($this->options['configuration']['swipebox']['hide_bars_delay']).'" /> <span>ms</span>
805
- <p class="description">'.__('Enter the time after which the top and bottom bars will be hidden (when hiding is enabled).', 'responsive-lightbox').'</p>
806
  </div>
807
  </div>';
808
- }
809
 
810
 
811
- public function rl_sb_video_max_width()
812
- {
813
- echo '
814
  <div id="rl_sb_video_max_width">
815
- <input type="text" name="responsive_lightbox_configuration[swipebox][video_max_width]" value="'.esc_attr($this->options['configuration']['swipebox']['video_max_width']).'" /> <span>px</span>
816
- <p class="description">'.__('Enter the max video width in a lightbox.', 'responsive-lightbox').'</p>
817
  </div>';
818
- }
819
 
820
 
821
- public function rl_sb_force_png_icons()
822
- {
823
- echo '
824
  <div id="rl_sb_force_png_icons" class="wplikebtns">';
825
 
826
- foreach($this->choices as $val => $trans)
827
- {
828
- echo '
829
- <input id="rl-sb-force-png-icons-'.$val.'" type="radio" name="responsive_lightbox_configuration[swipebox][force_png_icons]" value="'.esc_attr($val).'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['swipebox']['force_png_icons'], FALSE).' />
830
- <label for="rl-sb-force-png-icons-'.$val.'">'.$trans.'</label>';
831
- }
832
 
833
- echo '
834
- <p class="description">'.__('Enable this if you\'re having problems with navigation icons not visible on some devices.', 'responsive-lightbox').'</p>
835
  </div>';
836
- }
837
 
838
 
839
- public function rl_pp_animation_speed()
840
- {
841
- echo '
842
  <div id="rl_pp_animation_speed" class="wplikebtns">';
843
 
844
- foreach($this->scripts['prettyphoto']['animation_speeds'] as $val => $trans)
845
- {
846
- echo '
847
- <input id="rl-pp-animation-speed-'.$val.'" type="radio" name="responsive_lightbox_configuration[prettyphoto][animation_speed]" value="'.esc_attr($val).'" '.checked($val, $this->options['configuration']['prettyphoto']['animation_speed'], FALSE).' />
848
- <label for="rl-pp-animation-speed-'.$val.'">'.$trans.'</label>';
849
- }
850
 
851
- echo '
852
- <p class="description">'.__('Select animation speed for lightbox effect.', 'responsive-lightbox').'</p>
853
  </div>';
854
- }
855
 
856
 
857
- public function rl_pp_slideshow()
858
- {
859
- echo '
860
  <div id="rl_pp_slideshow" class="wplikebtns">';
861
 
862
- foreach($this->choices as $val => $trans)
863
- {
864
- echo '
865
- <input id="rl-pp-slideshow-'.$val.'" type="radio" name="responsive_lightbox_configuration[prettyphoto][slideshow]" value="'.esc_attr($val).'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['prettyphoto']['slideshow'], FALSE).' />
866
- <label for="rl-pp-slideshow-'.$val.'">'.$trans.'</label>';
867
- }
868
-
869
- echo '
870
- <p class="description">'.__('Display images as slideshow.', 'responsive-lightbox').'</p>
871
- <div id="rl_pp_slideshow_delay"'.($this->options['configuration']['prettyphoto']['slideshow'] === FALSE ? ' style="display: none;"' : '').'>
872
- <input type="text" name="responsive_lightbox_configuration[prettyphoto][slideshow_delay]" value="'.esc_attr($this->options['configuration']['prettyphoto']['slideshow_delay']).'" /> <span>ms</span>
873
- <p class="description">'.__('Enter time (in miliseconds).', 'responsive-lightbox').'</p>
874
  </div>
875
  </div>';
876
- }
877
 
878
 
879
- public function rl_pp_slideshow_autoplay()
880
- {
881
- echo '
882
  <div id="rl_pp_slideshow_autoplay" class="wplikebtns">';
883
 
884
- foreach($this->choices as $val => $trans)
885
- {
886
- echo '
887
- <input id="rl-pp-slideshow-autoplay-'.$val.'" type="radio" name="responsive_lightbox_configuration[prettyphoto][slideshow_autoplay]" value="'.esc_attr($val).'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['prettyphoto']['slideshow_autoplay'], FALSE).' />
888
- <label for="rl-pp-slideshow-autoplay-'.$val.'">'.$trans.'</label>';
889
- }
890
 
891
- echo '
892
- <p class="description">'.__('Automatically start slideshow.', 'responsive-lightbox').'</p>
893
  </div>';
894
- }
895
 
896
 
897
- public function rl_pp_opacity()
898
- {
899
- echo '
900
  <div id="rl_pp_opacity">
901
- <input type="text" id="rl_pp_opacity_input" class="hide-if-js" name="responsive_lightbox_configuration[prettyphoto][opacity]" value="'.esc_attr($this->options['configuration']['prettyphoto']['opacity']).'" />
902
  <div class="wplike-slider">
903
- <span class="left hide-if-no-js">0</span><span class="middle" id="rl_pp_opacity_span" title="'.esc_attr($this->options['configuration']['prettyphoto']['opacity']).'"></span><span class="right hide-if-no-js">100</span>
904
  </div>
905
- <p class="description">'.__('Value between 0 and 100, 100 for no opacity.', 'responsive-lightbox').'</p>
906
  </div>';
907
- }
908
 
909
 
910
- public function rl_pp_title()
911
- {
912
- echo '
913
  <div id="rl_pp_title" class="wplikebtns">';
914
 
915
- foreach($this->choices as $val => $trans)
916
- {
917
- echo '
918
- <input id="rl-pp-show-title-'.$val.'" type="radio" name="responsive_lightbox_configuration[prettyphoto][show_title]" value="'.esc_attr($val).'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['prettyphoto']['show_title'], FALSE).' />
919
- <label for="rl-pp-show-title-'.$val.'">'.$trans.'</label>';
920
- }
921
 
922
- echo '
923
- <p class="description">'.__('Display image tiltle.', 'responsive-lightbox').'</p>
924
  </div>';
925
- }
926
 
927
 
928
- public function rl_pp_allow_resize()
929
- {
930
- echo '
931
  <div id="rl_pp_allow_resize" class="wplikebtns">';
932
 
933
- foreach($this->choices as $val => $trans)
934
- {
935
- echo '
936
- <input id="rl-pp-allow-resize-'.$val.'" type="radio" name="responsive_lightbox_configuration[prettyphoto][allow_resize]" value="'.esc_attr($val).'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['prettyphoto']['allow_resize'], FALSE).' />
937
- <label for="rl-pp-allow-resize-'.$val.'">'.$trans.'</label>';
938
- }
939
 
940
- echo '
941
- <p class="description">'.__('Resize the photos bigger than viewport.', 'responsive-lightbox').'</p>
942
  </div>';
943
- }
944
 
945
 
946
- public function rl_pp_allow_expand()
947
- {
948
- echo '
949
  <div id="rl_pp_allow_expand" class="wplikebtns">';
950
 
951
- foreach($this->choices as $val => $trans)
952
- {
953
- echo '
954
- <input id="rl-pp-allow-expand-'.$val.'" type="radio" name="responsive_lightbox_configuration[prettyphoto][allow_expand]" value="'.esc_attr($val).'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['prettyphoto']['allow_expand'], FALSE).' />
955
- <label for="rl-pp-allow-expand-'.$val.'">'.$trans.'</label>';
956
- }
957
 
958
- echo '
959
- <p class="description">'.__('Expands something.', 'responsive-lightbox').'</p>
960
  </div>';
961
- }
962
 
963
 
964
- public function rl_pp_width()
965
- {
966
- echo '
967
  <div id="rl_pp_width">
968
- <input type="text" name="responsive_lightbox_configuration[prettyphoto][width]" value="'.esc_attr($this->options['configuration']['prettyphoto']['width']).'" /> <span>px</span>
969
- <p class="description">'.__('in pixels', 'responsive-lightbox').'</p>
970
  </div>';
971
- }
972
 
973
 
974
- public function rl_pp_height()
975
- {
976
- echo '
977
  <div id="rl_pp_height">
978
- <input type="text" name="responsive_lightbox_configuration[prettyphoto][height]" value="'.esc_attr($this->options['configuration']['prettyphoto']['height']).'" /> <span>px</span>
979
- <p class="description">'.__('in pixels', 'responsive-lightbox').'</p>
980
  </div>';
981
- }
982
-
983
 
984
- public function rl_pp_theme()
985
- {
986
- echo '
987
  <div id="rl_pp_theme" class="wplikebtns">';
988
 
989
- foreach($this->scripts['prettyphoto']['themes'] as $val => $trans)
990
- {
991
- echo '
992
- <input id="rl-pp-theme-'.$val.'" type="radio" name="responsive_lightbox_configuration[prettyphoto][theme]" value="'.esc_attr($val).'" '.checked($val, $this->options['configuration']['prettyphoto']['theme'], FALSE).' />
993
- <label for="rl-pp-theme-'.$val.'">'.$trans.'</label>';
994
- }
995
 
996
- echo '
997
- <p class="description">'.__('Select theme for lightbox effect.', 'responsive-lightbox').'</p>
998
  </div>';
999
- }
1000
 
1001
 
1002
- public function rl_pp_horizontal_padding()
1003
- {
1004
- echo '
1005
  <div id="rl_pp_horizontal_padding">
1006
- <input type="text" name="responsive_lightbox_configuration[prettyphoto][horizontal_padding]" value="'.esc_attr($this->options['configuration']['prettyphoto']['horizontal_padding']).'" /> <span>px</span>
1007
- <p class="description">'.__('Horizontal padding (in pixels).', 'responsive-lightbox').'</p>
1008
  </div>';
1009
- }
1010
 
1011
 
1012
- public function rl_pp_hide_flash()
1013
- {
1014
- echo '
1015
  <div id="rl_pp_hide_flash" class="wplikebtns">';
1016
 
1017
- foreach($this->choices as $val => $trans)
1018
- {
1019
- echo '
1020
- <input id="rl-pp-hide-flash-'.$val.'" type="radio" name="responsive_lightbox_configuration[prettyphoto][hide_flash]" value="'.esc_attr($val).'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['prettyphoto']['hide_flash'], FALSE).' />
1021
- <label for="rl-pp-hide-flash-'.$val.'">'.$trans.'</label>';
1022
- }
1023
 
1024
- echo '
1025
- <p class="description">'.__('Hides all the flash object on a page. Enable this if flash appears over prettyPhoto.', 'responsive-lightbox').'</p>
1026
  </div>';
1027
- }
1028
 
1029
 
1030
- public function rl_pp_wmode()
1031
- {
1032
- echo '
1033
  <div id="rl_pp_wmode" class="wplikebtns">';
1034
 
1035
- foreach($this->scripts['prettyphoto']['wmodes'] as $val => $trans)
1036
- {
1037
- echo '
1038
- <input id="rl-pp-wmode-'.$val.'" type="radio" name="responsive_lightbox_configuration[prettyphoto][wmode]" value="'.esc_attr($val).'" '.checked($val, $this->options['configuration']['prettyphoto']['wmode'], FALSE).' />
1039
- <label for="rl-pp-wmode-'.$val.'">'.$trans.'</label>';
1040
- }
1041
 
1042
- echo '
1043
- <p class="description">'.__('Select flash window mode.', 'responsive-lightbox').'</p>
1044
  </div>';
1045
- }
1046
 
1047
 
1048
- public function rl_pp_video_autoplay()
1049
- {
1050
- echo '
1051
  <div id="rl_pp_video_autoplay" class="wplikebtns">';
1052
 
1053
- foreach($this->choices as $val => $trans)
1054
- {
1055
- echo '
1056
- <input id="rl-pp-video-autoplay-'.$val.'" type="radio" name="responsive_lightbox_configuration[prettyphoto][video_autoplay]" value="'.esc_attr($val).'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['prettyphoto']['video_autoplay'], FALSE).' />
1057
- <label for="rl-pp-video-autoplay-'.$val.'">'.$trans.'</label>';
1058
- }
1059
 
1060
- echo '
1061
- <p class="description">'.__('Automatically start videos.', 'responsive-lightbox').'</p>
1062
  </div>';
1063
- }
1064
 
1065
 
1066
- public function rl_pp_modal()
1067
- {
1068
- echo '
1069
  <div id="rl_pp_modal" class="wplikebtns">';
1070
 
1071
- foreach($this->choices as $val => $trans)
1072
- {
1073
- echo '
1074
- <input id="rl-pp-modal-close-'.$val.'" type="radio" name="responsive_lightbox_configuration[prettyphoto][modal]" value="'.esc_attr($val).'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['prettyphoto']['modal'], FALSE).' />
1075
- <label for="rl-pp-modal-close-'.$val.'">'.$trans.'</label>';
1076
- }
1077
 
1078
- echo '
1079
- <p class="description">'.__('If set to true, only the close button will close the window.', 'responsive-lightbox').'</p>
1080
  </div>';
1081
- }
1082
 
1083
 
1084
- public function rl_pp_deeplinking()
1085
- {
1086
- echo '
1087
  <div id="rl_pp_deeplinking" class="wplikebtns">';
1088
 
1089
- foreach($this->choices as $val => $trans)
1090
- {
1091
- echo '
1092
- <input id="rl-pp-deeplinking-'.$val.'" type="radio" name="responsive_lightbox_configuration[prettyphoto][deeplinking]" value="'.esc_attr($val).'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['prettyphoto']['deeplinking'], FALSE).' />
1093
- <label for="rl-pp-deeplinking-'.$val.'">'.$trans.'</label>';
1094
- }
1095
 
1096
- echo '
1097
- <p class="description">'.__('Allow prettyPhoto to update the url to enable deeplinking.', 'responsive-lightbox').'</p>
1098
  </div>';
1099
- }
1100
 
1101
 
1102
- public function rl_pp_overlay_gallery()
1103
- {
1104
- echo '
1105
  <div id="rl_pp_overlay_gallery" class="wplikebtns">';
1106
 
1107
- foreach($this->choices as $val => $trans)
1108
- {
1109
- echo '
1110
- <input id="rl-pp-overlay-gallery-'.$val.'" type="radio" name="responsive_lightbox_configuration[prettyphoto][overlay_gallery]" value="'.esc_attr($val).'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['prettyphoto']['overlay_gallery'], FALSE).' />
1111
- <label for="rl-pp-overlay-gallery-'.$val.'">'.$trans.'</label>';
1112
- }
1113
 
1114
- echo '
1115
- <p class="description">'.__('If enabled, a gallery will overlay the fullscreen image on mouse over.', 'responsive-lightbox').'</p>
1116
  </div>';
1117
- }
1118
 
1119
 
1120
- public function rl_pp_keyboard_shortcuts()
1121
- {
1122
- echo '
1123
  <div id="rl_pp_keyboard_shortcuts" class="wplikebtns">';
1124
 
1125
- foreach($this->choices as $val => $trans)
1126
- {
1127
- echo '
1128
- <input id="rl-pp-keyboard-shortcuts-'.$val.'" type="radio" name="responsive_lightbox_configuration[prettyphoto][keyboard_shortcuts]" value="'.esc_attr($val).'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['prettyphoto']['keyboard_shortcuts'], FALSE).' />
1129
- <label for="rl-pp-keyboard-shortcuts-'.$val.'">'.$trans.'</label>';
1130
- }
1131
 
1132
- echo '
1133
- <p class="description">'.__('Set to false if you open forms inside prettyPhoto.', 'responsive-lightbox').'</p>
1134
  </div>';
1135
- }
1136
 
1137
 
1138
- public function rl_pp_social()
1139
- {
1140
- echo '
1141
  <div id="rl_pp_social" class="wplikebtns">';
1142
 
1143
- foreach($this->choices as $val => $trans)
1144
- {
1145
- echo '
1146
- <input id="rl-pp-social-'.$val.'" type="radio" name="responsive_lightbox_configuration[prettyphoto][social]" value="'.esc_attr($val).'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['prettyphoto']['social'], FALSE).' />
1147
- <label for="rl-pp-social-'.$val.'">'.$trans.'</label>';
1148
- }
1149
 
1150
- echo '
1151
- <p class="description">'.__('Display links to Facebook and Twitter.', 'responsive-lightbox').'</p>
1152
  </div>';
1153
- }
1154
 
1155
 
1156
- public function rl_fb_transitions()
1157
- {
1158
- echo '
1159
  <div id="rl_fb_transition" class="wplikebtns">';
1160
 
1161
- foreach($this->scripts['fancybox']['transitions'] as $val => $trans)
1162
- {
1163
- echo '
1164
- <input id="rl-fb-transitions-'.$val.'" type="radio" name="responsive_lightbox_configuration[fancybox][transitions]" value="'.esc_attr($val).'" '.checked($val, $this->options['configuration']['fancybox']['transitions'], FALSE).' />
1165
- <label for="rl-fb-transitions-'.$val.'">'.$trans.'</label>';
1166
- }
1167
 
1168
- echo '
1169
- <p class="description">'.__('The transition type.', 'responsive-lightbox').'</p>
1170
  </div>';
1171
- }
1172
 
1173
 
1174
- public function rl_fb_padding()
1175
- {
1176
- echo '
1177
  <div id="rl_fb_padding">
1178
- <input type="text" name="responsive_lightbox_configuration[fancybox][padding]" value="'.esc_attr($this->options['configuration']['fancybox']['padding']).'" /> <span>px</span>
1179
- <p class="description">'.__('Space between FancyBox wrapper and content.', 'responsive-lightbox').'</p>
1180
  </div>';
1181
- }
1182
 
1183
 
1184
- public function rl_fb_margin()
1185
- {
1186
- echo '
1187
  <div id="rl_fb_margin">
1188
- <input type="text" name="responsive_lightbox_configuration[fancybox][margin]" value="'.esc_attr($this->options['configuration']['fancybox']['margin']).'" /> <span>px</span>
1189
- <p class="description">'.__('Space between viewport and FancyBox wrapper.', 'responsive-lightbox').'</p>
1190
  </div>';
1191
- }
1192
 
1193
 
1194
- public function rl_fb_modal()
1195
- {
1196
- echo '
1197
  <div id="rl_fb_modal" class="wplikebtns">';
1198
 
1199
- foreach($this->choices as $val => $trans)
1200
- {
1201
- echo '
1202
- <input id="rl-fb-modal-'.$val.'" type="radio" name="responsive_lightbox_configuration[fancybox][modal]" value="'.esc_attr($val).'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['fancybox']['modal'], FALSE).' />
1203
- <label for="rl-fb-modal-'.$val.'">'.$trans.'</label>';
1204
- }
1205
 
1206
- echo '
1207
- <p class="description">'.__('When true, "overlayShow" is set to TRUE and "hideOnOverlayClick", "hideOnContentClick", "enableEscapeButton", "showCloseButton" are set to FALSE.', 'responsive-lightbox').'</p>
1208
  </div>';
1209
- }
1210
 
1211
 
1212
- public function rl_fb_show_overlay()
1213
- {
1214
- echo '
1215
  <div id="rl_fb_show_overlay" class="wplikebtns">';
1216
 
1217
- foreach($this->choices as $val => $trans)
1218
- {
1219
- echo '
1220
- <input id="rl-fb-show-overlay-'.$val.'" type="radio" name="responsive_lightbox_configuration[fancybox][show_overlay]" value="'.esc_attr($val).'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['fancybox']['show_overlay'], FALSE).' '.disabled($this->options['configuration']['fancybox']['modal'], TRUE, FALSE).' />
1221
- <label for="rl-fb-show-overlay-'.$val.'">'.$trans.'</label>';
1222
- }
1223
 
1224
- echo '
1225
- <p class="description">'.__('Toggle overlay.', 'responsive-lightbox').'</p>
1226
  </div>';
1227
- }
1228
 
1229
 
1230
- public function rl_fb_show_close_button()
1231
- {
1232
- echo '
1233
  <div id="rl_fb_show_close_button" class="wplikebtns">';
1234
 
1235
- foreach($this->choices as $val => $trans)
1236
- {
1237
- echo '
1238
- <input id="rl-fb-show-close-button-'.$val.'" type="radio" name="responsive_lightbox_configuration[fancybox][show_close_button]" value="'.esc_attr($val).'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['fancybox']['show_close_button'], FALSE).' '.disabled($this->options['configuration']['fancybox']['modal'], TRUE, FALSE).' />
1239
- <label for="rl-fb-show-close-button-'.$val.'">'.$trans.'</label>';
1240
- }
1241
 
1242
- echo '
1243
- <p class="description">'.__('Toggle close button.', 'responsive-lightbox').'</p>
1244
  </div>';
1245
- }
1246
 
1247
 
1248
- public function rl_fb_enable_escape_button()
1249
- {
1250
- echo '
1251
  <div id="rl_fb_enable_escape_button" class="wplikebtns">';
1252
 
1253
- foreach($this->choices as $val => $trans)
1254
- {
1255
- echo '
1256
- <input id="rl-fb-enable-escape-button-'.$val.'" type="radio" name="responsive_lightbox_configuration[fancybox][enable_escape_button]" value="'.esc_attr($val).'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['fancybox']['enable_escape_button'], FALSE).' '.disabled($this->options['configuration']['fancybox']['modal'], TRUE, FALSE).' />
1257
- <label for="rl-fb-enable-escape-button-'.$val.'">'.$trans.'</label>';
1258
- }
1259
 
1260
- echo '
1261
- <p class="description">'.__('Toggle if pressing Esc button closes FancyBox.', 'responsive-lightbox').'</p>
1262
  </div>';
1263
- }
1264
 
1265
 
1266
- public function rl_fb_hide_on_overlay_click()
1267
- {
1268
- echo '
1269
  <div id="rl_fb_hide_on_overlay_click" class="wplikebtns">';
1270
 
1271
- foreach($this->choices as $val => $trans)
1272
- {
1273
- echo '
1274
- <input id="rl-fb-hide-on-overlay-click-'.$val.'" type="radio" name="responsive_lightbox_configuration[fancybox][hide_on_overlay_click]" value="'.esc_attr($val).'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['fancybox']['hide_on_overlay_click'], FALSE).' '.disabled($this->options['configuration']['fancybox']['modal'], TRUE, FALSE).' />
1275
- <label for="rl-fb-hide-on-overlay-click-'.$val.'">'.$trans.'</label>';
1276
- }
1277
 
1278
- echo '
1279
- <p class="description">'.__('Toggle if clicking the overlay should close FancyBox.', 'responsive-lightbox').'</p>
1280
  </div>';
1281
- }
1282
 
1283
 
1284
- public function rl_fb_hide_on_content_click()
1285
- {
1286
- echo '
1287
  <div id="rl_fb_hide_on_content_click" class="wplikebtns">';
1288
 
1289
- foreach($this->choices as $val => $trans)
1290
- {
1291
- echo '
1292
- <input id="rl-fb-hide-on-content-click-'.$val.'" type="radio" name="responsive_lightbox_configuration[fancybox][hide_on_content_click]" value="'.esc_attr($val).'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['fancybox']['hide_on_content_click'], FALSE).' '.disabled($this->options['configuration']['fancybox']['modal'], TRUE, FALSE).' />
1293
- <label for="rl-fb-hide-on-content-click-'.$val.'">'.$trans.'</label>';
1294
- }
1295
 
1296
- echo '
1297
- <p class="description">'.__('Toggle if clicking the content should close FancyBox.', 'responsive-lightbox').'</p>
1298
  </div>';
1299
- }
1300
 
1301
 
1302
- public function rl_fb_cyclic()
1303
- {
1304
- echo '
1305
  <div id="rl_fb_cyclic" class="wplikebtns">';
1306
 
1307
- foreach($this->choices as $val => $trans)
1308
- {
1309
- echo '
1310
- <input id="rl-fb-cyclic-'.$val.'" type="radio" name="responsive_lightbox_configuration[fancybox][cyclic]" value="'.esc_attr($val).'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['fancybox']['cyclic'], FALSE).' />
1311
- <label for="rl-fb-cyclic-'.$val.'">'.$trans.'</label>';
1312
- }
1313
 
1314
- echo '
1315
- <p class="description">'.__('When true, galleries will be cyclic, allowing you to keep pressing next/back.', 'responsive-lightbox').'</p>
1316
  </div>';
1317
- }
1318
 
1319
 
1320
- public function rl_fb_show_nav_arrows()
1321
- {
1322
- echo '
1323
  <div id="rl_fb_show_nav_arrows" class="wplikebtns">';
1324
 
1325
- foreach($this->choices as $val => $trans)
1326
- {
1327
- echo '
1328
- <input id="rl-fb-show-nav-arrows-'.$val.'" type="radio" name="responsive_lightbox_configuration[fancybox][show_nav_arrows]" value="'.esc_attr($val).'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['fancybox']['show_nav_arrows'], FALSE).' />
1329
- <label for="rl-fb-show-nav-arrows-'.$val.'">'.$trans.'</label>';
1330
- }
1331
 
1332
- echo '
1333
- <p class="description">'.__('Toggle navigation arrows.', 'responsive-lightbox').'</p>
1334
  </div>';
1335
- }
1336
 
1337
 
1338
- public function rl_fb_auto_scale()
1339
- {
1340
- echo '
1341
  <div id="rl_fb_auto_scale" class="wplikebtns">';
1342
 
1343
- foreach($this->choices as $val => $trans)
1344
- {
1345
- echo '
1346
- <input id="rl-fb-auto-scale-'.$val.'" type="radio" name="responsive_lightbox_configuration[fancybox][auto_scale]" value="'.esc_attr($val).'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['fancybox']['auto_scale'], FALSE).' />
1347
- <label for="rl-fb-auto-scale-'.$val.'">'.$trans.'</label>';
1348
- }
1349
 
1350
- echo '
1351
- <p class="description">'.__('If true, FancyBox is scaled to fit in viewport.', 'responsive-lightbox').'</p>
1352
  </div>';
1353
- }
1354
 
1355
 
1356
- public function rl_fb_scrolling()
1357
- {
1358
- echo '
1359
  <div id="rl_fb_scrolling" class="wplikebtns">';
1360
 
1361
- foreach($this->scripts['fancybox']['scrollings'] as $val => $trans)
1362
- {
1363
- echo '
1364
- <input id="rl-fb-scrolling-'.$val.'" type="radio" name="responsive_lightbox_configuration[fancybox][scrolling]" value="'.esc_attr($val).'" '.checked($val, $this->options['configuration']['fancybox']['scrolling'], FALSE).' />
1365
- <label for="rl-fb-scrolling-'.$val.'">'.$trans.'</label>';
1366
- }
1367
 
1368
- echo '
1369
- <p class="description">'.__('Set the overflow CSS property to create or hide scrollbars.', 'responsive-lightbox').'</p>
1370
  </div>';
1371
- }
1372
 
1373
 
1374
- public function rl_fb_center_on_scroll()
1375
- {
1376
- echo '
1377
  <div id="rl_fb_center_on_scroll" class="wplikebtns">';
1378
 
1379
- foreach($this->choices as $val => $trans)
1380
- {
1381
- echo '
1382
- <input id="rl-fb-center-on-scroll-'.$val.'" type="radio" name="responsive_lightbox_configuration[fancybox][center_on_scroll]" value="'.esc_attr($val).'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['fancybox']['center_on_scroll'], FALSE).' />
1383
- <label for="rl-fb-center-on-scroll-'.$val.'">'.$trans.'</label>';
1384
- }
1385
 
1386
- echo '
1387
- <p class="description">'.__('When true, FancyBox is centered while scrolling page.', 'responsive-lightbox').'</p>
1388
  </div>';
1389
- }
1390
 
1391
 
1392
- public function rl_fb_opacity()
1393
- {
1394
- echo '
1395
  <div id="rl_fb_opacity" class="wplikebtns">';
1396
 
1397
- foreach($this->choices as $val => $trans)
1398
- {
1399
- echo '
1400
- <input id="rl-fb-opacity-'.$val.'" type="radio" name="responsive_lightbox_configuration[fancybox][opacity]" value="'.esc_attr($val).'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['fancybox']['opacity'], FALSE).' />
1401
- <label for="rl-fb-opacity-'.$val.'">'.$trans.'</label>';
1402
- }
1403
 
1404
- echo '
1405
- <p class="description">'.__('When true, transparency of content is changed for elastic transitions.', 'responsive-lightbox').'</p>
1406
  </div>';
1407
- }
1408
 
1409
 
1410
- public function rl_fb_overlay_opacity()
1411
- {
1412
- echo '
1413
  <div id="rl_fb_overlay_opacity">
1414
- <input type="text" id="rl_fb_overlay_opacity_input" class="hide-if-js" name="responsive_lightbox_configuration[fancybox][overlay_opacity]" value="'.esc_attr($this->options['configuration']['fancybox']['overlay_opacity']).'" />
1415
  <div class="wplike-slider">
1416
- <span class="left hide-if-no-js">0</span><span class="middle" id="rl_fb_overlay_opacity_span" title="'.esc_attr($this->options['configuration']['fancybox']['overlay_opacity']).'"></span><span class="right hide-if-no-js">100</span>
1417
  </div>
1418
- <p class="description">'.__('Opacity of the overlay.', 'responsive-lightbox').'</p>
1419
  </div>';
1420
- }
1421
 
1422
 
1423
- public function rl_fb_overlay_color()
1424
- {
1425
- echo '
1426
  <div id="rl_fb_overlay_color">
1427
- <input type="text" value="'.esc_attr($this->options['configuration']['fancybox']['overlay_color']).'" id="rl_fb_overlay_color_input" name="responsive_lightbox_configuration[fancybox][overlay_color]" data-default-color="'.$this->defaults['configuration']['fancybox']['overlay_color'].'" />
1428
- <p class="description">'.__('Color of the overlay.', 'responsive-lightbox').'</p>
1429
  </div>';
1430
- }
1431
 
1432
 
1433
- public function rl_fb_title_show()
1434
- {
1435
- echo '
1436
  <div id="rl_fb_title_show" class="wplikebtns">';
1437
 
1438
- foreach($this->choices as $val => $trans)
1439
- {
1440
- echo '
1441
- <input id="rl-fb-title-show-'.$val.'" type="radio" name="responsive_lightbox_configuration[fancybox][title_show]" value="'.esc_attr($val).'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['fancybox']['title_show'], FALSE).' />
1442
- <label for="rl-fb-title-show-'.$val.'">'.$trans.'</label>';
1443
- }
1444
 
1445
- echo '
1446
- <p class="description">'.__('Toggle title.', 'responsive-lightbox').'</p>
1447
  </div>';
1448
- }
1449
 
1450
 
1451
- public function rl_fb_title_position()
1452
- {
1453
- echo '
1454
  <div id="rl_fb_title_position" class="wplikebtns">';
1455
 
1456
- foreach($this->scripts['fancybox']['positions'] as $val => $trans)
1457
- {
1458
- echo '
1459
- <input id="rl-fb-title-position-'.$val.'" type="radio" name="responsive_lightbox_configuration[fancybox][title_position]" value="'.esc_attr($val).'" '.checked($val, $this->options['configuration']['fancybox']['title_position'], FALSE).' />
1460
- <label for="rl-fb-title-position-'.$val.'">'.$trans.'</label>';
1461
- }
1462
 
1463
- echo '
1464
- <p class="description">'.__('The position of title.', 'responsive-lightbox').'</p>
1465
  </div>';
1466
- }
1467
 
1468
 
1469
- public function rl_fb_easings()
1470
- {
1471
- echo '
1472
  <div id="rl_fb_easings" class="wplikebtns">';
1473
 
1474
- foreach($this->scripts['fancybox']['easings'] as $val => $trans)
1475
- {
1476
- echo '
1477
- <input id="rl-fb-easings-'.$val.'" type="radio" name="responsive_lightbox_configuration[fancybox][easings]" value="'.esc_attr($val).'" '.checked($val, $this->options['configuration']['fancybox']['easings'], FALSE).' />
1478
- <label for="rl-fb-easings-'.$val.'">'.$trans.'</label>';
1479
- }
1480
 
1481
- echo '
1482
- <p class="description">'.__('Easing used for elastic animations.', 'responsive-lightbox').'</p>
1483
  </div>';
1484
- }
1485
 
1486
 
1487
- public function rl_fb_speeds()
1488
- {
1489
- echo '
1490
  <div id="rl_fb_speeds">
1491
- <input type="text" value="'.esc_attr($this->options['configuration']['fancybox']['speeds']).'" name="responsive_lightbox_configuration[fancybox][speeds]" /> <span>ms</span>
1492
- <p class="description">'.__('Speed of the fade and elastic transitions, in milliseconds.', 'responsive-lightbox').'</p>
1493
  </div>';
1494
- }
1495
 
1496
 
1497
- public function rl_fb_change_speed()
1498
- {
1499
- echo '
1500
  <div id="rl_fb_change_speed">
1501
- <input type="text" value="'.esc_attr($this->options['configuration']['fancybox']['change_speed']).'" name="responsive_lightbox_configuration[fancybox][change_speed]" /> <span>ms</span>
1502
- <p class="description">'.__('Speed of resizing when changing gallery items, in milliseconds.', 'responsive-lightbox').'</p>
1503
  </div>';
1504
- }
1505
 
1506
 
1507
- public function rl_fb_change_fade()
1508
- {
1509
- echo '
1510
  <div id="rl_fb_change_fade">
1511
- <input type="text" value="'.esc_attr($this->options['configuration']['fancybox']['change_fade']).'" name="responsive_lightbox_configuration[fancybox][change_fade]" /> <span>ms</span>
1512
- <p class="description">'.__('Speed of the content fading while changing gallery items.', 'responsive-lightbox').'</p>
1513
  </div>';
1514
- }
1515
 
1516
 
1517
- public function rl_fb_video_width()
1518
- {
1519
- echo '
1520
  <div id="rl_fb_video_width">
1521
- <input type="text" value="'.esc_attr($this->options['configuration']['fancybox']['video_width']).'" name="responsive_lightbox_configuration[fancybox][video_width]" /> <span>px</span>
1522
- <p class="description">'.__('Width of the video.', 'responsive-lightbox').'</p>
1523
  </div>';
1524
- }
1525
 
1526
 
1527
- public function rl_fb_video_height()
1528
- {
1529
- echo '
1530
  <div id="rl_fb_video_height">
1531
- <input type="text" value="'.esc_attr($this->options['configuration']['fancybox']['video_height']).'" name="responsive_lightbox_configuration[fancybox][video_height]" /> <span>px</span>
1532
- <p class="description">'.__('Height of the video.', 'responsive-lightbox').'</p>
1533
  </div>';
1534
- }
1535
 
1536
 
1537
- public function rl_nv_effect()
1538
- {
1539
- echo '
1540
  <div id="rl_nv_effect" class="wplikebtns">';
1541
 
1542
- foreach($this->scripts['nivo']['effects'] as $val => $trans)
1543
- {
1544
- echo '
1545
- <input id="rl-nv-effect-'.$val.'" type="radio" name="responsive_lightbox_configuration[nivo][effect]" value="'.esc_attr($val).'" '.checked($val, $this->options['configuration']['nivo']['effect'], FALSE).' />
1546
- <label for="rl-nv-effect-'.$val.'">'.$trans.'</label>';
1547
- }
1548
 
1549
- echo '
1550
- <p class="description">'.__('The effect to use when showing the lightbox.', 'responsive-lightbox').'</p>
1551
  </div>';
1552
- }
1553
 
1554
 
1555
- public function rl_nv_keyboard_nav()
1556
- {
1557
- echo '
1558
  <div id="rl_nv_keyboard_nav" class="wplikebtns">';
1559
 
1560
- foreach($this->choices as $val => $trans)
1561
- {
1562
- echo '
1563
- <input id="rl-nv-keyboard-nav-'.$val.'" type="radio" name="responsive_lightbox_configuration[nivo][keyboard_nav]" value="'.esc_attr($val).'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['nivo']['keyboard_nav'], FALSE).' />
1564
- <label for="rl-nv-keyboard-nav-'.$val.'">'.$trans.'</label>';
1565
- }
1566
 
1567
- echo '
1568
- <p class="description">'.__('Enable/Disable keyboard navigation (left/right/escape).', 'responsive-lightbox').'</p>
1569
  </div>';
1570
- }
1571
 
1572
 
1573
- public function rl_nv_click_overlay_to_close()
1574
- {
1575
- echo '
1576
  <div id="rl_nv_click_overlay_to_close" class="wplikebtns">';
1577
 
1578
- foreach($this->choices as $val => $trans)
1579
- {
1580
- echo '
1581
- <input id="rl-nv-click-overlay-to-close-'.$val.'" type="radio" name="responsive_lightbox_configuration[nivo][click_overlay_to_close]" value="'.esc_attr($val).'" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['nivo']['click_overlay_to_close'], FALSE).' />
1582
- <label for="rl-nv-click-overlay-to-close-'.$val.'">'.$trans.'</label>';
1583
- }
1584
 
1585
- echo '
1586
- <p class="description">'.__('Eneble to close lightbox on overlay click.', 'responsive-lightbox').'</p>
1587
  </div>';
1588
- }
1589
 
1590
 
1591
- public function rl_nv_error_message()
1592
- {
1593
- echo '
1594
  <div id="rl_nv_error_message">
1595
- <input type="text" class="large-text" value="'.esc_attr($this->options['configuration']['nivo']['error_message']).'" name="responsive_lightbox_configuration[nivo][error_message]" />
1596
- <p class="description">'.__('Error message if the content cannot be loaded.', 'responsive-lightbox').'</p>
1597
  </div>';
1598
- }
1599
 
1600
 
1601
- public function rl_il_animation_speed()
1602
- {
1603
- echo '
1604
  <div id="rl_il_animation_speed">
1605
- <input type="text" value="'.esc_attr($this->options['configuration']['imagelightbox']['animation_speed']).'" name="responsive_lightbox_configuration[imagelightbox][animation_speed]" /> <span>ms</span>
1606
- <p class="description">'.__('Animation speed.', 'responsive-lightbox').'</p>
1607
  </div>';
1608
- }
1609
 
1610
 
1611
- public function rl_il_preload_next()
1612
- {
1613
- echo '
1614
  <div id="rl_il_preload_next" class="wplikebtns">';
1615
 
1616
- foreach($this->choices as $val => $trans)
1617
- {
1618
- echo '
1619
- <input id="rl-il-preload-next-'.$val.'" type="radio" name="responsive_lightbox_configuration[imagelightbox][preload_next]" value="'.esc_attr($val).'" '.checked(($val === 'yes' ? true : false), $this->options['configuration']['imagelightbox']['preload_next'], false).' />
1620
- <label for="rl-il-preload-next-'.$val.'">'.$trans.'</label>';
1621
- }
1622
 
1623
- echo '
1624
- <p class="description">'.__('Silently preload the next image.', 'responsive-lightbox').'</p>
1625
  </div>';
1626
- }
1627
 
1628
 
1629
- public function rl_il_enable_keyboard()
1630
- {
1631
- echo '
1632
  <div id="rl_il_enable_keyboard" class="wplikebtns">';
1633
 
1634
- foreach($this->choices as $val => $trans)
1635
- {
1636
- echo '
1637
- <input id="rl-il-enable-keyboard-'.$val.'" type="radio" name="responsive_lightbox_configuration[imagelightbox][enable_keyboard]" value="'.esc_attr($val).'" '.checked(($val === 'yes' ? true : false), $this->options['configuration']['imagelightbox']['enable_keyboard'], false).' />
1638
- <label for="rl-il-enable-keyboard-'.$val.'">'.$trans.'</label>';
1639
- }
1640
 
1641
- echo '
1642
- <p class="description">'.__('Enable keyboard shortcuts (arrows Left/Right and Esc).', 'responsive-lightbox').'</p>
1643
  </div>';
1644
- }
1645
 
1646
 
1647
- public function rl_il_quit_on_end()
1648
- {
1649
- echo '
1650
  <div id="rl_il_quit_on_end" class="wplikebtns">';
1651
 
1652
- foreach($this->choices as $val => $trans)
1653
- {
1654
- echo '
1655
- <input id="rl-il-quit-on-end-'.$val.'" type="radio" name="responsive_lightbox_configuration[imagelightbox][quit_on_end]" value="'.esc_attr($val).'" '.checked(($val === 'yes' ? true : false), $this->options['configuration']['imagelightbox']['quit_on_end'], false).' />
1656
- <label for="rl-il-quit-on-end-'.$val.'">'.$trans.'</label>';
1657
- }
1658
 
1659
- echo '
1660
- <p class="description">'.__('Quit after viewing the last image.', 'responsive-lightbox').'</p>
1661
  </div>';
1662
- }
1663
 
1664
 
1665
- public function rl_il_quit_on_image_click()
1666
- {
1667
- echo '
1668
  <div id="rl_il_quit_on_image_click" class="wplikebtns">';
1669
 
1670
- foreach($this->choices as $val => $trans)
1671
- {
1672
- echo '
1673
- <input id="rl-il-quit-on-image-click-'.$val.'" type="radio" name="responsive_lightbox_configuration[imagelightbox][quit_on_image_click]" value="'.esc_attr($val).'" '.checked(($val === 'yes' ? true : false), $this->options['configuration']['imagelightbox']['quit_on_image_click'], false).' />
1674
- <label for="rl-il-quit-on-image-click-'.$val.'">'.$trans.'</label>';
1675
- }
1676
 
1677
- echo '
1678
- <p class="description">'.__('Quit when the viewed image is clicked.', 'responsive-lightbox').'</p>
1679
  </div>';
1680
- }
1681
 
1682
 
1683
- public function rl_il_quit_on_document_click()
1684
- {
1685
- echo '
1686
  <div id="rl_il_quit_on_document_click" class="wplikebtns">';
1687
 
1688
- foreach($this->choices as $val => $trans)
1689
- {
1690
- echo '
1691
- <input id="rl-il-quit-on-document-click-'.$val.'" type="radio" name="responsive_lightbox_configuration[imagelightbox][quit_on_document_click]" value="'.esc_attr($val).'" '.checked(($val === 'yes' ? true : false), $this->options['configuration']['imagelightbox']['quit_on_document_click'], false).' />
1692
- <label for="rl-il-quit-on-document-click-'.$val.'">'.$trans.'</label>';
1693
- }
1694
 
1695
- echo '
1696
- <p class="description">'.__('Quit when anything but the viewed image is clicked.', 'responsive-lightbox').'</p>
1697
  </div>';
1698
- }
1699
 
1700
 
1701
- /**
1702
- * Validates settings
1703
- */
1704
- public function validate_options($input)
1705
- {
1706
- if(isset($_POST['save_rl_settings']))
1707
- {
1708
- // script
1709
- $input['script'] = (isset($input['script'], $this->scripts[$input['script']]) ? $input['script'] : $this->defaults['settings']['script']);
1710
 
1711
- // selector
1712
- $input['selector'] = sanitize_text_field(isset($input['selector']) && $input['selector'] !== '' ? $input['selector'] : $this->defaults['settings']['selector']);
1713
 
1714
- // loading place
1715
- $input['loading_place'] = (isset($input['loading_place'], $this->loading_places[$input['loading_place']]) ? $input['loading_place'] : $this->defaults['settings']['loading_place']);
1716
 
1717
- // enable custom events
1718
- $input['enable_custom_events'] = (isset($input['enable_custom_events'], $this->choices[$input['enable_custom_events']]) ? ($input['enable_custom_events'] === 'yes' ? true : false) : $this->defaults['settings']['enable_custom_events']);
1719
 
1720
- // custom events
1721
- if($input['enable_custom_events'] === true)
1722
- {
1723
- $input['custom_events'] = sanitize_text_field(isset($input['custom_events']) && $input['custom_events'] !== '' ? $input['custom_events'] : $this->defaults['settings']['custom_events']);
1724
- }
1725
-
1726
- // enable gallery image size
1727
- $input['enable_gallery_image_size'] = (isset($input['enable_gallery_image_size'], $this->choices[$input['enable_gallery_image_size']]) ? ($input['enable_gallery_image_size'] === 'yes' ? true : false) : $this->defaults['settings']['enable_gallery_image_size']);
1728
-
1729
- // gallery image size
1730
- if($input['enable_gallery_image_size'] === true)
1731
- {
1732
- $input['gallery_image_size'] = esc_attr(isset($input['gallery_image_size']) && $input['gallery_image_size'] !== '' ? $input['gallery_image_size'] : $this->defaults['settings']['gallery_image_size']);
1733
- }
1734
-
1735
- // checkboxes
1736
- $input['galleries'] = (isset($input['galleries'], $this->choices[$input['galleries']]) ? ($input['galleries'] === 'yes' ? true : false) : $this->defaults['settings']['galleries']);
1737
- $input['videos'] = (isset($input['videos'], $this->choices[$input['videos']]) ? ($input['videos'] === 'yes' ? true : false) : $this->defaults['settings']['videos']);
1738
- $input['image_links'] = (isset($input['image_links'], $this->choices[$input['image_links']]) ? ($input['image_links'] === 'yes' ? true : false) : $this->defaults['settings']['image_links']);
1739
- $input['images_as_gallery'] = (isset($input['images_as_gallery'], $this->choices[$input['images_as_gallery']]) ? ($input['images_as_gallery'] === 'yes' ? true : false) : $this->defaults['settings']['images_as_gallery']);
1740
- $input['deactivation_delete'] = (isset($input['deactivation_delete'], $this->choices[$input['deactivation_delete']]) ? ($input['deactivation_delete'] === 'yes' ? true : false) : $this->defaults['settings']['deactivation_delete']);
1741
- }
1742
- elseif(isset($_POST['save_rl_configuration']))
1743
- {
1744
- if($this->options['settings']['script'] === 'swipebox' && $_POST['script_r'] === 'swipebox')
1745
- {
1746
- //animation
1747
- $input['swipebox']['animation'] = (isset($input['swipebox']['animation']) && in_array($input['swipebox']['animation'], array_keys($this->scripts['swipebox']['animations'])) ? $input['swipebox']['animation'] : $this->defaults['configuration']['swipebox']['animation']);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1748
 
1749
- //force png icons
1750
- $input['swipebox']['force_png_icons'] = (isset($input['swipebox']['force_png_icons']) && in_array($input['swipebox']['force_png_icons'], array_keys($this->choices)) ? ($input['swipebox']['force_png_icons'] === 'yes' ? TRUE : FALSE) : $this->defaults['configuration']['swipebox']['force_png_icons']);
1751
 
1752
- //bars
1753
- $input['swipebox']['hide_bars'] = (isset($input['swipebox']['hide_bars']) && in_array($input['swipebox']['hide_bars'], array_keys($this->choices)) ? ($input['swipebox']['hide_bars'] === 'yes' ? TRUE : FALSE) : $this->defaults['configuration']['swipebox']['hide_bars']);
1754
- $input['swipebox']['hide_bars_delay'] = (int)($input['swipebox']['hide_bars_delay'] > 0 ? $input['swipebox']['hide_bars_delay'] : $this->defaults['configuration']['swipebox']['hide_bars_delay']);
1755
 
1756
- //video width
1757
- $input['swipebox']['video_max_width'] = (int)($input['swipebox']['video_max_width'] > 0 ? $input['swipebox']['video_max_width'] : $this->defaults['configuration']['swipebox']['video_max_width']);
1758
- }
1759
- elseif($this->options['settings']['script'] === 'prettyphoto' && $_POST['script_r'] === 'prettyphoto')
1760
- {
1761
- //animation speed
1762
- $input['prettyphoto']['animation_speed'] = (isset($input['prettyphoto']['animation_speed']) && in_array($input['prettyphoto']['animation_speed'], array_keys($this->scripts['prettyphoto']['animation_speeds'])) ? $input['prettyphoto']['animation_speed'] : $this->defaults['configuration']['prettyphoto']['animation_speed']);
1763
 
1764
- //slideshows
1765
- $input['prettyphoto']['slideshow'] = (isset($input['prettyphoto']['slideshow']) && in_array($input['prettyphoto']['slideshow'], array_keys($this->choices)) ? ($input['prettyphoto']['slideshow'] === 'yes' ? TRUE : FALSE) : $this->defaults['configuration']['prettyphoto']['slideshow']);
1766
- $input['prettyphoto']['slideshow_delay'] = (int)($input['prettyphoto']['slideshow_delay'] > 0 ? $input['prettyphoto']['slideshow_delay'] : $this->defaults['configuration']['prettyphoto']['slideshow_delay']);
1767
- $input['prettyphoto']['slideshow_autoplay'] = (isset($input['prettyphoto']['slideshow_autoplay']) && in_array($input['prettyphoto']['slideshow_autoplay'], array_keys($this->choices)) ? ($input['prettyphoto']['slideshow_autoplay'] === 'yes' ? TRUE : FALSE) : $this->defaults['configuration']['prettyphoto']['slideshow_autoplay']);
1768
 
1769
- //opacity
1770
- $input['prettyphoto']['opacity'] = (int)$input['prettyphoto']['opacity'];
1771
 
1772
- if($input['prettyphoto']['opacity'] < 0 || $input['prettyphoto']['opacity'] > 100)
1773
- $input['prettyphoto']['opacity'] = $this->defaults['configuration']['prettyphoto']['opacity'];
1774
 
1775
- //title
1776
- $input['prettyphoto']['show_title'] = (isset($input['prettyphoto']['show_title']) && in_array($input['prettyphoto']['show_title'], array_keys($this->choices)) ? ($input['prettyphoto']['show_title'] === 'yes' ? TRUE : FALSE) : $this->defaults['configuration']['prettyphoto']['show_title']);
1777
 
1778
- //resize
1779
- $input['prettyphoto']['allow_resize'] = (isset($input['prettyphoto']['allow_resize']) && in_array($input['prettyphoto']['allow_resize'], array_keys($this->choices)) ? ($input['prettyphoto']['allow_resize'] === 'yes' ? TRUE : FALSE) : $this->defaults['configuration']['prettyphoto']['allow_resize']);
1780
 
1781
- //expand
1782
- $input['prettyphoto']['allow_expand'] = (isset($input['prettyphoto']['allow_expand']) && in_array($input['prettyphoto']['allow_expand'], array_keys($this->choices)) ? ($input['prettyphoto']['allow_expand'] === 'yes' ? TRUE : FALSE) : $this->defaults['configuration']['prettyphoto']['allow_expand']);
1783
 
1784
- //dimensions
1785
- $input['prettyphoto']['width'] = (int)($input['prettyphoto']['width'] > 0 ? $input['prettyphoto']['width'] : $this->defaults['configuration']['prettyphoto']['width']);
1786
- $input['prettyphoto']['height'] = (int)($input['prettyphoto']['height'] > 0 ? $input['prettyphoto']['height'] : $this->defaults['configuration']['prettyphoto']['height']);
1787
 
1788
- //separator
1789
- $input['prettyphoto']['separator'] = sanitize_text_field(isset($input['prettyphoto']['separator']) && $input['prettyphoto']['separator'] !== '' ? $input['prettyphoto']['separator'] : $this->defaults['configuration']['prettyphoto']['separator']);
1790
 
1791
- //theme
1792
- $input['prettyphoto']['theme'] = (isset($input['prettyphoto']['theme']) && in_array($input['prettyphoto']['theme'], array_keys($this->scripts['prettyphoto']['themes'])) ? $input['prettyphoto']['theme'] : $this->defaults['configuration']['prettyphoto']['theme']);
1793
 
1794
- //padding
1795
- $input['prettyphoto']['horizontal_padding'] = (int)($input['prettyphoto']['horizontal_padding'] > 0 ? $input['prettyphoto']['horizontal_padding'] : $this->defaults['configuration']['prettyphoto']['horizontal_padding']);
1796
 
1797
- //flash
1798
- $input['prettyphoto']['hide_flash'] = (isset($input['prettyphoto']['hide_flash']) && in_array($input['prettyphoto']['hide_flash'], array_keys($this->choices)) ? ($input['prettyphoto']['hide_flash'] === 'yes' ? TRUE : FALSE) : $this->defaults['configuration']['prettyphoto']['hide_flash']);
1799
- $input['prettyphoto']['wmode'] = (isset($input['prettyphoto']['wmode']) && in_array($input['prettyphoto']['wmode'], array_keys($this->scripts['prettyphoto']['wmodes'])) ? $input['prettyphoto']['wmode'] : $this->defaults['configuration']['prettyphoto']['wmode']);
1800
 
1801
- //video autoplay
1802
- $input['prettyphoto']['video_autoplay'] = (isset($input['prettyphoto']['video_autoplay']) && in_array($input['prettyphoto']['video_autoplay'], array_keys($this->choices)) ? ($input['prettyphoto']['video_autoplay'] === 'yes' ? TRUE : FALSE) : $this->defaults['configuration']['prettyphoto']['video_autoplay']);
1803
 
1804
- //modal
1805
- $input['prettyphoto']['modal'] = (isset($input['prettyphoto']['modal']) && in_array($input['prettyphoto']['modal'], array_keys($this->choices)) ? ($input['prettyphoto']['modal'] === 'yes' ? TRUE : FALSE) : $this->defaults['configuration']['prettyphoto']['modal']);
1806
 
1807
- //deeplinking
1808
- $input['prettyphoto']['deeplinking'] = (isset($input['prettyphoto']['deeplinking']) && in_array($input['prettyphoto']['deeplinking'], array_keys($this->choices)) ? ($input['prettyphoto']['deeplinking'] === 'yes' ? TRUE : FALSE) : $this->defaults['configuration']['prettyphoto']['deeplinking']);
1809
 
1810
- //overlay gallery
1811
- $input['prettyphoto']['overlay_gallery'] = (isset($input['prettyphoto']['overlay_gallery']) && in_array($input['prettyphoto']['overlay_gallery'], array_keys($this->choices)) ? ($input['prettyphoto']['overlay_gallery'] === 'yes' ? TRUE : FALSE) : $this->defaults['configuration']['prettyphoto']['overlay_gallery']);
1812
 
1813
- //keyboard shortcuts
1814
- $input['prettyphoto']['keyboard_shortcuts'] = (isset($input['prettyphoto']['keyboard_shortcuts']) && in_array($input['prettyphoto']['keyboard_shortcuts'], array_keys($this->choices)) ? ($input['prettyphoto']['keyboard_shortcuts'] === 'yes' ? TRUE : FALSE) : $this->defaults['configuration']['prettyphoto']['keyboard_shortcuts']);
1815
 
1816
- //social
1817
- $input['prettyphoto']['social'] = (isset($input['prettyphoto']['social']) && in_array($input['prettyphoto']['social'], array_keys($this->choices)) ? ($input['prettyphoto']['social'] === 'yes' ? TRUE : FALSE) : $this->defaults['configuration']['prettyphoto']['social']);
1818
- }
1819
- elseif($this->options['settings']['script'] === 'fancybox' && $_POST['script_r'] === 'fancybox')
1820
- {
1821
- //modal
1822
- $input['fancybox']['modal'] = (isset($input['fancybox']['modal']) && in_array($input['fancybox']['modal'], array_keys($this->choices)) ? ($input['fancybox']['modal'] === 'yes' ? TRUE : FALSE) : $this->defaults['configuration']['fancybox']['modal']);
1823
 
1824
- //show overlay
1825
- $input['fancybox']['show_overlay'] = (isset($input['fancybox']['show_overlay']) && in_array($input['fancybox']['show_overlay'], array_keys($this->choices)) ? ($input['fancybox']['show_overlay'] === 'yes' ? TRUE : FALSE) : $this->defaults['configuration']['fancybox']['show_overlay']);
1826
 
1827
- //show close button
1828
- $input['fancybox']['show_close_button'] = (isset($input['fancybox']['show_close_button']) && in_array($input['fancybox']['show_close_button'], array_keys($this->choices)) ? ($input['fancybox']['show_close_button'] === 'yes' ? TRUE : FALSE) : $this->defaults['configuration']['fancybox']['show_close_button']);
1829
 
1830
- //enable escape button
1831
- $input['fancybox']['enable_escape_button'] = (isset($input['fancybox']['enable_escape_button']) && in_array($input['fancybox']['enable_escape_button'], array_keys($this->choices)) ? ($input['fancybox']['enable_escape_button'] === 'yes' ? TRUE : FALSE) : $this->defaults['configuration']['fancybox']['enable_escape_button']);
1832
 
1833
- //hide on overlay click
1834
- $input['fancybox']['hide_on_overlay_click'] = (isset($input['fancybox']['hide_on_overlay_click']) && in_array($input['fancybox']['hide_on_overlay_click'], array_keys($this->choices)) ? ($input['fancybox']['hide_on_overlay_click'] === 'yes' ? TRUE : FALSE) : $this->defaults['configuration']['fancybox']['hide_on_overlay_click']);
1835
 
1836
- //hide on content click
1837
- $input['fancybox']['hide_on_content_click'] = (isset($input['fancybox']['hide_on_content_click']) && in_array($input['fancybox']['hide_on_content_click'], array_keys($this->choices)) ? ($input['fancybox']['hide_on_content_click'] === 'yes' ? TRUE : FALSE) : $this->defaults['configuration']['fancybox']['hide_on_content_click']);
1838
 
1839
- //cyclic
1840
- $input['fancybox']['cyclic'] = (isset($input['fancybox']['cyclic']) && in_array($input['fancybox']['cyclic'], array_keys($this->choices)) ? ($input['fancybox']['cyclic'] === 'yes' ? TRUE : FALSE) : $this->defaults['configuration']['fancybox']['cyclic']);
1841
 
1842
- //show nav arrows
1843
- $input['fancybox']['show_nav_arrows'] = (isset($input['fancybox']['show_nav_arrows']) && in_array($input['fancybox']['show_nav_arrows'], array_keys($this->choices)) ? ($input['fancybox']['show_nav_arrows'] === 'yes' ? TRUE : FALSE) : $this->defaults['configuration']['fancybox']['show_nav_arrows']);
1844
 
1845
- //auto scale
1846
- $input['fancybox']['auto_scale'] = (isset($input['fancybox']['auto_scale']) && in_array($input['fancybox']['auto_scale'], array_keys($this->choices)) ? ($input['fancybox']['auto_scale'] === 'yes' ? TRUE : FALSE) : $this->defaults['configuration']['fancybox']['auto_scale']);
 
 
 
1847
 
1848
- //scrolling
1849
- $input['fancybox']['scrolling'] = (isset($input['fancybox']['scrolling']) && in_array($input['fancybox']['scrolling'], array_keys($this->scripts['fancybox']['scrollings'])) ? $input['fancybox']['scrolling'] : $this->defaults['configuration']['fancybox']['scrolling']);
1850
 
1851
- //center on scroll
1852
- $input['fancybox']['center_on_scroll'] = (isset($input['fancybox']['center_on_scroll']) && in_array($input['fancybox']['center_on_scroll'], array_keys($this->choices)) ? ($input['fancybox']['center_on_scroll'] === 'yes' ? TRUE : FALSE) : $this->defaults['configuration']['fancybox']['center_on_scroll']);
1853
 
1854
- //opacity
1855
- $input['fancybox']['opacity'] = (isset($input['fancybox']['opacity']) && in_array($input['fancybox']['opacity'], array_keys($this->choices)) ? ($input['fancybox']['opacity'] === 'yes' ? TRUE : FALSE) : $this->defaults['configuration']['fancybox']['opacity']);
 
 
 
1856
 
1857
- //title_show
1858
- $input['fancybox']['title_show'] = (isset($input['fancybox']['title_show']) && in_array($input['fancybox']['title_show'], array_keys($this->choices)) ? ($input['fancybox']['title_show'] === 'yes' ? TRUE : FALSE) : $this->defaults['configuration']['fancybox']['title_show']);
1859
 
1860
- //overlay opacity
1861
- $input['fancybox']['overlay_opacity'] = (int)$input['fancybox']['overlay_opacity'];
1862
 
1863
- if($input['fancybox']['overlay_opacity'] < 0 || $input['fancybox']['overlay_opacity'] > 100)
1864
- $input['fancybox']['overlay_opacity'] = $this->defaults['configuration']['fancybox']['overlay_opacity'];
1865
 
1866
- //overlay color
1867
- $input['fancybox']['overlay_color'] = sanitize_text_field($input['fancybox']['overlay_color']);
1868
 
1869
- //title position
1870
- $input['fancybox']['title_position'] = (isset($input['fancybox']['title_position']) && in_array($input['fancybox']['title_position'], array_keys($this->scripts['fancybox']['positions'])) ? $input['fancybox']['title_position'] : $this->defaults['configuration']['fancybox']['title_position']);
 
 
 
1871
 
1872
- //transitions
1873
- $input['fancybox']['transitions'] = (isset($input['fancybox']['transitions']) && in_array($input['fancybox']['transitions'], array_keys($this->scripts['fancybox']['transitions'])) ? $input['fancybox']['transitions'] : $this->defaults['configuration']['fancybox']['transitions']);
1874
 
1875
- //easings
1876
- $input['fancybox']['easings'] = (isset($input['fancybox']['easings']) && in_array($input['fancybox']['easings'], array_keys($this->scripts['fancybox']['easings'])) ? $input['fancybox']['easings'] : $this->defaults['configuration']['fancybox']['easings']);
 
 
1877
 
1878
- //speeds
1879
- $input['fancybox']['speeds'] = (int)($input['fancybox']['speeds'] > 0 ? $input['fancybox']['speeds'] : $this->defaults['configuration']['fancybox']['speeds']);
 
 
1880
 
1881
- //change speed
1882
- $input['fancybox']['change_speed'] = (int)($input['fancybox']['change_speed'] > 0 ? $input['fancybox']['change_speed'] : $this->defaults['configuration']['fancybox']['change_speed']);
 
1883
 
1884
- //change fade
1885
- $input['fancybox']['change_fade'] = (int)($input['fancybox']['change_fade'] > 0 ? $input['fancybox']['change_fade'] : $this->defaults['configuration']['fancybox']['change_fade']);
1886
-
1887
- //padding
1888
- $input['fancybox']['padding'] = (int)($input['fancybox']['padding'] > 0 ? $input['fancybox']['padding'] : $this->defaults['configuration']['fancybox']['padding']);
1889
 
1890
- //margin
1891
- $input['fancybox']['margin'] = (int)($input['fancybox']['margin'] > 0 ? $input['fancybox']['margin'] : $this->defaults['configuration']['fancybox']['margin']);
 
1892
 
1893
- //video width
1894
- $input['fancybox']['video_width'] = (int)($input['fancybox']['video_width'] > 0 ? $input['fancybox']['video_width'] : $this->defaults['configuration']['fancybox']['video_width']);
 
 
1895
 
1896
- //video height
1897
- $input['fancybox']['video_height'] = (int)($input['fancybox']['video_height'] > 0 ? $input['fancybox']['video_height'] : $this->defaults['configuration']['fancybox']['video_height']);
1898
- }
1899
- elseif($this->options['settings']['script'] === 'nivo' && $_POST['script_r'] === 'nivo')
1900
- {
1901
- //effect
1902
- $input['nivo']['effect'] = (isset($input['nivo']['effect']) && in_array($input['nivo']['effect'], array_keys($this->scripts['nivo']['effects'])) ? $input['nivo']['effect'] : $this->defaults['configuration']['nivo']['effect']);
1903
 
1904
- //keyboard navigation
1905
- $input['nivo']['keyboard_nav'] = (isset($input['nivo']['keyboard_nav']) && in_array($input['nivo']['keyboard_nav'], array_keys($this->choices)) ? ($input['nivo']['keyboard_nav'] === 'yes' ? TRUE : FALSE) : $this->defaults['configuration']['nivo']['keyboard_nav']);
1906
 
1907
- // keyboard navigation
1908
- $input['nivo']['click_overlay_to_close'] = (isset($input['nivo']['click_overlay_to_close']) && in_array($input['nivo']['click_overlay_to_close'], array_keys($this->choices)) ? ($input['nivo']['click_overlay_to_close'] === 'yes' ? true : false) : $this->defaults['configuration']['nivo']['click_overlay_to_close']);
1909
 
1910
- //error message
1911
- $input['nivo']['error_message'] = sanitize_text_field($input['nivo']['error_message']);
1912
- }
1913
- elseif($this->options['settings']['script'] === 'imagelightbox' && $_POST['script_r'] === 'imagelightbox')
1914
- {
1915
- // animation speed
1916
- $input['imagelightbox']['animation_speed'] = (int)$input['imagelightbox']['animation_speed'];
1917
-
1918
- // preload next image
1919
- $input['imagelightbox']['preload_next'] = (isset($input['imagelightbox']['preload_next'], $this->choices[$input['imagelightbox']['preload_next']]) ? ($input['imagelightbox']['preload_next'] === 'yes' ? true : false) : $this->defaults['configuration']['imagelightbox']['preload_next']);
1920
-
1921
- // enable keyboard keys
1922
- $input['imagelightbox']['enable_keyboard'] = (isset($input['imagelightbox']['enable_keyboard'], $this->choices[$input['imagelightbox']['enable_keyboard']]) ? ($input['imagelightbox']['enable_keyboard'] === 'yes' ? true : false) : $this->defaults['configuration']['imagelightbox']['enable_keyboard']);
1923
 
1924
- // quit on last image
1925
- $input['imagelightbox']['quit_on_end'] = (isset($input['imagelightbox']['quit_on_end'], $this->choices[$input['imagelightbox']['quit_on_end']]) ? ($input['imagelightbox']['quit_on_end'] === 'yes' ? true : false) : $this->defaults['configuration']['imagelightbox']['quit_on_end']);
1926
 
1927
- // quit on image click
1928
- $input['imagelightbox']['quit_on_image_click'] = (isset($input['imagelightbox']['quit_on_image_click'], $this->choices[$input['imagelightbox']['quit_on_image_click']]) ? ($input['imagelightbox']['quit_on_image_click'] === 'yes' ? true : false) : $this->defaults['configuration']['imagelightbox']['quit_on_image_click']);
 
1929
 
1930
- // quit on document click
1931
- $input['imagelightbox']['quit_on_document_click'] = (isset($input['imagelightbox']['quit_on_document_click'], $this->choices[$input['imagelightbox']['quit_on_document_click']]) ? ($input['imagelightbox']['quit_on_document_click'] === 'yes' ? true : false) : $this->defaults['configuration']['imagelightbox']['quit_on_document_click']);
1932
- }
1933
- else
1934
- {
1935
- //clear input to not change settings
1936
- $input = array();
1937
-
1938
- add_settings_error('save_script_settings', 'invalid_script_page', __('Changes were not saved because there was attempt to save settings of inactive script. The site has been reloaded to the proper script settings.', 'responsive-lightbox'), 'error');
1939
- }
1940
-
1941
- //we have to merge rest of the scripts settings
1942
- $input = array_merge($this->options['configuration'], $input);
1943
- }
1944
- elseif(isset($_POST['reset_rl_settings']))
1945
- {
1946
- $input = $this->defaults['settings'];
1947
-
1948
- add_settings_error('reset_general_settings', 'general_reset', __('Settings restored to defaults.', 'responsive-lightbox'), 'updated');
1949
- }
1950
- elseif(isset($_POST['reset_rl_configuration']))
1951
- {
1952
- if($this->options['settings']['script'] === 'swipebox' && $_POST['script_r'] === 'swipebox')
1953
- {
1954
- $input['swipebox'] = $this->defaults['configuration']['swipebox'];
1955
-
1956
- add_settings_error('reset_swipebox_settings', 'swipebox_reset', __('Settings of SwipeBox script were restored to defaults.', 'responsive-lightbox'), 'updated');
1957
- }
1958
- elseif($this->options['settings']['script'] === 'prettyphoto' && $_POST['script_r'] === 'prettyphoto')
1959
- {
1960
- $input['prettyphoto'] = $this->defaults['configuration']['prettyphoto'];
1961
-
1962
- add_settings_error('reset_prettyphoto_settings', 'prettyphoto_reset', __('Settings of prettyPhoto script were restored to defaults.', 'responsive-lightbox'), 'updated');
1963
- }
1964
- elseif($this->options['settings']['script'] === 'fancybox' && $_POST['script_r'] === 'fancybox')
1965
- {
1966
- $input['fancybox'] = $this->defaults['configuration']['fancybox'];
1967
-
1968
- add_settings_error('reset_fancybox_settings', 'fancybox_reset', __('Settings of FancyBox script were restored to defaults.', 'responsive-lightbox'), 'updated');
1969
- }
1970
- elseif($this->options['settings']['script'] === 'nivo' && $_POST['script_r'] === 'nivo')
1971
- {
1972
- $input['nivo'] = $this->defaults['configuration']['nivo'];
1973
-
1974
- add_settings_error('reset_nivo_settings', 'nivo_reset', __('Settings of Nivo script were restored to defaults.', 'responsive-lightbox'), 'updated');
1975
- }
1976
- else
1977
- {
1978
- add_settings_error('reset_script_settings', 'reset_invalid_script_page', __('Changes were not set to defaults because there was attempt to reset settings of inactive script. The site has been reloaded to the proper script settings.', 'responsive-lightbox'), 'error');
1979
- }
1980
-
1981
- //we have to merge rest of the scripts settings
1982
- $input = array_merge($this->options['configuration'], $input);
1983
- }
1984
-
1985
- return $input;
1986
- }
1987
-
1988
-
1989
- public function admin_menu_options()
1990
- {
1991
- add_options_page(
1992
- __('Responsive Lightbox', 'responsive-lightbox'),
1993
- __('Responsive Lightbox', 'responsive-lightbox'),
1994
- 'manage_options',
1995
- 'responsive-lightbox',
1996
- array(&$this, 'options_page')
1997
- );
1998
- }
1999
-
2000
-
2001
- public function options_page()
2002
- {
2003
- $tab_key = (isset($_GET['tab']) ? $_GET['tab'] : 'general-settings');
2004
-
2005
- echo '
2006
- <div class="wrap">'.screen_icon().'
2007
- <h2>'.__('Responsive Lightbox', 'responsive-lightbox').'</h2>
2008
  <h2 class="nav-tab-wrapper">';
2009
 
2010
- foreach($this->tabs as $key => $name)
2011
- {
2012
- echo '
2013
- <a class="nav-tab '.($tab_key == $key ? 'nav-tab-active' : '').'" href="'.esc_url(admin_url('options-general.php?page=responsive-lightbox&tab='.$key)).'">'.$name['name'].'</a>';
2014
- }
2015
 
2016
- echo '
2017
  </h2>
2018
  <div class="responsive-lightbox-settings">
2019
 
2020
  <div class="df-credits">
2021
- <h3 class="hndle">'.__('Responsive Lightbox', 'responsive-lightbox').' '.$this->defaults['version'].'</h3>
2022
  <div class="inside">
2023
- <h4 class="inner">'.__('Need support?', 'responsive-lightbox').'</h4>
2024
- <p class="inner">'.__('If you are having problems with this plugin, please talk about them in the', 'responsive-lightbox').' <a href="http://www.dfactory.eu/support/?utm_source=responsive-lightbox-settings&utm_medium=link&utm_campaign=support" target="_blank" title="'.__('Support forum', 'responsive-lightbox').'">'.__('Support forum', 'responsive-lightbox').'</a></p>
2025
  <hr />
2026
- <h4 class="inner">'.__('Do you like this plugin?', 'responsive-lightbox').'</h4>
2027
- <p class="inner"><a href="http://wordpress.org/support/view/plugin-reviews/responsive-lightbox" target="_blank" title="'.__('Rate it 5', 'responsive-lightbox').'">'.__('Rate it 5', 'responsive-lightbox').'</a> '.__('on WordPress.org', 'responsive-lightbox').'<br />'.
2028
- __('Blog about it & link to the', 'responsive-lightbox').' <a href="http://www.dfactory.eu/plugins/responsive-lightbox/?utm_source=responsive-lightbox-settings&utm_medium=link&utm_campaign=blog-about" target="_blank" title="'.__('plugin page', 'responsive-lightbox').'">'.__('plugin page', 'responsive-lightbox').'</a><br />'.
2029
- __('Check out our other', 'responsive-lightbox').' <a href="http://www.dfactory.eu/?utm_source=responsive-lightbox-settings&utm_medium=link&utm_campaign=other-plugins" target="_blank" title="'.__('WordPress plugins', 'responsive-lightbox').'">'.__('WordPress plugins', 'responsive-lightbox').'</a>
2030
  </p>
2031
  <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank" class="inner">
2032
  <input type="hidden" name="cmd" value="_s-xclick">
@@ -2035,384 +1913,371 @@ class Responsive_Lightbox
2035
  <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
2036
  </form>
2037
  <hr />
2038
- <p class="df-link inner">Created by <a href="http://www.dfactory.eu/?utm_source=responsive-lightbox-settings&utm_medium=link&utm_campaign=created-by" target="_blank" title="dFactory - Quality plugins for WordPress"><img src="'.plugins_url('/images/logo-dfactory.png' , __FILE__ ).'" title="dFactory - Quality plugins for WordPress" alt="dFactory - Quality plugins for WordPress" /></a></p>
2039
  </div>
2040
  </div>
2041
 
2042
  <form action="options.php" method="post">
2043
- <input type="hidden" name="script_r" value="'.esc_attr($this->options['settings']['script']).'" />';
2044
 
2045
- wp_nonce_field('update-options');
2046
- settings_fields($this->tabs[$tab_key]['key']);
2047
- do_settings_sections($this->tabs[$tab_key]['key']);
2048
 
2049
- echo '
2050
  <p class="submit">';
2051
 
2052
- submit_button('', 'primary', $this->tabs[$tab_key]['submit'], FALSE);
2053
 
2054
- echo ' ';
2055
- echo submit_button(__('Reset to defaults', 'responsive-lightbox'), 'secondary', $this->tabs[$tab_key]['reset'], FALSE);
2056
 
2057
- echo '
2058
  </p>
2059
  </form>
2060
  </div>
2061
  <div class="clear"></div>
2062
  </div>';
2063
- }
2064
-
2065
-
2066
- public function admin_scripts_styles($page)
2067
- {
2068
- if($page === 'settings_page_responsive-lightbox')
2069
- {
2070
- wp_register_script(
2071
- 'responsive-lightbox-admin',
2072
- plugins_url('js/admin.js', __FILE__),
2073
- array('jquery', 'jquery-ui-core', 'jquery-ui-button', 'jquery-ui-slider', 'wp-color-picker')
2074
- );
2075
-
2076
- wp_enqueue_script('responsive-lightbox-admin');
2077
-
2078
- wp_localize_script(
2079
- 'responsive-lightbox-admin',
2080
- 'rlArgs',
2081
- array(
2082
- 'resetSettingsToDefaults' => __('Are you sure you want to reset these settings to defaults?', 'responsive-lightbox'),
2083
- 'resetScriptToDefaults' => __('Are you sure you want to reset scripts settings to defaults?', 'responsive-lightbox'),
2084
- 'opacity_pp' => $this->options['configuration']['prettyphoto']['opacity'],
2085
- 'opacity_fb' => $this->options['configuration']['fancybox']['overlay_opacity']
2086
- )
2087
- );
2088
-
2089
- wp_enqueue_style('wp-color-picker');
2090
-
2091
- wp_register_style(
2092
- 'responsive-lightbox-admin',
2093
- plugins_url('css/admin.css', __FILE__)
2094
- );
2095
-
2096
- wp_enqueue_style('responsive-lightbox-admin');
2097
-
2098
- wp_register_style(
2099
- 'responsive-lightbox-wplike',
2100
- plugins_url('css/wp-like-ui-theme.css', __FILE__)
2101
- );
2102
-
2103
- wp_enqueue_style('responsive-lightbox-wplike');
2104
- }
2105
- }
2106
-
2107
-
2108
- public function front_scripts_styles()
2109
- {
2110
- $args = apply_filters('rl_lightbox_args', array(
2111
- 'script' => $this->options['settings']['script'],
2112
- 'selector' => $this->options['settings']['selector'],
2113
- 'custom_events' => ($this->options['settings']['enable_custom_events'] === TRUE ? ' '.$this->options['settings']['custom_events'] : ''),
2114
- 'activeGalleries' => $this->get_boolean_value($this->options['settings']['galleries'])
2115
- ));
2116
-
2117
- if($args['script'] === 'prettyphoto')
2118
- {
2119
- wp_register_script(
2120
- 'responsive-lightbox-prettyphoto',
2121
- plugins_url('assets/prettyphoto/js/jquery.prettyPhoto.js', __FILE__),
2122
- array('jquery'),
2123
- '',
2124
- ($this->options['settings']['loading_place'] === 'header' ? false : true)
2125
- );
2126
-
2127
- wp_enqueue_script('responsive-lightbox-prettyphoto');
2128
-
2129
- wp_register_style(
2130
- 'responsive-lightbox-prettyphoto-front',
2131
- plugins_url('assets/prettyphoto/css/prettyPhoto.css', __FILE__)
2132
- );
2133
-
2134
- wp_enqueue_style('responsive-lightbox-prettyphoto-front');
2135
-
2136
- $args = array_merge(
2137
- $args,
2138
- array(
2139
- 'animationSpeed' => $this->options['configuration']['prettyphoto']['animation_speed'],
2140
- 'slideshow' => $this->get_boolean_value($this->options['configuration']['prettyphoto']['slideshow']),
2141
- 'slideshowDelay' => $this->options['configuration']['prettyphoto']['slideshow_delay'],
2142
- 'slideshowAutoplay' => $this->get_boolean_value($this->options['configuration']['prettyphoto']['slideshow_autoplay']),
2143
- 'opacity' => sprintf('%.2f', ($this->options['configuration']['prettyphoto']['opacity'] / 100)),
2144
- 'showTitle' => $this->get_boolean_value($this->options['configuration']['prettyphoto']['show_title']),
2145
- 'allowResize' => $this->get_boolean_value($this->options['configuration']['prettyphoto']['allow_resize']),
2146
- 'allowExpand' => $this->get_boolean_value($this->options['configuration']['prettyphoto']['allow_expand']),
2147
- 'width' => $this->options['configuration']['prettyphoto']['width'],
2148
- 'height' => $this->options['configuration']['prettyphoto']['height'],
2149
- 'separator' => $this->options['configuration']['prettyphoto']['separator'],
2150
- 'theme' => $this->options['configuration']['prettyphoto']['theme'],
2151
- 'horizontalPadding' => $this->options['configuration']['prettyphoto']['horizontal_padding'],
2152
- 'hideFlash' => $this->get_boolean_value($this->options['configuration']['prettyphoto']['hide_flash']),
2153
- 'wmode' => $this->options['configuration']['prettyphoto']['wmode'],
2154
- 'videoAutoplay' => $this->get_boolean_value($this->options['configuration']['prettyphoto']['video_autoplay']),
2155
- 'modal' => $this->get_boolean_value($this->options['configuration']['prettyphoto']['modal']),
2156
- 'deeplinking' => $this->get_boolean_value($this->options['configuration']['prettyphoto']['deeplinking']),
2157
- 'overlayGallery' => $this->get_boolean_value($this->options['configuration']['prettyphoto']['overlay_gallery']),
2158
- 'keyboardShortcuts' => $this->get_boolean_value($this->options['configuration']['prettyphoto']['keyboard_shortcuts']),
2159
- 'social' => $this->get_boolean_value($this->options['configuration']['prettyphoto']['social'])
2160
- )
2161
- );
2162
- }
2163
- elseif($args['script'] === 'swipebox')
2164
- {
2165
- wp_register_script(
2166
- 'responsive-lightbox-swipebox',
2167
- plugins_url('assets/swipebox/source/jquery.swipebox.min.js', __FILE__),
2168
- array('jquery'),
2169
- '',
2170
- ($this->options['settings']['loading_place'] === 'header' ? false : true)
2171
- );
2172
-
2173
- wp_enqueue_script('responsive-lightbox-swipebox');
2174
-
2175
- wp_register_style(
2176
- 'responsive-lightbox-swipebox-front',
2177
- plugins_url('assets/swipebox/source/swipebox.css', __FILE__)
2178
- );
2179
-
2180
- wp_enqueue_style('responsive-lightbox-swipebox-front');
2181
-
2182
- $args = array_merge(
2183
- $args,
2184
- array(
2185
- 'animation' => $this->get_boolean_value(($this->options['configuration']['swipebox']['animation'] === 'css' ? TRUE : FALSE)),
2186
- 'hideBars' => $this->get_boolean_value($this->options['configuration']['swipebox']['hide_bars']),
2187
- 'hideBarsDelay' => $this->options['configuration']['swipebox']['hide_bars_delay'],
2188
- 'videoMaxWidth' => $this->options['configuration']['swipebox']['video_max_width']
2189
- )
2190
- );
2191
-
2192
- if($this->options['configuration']['swipebox']['force_png_icons'] === TRUE)
2193
- {
2194
- wp_add_inline_style(
2195
- 'responsive-lightbox-swipebox-front',
2196
- '#swipebox-action #swipebox-prev, #swipebox-action #swipebox-next, #swipebox-action #swipebox-close { background-image: url('.plugins_url('assets/swipebox/source/img/icons.png' , __FILE__).') !important; }'
2197
- );
2198
- }
2199
- }
2200
- elseif($args['script'] === 'fancybox')
2201
- {
2202
- wp_register_script(
2203
- 'responsive-lightbox-fancybox',
2204
- plugins_url('assets/fancybox/jquery.fancybox-1.3.4.js', __FILE__),
2205
- array('jquery'),
2206
- '',
2207
- ($this->options['settings']['loading_place'] === 'header' ? false : true)
2208
- );
2209
-
2210
- wp_enqueue_script('responsive-lightbox-fancybox');
2211
-
2212
- wp_register_style(
2213
- 'responsive-lightbox-fancybox-front',
2214
- plugins_url('assets/fancybox/jquery.fancybox-1.3.4.css', __FILE__)
2215
- );
2216
-
2217
- wp_enqueue_style('responsive-lightbox-fancybox-front');
2218
-
2219
- $args = array_merge(
2220
- $args,
2221
- array(
2222
- 'modal' => $this->get_boolean_value($this->options['configuration']['fancybox']['modal']),
2223
- 'showOverlay' => $this->get_boolean_value($this->options['configuration']['fancybox']['show_overlay']),
2224
- 'showCloseButton' => $this->get_boolean_value($this->options['configuration']['fancybox']['show_close_button']),
2225
- 'enableEscapeButton' => $this->get_boolean_value($this->options['configuration']['fancybox']['enable_escape_button']),
2226
- 'hideOnOverlayClick' => $this->get_boolean_value($this->options['configuration']['fancybox']['hide_on_overlay_click']),
2227
- 'hideOnContentClick' => $this->get_boolean_value($this->options['configuration']['fancybox']['hide_on_content_click']),
2228
- 'cyclic' => $this->get_boolean_value($this->options['configuration']['fancybox']['cyclic']),
2229
- 'showNavArrows' => $this->get_boolean_value($this->options['configuration']['fancybox']['show_nav_arrows']),
2230
- 'autoScale' => $this->get_boolean_value($this->options['configuration']['fancybox']['auto_scale']),
2231
- 'scrolling' => $this->options['configuration']['fancybox']['scrolling'],
2232
- 'centerOnScroll' => $this->get_boolean_value($this->options['configuration']['fancybox']['center_on_scroll']),
2233
- 'opacity' => $this->get_boolean_value($this->options['configuration']['fancybox']['opacity']),
2234
- 'overlayOpacity' => $this->options['configuration']['fancybox']['overlay_opacity'],
2235
- 'overlayColor' => $this->options['configuration']['fancybox']['overlay_color'],
2236
- 'titleShow' => $this->get_boolean_value($this->options['configuration']['fancybox']['title_show']),
2237
- 'titlePosition' => $this->options['configuration']['fancybox']['title_position'],
2238
- 'transitions' => $this->options['configuration']['fancybox']['transitions'],
2239
- 'easings' => $this->options['configuration']['fancybox']['easings'],
2240
- 'speeds' => $this->options['configuration']['fancybox']['speeds'],
2241
- 'changeSpeed' => $this->options['configuration']['fancybox']['change_speed'],
2242
- 'changeFade' => $this->options['configuration']['fancybox']['change_fade'],
2243
- 'padding' => $this->options['configuration']['fancybox']['padding'],
2244
- 'margin' => $this->options['configuration']['fancybox']['margin'],
2245
- 'videoWidth' => $this->options['configuration']['fancybox']['video_width'],
2246
- 'videoHeight' => $this->options['configuration']['fancybox']['video_height']
2247
- )
2248
- );
2249
- }
2250
- elseif($args['script'] === 'nivo')
2251
- {
2252
- wp_register_script(
2253
- 'responsive-lightbox-nivo',
2254
- plugins_url('assets/nivo/nivo-lightbox.min.js', __FILE__),
2255
- array('jquery'),
2256
- '',
2257
- ($this->options['settings']['loading_place'] === 'header' ? false : true)
2258
- );
2259
-
2260
- wp_enqueue_script('responsive-lightbox-nivo');
2261
-
2262
- wp_register_style(
2263
- 'responsive-lightbox-nivo-front',
2264
- plugins_url('assets/nivo/nivo-lightbox.css', __FILE__)
2265
- );
2266
-
2267
- wp_enqueue_style('responsive-lightbox-nivo-front');
2268
-
2269
- wp_register_style(
2270
- 'responsive-lightbox-nivo-front-template',
2271
- plugins_url('assets/nivo/themes/default/default.css', __FILE__)
2272
- );
2273
-
2274
- wp_enqueue_style('responsive-lightbox-nivo-front-template');
2275
-
2276
- $args = array_merge(
2277
- $args,
2278
- array(
2279
- 'effect' => $this->options['configuration']['nivo']['effect'],
2280
- 'clickOverlayToClose' => $this->get_boolean_value($this->options['configuration']['nivo']['click_overlay_to_close']),
2281
- 'keyboardNav' => $this->get_boolean_value($this->options['configuration']['nivo']['keyboard_nav']),
2282
- 'errorMessage' => esc_attr($this->options['configuration']['nivo']['error_message'])
2283
- )
2284
- );
2285
- }
2286
- elseif($args['script'] === 'imagelightbox')
2287
- {
2288
- wp_register_script(
2289
- 'responsive-lightbox-imagelightbox',
2290
- plugins_url('assets/imagelightbox/js/imagelightbox.min.js', __FILE__),
2291
- array('jquery'),
2292
- '',
2293
- ($this->options['settings']['loading_place'] === 'header' ? false : true)
2294
- );
2295
-
2296
- wp_enqueue_script('responsive-lightbox-imagelightbox');
2297
-
2298
- wp_register_style(
2299
- 'responsive-lightbox-imagelightbox-front',
2300
- plugins_url('assets/imagelightbox/css/imagelightbox.css', __FILE__)
2301
- );
2302
-
2303
- wp_enqueue_style('responsive-lightbox-imagelightbox-front');
2304
-
2305
- $args = array_merge(
2306
- $args,
2307
- array(
2308
- 'animationSpeed' => $this->options['configuration']['imagelightbox']['animation_speed'],
2309
- 'preloadNext' => $this->get_boolean_value($this->options['configuration']['imagelightbox']['preload_next']),
2310
- 'enableKeyboard' => $this->get_boolean_value($this->options['configuration']['imagelightbox']['enable_keyboard']),
2311
- 'quitOnEnd' => $this->get_boolean_value($this->options['configuration']['imagelightbox']['quit_on_end']),
2312
- 'quitOnImageClick' => $this->get_boolean_value($this->options['configuration']['imagelightbox']['quit_on_image_click']),
2313
- 'quitOnDocumentClick' => $this->get_boolean_value($this->options['configuration']['imagelightbox']['quit_on_document_click']),
2314
- )
2315
- );
2316
- }
2317
-
2318
- wp_register_script(
2319
- 'responsive-lightbox-front',
2320
- plugins_url('js/front.js', __FILE__),
2321
- array('jquery'),
2322
- '',
2323
- ($this->options['settings']['loading_place'] === 'header' ? false : true)
2324
- );
2325
-
2326
- wp_enqueue_script('responsive-lightbox-front');
2327
-
2328
- wp_add_inline_style(
2329
- 'responsive-lightbox-swipebox',
2330
- '#swipebox-action #swipebox-close, #swipebox-action #swipebox-prev, #swipebox-action #swipebox-next { background-image: url(\'assets/swipebox/source/img/icons.png\') !important; }'
2331
- );
2332
-
2333
- wp_localize_script(
2334
- 'responsive-lightbox-front',
2335
- 'rlArgs',
2336
- $args
2337
- );
2338
- }
2339
-
2340
-
2341
- /**
2342
- *
2343
- */
2344
- private function get_boolean_value($option)
2345
- {
2346
- return ($option === TRUE ? 1 : 0);
2347
- }
2348
-
2349
-
2350
- /**
2351
- * Loads textdomain
2352
- */
2353
- public function load_textdomain()
2354
- {
2355
- load_plugin_textdomain('responsive-lightbox', FALSE, dirname(plugin_basename(__FILE__)).'/languages/');
2356
- }
2357
-
2358
-
2359
- /**
2360
- * Add links to Support Forum
2361
- */
2362
- public function plugin_extend_links($links, $file)
2363
- {
2364
- if(!current_user_can('install_plugins'))
2365
- return $links;
2366
-
2367
- $plugin = plugin_basename(__FILE__);
2368
-
2369
- if($file == $plugin)
2370
- {
2371
- return array_merge(
2372
- $links,
2373
- array(sprintf('<a href="http://www.dfactory.eu/support/forum/responsive-lightbox/" target="_blank">%s</a>', __('Support', 'responsive-lightbox')))
2374
- );
2375
- }
2376
-
2377
- return $links;
2378
- }
2379
-
2380
-
2381
- /**
2382
- * Add links to Settings page
2383
- */
2384
- public function plugin_settings_link($links, $file)
2385
- {
2386
- if(!is_admin() || !current_user_can('manage_options'))
2387
- return $links;
2388
-
2389
- static $plugin;
2390
-
2391
- $plugin = plugin_basename(__FILE__);
2392
-
2393
- if($file == $plugin)
2394
- {
2395
- $settings_link = sprintf('<a href="%s">%s</a>', admin_url('options-general.php').'?page=responsive-lightbox', __('Settings', 'responsive-lightbox'));
2396
- array_unshift($links, $settings_link);
2397
- }
2398
-
2399
- return $links;
2400
- }
2401
-
2402
-
2403
- /**
2404
- * Modify gallery image link size
2405
- */
2406
- public function gallery_attachment_link_filter($content, $post_id, $size, $permalink, $icon, $text)
2407
- {
2408
- if ($permalink) {
2409
- $image = wp_get_attachment_image_src($post_id, $this->options['settings']['gallery_image_size']); // or other image size
2410
- $new_content = preg_replace('/href=\'(.*?)\'/', 'href=\'' . $image[0] . '\'', $content);
2411
- return $new_content;
2412
- } else {
2413
- return $content;
2414
- }
2415
- }
2416
 
2417
  }
2418
 
1
  <?php
2
+
3
  /*
4
  Plugin Name: Responsive Lightbox
5
  Description: Responsive Lightbox allows users to view larger versions of images and galleries in a lightbox (overlay) effect optimized for mobile devices.
6
+ Version: 1.4.9
7
  Author: dFactory
8
  Author URI: http://www.dfactory.eu/
9
  Plugin URI: http://www.dfactory.eu/plugins/responsive-lightbox/
25
 
26
  class Responsive_Lightbox
27
  {
28
+ private $defaults = array(
29
+ 'settings' => array(
30
+ 'script' => 'swipebox',
31
+ 'selector' => 'lightbox',
32
+ 'galleries' => true,
33
+ 'enable_gallery_image_size' => false,
34
+ 'gallery_image_size' => 'full',
35
+ 'videos' => true,
36
+ 'image_links' => true,
37
+ 'images_as_gallery' => false,
38
+ 'deactivation_delete' => false,
39
+ 'loading_place' => 'header',
40
+ 'enable_custom_events' => false,
41
+ 'custom_events' => 'ajaxComplete'
42
+ ),
43
+ 'configuration' => array(
44
+ 'prettyphoto' => array(
45
+ 'animation_speed' => 'normal',
46
+ 'slideshow' => false,
47
+ 'slideshow_delay' => 5000,
48
+ 'slideshow_autoplay' => false,
49
+ 'opacity' => 75,
50
+ 'show_title' => true,
51
+ 'allow_resize' => true,
52
+ 'allow_expand' => true,
53
+ 'width' => 1080,
54
+ 'height' => 720,
55
+ 'separator' => '/',
56
+ 'theme' => 'pp_default',
57
+ 'horizontal_padding' => 20,
58
+ 'hide_flash' => false,
59
+ 'wmode' => 'opaque',
60
+ 'video_autoplay' => false,
61
+ 'modal' => false,
62
+ 'deeplinking' => false,
63
+ 'overlay_gallery' => true,
64
+ 'keyboard_shortcuts' => true,
65
+ 'social' => false
66
+ ),
67
+ 'swipebox' => array(
68
+ 'animation' => 'css',
69
+ 'force_png_icons' => false,
70
+ 'hide_bars' => true,
71
+ 'hide_bars_delay' => 5000,
72
+ 'video_max_width' => 1080
73
+ ),
74
+ 'fancybox' => array(
75
+ 'modal' => false,
76
+ 'show_overlay' => true,
77
+ 'show_close_button' => true,
78
+ 'enable_escape_button' => true,
79
+ 'hide_on_overlay_click' => true,
80
+ 'hide_on_content_click' => false,
81
+ 'cyclic' => false,
82
+ 'show_nav_arrows' => true,
83
+ 'auto_scale' => true,
84
+ 'scrolling' => 'yes',
85
+ 'center_on_scroll' => true,
86
+ 'opacity' => true,
87
+ 'overlay_opacity' => 70,
88
+ 'overlay_color' => '#666',
89
+ 'title_show' => true,
90
+ 'title_position' => 'outside',
91
+ 'transitions' => 'fade',
92
+ 'easings' => 'swing',
93
+ 'speeds' => 300,
94
+ 'change_speed' => 300,
95
+ 'change_fade' => 100,
96
+ 'padding' => 5,
97
+ 'margin' => 5,
98
+ 'video_width' => 1080,
99
+ 'video_height' => 720
100
+ ),
101
+ 'nivo' => array(
102
+ 'effect' => 'fade',
103
+ 'click_overlay_to_close' => true,
104
+ 'keyboard_nav' => true,
105
+ 'error_message' => 'The requested content cannot be loaded. Please try again later.'
106
+ ),
107
+ 'imagelightbox' => array(
108
+ 'animation_speed' => 250,
109
+ 'preload_next' => true,
110
+ 'enable_keyboard' => true,
111
+ 'quit_on_end' => false,
112
+ 'quit_on_image_click' => false,
113
+ 'quit_on_document_click' => true
114
+ )
115
+ ),
116
+ 'version' => '1.4.9'
117
+ );
118
+ private $scripts = array();
119
+ private $options = array();
120
+ private $tabs = array();
121
+ private $choices = array();
122
+ private $loading_places = array();
123
+ private $gallery_no = 0;
124
+
125
+
126
+ public function __construct()
127
+ {
128
+ register_activation_hook(__FILE__, array(&$this, 'multisite_activation'));
129
+ register_deactivation_hook(__FILE__, array(&$this, 'multisite_deactivation'));
130
+
131
+ //changes from older versions
132
+ $db_version = get_option('responsive_lightbox_version');
133
+
134
+ if (version_compare(($db_version === FALSE ? '1.0.0' : $db_version), '1.0.5', '<')) {
135
+ if (($array = get_option('rl_settings')) !== FALSE) {
136
+ update_option('responsive_lightbox_settings', $array);
137
+ delete_option('rl_settings');
138
+ }
139
+
140
+ if (($array = get_option('rl_configuration')) !== FALSE) {
141
+ update_option('responsive_lightbox_configuration', $array);
142
+ delete_option('rl_configuration');
143
+ }
144
+ }
145
+
146
+ //update plugin version
147
+ update_option('responsive_lightbox_version', $this->defaults['version'], '', 'no');
148
+
149
+ $this->options['settings'] = array_merge($this->defaults['settings'], (($array = get_option('responsive_lightbox_settings')) === FALSE ? array() : $array));
150
+
151
+ //for multi arrays we have to merge them separately
152
+ $db_conf_opts = (($base = get_option('responsive_lightbox_configuration')) === FALSE ? array() : $base);
153
+
154
+ foreach ($this->defaults['configuration'] as $script => $settings) {
155
+ $this->options['configuration'][$script] = array_merge($settings, (isset($db_conf_opts[$script]) ? $db_conf_opts[$script] : array()));
156
+ }
157
+
158
+ //actions
159
+ add_action('plugins_loaded', array(&$this, 'load_textdomain'));
160
+ add_action('plugins_loaded', array(&$this, 'load_defaults'));
161
+ add_action('admin_init', array(&$this, 'register_settings'));
162
+ add_action('admin_menu', array(&$this, 'admin_menu_options'));
163
+ add_action('wp_enqueue_scripts', array(&$this, 'front_scripts_styles'));
164
+ add_action('admin_enqueue_scripts', array(&$this, 'admin_scripts_styles'));
165
+
166
+ //filters
167
+ add_filter('plugin_action_links', array(&$this, 'plugin_settings_link'), 10, 2);
168
+ add_filter('plugin_row_meta', array(&$this, 'plugin_extend_links'), 10, 2);
169
+ add_filter('post_gallery', array(&$this, 'gallery_attributes'), 1000);
170
+
171
+ if ($this->options['settings']['galleries'] === true)
172
+ add_filter('wp_get_attachment_link', array(&$this, 'add_gallery_lightbox_selector'), 1000, 6);
173
+
174
+ if ($this->options['settings']['enable_gallery_image_size'] === true)
175
+ add_filter('wp_get_attachment_link', array(&$this, 'gallery_attachment_link_filter'), 1001, 6);
176
+
177
+ if ($this->options['settings']['videos'] === true)
178
+ add_filter('the_content', array(&$this, 'add_videos_lightbox_selector'));
179
+
180
+ if ($this->options['settings']['image_links'] === true || $this->options['settings']['images_as_gallery'] === true)
181
+ add_filter('the_content', array(&$this, 'add_links_lightbox_selector'));
182
+ }
183
+
184
+
185
+ public function add_videos_lightbox_selector($content)
186
+ {
187
+ preg_match_all('/<a(.*?)href=(?:\'|")((?:(?:http|https):\/\/)?(?:www\.)?((youtube\.com\/watch\?v=[a-z0-9_\-]+)|(vimeo\.com\/[0-9]{8,})))(?:\'|")(.*?)>/i', $content, $links);
188
+
189
+ if (isset($links[0])) {
190
+ foreach ($links[0] as $id => $link) {
191
+ if (preg_match('/<a.*?rel=(?:\'|")(.*?)(?:\'|").*?>/', $link, $result) === 1) {
192
+ if (isset($result[1])) {
193
+ $new_rels = array();
194
+ $rels = explode(' ', $result[1]);
195
+
196
+ if (in_array($this->options['settings']['selector'], $rels, TRUE)) {
197
+ foreach ($rels as $no => $rel) {
198
+ if ($rel !== $this->options['settings']['selector'])
199
+ $new_rels[] = $rel;
200
+ }
201
+
202
+ $content = str_replace($link, preg_replace('/rel=(?:\'|")(.*?)(?:\'|")/', 'rel="' . (!empty($new_rel) ? simplode(' ', $new_rels) . ' ' : '') . $this->options['settings']['selector'] . '-video-' . $id . '"', $link), $content);
203
+ } else
204
+ $content = str_replace($link, preg_replace('/rel=(?:\'|")(.*?)(?:\'|")/', 'rel="' . ($result[1] !== '' ? $result[1] . ' ' : '') . $this->options['settings']['selector'] . '-video-' . $id . '"', $link), $content);
205
+ }
206
+ } else
207
+ $content = str_replace($link, '<a' . $links[1][$id] . 'href="' . $links[2][$id] . '"' . $links[6][$id] . ' rel="' . $this->options['settings']['selector'] . '-video-' . $id . '">', $content);
208
+ }
209
+ }
210
+
211
+ return $content;
212
+ }
213
+
214
+
215
+ public function add_links_lightbox_selector($content)
216
+ {
217
+ preg_match_all('/<a(.*?)href=(?:\'|")([^<]*?).(bmp|gif|jpeg|jpg|png)(?:\'|")(.*?)>/i', $content, $links);
218
+
219
+ if (isset($links[0])) {
220
+ if ($this->options['settings']['images_as_gallery'] === TRUE)
221
+ $rel_hash = '[gallery-' . wp_generate_password(4, FALSE, FALSE) . ']';
222
+
223
+ foreach ($links[0] as $id => $link) {
224
+ if (preg_match('/<a.*?rel=(?:\'|")(.*?)(?:\'|").*?>/', $link, $result) === 1) {
225
+ if ($this->options['settings']['images_as_gallery'] === TRUE) {
226
+ $content = str_replace($link, preg_replace('/rel=(?:\'|")(.*?)(?:\'|")/', 'rel="' . $this->options['settings']['selector'] . $rel_hash . '"' . ($this->options['settings']['script'] === 'imagelightbox' ? ' data-imagelightbox="' . $id . '"' : ''), $link), $content);
227
+ } else {
228
+ if (isset($result[1])) {
229
+ $new_rels = array();
230
+ $rels = explode(' ', $result[1]);
231
+
232
+ if (in_array($this->options['settings']['selector'], $rels, TRUE)) {
233
+ foreach ($rels as $no => $rel) {
234
+ if ($rel !== $this->options['settings']['selector'])
235
+ $new_rels[] = $rel;
236
+ }
237
+
238
+ $content = str_replace($link, preg_replace('/rel=(?:\'|")(.*?)(?:\'|")/', 'rel="' . (!empty($new_rels) ? implode(' ', $new_rels) . ' ' : '') . $this->options['settings']['selector'] . '-' . $id . '"' . ($this->options['settings']['script'] === 'imagelightbox' ? ' data-imagelightbox="' . $id . '"' : ''), $link), $content);
239
+ } else
240
+ $content = str_replace($link, preg_replace('/rel=(?:\'|")(.*?)(?:\'|")/', 'rel="' . ($result[1] !== '' ? $result[1] . ' ' : '') . $this->options['settings']['selector'] . '-' . $id . '"' . ($this->options['settings']['script'] === 'imagelightbox' ? ' data-imagelightbox="' . $id . '"' : ''), $link), $content);
241
+ }
242
+ }
243
+ } else
244
+ $content = str_replace($link, '<a' . $links[1][$id] . 'href="' . $links[2][$id] . '.' . $links[3][$id] . '"' . $links[4][$id] . ' rel="' . $this->options['settings']['selector'] . ($this->options['settings']['images_as_gallery'] === TRUE ? $rel_hash : '-' . $id) . '"' . ($this->options['settings']['script'] === 'imagelightbox' ? ' data-imagelightbox="' . $id . '"' : '') . '>', $content);
245
+ }
246
+ }
247
+
248
+ return $content;
249
+ }
250
+
251
+
252
+ public function gallery_attributes($style)
253
+ {
254
+ ++$this->gallery_no;
255
+
256
+ return $style;
257
+ }
258
+
259
+
260
+ public function add_gallery_lightbox_selector($link, $id, $size, $permalink, $icon, $text)
261
+ {
262
+ $link = (preg_match('/<a.*? rel=("|\').*?("|\')>/', $link) === 1 ? preg_replace('/(<a.*? rel=(?:"|\').*?)((?:"|\').*?>)/', '$1 ' . $this->options['settings']['selector'] . '[gallery-' . $this->gallery_no . ']' . '$2', $link) : preg_replace('/(<a.*?)>/', '$1 rel="' . $this->options['settings']['selector'] . '[gallery-' . $this->gallery_no . ']' . '">', $link));
263
+
264
+ return (preg_match('/<a.*? href=("|\').*?("|\')>/', $link) === 1 ? preg_replace('/(<a.*? href=(?:"|\')).*?((?:"|\').*?>)/', '$1' . wp_get_attachment_url($id) . '$2', $link) : preg_replace('/(<a.*?)>/', '$1 href="' . wp_get_attachment_url($id) . '">', $link));
265
+ }
266
+
267
+
268
+ public function load_defaults()
269
+ {
270
+ $this->scripts = array(
271
+ 'prettyphoto' => array(
272
+ 'name' => __('prettyPhoto', 'responsive-lightbox'),
273
+ 'animation_speeds' => array(
274
+ 'slow' => __('slow', 'responsive-lightbox'),
275
+ 'normal' => __('normal', 'responsive-lightbox'),
276
+ 'fast' => __('fast', 'responsive-lightbox')
277
+ ),
278
+ 'themes' => array(
279
+ 'pp_default' => __('default', 'responsive-lightbox'),
280
+ 'light_rounded' => __('light rounded', 'responsive-lightbox'),
281
+ 'dark_rounded' => __('dark rounded', 'responsive-lightbox'),
282
+ 'light_square' => __('light square', 'responsive-lightbox'),
283
+ 'dark_square' => __('dark square', 'responsive-lightbox'),
284
+ 'facebook' => __('facebook', 'responsive-lightbox')
285
+ ),
286
+ 'wmodes' => array(
287
+ 'window' => __('window', 'responsive-lightbox'),
288
+ 'transparent' => __('transparent', 'responsive-lightbox'),
289
+ 'opaque' => __('opaque', 'responsive-lightbox'),
290
+ 'direct' => __('direct', 'responsive-lightbox'),
291
+ 'gpu' => __('gpu', 'responsive-lightbox')
292
+ )
293
+ ),
294
+ 'swipebox' => array(
295
+ 'name' => __('SwipeBox', 'responsive-lightbox'),
296
+ 'animations' => array(
297
+ 'css' => __('CSS', 'responsive-lightbox'),
298
+ 'jquery' => __('jQuery', 'responsive-lightbox')
299
+ )
300
+ ),
301
+ 'fancybox' => array(
302
+ 'name' => __('FancyBox', 'responsive-lightbox'),
303
+ 'transitions' => array(
304
+ 'elastic' => __('elastic', 'responsive-lightbox'),
305
+ 'fade' => __('fade', 'responsive-lightbox'),
306
+ 'none' => __('none', 'responsive-lightbox')
307
+ ),
308
+ 'scrollings' => array(
309
+ 'auto' => __('auto', 'responsive-lightbox'),
310
+ 'yes' => __('yes', 'responsive-lightbox'),
311
+ 'no' => __('no', 'responsive-lightbox')
312
+ ),
313
+ 'easings' => array(
314
+ 'swing' => __('swing', 'responsive-lightbox'),
315
+ 'linear' => __('linear', 'responsive-lightbox')
316
+ ),
317
+ 'positions' => array(
318
+ 'outside' => __('outside', 'responsive-lightbox'),
319
+ 'inside' => __('inside', 'responsive-lightbox'),
320
+ 'over' => __('over', 'responsive-lightbox')
321
+ )
322
+ ),
323
+ 'nivo' => array(
324
+ 'name' => __('Nivo Lightbox', 'responsive-lightbox'),
325
+ 'effects' => array(
326
+ 'fade' => __('fade', 'responsive-lightbox'),
327
+ 'fadeScale' => __('fade scale', 'responsive-lightbox'),
328
+ 'slideLeft' => __('slide left', 'responsive-lightbox'),
329
+ 'slideRight' => __('slide right', 'responsive-lightbox'),
330
+ 'slideUp' => __('slide up', 'responsive-lightbox'),
331
+ 'slideDown' => __('slide down', 'responsive-lightbox'),
332
+ 'fall' => __('fall', 'responsive-lightbox')
333
+ )
334
+ ),
335
+ 'imagelightbox' => array(
336
+ 'name' => __('Image Lightbox', 'responsive-lightbox')
337
+ )
338
+ );
339
+
340
+ $this->choices = array(
341
+ 'yes' => __('Enable', 'responsive-lightbox'),
342
+ 'no' => __('Disable', 'responsive-lightbox')
343
+ );
344
+
345
+ $this->loading_places = array(
346
+ 'header' => __('Header', 'responsive-lightbox'),
347
+ 'footer' => __('Footer', 'responsive-lightbox')
348
+ );
349
+
350
+ $this->tabs = array(
351
+ 'general-settings' => array(
352
+ 'name' => __('General settings', 'responsive-lightbox'),
353
+ 'key' => 'responsive_lightbox_settings',
354
+ 'submit' => 'save_rl_settings',
355
+ 'reset' => 'reset_rl_settings',
356
+ ),
357
+ 'configuration' => array(
358
+ 'name' => __('Lightbox settings', 'responsive-lightbox'),
359
+ 'key' => 'responsive_lightbox_configuration',
360
+ 'submit' => 'save_rl_configuration',
361
+ 'reset' => 'reset_rl_configuration'
362
+ )
363
+ );
364
+ }
365
+
366
+
367
+ public function multisite_activation($networkwide)
368
+ {
369
+ if (is_multisite() && $networkwide) {
370
+ global $wpdb;
371
+
372
+ $activated_blogs = array();
373
+ $current_blog_id = $wpdb->blogid;
374
+ $blogs_ids = $wpdb->get_col($wpdb->prepare('SELECT blog_id FROM ' . $wpdb->blogs, ''));
375
+
376
+ foreach ($blogs_ids as $blog_id) {
377
+ switch_to_blog($blog_id);
378
+ $this->activate_single();
379
+ $activated_blogs[] = (int)$blog_id;
380
+ }
381
+
382
+ switch_to_blog($current_blog_id);
383
+ update_site_option('responsive_lightbox_activated_blogs', $activated_blogs, array());
384
+ } else
385
+ $this->activate_single();
386
+ }
387
+
388
+
389
+ public function activate_single()
390
+ {
391
+ add_option('responsive_lightbox_settings', $this->defaults['settings'], '', 'no');
392
+ add_option('responsive_lightbox_configuration', $this->defaults['configuration'], '', 'no');
393
+ add_option('responsive_lightbox_version', $this->defaults['version'], '', 'no');
394
+ }
395
+
396
+
397
+ public function multisite_deactivation($networkwide)
398
+ {
399
+ if (is_multisite() && $networkwide) {
400
+ global $wpdb;
401
+
402
+ $current_blog_id = $wpdb->blogid;
403
+ $blogs_ids = $wpdb->get_col($wpdb->prepare('SELECT blog_id FROM ' . $wpdb->blogs, ''));
404
+
405
+ if (($activated_blogs = get_site_option('responsive_lightbox_activated_blogs', FALSE, FALSE)) === FALSE)
406
+ $activated_blogs = array();
407
+
408
+ foreach ($blogs_ids as $blog_id) {
409
+ switch_to_blog($blog_id);
410
+ $this->deactivate_single(TRUE);
411
+
412
+ if (in_array((int)$blog_id, $activated_blogs, TRUE))
413
+ unset($activated_blogs[array_search($blog_id, $activated_blogs)]);
414
+ }
415
+
416
+ switch_to_blog($current_blog_id);
417
+ update_site_option('responsive_lightbox_activated_blogs', $activated_blogs);
418
+ } else
419
+ $this->deactivate_single();
420
+ }
421
+
422
+
423
+ public function deactivate_single($multi = FALSE)
424
+ {
425
+ if ($multi === TRUE) {
426
+ $options = get_option('responsive_lightbox_settings');
427
+ $check = $options['deactivation_delete'];
428
+ } else
429
+ $check = $this->options['settings']['deactivation_delete'];
430
+
431
+ if ($check === TRUE) {
432
+ delete_option('responsive_lightbox_settings');
433
+ delete_option('responsive_lightbox_configuration');
434
+ delete_option('responsive_lightbox_version');
435
+ }
436
+ }
437
+
438
+
439
+ public function register_settings()
440
+ {
441
+ register_setting('responsive_lightbox_settings', 'responsive_lightbox_settings', array(&$this, 'validate_options'));
442
+
443
+ //general settings
444
+ add_settings_section('responsive_lightbox_settings', __('General settings', 'responsive-lightbox'), '', 'responsive_lightbox_settings');
445
+ add_settings_field('rl_script', __('Lightbox script', 'responsive-lightbox'), array(&$this, 'rl_script'), 'responsive_lightbox_settings', 'responsive_lightbox_settings');
446
+ add_settings_field('rl_selector', __('Selector', 'responsive-lightbox'), array(&$this, 'rl_selector'), 'responsive_lightbox_settings', 'responsive_lightbox_settings');
447
+ add_settings_field('rl_galleries', __('Galleries', 'responsive-lightbox'), array(&$this, 'rl_galleries'), 'responsive_lightbox_settings', 'responsive_lightbox_settings');
448
+ add_settings_field('rl_enable_gallery_image_size', __('Gallery image size', 'responsive-lightbox'), array(&$this, 'rl_enable_gallery_image_size'), 'responsive_lightbox_settings', 'responsive_lightbox_settings');
449
+ add_settings_field('rl_videos', __('Video links', 'responsive-lightbox'), array(&$this, 'rl_videos'), 'responsive_lightbox_settings', 'responsive_lightbox_settings');
450
+ add_settings_field('rl_image_links', __('Image links', 'responsive-lightbox'), array(&$this, 'rl_image_links'), 'responsive_lightbox_settings', 'responsive_lightbox_settings');
451
+ add_settings_field('rl_images_as_gallery', __('Single images as gallery', 'responsive-lightbox'), array(&$this, 'rl_images_as_gallery'), 'responsive_lightbox_settings', 'responsive_lightbox_settings');
452
+ add_settings_field('rl_enable_custom_events', __('Custom events', 'responsive-lightbox'), array(&$this, 'rl_enable_custom_events'), 'responsive_lightbox_settings', 'responsive_lightbox_settings');
453
+ add_settings_field('rl_loading_place', __('Loading place', 'responsive-lightbox'), array(&$this, 'rl_loading_place'), 'responsive_lightbox_settings', 'responsive_lightbox_settings');
454
+ add_settings_field('rl_deactivation_delete', __('Deactivation', 'responsive-lightbox'), array(&$this, 'rl_deactivation_delete'), 'responsive_lightbox_settings', 'responsive_lightbox_settings');
455
+
456
+ //configuration
457
+ register_setting('responsive_lightbox_configuration', 'responsive_lightbox_configuration', array(&$this, 'validate_options'));
458
+ add_settings_section('responsive_lightbox_configuration', __('Lightbox settings', 'responsive-lightbox') . ': ' . $this->scripts[$this->options['settings']['script']]['name'], '', 'responsive_lightbox_configuration');
459
+
460
+ if ($this->options['settings']['script'] === 'swipebox') {
461
+ add_settings_field('rl_sb_animation', __('Animation type', 'responsive-lightbox'), array(&$this, 'rl_sb_animation'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
462
+ add_settings_field('rl_sb_force_png_icons', __('Force PNG icons', 'responsive-lightbox'), array(&$this, 'rl_sb_force_png_icons'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
463
+ add_settings_field('rl_sb_hide_bars', __('Top and bottom bars', 'responsive-lightbox'), array(&$this, 'rl_sb_hide_bars'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
464
+ add_settings_field('rl_sb_video_max_width', __('Video max width', 'responsive-lightbox'), array(&$this, 'rl_sb_video_max_width'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
465
+ } elseif ($this->options['settings']['script'] === 'prettyphoto') {
466
+ add_settings_field('rl_pp_animation_speed', __('Animation speed', 'responsive-lightbox'), array(&$this, 'rl_pp_animation_speed'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
467
+ add_settings_field('rl_pp_slideshow', __('Slideshow', 'responsive-lightbox'), array(&$this, 'rl_pp_slideshow'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
468
+ add_settings_field('rl_pp_slideshow_autoplay', __('Slideshow autoplay', 'responsive-lightbox'), array(&$this, 'rl_pp_slideshow_autoplay'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
469
+ add_settings_field('rl_pp_opacity', __('Opacity', 'responsive-lightbox'), array(&$this, 'rl_pp_opacity'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
470
+ add_settings_field('rl_pp_title', __('Show title', 'responsive-lightbox'), array(&$this, 'rl_pp_title'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
471
+ add_settings_field('rl_pp_allow_resize', __('Allow resize big images', 'responsive-lightbox'), array(&$this, 'rl_pp_allow_resize'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
472
+ add_settings_field('rl_pp_allow_expand', __('Allow expand', 'responsive-lightbox'), array(&$this, 'rl_pp_allow_expand'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
473
+ add_settings_field('rl_pp_width', __('Video width', 'responsive-lightbox'), array(&$this, 'rl_pp_width'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
474
+ add_settings_field('rl_pp_height', __('Video height', 'responsive-lightbox'), array(&$this, 'rl_pp_height'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
475
+ add_settings_field('rl_pp_theme', __('Theme', 'responsive-lightbox'), array(&$this, 'rl_pp_theme'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
476
+ add_settings_field('rl_pp_horizontal_padding', __('Horizontal padding', 'responsive-lightbox'), array(&$this, 'rl_pp_horizontal_padding'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
477
+ add_settings_field('rl_pp_hide_flash', __('Hide Flash', 'responsive-lightbox'), array(&$this, 'rl_pp_hide_flash'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
478
+ add_settings_field('rl_pp_wmode', __('Flash Window Mode (wmode)', 'responsive-lightbox'), array(&$this, 'rl_pp_wmode'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
479
+ add_settings_field('rl_pp_video_autoplay', __('Video autoplay', 'responsive-lightbox'), array(&$this, 'rl_pp_video_autoplay'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
480
+ add_settings_field('rl_pp_modal', __('Modal', 'responsive-lightbox'), array(&$this, 'rl_pp_modal'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
481
+ add_settings_field('rl_pp_deeplinking', __('Deeplinking', 'responsive-lightbox'), array(&$this, 'rl_pp_deeplinking'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
482
+ add_settings_field('rl_pp_overlay_gallery', __('Overlay gallery', 'responsive-lightbox'), array(&$this, 'rl_pp_overlay_gallery'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
483
+ add_settings_field('rl_pp_keyboard_shortcuts', __('Keyboard shortcuts', 'responsive-lightbox'), array(&$this, 'rl_pp_keyboard_shortcuts'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
484
+ add_settings_field('rl_pp_social', __('Social (Twitter, Facebook)', 'responsive-lightbox'), array(&$this, 'rl_pp_social'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
485
+ } elseif ($this->options['settings']['script'] === 'fancybox') {
486
+ add_settings_field('rl_fb_modal', __('Modal', 'responsive-lightbox'), array(&$this, 'rl_fb_modal'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
487
+ add_settings_field('rl_fb_show_overlay', __('Show overlay', 'responsive-lightbox'), array(&$this, 'rl_fb_show_overlay'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
488
+ add_settings_field('rl_fb_show_close_button', __('Show close button', 'responsive-lightbox'), array(&$this, 'rl_fb_show_close_button'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
489
+ add_settings_field('rl_fb_enable_escape_button', __('Enable escape button', 'responsive-lightbox'), array(&$this, 'rl_fb_enable_escape_button'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
490
+ add_settings_field('rl_fb_hide_on_overlay_click', __('Hide on overlay click', 'responsive-lightbox'), array(&$this, 'rl_fb_hide_on_overlay_click'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
491
+ add_settings_field('rl_fb_hide_on_content_click', __('Hide on content click', 'responsive-lightbox'), array(&$this, 'rl_fb_hide_on_content_click'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
492
+ add_settings_field('rl_fb_cyclic', __('Cyclic', 'responsive-lightbox'), array(&$this, 'rl_fb_cyclic'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
493
+ add_settings_field('rl_fb_show_nav_arrows', __('Show nav arrows', 'responsive-lightbox'), array(&$this, 'rl_fb_show_nav_arrows'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
494
+ add_settings_field('rl_fb_auto_scale', __('Auto scale', 'responsive-lightbox'), array(&$this, 'rl_fb_auto_scale'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
495
+ add_settings_field('rl_fb_scrolling', __('Scrolling (in/out)', 'responsive-lightbox'), array(&$this, 'rl_fb_scrolling'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
496
+ add_settings_field('rl_fb_center_on_scroll', __('Center on scroll', 'responsive-lightbox'), array(&$this, 'rl_fb_center_on_scroll'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
497
+ add_settings_field('rl_fb_opacity', __('Opacity', 'responsive-lightbox'), array(&$this, 'rl_fb_opacity'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
498
+ add_settings_field('rl_fb_overlay_opacity', __('Overlay opacity', 'responsive-lightbox'), array(&$this, 'rl_fb_overlay_opacity'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
499
+ add_settings_field('rl_fb_overlay_color', __('Overlay color', 'responsive-lightbox'), array(&$this, 'rl_fb_overlay_color'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
500
+ add_settings_field('rl_fb_title_show', __('Title show', 'responsive-lightbox'), array(&$this, 'rl_fb_title_show'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
501
+ add_settings_field('rl_fb_title_position', __('Title position', 'responsive-lightbox'), array(&$this, 'rl_fb_title_position'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
502
+ add_settings_field('rl_fb_transitions', __('Transition (in/out)', 'responsive-lightbox'), array(&$this, 'rl_fb_transitions'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
503
+ add_settings_field('rl_fb_easings', __('Easings (in/out)', 'responsive-lightbox'), array(&$this, 'rl_fb_easings'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
504
+ add_settings_field('rl_fb_speeds', __('Speed (in/out)', 'responsive-lightbox'), array(&$this, 'rl_fb_speeds'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
505
+ add_settings_field('rl_fb_change_speed', __('Change speed', 'responsive-lightbox'), array(&$this, 'rl_fb_change_speed'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
506
+ add_settings_field('rl_fb_change_fade', __('Change fade', 'responsive-lightbox'), array(&$this, 'rl_fb_change_fade'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
507
+ add_settings_field('rl_fb_padding', __('Padding', 'responsive-lightbox'), array(&$this, 'rl_fb_padding'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
508
+ add_settings_field('rl_fb_margin', __('Margin', 'responsive-lightbox'), array(&$this, 'rl_fb_margin'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
509
+ add_settings_field('rl_fb_video_width', __('Video width', 'responsive-lightbox'), array(&$this, 'rl_fb_video_width'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
510
+ add_settings_field('rl_fb_video_height', __('Video height', 'responsive-lightbox'), array(&$this, 'rl_fb_video_height'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
511
+ } elseif ($this->options['settings']['script'] === 'nivo') {
512
+ add_settings_field('rl_nv_effect', __('Effect', 'responsive-lightbox'), array(&$this, 'rl_nv_effect'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
513
+ add_settings_field('rl_nv_click_overlay_to_close', __('Click overlay to close', 'responsive-lightbox'), array(&$this, 'rl_nv_click_overlay_to_close'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
514
+ add_settings_field('rl_nv_keyboard_nav', __('Keyboard navigation', 'responsive-lightbox'), array(&$this, 'rl_nv_keyboard_nav'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
515
+ add_settings_field('rl_nv_error_message', __('Error message', 'responsive-lightbox'), array(&$this, 'rl_nv_error_message'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
516
+ } elseif ($this->options['settings']['script'] === 'imagelightbox') {
517
+ add_settings_field('rl_il_animation_speed', __('Animation speed', 'responsive-lightbox'), array(&$this, 'rl_il_animation_speed'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
518
+ add_settings_field('rl_il_preload_next', __('Preload next image', 'responsive-lightbox'), array(&$this, 'rl_il_preload_next'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
519
+ add_settings_field('rl_il_enable_keyboard', __('Enable keyboard keys', 'responsive-lightbox'), array(&$this, 'rl_il_enable_keyboard'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
520
+ add_settings_field('rl_il_quit_on_end', __('Quit after last image', 'responsive-lightbox'), array(&$this, 'rl_il_quit_on_end'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
521
+ add_settings_field('rl_il_quit_on_image_click', __('Quit when image is clicked', 'responsive-lightbox'), array(&$this, 'rl_il_quit_on_image_click'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
522
+ add_settings_field('rl_il_quit_on_document_click', __('Quit when anything but image is clicked', 'responsive-lightbox'), array(&$this, 'rl_il_quit_on_document_click'), 'responsive_lightbox_configuration', 'responsive_lightbox_configuration');
523
+ }
524
+ }
525
+
526
+
527
+ public function rl_script()
528
+ {
529
+ echo '
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
530
  <div id="rl_script" class="wplikebtns">';
531
 
532
+ foreach ($this->scripts as $val => $trans) {
533
+ $val = esc_attr($val);
 
534
 
535
+ echo '
536
+ <input id="rl-script-' . $val . '" type="radio" name="responsive_lightbox_settings[script]" value="' . $val . '" ' . checked($val, $this->options['settings']['script'], false) . ' />
537
+ <label for="rl-script-' . $val . '">' . esc_html($trans['name']) . '</label>';
538
+ }
539
 
540
+ echo '
541
+ <p class="description">' . __('Select your preffered ligthbox effect script.', 'responsive-lightbox') . '</p>
542
  </div>';
543
+ }
544
 
545
 
546
+ public function rl_selector()
547
+ {
548
+ echo '
549
  <div id="rl_selector">
550
+ <input type="text" value="' . esc_attr($this->options['settings']['selector']) . '" name="responsive_lightbox_settings[selector]" />
551
+ <p class="description">' . __('Select to which rel selector lightbox effect will be applied to.', 'responsive-lightbox') . '</p>
552
  </div>';
553
+ }
554
 
555
 
556
+ public function rl_enable_custom_events()
557
+ {
558
+ echo '
559
  <div id="rl_enable_custom_events" class="wplikebtns">';
560
 
561
+ foreach ($this->choices as $val => $trans) {
562
+ $val = esc_attr($val);
 
563
 
564
+ echo '
565
+ <input id="rl-enable-custom-events-' . $val . '" type="radio" name="responsive_lightbox_settings[enable_custom_events]" value="' . $val . '" ' . checked(($val === 'yes' ? true : false), $this->options['settings']['enable_custom_events'], false) . ' />
566
+ <label for="rl-enable-custom-events-' . $val . '">' . esc_html($trans) . '</label>';
567
+ }
568
 
569
+ echo '
570
+ <p class="description">' . __('Enable triggering lightbox on custom jquery events.', 'responsive-lightbox') . '</p>
571
+ <div id="rl_custom_events"' . ($this->options['settings']['enable_custom_events'] === false ? ' style="display: none;"' : '') . '>
572
+ <input type="text" name="responsive_lightbox_settings[custom_events]" value="' . esc_attr($this->options['settings']['custom_events']) . '" />
573
+ <p class="description">' . __('Enter a space separated list of events.', 'responsive-lightbox') . '</p>
574
  </div>
575
  </div>';
576
+ }
577
 
578
 
579
+ public function rl_loading_place()
580
+ {
581
+ echo '
582
  <div id="rl_loading_place" class="wplikebtns">';
583
 
584
+ foreach ($this->loading_places as $val => $trans) {
585
+ $val = esc_attr($val);
 
586
 
587
+ echo '
588
+ <input id="rl-loading-place-' . $val . '" type="radio" name="responsive_lightbox_settings[loading_place]" value="' . $val . '" ' . checked($val, $this->options['settings']['loading_place'], false) . ' />
589
+ <label for="rl-loading-place-' . $val . '">' . esc_html($trans) . '</label>';
590
+ }
591
 
592
+ echo '
593
+ <p class="description">' . __('Select where all the lightbox scripts should be placed.', 'responsive-lightbox') . '</p>
594
  </div>';
595
+ }
596
 
597
 
598
+ public function rl_galleries()
599
+ {
600
+ echo '
601
  <div id="rl_galleries" class="wplikebtns">';
602
 
603
+ foreach ($this->choices as $val => $trans) {
604
+ echo '
605
+ <input id="rl-galleries-' . $val . '" type="radio" name="responsive_lightbox_settings[galleries]" value="' . esc_attr($val) . '" ' . checked(($val === 'yes' ? TRUE : FALSE), $this->options['settings']['galleries'], FALSE) . ' />
606
+ <label for="rl-galleries-' . $val . '">' . $trans . '</label>';
607
+ }
608
+
609
+ echo '
610
+ <p class="description">' . __('Add lightbox to WordPress image galleries by default.', 'responsive-lightbox') . '</p>
611
+ </div>';
612
+ }
613
+
614
+
615
+ public function rl_enable_gallery_image_size()
616
+ {
617
+ echo '
 
618
  <div id="rl_enable_gallery_image_size" class="wplikebtns">';
619
 
620
+ foreach ($this->choices as $val => $trans) {
621
+ $val = esc_attr($val);
622
+
623
+ echo '
624
+ <input id="rl-enable-gallery-image-size-' . $val . '" type="radio" name="responsive_lightbox_settings[enable_gallery_image_size]" value="' . $val . '" ' . checked(($val === 'yes' ? true : false), $this->options['settings']['enable_gallery_image_size'], false) . ' />
625
+ <label for="rl-enable-gallery-image-size-' . $val . '">' . esc_html($trans) . '</label>';
626
+ }
627
+
628
+ echo '
629
+ <p class="description">' . __('By default WP gallery links point to full size images only. Enable that to modify the image size of native WP gallery image links.', 'responsive-lightbox') . '</p>';
630
+
631
+ // get available image sizes
632
+ $image_sizes = get_intermediate_image_sizes();
633
+
634
+ // print_r($image_sizes);
635
+
636
+ echo '
637
+ <div id="rl_gallery_image_size"' . ($this->options['settings']['enable_gallery_image_size'] === false ? ' style="display: none;"' : '') . '>
638
+ <select name="responsive_lightbox_settings[gallery_image_size]" value="' . esc_attr($this->options['settings']['gallery_image_size']) . '" />
639
+ <option value="full" ' . selected($this->options['settings']['gallery_image_size'], 'full', false) . '>' . esc_attr(__('full', 'responsive-lightbox')) . '</option>';
640
+
641
+ foreach ($image_sizes as $image_size) {
642
+ echo '<option value="' . esc_attr($image_size) . '" ' . selected($this->options['settings']['gallery_image_size'], esc_attr($image_size), false) . '>' . esc_attr($image_size) . '</option>';
643
+ }
644
+
645
+ echo '
 
 
646
  </select>
647
+ <p class="description">' . __('Select image size for gallery image links.', 'responsive-lightbox') . '</p>
648
  </div>
649
  </div>';
650
+ }
651
 
652
 
653
+ public function rl_videos()
654
+ {
655
+ echo '
656
  <div id="rl_videos" class="wplikebtns">';
657
 
658
+ foreach ($this->choices as $val => $trans) {
659
+ echo '
660
+ <input id="rl-videos-' . $val . '" type="radio" name="responsive_lightbox_settings[videos]" value="' . esc_attr($val) . '" ' . checked(($val === 'yes' ? TRUE : FALSE), $this->options['settings']['videos'], FALSE) . ' />
661
+ <label for="rl-videos-' . $val . '">' . $trans . '</label>';
662
+ }
 
663
 
664
+ echo '
665
+ <p class="description">' . __('Add lightbox to YouTube and Vimeo video links by default.', 'responsive-lightbox') . '</p>
666
  </div>';
667
+ }
668
 
669
 
670
+ public function rl_image_links()
671
+ {
672
+ echo '
673
  <div id="rl_image_links" class="wplikebtns">';
674
 
675
+ foreach ($this->choices as $val => $trans) {
676
+ echo '
677
+ <input id="rl-image-links-' . $val . '" type="radio" name="responsive_lightbox_settings[image_links]" value="' . esc_attr($val) . '" ' . checked(($val === 'yes' ? TRUE : FALSE), $this->options['settings']['image_links'], FALSE) . ' />
678
+ <label for="rl-image-links-' . $val . '">' . $trans . '</label>';
679
+ }
 
680
 
681
+ echo '
682
+ <p class="description">' . __('Add lightbox to WordPress image links by default.', 'responsive-lightbox') . '</p>
683
  </div>';
684
+ }
685
 
686
 
687
+ public function rl_images_as_gallery()
688
+ {
689
+ echo '
690
  <div id="rl_images_as_gallery" class="wplikebtns">';
691
 
692
+ foreach ($this->choices as $val => $trans) {
693
+ echo '
694
+ <input id="rl-images-as-gallery-' . $val . '" type="radio" name="responsive_lightbox_settings[images_as_gallery]" value="' . esc_attr($val) . '" ' . checked(($val === 'yes' ? TRUE : FALSE), $this->options['settings']['images_as_gallery'], FALSE) . ' />
695
+ <label for="rl-images-as-gallery-' . $val . '">' . $trans . '</label>';
696
+ }
 
697
 
698
+ echo '
699
+ <p class="description">' . __('Display single post images as a gallery.', 'responsive-lightbox') . '</p>
700
  </div>';
701
+ }
702
 
703
 
704
+ public function rl_deactivation_delete()
705
+ {
706
+ echo '
707
  <div id="rl_deactivation_delete" class="wplikebtns">';
708
 
709
+ foreach ($this->choices as $val => $trans) {
710
+ echo '
711
+ <input id="rl-deactivation-delete-' . $val . '" type="radio" name="responsive_lightbox_settings[deactivation_delete]" value="' . esc_attr($val) . '" ' . checked(($val === 'yes' ? TRUE : FALSE), $this->options['settings']['deactivation_delete'], FALSE) . ' />
712
+ <label for="rl-deactivation-delete-' . $val . '">' . $trans . '</label>';
713
+ }
 
714
 
715
+ echo '
716
+ <p class="description">' . __('Delete settings on plugin deactivation.', 'responsive-lightbox') . '</p>
717
  </div>';
718
+ }
719
 
720
 
721
+ public function rl_sb_animation()
722
+ {
723
+ echo '
724
  <div id="rl_sb_animation" class="wplikebtns">';
725
 
726
+ foreach ($this->scripts['swipebox']['animations'] as $val => $trans) {
727
+ echo '
728
+ <input id="rl-sb-animation-' . $val . '" type="radio" name="responsive_lightbox_configuration[swipebox][animation]" value="' . esc_attr($val) . '" ' . checked($val, $this->options['configuration']['swipebox']['animation'], FALSE) . ' />
729
+ <label for="rl-sb-animation-' . $val . '">' . $trans . '</label>';
730
+ }
 
731
 
732
+ echo '
733
+ <p class="description">' . __('Select a method of applying a lightbox effect.', 'responsive-lightbox') . '</p>
734
  </div>';
735
+ }
736
 
737
 
738
+ public function rl_sb_hide_bars()
739
+ {
740
+ echo '
741
  <div id="rl_sb_hide_bars" class="wplikebtns">';
742
 
743
+ foreach ($this->choices as $val => $trans) {
744
+ echo '
745
+ <input id="rl-sb-hide-bars-' . $val . '" type="radio" name="responsive_lightbox_configuration[swipebox][hide_bars]" value="' . esc_attr($val) . '" ' . checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['swipebox']['hide_bars'], FALSE) . ' />
746
+ <label for="rl-sb-hide-bars-' . $val . '">' . $trans . '</label>';
747
+ }
748
+
749
+ echo '
750
+ <p class="description">' . __('Disable if you don\'t want to top and bottom bars to be hidden after a period of time.', 'responsive-lightbox') . '</p>
751
+ <div id="rl_sb_hide_bars_delay"' . ($this->options['configuration']['swipebox']['hide_bars'] === FALSE ? ' style="display: none;"' : '') . '>
752
+ <input type="text" name="responsive_lightbox_configuration[swipebox][hide_bars_delay]" value="' . esc_attr($this->options['configuration']['swipebox']['hide_bars_delay']) . '" /> <span>ms</span>
753
+ <p class="description">' . __('Enter the time after which the top and bottom bars will be hidden (when hiding is enabled).', 'responsive-lightbox') . '</p>
 
754
  </div>
755
  </div>';
756
+ }
757
 
758
 
759
+ public function rl_sb_video_max_width()
760
+ {
761
+ echo '
762
  <div id="rl_sb_video_max_width">
763
+ <input type="text" name="responsive_lightbox_configuration[swipebox][video_max_width]" value="' . esc_attr($this->options['configuration']['swipebox']['video_max_width']) . '" /> <span>px</span>
764
+ <p class="description">' . __('Enter the max video width in a lightbox.', 'responsive-lightbox') . '</p>
765
  </div>';
766
+ }
767
 
768
 
769
+ public function rl_sb_force_png_icons()
770
+ {
771
+ echo '
772
  <div id="rl_sb_force_png_icons" class="wplikebtns">';
773
 
774
+ foreach ($this->choices as $val => $trans) {
775
+ echo '
776
+ <input id="rl-sb-force-png-icons-' . $val . '" type="radio" name="responsive_lightbox_configuration[swipebox][force_png_icons]" value="' . esc_attr($val) . '" ' . checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['swipebox']['force_png_icons'], FALSE) . ' />
777
+ <label for="rl-sb-force-png-icons-' . $val . '">' . $trans . '</label>';
778
+ }
 
779
 
780
+ echo '
781
+ <p class="description">' . __('Enable this if you\'re having problems with navigation icons not visible on some devices.', 'responsive-lightbox') . '</p>
782
  </div>';
783
+ }
784
 
785
 
786
+ public function rl_pp_animation_speed()
787
+ {
788
+ echo '
789
  <div id="rl_pp_animation_speed" class="wplikebtns">';
790
 
791
+ foreach ($this->scripts['prettyphoto']['animation_speeds'] as $val => $trans) {
792
+ echo '
793
+ <input id="rl-pp-animation-speed-' . $val . '" type="radio" name="responsive_lightbox_configuration[prettyphoto][animation_speed]" value="' . esc_attr($val) . '" ' . checked($val, $this->options['configuration']['prettyphoto']['animation_speed'], FALSE) . ' />
794
+ <label for="rl-pp-animation-speed-' . $val . '">' . $trans . '</label>';
795
+ }
 
796
 
797
+ echo '
798
+ <p class="description">' . __('Select animation speed for lightbox effect.', 'responsive-lightbox') . '</p>
799
  </div>';
800
+ }
801
 
802
 
803
+ public function rl_pp_slideshow()
804
+ {
805
+ echo '
806
  <div id="rl_pp_slideshow" class="wplikebtns">';
807
 
808
+ foreach ($this->choices as $val => $trans) {
809
+ echo '
810
+ <input id="rl-pp-slideshow-' . $val . '" type="radio" name="responsive_lightbox_configuration[prettyphoto][slideshow]" value="' . esc_attr($val) . '" ' . checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['prettyphoto']['slideshow'], FALSE) . ' />
811
+ <label for="rl-pp-slideshow-' . $val . '">' . $trans . '</label>';
812
+ }
813
+
814
+ echo '
815
+ <p class="description">' . __('Display images as slideshow.', 'responsive-lightbox') . '</p>
816
+ <div id="rl_pp_slideshow_delay"' . ($this->options['configuration']['prettyphoto']['slideshow'] === FALSE ? ' style="display: none;"' : '') . '>
817
+ <input type="text" name="responsive_lightbox_configuration[prettyphoto][slideshow_delay]" value="' . esc_attr($this->options['configuration']['prettyphoto']['slideshow_delay']) . '" /> <span>ms</span>
818
+ <p class="description">' . __('Enter time (in miliseconds).', 'responsive-lightbox') . '</p>
 
819
  </div>
820
  </div>';
821
+ }
822
 
823
 
824
+ public function rl_pp_slideshow_autoplay()
825
+ {
826
+ echo '
827
  <div id="rl_pp_slideshow_autoplay" class="wplikebtns">';
828
 
829
+ foreach ($this->choices as $val => $trans) {
830
+ echo '
831
+ <input id="rl-pp-slideshow-autoplay-' . $val . '" type="radio" name="responsive_lightbox_configuration[prettyphoto][slideshow_autoplay]" value="' . esc_attr($val) . '" ' . checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['prettyphoto']['slideshow_autoplay'], FALSE) . ' />
832
+ <label for="rl-pp-slideshow-autoplay-' . $val . '">' . $trans . '</label>';
833
+ }
 
834
 
835
+ echo '
836
+ <p class="description">' . __('Automatically start slideshow.', 'responsive-lightbox') . '</p>
837
  </div>';
838
+ }
839
 
840
 
841
+ public function rl_pp_opacity()
842
+ {
843
+ echo '
844
  <div id="rl_pp_opacity">
845
+ <input type="text" id="rl_pp_opacity_input" class="hide-if-js" name="responsive_lightbox_configuration[prettyphoto][opacity]" value="' . esc_attr($this->options['configuration']['prettyphoto']['opacity']) . '" />
846
  <div class="wplike-slider">
847
+ <span class="left hide-if-no-js">0</span><span class="middle" id="rl_pp_opacity_span" title="' . esc_attr($this->options['configuration']['prettyphoto']['opacity']) . '"></span><span class="right hide-if-no-js">100</span>
848
  </div>
849
+ <p class="description">' . __('Value between 0 and 100, 100 for no opacity.', 'responsive-lightbox') . '</p>
850
  </div>';
851
+ }
852
 
853
 
854
+ public function rl_pp_title()
855
+ {
856
+ echo '
857
  <div id="rl_pp_title" class="wplikebtns">';
858
 
859
+ foreach ($this->choices as $val => $trans) {
860
+ echo '
861
+ <input id="rl-pp-show-title-' . $val . '" type="radio" name="responsive_lightbox_configuration[prettyphoto][show_title]" value="' . esc_attr($val) . '" ' . checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['prettyphoto']['show_title'], FALSE) . ' />
862
+ <label for="rl-pp-show-title-' . $val . '">' . $trans . '</label>';
863
+ }
 
864
 
865
+ echo '
866
+ <p class="description">' . __('Display image tiltle.', 'responsive-lightbox') . '</p>
867
  </div>';
868
+ }
869
 
870
 
871
+ public function rl_pp_allow_resize()
872
+ {
873
+ echo '
874
  <div id="rl_pp_allow_resize" class="wplikebtns">';
875
 
876
+ foreach ($this->choices as $val => $trans) {
877
+ echo '
878
+ <input id="rl-pp-allow-resize-' . $val . '" type="radio" name="responsive_lightbox_configuration[prettyphoto][allow_resize]" value="' . esc_attr($val) . '" ' . checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['prettyphoto']['allow_resize'], FALSE) . ' />
879
+ <label for="rl-pp-allow-resize-' . $val . '">' . $trans . '</label>';
880
+ }
 
881
 
882
+ echo '
883
+ <p class="description">' . __('Resize the photos bigger than viewport.', 'responsive-lightbox') . '</p>
884
  </div>';
885
+ }
886
 
887
 
888
+ public function rl_pp_allow_expand()
889
+ {
890
+ echo '
891
  <div id="rl_pp_allow_expand" class="wplikebtns">';
892
 
893
+ foreach ($this->choices as $val => $trans) {
894
+ echo '
895
+ <input id="rl-pp-allow-expand-' . $val . '" type="radio" name="responsive_lightbox_configuration[prettyphoto][allow_expand]" value="' . esc_attr($val) . '" ' . checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['prettyphoto']['allow_expand'], FALSE) . ' />
896
+ <label for="rl-pp-allow-expand-' . $val . '">' . $trans . '</label>';
897
+ }
 
898
 
899
+ echo '
900
+ <p class="description">' . __('Expands something.', 'responsive-lightbox') . '</p>
901
  </div>';
902
+ }
903
 
904
 
905
+ public function rl_pp_width()
906
+ {
907
+ echo '
908
  <div id="rl_pp_width">
909
+ <input type="text" name="responsive_lightbox_configuration[prettyphoto][width]" value="' . esc_attr($this->options['configuration']['prettyphoto']['width']) . '" /> <span>px</span>
910
+ <p class="description">' . __('in pixels', 'responsive-lightbox') . '</p>
911
  </div>';
912
+ }
913
 
914
 
915
+ public function rl_pp_height()
916
+ {
917
+ echo '
918
  <div id="rl_pp_height">
919
+ <input type="text" name="responsive_lightbox_configuration[prettyphoto][height]" value="' . esc_attr($this->options['configuration']['prettyphoto']['height']) . '" /> <span>px</span>
920
+ <p class="description">' . __('in pixels', 'responsive-lightbox') . '</p>
921
  </div>';
922
+ }
923
+
924
 
925
+ public function rl_pp_theme()
926
+ {
927
+ echo '
928
  <div id="rl_pp_theme" class="wplikebtns">';
929
 
930
+ foreach ($this->scripts['prettyphoto']['themes'] as $val => $trans) {
931
+ echo '
932
+ <input id="rl-pp-theme-' . $val . '" type="radio" name="responsive_lightbox_configuration[prettyphoto][theme]" value="' . esc_attr($val) . '" ' . checked($val, $this->options['configuration']['prettyphoto']['theme'], FALSE) . ' />
933
+ <label for="rl-pp-theme-' . $val . '">' . $trans . '</label>';
934
+ }
 
935
 
936
+ echo '
937
+ <p class="description">' . __('Select theme for lightbox effect.', 'responsive-lightbox') . '</p>
938
  </div>';
939
+ }
940
 
941
 
942
+ public function rl_pp_horizontal_padding()
943
+ {
944
+ echo '
945
  <div id="rl_pp_horizontal_padding">
946
+ <input type="text" name="responsive_lightbox_configuration[prettyphoto][horizontal_padding]" value="' . esc_attr($this->options['configuration']['prettyphoto']['horizontal_padding']) . '" /> <span>px</span>
947
+ <p class="description">' . __('Horizontal padding (in pixels).', 'responsive-lightbox') . '</p>
948
  </div>';
949
+ }
950
 
951
 
952
+ public function rl_pp_hide_flash()
953
+ {
954
+ echo '
955
  <div id="rl_pp_hide_flash" class="wplikebtns">';
956
 
957
+ foreach ($this->choices as $val => $trans) {
958
+ echo '
959
+ <input id="rl-pp-hide-flash-' . $val . '" type="radio" name="responsive_lightbox_configuration[prettyphoto][hide_flash]" value="' . esc_attr($val) . '" ' . checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['prettyphoto']['hide_flash'], FALSE) . ' />
960
+ <label for="rl-pp-hide-flash-' . $val . '">' . $trans . '</label>';
961
+ }
 
962
 
963
+ echo '
964
+ <p class="description">' . __('Hides all the flash object on a page. Enable this if flash appears over prettyPhoto.', 'responsive-lightbox') . '</p>
965
  </div>';
966
+ }
967
 
968
 
969
+ public function rl_pp_wmode()
970
+ {
971
+ echo '
972
  <div id="rl_pp_wmode" class="wplikebtns">';
973
 
974
+ foreach ($this->scripts['prettyphoto']['wmodes'] as $val => $trans) {
975
+ echo '
976
+ <input id="rl-pp-wmode-' . $val . '" type="radio" name="responsive_lightbox_configuration[prettyphoto][wmode]" value="' . esc_attr($val) . '" ' . checked($val, $this->options['configuration']['prettyphoto']['wmode'], FALSE) . ' />
977
+ <label for="rl-pp-wmode-' . $val . '">' . $trans . '</label>';
978
+ }
 
979
 
980
+ echo '
981
+ <p class="description">' . __('Select flash window mode.', 'responsive-lightbox') . '</p>
982
  </div>';
983
+ }
984
 
985
 
986
+ public function rl_pp_video_autoplay()
987
+ {
988
+ echo '
989
  <div id="rl_pp_video_autoplay" class="wplikebtns">';
990
 
991
+ foreach ($this->choices as $val => $trans) {
992
+ echo '
993
+ <input id="rl-pp-video-autoplay-' . $val . '" type="radio" name="responsive_lightbox_configuration[prettyphoto][video_autoplay]" value="' . esc_attr($val) . '" ' . checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['prettyphoto']['video_autoplay'], FALSE) . ' />
994
+ <label for="rl-pp-video-autoplay-' . $val . '">' . $trans . '</label>';
995
+ }
 
996
 
997
+ echo '
998
+ <p class="description">' . __('Automatically start videos.', 'responsive-lightbox') . '</p>
999
  </div>';
1000
+ }
1001
 
1002
 
1003
+ public function rl_pp_modal()
1004
+ {
1005
+ echo '
1006
  <div id="rl_pp_modal" class="wplikebtns">';
1007
 
1008
+ foreach ($this->choices as $val => $trans) {
1009
+ echo '
1010
+ <input id="rl-pp-modal-close-' . $val . '" type="radio" name="responsive_lightbox_configuration[prettyphoto][modal]" value="' . esc_attr($val) . '" ' . checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['prettyphoto']['modal'], FALSE) . ' />
1011
+ <label for="rl-pp-modal-close-' . $val . '">' . $trans . '</label>';
1012
+ }
 
1013
 
1014
+ echo '
1015
+ <p class="description">' . __('If set to true, only the close button will close the window.', 'responsive-lightbox') . '</p>
1016
  </div>';
1017
+ }
1018
 
1019
 
1020
+ public function rl_pp_deeplinking()
1021
+ {
1022
+ echo '
1023
  <div id="rl_pp_deeplinking" class="wplikebtns">';
1024
 
1025
+ foreach ($this->choices as $val => $trans) {
1026
+ echo '
1027
+ <input id="rl-pp-deeplinking-' . $val . '" type="radio" name="responsive_lightbox_configuration[prettyphoto][deeplinking]" value="' . esc_attr($val) . '" ' . checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['prettyphoto']['deeplinking'], FALSE) . ' />
1028
+ <label for="rl-pp-deeplinking-' . $val . '">' . $trans . '</label>';
1029
+ }
 
1030
 
1031
+ echo '
1032
+ <p class="description">' . __('Allow prettyPhoto to update the url to enable deeplinking.', 'responsive-lightbox') . '</p>
1033
  </div>';
1034
+ }
1035
 
1036
 
1037
+ public function rl_pp_overlay_gallery()
1038
+ {
1039
+ echo '
1040
  <div id="rl_pp_overlay_gallery" class="wplikebtns">';
1041
 
1042
+ foreach ($this->choices as $val => $trans) {
1043
+ echo '
1044
+ <input id="rl-pp-overlay-gallery-' . $val . '" type="radio" name="responsive_lightbox_configuration[prettyphoto][overlay_gallery]" value="' . esc_attr($val) . '" ' . checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['prettyphoto']['overlay_gallery'], FALSE) . ' />
1045
+ <label for="rl-pp-overlay-gallery-' . $val . '">' . $trans . '</label>';
1046
+ }
 
1047
 
1048
+ echo '
1049
+ <p class="description">' . __('If enabled, a gallery will overlay the fullscreen image on mouse over.', 'responsive-lightbox') . '</p>
1050
  </div>';
1051
+ }
1052
 
1053
 
1054
+ public function rl_pp_keyboard_shortcuts()
1055
+ {
1056
+ echo '
1057
  <div id="rl_pp_keyboard_shortcuts" class="wplikebtns">';
1058
 
1059
+ foreach ($this->choices as $val => $trans) {
1060
+ echo '
1061
+ <input id="rl-pp-keyboard-shortcuts-' . $val . '" type="radio" name="responsive_lightbox_configuration[prettyphoto][keyboard_shortcuts]" value="' . esc_attr($val) . '" ' . checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['prettyphoto']['keyboard_shortcuts'], FALSE) . ' />
1062
+ <label for="rl-pp-keyboard-shortcuts-' . $val . '">' . $trans . '</label>';
1063
+ }
 
1064
 
1065
+ echo '
1066
+ <p class="description">' . __('Set to false if you open forms inside prettyPhoto.', 'responsive-lightbox') . '</p>
1067
  </div>';
1068
+ }
1069
 
1070
 
1071
+ public function rl_pp_social()
1072
+ {
1073
+ echo '
1074
  <div id="rl_pp_social" class="wplikebtns">';
1075
 
1076
+ foreach ($this->choices as $val => $trans) {
1077
+ echo '
1078
+ <input id="rl-pp-social-' . $val . '" type="radio" name="responsive_lightbox_configuration[prettyphoto][social]" value="' . esc_attr($val) . '" ' . checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['prettyphoto']['social'], FALSE) . ' />
1079
+ <label for="rl-pp-social-' . $val . '">' . $trans . '</label>';
1080
+ }
 
1081
 
1082
+ echo '
1083
+ <p class="description">' . __('Display links to Facebook and Twitter.', 'responsive-lightbox') . '</p>
1084
  </div>';
1085
+ }
1086
 
1087
 
1088
+ public function rl_fb_transitions()
1089
+ {
1090
+ echo '
1091
  <div id="rl_fb_transition" class="wplikebtns">';
1092
 
1093
+ foreach ($this->scripts['fancybox']['transitions'] as $val => $trans) {
1094
+ echo '
1095
+ <input id="rl-fb-transitions-' . $val . '" type="radio" name="responsive_lightbox_configuration[fancybox][transitions]" value="' . esc_attr($val) . '" ' . checked($val, $this->options['configuration']['fancybox']['transitions'], FALSE) . ' />
1096
+ <label for="rl-fb-transitions-' . $val . '">' . $trans . '</label>';
1097
+ }
 
1098
 
1099
+ echo '
1100
+ <p class="description">' . __('The transition type.', 'responsive-lightbox') . '</p>
1101
  </div>';
1102
+ }
1103
 
1104
 
1105
+ public function rl_fb_padding()
1106
+ {
1107
+ echo '
1108
  <div id="rl_fb_padding">
1109
+ <input type="text" name="responsive_lightbox_configuration[fancybox][padding]" value="' . esc_attr($this->options['configuration']['fancybox']['padding']) . '" /> <span>px</span>
1110
+ <p class="description">' . __('Space between FancyBox wrapper and content.', 'responsive-lightbox') . '</p>
1111
  </div>';
1112
+ }
1113
 
1114
 
1115
+ public function rl_fb_margin()
1116
+ {
1117
+ echo '
1118
  <div id="rl_fb_margin">
1119
+ <input type="text" name="responsive_lightbox_configuration[fancybox][margin]" value="' . esc_attr($this->options['configuration']['fancybox']['margin']) . '" /> <span>px</span>
1120
+ <p class="description">' . __('Space between viewport and FancyBox wrapper.', 'responsive-lightbox') . '</p>
1121
  </div>';
1122
+ }
1123
 
1124
 
1125
+ public function rl_fb_modal()
1126
+ {
1127
+ echo '
1128
  <div id="rl_fb_modal" class="wplikebtns">';
1129
 
1130
+ foreach ($this->choices as $val => $trans) {
1131
+ echo '
1132
+ <input id="rl-fb-modal-' . $val . '" type="radio" name="responsive_lightbox_configuration[fancybox][modal]" value="' . esc_attr($val) . '" ' . checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['fancybox']['modal'], FALSE) . ' />
1133
+ <label for="rl-fb-modal-' . $val . '">' . $trans . '</label>';
1134
+ }
 
1135
 
1136
+ echo '
1137
+ <p class="description">' . __('When true, "overlayShow" is set to TRUE and "hideOnOverlayClick", "hideOnContentClick", "enableEscapeButton", "showCloseButton" are set to FALSE.', 'responsive-lightbox') . '</p>
1138
  </div>';
1139
+ }
1140
 
1141
 
1142
+ public function rl_fb_show_overlay()
1143
+ {
1144
+ echo '
1145
  <div id="rl_fb_show_overlay" class="wplikebtns">';
1146
 
1147
+ foreach ($this->choices as $val => $trans) {
1148
+ echo '
1149
+ <input id="rl-fb-show-overlay-' . $val . '" type="radio" name="responsive_lightbox_configuration[fancybox][show_overlay]" value="' . esc_attr($val) . '" ' . checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['fancybox']['show_overlay'], FALSE) . ' ' . disabled($this->options['configuration']['fancybox']['modal'], TRUE, FALSE) . ' />
1150
+ <label for="rl-fb-show-overlay-' . $val . '">' . $trans . '</label>';
1151
+ }
 
1152
 
1153
+ echo '
1154
+ <p class="description">' . __('Toggle overlay.', 'responsive-lightbox') . '</p>
1155
  </div>';
1156
+ }
1157
 
1158
 
1159
+ public function rl_fb_show_close_button()
1160
+ {
1161
+ echo '
1162
  <div id="rl_fb_show_close_button" class="wplikebtns">';
1163
 
1164
+ foreach ($this->choices as $val => $trans) {
1165
+ echo '
1166
+ <input id="rl-fb-show-close-button-' . $val . '" type="radio" name="responsive_lightbox_configuration[fancybox][show_close_button]" value="' . esc_attr($val) . '" ' . checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['fancybox']['show_close_button'], FALSE) . ' ' . disabled($this->options['configuration']['fancybox']['modal'], TRUE, FALSE) . ' />
1167
+ <label for="rl-fb-show-close-button-' . $val . '">' . $trans . '</label>';
1168
+ }
 
1169
 
1170
+ echo '
1171
+ <p class="description">' . __('Toggle close button.', 'responsive-lightbox') . '</p>
1172
  </div>';
1173
+ }
1174
 
1175
 
1176
+ public function rl_fb_enable_escape_button()
1177
+ {
1178
+ echo '
1179
  <div id="rl_fb_enable_escape_button" class="wplikebtns">';
1180
 
1181
+ foreach ($this->choices as $val => $trans) {
1182
+ echo '
1183
+ <input id="rl-fb-enable-escape-button-' . $val . '" type="radio" name="responsive_lightbox_configuration[fancybox][enable_escape_button]" value="' . esc_attr($val) . '" ' . checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['fancybox']['enable_escape_button'], FALSE) . ' ' . disabled($this->options['configuration']['fancybox']['modal'], TRUE, FALSE) . ' />
1184
+ <label for="rl-fb-enable-escape-button-' . $val . '">' . $trans . '</label>';
1185
+ }
 
1186
 
1187
+ echo '
1188
+ <p class="description">' . __('Toggle if pressing Esc button closes FancyBox.', 'responsive-lightbox') . '</p>
1189
  </div>';
1190
+ }
1191
 
1192
 
1193
+ public function rl_fb_hide_on_overlay_click()
1194
+ {
1195
+ echo '
1196
  <div id="rl_fb_hide_on_overlay_click" class="wplikebtns">';
1197
 
1198
+ foreach ($this->choices as $val => $trans) {
1199
+ echo '
1200
+ <input id="rl-fb-hide-on-overlay-click-' . $val . '" type="radio" name="responsive_lightbox_configuration[fancybox][hide_on_overlay_click]" value="' . esc_attr($val) . '" ' . checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['fancybox']['hide_on_overlay_click'], FALSE) . ' ' . disabled($this->options['configuration']['fancybox']['modal'], TRUE, FALSE) . ' />
1201
+ <label for="rl-fb-hide-on-overlay-click-' . $val . '">' . $trans . '</label>';
1202
+ }
 
1203
 
1204
+ echo '
1205
+ <p class="description">' . __('Toggle if clicking the overlay should close FancyBox.', 'responsive-lightbox') . '</p>
1206
  </div>';
1207
+ }
1208
 
1209
 
1210
+ public function rl_fb_hide_on_content_click()
1211
+ {
1212
+ echo '
1213
  <div id="rl_fb_hide_on_content_click" class="wplikebtns">';
1214
 
1215
+ foreach ($this->choices as $val => $trans) {
1216
+ echo '
1217
+ <input id="rl-fb-hide-on-content-click-' . $val . '" type="radio" name="responsive_lightbox_configuration[fancybox][hide_on_content_click]" value="' . esc_attr($val) . '" ' . checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['fancybox']['hide_on_content_click'], FALSE) . ' ' . disabled($this->options['configuration']['fancybox']['modal'], TRUE, FALSE) . ' />
1218
+ <label for="rl-fb-hide-on-content-click-' . $val . '">' . $trans . '</label>';
1219
+ }
 
1220
 
1221
+ echo '
1222
+ <p class="description">' . __('Toggle if clicking the content should close FancyBox.', 'responsive-lightbox') . '</p>
1223
  </div>';
1224
+ }
1225
 
1226
 
1227
+ public function rl_fb_cyclic()
1228
+ {
1229
+ echo '
1230
  <div id="rl_fb_cyclic" class="wplikebtns">';
1231
 
1232
+ foreach ($this->choices as $val => $trans) {
1233
+ echo '
1234
+ <input id="rl-fb-cyclic-' . $val . '" type="radio" name="responsive_lightbox_configuration[fancybox][cyclic]" value="' . esc_attr($val) . '" ' . checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['fancybox']['cyclic'], FALSE) . ' />
1235
+ <label for="rl-fb-cyclic-' . $val . '">' . $trans . '</label>';
1236
+ }
 
1237
 
1238
+ echo '
1239
+ <p class="description">' . __('When true, galleries will be cyclic, allowing you to keep pressing next/back.', 'responsive-lightbox') . '</p>
1240
  </div>';
1241
+ }
1242
 
1243
 
1244
+ public function rl_fb_show_nav_arrows()
1245
+ {
1246
+ echo '
1247
  <div id="rl_fb_show_nav_arrows" class="wplikebtns">';
1248
 
1249
+ foreach ($this->choices as $val => $trans) {
1250
+ echo '
1251
+ <input id="rl-fb-show-nav-arrows-' . $val . '" type="radio" name="responsive_lightbox_configuration[fancybox][show_nav_arrows]" value="' . esc_attr($val) . '" ' . checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['fancybox']['show_nav_arrows'], FALSE) . ' />
1252
+ <label for="rl-fb-show-nav-arrows-' . $val . '">' . $trans . '</label>';
1253
+ }
 
1254
 
1255
+ echo '
1256
+ <p class="description">' . __('Toggle navigation arrows.', 'responsive-lightbox') . '</p>
1257
  </div>';
1258
+ }
1259
 
1260
 
1261
+ public function rl_fb_auto_scale()
1262
+ {
1263
+ echo '
1264
  <div id="rl_fb_auto_scale" class="wplikebtns">';
1265
 
1266
+ foreach ($this->choices as $val => $trans) {
1267
+ echo '
1268
+ <input id="rl-fb-auto-scale-' . $val . '" type="radio" name="responsive_lightbox_configuration[fancybox][auto_scale]" value="' . esc_attr($val) . '" ' . checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['fancybox']['auto_scale'], FALSE) . ' />
1269
+ <label for="rl-fb-auto-scale-' . $val . '">' . $trans . '</label>';
1270
+ }
 
1271
 
1272
+ echo '
1273
+ <p class="description">' . __('If true, FancyBox is scaled to fit in viewport.', 'responsive-lightbox') . '</p>
1274
  </div>';
1275
+ }
1276
 
1277
 
1278
+ public function rl_fb_scrolling()
1279
+ {
1280
+ echo '
1281
  <div id="rl_fb_scrolling" class="wplikebtns">';
1282
 
1283
+ foreach ($this->scripts['fancybox']['scrollings'] as $val => $trans) {
1284
+ echo '
1285
+ <input id="rl-fb-scrolling-' . $val . '" type="radio" name="responsive_lightbox_configuration[fancybox][scrolling]" value="' . esc_attr($val) . '" ' . checked($val, $this->options['configuration']['fancybox']['scrolling'], FALSE) . ' />
1286
+ <label for="rl-fb-scrolling-' . $val . '">' . $trans . '</label>';
1287
+ }
 
1288
 
1289
+ echo '
1290
+ <p class="description">' . __('Set the overflow CSS property to create or hide scrollbars.', 'responsive-lightbox') . '</p>
1291
  </div>';
1292
+ }
1293
 
1294
 
1295
+ public function rl_fb_center_on_scroll()
1296
+ {
1297
+ echo '
1298
  <div id="rl_fb_center_on_scroll" class="wplikebtns">';
1299
 
1300
+ foreach ($this->choices as $val => $trans) {
1301
+ echo '
1302
+ <input id="rl-fb-center-on-scroll-' . $val . '" type="radio" name="responsive_lightbox_configuration[fancybox][center_on_scroll]" value="' . esc_attr($val) . '" ' . checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['fancybox']['center_on_scroll'], FALSE) . ' />
1303
+ <label for="rl-fb-center-on-scroll-' . $val . '">' . $trans . '</label>';
1304
+ }
 
1305
 
1306
+ echo '
1307
+ <p class="description">' . __('When true, FancyBox is centered while scrolling page.', 'responsive-lightbox') . '</p>
1308
  </div>';
1309
+ }
1310
 
1311
 
1312
+ public function rl_fb_opacity()
1313
+ {
1314
+ echo '
1315
  <div id="rl_fb_opacity" class="wplikebtns">';
1316
 
1317
+ foreach ($this->choices as $val => $trans) {
1318
+ echo '
1319
+ <input id="rl-fb-opacity-' . $val . '" type="radio" name="responsive_lightbox_configuration[fancybox][opacity]" value="' . esc_attr($val) . '" ' . checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['fancybox']['opacity'], FALSE) . ' />
1320
+ <label for="rl-fb-opacity-' . $val . '">' . $trans . '</label>';
1321
+ }
 
1322
 
1323
+ echo '
1324
+ <p class="description">' . __('When true, transparency of content is changed for elastic transitions.', 'responsive-lightbox') . '</p>
1325
  </div>';
1326
+ }
1327
 
1328
 
1329
+ public function rl_fb_overlay_opacity()
1330
+ {
1331
+ echo '
1332
  <div id="rl_fb_overlay_opacity">
1333
+ <input type="text" id="rl_fb_overlay_opacity_input" class="hide-if-js" name="responsive_lightbox_configuration[fancybox][overlay_opacity]" value="' . esc_attr($this->options['configuration']['fancybox']['overlay_opacity']) . '" />
1334
  <div class="wplike-slider">
1335
+ <span class="left hide-if-no-js">0</span><span class="middle" id="rl_fb_overlay_opacity_span" title="' . esc_attr($this->options['configuration']['fancybox']['overlay_opacity']) . '"></span><span class="right hide-if-no-js">100</span>
1336
  </div>
1337
+ <p class="description">' . __('Opacity of the overlay.', 'responsive-lightbox') . '</p>
1338
  </div>';
1339
+ }
1340
 
1341
 
1342
+ public function rl_fb_overlay_color()
1343
+ {
1344
+ echo '
1345
  <div id="rl_fb_overlay_color">
1346
+ <input type="text" value="' . esc_attr($this->options['configuration']['fancybox']['overlay_color']) . '" id="rl_fb_overlay_color_input" name="responsive_lightbox_configuration[fancybox][overlay_color]" data-default-color="' . $this->defaults['configuration']['fancybox']['overlay_color'] . '" />
1347
+ <p class="description">' . __('Color of the overlay.', 'responsive-lightbox') . '</p>
1348
  </div>';
1349
+ }
1350
 
1351
 
1352
+ public function rl_fb_title_show()
1353
+ {
1354
+ echo '
1355
  <div id="rl_fb_title_show" class="wplikebtns">';
1356
 
1357
+ foreach ($this->choices as $val => $trans) {
1358
+ echo '
1359
+ <input id="rl-fb-title-show-' . $val . '" type="radio" name="responsive_lightbox_configuration[fancybox][title_show]" value="' . esc_attr($val) . '" ' . checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['fancybox']['title_show'], FALSE) . ' />
1360
+ <label for="rl-fb-title-show-' . $val . '">' . $trans . '</label>';
1361
+ }
 
1362
 
1363
+ echo '
1364
+ <p class="description">' . __('Toggle title.', 'responsive-lightbox') . '</p>
1365
  </div>';
1366
+ }
1367
 
1368
 
1369
+ public function rl_fb_title_position()
1370
+ {
1371
+ echo '
1372
  <div id="rl_fb_title_position" class="wplikebtns">';
1373
 
1374
+ foreach ($this->scripts['fancybox']['positions'] as $val => $trans) {
1375
+ echo '
1376
+ <input id="rl-fb-title-position-' . $val . '" type="radio" name="responsive_lightbox_configuration[fancybox][title_position]" value="' . esc_attr($val) . '" ' . checked($val, $this->options['configuration']['fancybox']['title_position'], FALSE) . ' />
1377
+ <label for="rl-fb-title-position-' . $val . '">' . $trans . '</label>';
1378
+ }
 
1379
 
1380
+ echo '
1381
+ <p class="description">' . __('The position of title.', 'responsive-lightbox') . '</p>
1382
  </div>';
1383
+ }
1384
 
1385
 
1386
+ public function rl_fb_easings()
1387
+ {
1388
+ echo '
1389
  <div id="rl_fb_easings" class="wplikebtns">';
1390
 
1391
+ foreach ($this->scripts['fancybox']['easings'] as $val => $trans) {
1392
+ echo '
1393
+ <input id="rl-fb-easings-' . $val . '" type="radio" name="responsive_lightbox_configuration[fancybox][easings]" value="' . esc_attr($val) . '" ' . checked($val, $this->options['configuration']['fancybox']['easings'], FALSE) . ' />
1394
+ <label for="rl-fb-easings-' . $val . '">' . $trans . '</label>';
1395
+ }
 
1396
 
1397
+ echo '
1398
+ <p class="description">' . __('Easing used for elastic animations.', 'responsive-lightbox') . '</p>
1399
  </div>';
1400
+ }
1401
 
1402
 
1403
+ public function rl_fb_speeds()
1404
+ {
1405
+ echo '
1406
  <div id="rl_fb_speeds">
1407
+ <input type="text" value="' . esc_attr($this->options['configuration']['fancybox']['speeds']) . '" name="responsive_lightbox_configuration[fancybox][speeds]" /> <span>ms</span>
1408
+ <p class="description">' . __('Speed of the fade and elastic transitions, in milliseconds.', 'responsive-lightbox') . '</p>
1409
  </div>';
1410
+ }
1411
 
1412
 
1413
+ public function rl_fb_change_speed()
1414
+ {
1415
+ echo '
1416
  <div id="rl_fb_change_speed">
1417
+ <input type="text" value="' . esc_attr($this->options['configuration']['fancybox']['change_speed']) . '" name="responsive_lightbox_configuration[fancybox][change_speed]" /> <span>ms</span>
1418
+ <p class="description">' . __('Speed of resizing when changing gallery items, in milliseconds.', 'responsive-lightbox') . '</p>
1419
  </div>';
1420
+ }
1421
 
1422
 
1423
+ public function rl_fb_change_fade()
1424
+ {
1425
+ echo '
1426
  <div id="rl_fb_change_fade">
1427
+ <input type="text" value="' . esc_attr($this->options['configuration']['fancybox']['change_fade']) . '" name="responsive_lightbox_configuration[fancybox][change_fade]" /> <span>ms</span>
1428
+ <p class="description">' . __('Speed of the content fading while changing gallery items.', 'responsive-lightbox') . '</p>
1429
  </div>';
1430
+ }
1431
 
1432
 
1433
+ public function rl_fb_video_width()
1434
+ {
1435
+ echo '
1436
  <div id="rl_fb_video_width">
1437
+ <input type="text" value="' . esc_attr($this->options['configuration']['fancybox']['video_width']) . '" name="responsive_lightbox_configuration[fancybox][video_width]" /> <span>px</span>
1438
+ <p class="description">' . __('Width of the video.', 'responsive-lightbox') . '</p>
1439
  </div>';
1440
+ }
1441
 
1442
 
1443
+ public function rl_fb_video_height()
1444
+ {
1445
+ echo '
1446
  <div id="rl_fb_video_height">
1447
+ <input type="text" value="' . esc_attr($this->options['configuration']['fancybox']['video_height']) . '" name="responsive_lightbox_configuration[fancybox][video_height]" /> <span>px</span>
1448
+ <p class="description">' . __('Height of the video.', 'responsive-lightbox') . '</p>
1449
  </div>';
1450
+ }
1451
 
1452
 
1453
+ public function rl_nv_effect()
1454
+ {
1455
+ echo '
1456
  <div id="rl_nv_effect" class="wplikebtns">';
1457
 
1458
+ foreach ($this->scripts['nivo']['effects'] as $val => $trans) {
1459
+ echo '
1460
+ <input id="rl-nv-effect-' . $val . '" type="radio" name="responsive_lightbox_configuration[nivo][effect]" value="' . esc_attr($val) . '" ' . checked($val, $this->options['configuration']['nivo']['effect'], FALSE) . ' />
1461
+ <label for="rl-nv-effect-' . $val . '">' . $trans . '</label>';
1462
+ }
 
1463
 
1464
+ echo '
1465
+ <p class="description">' . __('The effect to use when showing the lightbox.', 'responsive-lightbox') . '</p>
1466
  </div>';
1467
+ }
1468
 
1469
 
1470
+ public function rl_nv_keyboard_nav()
1471
+ {
1472
+ echo '
1473
  <div id="rl_nv_keyboard_nav" class="wplikebtns">';
1474
 
1475
+ foreach ($this->choices as $val => $trans) {
1476
+ echo '
1477
+ <input id="rl-nv-keyboard-nav-' . $val . '" type="radio" name="responsive_lightbox_configuration[nivo][keyboard_nav]" value="' . esc_attr($val) . '" ' . checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['nivo']['keyboard_nav'], FALSE) . ' />
1478
+ <label for="rl-nv-keyboard-nav-' . $val . '">' . $trans . '</label>';
1479
+ }
 
1480
 
1481
+ echo '
1482
+ <p class="description">' . __('Enable/Disable keyboard navigation (left/right/escape).', 'responsive-lightbox') . '</p>
1483
  </div>';
1484
+ }
1485
 
1486
 
1487
+ public function rl_nv_click_overlay_to_close()
1488
+ {
1489
+ echo '
1490
  <div id="rl_nv_click_overlay_to_close" class="wplikebtns">';
1491
 
1492
+ foreach ($this->choices as $val => $trans) {
1493
+ echo '
1494
+ <input id="rl-nv-click-overlay-to-close-' . $val . '" type="radio" name="responsive_lightbox_configuration[nivo][click_overlay_to_close]" value="' . esc_attr($val) . '" ' . checked(($val === 'yes' ? TRUE : FALSE), $this->options['configuration']['nivo']['click_overlay_to_close'], FALSE) . ' />
1495
+ <label for="rl-nv-click-overlay-to-close-' . $val . '">' . $trans . '</label>';
1496
+ }
 
1497
 
1498
+ echo '
1499
+ <p class="description">' . __('Eneble to close lightbox on overlay click.', 'responsive-lightbox') . '</p>
1500
  </div>';
1501
+ }
1502
 
1503
 
1504
+ public function rl_nv_error_message()
1505
+ {
1506
+ echo '
1507
  <div id="rl_nv_error_message">
1508
+ <input type="text" class="large-text" value="' . esc_attr($this->options['configuration']['nivo']['error_message']) . '" name="responsive_lightbox_configuration[nivo][error_message]" />
1509
+ <p class="description">' . __('Error message if the content cannot be loaded.', 'responsive-lightbox') . '</p>
1510
  </div>';
1511
+ }
1512
 
1513
 
1514
+ public function rl_il_animation_speed()
1515
+ {
1516
+ echo '
1517
  <div id="rl_il_animation_speed">
1518
+ <input type="text" value="' . esc_attr($this->options['configuration']['imagelightbox']['animation_speed']) . '" name="responsive_lightbox_configuration[imagelightbox][animation_speed]" /> <span>ms</span>
1519
+ <p class="description">' . __('Animation speed.', 'responsive-lightbox') . '</p>
1520
  </div>';
1521
+ }
1522
 
1523
 
1524
+ public function rl_il_preload_next()
1525
+ {
1526
+ echo '
1527
  <div id="rl_il_preload_next" class="wplikebtns">';
1528
 
1529
+ foreach ($this->choices as $val => $trans) {
1530
+ echo '
1531
+ <input id="rl-il-preload-next-' . $val . '" type="radio" name="responsive_lightbox_configuration[imagelightbox][preload_next]" value="' . esc_attr($val) . '" ' . checked(($val === 'yes' ? true : false), $this->options['configuration']['imagelightbox']['preload_next'], false) . ' />
1532
+ <label for="rl-il-preload-next-' . $val . '">' . $trans . '</label>';
1533
+ }
 
1534
 
1535
+ echo '
1536
+ <p class="description">' . __('Silently preload the next image.', 'responsive-lightbox') . '</p>
1537
  </div>';
1538
+ }
1539
 
1540
 
1541
+ public function rl_il_enable_keyboard()
1542
+ {
1543
+ echo '
1544
  <div id="rl_il_enable_keyboard" class="wplikebtns">';
1545
 
1546
+ foreach ($this->choices as $val => $trans) {
1547
+ echo '
1548
+ <input id="rl-il-enable-keyboard-' . $val . '" type="radio" name="responsive_lightbox_configuration[imagelightbox][enable_keyboard]" value="' . esc_attr($val) . '" ' . checked(($val === 'yes' ? true : false), $this->options['configuration']['imagelightbox']['enable_keyboard'], false) . ' />
1549
+ <label for="rl-il-enable-keyboard-' . $val . '">' . $trans . '</label>';
1550
+ }
 
1551
 
1552
+ echo '
1553
+ <p class="description">' . __('Enable keyboard shortcuts (arrows Left/Right and Esc).', 'responsive-lightbox') . '</p>
1554
  </div>';
1555
+ }
1556
 
1557
 
1558
+ public function rl_il_quit_on_end()
1559
+ {
1560
+ echo '
1561
  <div id="rl_il_quit_on_end" class="wplikebtns">';
1562
 
1563
+ foreach ($this->choices as $val => $trans) {
1564
+ echo '
1565
+ <input id="rl-il-quit-on-end-' . $val . '" type="radio" name="responsive_lightbox_configuration[imagelightbox][quit_on_end]" value="' . esc_attr($val) . '" ' . checked(($val === 'yes' ? true : false), $this->options['configuration']['imagelightbox']['quit_on_end'], false) . ' />
1566
+ <label for="rl-il-quit-on-end-' . $val . '">' . $trans . '</label>';
1567
+ }
 
1568
 
1569
+ echo '
1570
+ <p class="description">' . __('Quit after viewing the last image.', 'responsive-lightbox') . '</p>
1571
  </div>';
1572
+ }
1573
 
1574
 
1575
+ public function rl_il_quit_on_image_click()
1576
+ {
1577
+ echo '
1578
  <div id="rl_il_quit_on_image_click" class="wplikebtns">';
1579
 
1580
+ foreach ($this->choices as $val => $trans) {
1581
+ echo '
1582
+ <input id="rl-il-quit-on-image-click-' . $val . '" type="radio" name="responsive_lightbox_configuration[imagelightbox][quit_on_image_click]" value="' . esc_attr($val) . '" ' . checked(($val === 'yes' ? true : false), $this->options['configuration']['imagelightbox']['quit_on_image_click'], false) . ' />
1583
+ <label for="rl-il-quit-on-image-click-' . $val . '">' . $trans . '</label>';
1584
+ }
 
1585
 
1586
+ echo '
1587
+ <p class="description">' . __('Quit when the viewed image is clicked.', 'responsive-lightbox') . '</p>
1588
  </div>';
1589
+ }
1590
 
1591
 
1592
+ public function rl_il_quit_on_document_click()
1593
+ {
1594
+ echo '
1595
  <div id="rl_il_quit_on_document_click" class="wplikebtns">';
1596
 
1597
+ foreach ($this->choices as $val => $trans) {
1598
+ echo '
1599
+ <input id="rl-il-quit-on-document-click-' . $val . '" type="radio" name="responsive_lightbox_configuration[imagelightbox][quit_on_document_click]" value="' . esc_attr($val) . '" ' . checked(($val === 'yes' ? true : false), $this->options['configuration']['imagelightbox']['quit_on_document_click'], false) . ' />
1600
+ <label for="rl-il-quit-on-document-click-' . $val . '">' . $trans . '</label>';
1601
+ }
 
1602
 
1603
+ echo '
1604
+ <p class="description">' . __('Quit when anything but the viewed image is clicked.', 'responsive-lightbox') . '</p>
1605
  </div>';
1606
+ }
1607
 
1608
 
1609
+ /**
1610
+ * Validates settings
1611
+ */
1612
+ public function validate_options($input)
1613
+ {
1614
+ if (isset($_POST['save_rl_settings'])) {
1615
+ // script
1616
+ $input['script'] = (isset($input['script'], $this->scripts[$input['script']]) ? $input['script'] : $this->defaults['settings']['script']);
 
1617
 
1618
+ // selector
1619
+ $input['selector'] = sanitize_text_field(isset($input['selector']) && $input['selector'] !== '' ? $input['selector'] : $this->defaults['settings']['selector']);
1620
 
1621
+ // loading place
1622
+ $input['loading_place'] = (isset($input['loading_place'], $this->loading_places[$input['loading_place']]) ? $input['loading_place'] : $this->defaults['settings']['loading_place']);
1623
 
1624
+ // enable custom events
1625
+ $input['enable_custom_events'] = (isset($input['enable_custom_events'], $this->choices[$input['enable_custom_events']]) ? ($input['enable_custom_events'] === 'yes' ? true : false) : $this->defaults['settings']['enable_custom_events']);
1626
 
1627
+ // custom events
1628
+ if ($input['enable_custom_events'] === true) {
1629
+ $input['custom_events'] = sanitize_text_field(isset($input['custom_events']) && $input['custom_events'] !== '' ? $input['custom_events'] : $this->defaults['settings']['custom_events']);
1630
+ }
1631
+
1632
+ // enable gallery image size
1633
+ $input['enable_gallery_image_size'] = (isset($input['enable_gallery_image_size'], $this->choices[$input['enable_gallery_image_size']]) ? ($input['enable_gallery_image_size'] === 'yes' ? true : false) : $this->defaults['settings']['enable_gallery_image_size']);
1634
+
1635
+ // gallery image size
1636
+ if ($input['enable_gallery_image_size'] === true) {
1637
+ $input['gallery_image_size'] = esc_attr(isset($input['gallery_image_size']) && $input['gallery_image_size'] !== '' ? $input['gallery_image_size'] : $this->defaults['settings']['gallery_image_size']);
1638
+ }
1639
+
1640
+ // checkboxes
1641
+ $input['galleries'] = (isset($input['galleries'], $this->choices[$input['galleries']]) ? ($input['galleries'] === 'yes' ? true : false) : $this->defaults['settings']['galleries']);
1642
+ $input['videos'] = (isset($input['videos'], $this->choices[$input['videos']]) ? ($input['videos'] === 'yes' ? true : false) : $this->defaults['settings']['videos']);
1643
+ $input['image_links'] = (isset($input['image_links'], $this->choices[$input['image_links']]) ? ($input['image_links'] === 'yes' ? true : false) : $this->defaults['settings']['image_links']);
1644
+ $input['images_as_gallery'] = (isset($input['images_as_gallery'], $this->choices[$input['images_as_gallery']]) ? ($input['images_as_gallery'] === 'yes' ? true : false) : $this->defaults['settings']['images_as_gallery']);
1645
+ $input['deactivation_delete'] = (isset($input['deactivation_delete'], $this->choices[$input['deactivation_delete']]) ? ($input['deactivation_delete'] === 'yes' ? true : false) : $this->defaults['settings']['deactivation_delete']);
1646
+ } elseif (isset($_POST['save_rl_configuration'])) {
1647
+ if ($this->options['settings']['script'] === 'swipebox' && $_POST['script_r'] === 'swipebox') {
1648
+ //animation
1649
+ $input['swipebox']['animation'] = (isset($input['swipebox']['animation']) && in_array($input['swipebox']['animation'], array_keys($this->scripts['swipebox']['animations'])) ? $input['swipebox']['animation'] : $this->defaults['configuration']['swipebox']['animation']);
1650
+
1651
+ //force png icons
1652
+ $input['swipebox']['force_png_icons'] = (isset($input['swipebox']['force_png_icons']) && in_array($input['swipebox']['force_png_icons'], array_keys($this->choices)) ? ($input['swipebox']['force_png_icons'] === 'yes' ? TRUE : FALSE) : $this->defaults['configuration']['swipebox']['force_png_icons']);
1653
+
1654
+ //bars
1655
+ $input['swipebox']['hide_bars'] = (isset($input['swipebox']['hide_bars']) && in_array($input['swipebox']['hide_bars'], array_keys($this->choices)) ? ($input['swipebox']['hide_bars'] === 'yes' ? TRUE : FALSE) : $this->defaults['configuration']['swipebox']['hide_bars']);
1656
+ $input['swipebox']['hide_bars_delay'] = (int)($input['swipebox']['hide_bars_delay'] > 0 ? $input['swipebox']['hide_bars_delay'] : $this->defaults['configuration']['swipebox']['hide_bars_delay']);
1657
+
1658
+ //video width
1659
+ $input['swipebox']['video_max_width'] = (int)($input['swipebox']['video_max_width'] > 0 ? $input['swipebox']['video_max_width'] : $this->defaults['configuration']['swipebox']['video_max_width']);
1660
+ } elseif ($this->options['settings']['script'] === 'prettyphoto' && $_POST['script_r'] === 'prettyphoto') {
1661
+ //animation speed
1662
+ $input['prettyphoto']['animation_speed'] = (isset($input['prettyphoto']['animation_speed']) && in_array($input['prettyphoto']['animation_speed'], array_keys($this->scripts['prettyphoto']['animation_speeds'])) ? $input['prettyphoto']['animation_speed'] : $this->defaults['configuration']['prettyphoto']['animation_speed']);
1663
+
1664
+ //slideshows
1665
+ $input['prettyphoto']['slideshow'] = (isset($input['prettyphoto']['slideshow']) && in_array($input['prettyphoto']['slideshow'], array_keys($this->choices)) ? ($input['prettyphoto']['slideshow'] === 'yes' ? TRUE : FALSE) : $this->defaults['configuration']['prettyphoto']['slideshow']);
1666
+ $input['prettyphoto']['slideshow_delay'] = (int)($input['prettyphoto']['slideshow_delay'] > 0 ? $input['prettyphoto']['slideshow_delay'] : $this->defaults['configuration']['prettyphoto']['slideshow_delay']);
1667
+ $input['prettyphoto']['slideshow_autoplay'] = (isset($input['prettyphoto']['slideshow_autoplay']) && in_array($input['prettyphoto']['slideshow_autoplay'], array_keys($this->choices)) ? ($input['prettyphoto']['slideshow_autoplay'] === 'yes' ? TRUE : FALSE) : $this->defaults['configuration']['prettyphoto']['slideshow_autoplay']);
1668
+
1669
+ //opacity
1670
+ $input['prettyphoto']['opacity'] = (int)$input['prettyphoto']['opacity'];
1671
+
1672
+ if ($input['prettyphoto']['opacity'] < 0 || $input['prettyphoto']['opacity'] > 100)
1673
+ $input['prettyphoto']['opacity'] = $this->defaults['configuration']['prettyphoto']['opacity'];
1674
+
1675
+ //title
1676
+ $input['prettyphoto']['show_title'] = (isset($input['prettyphoto']['show_title']) && in_array($input['prettyphoto']['show_title'], array_keys($this->choices)) ? ($input['prettyphoto']['show_title'] === 'yes' ? TRUE : FALSE) : $this->defaults['configuration']['prettyphoto']['show_title']);
1677
+
1678
+ //resize
1679
+ $input['prettyphoto']['allow_resize'] = (isset($input['prettyphoto']['allow_resize']) && in_array($input['prettyphoto']['allow_resize'], array_keys($this->choices)) ? ($input['prettyphoto']['allow_resize'] === 'yes' ? TRUE : FALSE) : $this->defaults['configuration']['prettyphoto']['allow_resize']);
1680
+
1681
+ //expand
1682
+ $input['prettyphoto']['allow_expand'] = (isset($input['prettyphoto']['allow_expand']) && in_array($input['prettyphoto']['allow_expand'], array_keys($this->choices)) ? ($input['prettyphoto']['allow_expand'] === 'yes' ? TRUE : FALSE) : $this->defaults['configuration']['prettyphoto']['allow_expand']);
1683
+
1684
+ //dimensions
1685
+ $input['prettyphoto']['width'] = (int)($input['prettyphoto']['width'] > 0 ? $input['prettyphoto']['width'] : $this->defaults['configuration']['prettyphoto']['width']);
1686
+ $input['prettyphoto']['height'] = (int)($input['prettyphoto']['height'] > 0 ? $input['prettyphoto']['height'] : $this->defaults['configuration']['prettyphoto']['height']);
1687
+
1688
+ //separator
1689
+ $input['prettyphoto']['separator'] = sanitize_text_field(isset($input['prettyphoto']['separator']) && $input['prettyphoto']['separator'] !== '' ? $input['prettyphoto']['separator'] : $this->defaults['configuration']['prettyphoto']['separator']);
1690
+
1691
+ //theme
1692
+ $input['prettyphoto']['theme'] = (isset($input['prettyphoto']['theme']) && in_array($input['prettyphoto']['theme'], array_keys($this->scripts['prettyphoto']['themes'])) ? $input['prettyphoto']['theme'] : $this->defaults['configuration']['prettyphoto']['theme']);
1693
+
1694
+ //padding
1695
+ $input['prettyphoto']['horizontal_padding'] = (int)($input['prettyphoto']['horizontal_padding'] > 0 ? $input['prettyphoto']['horizontal_padding'] : $this->defaults['configuration']['prettyphoto']['horizontal_padding']);
1696
+
1697
+ //flash
1698
+ $input['prettyphoto']['hide_flash'] = (isset($input['prettyphoto']['hide_flash']) && in_array($input['prettyphoto']['hide_flash'], array_keys($this->choices)) ? ($input['prettyphoto']['hide_flash'] === 'yes' ? TRUE : FALSE) : $this->defaults['configuration']['prettyphoto']['hide_flash']);
1699
+ $input['prettyphoto']['wmode'] = (isset($input['prettyphoto']['wmode']) && in_array($input['prettyphoto']['wmode'], array_keys($this->scripts['prettyphoto']['wmodes'])) ? $input['prettyphoto']['wmode'] : $this->defaults['configuration']['prettyphoto']['wmode']);
1700
+
1701
+ //video autoplay
1702
+ $input['prettyphoto']['video_autoplay'] = (isset($input['prettyphoto']['video_autoplay']) && in_array($input['prettyphoto']['video_autoplay'], array_keys($this->choices)) ? ($input['prettyphoto']['video_autoplay'] === 'yes' ? TRUE : FALSE) : $this->defaults['configuration']['prettyphoto']['video_autoplay']);
1703
+
1704
+ //modal
1705
+ $input['prettyphoto']['modal'] = (isset($input['prettyphoto']['modal']) && in_array($input['prettyphoto']['modal'], array_keys($this->choices)) ? ($input['prettyphoto']['modal'] === 'yes' ? TRUE : FALSE) : $this->defaults['configuration']['prettyphoto']['modal']);
1706
+
1707
+ //deeplinking
1708
+ $input['prettyphoto']['deeplinking'] = (isset($input['prettyphoto']['deeplinking']) && in_array($input['prettyphoto']['deeplinking'], array_keys($this->choices)) ? ($input['prettyphoto']['deeplinking'] === 'yes' ? TRUE : FALSE) : $this->defaults['configuration']['prettyphoto']['deeplinking']);
1709
 
1710
+ //overlay gallery
1711
+ $input['prettyphoto']['overlay_gallery'] = (isset($input['prettyphoto']['overlay_gallery']) && in_array($input['prettyphoto']['overlay_gallery'], array_keys($this->choices)) ? ($input['prettyphoto']['overlay_gallery'] === 'yes' ? TRUE : FALSE) : $this->defaults['configuration']['prettyphoto']['overlay_gallery']);
1712
 
1713
+ //keyboard shortcuts
1714
+ $input['prettyphoto']['keyboard_shortcuts'] = (isset($input['prettyphoto']['keyboard_shortcuts']) && in_array($input['prettyphoto']['keyboard_shortcuts'], array_keys($this->choices)) ? ($input['prettyphoto']['keyboard_shortcuts'] === 'yes' ? TRUE : FALSE) : $this->defaults['configuration']['prettyphoto']['keyboard_shortcuts']);
 
1715
 
1716
+ //social
1717
+ $input['prettyphoto']['social'] = (isset($input['prettyphoto']['social']) && in_array($input['prettyphoto']['social'], array_keys($this->choices)) ? ($input['prettyphoto']['social'] === 'yes' ? TRUE : FALSE) : $this->defaults['configuration']['prettyphoto']['social']);
1718
+ } elseif ($this->options['settings']['script'] === 'fancybox' && $_POST['script_r'] === 'fancybox') {
1719
+ //modal
1720
+ $input['fancybox']['modal'] = (isset($input['fancybox']['modal']) && in_array($input['fancybox']['modal'], array_keys($this->choices)) ? ($input['fancybox']['modal'] === 'yes' ? TRUE : FALSE) : $this->defaults['configuration']['fancybox']['modal']);
 
 
1721
 
1722
+ //show overlay
1723
+ $input['fancybox']['show_overlay'] = (isset($input['fancybox']['show_overlay']) && in_array($input['fancybox']['show_overlay'], array_keys($this->choices)) ? ($input['fancybox']['show_overlay'] === 'yes' ? TRUE : FALSE) : $this->defaults['configuration']['fancybox']['show_overlay']);
 
 
1724
 
1725
+ //show close button
1726
+ $input['fancybox']['show_close_button'] = (isset($input['fancybox']['show_close_button']) && in_array($input['fancybox']['show_close_button'], array_keys($this->choices)) ? ($input['fancybox']['show_close_button'] === 'yes' ? TRUE : FALSE) : $this->defaults['configuration']['fancybox']['show_close_button']);
1727
 
1728
+ //enable escape button
1729
+ $input['fancybox']['enable_escape_button'] = (isset($input['fancybox']['enable_escape_button']) && in_array($input['fancybox']['enable_escape_button'], array_keys($this->choices)) ? ($input['fancybox']['enable_escape_button'] === 'yes' ? TRUE : FALSE) : $this->defaults['configuration']['fancybox']['enable_escape_button']);
1730
 
1731
+ //hide on overlay click
1732
+ $input['fancybox']['hide_on_overlay_click'] = (isset($input['fancybox']['hide_on_overlay_click']) && in_array($input['fancybox']['hide_on_overlay_click'], array_keys($this->choices)) ? ($input['fancybox']['hide_on_overlay_click'] === 'yes' ? TRUE : FALSE) : $this->defaults['configuration']['fancybox']['hide_on_overlay_click']);
1733
 
1734
+ //hide on content click
1735
+ $input['fancybox']['hide_on_content_click'] = (isset($input['fancybox']['hide_on_content_click']) && in_array($input['fancybox']['hide_on_content_click'], array_keys($this->choices)) ? ($input['fancybox']['hide_on_content_click'] === 'yes' ? TRUE : FALSE) : $this->defaults['configuration']['fancybox']['hide_on_content_click']);
1736
 
1737
+ //cyclic
1738
+ $input['fancybox']['cyclic'] = (isset($input['fancybox']['cyclic']) && in_array($input['fancybox']['cyclic'], array_keys($this->choices)) ? ($input['fancybox']['cyclic'] === 'yes' ? TRUE : FALSE) : $this->defaults['configuration']['fancybox']['cyclic']);
1739
 
1740
+ //show nav arrows
1741
+ $input['fancybox']['show_nav_arrows'] = (isset($input['fancybox']['show_nav_arrows']) && in_array($input['fancybox']['show_nav_arrows'], array_keys($this->choices)) ? ($input['fancybox']['show_nav_arrows'] === 'yes' ? TRUE : FALSE) : $this->defaults['configuration']['fancybox']['show_nav_arrows']);
 
1742
 
1743
+ //auto scale
1744
+ $input['fancybox']['auto_scale'] = (isset($input['fancybox']['auto_scale']) && in_array($input['fancybox']['auto_scale'], array_keys($this->choices)) ? ($input['fancybox']['auto_scale'] === 'yes' ? TRUE : FALSE) : $this->defaults['configuration']['fancybox']['auto_scale']);
1745
 
1746
+ //scrolling
1747
+ $input['fancybox']['scrolling'] = (isset($input['fancybox']['scrolling']) && in_array($input['fancybox']['scrolling'], array_keys($this->scripts['fancybox']['scrollings'])) ? $input['fancybox']['scrolling'] : $this->defaults['configuration']['fancybox']['scrolling']);
1748
 
1749
+ //center on scroll
1750
+ $input['fancybox']['center_on_scroll'] = (isset($input['fancybox']['center_on_scroll']) && in_array($input['fancybox']['center_on_scroll'], array_keys($this->choices)) ? ($input['fancybox']['center_on_scroll'] === 'yes' ? TRUE : FALSE) : $this->defaults['configuration']['fancybox']['center_on_scroll']);
1751
 
1752
+ //opacity
1753
+ $input['fancybox']['opacity'] = (isset($input['fancybox']['opacity']) && in_array($input['fancybox']['opacity'], array_keys($this->choices)) ? ($input['fancybox']['opacity'] === 'yes' ? TRUE : FALSE) : $this->defaults['configuration']['fancybox']['opacity']);
 
1754
 
1755
+ //title_show
1756
+ $input['fancybox']['title_show'] = (isset($input['fancybox']['title_show']) && in_array($input['fancybox']['title_show'], array_keys($this->choices)) ? ($input['fancybox']['title_show'] === 'yes' ? TRUE : FALSE) : $this->defaults['configuration']['fancybox']['title_show']);
1757
 
1758
+ //overlay opacity
1759
+ $input['fancybox']['overlay_opacity'] = (int)$input['fancybox']['overlay_opacity'];
1760
 
1761
+ if ($input['fancybox']['overlay_opacity'] < 0 || $input['fancybox']['overlay_opacity'] > 100)
1762
+ $input['fancybox']['overlay_opacity'] = $this->defaults['configuration']['fancybox']['overlay_opacity'];
1763
 
1764
+ //overlay color
1765
+ $input['fancybox']['overlay_color'] = sanitize_text_field($input['fancybox']['overlay_color']);
1766
 
1767
+ //title position
1768
+ $input['fancybox']['title_position'] = (isset($input['fancybox']['title_position']) && in_array($input['fancybox']['title_position'], array_keys($this->scripts['fancybox']['positions'])) ? $input['fancybox']['title_position'] : $this->defaults['configuration']['fancybox']['title_position']);
1769
 
1770
+ //transitions
1771
+ $input['fancybox']['transitions'] = (isset($input['fancybox']['transitions']) && in_array($input['fancybox']['transitions'], array_keys($this->scripts['fancybox']['transitions'])) ? $input['fancybox']['transitions'] : $this->defaults['configuration']['fancybox']['transitions']);
 
 
 
 
 
1772
 
1773
+ //easings
1774
+ $input['fancybox']['easings'] = (isset($input['fancybox']['easings']) && in_array($input['fancybox']['easings'], array_keys($this->scripts['fancybox']['easings'])) ? $input['fancybox']['easings'] : $this->defaults['configuration']['fancybox']['easings']);
1775
 
1776
+ //speeds
1777
+ $input['fancybox']['speeds'] = (int)($input['fancybox']['speeds'] > 0 ? $input['fancybox']['speeds'] : $this->defaults['configuration']['fancybox']['speeds']);
1778
 
1779
+ //change speed
1780
+ $input['fancybox']['change_speed'] = (int)($input['fancybox']['change_speed'] > 0 ? $input['fancybox']['change_speed'] : $this->defaults['configuration']['fancybox']['change_speed']);
1781
 
1782
+ //change fade
1783
+ $input['fancybox']['change_fade'] = (int)($input['fancybox']['change_fade'] > 0 ? $input['fancybox']['change_fade'] : $this->defaults['configuration']['fancybox']['change_fade']);
1784
 
1785
+ //padding
1786
+ $input['fancybox']['padding'] = (int)($input['fancybox']['padding'] > 0 ? $input['fancybox']['padding'] : $this->defaults['configuration']['fancybox']['padding']);
1787
 
1788
+ //margin
1789
+ $input['fancybox']['margin'] = (int)($input['fancybox']['margin'] > 0 ? $input['fancybox']['margin'] : $this->defaults['configuration']['fancybox']['margin']);
1790
 
1791
+ //video width
1792
+ $input['fancybox']['video_width'] = (int)($input['fancybox']['video_width'] > 0 ? $input['fancybox']['video_width'] : $this->defaults['configuration']['fancybox']['video_width']);
1793
 
1794
+ //video height
1795
+ $input['fancybox']['video_height'] = (int)($input['fancybox']['video_height'] > 0 ? $input['fancybox']['video_height'] : $this->defaults['configuration']['fancybox']['video_height']);
1796
+ } elseif ($this->options['settings']['script'] === 'nivo' && $_POST['script_r'] === 'nivo') {
1797
+ //effect
1798
+ $input['nivo']['effect'] = (isset($input['nivo']['effect']) && in_array($input['nivo']['effect'], array_keys($this->scripts['nivo']['effects'])) ? $input['nivo']['effect'] : $this->defaults['configuration']['nivo']['effect']);
1799
 
1800
+ //keyboard navigation
1801
+ $input['nivo']['keyboard_nav'] = (isset($input['nivo']['keyboard_nav']) && in_array($input['nivo']['keyboard_nav'], array_keys($this->choices)) ? ($input['nivo']['keyboard_nav'] === 'yes' ? TRUE : FALSE) : $this->defaults['configuration']['nivo']['keyboard_nav']);
1802
 
1803
+ // keyboard navigation
1804
+ $input['nivo']['click_overlay_to_close'] = (isset($input['nivo']['click_overlay_to_close']) && in_array($input['nivo']['click_overlay_to_close'], array_keys($this->choices)) ? ($input['nivo']['click_overlay_to_close'] === 'yes' ? true : false) : $this->defaults['configuration']['nivo']['click_overlay_to_close']);
1805
 
1806
+ //error message
1807
+ $input['nivo']['error_message'] = sanitize_text_field($input['nivo']['error_message']);
1808
+ } elseif ($this->options['settings']['script'] === 'imagelightbox' && $_POST['script_r'] === 'imagelightbox') {
1809
+ // animation speed
1810
+ $input['imagelightbox']['animation_speed'] = (int)$input['imagelightbox']['animation_speed'];
1811
 
1812
+ // preload next image
1813
+ $input['imagelightbox']['preload_next'] = (isset($input['imagelightbox']['preload_next'], $this->choices[$input['imagelightbox']['preload_next']]) ? ($input['imagelightbox']['preload_next'] === 'yes' ? true : false) : $this->defaults['configuration']['imagelightbox']['preload_next']);
1814
 
1815
+ // enable keyboard keys
1816
+ $input['imagelightbox']['enable_keyboard'] = (isset($input['imagelightbox']['enable_keyboard'], $this->choices[$input['imagelightbox']['enable_keyboard']]) ? ($input['imagelightbox']['enable_keyboard'] === 'yes' ? true : false) : $this->defaults['configuration']['imagelightbox']['enable_keyboard']);
1817
 
1818
+ // quit on last image
1819
+ $input['imagelightbox']['quit_on_end'] = (isset($input['imagelightbox']['quit_on_end'], $this->choices[$input['imagelightbox']['quit_on_end']]) ? ($input['imagelightbox']['quit_on_end'] === 'yes' ? true : false) : $this->defaults['configuration']['imagelightbox']['quit_on_end']);
1820
 
1821
+ // quit on image click
1822
+ $input['imagelightbox']['quit_on_image_click'] = (isset($input['imagelightbox']['quit_on_image_click'], $this->choices[$input['imagelightbox']['quit_on_image_click']]) ? ($input['imagelightbox']['quit_on_image_click'] === 'yes' ? true : false) : $this->defaults['configuration']['imagelightbox']['quit_on_image_click']);
1823
 
1824
+ // quit on document click
1825
+ $input['imagelightbox']['quit_on_document_click'] = (isset($input['imagelightbox']['quit_on_document_click'], $this->choices[$input['imagelightbox']['quit_on_document_click']]) ? ($input['imagelightbox']['quit_on_document_click'] === 'yes' ? true : false) : $this->defaults['configuration']['imagelightbox']['quit_on_document_click']);
1826
+ } else {
1827
+ //clear input to not change settings
1828
+ $input = array();
1829
 
1830
+ add_settings_error('save_script_settings', 'invalid_script_page', __('Changes were not saved because there was attempt to save settings of inactive script. The site has been reloaded to the proper script settings.', 'responsive-lightbox'), 'error');
1831
+ }
1832
 
1833
+ //we have to merge rest of the scripts settings
1834
+ $input = array_merge($this->options['configuration'], $input);
1835
+ } elseif (isset($_POST['reset_rl_settings'])) {
1836
+ $input = $this->defaults['settings'];
1837
 
1838
+ add_settings_error('reset_general_settings', 'general_reset', __('Settings restored to defaults.', 'responsive-lightbox'), 'updated');
1839
+ } elseif (isset($_POST['reset_rl_configuration'])) {
1840
+ if ($this->options['settings']['script'] === 'swipebox' && $_POST['script_r'] === 'swipebox') {
1841
+ $input['swipebox'] = $this->defaults['configuration']['swipebox'];
1842
 
1843
+ add_settings_error('reset_swipebox_settings', 'swipebox_reset', __('Settings of SwipeBox script were restored to defaults.', 'responsive-lightbox'), 'updated');
1844
+ } elseif ($this->options['settings']['script'] === 'prettyphoto' && $_POST['script_r'] === 'prettyphoto') {
1845
+ $input['prettyphoto'] = $this->defaults['configuration']['prettyphoto'];
1846
 
1847
+ add_settings_error('reset_prettyphoto_settings', 'prettyphoto_reset', __('Settings of prettyPhoto script were restored to defaults.', 'responsive-lightbox'), 'updated');
1848
+ } elseif ($this->options['settings']['script'] === 'fancybox' && $_POST['script_r'] === 'fancybox') {
1849
+ $input['fancybox'] = $this->defaults['configuration']['fancybox'];
 
 
1850
 
1851
+ add_settings_error('reset_fancybox_settings', 'fancybox_reset', __('Settings of FancyBox script were restored to defaults.', 'responsive-lightbox'), 'updated');
1852
+ } elseif ($this->options['settings']['script'] === 'nivo' && $_POST['script_r'] === 'nivo') {
1853
+ $input['nivo'] = $this->defaults['configuration']['nivo'];
1854
 
1855
+ add_settings_error('reset_nivo_settings', 'nivo_reset', __('Settings of Nivo script were restored to defaults.', 'responsive-lightbox'), 'updated');
1856
+ } else {
1857
+ add_settings_error('reset_script_settings', 'reset_invalid_script_page', __('Changes were not set to defaults because there was attempt to reset settings of inactive script. The site has been reloaded to the proper script settings.', 'responsive-lightbox'), 'error');
1858
+ }
1859
 
1860
+ //we have to merge rest of the scripts settings
1861
+ $input = array_merge($this->options['configuration'], $input);
1862
+ }
 
 
 
 
1863
 
1864
+ return $input;
1865
+ }
1866
 
 
 
1867
 
1868
+ public function admin_menu_options()
1869
+ {
1870
+ add_options_page(
1871
+ __('Responsive Lightbox', 'responsive-lightbox'),
1872
+ __('Responsive Lightbox', 'responsive-lightbox'),
1873
+ 'manage_options',
1874
+ 'responsive-lightbox',
1875
+ array(&$this, 'options_page')
1876
+ );
1877
+ }
 
 
 
1878
 
 
 
1879
 
1880
+ public function options_page()
1881
+ {
1882
+ $tab_key = (isset($_GET['tab']) ? $_GET['tab'] : 'general-settings');
1883
 
1884
+ echo '
1885
+ <div class="wrap">' . screen_icon() . '
1886
+ <h2>' . __('Responsive Lightbox', 'responsive-lightbox') . '</h2>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1887
  <h2 class="nav-tab-wrapper">';
1888
 
1889
+ foreach ($this->tabs as $key => $name) {
1890
+ echo '
1891
+ <a class="nav-tab ' . ($tab_key == $key ? 'nav-tab-active' : '') . '" href="' . esc_url(admin_url('options-general.php?page=responsive-lightbox&tab=' . $key)) . '">' . $name['name'] . '</a>';
1892
+ }
 
1893
 
1894
+ echo '
1895
  </h2>
1896
  <div class="responsive-lightbox-settings">
1897
 
1898
  <div class="df-credits">
1899
+ <h3 class="hndle">' . __('Responsive Lightbox', 'responsive-lightbox') . ' ' . $this->defaults['version'] . '</h3>
1900
  <div class="inside">
1901
+ <h4 class="inner">' . __('Need support?', 'responsive-lightbox') . '</h4>
1902
+ <p class="inner">' . __('If you are having problems with this plugin, please talk about them in the', 'responsive-lightbox') . ' <a href="http://www.dfactory.eu/support/?utm_source=responsive-lightbox-settings&utm_medium=link&utm_campaign=support" target="_blank" title="' . __('Support forum', 'responsive-lightbox') . '">' . __('Support forum', 'responsive-lightbox') . '</a></p>
1903
  <hr />
1904
+ <h4 class="inner">' . __('Do you like this plugin?', 'responsive-lightbox') . '</h4>
1905
+ <p class="inner"><a href="http://wordpress.org/support/view/plugin-reviews/responsive-lightbox" target="_blank" title="' . __('Rate it 5', 'responsive-lightbox') . '">' . __('Rate it 5', 'responsive-lightbox') . '</a> ' . __('on WordPress.org', 'responsive-lightbox') . '<br />' .
1906
+ __('Blog about it & link to the', 'responsive-lightbox') . ' <a href="http://www.dfactory.eu/plugins/responsive-lightbox/?utm_source=responsive-lightbox-settings&utm_medium=link&utm_campaign=blog-about" target="_blank" title="' . __('plugin page', 'responsive-lightbox') . '">' . __('plugin page', 'responsive-lightbox') . '</a><br />' .
1907
+ __('Check out our other', 'responsive-lightbox') . ' <a href="http://www.dfactory.eu/?utm_source=responsive-lightbox-settings&utm_medium=link&utm_campaign=other-plugins" target="_blank" title="' . __('WordPress plugins', 'responsive-lightbox') . '">' . __('WordPress plugins', 'responsive-lightbox') . '</a>
1908
  </p>
1909
  <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank" class="inner">
1910
  <input type="hidden" name="cmd" value="_s-xclick">
1913
  <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
1914
  </form>
1915
  <hr />
1916
+ <p class="df-link inner">Created by <a href="http://www.dfactory.eu/?utm_source=responsive-lightbox-settings&utm_medium=link&utm_campaign=created-by" target="_blank" title="dFactory - Quality plugins for WordPress"><img src="' . plugins_url('/images/logo-dfactory.png', __FILE__) . '" title="dFactory - Quality plugins for WordPress" alt="dFactory - Quality plugins for WordPress" /></a></p>
1917
  </div>
1918
  </div>
1919
 
1920
  <form action="options.php" method="post">
1921
+ <input type="hidden" name="script_r" value="' . esc_attr($this->options['settings']['script']) . '" />';
1922
 
1923
+ wp_nonce_field('update-options');
1924
+ settings_fields($this->tabs[$tab_key]['key']);
1925
+ do_settings_sections($this->tabs[$tab_key]['key']);
1926
 
1927
+ echo '
1928
  <p class="submit">';
1929
 
1930
+ submit_button('', 'primary', $this->tabs[$tab_key]['submit'], FALSE);
1931
 
1932
+ echo ' ';
1933
+ echo submit_button(__('Reset to defaults', 'responsive-lightbox'), 'secondary', $this->tabs[$tab_key]['reset'], FALSE);
1934
 
1935
+ echo '
1936
  </p>
1937
  </form>
1938
  </div>
1939
  <div class="clear"></div>
1940
  </div>';
1941
+ }
1942
+
1943
+
1944
+ public function admin_scripts_styles($page)
1945
+ {
1946
+ if ($page === 'settings_page_responsive-lightbox') {
1947
+ wp_register_script(
1948
+ 'responsive-lightbox-admin',
1949
+ plugins_url('js/admin.js', __FILE__),
1950
+ array('jquery', 'jquery-ui-core', 'jquery-ui-button', 'jquery-ui-slider', 'wp-color-picker')
1951
+ );
1952
+
1953
+ wp_enqueue_script('responsive-lightbox-admin');
1954
+
1955
+ wp_localize_script(
1956
+ 'responsive-lightbox-admin',
1957
+ 'rlArgs',
1958
+ array(
1959
+ 'resetSettingsToDefaults' => __('Are you sure you want to reset these settings to defaults?', 'responsive-lightbox'),
1960
+ 'resetScriptToDefaults' => __('Are you sure you want to reset scripts settings to defaults?', 'responsive-lightbox'),
1961
+ 'opacity_pp' => $this->options['configuration']['prettyphoto']['opacity'],
1962
+ 'opacity_fb' => $this->options['configuration']['fancybox']['overlay_opacity']
1963
+ )
1964
+ );
1965
+
1966
+ wp_enqueue_style('wp-color-picker');
1967
+
1968
+ wp_register_style(
1969
+ 'responsive-lightbox-admin',
1970
+ plugins_url('css/admin.css', __FILE__)
1971
+ );
1972
+
1973
+ wp_enqueue_style('responsive-lightbox-admin');
1974
+
1975
+ wp_register_style(
1976
+ 'responsive-lightbox-wplike',
1977
+ plugins_url('css/wp-like-ui-theme.css', __FILE__)
1978
+ );
1979
+
1980
+ wp_enqueue_style('responsive-lightbox-wplike');
1981
+ }
1982
+ }
1983
+
1984
+
1985
+ public function front_scripts_styles()
1986
+ {
1987
+ $args = apply_filters('rl_lightbox_args', array(
1988
+ 'script' => $this->options['settings']['script'],
1989
+ 'selector' => $this->options['settings']['selector'],
1990
+ 'custom_events' => ($this->options['settings']['enable_custom_events'] === TRUE ? ' ' . $this->options['settings']['custom_events'] : ''),
1991
+ 'activeGalleries' => $this->get_boolean_value($this->options['settings']['galleries'])
1992
+ ));
1993
+
1994
+ if ($args['script'] === 'prettyphoto') {
1995
+ wp_register_script(
1996
+ 'responsive-lightbox-prettyphoto',
1997
+ plugins_url('assets/prettyphoto/js/jquery.prettyPhoto.js', __FILE__),
1998
+ array('jquery'),
1999
+ '',
2000
+ ($this->options['settings']['loading_place'] === 'header' ? false : true)
2001
+ );
2002
+
2003
+ wp_enqueue_script('responsive-lightbox-prettyphoto');
2004
+
2005
+ wp_register_style(
2006
+ 'responsive-lightbox-prettyphoto-front',
2007
+ plugins_url('assets/prettyphoto/css/prettyPhoto.css', __FILE__)
2008
+ );
2009
+
2010
+ wp_enqueue_style('responsive-lightbox-prettyphoto-front');
2011
+
2012
+ $args = array_merge(
2013
+ $args,
2014
+ array(
2015
+ 'animationSpeed' => $this->options['configuration']['prettyphoto']['animation_speed'],
2016
+ 'slideshow' => $this->get_boolean_value($this->options['configuration']['prettyphoto']['slideshow']),
2017
+ 'slideshowDelay' => $this->options['configuration']['prettyphoto']['slideshow_delay'],
2018
+ 'slideshowAutoplay' => $this->get_boolean_value($this->options['configuration']['prettyphoto']['slideshow_autoplay']),
2019
+ 'opacity' => sprintf('%.2f', ($this->options['configuration']['prettyphoto']['opacity'] / 100)),
2020
+ 'showTitle' => $this->get_boolean_value($this->options['configuration']['prettyphoto']['show_title']),
2021
+ 'allowResize' => $this->get_boolean_value($this->options['configuration']['prettyphoto']['allow_resize']),
2022
+ 'allowExpand' => $this->get_boolean_value($this->options['configuration']['prettyphoto']['allow_expand']),
2023
+ 'width' => $this->options['configuration']['prettyphoto']['width'],
2024
+ 'height' => $this->options['configuration']['prettyphoto']['height'],
2025
+ 'separator' => $this->options['configuration']['prettyphoto']['separator'],
2026
+ 'theme' => $this->options['configuration']['prettyphoto']['theme'],
2027
+ 'horizontalPadding' => $this->options['configuration']['prettyphoto']['horizontal_padding'],
2028
+ 'hideFlash' => $this->get_boolean_value($this->options['configuration']['prettyphoto']['hide_flash']),
2029
+ 'wmode' => $this->options['configuration']['prettyphoto']['wmode'],
2030
+ 'videoAutoplay' => $this->get_boolean_value($this->options['configuration']['prettyphoto']['video_autoplay']),
2031
+ 'modal' => $this->get_boolean_value($this->options['configuration']['prettyphoto']['modal']),
2032
+ 'deeplinking' => $this->get_boolean_value($this->options['configuration']['prettyphoto']['deeplinking']),
2033
+ 'overlayGallery' => $this->get_boolean_value($this->options['configuration']['prettyphoto']['overlay_gallery']),
2034
+ 'keyboardShortcuts' => $this->get_boolean_value($this->options['configuration']['prettyphoto']['keyboard_shortcuts']),
2035
+ 'social' => $this->get_boolean_value($this->options['configuration']['prettyphoto']['social'])
2036
+ )
2037
+ );
2038
+ } elseif ($args['script'] === 'swipebox') {
2039
+ wp_register_script(
2040
+ 'responsive-lightbox-swipebox',
2041
+ plugins_url('assets/swipebox/source/jquery.swipebox.min.js', __FILE__),
2042
+ array('jquery'),
2043
+ '',
2044
+ ($this->options['settings']['loading_place'] === 'header' ? false : true)
2045
+ );
2046
+
2047
+ wp_enqueue_script('responsive-lightbox-swipebox');
2048
+
2049
+ wp_register_style(
2050
+ 'responsive-lightbox-swipebox-front',
2051
+ plugins_url('assets/swipebox/source/swipebox.css', __FILE__)
2052
+ );
2053
+
2054
+ wp_enqueue_style('responsive-lightbox-swipebox-front');
2055
+
2056
+ $args = array_merge(
2057
+ $args,
2058
+ array(
2059
+ 'animation' => $this->get_boolean_value(($this->options['configuration']['swipebox']['animation'] === 'css' ? TRUE : FALSE)),
2060
+ 'hideBars' => $this->get_boolean_value($this->options['configuration']['swipebox']['hide_bars']),
2061
+ 'hideBarsDelay' => $this->options['configuration']['swipebox']['hide_bars_delay'],
2062
+ 'videoMaxWidth' => $this->options['configuration']['swipebox']['video_max_width']
2063
+ )
2064
+ );
2065
+
2066
+ if ($this->options['configuration']['swipebox']['force_png_icons'] === TRUE) {
2067
+ wp_add_inline_style(
2068
+ 'responsive-lightbox-swipebox-front',
2069
+ '#swipebox-action #swipebox-prev, #swipebox-action #swipebox-next, #swipebox-action #swipebox-close { background-image: url(' . plugins_url('assets/swipebox/source/img/icons.png', __FILE__) . ') !important; }'
2070
+ );
2071
+ }
2072
+ } elseif ($args['script'] === 'fancybox') {
2073
+ wp_register_script(
2074
+ 'responsive-lightbox-fancybox',
2075
+ plugins_url('assets/fancybox/jquery.fancybox-1.3.4.js', __FILE__),
2076
+ array('jquery'),
2077
+ '',
2078
+ ($this->options['settings']['loading_place'] === 'header' ? false : true)
2079
+ );
2080
+
2081
+ wp_enqueue_script('responsive-lightbox-fancybox');
2082
+
2083
+ wp_register_style(
2084
+ 'responsive-lightbox-fancybox-front',
2085
+ plugins_url('assets/fancybox/jquery.fancybox-1.3.4.css', __FILE__)
2086
+ );
2087
+
2088
+ wp_enqueue_style('responsive-lightbox-fancybox-front');
2089
+
2090
+ $args = array_merge(
2091
+ $args,
2092
+ array(
2093
+ 'modal' => $this->get_boolean_value($this->options['configuration']['fancybox']['modal']),
2094
+ 'showOverlay' => $this->get_boolean_value($this->options['configuration']['fancybox']['show_overlay']),
2095
+ 'showCloseButton' => $this->get_boolean_value($this->options['configuration']['fancybox']['show_close_button']),
2096
+ 'enableEscapeButton' => $this->get_boolean_value($this->options['configuration']['fancybox']['enable_escape_button']),
2097
+ 'hideOnOverlayClick' => $this->get_boolean_value($this->options['configuration']['fancybox']['hide_on_overlay_click']),
2098
+ 'hideOnContentClick' => $this->get_boolean_value($this->options['configuration']['fancybox']['hide_on_content_click']),
2099
+ 'cyclic' => $this->get_boolean_value($this->options['configuration']['fancybox']['cyclic']),
2100
+ 'showNavArrows' => $this->get_boolean_value($this->options['configuration']['fancybox']['show_nav_arrows']),
2101
+ 'autoScale' => $this->get_boolean_value($this->options['configuration']['fancybox']['auto_scale']),
2102
+ 'scrolling' => $this->options['configuration']['fancybox']['scrolling'],
2103
+ 'centerOnScroll' => $this->get_boolean_value($this->options['configuration']['fancybox']['center_on_scroll']),
2104
+ 'opacity' => $this->get_boolean_value($this->options['configuration']['fancybox']['opacity']),
2105
+ 'overlayOpacity' => $this->options['configuration']['fancybox']['overlay_opacity'],
2106
+ 'overlayColor' => $this->options['configuration']['fancybox']['overlay_color'],
2107
+ 'titleShow' => $this->get_boolean_value($this->options['configuration']['fancybox']['title_show']),
2108
+ 'titlePosition' => $this->options['configuration']['fancybox']['title_position'],
2109
+ 'transitions' => $this->options['configuration']['fancybox']['transitions'],
2110
+ 'easings' => $this->options['configuration']['fancybox']['easings'],
2111
+ 'speeds' => $this->options['configuration']['fancybox']['speeds'],
2112
+ 'changeSpeed' => $this->options['configuration']['fancybox']['change_speed'],
2113
+ 'changeFade' => $this->options['configuration']['fancybox']['change_fade'],
2114
+ 'padding' => $this->options['configuration']['fancybox']['padding'],
2115
+ 'margin' => $this->options['configuration']['fancybox']['margin'],
2116
+ 'videoWidth' => $this->options['configuration']['fancybox']['video_width'],
2117
+ 'videoHeight' => $this->options['configuration']['fancybox']['video_height']
2118
+ )
2119
+ );
2120
+ } elseif ($args['script'] === 'nivo') {
2121
+ wp_register_script(
2122
+ 'responsive-lightbox-nivo',
2123
+ plugins_url('assets/nivo/nivo-lightbox.min.js', __FILE__),
2124
+ array('jquery'),
2125
+ '',
2126
+ ($this->options['settings']['loading_place'] === 'header' ? false : true)
2127
+ );
2128
+
2129
+ wp_enqueue_script('responsive-lightbox-nivo');
2130
+
2131
+ wp_register_style(
2132
+ 'responsive-lightbox-nivo-front',
2133
+ plugins_url('assets/nivo/nivo-lightbox.css', __FILE__)
2134
+ );
2135
+
2136
+ wp_enqueue_style('responsive-lightbox-nivo-front');
2137
+
2138
+ wp_register_style(
2139
+ 'responsive-lightbox-nivo-front-template',
2140
+ plugins_url('assets/nivo/themes/default/default.css', __FILE__)
2141
+ );
2142
+
2143
+ wp_enqueue_style('responsive-lightbox-nivo-front-template');
2144
+
2145
+ $args = array_merge(
2146
+ $args,
2147
+ array(
2148
+ 'effect' => $this->options['configuration']['nivo']['effect'],
2149
+ 'clickOverlayToClose' => $this->get_boolean_value($this->options['configuration']['nivo']['click_overlay_to_close']),
2150
+ 'keyboardNav' => $this->get_boolean_value($this->options['configuration']['nivo']['keyboard_nav']),
2151
+ 'errorMessage' => esc_attr($this->options['configuration']['nivo']['error_message'])
2152
+ )
2153
+ );
2154
+ } elseif ($args['script'] === 'imagelightbox') {
2155
+ wp_register_script(
2156
+ 'responsive-lightbox-imagelightbox',
2157
+ plugins_url('assets/imagelightbox/js/imagelightbox.min.js', __FILE__),
2158
+ array('jquery'),
2159
+ '',
2160
+ ($this->options['settings']['loading_place'] === 'header' ? false : true)
2161
+ );
2162
+
2163
+ wp_enqueue_script('responsive-lightbox-imagelightbox');
2164
+
2165
+ wp_register_style(
2166
+ 'responsive-lightbox-imagelightbox-front',
2167
+ plugins_url('assets/imagelightbox/css/imagelightbox.css', __FILE__)
2168
+ );
2169
+
2170
+ wp_enqueue_style('responsive-lightbox-imagelightbox-front');
2171
+
2172
+ $args = array_merge(
2173
+ $args,
2174
+ array(
2175
+ 'animationSpeed' => $this->options['configuration']['imagelightbox']['animation_speed'],
2176
+ 'preloadNext' => $this->get_boolean_value($this->options['configuration']['imagelightbox']['preload_next']),
2177
+ 'enableKeyboard' => $this->get_boolean_value($this->options['configuration']['imagelightbox']['enable_keyboard']),
2178
+ 'quitOnEnd' => $this->get_boolean_value($this->options['configuration']['imagelightbox']['quit_on_end']),
2179
+ 'quitOnImageClick' => $this->get_boolean_value($this->options['configuration']['imagelightbox']['quit_on_image_click']),
2180
+ 'quitOnDocumentClick' => $this->get_boolean_value($this->options['configuration']['imagelightbox']['quit_on_document_click']),
2181
+ )
2182
+ );
2183
+ }
2184
+
2185
+ wp_register_script(
2186
+ 'responsive-lightbox-front',
2187
+ plugins_url('js/front.js', __FILE__),
2188
+ array('jquery'),
2189
+ '',
2190
+ ($this->options['settings']['loading_place'] === 'header' ? false : true)
2191
+ );
2192
+
2193
+ wp_enqueue_script('responsive-lightbox-front');
2194
+
2195
+ wp_add_inline_style(
2196
+ 'responsive-lightbox-swipebox',
2197
+ '#swipebox-action #swipebox-close, #swipebox-action #swipebox-prev, #swipebox-action #swipebox-next { background-image: url(\'assets/swipebox/source/img/icons.png\') !important; }'
2198
+ );
2199
+
2200
+ wp_localize_script(
2201
+ 'responsive-lightbox-front',
2202
+ 'rlArgs',
2203
+ $args
2204
+ );
2205
+ }
2206
+
2207
+
2208
+ /**
2209
+ *
2210
+ */
2211
+ private function get_boolean_value($option)
2212
+ {
2213
+ return ($option === TRUE ? 1 : 0);
2214
+ }
2215
+
2216
+
2217
+ /**
2218
+ * Loads textdomain
2219
+ */
2220
+ public function load_textdomain()
2221
+ {
2222
+ load_plugin_textdomain('responsive-lightbox', FALSE, dirname(plugin_basename(__FILE__)) . '/languages/');
2223
+ }
2224
+
2225
+
2226
+ /**
2227
+ * Add links to Support Forum
2228
+ */
2229
+ public function plugin_extend_links($links, $file)
2230
+ {
2231
+ if (!current_user_can('install_plugins'))
2232
+ return $links;
2233
+
2234
+ $plugin = plugin_basename(__FILE__);
2235
+
2236
+ if ($file == $plugin) {
2237
+ return array_merge(
2238
+ $links,
2239
+ array(sprintf('<a href="http://www.dfactory.eu/support/forum/responsive-lightbox/" target="_blank">%s</a>', __('Support', 'responsive-lightbox')))
2240
+ );
2241
+ }
2242
+
2243
+ return $links;
2244
+ }
2245
+
2246
+
2247
+ /**
2248
+ * Add links to Settings page
2249
+ */
2250
+ public function plugin_settings_link($links, $file)
2251
+ {
2252
+ if (!is_admin() || !current_user_can('manage_options'))
2253
+ return $links;
2254
+
2255
+ static $plugin;
2256
+
2257
+ $plugin = plugin_basename(__FILE__);
2258
+
2259
+ if ($file == $plugin) {
2260
+ $settings_link = sprintf('<a href="%s">%s</a>', admin_url('options-general.php') . '?page=responsive-lightbox', __('Settings', 'responsive-lightbox'));
2261
+ array_unshift($links, $settings_link);
2262
+ }
2263
+
2264
+ return $links;
2265
+ }
2266
+
2267
+
2268
+ /**
2269
+ * Modify gallery image link size
2270
+ */
2271
+ public function gallery_attachment_link_filter($content, $post_id, $size, $permalink, $icon, $text)
2272
+ {
2273
+ if ($permalink) {
2274
+ $image = wp_get_attachment_image_src($post_id, $this->options['settings']['gallery_image_size']); // or other image size
2275
+ $new_content = preg_replace('/href=\'(.*?)\'/', 'href=\'' . $image[0] . '\'', $content);
2276
+ return $new_content;
2277
+ } else {
2278
+ return $content;
2279
+ }
2280
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
2281
 
2282
  }
2283