Version Description
Download this release
Release Info
Developer | danieliser |
Plugin | Popup Maker – Popup Forms, Optins & More |
Version | 1.3.1 |
Comparing to | |
See all releases |
Code changes from version 1.3 to 1.3.1
- assets/scripts/popup-maker-site.js +5 -2
- assets/scripts/popup-maker-site.min.js +2 -2
- includes/css-functions.php +12 -1
- includes/misc-functions.php +12 -13
- includes/scripts.php +6 -2
- popup-maker.php +2 -2
- readme.txt +7 -3
assets/scripts/popup-maker-site.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/**
|
2 |
-
* Popup Maker v1.3.
|
3 |
*/
|
4 |
(function (jQuery) {
|
5 |
"use strict";
|
@@ -141,9 +141,12 @@
|
|
141 |
return this;
|
142 |
}
|
143 |
|
144 |
-
jQuery('#popmake-overlay')
|
|
|
|
|
145 |
|
146 |
$this
|
|
|
147 |
.popmake('animate', settings.meta.display.animation_type, function () {
|
148 |
|
149 |
if (settings.meta.close.button_delay > 0) {
|
1 |
/**
|
2 |
+
* Popup Maker v1.3.1
|
3 |
*/
|
4 |
(function (jQuery) {
|
5 |
"use strict";
|
141 |
return this;
|
142 |
}
|
143 |
|
144 |
+
jQuery('#popmake-overlay')
|
145 |
+
.prop('class', 'popmake-overlay theme-' + settings.theme_id)
|
146 |
+
.css({'z-index': settings.meta.display.overlay_zindex || 1999999998});
|
147 |
|
148 |
$this
|
149 |
+
.css({'z-index': settings.meta.display.zindex || 1999999999})
|
150 |
.popmake('animate', settings.meta.display.animation_type, function () {
|
151 |
|
152 |
if (settings.meta.close.button_delay > 0) {
|
assets/scripts/popup-maker-site.min.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
/**
|
2 |
-
* Popup Maker v1.3.
|
3 |
*/
|
4 |
-
!function(e){"use strict";var o=!1;e(window).on("scroll",function(){o=!0}).on("scrollstop",function(){o=!1}),e.isFunction(e.fn.on)||(e.fn.on=function(e,o,t){return this.delegate(o,e,t)},e.fn.off=function(e,o,t){return this.undelegate(o,e,t)}),e.fn.popmake=function(o){return e.fn.popmake.methods[o]?e.fn.popmake.methods[o].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof o&&o?void e.error("Method "+o+" does not exist on jQuery.fn.popmake"):e.fn.popmake.methods.init.apply(this,arguments)},e.fn.popmake.version=1.3,e.fn.popmake.last_open_popup=null,e.fn.popmake.last_open_trigger=null,e.fn.popmake.last_close_trigger=null,e.fn.popmake.methods={init:function(o){return this.each(function(){var t=e(this),i=e.extend(!0,{},e.fn.popmake.defaults,t.data("popmake"),o);return e("#"+i.overlay.attr.id).length||e("<div>").attr(i.overlay.attr).appendTo("body"),e(window).on("resize",function(){t.hasClass("active")&&e.fn.popmake.utilities.throttle(setTimeout(function(){t.popmake("reposition")},25),500,!1)}),"string"==typeof popmake_powered_by&&""!==popmake_powered_by&&e(".popmake-content",t).append(e(popmake_powered_by)),t.data("popmake",i).trigger("popmakeInit"),this})},setup_close:function(){var o=e(this),t=o.data("popmake"),i=e("#popmake-overlay"),a=e(".popmake-close",o);return a.off("click.popmake").on("click.popmake",function(t){t.preventDefault(),t.stopPropagation(),e.fn.popmake.last_close_trigger="Close Button",o.popmake("close")}),(t.meta.close.esc_press||t.meta.close.f4_press)&&e(window).off("keyup.popmake").on("keyup.popmake",function(i){27===i.keyCode&&t.meta.close.esc_press&&(e.fn.popmake.last_close_trigger="ESC Key",o.popmake("close")),115===i.keyCode&&t.meta.close.f4_press&&(e.fn.popmake.last_close_trigger="F4 Key",o.popmake("close"))}),t.meta.close.overlay_click&&i.off("click.popmake").on("click.popmake",function(t){t.preventDefault(),t.stopPropagation(),e.fn.popmake.last_close_trigger="Overlay Click",o.popmake("close")}),o.trigger("popmakeSetupClose"),this},open:function(o){var t=e(this),i=t.data("popmake");return i.meta.display.stackable||t.popmake("close_all"),t.css({visibility:"visible"}).hide().addClass("active").popmake("setup_close").popmake("reposition").trigger("popmakeBeforeOpen"),i.meta.close.button_delay>0&&t.find(".popmake-content + .popmake-close").fadeOut(0),t.hasClass("preventOpen")?(t.removeClass("preventOpen").removeClass("active"),this):(e("#popmake-overlay").prop("class","popmake-overlay theme-"+i.theme_id),t.popmake("animate",i.meta.display.animation_type,function(){i.meta.close.button_delay>0&&setTimeout(function(){t.find(".popmake-content + .popmake-close").fadeIn()},i.meta.close.button_delay),t.trigger("popmakeAfterOpen"),e.fn.popmake.last_open_popup=t,void 0!==o&&o()}),this)},close:function(o){return this.each(function(){var t=e(this),i=e("#popmake-overlay"),a=e(".popmake-close",t),n=t.data("popmake");return t.trigger("popmakeBeforeClose").fadeOut(n.close.close_speed,function(){i.length&&i.is(":visible")&&i.fadeOut(n.close.close_speed),e(window).off("keyup.popmake"),i.off("click.popmake"),a.off("click.popmake"),t.removeClass("active").trigger("popmakeAfterClose"),e("iframe",t).filter('[src*="youtube"],[src*="vimeo"]').each(function(){var o=e(this),t=o.attr("src").replace("autoplay=1","1=1");o.attr("src","").attr("src",t)}),void 0!==o&&o()}),this})},close_all:function(){return e(".popmake.active").popmake("close"),this},reposition:function(o){e(this).trigger("popmakeBeforeReposition");var t=e(this),i=t.data("popmake"),a=i.meta.display,n=a.location,s={my:"",at:""},p=!1;return n.indexOf("left")>=0&&(s={my:s.my+" left"+(0!==a.position_left?"+"+a.position_left:""),at:s.at+" left"}),n.indexOf("right")>=0&&(s={my:s.my+" right"+(0!==a.position_right?"-"+a.position_right:""),at:s.at+" right"}),n.indexOf("center")>=0&&(s="center"===n?{my:"center",at:"center"}:{my:s.my+" center",at:s.at+" center"}),n.indexOf("top")>=0&&(s={my:s.my+" top"+(0!==a.position_top?"+"+(e("body").hasClass("admin-bar")?parseInt(a.position_top,10)+32:a.position_top):""),at:s.at+" top"}),n.indexOf("bottom")>=0&&(s={my:s.my+" bottom"+(0!==a.position_bottom?"-"+a.position_bottom:""),at:s.at+" bottom"}),s.my=e.trim(s.my),s.at=e.trim(s.at),s.of=window,s.collision="none",s.using="function"==typeof o?o:e.fn.popmake.callbacks.reposition_using,t.is(":hidden")&&(p=t.css("opacity"),t.css({opacity:0}).show()),t.removeClass("responsive size-nano size-micro size-tiny size-small size-medium size-normal size-large size-xlarge fixed custom-position").addClass("size-"+i.meta.display.size),a.position_fixed&&t.addClass("fixed"),"custom"===i.meta.display.size?t.css({width:i.meta.display.custom_width+i.meta.display.custom_width_unit,height:i.meta.display.custom_height_auto?"auto":i.meta.display.custom_height+i.meta.display.custom_height_unit}):"auto"!==i.meta.display.size&&t.addClass("responsive").css({minWidth:""!==i.meta.display.responsive_min_width?i.meta.display.responsive_min_width+i.meta.display.responsive_min_width_unit:"auto",maxWidth:""!==i.meta.display.responsive_max_width?i.meta.display.responsive_max_width+i.meta.display.responsive_max_width_unit:"auto"}),t.addClass("custom-position").position(s).trigger("popmakeAfterReposition"),p&&t.css({opacity:p}).hide(),this},retheme:function(o){e(this).trigger("popmakeBeforeRetheme");var t,i,a=e(this),n=a.data("popmake"),s=e("#"+n.overlay.attr.id),p=a,r=e("."+n.title.attr["class"],p),c=e("> ."+n.content.attr["class"],p),l=e("> ."+n.close.attr["class"],p);switch(void 0===o&&(o=e.fn.popmake.themes[n.theme_id],void 0===o&&(o=e.fn.popmake.themes[1])),t="yes"===o.container.boxshadow_inset?"inset ":"",i="yes"===o.close.boxshadow_inset?"inset ":"",s.removeAttr("style").css({backgroundColor:e.fn.popmake.utilities.convert_hex(o.overlay.background_color,o.overlay.background_opacity),zIndex:n.meta.display.overlay_zindex||998}),p.css({padding:o.container.padding+"px",backgroundColor:e.fn.popmake.utilities.convert_hex(o.container.background_color,o.container.background_opacity),borderStyle:o.container.border_style,borderColor:o.container.border_color,borderWidth:o.container.border_width+"px",borderRadius:o.container.border_radius+"px",boxShadow:t+o.container.boxshadow_horizontal+"px "+o.container.boxshadow_vertical+"px "+o.container.boxshadow_blur+"px "+o.container.boxshadow_spread+"px "+e.fn.popmake.utilities.convert_hex(o.container.boxshadow_color,o.container.boxshadow_opacity),zIndex:n.meta.display.zindex||999}),r.css({color:o.title.font_color,lineHeight:o.title.line_height+"px",fontSize:o.title.font_size+"px",fontFamily:o.title.font_family,fontWeight:o.title.font_weight,fontStyle:o.title.font_style,textAlign:o.title.text_align,textShadow:o.title.textshadow_horizontal+"px "+o.title.textshadow_vertical+"px "+o.title.textshadow_blur+"px "+e.fn.popmake.utilities.convert_hex(o.title.textshadow_color,o.title.textshadow_opacity)}),c.css({color:o.content.font_color,fontFamily:o.content.font_family,fontWeight:o.content.font_weight,fontStyle:o.content.font_style}),e("p, label",c).css({color:o.content.font_color,fontFamily:o.content.font_family}),l.html(o.close.text).css({padding:o.close.padding+"px",height:o.close.height+"px",width:o.close.width+"px",backgroundColor:e.fn.popmake.utilities.convert_hex(o.close.background_color,o.close.background_opacity),color:o.close.font_color,lineHeight:o.close.line_height+"px",fontSize:o.close.font_size+"px",fontWeight:o.close.font_weight,fontStyle:o.close.font_style,fontFamily:o.close.font_family,borderStyle:o.close.border_style,borderColor:o.close.border_color,borderWidth:o.close.border_width+"px",borderRadius:o.close.border_radius+"px",boxShadow:i+o.close.boxshadow_horizontal+"px "+o.close.boxshadow_vertical+"px "+o.close.boxshadow_blur+"px "+o.close.boxshadow_spread+"px "+e.fn.popmake.utilities.convert_hex(o.close.boxshadow_color,o.close.boxshadow_opacity),textShadow:o.close.textshadow_horizontal+"px "+o.close.textshadow_vertical+"px "+o.close.textshadow_blur+"px "+e.fn.popmake.utilities.convert_hex(o.close.textshadow_color,o.close.textshadow_opacity),left:"auto",right:"auto",bottom:"auto",top:"auto"}),o.close.location){case"topleft":l.css({top:o.close.position_top+"px",left:o.close.position_left+"px"});break;case"topright":l.css({top:o.close.position_top+"px",right:o.close.position_right+"px"});break;case"bottomleft":l.css({bottom:o.close.position_bottom+"px",left:o.close.position_left+"px"});break;case"bottomright":l.css({bottom:o.close.position_bottom+"px",right:o.close.position_right+"px"})}return a.trigger("popmakeAfterRetheme",[o]),this},animate_overlay:function(o,t,i){var a=e(this),n=a.data("popmake");if(n.meta.display.overlay_disabled)i();else{if(e.fn.popmake.overlay_animations[o])return e.fn.popmake.overlay_animations[o].apply(this,Array.prototype.slice.call(arguments,1));e.error("Animation style "+e.fn.popmake.overlay_animations+" does not exist.")}return this},animate:function(o){return e.fn.popmake.animations[o]?e.fn.popmake.animations[o].apply(this,Array.prototype.slice.call(arguments,1)):(e.error("Animation style "+e.fn.popmake.animations+" does not exist."),this)},animation_origin:function(o){var t=e(this),i={my:"",at:""};switch(o){case"top":i={my:"left+"+t.offset().left+" bottom-100",at:"left top"};break;case"bottom":i={my:"left+"+t.offset().left+" top+100",at:"left bottom"};break;case"left":i={my:"right top+"+t.offset().top,at:"left top"};break;case"right":i={my:"left top+"+t.offset().top,at:"right top"};break;default:o.indexOf("left")>=0&&(i={my:i.my+" right",at:i.at+" left"}),o.indexOf("right")>=0&&(i={my:i.my+" left",at:i.at+" right"}),o.indexOf("center")>=0&&(i={my:i.my+" center",at:i.at+" center"}),o.indexOf("top")>=0&&(i={my:i.my+" bottom-100",at:i.at+" top"}),o.indexOf("bottom")>=0&&(i={my:i.my+" top+100",at:i.at+" bottom"}),i.my=e.trim(i.my),i.at=e.trim(i.at)}return i.of=window,i.collision="none",i}},e.fn.popmake.callbacks={reposition_using:function(o){e(this).css(o)}},e.fn.popmake.cookie={defaults:{},raw:!1,json:!0,pluses:/\+/g,encode:function(o){return e.fn.popmake.cookie.raw?o:encodeURIComponent(o)},decode:function(o){return e.fn.popmake.cookie.raw?o:decodeURIComponent(o)},stringifyCookieValue:function(o){return e.fn.popmake.cookie.encode(e.fn.popmake.cookie.json?JSON.stringify(o):String(o))},parseCookieValue:function(o){0===o.indexOf('"')&&(o=o.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return o=decodeURIComponent(o.replace(e.fn.popmake.cookie.pluses," ")),e.fn.popmake.cookie.json?JSON.parse(o):o}catch(t){}},read:function(o,t){var i=e.fn.popmake.cookie.raw?o:e.fn.popmake.cookie.parseCookieValue(o);return e.isFunction(t)?t(i):i},process:function(o,t,i,a){var n,s,p,r,c,l=o?void 0:{},m=new Date,d=document.cookie?document.cookie.split("; "):[];if(void 0!==t&&!e.isFunction(t)){switch(typeof i){case"number":m.setTime(+m+864e5*i),i=m;break;case"string":m.setTime(1e3*e.fn.popmake.utilities.strtotime("+"+i)),i=m}return void(document.cookie=[e.fn.popmake.cookie.encode(o),"=",e.fn.popmake.cookie.stringifyCookieValue(t),i?"; expires="+i.toUTCString():"",a?"; path="+a:""].join(""))}for(r=0,c=d.length;c>r;r+=1){if(n=d[r].split("="),s=e.fn.popmake.cookie.decode(n.shift()),p=n.join("="),o&&o===s){l=e.fn.popmake.cookie.read(p,t);break}p=e.fn.popmake.cookie.read(p),o||void 0===p||(l[s]=p)}return l},remove:function(o){return void 0===e.pm_cookie(o)?!1:(e.pm_cookie(o,"",-1),!e.pm_cookie(o))}},e.pm_cookie=e.fn.popmake.cookie.process,e.pm_remove_cookie=e.fn.popmake.cookie.remove,e.fn.popmake.utilities={convert_hex:function(e,o){e=e.replace("#","");var t=parseInt(e.substring(0,2),16),i=parseInt(e.substring(2,4),16),a=parseInt(e.substring(4,6),16),n="rgba("+t+","+i+","+a+","+o/100+")";return n},debounce:function(e,o){var t;return function(){var i=this,a=arguments;window.clearTimeout(t),t=window.setTimeout(function(){e.apply(i,a)},o)}},throttle:function(e,o){var t=!1,i=function(){t=!1};return function(){t||(e.apply(this,arguments),window.setTimeout(i,o),t=!0)}},getXPath:function(o){var t,i,a,n,s,p=[];return e.each(e(o).parents(),function(o,r){return t=e(r),i=t.attr("id")||"",a=t.attr("class")||"",n=t.get(0).tagName.toLowerCase(),s=t.parent().children(n).index(t),"body"===n?!1:(a.length>0&&(a=a.split(" "),a=a[0]),void p.push(n+(i.length>0?"#"+i:a.length>0?"."+a.split(" ").join("."):":eq("+s+")")))}),p.reverse().join(" > ")},strtotime:function(e,o){function t(e,o,t){var i,a=c[o];void 0!==a&&(i=a-r.getDay(),0===i?i=7*t:i>0&&"last"===e?i-=7:0>i&&"next"===e&&(i+=7),r.setDate(r.getDate()+i))}function i(e){var o=e.split(" "),i=o[0],a=o[1].substring(0,3),n=/\d+/.test(i),s="ago"===o[2],p=("last"===i?-1:1)*(s?-1:1);if(n&&(p*=parseInt(i,10)),l.hasOwnProperty(a)&&!o[1].match(/^mon(day|\.)?$/i))return r["set"+l[a]](r["get"+l[a]]()+p);if("wee"===a)return r.setDate(r.getDate()+7*p);if("next"===i||"last"===i)t(i,a,p);else if(!n)return!1;return!0}var a,n,s,p,r,c,l,m,d,f,u,h=!1;if(!e)return h;if(e=e.replace(/^\s+|\s+$/g,"").replace(/\s{2,}/g," ").replace(/[\t\r\n]/g,"").toLowerCase(),n=e.match(/^(\d{1,4})([\-\.\/\:])(\d{1,2})([\-\.\/\:])(\d{1,4})(?:\s(\d{1,2}):(\d{2})?:?(\d{2})?)?(?:\s([A-Z]+)?)?$/),n&&n[2]===n[4])if(n[1]>1901)switch(n[2]){case"-":return n[3]>12||n[5]>31?h:new Date(n[1],parseInt(n[3],10)-1,n[5],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3;case".":return h;case"/":return n[3]>12||n[5]>31?h:new Date(n[1],parseInt(n[3],10)-1,n[5],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3}else if(n[5]>1901)switch(n[2]){case"-":return n[3]>12||n[1]>31?h:new Date(n[5],parseInt(n[3],10)-1,n[1],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3;case".":return n[3]>12||n[1]>31?h:new Date(n[5],parseInt(n[3],10)-1,n[1],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3;case"/":return n[1]>12||n[3]>31?h:new Date(n[5],parseInt(n[1],10)-1,n[3],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3}else switch(n[2]){case"-":return n[3]>12||n[5]>31||n[1]<70&&n[1]>38?h:(p=n[1]>=0&&n[1]<=38?+n[1]+2e3:n[1],new Date(p,parseInt(n[3],10)-1,n[5],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3);case".":return n[5]>=70?n[3]>12||n[1]>31?h:new Date(n[5],parseInt(n[3],10)-1,n[1],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3:n[5]<60&&!n[6]?n[1]>23||n[3]>59?h:(s=new Date,new Date(s.getFullYear(),s.getMonth(),s.getDate(),n[1]||0,n[3]||0,n[5]||0,n[9]||0)/1e3):h;case"/":return n[1]>12||n[3]>31||n[5]<70&&n[5]>38?h:(p=n[5]>=0&&n[5]<=38?+n[5]+2e3:n[5],new Date(p,parseInt(n[1],10)-1,n[3],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3);case":":return n[1]>23||n[3]>59||n[5]>59?h:(s=new Date,new Date(s.getFullYear(),s.getMonth(),s.getDate(),n[1]||0,n[3]||0,n[5]||0)/1e3)}if("now"===e)return null===o||isNaN(o)?(new Date).getTime()/1e3||0:o||0;if(a=Date.parse(e),!isNaN(a))return a/1e3||0;if(r=o?new Date(1e3*o):new Date,c={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6},l={yea:"FullYear",mon:"Month",day:"Date",hou:"Hours",min:"Minutes",sec:"Seconds"},d="(years?|months?|weeks?|days?|hours?|minutes?|min|seconds?|sec|sunday|sun\\.?|monday|mon\\.?|tuesday|tue\\.?|wednesday|wed\\.?|thursday|thu\\.?|friday|fri\\.?|saturday|sat\\.?)",f="([+-]?\\d+\\s"+d+"|(last|next)\\s"+d+")(\\sago)?",n=e.match(new RegExp(f,"gi")),!n)return h;for(u=0,m=n.length;m>u;u+=1)if(!i(n[u]))return h;return r.getTime()/1e3}},e.fn.popmake.utilies=e.fn.popmake.utilities,e.fn.popmake.defaults={meta:{display:{stackable:0,overlay_disabled:0,size:"medium",responsive_max_width:"",responsive_max_width_unit:"%",responsive_min_width:"",responsive_min_width_unit:"%",custom_width:"",custom_width_unit:"%",custom_height:"",custom_height_unit:"em",custom_height_auto:0,location:"center top",position_top:100,position_left:0,position_bottom:0,position_right:0,position_fixed:0,animation_type:"fade",animation_speed:350,animation_origin:"center top"},close:{overlay_click:0,esc_press:0,f4_press:0}},container:{active_class:"active",attr:{"class":"popmake"}},title:{attr:{"class":"popmake-title"}},content:{attr:{"class":"popmake-content"}},close:{close_speed:0,attr:{"class":"popmake-close"}},overlay:{attr:{id:"popmake-overlay","class":"popmake-overlay"}}},e.fn.popmake.overlay_animations={none:function(o,t){e("#popmake-overlay").show(o,t)},fade:function(o,t){e("#popmake-overlay").fadeIn(o,t)},slide:function(o,t){e("#popmake-overlay").slideDown(o,t)}},e.fn.popmake.animations={none:function(o){var t=e(this);return t.popmake("animate_overlay","none",0,function(){t.css({display:"block"}),void 0!==o&&o()}),this},slide:function(t){var i=e(this).show(0).css({opacity:0}),a=i.data("popmake"),n=a.meta.display.animation_speed/2,s=i.popmake("animation_origin",a.meta.display.animation_origin);return a.meta.display.position_fixed||o||e("html").css("overflow-x","hidden"),i.position(s).css({opacity:1}).popmake("animate_overlay","fade",n,function(){i.popmake("reposition",function(o){i.animate(o,n,"swing",function(){a.meta.display.position_fixed||e("html").css("overflow-x","inherit"),void 0!==t&&t()})})}),this},fade:function(o){var t=e(this).show(0).css({opacity:0}),i=t.data("popmake"),a=i.meta.display.animation_speed/2;return t.popmake("animate_overlay","fade",a,function(){t.animate({opacity:1},a,"swing",function(){void 0!==o&&o()})}),this},fadeAndSlide:function(t){var i=e(this).show(0).css({opacity:0}),a=i.data("popmake"),n=a.meta.display.animation_speed/2,s=i.popmake("animation_origin",a.meta.display.animation_origin);return a.meta.display.position_fixed||o||e("html").css("overflow-x","hidden"),i.position(s).popmake("animate_overlay","fade",n,function(){i.popmake("reposition",function(o){o.opacity=1,i.animate(o,n,"swing",function(){a.meta.display.position_fixed||e("html").css("overflow-x","inherit"),void 0!==t&&t()})})}),this},grow:function(t){var i=e(this).show(0).css({opacity:0}),a=i.data("popmake"),n=a.meta.display.animation_speed/2,s=i.popmake("animation_origin",a.meta.display.animation_origin);return a.meta.display.position_fixed||o||e("html").css("overflow-x","hidden"),i.position(s).css({opacity:1}).popmake("animate_overlay","fade",n,function(){i.popmake("reposition",function(o){i.animate(o,n,"swing",function(){a.meta.display.position_fixed||e("html").css("overflow-x","inherit"),void 0!==t&&t()})})}),this},growAndSlide:function(t){var i=e(this).show(0).css({opacity:0}),a=i.data("popmake"),n=a.meta.display.animation_speed/2,s=i.popmake("animation_origin",a.meta.display.animation_origin);return a.meta.display.position_fixed||o||e("html").css("overflow-x","hidden"),i.position(s).css({opacity:1}).popmake("animate_overlay","fade",n,function(){i.popmake("reposition",function(o){i.animate(o,n,"swing",function(){a.meta.display.position_fixed||e("html").css("overflow-x","inherit"),void 0!==t&&t()})})}),this}},e(".popmake").css({visibility:"visible"}).hide(),e(document).ready(function(){e(".popmake").popmake().each(function(){var o,t=e(this),i=t.data("popmake"),a=i.meta.click_open,n=".popmake-"+i.id+", .popmake-"+i.slug,s=i.meta.admin_debug,p=i.meta.auto_open,r="popmake-auto-open-"+i.id;if(void 0!==a&&""!==a.extra_selectors&&(n+=", "+a.extra_selectors),e(n).css({cursor:"pointer"}),e(document).on("click.popmakeOpen",n,function(o){e(o.target).hasClass("do-default")||(o.preventDefault(),o.stopPropagation()),e.fn.popmake.last_open_trigger=this,t.popmake("open")}),void 0!==s&&s.enabled)return void t.popmake("open");if(void 0!==p&&p.enabled){switch(void 0!==p.cookie_key&&""!==p.cookie_key&&(r=r+"-"+p.cookie_key),o=function(){return void 0===e.pm_cookie(r)},t.on("popmakeSetCookie.auto-open",function(){""!==p.cookie_time&&o()&&e.pm_cookie(r,!0,p.session_cookie?null:p.cookie_time,p.cookie_path)}),p.cookie_trigger){case"open":t.on("popmakeAfterOpen",function(){t.trigger("popmakeSetCookie")});break;case"close":t.on("popmakeBeforeClose",function(){t.trigger("popmakeSetCookie")})}setTimeout(function(){o()&&(t.hasClass("active")||(e.fn.popmake.last_open_trigger="Auto Open Popups ID-"+i.id,t.popmake("open")))},p.delay)}})})}(jQuery);
|
1 |
/**
|
2 |
+
* Popup Maker v1.3.1
|
3 |
*/
|
4 |
+
!function(e){"use strict";var t=!1;e(window).on("scroll",function(){t=!0}).on("scrollstop",function(){t=!1}),e.isFunction(e.fn.on)||(e.fn.on=function(e,t,o){return this.delegate(t,e,o)},e.fn.off=function(e,t,o){return this.undelegate(t,e,o)}),e.fn.popmake=function(t){return e.fn.popmake.methods[t]?e.fn.popmake.methods[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void e.error("Method "+t+" does not exist on jQuery.fn.popmake"):e.fn.popmake.methods.init.apply(this,arguments)},e.fn.popmake.version=1.3,e.fn.popmake.last_open_popup=null,e.fn.popmake.last_open_trigger=null,e.fn.popmake.last_close_trigger=null,e.fn.popmake.methods={init:function(t){return this.each(function(){var o=e(this),i=e.extend(!0,{},e.fn.popmake.defaults,o.data("popmake"),t);return e("#"+i.overlay.attr.id).length||e("<div>").attr(i.overlay.attr).appendTo("body"),e(window).on("resize",function(){o.hasClass("active")&&e.fn.popmake.utilities.throttle(setTimeout(function(){o.popmake("reposition")},25),500,!1)}),"string"==typeof popmake_powered_by&&""!==popmake_powered_by&&e(".popmake-content",o).append(e(popmake_powered_by)),o.data("popmake",i).trigger("popmakeInit"),this})},setup_close:function(){var t=e(this),o=t.data("popmake"),i=e("#popmake-overlay"),a=e(".popmake-close",t);return a.off("click.popmake").on("click.popmake",function(o){o.preventDefault(),o.stopPropagation(),e.fn.popmake.last_close_trigger="Close Button",t.popmake("close")}),(o.meta.close.esc_press||o.meta.close.f4_press)&&e(window).off("keyup.popmake").on("keyup.popmake",function(i){27===i.keyCode&&o.meta.close.esc_press&&(e.fn.popmake.last_close_trigger="ESC Key",t.popmake("close")),115===i.keyCode&&o.meta.close.f4_press&&(e.fn.popmake.last_close_trigger="F4 Key",t.popmake("close"))}),o.meta.close.overlay_click&&i.off("click.popmake").on("click.popmake",function(o){o.preventDefault(),o.stopPropagation(),e.fn.popmake.last_close_trigger="Overlay Click",t.popmake("close")}),t.trigger("popmakeSetupClose"),this},open:function(t){var o=e(this),i=o.data("popmake");return i.meta.display.stackable||o.popmake("close_all"),o.css({visibility:"visible"}).hide().addClass("active").popmake("setup_close").popmake("reposition").trigger("popmakeBeforeOpen"),i.meta.close.button_delay>0&&o.find(".popmake-content + .popmake-close").fadeOut(0),o.hasClass("preventOpen")?(o.removeClass("preventOpen").removeClass("active"),this):(e("#popmake-overlay").prop("class","popmake-overlay theme-"+i.theme_id).css({"z-index":i.meta.display.overlay_zindex||1999999998}),o.css({"z-index":i.meta.display.zindex||1999999999}).popmake("animate",i.meta.display.animation_type,function(){i.meta.close.button_delay>0&&setTimeout(function(){o.find(".popmake-content + .popmake-close").fadeIn()},i.meta.close.button_delay),o.trigger("popmakeAfterOpen"),e.fn.popmake.last_open_popup=o,void 0!==t&&t()}),this)},close:function(t){return this.each(function(){var o=e(this),i=e("#popmake-overlay"),a=e(".popmake-close",o),n=o.data("popmake");return o.trigger("popmakeBeforeClose").fadeOut(n.close.close_speed,function(){i.length&&i.is(":visible")&&i.fadeOut(n.close.close_speed),e(window).off("keyup.popmake"),i.off("click.popmake"),a.off("click.popmake"),o.removeClass("active").trigger("popmakeAfterClose"),e("iframe",o).filter('[src*="youtube"],[src*="vimeo"]').each(function(){var t=e(this),o=t.attr("src").replace("autoplay=1","1=1");t.attr("src","").attr("src",o)}),void 0!==t&&t()}),this})},close_all:function(){return e(".popmake.active").popmake("close"),this},reposition:function(t){e(this).trigger("popmakeBeforeReposition");var o=e(this),i=o.data("popmake"),a=i.meta.display,n=a.location,s={my:"",at:""},p=!1;return n.indexOf("left")>=0&&(s={my:s.my+" left"+(0!==a.position_left?"+"+a.position_left:""),at:s.at+" left"}),n.indexOf("right")>=0&&(s={my:s.my+" right"+(0!==a.position_right?"-"+a.position_right:""),at:s.at+" right"}),n.indexOf("center")>=0&&(s="center"===n?{my:"center",at:"center"}:{my:s.my+" center",at:s.at+" center"}),n.indexOf("top")>=0&&(s={my:s.my+" top"+(0!==a.position_top?"+"+(e("body").hasClass("admin-bar")?parseInt(a.position_top,10)+32:a.position_top):""),at:s.at+" top"}),n.indexOf("bottom")>=0&&(s={my:s.my+" bottom"+(0!==a.position_bottom?"-"+a.position_bottom:""),at:s.at+" bottom"}),s.my=e.trim(s.my),s.at=e.trim(s.at),s.of=window,s.collision="none",s.using="function"==typeof t?t:e.fn.popmake.callbacks.reposition_using,o.is(":hidden")&&(p=o.css("opacity"),o.css({opacity:0}).show()),o.removeClass("responsive size-nano size-micro size-tiny size-small size-medium size-normal size-large size-xlarge fixed custom-position").addClass("size-"+i.meta.display.size),a.position_fixed&&o.addClass("fixed"),"custom"===i.meta.display.size?o.css({width:i.meta.display.custom_width+i.meta.display.custom_width_unit,height:i.meta.display.custom_height_auto?"auto":i.meta.display.custom_height+i.meta.display.custom_height_unit}):"auto"!==i.meta.display.size&&o.addClass("responsive").css({minWidth:""!==i.meta.display.responsive_min_width?i.meta.display.responsive_min_width+i.meta.display.responsive_min_width_unit:"auto",maxWidth:""!==i.meta.display.responsive_max_width?i.meta.display.responsive_max_width+i.meta.display.responsive_max_width_unit:"auto"}),o.addClass("custom-position").position(s).trigger("popmakeAfterReposition"),p&&o.css({opacity:p}).hide(),this},retheme:function(t){e(this).trigger("popmakeBeforeRetheme");var o,i,a=e(this),n=a.data("popmake"),s=e("#"+n.overlay.attr.id),p=a,r=e("."+n.title.attr["class"],p),c=e("> ."+n.content.attr["class"],p),l=e("> ."+n.close.attr["class"],p);switch(void 0===t&&(t=e.fn.popmake.themes[n.theme_id],void 0===t&&(t=e.fn.popmake.themes[1])),o="yes"===t.container.boxshadow_inset?"inset ":"",i="yes"===t.close.boxshadow_inset?"inset ":"",s.removeAttr("style").css({backgroundColor:e.fn.popmake.utilities.convert_hex(t.overlay.background_color,t.overlay.background_opacity),zIndex:n.meta.display.overlay_zindex||998}),p.css({padding:t.container.padding+"px",backgroundColor:e.fn.popmake.utilities.convert_hex(t.container.background_color,t.container.background_opacity),borderStyle:t.container.border_style,borderColor:t.container.border_color,borderWidth:t.container.border_width+"px",borderRadius:t.container.border_radius+"px",boxShadow:o+t.container.boxshadow_horizontal+"px "+t.container.boxshadow_vertical+"px "+t.container.boxshadow_blur+"px "+t.container.boxshadow_spread+"px "+e.fn.popmake.utilities.convert_hex(t.container.boxshadow_color,t.container.boxshadow_opacity),zIndex:n.meta.display.zindex||999}),r.css({color:t.title.font_color,lineHeight:t.title.line_height+"px",fontSize:t.title.font_size+"px",fontFamily:t.title.font_family,fontWeight:t.title.font_weight,fontStyle:t.title.font_style,textAlign:t.title.text_align,textShadow:t.title.textshadow_horizontal+"px "+t.title.textshadow_vertical+"px "+t.title.textshadow_blur+"px "+e.fn.popmake.utilities.convert_hex(t.title.textshadow_color,t.title.textshadow_opacity)}),c.css({color:t.content.font_color,fontFamily:t.content.font_family,fontWeight:t.content.font_weight,fontStyle:t.content.font_style}),e("p, label",c).css({color:t.content.font_color,fontFamily:t.content.font_family}),l.html(t.close.text).css({padding:t.close.padding+"px",height:t.close.height+"px",width:t.close.width+"px",backgroundColor:e.fn.popmake.utilities.convert_hex(t.close.background_color,t.close.background_opacity),color:t.close.font_color,lineHeight:t.close.line_height+"px",fontSize:t.close.font_size+"px",fontWeight:t.close.font_weight,fontStyle:t.close.font_style,fontFamily:t.close.font_family,borderStyle:t.close.border_style,borderColor:t.close.border_color,borderWidth:t.close.border_width+"px",borderRadius:t.close.border_radius+"px",boxShadow:i+t.close.boxshadow_horizontal+"px "+t.close.boxshadow_vertical+"px "+t.close.boxshadow_blur+"px "+t.close.boxshadow_spread+"px "+e.fn.popmake.utilities.convert_hex(t.close.boxshadow_color,t.close.boxshadow_opacity),textShadow:t.close.textshadow_horizontal+"px "+t.close.textshadow_vertical+"px "+t.close.textshadow_blur+"px "+e.fn.popmake.utilities.convert_hex(t.close.textshadow_color,t.close.textshadow_opacity),left:"auto",right:"auto",bottom:"auto",top:"auto"}),t.close.location){case"topleft":l.css({top:t.close.position_top+"px",left:t.close.position_left+"px"});break;case"topright":l.css({top:t.close.position_top+"px",right:t.close.position_right+"px"});break;case"bottomleft":l.css({bottom:t.close.position_bottom+"px",left:t.close.position_left+"px"});break;case"bottomright":l.css({bottom:t.close.position_bottom+"px",right:t.close.position_right+"px"})}return a.trigger("popmakeAfterRetheme",[t]),this},animate_overlay:function(t,o,i){var a=e(this),n=a.data("popmake");if(n.meta.display.overlay_disabled)i();else{if(e.fn.popmake.overlay_animations[t])return e.fn.popmake.overlay_animations[t].apply(this,Array.prototype.slice.call(arguments,1));e.error("Animation style "+e.fn.popmake.overlay_animations+" does not exist.")}return this},animate:function(t){return e.fn.popmake.animations[t]?e.fn.popmake.animations[t].apply(this,Array.prototype.slice.call(arguments,1)):(e.error("Animation style "+e.fn.popmake.animations+" does not exist."),this)},animation_origin:function(t){var o=e(this),i={my:"",at:""};switch(t){case"top":i={my:"left+"+o.offset().left+" bottom-100",at:"left top"};break;case"bottom":i={my:"left+"+o.offset().left+" top+100",at:"left bottom"};break;case"left":i={my:"right top+"+o.offset().top,at:"left top"};break;case"right":i={my:"left top+"+o.offset().top,at:"right top"};break;default:t.indexOf("left")>=0&&(i={my:i.my+" right",at:i.at+" left"}),t.indexOf("right")>=0&&(i={my:i.my+" left",at:i.at+" right"}),t.indexOf("center")>=0&&(i={my:i.my+" center",at:i.at+" center"}),t.indexOf("top")>=0&&(i={my:i.my+" bottom-100",at:i.at+" top"}),t.indexOf("bottom")>=0&&(i={my:i.my+" top+100",at:i.at+" bottom"}),i.my=e.trim(i.my),i.at=e.trim(i.at)}return i.of=window,i.collision="none",i}},e.fn.popmake.callbacks={reposition_using:function(t){e(this).css(t)}},e.fn.popmake.cookie={defaults:{},raw:!1,json:!0,pluses:/\+/g,encode:function(t){return e.fn.popmake.cookie.raw?t:encodeURIComponent(t)},decode:function(t){return e.fn.popmake.cookie.raw?t:decodeURIComponent(t)},stringifyCookieValue:function(t){return e.fn.popmake.cookie.encode(e.fn.popmake.cookie.json?JSON.stringify(t):String(t))},parseCookieValue:function(t){0===t.indexOf('"')&&(t=t.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return t=decodeURIComponent(t.replace(e.fn.popmake.cookie.pluses," ")),e.fn.popmake.cookie.json?JSON.parse(t):t}catch(o){}},read:function(t,o){var i=e.fn.popmake.cookie.raw?t:e.fn.popmake.cookie.parseCookieValue(t);return e.isFunction(o)?o(i):i},process:function(t,o,i,a){var n,s,p,r,c,l=t?void 0:{},m=new Date,d=document.cookie?document.cookie.split("; "):[];if(void 0!==o&&!e.isFunction(o)){switch(typeof i){case"number":m.setTime(+m+864e5*i),i=m;break;case"string":m.setTime(1e3*e.fn.popmake.utilities.strtotime("+"+i)),i=m}return void(document.cookie=[e.fn.popmake.cookie.encode(t),"=",e.fn.popmake.cookie.stringifyCookieValue(o),i?"; expires="+i.toUTCString():"",a?"; path="+a:""].join(""))}for(r=0,c=d.length;c>r;r+=1){if(n=d[r].split("="),s=e.fn.popmake.cookie.decode(n.shift()),p=n.join("="),t&&t===s){l=e.fn.popmake.cookie.read(p,o);break}p=e.fn.popmake.cookie.read(p),t||void 0===p||(l[s]=p)}return l},remove:function(t){return void 0===e.pm_cookie(t)?!1:(e.pm_cookie(t,"",-1),!e.pm_cookie(t))}},e.pm_cookie=e.fn.popmake.cookie.process,e.pm_remove_cookie=e.fn.popmake.cookie.remove,e.fn.popmake.utilities={convert_hex:function(e,t){e=e.replace("#","");var o=parseInt(e.substring(0,2),16),i=parseInt(e.substring(2,4),16),a=parseInt(e.substring(4,6),16),n="rgba("+o+","+i+","+a+","+t/100+")";return n},debounce:function(e,t){var o;return function(){var i=this,a=arguments;window.clearTimeout(o),o=window.setTimeout(function(){e.apply(i,a)},t)}},throttle:function(e,t){var o=!1,i=function(){o=!1};return function(){o||(e.apply(this,arguments),window.setTimeout(i,t),o=!0)}},getXPath:function(t){var o,i,a,n,s,p=[];return e.each(e(t).parents(),function(t,r){return o=e(r),i=o.attr("id")||"",a=o.attr("class")||"",n=o.get(0).tagName.toLowerCase(),s=o.parent().children(n).index(o),"body"===n?!1:(a.length>0&&(a=a.split(" "),a=a[0]),void p.push(n+(i.length>0?"#"+i:a.length>0?"."+a.split(" ").join("."):":eq("+s+")")))}),p.reverse().join(" > ")},strtotime:function(e,t){function o(e,t,o){var i,a=c[t];void 0!==a&&(i=a-r.getDay(),0===i?i=7*o:i>0&&"last"===e?i-=7:0>i&&"next"===e&&(i+=7),r.setDate(r.getDate()+i))}function i(e){var t=e.split(" "),i=t[0],a=t[1].substring(0,3),n=/\d+/.test(i),s="ago"===t[2],p=("last"===i?-1:1)*(s?-1:1);if(n&&(p*=parseInt(i,10)),l.hasOwnProperty(a)&&!t[1].match(/^mon(day|\.)?$/i))return r["set"+l[a]](r["get"+l[a]]()+p);if("wee"===a)return r.setDate(r.getDate()+7*p);if("next"===i||"last"===i)o(i,a,p);else if(!n)return!1;return!0}var a,n,s,p,r,c,l,m,d,f,u,h=!1;if(!e)return h;if(e=e.replace(/^\s+|\s+$/g,"").replace(/\s{2,}/g," ").replace(/[\t\r\n]/g,"").toLowerCase(),n=e.match(/^(\d{1,4})([\-\.\/\:])(\d{1,2})([\-\.\/\:])(\d{1,4})(?:\s(\d{1,2}):(\d{2})?:?(\d{2})?)?(?:\s([A-Z]+)?)?$/),n&&n[2]===n[4])if(n[1]>1901)switch(n[2]){case"-":return n[3]>12||n[5]>31?h:new Date(n[1],parseInt(n[3],10)-1,n[5],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3;case".":return h;case"/":return n[3]>12||n[5]>31?h:new Date(n[1],parseInt(n[3],10)-1,n[5],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3}else if(n[5]>1901)switch(n[2]){case"-":return n[3]>12||n[1]>31?h:new Date(n[5],parseInt(n[3],10)-1,n[1],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3;case".":return n[3]>12||n[1]>31?h:new Date(n[5],parseInt(n[3],10)-1,n[1],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3;case"/":return n[1]>12||n[3]>31?h:new Date(n[5],parseInt(n[1],10)-1,n[3],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3}else switch(n[2]){case"-":return n[3]>12||n[5]>31||n[1]<70&&n[1]>38?h:(p=n[1]>=0&&n[1]<=38?+n[1]+2e3:n[1],new Date(p,parseInt(n[3],10)-1,n[5],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3);case".":return n[5]>=70?n[3]>12||n[1]>31?h:new Date(n[5],parseInt(n[3],10)-1,n[1],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3:n[5]<60&&!n[6]?n[1]>23||n[3]>59?h:(s=new Date,new Date(s.getFullYear(),s.getMonth(),s.getDate(),n[1]||0,n[3]||0,n[5]||0,n[9]||0)/1e3):h;case"/":return n[1]>12||n[3]>31||n[5]<70&&n[5]>38?h:(p=n[5]>=0&&n[5]<=38?+n[5]+2e3:n[5],new Date(p,parseInt(n[1],10)-1,n[3],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3);case":":return n[1]>23||n[3]>59||n[5]>59?h:(s=new Date,new Date(s.getFullYear(),s.getMonth(),s.getDate(),n[1]||0,n[3]||0,n[5]||0)/1e3)}if("now"===e)return null===t||isNaN(t)?(new Date).getTime()/1e3||0:t||0;if(a=Date.parse(e),!isNaN(a))return a/1e3||0;if(r=t?new Date(1e3*t):new Date,c={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6},l={yea:"FullYear",mon:"Month",day:"Date",hou:"Hours",min:"Minutes",sec:"Seconds"},d="(years?|months?|weeks?|days?|hours?|minutes?|min|seconds?|sec|sunday|sun\\.?|monday|mon\\.?|tuesday|tue\\.?|wednesday|wed\\.?|thursday|thu\\.?|friday|fri\\.?|saturday|sat\\.?)",f="([+-]?\\d+\\s"+d+"|(last|next)\\s"+d+")(\\sago)?",n=e.match(new RegExp(f,"gi")),!n)return h;for(u=0,m=n.length;m>u;u+=1)if(!i(n[u]))return h;return r.getTime()/1e3}},e.fn.popmake.utilies=e.fn.popmake.utilities,e.fn.popmake.defaults={meta:{display:{stackable:0,overlay_disabled:0,size:"medium",responsive_max_width:"",responsive_max_width_unit:"%",responsive_min_width:"",responsive_min_width_unit:"%",custom_width:"",custom_width_unit:"%",custom_height:"",custom_height_unit:"em",custom_height_auto:0,location:"center top",position_top:100,position_left:0,position_bottom:0,position_right:0,position_fixed:0,animation_type:"fade",animation_speed:350,animation_origin:"center top"},close:{overlay_click:0,esc_press:0,f4_press:0}},container:{active_class:"active",attr:{"class":"popmake"}},title:{attr:{"class":"popmake-title"}},content:{attr:{"class":"popmake-content"}},close:{close_speed:0,attr:{"class":"popmake-close"}},overlay:{attr:{id:"popmake-overlay","class":"popmake-overlay"}}},e.fn.popmake.overlay_animations={none:function(t,o){e("#popmake-overlay").show(t,o)},fade:function(t,o){e("#popmake-overlay").fadeIn(t,o)},slide:function(t,o){e("#popmake-overlay").slideDown(t,o)}},e.fn.popmake.animations={none:function(t){var o=e(this);return o.popmake("animate_overlay","none",0,function(){o.css({display:"block"}),void 0!==t&&t()}),this},slide:function(o){var i=e(this).show(0).css({opacity:0}),a=i.data("popmake"),n=a.meta.display.animation_speed/2,s=i.popmake("animation_origin",a.meta.display.animation_origin);return a.meta.display.position_fixed||t||e("html").css("overflow-x","hidden"),i.position(s).css({opacity:1}).popmake("animate_overlay","fade",n,function(){i.popmake("reposition",function(t){i.animate(t,n,"swing",function(){a.meta.display.position_fixed||e("html").css("overflow-x","inherit"),void 0!==o&&o()})})}),this},fade:function(t){var o=e(this).show(0).css({opacity:0}),i=o.data("popmake"),a=i.meta.display.animation_speed/2;return o.popmake("animate_overlay","fade",a,function(){o.animate({opacity:1},a,"swing",function(){void 0!==t&&t()})}),this},fadeAndSlide:function(o){var i=e(this).show(0).css({opacity:0}),a=i.data("popmake"),n=a.meta.display.animation_speed/2,s=i.popmake("animation_origin",a.meta.display.animation_origin);return a.meta.display.position_fixed||t||e("html").css("overflow-x","hidden"),i.position(s).popmake("animate_overlay","fade",n,function(){i.popmake("reposition",function(t){t.opacity=1,i.animate(t,n,"swing",function(){a.meta.display.position_fixed||e("html").css("overflow-x","inherit"),void 0!==o&&o()})})}),this},grow:function(o){var i=e(this).show(0).css({opacity:0}),a=i.data("popmake"),n=a.meta.display.animation_speed/2,s=i.popmake("animation_origin",a.meta.display.animation_origin);return a.meta.display.position_fixed||t||e("html").css("overflow-x","hidden"),i.position(s).css({opacity:1}).popmake("animate_overlay","fade",n,function(){i.popmake("reposition",function(t){i.animate(t,n,"swing",function(){a.meta.display.position_fixed||e("html").css("overflow-x","inherit"),void 0!==o&&o()})})}),this},growAndSlide:function(o){var i=e(this).show(0).css({opacity:0}),a=i.data("popmake"),n=a.meta.display.animation_speed/2,s=i.popmake("animation_origin",a.meta.display.animation_origin);return a.meta.display.position_fixed||t||e("html").css("overflow-x","hidden"),i.position(s).css({opacity:1}).popmake("animate_overlay","fade",n,function(){i.popmake("reposition",function(t){i.animate(t,n,"swing",function(){a.meta.display.position_fixed||e("html").css("overflow-x","inherit"),void 0!==o&&o()})})}),this}},e(".popmake").css({visibility:"visible"}).hide(),e(document).ready(function(){e(".popmake").popmake().each(function(){var t,o=e(this),i=o.data("popmake"),a=i.meta.click_open,n=".popmake-"+i.id+", .popmake-"+i.slug,s=i.meta.admin_debug,p=i.meta.auto_open,r="popmake-auto-open-"+i.id;if(void 0!==a&&""!==a.extra_selectors&&(n+=", "+a.extra_selectors),e(n).css({cursor:"pointer"}),e(document).on("click.popmakeOpen",n,function(t){e(t.target).hasClass("do-default")||(t.preventDefault(),t.stopPropagation()),e.fn.popmake.last_open_trigger=this,o.popmake("open")}),void 0!==s&&s.enabled)return void o.popmake("open");if(void 0!==p&&p.enabled){switch(void 0!==p.cookie_key&&""!==p.cookie_key&&(r=r+"-"+p.cookie_key),t=function(){return void 0===e.pm_cookie(r)},o.on("popmakeSetCookie.auto-open",function(){""!==p.cookie_time&&t()&&e.pm_cookie(r,!0,p.session_cookie?null:p.cookie_time,p.cookie_path)}),p.cookie_trigger){case"open":o.on("popmakeAfterOpen",function(){o.trigger("popmakeSetCookie")});break;case"close":o.on("popmakeBeforeClose",function(){o.trigger("popmakeSetCookie")})}setTimeout(function(){t()&&(o.hasClass("active")||(e.fn.popmake.last_open_trigger="Auto Open Popups ID-"+i.id,o.popmake("open")))},p.delay)}})})}(jQuery);
|
includes/css-functions.php
CHANGED
@@ -53,6 +53,10 @@ function popmake_generate_theme_styles( $popup_theme_id ) {
|
|
53 |
|
54 |
extract( $theme );
|
55 |
|
|
|
|
|
|
|
|
|
56 |
$styles['overlay'] = array();
|
57 |
|
58 |
if ( ! empty( $overlay['background_color'] ) ) {
|
@@ -129,7 +133,14 @@ function popmake_generate_theme_styles( $popup_theme_id ) {
|
|
129 |
|
130 |
function popmake_render_theme_styles( $popup_theme_id ) {
|
131 |
$styles = '';
|
132 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
133 |
switch ( $element ) {
|
134 |
case 'overlay':
|
135 |
$rule = ".popmake-overlay.theme-{$popup_theme_id}";
|
53 |
|
54 |
extract( $theme );
|
55 |
|
56 |
+
if ( empty( $overlay ) || empty( $container ) || empty( $title ) || empty( $content ) || empty( $close ) ) {
|
57 |
+
return array();
|
58 |
+
}
|
59 |
+
|
60 |
$styles['overlay'] = array();
|
61 |
|
62 |
if ( ! empty( $overlay['background_color'] ) ) {
|
133 |
|
134 |
function popmake_render_theme_styles( $popup_theme_id ) {
|
135 |
$styles = '';
|
136 |
+
|
137 |
+
$theme_styles = popmake_generate_theme_styles( $popup_theme_id );
|
138 |
+
|
139 |
+
if ( empty( $theme_styles ) ) {
|
140 |
+
return '';
|
141 |
+
}
|
142 |
+
|
143 |
+
foreach ( $theme_styles as $element => $rules ) {
|
144 |
switch ( $element ) {
|
145 |
case 'overlay':
|
146 |
$rule = ".popmake-overlay.theme-{$popup_theme_id}";
|
includes/misc-functions.php
CHANGED
@@ -6,29 +6,28 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
6 |
}
|
7 |
|
8 |
if ( ! function_exists( 'get_called_class' ) ) {
|
9 |
-
|
10 |
function get_called_class() {
|
11 |
$bt = debug_backtrace();
|
12 |
-
$l =
|
13 |
-
|
14 |
-
|
15 |
$lines = file($bt[$l]['file']);
|
16 |
$callerLine = $lines[$bt[$l]['line']-1];
|
17 |
-
preg_match('/([a-zA-Z0-9\_]+)::'.$bt[$l
|
18 |
$callerLine,
|
19 |
$matches);
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
|
|
26 |
}
|
27 |
-
preg_match('/class[\s]+(.+?)[\s]+/si', $lines[$line], $matches);
|
28 |
}
|
|
|
29 |
return $matches[1];
|
30 |
}
|
31 |
-
|
32 |
}
|
33 |
|
34 |
/**
|
6 |
}
|
7 |
|
8 |
if ( ! function_exists( 'get_called_class' ) ) {
|
|
|
9 |
function get_called_class() {
|
10 |
$bt = debug_backtrace();
|
11 |
+
$l = 0;
|
12 |
+
do {
|
13 |
+
$l++;
|
14 |
$lines = file($bt[$l]['file']);
|
15 |
$callerLine = $lines[$bt[$l]['line']-1];
|
16 |
+
preg_match('/([a-zA-Z0-9\_]+)::'.$bt[$l]['function'].'/',
|
17 |
$callerLine,
|
18 |
$matches);
|
19 |
+
|
20 |
+
if ($matches[1] == 'self') {
|
21 |
+
$line = $bt[$l]['line']-1;
|
22 |
+
while ($line > 0 && strpos($lines[$line], 'class') === false) {
|
23 |
+
$line--;
|
24 |
+
}
|
25 |
+
preg_match('/class[\s]+(.+?)[\s]+/si', $lines[$line], $matches);
|
26 |
}
|
|
|
27 |
}
|
28 |
+
while ($matches[1] == 'parent' && $matches[1]);
|
29 |
return $matches[1];
|
30 |
}
|
|
|
31 |
}
|
32 |
|
33 |
/**
|
includes/scripts.php
CHANGED
@@ -94,8 +94,12 @@ function popmake_render_popup_theme_styles() {
|
|
94 |
$styles = '';
|
95 |
|
96 |
foreach ( popmake_get_all_popup_themes() as $theme ) {
|
97 |
-
$
|
98 |
-
|
|
|
|
|
|
|
|
|
99 |
}
|
100 |
|
101 |
set_transient( 'popmake_theme_styles', $styles, 7 * DAY_IN_SECONDS );
|
94 |
$styles = '';
|
95 |
|
96 |
foreach ( popmake_get_all_popup_themes() as $theme ) {
|
97 |
+
$theme_styles = popmake_render_theme_styles( $theme->ID );
|
98 |
+
|
99 |
+
if ( $theme_styles != '' ) {
|
100 |
+
$styles .= "/* Popup Theme " . $theme->ID . ": " . $theme->post_title . " */\r\n";
|
101 |
+
$styles .= $theme_styles;
|
102 |
+
}
|
103 |
}
|
104 |
|
105 |
set_transient( 'popmake_theme_styles', $styles, 7 * DAY_IN_SECONDS );
|
popup-maker.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Plugin URI: https://wppopupmaker.com
|
5 |
* Description: Easily create & style popups with any content. Theme editor to quickly style your popups. Add forms, social media boxes, videos & more.
|
6 |
* Author: Daniel Iser
|
7 |
-
* Version: 1.3
|
8 |
* Author URI: https://wppopupmaker.com
|
9 |
* Text Domain: popup-maker
|
10 |
*
|
@@ -144,7 +144,7 @@ if ( ! class_exists( 'Popup_Maker' ) ) :
|
|
144 |
}
|
145 |
|
146 |
if ( ! defined( 'POPMAKE_VERSION' ) ) {
|
147 |
-
define( 'POPMAKE_VERSION', '1.3' );
|
148 |
}
|
149 |
|
150 |
if ( ! defined( 'POPMAKE_DB_VERSION' ) ) {
|
4 |
* Plugin URI: https://wppopupmaker.com
|
5 |
* Description: Easily create & style popups with any content. Theme editor to quickly style your popups. Add forms, social media boxes, videos & more.
|
6 |
* Author: Daniel Iser
|
7 |
+
* Version: 1.3.1
|
8 |
* Author URI: https://wppopupmaker.com
|
9 |
* Text Domain: popup-maker
|
10 |
*
|
144 |
}
|
145 |
|
146 |
if ( ! defined( 'POPMAKE_VERSION' ) ) {
|
147 |
+
define( 'POPMAKE_VERSION', '1.3.1' );
|
148 |
}
|
149 |
|
150 |
if ( ! defined( 'POPMAKE_DB_VERSION' ) ) {
|
readme.txt
CHANGED
@@ -6,10 +6,10 @@ Donate link:
|
|
6 |
Tags: age restriction, age verification, auto open, automatic popup, conversion, conversions, custom popup, dialog box, exit intent, fancy box, fancy popup, form modal, full page popup, full screen pop, full screen popup, marketing, modal, modals, onclick popup, optin popup, pop-up, pop-ups, popup, popup ads, popup advertising, popup box, popup form, popup message, popup window, popups, unblockable, wordpress popup
|
7 |
Requires at least: 3.4
|
8 |
Tested up to: 4.2.4
|
9 |
-
Stable tag: 1.3
|
10 |
License: GNU Version 2 or Any Later Version
|
11 |
|
12 |
-
The most versatile popup plugin for WordPress! Grow email subscriber lists, get more FB Likes, create login modals, content restriction &
|
13 |
|
14 |
== Description ==
|
15 |
This isn't your grandmas popup software, get ready to increase subscriptions, user interaction, conversion rates and overall usability of your website. Popup Maker is the most versatile and easy to use popup, modal & content overlay plugin available. With a wide variety of customization settings you can create any type of overlay you can imagine. With a growing library of extensions you can further increase it's power. Create slide outs for related content, banner notices, optin or contact forms, special advertisements & much more. there are no limits here for customizability or creativity.
|
@@ -99,8 +99,12 @@ There are several common causes for this which include:
|
|
99 |
|
100 |
== Changelog ==
|
101 |
|
102 |
-
= v1.3 - 8/
|
|
|
|
|
|
|
103 |
|
|
|
104 |
* Feature: Added unlimited themes functionality to the core.
|
105 |
* Feature: Allow disabling of event.prevendDefault() for on click events by adding do-default class.
|
106 |
* Feature: Added support for session based cookies.
|
6 |
Tags: age restriction, age verification, auto open, automatic popup, conversion, conversions, custom popup, dialog box, exit intent, fancy box, fancy popup, form modal, full page popup, full screen pop, full screen popup, marketing, modal, modals, onclick popup, optin popup, pop-up, pop-ups, popup, popup ads, popup advertising, popup box, popup form, popup message, popup window, popups, unblockable, wordpress popup
|
7 |
Requires at least: 3.4
|
8 |
Tested up to: 4.2.4
|
9 |
+
Stable tag: 1.3.1
|
10 |
License: GNU Version 2 or Any Later Version
|
11 |
|
12 |
+
The most versatile popup plugin for WordPress! Grow email subscriber lists, get more FB Likes, create login modals, content restriction & more.
|
13 |
|
14 |
== Description ==
|
15 |
This isn't your grandmas popup software, get ready to increase subscriptions, user interaction, conversion rates and overall usability of your website. Popup Maker is the most versatile and easy to use popup, modal & content overlay plugin available. With a wide variety of customization settings you can create any type of overlay you can imagine. With a growing library of extensions you can further increase it's power. Create slide outs for related content, banner notices, optin or contact forms, special advertisements & much more. there are no limits here for customizability or creativity.
|
99 |
|
100 |
== Changelog ==
|
101 |
|
102 |
+
= v1.3.1 - 8/8/2015 =
|
103 |
+
* Fix: Error in get_called_class alternate function for PHP 5.2
|
104 |
+
* Fix: Force theme css builder to check for empty themes.
|
105 |
+
* Fix: Bug where z-indexes were incorrectly set.
|
106 |
|
107 |
+
= v1.3 - 8/7/2015 =
|
108 |
* Feature: Added unlimited themes functionality to the core.
|
109 |
* Feature: Allow disabling of event.prevendDefault() for on click events by adding do-default class.
|
110 |
* Feature: Added support for session based cookies.
|