Version Description
Download this release
Release Info
Developer | danieliser |
Plugin | Popup Maker – Popup Forms, Optins & More |
Version | 1.5.5 |
Comparing to | |
See all releases |
Code changes from version 1.5.4 to 1.5.5
- assets/js/site.js +16 -13
- assets/js/site.min.js +1 -1
- includes/class-pum.php +1 -1
- includes/modules/menus.php +16 -6
- includes/modules/menus/{class-pum-walker-nav-menu-edit-deprecated.php → class-nav-menu-edit-custom-fields-deprecated.php} +3 -13
- includes/modules/menus/{class-pum-walker-nav-menu-edit.php → class-nav-menu-edit-custom-fields.php} +74 -83
- languages/popup-maker.pot +2 -2
- popup-maker.php +2 -2
- readme.txt +6 -2
assets/js/site.js
CHANGED
@@ -2428,23 +2428,26 @@ var pum_debug_mode = false,
|
|
2428 |
.css({cursor: "pointer"});
|
2429 |
|
2430 |
// Catches and initializes any triggers added to the page late.
|
2431 |
-
$(document).on('click', trigger_selector
|
2432 |
var $this = $(this);
|
2433 |
|
2434 |
-
|
2435 |
-
|
2436 |
-
|
2437 |
-
|
2438 |
-
|
2439 |
-
|
2440 |
-
|
2441 |
-
|
|
|
2442 |
|
2443 |
-
|
2444 |
-
|
|
|
|
|
|
|
|
|
2445 |
|
2446 |
-
// TODO test this.
|
2447 |
-
$this.trigger('click');
|
2448 |
});
|
2449 |
},
|
2450 |
admin_debug: function () {
|
2428 |
.css({cursor: "pointer"});
|
2429 |
|
2430 |
// Catches and initializes any triggers added to the page late.
|
2431 |
+
$(document).on('click', trigger_selector, function (event) {
|
2432 |
var $this = $(this);
|
2433 |
|
2434 |
+
if (!$this.hasClass('pum-trigger') || !$this.data('popup')) {
|
2435 |
+
$this
|
2436 |
+
.addClass('pum-trigger')
|
2437 |
+
.data('popup', popup_settings.id)
|
2438 |
+
.attr('data-popup', popup_settings.id)
|
2439 |
+
.data('settings', settings)
|
2440 |
+
.data('do-default', settings.do_default)
|
2441 |
+
.attr('data-do-default', settings.do_default)
|
2442 |
+
.css({cursor: "pointer"});
|
2443 |
|
2444 |
+
event.preventDefault();
|
2445 |
+
event.stopPropagation();
|
2446 |
+
|
2447 |
+
// Retrigger clicks.
|
2448 |
+
$this.trigger('click');
|
2449 |
+
}
|
2450 |
|
|
|
|
|
2451 |
});
|
2452 |
},
|
2453 |
admin_debug: function () {
|
assets/js/site.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
!function(e){"use strict";void 0===e.fn.on&&(e.fn.on=function(e,t,o){return this.delegate(t,e,o)}),void 0===e.fn.off&&(e.fn.off=function(e,t,o){return this.undelegate(t,e,o)}),void 0===e.fn.bindFirst&&(e.fn.bindFirst=function(t,o){var n,i,a=e(this);a.unbind(t,o),a.bind(t,o),n=e._data(a[0]).events,i=n[t],i.unshift(i.pop()),n[t]=i}),void 0===e.fn.outerHtml&&(e.fn.outerHtml=function(){var t=e(this).clone(),o=e("<div/>").append(t);return o.html()}),void 0===Date.now&&(Date.now=function(){return(new Date).getTime()})}(jQuery);var PUM;!function(e,t,o){"use strict";function n(e){return!isNaN(e)&&parseInt(Number(e))==e&&!isNaN(parseInt(e,10))}function i(){var e={},t=function(t,n,i){"boolean"==typeof n&&(i=n,n=!1);var a=n?n.selector+" "+t:t;return(o===e[a]||i)&&(e[a]=n?n.find(t):jQuery(t)),e[a]};return t.elementCache=e,t}function a(e,t){function o(e,t,o){return t?e[t.slice(0,o?-1:t.length)]:e}function n(e,t){return t?t.split("[").reduce(o,e):e}return t.split(".").reduce(n,e)}PUM={get:new i,getPopup:function(t){var o;return o=n(t)?PUM.get("#pum-"+t):"current"===t?PUM.get(".pum-overlay.pum-active:eq(0)",!0):"open"===t?PUM.get(".pum-overlay.pum-active",!0):"closed"===t?PUM.get(".pum-overlay:not(.pum-active)",!0):t instanceof jQuery?t:e(t),o.hasClass("pum-overlay")?o:o.hasClass("popmake")?o.parents(".pum-overlay"):o.parents(".pum-overlay").length?o.parents(".pum-overlay"):e()},open:function(e,t){PUM.getPopup(e).popmake("open",t)},close:function(e,t){PUM.getPopup(e).popmake("close",t)},preventOpen:function(e){PUM.getPopup(e).addClass("preventOpen")},getSettings:function(e){var t=PUM.getPopup(e);return t.popmake("getSettings")},getSetting:function(e,t,n){var i=PUM.getSettings(e),p=a(i,t);return"undefined"!=typeof p?p:n!==o?n:null},checkConditions:function(e){return PUM.getPopup(e).popmake("checkConditions")},getCookie:function(t){return e.pm_cookie(t)},clearCookie:function(t,o){e.pm_remove_cookie(t),"function"==typeof o&&o()},clearCookies:function(t,n){var i,a=PUM.getPopup(t),p=a.popmake("getSettings"),s=p.cookies;if(s!==o&&s.length)for(i=0;s.length>i;i+=1)e.pm_remove_cookie(s[i].settings.name);"function"==typeof n&&n()}},e.fn.popmake=function(o){return e.fn.popmake.methods[o]?(e(t).trigger("pumMethodCall",arguments),e.fn.popmake.methods[o].apply(this,Array.prototype.slice.call(arguments,1))):"object"!=typeof o&&o?void(window.console&&console.warn("Method "+o+" does not exist on $.fn.popmake")):e.fn.popmake.methods.init.apply(this,arguments)},e.fn.popmake.methods={init:function(t){return this.each(function(){var n=PUM.getPopup(this),i=e.extend(!0,{},e.fn.popmake.defaults,n.data("popmake"),t);return i.theme_id<=0&&(i.theme_id=popmake_default_theme),i.meta.display.disable_reposition===o&&e(window).on("resize",function(){(n.hasClass("pum-active")||n.find(".popmake.active").length)&&e.fn.popmake.utilities.throttle(setTimeout(function(){n.popmake("reposition")},25),500,!1)}),n.find(".pum-container").data("popmake",i),n.data("popmake",i).trigger("pumInit"),this})},getOverlay:function(){return e(this)},getContainer:function(){return e(this).find(".pum-container")},getTitle:function(){return e(this).find(".pum-title")||null},getContent:function(){return e(this).find(".pum-content")||null},getClose:function(){return e(this).find(".pum-content + .pum-close")||null},getSettings:function(){return e(this).data("popmake")},state:function(e){var t=PUM.getPopup(this);if(o!==e)switch(e){case"isOpen":return t.hasClass("pum-open")||t.popmake("getContainer").hasClass("active");case"isClosed":return!t.hasClass("pum-open")&&!t.popmake("getContainer").hasClass("active")}},open:function(t){var n=PUM.getPopup(this),i=n.popmake("getContainer"),a=n.popmake("getClose"),p=n.popmake("getSettings"),s=e("html");return n.trigger("pumBeforeOpen"),n.hasClass("preventOpen")||i.hasClass("preventOpen")?(console.log("prevented"),n.removeClass("preventOpen").removeClass("pum-active").trigger("pumOpenPrevented"),this):(p.meta.display.stackable||n.popmake("close_all"),n.addClass("pum-active"),p.meta.close.button_delay>0&&a.fadeOut(0),s.addClass("pum-open"),p.meta.display.overlay_disabled?s.addClass("pum-open-overlay-disabled"):s.addClass("pum-open-overlay"),p.meta.display.position_fixed!==o&&p.meta.display.position_fixed?s.addClass("pum-open-fixed"):s.addClass("pum-open-scrollable"),n.popmake("setup_close").popmake("reposition").css({"z-index":p.meta.display.overlay_zindex||1999999998}).popmake("animate",p.meta.display.animation_type,function(){p.meta.close.button_delay>0&&setTimeout(function(){a.fadeIn()},p.meta.close.button_delay),n.trigger("pumAfterOpen"),e.fn.popmake.last_open_popup=n,t!==o&&t()}),this)},setup_close:function(){var t=PUM.getPopup(this),n=t.popmake("getClose").add(e(".popmake-close",t).not(t.popmake("getClose"))),i=t.popmake("getSettings");return n.off("click.pum").on("click.pum",function(n){var i=e(this),a=i.hasClass("pum-do-default")||i.data("do-default")!==o&&i.data("do-default");a||n.preventDefault(),e.fn.popmake.last_close_trigger="Close Button",t.popmake("close")}),(i.meta.close.esc_press||i.meta.close.f4_press)&&e(window).off("keyup.popmake").on("keyup.popmake",function(o){27===o.keyCode&&i.meta.close.esc_press&&(e.fn.popmake.last_close_trigger="ESC Key",t.popmake("close")),115===o.keyCode&&i.meta.close.f4_press&&(e.fn.popmake.last_close_trigger="F4 Key",t.popmake("close"))}),i.meta.close.overlay_click&&t.off("click.popmake").on("click.popmake",function(o){o.target===t[0]&&(e.fn.popmake.last_close_trigger="Overlay Click",t.popmake("close"))}),t.trigger("pumSetupClose"),this},close:function(t){return this.each(function(){var n=PUM.getPopup(this),i=n.popmake("getContainer"),a=n.popmake("getClose").add(e(".popmake-close",n).not(n.popmake("getClose")));return n.trigger("pumBeforeClose"),n.hasClass("preventClose")||i.hasClass("preventClose")?(n.removeClass("preventClose").trigger("pumClosePrevented"),this):(i.fadeOut("fast",function(){n.is(":visible")&&n.fadeOut("fast"),e(window).off("keyup.popmake"),n.off("click.popmake"),a.off("click.popmake"),1===e(".pum-active").length&&e("html").removeClass("pum-open").removeClass("pum-open-scrollable").removeClass("pum-open-overlay").removeClass("pum-open-overlay-disabled").removeClass("pum-open-fixed"),n.removeClass("pum-active").trigger("pumAfterClose"),i.find("iframe").filter('[src*="youtube"],[src*="vimeo"]').each(function(){var t=e(this),o=t.attr("src"),n=o.replace("autoplay=1","1=1");n!==o&&(o=n),t.prop("src",o)}),i.find("video").each(function(){this.pause()}),t!==o&&t()}),this)})},close_all:function(){return e(".pum-active").popmake("close"),this},reposition:function(t){var o=PUM.getPopup(this).trigger("pumBeforeReposition"),n=o.popmake("getContainer"),i=o.popmake("getSettings"),a=i.meta.display,p=a.location,s={my:"",at:"",of:window,collision:"none",using:"function"==typeof t?t:e.fn.popmake.callbacks.reposition_using},r={overlay:null,container:null},l=null;try{l=e(e.fn.popmake.last_open_trigger)}catch(c){l=e()}return a.position_from_trigger&&l.length?(s.of=l,p.indexOf("left")>=0&&(s.my+=" right",s.at+=" left"+(0!==a.position_left?"-"+a.position_left:"")),p.indexOf("right")>=0&&(s.my+=" left",s.at+=" right"+(0!==a.position_right?"+"+a.position_right:"")),p.indexOf("center")>=0&&(s.my="center"===p?"center":s.my+" center",s.at="center"===p?"center":s.at+" center"),p.indexOf("top")>=0&&(s.my+=" bottom",s.at+=" top"+(0!==a.position_top?"-"+a.position_top:"")),p.indexOf("bottom")>=0&&(s.my+=" top",s.at+=" bottom"+(0!==a.position_bottom?"+"+a.position_bottom:""))):(p.indexOf("left")>=0&&(s.my+=" left"+(0!==a.position_left?"+"+a.position_left:""),s.at+=" left"),p.indexOf("right")>=0&&(s.my+=" right"+(0!==a.position_right?"-"+a.position_right:""),s.at+=" right"),p.indexOf("center")>=0&&(s.my="center"===p?"center":s.my+" center",s.at="center"===p?"center":s.at+" center"),p.indexOf("top")>=0&&(s.my+=" top"+(0!==a.position_top?"+"+(e("body").hasClass("admin-bar")?parseInt(a.position_top,10)+32:a.position_top):""),s.at+=" top"),p.indexOf("bottom")>=0&&(s.my+=" bottom"+(0!==a.position_bottom?"-"+a.position_bottom:""),s.at+=" bottom")),s.my=e.trim(s.my),s.at=e.trim(s.at),o.is(":hidden")&&(r.overlay=o.css("opacity"),o.css({opacity:0}).show()),n.is(":hidden")&&(r.container=n.css("opacity"),n.css({opacity:0}).show()),a.position_fixed&&n.addClass("fixed"),"custom"===i.meta.display.size?n.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&&n.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.trigger("pumAfterReposition"),n.addClass("custom-position").position(s).trigger("popmakeAfterReposition"),r.overlay&&o.css({opacity:r.overlay}).hide(),r.container&&n.css({opacity:r.container}).hide(),this},retheme:function(t){e(this).trigger("popmakeBeforeRetheme");var n,i,a=PUM.getPopup(this),p=a.popmake("getContainer"),s=a.popmake("getTitle"),r=a.popmake("getContent"),l=a.popmake("getClose"),c=a.popmake("getSettings");switch(t===o&&(t=e.fn.popmake.themes[c.theme_id],t===o&&(t=e.fn.popmake.themes[1])),n="yes"===t.container.boxshadow_inset?"inset ":"",i="yes"===t.close.boxshadow_inset?"inset ":"",a.removeAttr("style").css({backgroundColor:e.fn.popmake.utilities.convert_hex(t.overlay.background_color,t.overlay.background_opacity),zIndex:c.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:n+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:c.meta.display.zindex||999}),s.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)}),r.css({color:t.content.font_color,fontFamily:t.content.font_family,fontWeight:t.content.font_weight,fontStyle:t.content.font_style}),e("p, label",r).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},animation_origin:function(t){var o=PUM.getPopup(this),n=o.popmake("getContainer"),i={my:"",at:""};switch(t){case"top":i={my:"left+"+n.offset().left+" bottom-100",at:"left top"};break;case"bottom":i={my:"left+"+n.offset().left+" top+100",at:"left bottom"};break;case"left":i={my:"right top+"+n.offset().top,at:"left top"};break;case"right":i={my:"left top+"+n.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}}}(jQuery,document);var PUM_Accessibility;!function(e,t,o){"use strict";var n,i,a,p="a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]";PUM_Accessibility={forceFocus:function(t){a&&!e.contains(a,t.target)&&(t.stopPropagation(),PUM_Accessibility.setFocusToFirstItem())},trapTabKey:function(t){if(9===t.keyCode){var o=a.find(".pum-container *").filter(p).filter(":visible"),n=e(":focus"),i=o.length,s=o.index(n);t.shiftKey?0===s&&(o.get(i-1).focus(),t.preventDefault()):s===i-1&&(o.get(0).focus(),t.preventDefault())}},setFocusToFirstItem:function(){a.find(".pum-container *").filter(p).filter(":visible").filter(":not(.pum-close)").first().focus()}},e(t).on("pumInit",".pum",function(){PUM.getPopup(this).find("[tabindex]").each(function(){var t=e(this);t.data("tabindex",t.attr("tabindex")).prop("tabindex","0")})}).on("pumBeforeOpen",".pum",function(){var o=PUM.getPopup(this),p=e(":focus");o.has(p).length||(i=p),a=o.on("keydown.pum_accessibility",PUM_Accessibility.trapTabKey).attr("aria-hidden","false"),n=e("body > *").filter(":visible").not(a),n.attr("aria-hidden","true"),e(t).on("focus.pum_accessibility",PUM_Accessibility.forceFocus),PUM_Accessibility.setFocusToFirstItem()}).on("pumAfterOpen",".pum",function(){}).on("pumBeforeClose",".pum",function(){}).on("pumAfterClose",".pum",function(){var p=PUM.getPopup(this);p.off("keydown.pum_accessibility").attr("aria-hidden","true"),n&&(n.attr("aria-hidden","false"),n=null),i!==o&&i.length&&i.focus(),a=null,e(t).off("focus.pum_accessibility")}).on("pumSetupClose",".pum",function(){}).on("pumOpenPrevented",".pum",function(){}).on("pumClosePrevented",".pum",function(){}).on("pumBeforeReposition",".pum",function(){})}(jQuery,document);var PUM_Analytics;!function(e,t,o){"use strict";e.fn.popmake.last_open_trigger=null,e.fn.popmake.last_close_trigger=null,e.fn.popmake.conversion_trigger=null;var n=!("undefined"==typeof pum_vars.restapi||!pum_vars.restapi);PUM_Analytics={beacon:function(t){var o=new Image,i=n?pum_vars.restapi:pum_vars.ajaxurl;t=e.extend(!0,{route:"/analytics/open",type:"open",data:{pid:null,_cache:+new Date},callback:function(){}},t),n?i+=t.route:(t.data.action="pum_analytics",t.data.type=t.type),i&&(e(o).on("error success load done",t.callback),o.src=i+"?"+e.param(t.data))}},pum_vars.disable_open_tracking!==o&&pum_vars.disable_open_tracking||e(t).on("pumAfterOpen.core_analytics","body > .pum",function(){var t=PUM.getPopup(this),o={pid:parseInt(t.popmake("getSettings").id,10)||null};o.pid>0&&!e("body").hasClass("single-popup")&&PUM_Analytics.beacon({data:o})})}(jQuery,document),function(e,t,o){"use strict";e.fn.popmake.methods.animate_overlay=function(t,o,n){var i=PUM.getPopup(this).popmake("getSettings");return i.meta.display.overlay_disabled?e.fn.popmake.overlay_animations.none.apply(this,[o,n]):e.fn.popmake.overlay_animations[t]?e.fn.popmake.overlay_animations[t].apply(this,[o,n]):(window.console&&console.warn("Animation style "+t+" does not exist."),this)},e.fn.popmake.methods.animate=function(t){return e.fn.popmake.animations[t]?e.fn.popmake.animations[t].apply(this,Array.prototype.slice.call(arguments,1)):(window.console&&console.warn("Animation style "+t+" does not exist."),this)},e.fn.popmake.animations={none:function(e){var t=PUM.getPopup(this);return t.popmake("getContainer").show(0),t.popmake("animate_overlay","none",0,function(){e!==o&&e()}),this},slide:function(e){var t=PUM.getPopup(this).show(0).css({opacity:0}),n=t.popmake("getContainer").show(0).css({opacity:0}),i=t.popmake("getSettings"),a=i.meta.display.animation_speed/2,p=t.popmake("animation_origin",i.meta.display.animation_origin);return n.position(p).css({opacity:1}),t.css({opacity:1}).popmake("animate_overlay","fade",a,function(){n.popmake("reposition",function(t){n.animate(t,a,"swing",function(){e!==o&&e()})})}),this},fade:function(e){var t=PUM.getPopup(this),n=t.popmake("getContainer"),i=t.popmake("getSettings"),a=i.meta.display.animation_speed/2;return n.show(0).css({opacity:0}),t.popmake("animate_overlay","fade",a,function(){n.animate({opacity:1},a,"swing",function(){e!==o&&e()})}),this},fadeAndSlide:function(e){var t=PUM.getPopup(this).show(0).css({opacity:0}),n=t.popmake("getContainer").show(0).css({opacity:0}),i=t.popmake("getSettings"),a=i.meta.display.animation_speed/2,p=t.popmake("animation_origin",i.meta.display.animation_origin);return n.position(p),t.hide().css({opacity:1}).popmake("animate_overlay","fade",a,function(){n.popmake("reposition",function(t){t.opacity=1,n.animate(t,a,"swing",function(){e!==o&&e()})})}),this},grow:function(t){return e.fn.popmake.animations.fade.apply(this,arguments)},growAndSlide:function(t){return e.fn.popmake.animations.fadeAndSlide.apply(this,arguments)}},e.fn.popmake.overlay_animations={none:function(e,t){PUM.getPopup(this).show(e,t)},fade:function(e,t){PUM.getPopup(this).fadeIn(e,t)},slide:function(e,t){PUM.getPopup(this).slideDown(e,t)}}}(jQuery,document),function(e,t,o){"use strict";e(t).on("pumInit",".pum",function(){e(this).popmake("getContainer").trigger("popmakeInit")}).on("pumBeforeOpen",".pum",function(){e(this).popmake("getContainer").addClass("active").trigger("popmakeBeforeOpen")}).on("pumAfterOpen",".pum",function(){e(this).popmake("getContainer").trigger("popmakeAfterOpen")}).on("pumBeforeClose",".pum",function(){e(this).popmake("getContainer").trigger("popmakeBeforeClose")}).on("pumAfterClose",".pum",function(){e(this).popmake("getContainer").removeClass("active").trigger("popmakeAfterClose")}).on("pumSetupClose",".pum",function(){e(this).popmake("getContainer").trigger("popmakeSetupClose")}).on("pumOpenPrevented",".pum",function(){e(this).popmake("getContainer").removeClass("preventOpen").removeClass("active")}).on("pumClosePrevented",".pum",function(){e(this).popmake("getContainer").removeClass("preventClose")}).on("pumBeforeReposition",".pum",function(){e(this).popmake("getContainer").trigger("popmakeBeforeReposition")})}(jQuery,document),function(e,t,o){"use strict";e.fn.popmake.callbacks={reposition_using:function(t){e(this).css(t)}}}(jQuery,document),function(e,t,o){"use strict";var n;e.extend(e.fn.popmake.methods,{checkConditions:function(){var t,i,a,p,s,r=PUM.getPopup(this),l=r.popmake("getSettings"),c=!0;if(l.mobile_disabled!==o&&l.mobile_disabled&&("object"!=typeof n&&(n=new MobileDetect(window.navigator.userAgent)),n.phone()))return!1;if(l.tablet_disabled!==o&&l.tablet_disabled&&("object"!=typeof n&&(n=new MobileDetect(window.navigator.userAgent)),n.tablet()))return!1;if(l.conditions!==o&&l.conditions.length)for(i=0;l.conditions.length>i;i++){for(p=l.conditions[i],t=!1,a=0;p.length>a&&(s=e.extend({},{not_operand:!1},p[a]),!s.not_operand&&r.popmake("checkCondition",s)?t=!0:s.not_operand&&!r.popmake("checkCondition",s)&&(t=!0),e(this).trigger("pumCheckingCondition",[t,s]),!t);a++);t||(c=!1)}return c},checkCondition:function(t){var o=t.target||null;return o?e.fn.popmake.conditions[o]?e.fn.popmake.conditions[o].apply(this,[t]):window.console?(console.warn("Condition "+o+" does not exist."),!0):void 0:(console.warn("Condition type not set."),!1)}}),e.fn.popmake.conditions={device_is_mobile:function(e){return n.mobile()}}}(jQuery,document);var pm_cookie,pm_cookie_json,pm_remove_cookie;!function(e){"use strict";function t(t){function o(n,i,a){var p,s=new Date;if("undefined"!=typeof document){if(arguments.length>1){switch(a=e.extend({path:"/"},o.defaults,a),typeof a.expires){case"number":s.setMilliseconds(s.getMilliseconds()+864e5*a.expires),a.expires=s;break;case"string":s.setTime(1e3*e.fn.popmake.utilities.strtotime("+"+a.expires)),a.expires=s}try{p=JSON.stringify(i),/^[\{\[]/.test(p)&&(i=p)}catch(r){}return i=t.write?t.write(i,n):encodeURIComponent(String(i)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),n=encodeURIComponent(String(n)),n=n.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),n=n.replace(/[\(\)]/g,escape),document.cookie=[n,"=",i,a.expires?"; expires="+a.expires.toUTCString():"",a.path?"; path="+a.path:"",a.domain?"; domain="+a.domain:"",a.secure?"; secure":""].join("")}n||(p={});for(var l=document.cookie?document.cookie.split("; "):[],c=/(%[0-9A-Z]{2})+/g,u=0;u<l.length;u++){var d=l[u].split("="),m=d.slice(1).join("=");'"'===m.charAt(0)&&(m=m.slice(1,-1));try{var f=d[0].replace(c,decodeURIComponent);if(m=t.read?t.read(m,f):t(m,f)||m.replace(c,decodeURIComponent),this.json)try{m=JSON.parse(m)}catch(r){}if(n===f){p=m;break}n||(p[f]=m)}catch(r){}}return p}}return void 0===t&&(t=function(){}),o.set=o,o.get=function(e){return o.call(o,e)},o.getJSON=function(){return o.apply({json:!0},[].slice.call(arguments))},o.defaults={},o.remove=function(t,n){o(t,"",e.extend({},n,{expires:-1,path:""})),o(t,"",e.extend({},n,{expires:-1}))},o.process=function(e,t,n,i){return arguments.length>3&&"object"!=typeof arguments[2]&&void 0!==t?o.apply(o,[e,t,{expires:n,path:i}]):o.apply(o,[].slice.call(arguments,[0,2]))},o.withConverter=e.fn.popmake.cookie,o}e.extend(e.fn.popmake,{cookie:t()}),pm_cookie=e.pm_cookie=e.fn.popmake.cookie.process,pm_cookie_json=e.pm_cookie_json=e.fn.popmake.cookie.getJSON,pm_remove_cookie=e.pm_remove_cookie=e.fn.popmake.cookie.remove}(jQuery),function(e,t,o){"use strict";e.extend(e.fn.popmake.methods,{addCookie:function(t){return pum.hooks.doAction("popmake.addCookie",arguments),e.fn.popmake.cookies[t]?e.fn.popmake.cookies[t].apply(this,Array.prototype.slice.call(arguments,1)):(window.console&&console.warn("Cookie type "+t+" does not exist."),this)},setCookie:function(t){e.pm_cookie(t.name,!0,t.session?null:t.time,t.path?"/":null),pum.hooks.doAction("popmake.setCookie",t)},checkCookies:function(t){var n,i=!1;if(t.cookie===o||t.cookie.name===o||null===t.cookie.name)return!1;switch(typeof t.cookie.name){case"object":case"array":for(n=0;t.cookie.name.length>n;n+=1)e.pm_cookie(t.cookie.name[n])!==o&&(i=!0);break;case"string":e.pm_cookie(t.cookie.name)!==o&&(i=!0)}return pum.hooks.doAction("popmake.checkCookies",t,i),i}}),e.fn.popmake.cookies={on_popup_open:function(e){var t=PUM.getPopup(this);t.on("pumAfterOpen",function(){t.popmake("setCookie",e)})},on_popup_close:function(e){var t=PUM.getPopup(this);t.on("pumBeforeClose",function(){t.popmake("setCookie",e)})},manual:function(e){var t=PUM.getPopup(this);t.on("pumSetCookie",function(){t.popmake("setCookie",e)})},ninja_form_success:function(e){var t=PUM.getPopup(this);t.on("pum_nf.success",function(){t.popmake("setCookie",e)})}},e(t).on("pumInit",".pum",function(){var e,t=PUM.getPopup(this),n=t.popmake("getSettings"),i=n.cookies,a=null;if(i!==o&&i.length)for(e=0;i.length>e;e+=1)a=i[e],t.popmake("addCookie",a.event,a.settings)})}(jQuery,document);var pum_debug_mode=!1,pum_debug;!function(e,t){if(t=window.pum_vars||{debug_mode:!1},pum_debug_mode=void 0!==t.debug_mode&&t.debug_mode,pum_debug_mode||window.location.href.indexOf("pum_debug")===-1||(pum_debug_mode=!0),pum_debug_mode){var o=!1,n=!1,i=window.pum_debug_vars||{};pum_debug={odump:function(t){return e.extend({},t)},logo:function(){console.log(" -------------------------------------------------------------\n| ____ __ __ _ |\n| | _ \\ ___ _ __ _ _ _ __ | \\/ | __ _| | _____ _ __ |\n| | |_) / _ \\| '_ \\| | | | '_ \\ | |\\/| |/ _` | |/ / _ \\ '__| |\n| | __/ (_) | |_) | |_| | |_) | | | | | (_| | < __/ | |\n| |_| \\___/| .__/ \\__,_| .__/ |_| |_|\\__,_|_|\\_\\___|_| |\n| |_| |_| |\n -------------------------------------------------------------")},initialize:function(){o=!0,pum_debug.logo(),console.debug(i.debug_mode_enabled),console.log(i.debug_started_at,new Date),console.info(i.debug_more_info),pum_debug.divider(i.global_info),console.groupCollapsed(i.localized_vars),console.log("pum_vars:",pum_debug.odump(t)),e(document).trigger("pum_debug_initialize_localized_vars"),console.groupEnd(),e(document).trigger("pum_debug_initialize")},popup_event_header:function(e){var t=e.popmake("getSettings");n!==t.id&&(n=t.id,pum_debug.divider(i.single_popup_label+t.id+" - "+t.slug))},divider:function(e){var t=62,o=62,n=0,i=" "+new Array(t+1).join("-")+" ";"string"==typeof e?(o=t-e.length,n={left:Math.floor(o/2),right:Math.floor(o/2)},n.left+n.right===o-1&&n.right++,n.left=new Array(n.left+1).join(" "),n.right=new Array(n.right+1).join(" "),console.log(""+i+"\n|"+n.left+e+n.right+"|\n"+i)):console.log(i)},click_trigger:function(e,t){var o,n=e.popmake("getSettings"),a=[".popmake-"+n.id,".popmake-"+decodeURIComponent(n.slug),'a[href$="#popmake-'+n.id+'"]'];t.extra_selectors&&""!==t.extra_selectors&&a.push(t.extra_selectors),a=pum.hooks.applyFilters("pum.trigger.click_open.selectors",a,t,e),o=a.join(", "),console.log(i.label_selector,o)},trigger:function(t,o){switch(console.groupCollapsed(i.triggers[o.type].name),o.type){case"auto_open":console.log(i.label_delay,o.settings.delay),console.log(i.label_cookie,o.settings.cookie.name);break;case"click_open":pum_debug.click_trigger(t,o.settings),console.log(i.label_cookie,o.settings.cookie.name)}e(document).trigger("pum_debug_render_trigger",t,o),console.groupEnd()},cookie:function(t,o){switch(console.groupCollapsed(i.cookies[o.event].name),o.event){case"on_popup_open":case"on_popup_close":case"manual":case"ninja_form_success":console.log(i.label_settings,pum_debug.odump(o.settings))}e(document).trigger("pum_debug_render_trigger",t,o),console.groupEnd()}},e(document).on("pumInit",".pum",function(){var t=PUM.getPopup(e(this)),n=t.popmake("getSettings"),a=0;if(o||(pum_debug.initialize(),pum_debug.divider(i.popups_initializing)),console.groupCollapsed(i.single_popup_label+n.id+" - "+n.slug),console.log(i.theme_id,n.theme_id),void 0!==n.triggers&&n.triggers.length){for(console.groupCollapsed(i.label_triggers),a=0;n.triggers.length>a;a++)pum_debug.trigger(t,n.triggers[a]);console.groupEnd()}if(void 0!==n.cookies&&n.cookies.length){for(console.groupCollapsed(i.label_cookies),a=0;n.cookies.length>a;a+=1)pum_debug.cookie(t,n.cookies[a]);console.groupEnd()}void 0!==n.conditions&&n.conditions.length&&(console.groupCollapsed(i.label_conditions),console.log(n.conditions),console.groupEnd()),console.groupCollapsed(i.label_popup_settings),console.log(i.label_mobile_disabled,null!==n.mobile_disabled),console.log(i.label_tablet_disabled,null!==n.tablet_disabled),console.log(i.label_display_settings,pum_debug.odump(n.meta.display)),console.log(i.label_close_settings,pum_debug.odump(n.meta.close)),t.trigger("pum_debug_popup_settings");var p=pum.hooks.applyFilters("pum_debug.popup_settings.cleaned_meta",pum_debug.odump(n.meta),t);delete p.display,delete p.close,delete p.click_open,p.length&&console.log("Meta: ",p),console.groupEnd(),console.groupEnd()}).on("pumBeforeOpen",".pum",function(){var t=PUM.getPopup(e(this)),o=(t.popmake("getSettings"),e.fn.popmake.last_open_trigger);pum_debug.popup_event_header(t),console.groupCollapsed(i.label_event_before_open);try{o=e(e.fn.popmake.last_open_trigger)}catch(n){o=e()}finally{o=o.length?o:e.fn.popmake.last_open_trigger.toString(),console.log(i.label_triggers,[o])}console.groupEnd()}).on("pumOpenPrevented",".pum",function(){var t=PUM.getPopup(e(this));pum_debug.popup_event_header(t),console.groupCollapsed(i.label_event_open_prevented),console.groupEnd()}).on("pumAfterOpen",".pum",function(){var t=PUM.getPopup(e(this));t.popmake("getSettings");pum_debug.popup_event_header(t),console.groupCollapsed(i.label_event_after_open),console.groupEnd()}).on("pumSetupClose",".pum",function(){var t=PUM.getPopup(e(this));t.popmake("getSettings");pum_debug.popup_event_header(t),console.groupCollapsed(i.label_event_setup_close),console.groupEnd()}).on("pumClosePrevented",".pum",function(){var t=PUM.getPopup(e(this));t.popmake("getSettings");pum_debug.popup_event_header(t),console.groupCollapsed(i.label_event_close_prevented),console.groupEnd()}).on("pumBeforeClose",".pum",function(){var t=PUM.getPopup(e(this));t.popmake("getSettings");pum_debug.popup_event_header(t),console.groupCollapsed(i.label_event_before_close),console.groupEnd()}).on("pumAfterClose",".pum",function(){var t=PUM.getPopup(e(this));t.popmake("getSettings");pum_debug.popup_event_header(t),console.groupCollapsed(i.label_event_after_close),console.groupEnd()}).on("pumBeforeReposition",".pum",function(){var t=PUM.getPopup(e(this));t.popmake("getSettings");pum_debug.popup_event_header(t),console.groupCollapsed(i.label_event_before_reposition),console.groupEnd()}).on("pumAfterReposition",".pum",function(){var t=PUM.getPopup(e(this));t.popmake("getSettings");pum_debug.popup_event_header(t),console.groupCollapsed(i.label_event_after_reposition),console.groupEnd()}).on("pumCheckingCondition",".pum",function(t,o,n){var a=PUM.getPopup(e(this));a.popmake("getSettings");pum_debug.popup_event_header(a),console.groupCollapsed(i.label_event_checking_condition),console.log((n.not_operand?"(!) ":"")+n.target+": "+o,n),console.groupEnd()})}}(jQuery),function(e,t,o){"use strict";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"}}}}(jQuery,document),function(e,t){"use strict";var o=function(){function e(e,t,o,n){return"string"==typeof e&&"function"==typeof t&&(o=parseInt(o||10,10),s("actions",e,t,o,n)),u}function t(){var e=c.call(arguments),t=e.shift();return"string"==typeof t&&l("actions",t,e),u}function o(e,t){return"string"==typeof e&&p("actions",e,t),u}function n(e,t,o,n){return"string"==typeof e&&"function"==typeof t&&(o=parseInt(o||10,10),s("filters",e,t,o,n)),u}function i(){var e=c.call(arguments),t=e.shift();return"string"==typeof t?l("filters",t,e):u}function a(e,t){return"string"==typeof e&&p("filters",e,t),u}function p(e,t,o,n){var i,a,p;if(d[e][t])if(o)if(i=d[e][t],n)for(p=i.length;p--;)a=i[p],a.callback===o&&a.context===n&&i.splice(p,1);else for(p=i.length;p--;)i[p].callback===o&&i.splice(p,1);else d[e][t]=[]}function s(e,t,o,n,i){var a={callback:o,priority:n,context:i},p=d[e][t];p?(p.push(a),p=r(p)):p=[a],d[e][t]=p}function r(e){for(var t,o,n,i=1,a=e.length;i<a;i++){for(t=e[i],o=i;(n=e[o-1])&&n.priority>t.priority;)e[o]=e[o-1],
|
2 |
-
--o;e[o]=t}return e}function l(e,t,o){var n,i,a=d[e][t];if(!a)return"filters"===e&&o[0];if(i=a.length,"filters"===e)for(n=0;n<i;n++)o[0]=a[n].callback.apply(a[n].context,o);else for(n=0;n<i;n++)a[n].callback.apply(a[n].context,o);return"filters"!==e||o[0]}var c=Array.prototype.slice,u={removeFilter:a,applyFilters:i,addFilter:n,removeAction:o,doAction:t,addAction:e},d={actions:{},filters:{}};return u};e.pum=e.pum||{},e.pum.hooks=e.pum.hooks||new o}(window),function(e){"use strict";if("undefined"!=typeof Marionette&&"undefined"!=typeof nfRadio){var t=Marionette.Object.extend({initialize:function(){this.listenTo(nfRadio.channel("forms"),"submit:response",this.closePopup),this.listenTo(nfRadio.channel("forms"),"submit:response",this.openPopup),this.listenTo(nfRadio.channel("forms"),"submit:response",this.popupTriggers)},popupTriggers:function(t,o,n,i){var a;a=e("#nf-form-"+i+"-cont").parents(".pum"),a.length&&(a.trigger("pum_nf.success"),t.errors.length?a.trigger("pum_nf.error"):a.trigger("pum_nf.success"))},closePopup:function(t,o,n,i){var a;"undefined"==typeof t.data.actions||t.errors.length||"undefined"!=typeof t.data.actions.closepopup&&(a=e("#nf-form-"+i+"-cont").parents(".pum"),a.length&&setTimeout(function(){a.popmake("close")},parseInt(t.data.actions.closepopup)))},openPopup:function(t){var o;"undefined"==typeof t.data.actions||t.errors.length||"undefined"!=typeof t.data.actions.openpopup&&(o=e("#pum-"+parseInt(t.data.actions.openpopup)),o.length&&o.popmake("open"))}});jQuery(document).ready(function(){new t})}}(jQuery),function(e,t,o){"use strict";e.extend(e.fn.popmake.methods,{addTrigger:function(t){return e.fn.popmake.triggers[t]?e.fn.popmake.triggers[t].apply(this,Array.prototype.slice.call(arguments,1)):(window.console&&console.warn("Trigger type "+t+" does not exist."),this)}}),e.fn.popmake.triggers={auto_open:function(t){var o=PUM.getPopup(this);setTimeout(function(){o.popmake("state","isOpen")||!o.popmake("checkCookies",t)&&o.popmake("checkConditions")&&(e.fn.popmake.last_open_trigger="Auto Open - Delay: "+t.delay,o.popmake("open"))},t.delay)},click_open:function(o){var n,i=PUM.getPopup(this),a=i.popmake("getSettings"),p=[".popmake-"+a.id,".popmake-"+decodeURIComponent(a.slug),'a[href$="#popmake-'+a.id+'"]'];o.extra_selectors&&""!==o.extra_selectors&&p.push(o.extra_selectors),p=pum.hooks.applyFilters("pum.trigger.click_open.selectors",p,o,i),n=p.join(", "),e(n).addClass("pum-trigger").data("popup",a.id).attr("data-popup",a.id).data("settings",o).data("do-default",o.do_default).attr("data-do-default",o.do_default).css({cursor:"pointer"}),e(t).on("click",n
|
1 |
!function(e){"use strict";void 0===e.fn.on&&(e.fn.on=function(e,t,o){return this.delegate(t,e,o)}),void 0===e.fn.off&&(e.fn.off=function(e,t,o){return this.undelegate(t,e,o)}),void 0===e.fn.bindFirst&&(e.fn.bindFirst=function(t,o){var n,i,a=e(this);a.unbind(t,o),a.bind(t,o),n=e._data(a[0]).events,i=n[t],i.unshift(i.pop()),n[t]=i}),void 0===e.fn.outerHtml&&(e.fn.outerHtml=function(){var t=e(this).clone(),o=e("<div/>").append(t);return o.html()}),void 0===Date.now&&(Date.now=function(){return(new Date).getTime()})}(jQuery);var PUM;!function(e,t,o){"use strict";function n(e){return!isNaN(e)&&parseInt(Number(e))==e&&!isNaN(parseInt(e,10))}function i(){var e={},t=function(t,n,i){"boolean"==typeof n&&(i=n,n=!1);var a=n?n.selector+" "+t:t;return(o===e[a]||i)&&(e[a]=n?n.find(t):jQuery(t)),e[a]};return t.elementCache=e,t}function a(e,t){function o(e,t,o){return t?e[t.slice(0,o?-1:t.length)]:e}function n(e,t){return t?t.split("[").reduce(o,e):e}return t.split(".").reduce(n,e)}PUM={get:new i,getPopup:function(t){var o;return o=n(t)?PUM.get("#pum-"+t):"current"===t?PUM.get(".pum-overlay.pum-active:eq(0)",!0):"open"===t?PUM.get(".pum-overlay.pum-active",!0):"closed"===t?PUM.get(".pum-overlay:not(.pum-active)",!0):t instanceof jQuery?t:e(t),o.hasClass("pum-overlay")?o:o.hasClass("popmake")?o.parents(".pum-overlay"):o.parents(".pum-overlay").length?o.parents(".pum-overlay"):e()},open:function(e,t){PUM.getPopup(e).popmake("open",t)},close:function(e,t){PUM.getPopup(e).popmake("close",t)},preventOpen:function(e){PUM.getPopup(e).addClass("preventOpen")},getSettings:function(e){var t=PUM.getPopup(e);return t.popmake("getSettings")},getSetting:function(e,t,n){var i=PUM.getSettings(e),p=a(i,t);return"undefined"!=typeof p?p:n!==o?n:null},checkConditions:function(e){return PUM.getPopup(e).popmake("checkConditions")},getCookie:function(t){return e.pm_cookie(t)},clearCookie:function(t,o){e.pm_remove_cookie(t),"function"==typeof o&&o()},clearCookies:function(t,n){var i,a=PUM.getPopup(t),p=a.popmake("getSettings"),s=p.cookies;if(s!==o&&s.length)for(i=0;s.length>i;i+=1)e.pm_remove_cookie(s[i].settings.name);"function"==typeof n&&n()}},e.fn.popmake=function(o){return e.fn.popmake.methods[o]?(e(t).trigger("pumMethodCall",arguments),e.fn.popmake.methods[o].apply(this,Array.prototype.slice.call(arguments,1))):"object"!=typeof o&&o?void(window.console&&console.warn("Method "+o+" does not exist on $.fn.popmake")):e.fn.popmake.methods.init.apply(this,arguments)},e.fn.popmake.methods={init:function(t){return this.each(function(){var n=PUM.getPopup(this),i=e.extend(!0,{},e.fn.popmake.defaults,n.data("popmake"),t);return i.theme_id<=0&&(i.theme_id=popmake_default_theme),i.meta.display.disable_reposition===o&&e(window).on("resize",function(){(n.hasClass("pum-active")||n.find(".popmake.active").length)&&e.fn.popmake.utilities.throttle(setTimeout(function(){n.popmake("reposition")},25),500,!1)}),n.find(".pum-container").data("popmake",i),n.data("popmake",i).trigger("pumInit"),this})},getOverlay:function(){return e(this)},getContainer:function(){return e(this).find(".pum-container")},getTitle:function(){return e(this).find(".pum-title")||null},getContent:function(){return e(this).find(".pum-content")||null},getClose:function(){return e(this).find(".pum-content + .pum-close")||null},getSettings:function(){return e(this).data("popmake")},state:function(e){var t=PUM.getPopup(this);if(o!==e)switch(e){case"isOpen":return t.hasClass("pum-open")||t.popmake("getContainer").hasClass("active");case"isClosed":return!t.hasClass("pum-open")&&!t.popmake("getContainer").hasClass("active")}},open:function(t){var n=PUM.getPopup(this),i=n.popmake("getContainer"),a=n.popmake("getClose"),p=n.popmake("getSettings"),s=e("html");return n.trigger("pumBeforeOpen"),n.hasClass("preventOpen")||i.hasClass("preventOpen")?(console.log("prevented"),n.removeClass("preventOpen").removeClass("pum-active").trigger("pumOpenPrevented"),this):(p.meta.display.stackable||n.popmake("close_all"),n.addClass("pum-active"),p.meta.close.button_delay>0&&a.fadeOut(0),s.addClass("pum-open"),p.meta.display.overlay_disabled?s.addClass("pum-open-overlay-disabled"):s.addClass("pum-open-overlay"),p.meta.display.position_fixed!==o&&p.meta.display.position_fixed?s.addClass("pum-open-fixed"):s.addClass("pum-open-scrollable"),n.popmake("setup_close").popmake("reposition").css({"z-index":p.meta.display.overlay_zindex||1999999998}).popmake("animate",p.meta.display.animation_type,function(){p.meta.close.button_delay>0&&setTimeout(function(){a.fadeIn()},p.meta.close.button_delay),n.trigger("pumAfterOpen"),e.fn.popmake.last_open_popup=n,t!==o&&t()}),this)},setup_close:function(){var t=PUM.getPopup(this),n=t.popmake("getClose").add(e(".popmake-close",t).not(t.popmake("getClose"))),i=t.popmake("getSettings");return n.off("click.pum").on("click.pum",function(n){var i=e(this),a=i.hasClass("pum-do-default")||i.data("do-default")!==o&&i.data("do-default");a||n.preventDefault(),e.fn.popmake.last_close_trigger="Close Button",t.popmake("close")}),(i.meta.close.esc_press||i.meta.close.f4_press)&&e(window).off("keyup.popmake").on("keyup.popmake",function(o){27===o.keyCode&&i.meta.close.esc_press&&(e.fn.popmake.last_close_trigger="ESC Key",t.popmake("close")),115===o.keyCode&&i.meta.close.f4_press&&(e.fn.popmake.last_close_trigger="F4 Key",t.popmake("close"))}),i.meta.close.overlay_click&&t.off("click.popmake").on("click.popmake",function(o){o.target===t[0]&&(e.fn.popmake.last_close_trigger="Overlay Click",t.popmake("close"))}),t.trigger("pumSetupClose"),this},close:function(t){return this.each(function(){var n=PUM.getPopup(this),i=n.popmake("getContainer"),a=n.popmake("getClose").add(e(".popmake-close",n).not(n.popmake("getClose")));return n.trigger("pumBeforeClose"),n.hasClass("preventClose")||i.hasClass("preventClose")?(n.removeClass("preventClose").trigger("pumClosePrevented"),this):(i.fadeOut("fast",function(){n.is(":visible")&&n.fadeOut("fast"),e(window).off("keyup.popmake"),n.off("click.popmake"),a.off("click.popmake"),1===e(".pum-active").length&&e("html").removeClass("pum-open").removeClass("pum-open-scrollable").removeClass("pum-open-overlay").removeClass("pum-open-overlay-disabled").removeClass("pum-open-fixed"),n.removeClass("pum-active").trigger("pumAfterClose"),i.find("iframe").filter('[src*="youtube"],[src*="vimeo"]').each(function(){var t=e(this),o=t.attr("src"),n=o.replace("autoplay=1","1=1");n!==o&&(o=n),t.prop("src",o)}),i.find("video").each(function(){this.pause()}),t!==o&&t()}),this)})},close_all:function(){return e(".pum-active").popmake("close"),this},reposition:function(t){var o=PUM.getPopup(this).trigger("pumBeforeReposition"),n=o.popmake("getContainer"),i=o.popmake("getSettings"),a=i.meta.display,p=a.location,s={my:"",at:"",of:window,collision:"none",using:"function"==typeof t?t:e.fn.popmake.callbacks.reposition_using},r={overlay:null,container:null},l=null;try{l=e(e.fn.popmake.last_open_trigger)}catch(c){l=e()}return a.position_from_trigger&&l.length?(s.of=l,p.indexOf("left")>=0&&(s.my+=" right",s.at+=" left"+(0!==a.position_left?"-"+a.position_left:"")),p.indexOf("right")>=0&&(s.my+=" left",s.at+=" right"+(0!==a.position_right?"+"+a.position_right:"")),p.indexOf("center")>=0&&(s.my="center"===p?"center":s.my+" center",s.at="center"===p?"center":s.at+" center"),p.indexOf("top")>=0&&(s.my+=" bottom",s.at+=" top"+(0!==a.position_top?"-"+a.position_top:"")),p.indexOf("bottom")>=0&&(s.my+=" top",s.at+=" bottom"+(0!==a.position_bottom?"+"+a.position_bottom:""))):(p.indexOf("left")>=0&&(s.my+=" left"+(0!==a.position_left?"+"+a.position_left:""),s.at+=" left"),p.indexOf("right")>=0&&(s.my+=" right"+(0!==a.position_right?"-"+a.position_right:""),s.at+=" right"),p.indexOf("center")>=0&&(s.my="center"===p?"center":s.my+" center",s.at="center"===p?"center":s.at+" center"),p.indexOf("top")>=0&&(s.my+=" top"+(0!==a.position_top?"+"+(e("body").hasClass("admin-bar")?parseInt(a.position_top,10)+32:a.position_top):""),s.at+=" top"),p.indexOf("bottom")>=0&&(s.my+=" bottom"+(0!==a.position_bottom?"-"+a.position_bottom:""),s.at+=" bottom")),s.my=e.trim(s.my),s.at=e.trim(s.at),o.is(":hidden")&&(r.overlay=o.css("opacity"),o.css({opacity:0}).show()),n.is(":hidden")&&(r.container=n.css("opacity"),n.css({opacity:0}).show()),a.position_fixed&&n.addClass("fixed"),"custom"===i.meta.display.size?n.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&&n.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.trigger("pumAfterReposition"),n.addClass("custom-position").position(s).trigger("popmakeAfterReposition"),r.overlay&&o.css({opacity:r.overlay}).hide(),r.container&&n.css({opacity:r.container}).hide(),this},retheme:function(t){e(this).trigger("popmakeBeforeRetheme");var n,i,a=PUM.getPopup(this),p=a.popmake("getContainer"),s=a.popmake("getTitle"),r=a.popmake("getContent"),l=a.popmake("getClose"),c=a.popmake("getSettings");switch(t===o&&(t=e.fn.popmake.themes[c.theme_id],t===o&&(t=e.fn.popmake.themes[1])),n="yes"===t.container.boxshadow_inset?"inset ":"",i="yes"===t.close.boxshadow_inset?"inset ":"",a.removeAttr("style").css({backgroundColor:e.fn.popmake.utilities.convert_hex(t.overlay.background_color,t.overlay.background_opacity),zIndex:c.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:n+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:c.meta.display.zindex||999}),s.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)}),r.css({color:t.content.font_color,fontFamily:t.content.font_family,fontWeight:t.content.font_weight,fontStyle:t.content.font_style}),e("p, label",r).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},animation_origin:function(t){var o=PUM.getPopup(this),n=o.popmake("getContainer"),i={my:"",at:""};switch(t){case"top":i={my:"left+"+n.offset().left+" bottom-100",at:"left top"};break;case"bottom":i={my:"left+"+n.offset().left+" top+100",at:"left bottom"};break;case"left":i={my:"right top+"+n.offset().top,at:"left top"};break;case"right":i={my:"left top+"+n.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}}}(jQuery,document);var PUM_Accessibility;!function(e,t,o){"use strict";var n,i,a,p="a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]";PUM_Accessibility={forceFocus:function(t){a&&!e.contains(a,t.target)&&(t.stopPropagation(),PUM_Accessibility.setFocusToFirstItem())},trapTabKey:function(t){if(9===t.keyCode){var o=a.find(".pum-container *").filter(p).filter(":visible"),n=e(":focus"),i=o.length,s=o.index(n);t.shiftKey?0===s&&(o.get(i-1).focus(),t.preventDefault()):s===i-1&&(o.get(0).focus(),t.preventDefault())}},setFocusToFirstItem:function(){a.find(".pum-container *").filter(p).filter(":visible").filter(":not(.pum-close)").first().focus()}},e(t).on("pumInit",".pum",function(){PUM.getPopup(this).find("[tabindex]").each(function(){var t=e(this);t.data("tabindex",t.attr("tabindex")).prop("tabindex","0")})}).on("pumBeforeOpen",".pum",function(){var o=PUM.getPopup(this),p=e(":focus");o.has(p).length||(i=p),a=o.on("keydown.pum_accessibility",PUM_Accessibility.trapTabKey).attr("aria-hidden","false"),n=e("body > *").filter(":visible").not(a),n.attr("aria-hidden","true"),e(t).on("focus.pum_accessibility",PUM_Accessibility.forceFocus),PUM_Accessibility.setFocusToFirstItem()}).on("pumAfterOpen",".pum",function(){}).on("pumBeforeClose",".pum",function(){}).on("pumAfterClose",".pum",function(){var p=PUM.getPopup(this);p.off("keydown.pum_accessibility").attr("aria-hidden","true"),n&&(n.attr("aria-hidden","false"),n=null),i!==o&&i.length&&i.focus(),a=null,e(t).off("focus.pum_accessibility")}).on("pumSetupClose",".pum",function(){}).on("pumOpenPrevented",".pum",function(){}).on("pumClosePrevented",".pum",function(){}).on("pumBeforeReposition",".pum",function(){})}(jQuery,document);var PUM_Analytics;!function(e,t,o){"use strict";e.fn.popmake.last_open_trigger=null,e.fn.popmake.last_close_trigger=null,e.fn.popmake.conversion_trigger=null;var n=!("undefined"==typeof pum_vars.restapi||!pum_vars.restapi);PUM_Analytics={beacon:function(t){var o=new Image,i=n?pum_vars.restapi:pum_vars.ajaxurl;t=e.extend(!0,{route:"/analytics/open",type:"open",data:{pid:null,_cache:+new Date},callback:function(){}},t),n?i+=t.route:(t.data.action="pum_analytics",t.data.type=t.type),i&&(e(o).on("error success load done",t.callback),o.src=i+"?"+e.param(t.data))}},pum_vars.disable_open_tracking!==o&&pum_vars.disable_open_tracking||e(t).on("pumAfterOpen.core_analytics","body > .pum",function(){var t=PUM.getPopup(this),o={pid:parseInt(t.popmake("getSettings").id,10)||null};o.pid>0&&!e("body").hasClass("single-popup")&&PUM_Analytics.beacon({data:o})})}(jQuery,document),function(e,t,o){"use strict";e.fn.popmake.methods.animate_overlay=function(t,o,n){var i=PUM.getPopup(this).popmake("getSettings");return i.meta.display.overlay_disabled?e.fn.popmake.overlay_animations.none.apply(this,[o,n]):e.fn.popmake.overlay_animations[t]?e.fn.popmake.overlay_animations[t].apply(this,[o,n]):(window.console&&console.warn("Animation style "+t+" does not exist."),this)},e.fn.popmake.methods.animate=function(t){return e.fn.popmake.animations[t]?e.fn.popmake.animations[t].apply(this,Array.prototype.slice.call(arguments,1)):(window.console&&console.warn("Animation style "+t+" does not exist."),this)},e.fn.popmake.animations={none:function(e){var t=PUM.getPopup(this);return t.popmake("getContainer").show(0),t.popmake("animate_overlay","none",0,function(){e!==o&&e()}),this},slide:function(e){var t=PUM.getPopup(this).show(0).css({opacity:0}),n=t.popmake("getContainer").show(0).css({opacity:0}),i=t.popmake("getSettings"),a=i.meta.display.animation_speed/2,p=t.popmake("animation_origin",i.meta.display.animation_origin);return n.position(p).css({opacity:1}),t.css({opacity:1}).popmake("animate_overlay","fade",a,function(){n.popmake("reposition",function(t){n.animate(t,a,"swing",function(){e!==o&&e()})})}),this},fade:function(e){var t=PUM.getPopup(this),n=t.popmake("getContainer"),i=t.popmake("getSettings"),a=i.meta.display.animation_speed/2;return n.show(0).css({opacity:0}),t.popmake("animate_overlay","fade",a,function(){n.animate({opacity:1},a,"swing",function(){e!==o&&e()})}),this},fadeAndSlide:function(e){var t=PUM.getPopup(this).show(0).css({opacity:0}),n=t.popmake("getContainer").show(0).css({opacity:0}),i=t.popmake("getSettings"),a=i.meta.display.animation_speed/2,p=t.popmake("animation_origin",i.meta.display.animation_origin);return n.position(p),t.hide().css({opacity:1}).popmake("animate_overlay","fade",a,function(){n.popmake("reposition",function(t){t.opacity=1,n.animate(t,a,"swing",function(){e!==o&&e()})})}),this},grow:function(t){return e.fn.popmake.animations.fade.apply(this,arguments)},growAndSlide:function(t){return e.fn.popmake.animations.fadeAndSlide.apply(this,arguments)}},e.fn.popmake.overlay_animations={none:function(e,t){PUM.getPopup(this).show(e,t)},fade:function(e,t){PUM.getPopup(this).fadeIn(e,t)},slide:function(e,t){PUM.getPopup(this).slideDown(e,t)}}}(jQuery,document),function(e,t,o){"use strict";e(t).on("pumInit",".pum",function(){e(this).popmake("getContainer").trigger("popmakeInit")}).on("pumBeforeOpen",".pum",function(){e(this).popmake("getContainer").addClass("active").trigger("popmakeBeforeOpen")}).on("pumAfterOpen",".pum",function(){e(this).popmake("getContainer").trigger("popmakeAfterOpen")}).on("pumBeforeClose",".pum",function(){e(this).popmake("getContainer").trigger("popmakeBeforeClose")}).on("pumAfterClose",".pum",function(){e(this).popmake("getContainer").removeClass("active").trigger("popmakeAfterClose")}).on("pumSetupClose",".pum",function(){e(this).popmake("getContainer").trigger("popmakeSetupClose")}).on("pumOpenPrevented",".pum",function(){e(this).popmake("getContainer").removeClass("preventOpen").removeClass("active")}).on("pumClosePrevented",".pum",function(){e(this).popmake("getContainer").removeClass("preventClose")}).on("pumBeforeReposition",".pum",function(){e(this).popmake("getContainer").trigger("popmakeBeforeReposition")})}(jQuery,document),function(e,t,o){"use strict";e.fn.popmake.callbacks={reposition_using:function(t){e(this).css(t)}}}(jQuery,document),function(e,t,o){"use strict";var n;e.extend(e.fn.popmake.methods,{checkConditions:function(){var t,i,a,p,s,r=PUM.getPopup(this),l=r.popmake("getSettings"),c=!0;if(l.mobile_disabled!==o&&l.mobile_disabled&&("object"!=typeof n&&(n=new MobileDetect(window.navigator.userAgent)),n.phone()))return!1;if(l.tablet_disabled!==o&&l.tablet_disabled&&("object"!=typeof n&&(n=new MobileDetect(window.navigator.userAgent)),n.tablet()))return!1;if(l.conditions!==o&&l.conditions.length)for(i=0;l.conditions.length>i;i++){for(p=l.conditions[i],t=!1,a=0;p.length>a&&(s=e.extend({},{not_operand:!1},p[a]),!s.not_operand&&r.popmake("checkCondition",s)?t=!0:s.not_operand&&!r.popmake("checkCondition",s)&&(t=!0),e(this).trigger("pumCheckingCondition",[t,s]),!t);a++);t||(c=!1)}return c},checkCondition:function(t){var o=t.target||null;return o?e.fn.popmake.conditions[o]?e.fn.popmake.conditions[o].apply(this,[t]):window.console?(console.warn("Condition "+o+" does not exist."),!0):void 0:(console.warn("Condition type not set."),!1)}}),e.fn.popmake.conditions={device_is_mobile:function(e){return n.mobile()}}}(jQuery,document);var pm_cookie,pm_cookie_json,pm_remove_cookie;!function(e){"use strict";function t(t){function o(n,i,a){var p,s=new Date;if("undefined"!=typeof document){if(arguments.length>1){switch(a=e.extend({path:"/"},o.defaults,a),typeof a.expires){case"number":s.setMilliseconds(s.getMilliseconds()+864e5*a.expires),a.expires=s;break;case"string":s.setTime(1e3*e.fn.popmake.utilities.strtotime("+"+a.expires)),a.expires=s}try{p=JSON.stringify(i),/^[\{\[]/.test(p)&&(i=p)}catch(r){}return i=t.write?t.write(i,n):encodeURIComponent(String(i)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),n=encodeURIComponent(String(n)),n=n.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),n=n.replace(/[\(\)]/g,escape),document.cookie=[n,"=",i,a.expires?"; expires="+a.expires.toUTCString():"",a.path?"; path="+a.path:"",a.domain?"; domain="+a.domain:"",a.secure?"; secure":""].join("")}n||(p={});for(var l=document.cookie?document.cookie.split("; "):[],c=/(%[0-9A-Z]{2})+/g,u=0;u<l.length;u++){var d=l[u].split("="),m=d.slice(1).join("=");'"'===m.charAt(0)&&(m=m.slice(1,-1));try{var f=d[0].replace(c,decodeURIComponent);if(m=t.read?t.read(m,f):t(m,f)||m.replace(c,decodeURIComponent),this.json)try{m=JSON.parse(m)}catch(r){}if(n===f){p=m;break}n||(p[f]=m)}catch(r){}}return p}}return void 0===t&&(t=function(){}),o.set=o,o.get=function(e){return o.call(o,e)},o.getJSON=function(){return o.apply({json:!0},[].slice.call(arguments))},o.defaults={},o.remove=function(t,n){o(t,"",e.extend({},n,{expires:-1,path:""})),o(t,"",e.extend({},n,{expires:-1}))},o.process=function(e,t,n,i){return arguments.length>3&&"object"!=typeof arguments[2]&&void 0!==t?o.apply(o,[e,t,{expires:n,path:i}]):o.apply(o,[].slice.call(arguments,[0,2]))},o.withConverter=e.fn.popmake.cookie,o}e.extend(e.fn.popmake,{cookie:t()}),pm_cookie=e.pm_cookie=e.fn.popmake.cookie.process,pm_cookie_json=e.pm_cookie_json=e.fn.popmake.cookie.getJSON,pm_remove_cookie=e.pm_remove_cookie=e.fn.popmake.cookie.remove}(jQuery),function(e,t,o){"use strict";e.extend(e.fn.popmake.methods,{addCookie:function(t){return pum.hooks.doAction("popmake.addCookie",arguments),e.fn.popmake.cookies[t]?e.fn.popmake.cookies[t].apply(this,Array.prototype.slice.call(arguments,1)):(window.console&&console.warn("Cookie type "+t+" does not exist."),this)},setCookie:function(t){e.pm_cookie(t.name,!0,t.session?null:t.time,t.path?"/":null),pum.hooks.doAction("popmake.setCookie",t)},checkCookies:function(t){var n,i=!1;if(t.cookie===o||t.cookie.name===o||null===t.cookie.name)return!1;switch(typeof t.cookie.name){case"object":case"array":for(n=0;t.cookie.name.length>n;n+=1)e.pm_cookie(t.cookie.name[n])!==o&&(i=!0);break;case"string":e.pm_cookie(t.cookie.name)!==o&&(i=!0)}return pum.hooks.doAction("popmake.checkCookies",t,i),i}}),e.fn.popmake.cookies={on_popup_open:function(e){var t=PUM.getPopup(this);t.on("pumAfterOpen",function(){t.popmake("setCookie",e)})},on_popup_close:function(e){var t=PUM.getPopup(this);t.on("pumBeforeClose",function(){t.popmake("setCookie",e)})},manual:function(e){var t=PUM.getPopup(this);t.on("pumSetCookie",function(){t.popmake("setCookie",e)})},ninja_form_success:function(e){var t=PUM.getPopup(this);t.on("pum_nf.success",function(){t.popmake("setCookie",e)})}},e(t).on("pumInit",".pum",function(){var e,t=PUM.getPopup(this),n=t.popmake("getSettings"),i=n.cookies,a=null;if(i!==o&&i.length)for(e=0;i.length>e;e+=1)a=i[e],t.popmake("addCookie",a.event,a.settings)})}(jQuery,document);var pum_debug_mode=!1,pum_debug;!function(e,t){if(t=window.pum_vars||{debug_mode:!1},pum_debug_mode=void 0!==t.debug_mode&&t.debug_mode,pum_debug_mode||window.location.href.indexOf("pum_debug")===-1||(pum_debug_mode=!0),pum_debug_mode){var o=!1,n=!1,i=window.pum_debug_vars||{};pum_debug={odump:function(t){return e.extend({},t)},logo:function(){console.log(" -------------------------------------------------------------\n| ____ __ __ _ |\n| | _ \\ ___ _ __ _ _ _ __ | \\/ | __ _| | _____ _ __ |\n| | |_) / _ \\| '_ \\| | | | '_ \\ | |\\/| |/ _` | |/ / _ \\ '__| |\n| | __/ (_) | |_) | |_| | |_) | | | | | (_| | < __/ | |\n| |_| \\___/| .__/ \\__,_| .__/ |_| |_|\\__,_|_|\\_\\___|_| |\n| |_| |_| |\n -------------------------------------------------------------")},initialize:function(){o=!0,pum_debug.logo(),console.debug(i.debug_mode_enabled),console.log(i.debug_started_at,new Date),console.info(i.debug_more_info),pum_debug.divider(i.global_info),console.groupCollapsed(i.localized_vars),console.log("pum_vars:",pum_debug.odump(t)),e(document).trigger("pum_debug_initialize_localized_vars"),console.groupEnd(),e(document).trigger("pum_debug_initialize")},popup_event_header:function(e){var t=e.popmake("getSettings");n!==t.id&&(n=t.id,pum_debug.divider(i.single_popup_label+t.id+" - "+t.slug))},divider:function(e){var t=62,o=62,n=0,i=" "+new Array(t+1).join("-")+" ";"string"==typeof e?(o=t-e.length,n={left:Math.floor(o/2),right:Math.floor(o/2)},n.left+n.right===o-1&&n.right++,n.left=new Array(n.left+1).join(" "),n.right=new Array(n.right+1).join(" "),console.log(""+i+"\n|"+n.left+e+n.right+"|\n"+i)):console.log(i)},click_trigger:function(e,t){var o,n=e.popmake("getSettings"),a=[".popmake-"+n.id,".popmake-"+decodeURIComponent(n.slug),'a[href$="#popmake-'+n.id+'"]'];t.extra_selectors&&""!==t.extra_selectors&&a.push(t.extra_selectors),a=pum.hooks.applyFilters("pum.trigger.click_open.selectors",a,t,e),o=a.join(", "),console.log(i.label_selector,o)},trigger:function(t,o){switch(console.groupCollapsed(i.triggers[o.type].name),o.type){case"auto_open":console.log(i.label_delay,o.settings.delay),console.log(i.label_cookie,o.settings.cookie.name);break;case"click_open":pum_debug.click_trigger(t,o.settings),console.log(i.label_cookie,o.settings.cookie.name)}e(document).trigger("pum_debug_render_trigger",t,o),console.groupEnd()},cookie:function(t,o){switch(console.groupCollapsed(i.cookies[o.event].name),o.event){case"on_popup_open":case"on_popup_close":case"manual":case"ninja_form_success":console.log(i.label_settings,pum_debug.odump(o.settings))}e(document).trigger("pum_debug_render_trigger",t,o),console.groupEnd()}},e(document).on("pumInit",".pum",function(){var t=PUM.getPopup(e(this)),n=t.popmake("getSettings"),a=0;if(o||(pum_debug.initialize(),pum_debug.divider(i.popups_initializing)),console.groupCollapsed(i.single_popup_label+n.id+" - "+n.slug),console.log(i.theme_id,n.theme_id),void 0!==n.triggers&&n.triggers.length){for(console.groupCollapsed(i.label_triggers),a=0;n.triggers.length>a;a++)pum_debug.trigger(t,n.triggers[a]);console.groupEnd()}if(void 0!==n.cookies&&n.cookies.length){for(console.groupCollapsed(i.label_cookies),a=0;n.cookies.length>a;a+=1)pum_debug.cookie(t,n.cookies[a]);console.groupEnd()}void 0!==n.conditions&&n.conditions.length&&(console.groupCollapsed(i.label_conditions),console.log(n.conditions),console.groupEnd()),console.groupCollapsed(i.label_popup_settings),console.log(i.label_mobile_disabled,null!==n.mobile_disabled),console.log(i.label_tablet_disabled,null!==n.tablet_disabled),console.log(i.label_display_settings,pum_debug.odump(n.meta.display)),console.log(i.label_close_settings,pum_debug.odump(n.meta.close)),t.trigger("pum_debug_popup_settings");var p=pum.hooks.applyFilters("pum_debug.popup_settings.cleaned_meta",pum_debug.odump(n.meta),t);delete p.display,delete p.close,delete p.click_open,p.length&&console.log("Meta: ",p),console.groupEnd(),console.groupEnd()}).on("pumBeforeOpen",".pum",function(){var t=PUM.getPopup(e(this)),o=(t.popmake("getSettings"),e.fn.popmake.last_open_trigger);pum_debug.popup_event_header(t),console.groupCollapsed(i.label_event_before_open);try{o=e(e.fn.popmake.last_open_trigger)}catch(n){o=e()}finally{o=o.length?o:e.fn.popmake.last_open_trigger.toString(),console.log(i.label_triggers,[o])}console.groupEnd()}).on("pumOpenPrevented",".pum",function(){var t=PUM.getPopup(e(this));pum_debug.popup_event_header(t),console.groupCollapsed(i.label_event_open_prevented),console.groupEnd()}).on("pumAfterOpen",".pum",function(){var t=PUM.getPopup(e(this));t.popmake("getSettings");pum_debug.popup_event_header(t),console.groupCollapsed(i.label_event_after_open),console.groupEnd()}).on("pumSetupClose",".pum",function(){var t=PUM.getPopup(e(this));t.popmake("getSettings");pum_debug.popup_event_header(t),console.groupCollapsed(i.label_event_setup_close),console.groupEnd()}).on("pumClosePrevented",".pum",function(){var t=PUM.getPopup(e(this));t.popmake("getSettings");pum_debug.popup_event_header(t),console.groupCollapsed(i.label_event_close_prevented),console.groupEnd()}).on("pumBeforeClose",".pum",function(){var t=PUM.getPopup(e(this));t.popmake("getSettings");pum_debug.popup_event_header(t),console.groupCollapsed(i.label_event_before_close),console.groupEnd()}).on("pumAfterClose",".pum",function(){var t=PUM.getPopup(e(this));t.popmake("getSettings");pum_debug.popup_event_header(t),console.groupCollapsed(i.label_event_after_close),console.groupEnd()}).on("pumBeforeReposition",".pum",function(){var t=PUM.getPopup(e(this));t.popmake("getSettings");pum_debug.popup_event_header(t),console.groupCollapsed(i.label_event_before_reposition),console.groupEnd()}).on("pumAfterReposition",".pum",function(){var t=PUM.getPopup(e(this));t.popmake("getSettings");pum_debug.popup_event_header(t),console.groupCollapsed(i.label_event_after_reposition),console.groupEnd()}).on("pumCheckingCondition",".pum",function(t,o,n){var a=PUM.getPopup(e(this));a.popmake("getSettings");pum_debug.popup_event_header(a),console.groupCollapsed(i.label_event_checking_condition),console.log((n.not_operand?"(!) ":"")+n.target+": "+o,n),console.groupEnd()})}}(jQuery),function(e,t,o){"use strict";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"}}}}(jQuery,document),function(e,t){"use strict";var o=function(){function e(e,t,o,n){return"string"==typeof e&&"function"==typeof t&&(o=parseInt(o||10,10),s("actions",e,t,o,n)),u}function t(){var e=c.call(arguments),t=e.shift();return"string"==typeof t&&l("actions",t,e),u}function o(e,t){return"string"==typeof e&&p("actions",e,t),u}function n(e,t,o,n){return"string"==typeof e&&"function"==typeof t&&(o=parseInt(o||10,10),s("filters",e,t,o,n)),u}function i(){var e=c.call(arguments),t=e.shift();return"string"==typeof t?l("filters",t,e):u}function a(e,t){return"string"==typeof e&&p("filters",e,t),u}function p(e,t,o,n){var i,a,p;if(d[e][t])if(o)if(i=d[e][t],n)for(p=i.length;p--;)a=i[p],a.callback===o&&a.context===n&&i.splice(p,1);else for(p=i.length;p--;)i[p].callback===o&&i.splice(p,1);else d[e][t]=[]}function s(e,t,o,n,i){var a={callback:o,priority:n,context:i},p=d[e][t];p?(p.push(a),p=r(p)):p=[a],d[e][t]=p}function r(e){for(var t,o,n,i=1,a=e.length;i<a;i++){for(t=e[i],o=i;(n=e[o-1])&&n.priority>t.priority;)e[o]=e[o-1],
|
2 |
+
--o;e[o]=t}return e}function l(e,t,o){var n,i,a=d[e][t];if(!a)return"filters"===e&&o[0];if(i=a.length,"filters"===e)for(n=0;n<i;n++)o[0]=a[n].callback.apply(a[n].context,o);else for(n=0;n<i;n++)a[n].callback.apply(a[n].context,o);return"filters"!==e||o[0]}var c=Array.prototype.slice,u={removeFilter:a,applyFilters:i,addFilter:n,removeAction:o,doAction:t,addAction:e},d={actions:{},filters:{}};return u};e.pum=e.pum||{},e.pum.hooks=e.pum.hooks||new o}(window),function(e){"use strict";if("undefined"!=typeof Marionette&&"undefined"!=typeof nfRadio){var t=Marionette.Object.extend({initialize:function(){this.listenTo(nfRadio.channel("forms"),"submit:response",this.closePopup),this.listenTo(nfRadio.channel("forms"),"submit:response",this.openPopup),this.listenTo(nfRadio.channel("forms"),"submit:response",this.popupTriggers)},popupTriggers:function(t,o,n,i){var a;a=e("#nf-form-"+i+"-cont").parents(".pum"),a.length&&(a.trigger("pum_nf.success"),t.errors.length?a.trigger("pum_nf.error"):a.trigger("pum_nf.success"))},closePopup:function(t,o,n,i){var a;"undefined"==typeof t.data.actions||t.errors.length||"undefined"!=typeof t.data.actions.closepopup&&(a=e("#nf-form-"+i+"-cont").parents(".pum"),a.length&&setTimeout(function(){a.popmake("close")},parseInt(t.data.actions.closepopup)))},openPopup:function(t){var o;"undefined"==typeof t.data.actions||t.errors.length||"undefined"!=typeof t.data.actions.openpopup&&(o=e("#pum-"+parseInt(t.data.actions.openpopup)),o.length&&o.popmake("open"))}});jQuery(document).ready(function(){new t})}}(jQuery),function(e,t,o){"use strict";e.extend(e.fn.popmake.methods,{addTrigger:function(t){return e.fn.popmake.triggers[t]?e.fn.popmake.triggers[t].apply(this,Array.prototype.slice.call(arguments,1)):(window.console&&console.warn("Trigger type "+t+" does not exist."),this)}}),e.fn.popmake.triggers={auto_open:function(t){var o=PUM.getPopup(this);setTimeout(function(){o.popmake("state","isOpen")||!o.popmake("checkCookies",t)&&o.popmake("checkConditions")&&(e.fn.popmake.last_open_trigger="Auto Open - Delay: "+t.delay,o.popmake("open"))},t.delay)},click_open:function(o){var n,i=PUM.getPopup(this),a=i.popmake("getSettings"),p=[".popmake-"+a.id,".popmake-"+decodeURIComponent(a.slug),'a[href$="#popmake-'+a.id+'"]'];o.extra_selectors&&""!==o.extra_selectors&&p.push(o.extra_selectors),p=pum.hooks.applyFilters("pum.trigger.click_open.selectors",p,o,i),n=p.join(", "),e(n).addClass("pum-trigger").data("popup",a.id).attr("data-popup",a.id).data("settings",o).data("do-default",o.do_default).attr("data-do-default",o.do_default).css({cursor:"pointer"}),e(t).on("click",n,function(t){var n=e(this);n.hasClass("pum-trigger")&&n.data("popup")||(n.addClass("pum-trigger").data("popup",a.id).attr("data-popup",a.id).data("settings",o).data("do-default",o.do_default).attr("data-do-default",o.do_default).css({cursor:"pointer"}),t.preventDefault(),t.stopPropagation(),n.trigger("click"))})},admin_debug:function(){PUM.getPopup(this).popmake("open")}},e(t).on("pumInit",".pum",function(){var e,t=PUM.getPopup(this),n=t.popmake("getSettings"),i=n.triggers,a=null;if(i!==o&&i.length)for(e=0;i.length>e;e+=1)a=i[e],t.popmake("addTrigger",a.type,a.settings)}).on("click.pumTrigger",".pum-trigger[data-popup]",function(t){var o=e(this),n=PUM.getPopup(o.data("popup")),i=o.data("settings"),a=i.do_default||!1;n.has(o).length>0||n.popmake("state","isOpen")||!n.popmake("checkCookies",i)&&n.popmake("checkConditions")&&(o.data("do-default")?a=o.data("do-default"):o.hasClass("do-default")&&(a=!0),pum.hooks.applyFilters("pum.trigger.click_open.do_default",a,n,o)||(t.preventDefault(),t.stopPropagation()),e.fn.popmake.last_open_trigger=o,n.popmake("open"))})}(jQuery,document),function(e,t,o){"use strict";function n(t,o){return e.inArray(o,t)!==-1}function i(e,t,o){var n=t[0];t.length>1?(e[n]||(e[n]=t[1]?{}:[]),i(e[n],t.slice(1),o)):(n||(n=e.length),e[n]=o)}var a="color,date,datetime,datetime-local,email,hidden,month,number,password,range,search,tel,text,time,url,week".split(","),p="select,textarea".split(","),s=/\[([^\]]*)\]/g;e.fn.popmake.utilities={convert_hex:function(e,t){e=e.replace("#","");var o=parseInt(e.substring(0,2),16),n=parseInt(e.substring(2,4),16),i=parseInt(e.substring(4,6),16);return"rgba("+o+","+n+","+i+","+t/100+")"},debounce:function(e,t){var o;return function(){var n=this,i=arguments;window.clearTimeout(o),o=window.setTimeout(function(){e.apply(n,i)},t)}},throttle:function(e,t){var o=!1,n=function(){o=!1};return function(){o||(e.apply(this,arguments),window.setTimeout(n,t),o=!0)}},getXPath:function(t){var o,n,i,a,p,s=[];return e.each(e(t).parents(),function(t,r){return o=e(r),n=o.attr("id")||"",i=o.attr("class")||"",a=o.get(0).tagName.toLowerCase(),p=o.parent().children(a).index(o),"body"!==a&&(i.length>0&&(i=i.split(" "),i=i[0]),void s.push(a+(n.length>0?"#"+n:i.length>0?"."+i.split(" ").join("."):":eq("+p+")")))}),s.reverse().join(" > ")},strtotime:function(e,t){function n(e,t,n){var i,a=c[t];a!==o&&(i=a-l.getDay(),0===i?i=7*n:i>0&&"last"===e?i-=7:i<0&&"next"===e&&(i+=7),l.setDate(l.getDate()+i))}function i(e){var t=e.split(" "),o=t[0],i=t[1].substring(0,3),a=/\d+/.test(o),p="ago"===t[2],s=("last"===o?-1:1)*(p?-1:1);if(a&&(s*=parseInt(o,10)),u.hasOwnProperty(i)&&!t[1].match(/^mon(day|\.)?$/i))return l["set"+u[i]](l["get"+u[i]]()+s);if("wee"===i)return l.setDate(l.getDate()+7*s);if("next"===o||"last"===o)n(o,i,s);else if(!a)return!1;return!0}var a,p,s,r,l,c,u,d,m,f,g,_=!1;if(!e)return _;if(e=e.replace(/^\s+|\s+$/g,"").replace(/\s{2,}/g," ").replace(/[\t\r\n]/g,"").toLowerCase(),p=e.match(/^(\d{1,4})([\-\.\/\:])(\d{1,2})([\-\.\/\:])(\d{1,4})(?:\s(\d{1,2}):(\d{2})?:?(\d{2})?)?(?:\s([A-Z]+)?)?$/),p&&p[2]===p[4])if(p[1]>1901)switch(p[2]){case"-":return p[3]>12||p[5]>31?_:new Date(p[1],parseInt(p[3],10)-1,p[5],p[6]||0,p[7]||0,p[8]||0,p[9]||0)/1e3;case".":return _;case"/":return p[3]>12||p[5]>31?_:new Date(p[1],parseInt(p[3],10)-1,p[5],p[6]||0,p[7]||0,p[8]||0,p[9]||0)/1e3}else if(p[5]>1901)switch(p[2]){case"-":return p[3]>12||p[1]>31?_:new Date(p[5],parseInt(p[3],10)-1,p[1],p[6]||0,p[7]||0,p[8]||0,p[9]||0)/1e3;case".":return p[3]>12||p[1]>31?_:new Date(p[5],parseInt(p[3],10)-1,p[1],p[6]||0,p[7]||0,p[8]||0,p[9]||0)/1e3;case"/":return p[1]>12||p[3]>31?_:new Date(p[5],parseInt(p[1],10)-1,p[3],p[6]||0,p[7]||0,p[8]||0,p[9]||0)/1e3}else switch(p[2]){case"-":return p[3]>12||p[5]>31||p[1]<70&&p[1]>38?_:(r=p[1]>=0&&p[1]<=38?+p[1]+2e3:p[1],new Date(r,parseInt(p[3],10)-1,p[5],p[6]||0,p[7]||0,p[8]||0,p[9]||0)/1e3);case".":return p[5]>=70?p[3]>12||p[1]>31?_:new Date(p[5],parseInt(p[3],10)-1,p[1],p[6]||0,p[7]||0,p[8]||0,p[9]||0)/1e3:p[5]<60&&!p[6]?p[1]>23||p[3]>59?_:(s=new Date,new Date(s.getFullYear(),s.getMonth(),s.getDate(),p[1]||0,p[3]||0,p[5]||0,p[9]||0)/1e3):_;case"/":return p[1]>12||p[3]>31||p[5]<70&&p[5]>38?_:(r=p[5]>=0&&p[5]<=38?+p[5]+2e3:p[5],new Date(r,parseInt(p[1],10)-1,p[3],p[6]||0,p[7]||0,p[8]||0,p[9]||0)/1e3);case":":return p[1]>23||p[3]>59||p[5]>59?_:(s=new Date,new Date(s.getFullYear(),s.getMonth(),s.getDate(),p[1]||0,p[3]||0,p[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(l=t?new Date(1e3*t):new Date,c={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6},u={yea:"FullYear",mon:"Month",day:"Date",hou:"Hours",min:"Minutes",sec:"Seconds"},m="(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"+m+"|(last|next)\\s"+m+")(\\sago)?",p=e.match(new RegExp(f,"gi")),!p)return _;for(g=0,d=p.length;g<d;g+=1)if(!i(p[g]))return _;return l.getTime()/1e3},serializeObject:function(t){e.extend({},t);var o={},r=e.extend(!0,{include:[],exclude:[],includeByClass:""},t);return this.find(":input").each(function(){var t;!this.name||this.disabled||n(r.exclude,this.name)||r.include.length&&!n(r.include,this.name)||this.className.indexOf(r.includeByClass)===-1||(t=this.name.replace(s,"[$1").split("["),t[0]&&(this.checked||n(a,this.type)||n(p,this.nodeName.toLowerCase()))&&("checkbox"===this.type&&t.push(""),i(o,t,e(this).val())))}),o}},e.fn.pumSerializeObject=e.fn.popmake.utilities.serializeObject,e.fn.popmake.utilies=e.fn.popmake.utilities}(jQuery,document),function(e,t,o){"use strict";e.fn.popmake.version=1.4,e.fn.popmake.last_open_popup=null,e(t).ready(function(){e(".popmake").popmake()})}(jQuery);
|
includes/class-pum.php
CHANGED
@@ -7,7 +7,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
7 |
|
8 |
class PUM {
|
9 |
|
10 |
-
const VER = '1.5.
|
11 |
|
12 |
const DB_VER = 6;
|
13 |
|
7 |
|
8 |
class PUM {
|
9 |
|
10 |
+
const VER = '1.5.5';
|
11 |
|
12 |
const DB_VER = 6;
|
13 |
|
includes/modules/menus.php
CHANGED
@@ -19,7 +19,7 @@ class PUM_Modules_Menu {
|
|
19 |
// Merge Menu Item Options
|
20 |
add_filter( 'wp_setup_nav_menu_item', array( __CLASS__, 'merge_item_data' ) );
|
21 |
// Admin Menu Editor
|
22 |
-
add_filter( 'wp_edit_nav_menu_walker', array( __CLASS__, 'nav_menu_walker' ) );
|
23 |
// Admin Menu Editor Fields.
|
24 |
add_action( 'wp_nav_menu_item_custom_fields', array( __CLASS__, 'fields' ), 10, 4 );
|
25 |
add_action( 'wp_update_nav_menu_item', array( __CLASS__, 'save' ), 10, 2 );
|
@@ -28,20 +28,30 @@ class PUM_Modules_Menu {
|
|
28 |
/**
|
29 |
* Override the Admin Menu Walker
|
30 |
*
|
|
|
|
|
31 |
* @return string
|
32 |
*/
|
33 |
-
public static function nav_menu_walker() {
|
34 |
global $wp_version;
|
35 |
|
36 |
-
if (
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
if ( version_compare( $wp_version, '3.6', '>=' ) ) {
|
38 |
-
require_once POPMAKE_DIR . '/includes/modules/menus/class-
|
39 |
} else {
|
40 |
-
require_once POPMAKE_DIR . '/includes/modules/menus/class-
|
41 |
}
|
42 |
}
|
43 |
|
44 |
-
return '
|
45 |
}
|
46 |
|
47 |
/**
|
19 |
// Merge Menu Item Options
|
20 |
add_filter( 'wp_setup_nav_menu_item', array( __CLASS__, 'merge_item_data' ) );
|
21 |
// Admin Menu Editor
|
22 |
+
add_filter( 'wp_edit_nav_menu_walker', array( __CLASS__, 'nav_menu_walker' ), 999999999 );
|
23 |
// Admin Menu Editor Fields.
|
24 |
add_action( 'wp_nav_menu_item_custom_fields', array( __CLASS__, 'fields' ), 10, 4 );
|
25 |
add_action( 'wp_update_nav_menu_item', array( __CLASS__, 'save' ), 10, 2 );
|
28 |
/**
|
29 |
* Override the Admin Menu Walker
|
30 |
*
|
31 |
+
* @param $walker
|
32 |
+
*
|
33 |
* @return string
|
34 |
*/
|
35 |
+
public static function nav_menu_walker( $walker ) {
|
36 |
global $wp_version;
|
37 |
|
38 |
+
if ( doing_filter( 'plugins_loaded' ) ) {
|
39 |
+
return $walker;
|
40 |
+
}
|
41 |
+
|
42 |
+
if ( $walker == 'Walker_Nav_Menu_Edit_Custom_Fields' ) {
|
43 |
+
return $walker;
|
44 |
+
}
|
45 |
+
|
46 |
+
if ( ! class_exists( 'Walker_Nav_Menu_Edit_Custom_Fields' ) ) {
|
47 |
if ( version_compare( $wp_version, '3.6', '>=' ) ) {
|
48 |
+
require_once POPMAKE_DIR . '/includes/modules/menus/class-nav-menu-edit-custom-fields.php';
|
49 |
} else {
|
50 |
+
require_once POPMAKE_DIR . '/includes/modules/menus/class-nav-menu-edit-custom-fields-deprecated.php';
|
51 |
}
|
52 |
}
|
53 |
|
54 |
+
return 'Walker_Nav_Menu_Edit_Custom_Fields';
|
55 |
}
|
56 |
|
57 |
/**
|
includes/modules/menus/{class-pum-walker-nav-menu-edit-deprecated.php → class-nav-menu-edit-custom-fields-deprecated.php}
RENAMED
@@ -1,9 +1,5 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
/*******************************************************************************
|
4 |
-
* Copyright (c) 2017, WP Popup Maker
|
5 |
-
******************************************************************************/
|
6 |
-
|
7 |
if ( ! class_exists( 'Walker_Nav_Menu_Edit' ) ) {
|
8 |
/** Walker_Nav_Menu_Edit class */
|
9 |
require_once ABSPATH . 'wp-admin/includes/nav-menu.php';
|
@@ -19,16 +15,15 @@ if ( ! class_exists( 'Walker_Nav_Menu_Edit' ) ) {
|
|
19 |
* @kucrut - preg_replace() method so that we no longer have to translate core strings
|
20 |
* @danieliser - refactor for less complexity between WP versions & updating versioned classes for proper backward compatibility with the new methods.
|
21 |
*
|
22 |
-
* @since 1.5.2
|
23 |
* @since WordPress 3.0.0
|
24 |
* @uses Walker_Nav_Menu_Edit
|
25 |
*/
|
26 |
-
class
|
27 |
|
28 |
/**
|
29 |
* Start the element output.
|
30 |
*
|
31 |
-
* @see
|
32 |
*
|
33 |
* @param string $output Passed by reference. Used to append additional content.
|
34 |
* @param object $item Menu item data object.
|
@@ -38,20 +33,17 @@ class PUM_Walker_Nav_Menu_Edit extends Walker_Nav_Menu_Edit {
|
|
38 |
public function start_el( &$output, $item, $depth = 0, $args = array() ) {
|
39 |
parent::start_el( $output, $item, $depth, $args );
|
40 |
|
41 |
-
$output = preg_replace( '
|
42 |
}
|
43 |
|
44 |
/**
|
45 |
* Get custom fields
|
46 |
*
|
47 |
-
* @access protected
|
48 |
-
* @since 1.0.0
|
49 |
* @uses do_action() Calls 'menu_item_custom_fields' hook
|
50 |
*
|
51 |
* @param object $item Menu item data object.
|
52 |
* @param int $depth Depth of menu item. Used for padding.
|
53 |
* @param array $args Menu item args.
|
54 |
-
* @param int $id Nav menu ID.
|
55 |
*
|
56 |
* @return string Additional fields or html for the nav menu editor.
|
57 |
*/
|
@@ -61,8 +53,6 @@ class PUM_Walker_Nav_Menu_Edit extends Walker_Nav_Menu_Edit {
|
|
61 |
/**
|
62 |
* Get menu item custom fields from plugins/themes
|
63 |
*
|
64 |
-
* @since 0.1.0
|
65 |
-
*
|
66 |
* @param int $item_id post ID of menu
|
67 |
* @param object $item Menu item data object.
|
68 |
* @param int $depth Depth of menu item. Used for padding.
|
1 |
<?php
|
2 |
|
|
|
|
|
|
|
|
|
3 |
if ( ! class_exists( 'Walker_Nav_Menu_Edit' ) ) {
|
4 |
/** Walker_Nav_Menu_Edit class */
|
5 |
require_once ABSPATH . 'wp-admin/includes/nav-menu.php';
|
15 |
* @kucrut - preg_replace() method so that we no longer have to translate core strings
|
16 |
* @danieliser - refactor for less complexity between WP versions & updating versioned classes for proper backward compatibility with the new methods.
|
17 |
*
|
|
|
18 |
* @since WordPress 3.0.0
|
19 |
* @uses Walker_Nav_Menu_Edit
|
20 |
*/
|
21 |
+
class Walker_Nav_Menu_Edit_Custom_Fields extends Walker_Nav_Menu_Edit {
|
22 |
|
23 |
/**
|
24 |
* Start the element output.
|
25 |
*
|
26 |
+
* @see Walker_Nav_Menu_Edit::start_el()
|
27 |
*
|
28 |
* @param string $output Passed by reference. Used to append additional content.
|
29 |
* @param object $item Menu item data object.
|
33 |
public function start_el( &$output, $item, $depth = 0, $args = array() ) {
|
34 |
parent::start_el( $output, $item, $depth, $args );
|
35 |
|
36 |
+
$output = preg_replace( '(<p[^>]+class="[^"]*field-description(.|\n)*?<\/p>)', "$1 \n" . $this->get_custom_fields( $item, $depth, $args ), $output, 1 );
|
37 |
}
|
38 |
|
39 |
/**
|
40 |
* Get custom fields
|
41 |
*
|
|
|
|
|
42 |
* @uses do_action() Calls 'menu_item_custom_fields' hook
|
43 |
*
|
44 |
* @param object $item Menu item data object.
|
45 |
* @param int $depth Depth of menu item. Used for padding.
|
46 |
* @param array $args Menu item args.
|
|
|
47 |
*
|
48 |
* @return string Additional fields or html for the nav menu editor.
|
49 |
*/
|
53 |
/**
|
54 |
* Get menu item custom fields from plugins/themes
|
55 |
*
|
|
|
|
|
56 |
* @param int $item_id post ID of menu
|
57 |
* @param object $item Menu item data object.
|
58 |
* @param int $depth Depth of menu item. Used for padding.
|
includes/modules/menus/{class-pum-walker-nav-menu-edit.php → class-nav-menu-edit-custom-fields.php}
RENAMED
@@ -1,83 +1,74 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
*
|
19 |
-
*
|
20 |
-
*
|
21 |
-
*
|
22 |
-
*
|
23 |
-
* @
|
24 |
-
* @
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
*
|
35 |
-
*
|
36 |
-
* @
|
37 |
-
*
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
*
|
53 |
-
*
|
54 |
-
*
|
55 |
-
* @
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
*
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
* @param array $args Menu item args.
|
76 |
-
*
|
77 |
-
* @return string Custom fields
|
78 |
-
*/
|
79 |
-
do_action( 'wp_nav_menu_item_custom_fields', $item_id, $item, $depth, $args );
|
80 |
-
|
81 |
-
return ob_get_clean();
|
82 |
-
}
|
83 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/** Walker_Nav_Menu_Edit class */
|
4 |
+
if ( ! class_exists( 'Walker_Nav_Menu_Edit' ) ) {
|
5 |
+
global $wp_version;
|
6 |
+
if ( version_compare( $wp_version, '4.4', '>=' ) ) {
|
7 |
+
require_once ABSPATH . 'wp-admin/includes/class-walker-nav-menu-edit.php';
|
8 |
+
} else {
|
9 |
+
require_once ABSPATH . 'wp-admin/includes/nav-menu.php';
|
10 |
+
}
|
11 |
+
}
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Custom Walker for Nav Menu Editor
|
15 |
+
*
|
16 |
+
* Add wp_nav_menu_item_custom_fields hook to the nav menu editor.
|
17 |
+
*
|
18 |
+
* Credits:
|
19 |
+
* @helgatheviking - Initial concept which has made adding settings in the menu editor in a compatible way.
|
20 |
+
* @kucrut - preg_replace() method so that we no longer have to translate core strings
|
21 |
+
* @danieliser - refactor for less complexity between WP versions & updating versioned classes for proper backward compatibility with the new methods.
|
22 |
+
*
|
23 |
+
* @since WordPress 3.6.0
|
24 |
+
* @uses Walker_Nav_Menu_Edit
|
25 |
+
*/
|
26 |
+
class Walker_Nav_Menu_Edit_Custom_Fields extends Walker_Nav_Menu_Edit {
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Start the element output.
|
30 |
+
*
|
31 |
+
* @see Walker_Nav_Menu_Edit::start_el()
|
32 |
+
*
|
33 |
+
* @param string $output Passed by reference. Used to append additional content.
|
34 |
+
* @param object $item Menu item data object.
|
35 |
+
* @param int $depth Depth of menu item.
|
36 |
+
* @param array $args
|
37 |
+
* @param int $id
|
38 |
+
*/
|
39 |
+
public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
|
40 |
+
parent::start_el( $output, $item, $depth, $args, $id = 0 );
|
41 |
+
|
42 |
+
$output = preg_replace( '(<p[^>]+class="[^"]*field-description(.|\n)*?<\/p>)', "$1 \n" . $this->get_custom_fields( $item, $depth, $args ), $output, 1 );
|
43 |
+
}
|
44 |
+
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Get custom fields
|
48 |
+
*
|
49 |
+
* @uses do_action() Calls 'menu_item_custom_fields' hook
|
50 |
+
*
|
51 |
+
* @param object $item Menu item data object.
|
52 |
+
* @param int $depth Depth of menu item. Used for padding.
|
53 |
+
* @param array $args Menu item args.
|
54 |
+
*
|
55 |
+
* @return string Additional fields or html for the nav menu editor.
|
56 |
+
*/
|
57 |
+
protected function get_custom_fields( $item, $depth, $args = array() ) {
|
58 |
+
ob_start();
|
59 |
+
$item_id = intval( $item->ID );
|
60 |
+
/**
|
61 |
+
* Get menu item custom fields from plugins/themes
|
62 |
+
*
|
63 |
+
* @param int $item_id post ID of menu
|
64 |
+
* @param object $item Menu item data object.
|
65 |
+
* @param int $depth Depth of menu item. Used for padding.
|
66 |
+
* @param array $args Menu item args.
|
67 |
+
*
|
68 |
+
* @return string Custom fields
|
69 |
+
*/
|
70 |
+
do_action( 'wp_nav_menu_item_custom_fields', $item_id, $item, $depth, $args );
|
71 |
+
|
72 |
+
return ob_get_clean();
|
73 |
+
}
|
74 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
languages/popup-maker.pot
CHANGED
@@ -1628,11 +1628,11 @@ msgstr ""
|
|
1628 |
msgid "Popup ID"
|
1629 |
msgstr ""
|
1630 |
|
1631 |
-
#: includes/modules/menus.php:
|
1632 |
msgid "Trigger a Popup"
|
1633 |
msgstr ""
|
1634 |
|
1635 |
-
#: includes/modules/menus.php:
|
1636 |
msgid "Choose a popup to trigger when this item is clicked."
|
1637 |
msgstr ""
|
1638 |
|
1628 |
msgid "Popup ID"
|
1629 |
msgstr ""
|
1630 |
|
1631 |
+
#: includes/modules/menus.php:127
|
1632 |
msgid "Trigger a Popup"
|
1633 |
msgstr ""
|
1634 |
|
1635 |
+
#: includes/modules/menus.php:138
|
1636 |
msgid "Choose a popup to trigger when this item is clicked."
|
1637 |
msgstr ""
|
1638 |
|
popup-maker.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Plugin URI: https://wppopupmaker.com/?utm_capmaign=PluginInfo&utm_source=plugin-header&utm_medium=plugin-uri
|
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: WP Popup Maker
|
7 |
-
* Version: 1.5.
|
8 |
* Author URI: https://wppopupmaker.com/?utm_capmaign=PluginInfo&utm_source=plugin-header&utm_medium=author-uri
|
9 |
* Text Domain: popup-maker
|
10 |
*
|
@@ -147,7 +147,7 @@ if ( ! class_exists( 'Popup_Maker' ) ) :
|
|
147 |
}
|
148 |
|
149 |
if ( ! defined( 'POPMAKE_VERSION' ) ) {
|
150 |
-
define( 'POPMAKE_VERSION', '1.5.
|
151 |
}
|
152 |
|
153 |
if ( ! defined( 'POPMAKE_DB_VERSION' ) ) {
|
4 |
* Plugin URI: https://wppopupmaker.com/?utm_capmaign=PluginInfo&utm_source=plugin-header&utm_medium=plugin-uri
|
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: WP Popup Maker
|
7 |
+
* Version: 1.5.5
|
8 |
* Author URI: https://wppopupmaker.com/?utm_capmaign=PluginInfo&utm_source=plugin-header&utm_medium=author-uri
|
9 |
* Text Domain: popup-maker
|
10 |
*
|
147 |
}
|
148 |
|
149 |
if ( ! defined( 'POPMAKE_VERSION' ) ) {
|
150 |
+
define( 'POPMAKE_VERSION', '1.5.5' );
|
151 |
}
|
152 |
|
153 |
if ( ! defined( 'POPMAKE_DB_VERSION' ) ) {
|
readme.txt
CHANGED
@@ -6,7 +6,7 @@ Donate link:
|
|
6 |
Tags: responsive popup, promotion, popover, pop-up, pop over, marketing, lightbox, advertising, conversion, modal, popup, popups
|
7 |
Requires at least: 3.6
|
8 |
Tested up to: 4.7.2
|
9 |
-
Stable tag: 1.5.
|
10 |
License: GNU Version 3 or Any Later Version
|
11 |
|
12 |
Create any popup imaginable! Customize your popups from head-to-toe and give your site more utility, usability, and conversions.
|
@@ -87,6 +87,10 @@ There are several common causes for this which include:
|
|
87 |
|
88 |
== Changelog ==
|
89 |
|
|
|
|
|
|
|
|
|
90 |
= v1.5.4 - 03/13/2017 =
|
91 |
* Fix: Typos in conditions.
|
92 |
* Fix: Moved class_exists checks to better handle possible missing class errors.
|
@@ -506,4 +510,4 @@ There are several common causes for this which include:
|
|
506 |
* Misc Admin changes, including new filters/hooks for upcoming extensions.
|
507 |
|
508 |
= v1.0.0 =
|
509 |
-
* Initial Release
|
6 |
Tags: responsive popup, promotion, popover, pop-up, pop over, marketing, lightbox, advertising, conversion, modal, popup, popups
|
7 |
Requires at least: 3.6
|
8 |
Tested up to: 4.7.2
|
9 |
+
Stable tag: 1.5.5
|
10 |
License: GNU Version 3 or Any Later Version
|
11 |
|
12 |
Create any popup imaginable! Customize your popups from head-to-toe and give your site more utility, usability, and conversions.
|
87 |
|
88 |
== Changelog ==
|
89 |
|
90 |
+
= v1.5.5 - 03/13/2017 =
|
91 |
+
* Improvment: Used generic Nav Menu Editor Walker classes for better support. This should remove the notices from other plugins as well.
|
92 |
+
* Fix: Bug that causes click triggers to lag.
|
93 |
+
|
94 |
= v1.5.4 - 03/13/2017 =
|
95 |
* Fix: Typos in conditions.
|
96 |
* Fix: Moved class_exists checks to better handle possible missing class errors.
|
510 |
* Misc Admin changes, including new filters/hooks for upcoming extensions.
|
511 |
|
512 |
= v1.0.0 =
|
513 |
+
* Initial Release
|