Version Description
Download this release
Release Info
Developer | danieliser |
Plugin | Popup Maker – Popup Forms, Optins & More |
Version | 1.4.16 |
Comparing to | |
See all releases |
Code changes from version 1.4.15 to 1.4.16
- assets/images/beacon.gif +0 -0
- assets/js/site.js +31 -40
- assets/js/site.min.js +1 -1
- includes/admin/admin-pages.php +21 -33
- includes/admin/popups/metabox-display-fields.php +34 -16
- includes/class-popmake-popup-fields.php +7 -0
- includes/class-pum-ajax.php +24 -1
- includes/class-pum-analytics.php +14 -3
- includes/class-pum-condition-callbacks.php +73 -87
- includes/class-pum-freemius.php +1 -6
- includes/class-pum-popup.php +18 -0
- includes/class-pum.php +1 -1
- includes/defaults.php +2 -2
- includes/integrations/visual-composer.php +15 -4
- includes/libs/freemius/includes/class-freemius.php +14 -2
- includes/pum-condition-functions.php +47 -64
- languages/popup-maker.pot +74 -57
- popup-maker.php +2 -2
- readme.txt +15 -3
assets/images/beacon.gif
ADDED
Binary file
|
assets/js/site.js
CHANGED
@@ -95,13 +95,16 @@ var PUM;
|
|
95 |
settings.theme_id = popmake_default_theme;
|
96 |
}
|
97 |
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
|
|
|
|
|
|
105 |
|
106 |
if (typeof popmake_powered_by === 'string' && popmake_powered_by !== '') {
|
107 |
$popup.popmake('getContent').append($(popmake_powered_by));
|
@@ -298,6 +301,7 @@ var PUM;
|
|
298 |
$('html')
|
299 |
.removeClass('pum-open')
|
300 |
.removeClass('pum-open-scrollable')
|
|
|
301 |
.removeClass('pum-open-overlay-disabled')
|
302 |
.removeClass('pum-open-fixed');
|
303 |
}
|
@@ -789,41 +793,27 @@ var PUM_Analytics;
|
|
789 |
$.fn.popmake.conversion_trigger = null;
|
790 |
|
791 |
PUM_Analytics = {
|
792 |
-
|
793 |
-
var
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
|
|
|
|
|
|
|
|
|
|
798 |
|
799 |
-
//
|
800 |
-
|
|
|
|
|
801 |
|
802 |
-
|
803 |
-
|
804 |
-
img.addEventListener('load', function () {
|
805 |
-
callback(data);
|
806 |
-
});
|
807 |
}
|
808 |
-
img.src = pum_vars.ajaxurl + '?' + $.param(data);
|
809 |
-
|
810 |
-
return;
|
811 |
-
/*
|
812 |
-
Method 2 - True AJAX
|
813 |
-
$.get({
|
814 |
-
type: 'POST',
|
815 |
-
dataType: 'json',
|
816 |
-
url: pum_vars.ajaxurl,
|
817 |
-
data: data,
|
818 |
-
success: function (data) {
|
819 |
-
if (callback !== undefined) {
|
820 |
-
callback(data);
|
821 |
-
}
|
822 |
-
}
|
823 |
-
});
|
824 |
-
*/
|
825 |
}
|
826 |
-
|
827 |
};
|
828 |
|
829 |
// Only popups from the editor should fire analytics events.
|
@@ -840,7 +830,7 @@ var PUM_Analytics;
|
|
840 |
};
|
841 |
|
842 |
if (data.pid > 0 && !$('body').hasClass('single-popup')) {
|
843 |
-
PUM_Analytics.
|
844 |
}
|
845 |
});
|
846 |
}(jQuery, document));
|
@@ -1200,6 +1190,7 @@ var pm_cookie, pm_remove_cookie;
|
|
1200 |
return false;
|
1201 |
}
|
1202 |
$.pm_cookie(key, '', -1);
|
|
|
1203 |
return !$.pm_cookie(key);
|
1204 |
}
|
1205 |
};
|
@@ -1416,7 +1407,7 @@ var pm_cookie, pm_remove_cookie;
|
|
1416 |
trigger_selector;
|
1417 |
|
1418 |
|
1419 |
-
if (settings.extra_selectors !== '') {
|
1420 |
trigger_selectors.push(settings.extra_selectors);
|
1421 |
}
|
1422 |
|
95 |
settings.theme_id = popmake_default_theme;
|
96 |
}
|
97 |
|
98 |
+
if (settings.meta.display.disable_reposition === undefined) {
|
99 |
+
$(window).on('resize', function () {
|
100 |
+
if ($popup.hasClass('pum-active') || $popup.find('.popmake.active').length) {
|
101 |
+
$.fn.popmake.utilities.throttle(setTimeout(function () {
|
102 |
+
$popup.popmake('reposition');
|
103 |
+
}, 25), 500, false);
|
104 |
+
}
|
105 |
+
});
|
106 |
+
}
|
107 |
+
|
108 |
|
109 |
if (typeof popmake_powered_by === 'string' && popmake_powered_by !== '') {
|
110 |
$popup.popmake('getContent').append($(popmake_powered_by));
|
301 |
$('html')
|
302 |
.removeClass('pum-open')
|
303 |
.removeClass('pum-open-scrollable')
|
304 |
+
.removeClass('pum-open-overlay')
|
305 |
.removeClass('pum-open-overlay-disabled')
|
306 |
.removeClass('pum-open-fixed');
|
307 |
}
|
793 |
$.fn.popmake.conversion_trigger = null;
|
794 |
|
795 |
PUM_Analytics = {
|
796 |
+
beacon: function (opts) {
|
797 |
+
var beacon = new Image();
|
798 |
+
|
799 |
+
opts = $.extend(true, {}, {
|
800 |
+
url: pum_vars.ajaxurl || null,
|
801 |
+
data: {
|
802 |
+
action: 'pum_analytics',
|
803 |
+
_cache: (+(new Date()))
|
804 |
+
},
|
805 |
+
callback: function () {}
|
806 |
+
}, opts);
|
807 |
|
808 |
+
// Create a beacon if a url is provided
|
809 |
+
if (opts.url) {
|
810 |
+
// Attach the event handlers to the image object
|
811 |
+
$(beacon).on('error success load done', opts.callback);
|
812 |
|
813 |
+
// Attach the src for the script call
|
814 |
+
beacon.src = opts.url + '?' + $.param(opts.data);
|
|
|
|
|
|
|
815 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
816 |
}
|
|
|
817 |
};
|
818 |
|
819 |
// Only popups from the editor should fire analytics events.
|
830 |
};
|
831 |
|
832 |
if (data.pid > 0 && !$('body').hasClass('single-popup')) {
|
833 |
+
PUM_Analytics.beacon({data: data});
|
834 |
}
|
835 |
});
|
836 |
}(jQuery, document));
|
1190 |
return false;
|
1191 |
}
|
1192 |
$.pm_cookie(key, '', -1);
|
1193 |
+
$.pm_cookie(key, '', -1, '/');
|
1194 |
return !$.pm_cookie(key);
|
1195 |
}
|
1196 |
};
|
1407 |
trigger_selector;
|
1408 |
|
1409 |
|
1410 |
+
if (settings.extra_selectors && settings.extra_selectors !== '') {
|
1411 |
trigger_selectors.push(settings.extra_selectors);
|
1412 |
}
|
1413 |
|
assets/js/site.min.js
CHANGED
@@ -1 +1 @@
|
|
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";PUM={getPopup:function(t){var o=e(t);return o.hasClass("pum-overlay")?o:o.hasClass("popmake")?o.parents(".pum-overlay"):o.parents(".pum-overlay").length?o.parents(".pum-overlay"):e()}},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(window.console&&console.warn("Method "+t+" 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 o=PUM.getPopup(this),n=e.extend(!0,{},e.fn.popmake.defaults,o.data("popmake"),t);return n.theme_id<=0&&(n.theme_id=popmake_default_theme),e(window).on("resize",function(){(o.hasClass("pum-active")||o.find(".popmake.active").length)&&e.fn.popmake.utilities.throttle(setTimeout(function(){o.popmake("reposition")},25),500,!1)}),"string"==typeof popmake_powered_by&&""!==popmake_powered_by&&o.popmake("getContent").append(e(popmake_powered_by)),o.find(".pum-container").data("popmake",n),o.data("popmake",n).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")},open:function(t){var n=PUM.getPopup(this),i=n.popmake("getContainer"),a=n.popmake("getClose"),s=n.popmake("getSettings"),p=e("html");return s.meta.display.stackable||n.popmake("close_all"),n.addClass("pum-active").trigger("pumBeforeOpen"),s.meta.close.button_delay>0&&a.fadeOut(0),n.hasClass("preventOpen")||i.hasClass("preventOpen")?(n.removeClass("preventOpen").removeClass("pum-active").trigger("pumOpenPrevented"),this):(p.addClass("pum-open"),s.meta.display.overlay_disabled?p.addClass("pum-open-overlay-disabled"):p.addClass("pum-open-overlay"),s.meta.display.position_fixed!==o&&s.meta.display.position_fixed?p.addClass("pum-open-fixed"):p.addClass("pum-open-scrollable"),n.popmake("setup_close").popmake("reposition").css({"z-index":s.meta.display.overlay_zindex||1999999998}).popmake("animate",s.meta.display.animation_type,function(){s.meta.close.button_delay>0&&setTimeout(function(){a.fadeIn()},s.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),o=t.popmake("getClose").add(e(".popmake-close",t).not(o)),n=t.popmake("getSettings");return o.off("click.pum").on("click.pum",function(o){o.preventDefault(),e.fn.popmake.last_close_trigger="Close Button",t.popmake("close")}),(n.meta.close.esc_press||n.meta.close.f4_press)&&e(window).off("keyup.popmake").on("keyup.popmake",function(o){27===o.keyCode&&n.meta.close.esc_press&&(e.fn.popmake.last_close_trigger="ESC Key",t.popmake("close")),115===o.keyCode&&n.meta.close.f4_press&&(e.fn.popmake.last_close_trigger="F4 Key",t.popmake("close"))}),n.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));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-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,s=a.location,p={my:"",at:""},r={overlay:null,container:null};return s.indexOf("left")>=0&&(p={my:p.my+" left"+(0!==a.position_left?"+"+a.position_left:""),at:p.at+" left"}),s.indexOf("right")>=0&&(p={my:p.my+" right"+(0!==a.position_right?"-"+a.position_right:""),at:p.at+" right"}),s.indexOf("center")>=0&&(p="center"===s?{my:"center",at:"center"}:{my:p.my+" center",at:p.at+" center"}),s.indexOf("top")>=0&&(p={my:p.my+" top"+(0!==a.position_top?"+"+(e("body").hasClass("admin-bar")?parseInt(a.position_top,10)+32:a.position_top):""),at:p.at+" top"}),s.indexOf("bottom")>=0&&(p={my:p.my+" bottom"+(0!==a.position_bottom?"-"+a.position_bottom:""),at:p.at+" bottom"}),p.my=e.trim(p.my),p.at=e.trim(p.at),p.of=window,p.collision="none",p.using="function"==typeof t?t:e.fn.popmake.callbacks.reposition_using,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"}),n.addClass("custom-position").position(p).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),s=a.popmake("getContainer"),p=a.popmake("getTitle"),r=a.popmake("getContent"),c=a.popmake("getClose"),l=a.popmake("getSettings");switch(t===o&&(t=e.fn.popmake.themes[l.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:l.meta.display.overlay_zindex||998}),s.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:l.meta.display.zindex||999}),p.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}),c.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":c.css({top:t.close.position_top+"px",left:t.close.position_left+"px"});break;case"topright":c.css({top:t.close.position_top+"px",right:t.close.position_right+"px"});break;case"bottomleft":c.css({bottom:t.close.position_bottom+"px",left:t.close.position_left+"px"});break;case"bottomright":c.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,s="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(s).filter(":visible"),n=e(":focus"),i=o.length,p=o.index(n);t.shiftKey?0===p&&(o.get(i-1).focus(),t.preventDefault()):p===i-1&&(o.get(0).focus(),t.preventDefault())}},setFocusToFirstItem:function(){a.find(".pum-container *").filter(s).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),s=e(":focus");o.has(s).length||(i=s),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 o=PUM.getPopup(this);o.off("keydown.pum_accessibility").attr("aria-hidden","true"),n&&(n.attr("aria-hidden","false"),n=null),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,PUM_Analytics={send:function(t,n){var i=new Image;t=e.extend({},{action:"pum_analytics"},t),t._cache=+new Date,n!==o&&i.addEventListener("load",function(){n(t)}),i.src=pum_vars.ajaxurl+"?"+e.param(t)}},e(t).on("pumAfterOpen.core_analytics","body > .pum",function(){var t=PUM.getPopup(this),o={pid:parseInt(t.popmake("getSettings").id,10)||null,type:"open"};o.pid>0&&!e("body").hasClass("single-popup")&&PUM_Analytics.send(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,s=t.popmake("animation_origin",i.meta.display.animation_origin);return n.position(s).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,s=t.popmake("animation_origin",i.meta.display.animation_origin);return n.position(s),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);var pm_cookie,pm_remove_cookie;!function(e,t,o){"use strict";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 n=e.fn.popmake.cookie.raw?t:e.fn.popmake.cookie.parseCookieValue(t);return e.isFunction(o)?o(n):n},process:function(n,i,a,s){var p,r,c,l,m,u=n?o:{},f=new Date,d=t.cookie?t.cookie.split("; "):[];if(i!==o&&!e.isFunction(i)){switch(typeof a){case"number":f.setTime(+f+864e5*a),a=f;break;case"string":f.setTime(1e3*e.fn.popmake.utilities.strtotime("+"+a)),a=f}return void(t.cookie=[e.fn.popmake.cookie.encode(n),"=",e.fn.popmake.cookie.stringifyCookieValue(i),a?"; expires="+a.toUTCString():"",s?"; path="+s:""].join(""))}for(l=0,m=d.length;m>l;l+=1){if(p=d[l].split("="),r=e.fn.popmake.cookie.decode(p.shift()),c=p.join("="),n&&n===r){u=e.fn.popmake.cookie.read(c,i);break}c=e.fn.popmake.cookie.read(c),n||c===o||(u[r]=c)}return u},remove:function(t){return e.pm_cookie(t)===o?!1:(e.pm_cookie(t,"",-1),!e.pm_cookie(t))}},pm_cookie=e.pm_cookie=e.fn.popmake.cookie.process,pm_remove_cookie=e.pm_remove_cookie=e.fn.popmake.cookie.remove}(jQuery,document),function(e,t,o){"use strict";e.fn.popmake.methods.addCookie=function(t){return 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)},e.fn.popmake.methods.setCookie=function(t){e.pm_cookie(t.name,!0,t.session?null:t.time,t.path?"/":null)},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)})}},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),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,o){"use strict";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.methods.checkCookies=function(t){var n;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)if(e.pm_cookie(t.cookie.name[n])!==o)return!0;break;case"string":if(e.pm_cookie(t.cookie.name)!==o)return!0}return!1},e.fn.popmake.triggers={auto_open:function(t){var o=PUM.getPopup(this);setTimeout(function(){o.hasClass("pum-open")||o.popmake("getContainer").hasClass("active")||o.popmake("checkCookies",t)||(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"),s=[".popmake-"+a.id,".popmake-"+decodeURIComponent(a.slug),'a[href$="#popmake-'+a.id+'"]'];""!==o.extra_selectors&&s.push(o.extra_selectors),n=s.join(", "),e(n).addClass("pum-trigger").css({cursor:"pointer"}),e(t).on("click.pumTrigger",n,function(t){i.has(this).length>0||i.popmake("checkCookies",o)||(o.do_default||e(t.target).hasClass("do-default")||(t.preventDefault(),t.stopPropagation()),e.fn.popmake.last_open_trigger=this,i.popmake("open"))})},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)})}(jQuery,document),function(e,t,o){"use strict";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,s,p=[];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(),s=o.parent().children(a).index(o),"body"===a?!1:(i.length>0&&(i=i.split(" "),i=i[0]),void p.push(a+(n.length>0?"#"+n:i.length>0?"."+i.split(" ").join("."):":eq("+s+")")))}),p.reverse().join(" > ")},strtotime:function(e,t){function n(e,t,n){var i,a=l[t];a!==o&&(i=a-c.getDay(),0===i?i=7*n:i>0&&"last"===e?i-=7:0>i&&"next"===e&&(i+=7),c.setDate(c.getDate()+i))}function i(e){var t=e.split(" "),o=t[0],i=t[1].substring(0,3),a=/\d+/.test(o),s="ago"===t[2],p=("last"===o?-1:1)*(s?-1:1);if(a&&(p*=parseInt(o,10)),m.hasOwnProperty(i)&&!t[1].match(/^mon(day|\.)?$/i))return c["set"+m[i]](c["get"+m[i]]()+p);if("wee"===i)return c.setDate(c.getDate()+7*p);if("next"===o||"last"===o)n(o,i,p);else if(!a)return!1;return!0}var a,s,p,r,c,l,m,u,f,d,h,g=!1;if(!e)return g;if(e=e.replace(/^\s+|\s+$/g,"").replace(/\s{2,}/g," ").replace(/[\t\r\n]/g,"").toLowerCase(),s=e.match(/^(\d{1,4})([\-\.\/\:])(\d{1,2})([\-\.\/\:])(\d{1,4})(?:\s(\d{1,2}):(\d{2})?:?(\d{2})?)?(?:\s([A-Z]+)?)?$/),s&&s[2]===s[4])if(s[1]>1901)switch(s[2]){case"-":return s[3]>12||s[5]>31?g:new Date(s[1],parseInt(s[3],10)-1,s[5],s[6]||0,s[7]||0,s[8]||0,s[9]||0)/1e3;case".":return g;case"/":return s[3]>12||s[5]>31?g:new Date(s[1],parseInt(s[3],10)-1,s[5],s[6]||0,s[7]||0,s[8]||0,s[9]||0)/1e3}else if(s[5]>1901)switch(s[2]){case"-":return s[3]>12||s[1]>31?g:new Date(s[5],parseInt(s[3],10)-1,s[1],s[6]||0,s[7]||0,s[8]||0,s[9]||0)/1e3;case".":return s[3]>12||s[1]>31?g:new Date(s[5],parseInt(s[3],10)-1,s[1],s[6]||0,s[7]||0,s[8]||0,s[9]||0)/1e3;case"/":return s[1]>12||s[3]>31?g:new Date(s[5],parseInt(s[1],10)-1,s[3],s[6]||0,s[7]||0,s[8]||0,s[9]||0)/1e3}else switch(s[2]){case"-":return s[3]>12||s[5]>31||s[1]<70&&s[1]>38?g:(r=s[1]>=0&&s[1]<=38?+s[1]+2e3:s[1],new Date(r,parseInt(s[3],10)-1,s[5],s[6]||0,s[7]||0,s[8]||0,s[9]||0)/1e3);case".":return s[5]>=70?s[3]>12||s[1]>31?g:new Date(s[5],parseInt(s[3],10)-1,s[1],s[6]||0,s[7]||0,s[8]||0,s[9]||0)/1e3:s[5]<60&&!s[6]?s[1]>23||s[3]>59?g:(p=new Date,new Date(p.getFullYear(),p.getMonth(),p.getDate(),s[1]||0,s[3]||0,s[5]||0,s[9]||0)/1e3):g;case"/":return s[1]>12||s[3]>31||s[5]<70&&s[5]>38?g:(r=s[5]>=0&&s[5]<=38?+s[5]+2e3:s[5],new Date(r,parseInt(s[1],10)-1,s[3],s[6]||0,s[7]||0,s[8]||0,s[9]||0)/1e3);case":":return s[1]>23||s[3]>59||s[5]>59?g:(p=new Date,new Date(p.getFullYear(),p.getMonth(),p.getDate(),s[1]||0,s[3]||0,s[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(c=t?new Date(1e3*t):new Date,l={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6},m={yea:"FullYear",mon:"Month",day:"Date",hou:"Hours",min:"Minutes",sec:"Seconds"},f="(years?|months?|weeks?|days?|hours?|minutes?|min|seconds?|sec|sunday|sun\\.?|monday|mon\\.?|tuesday|tue\\.?|wednesday|wed\\.?|thursday|thu\\.?|friday|fri\\.?|saturday|sat\\.?)",d="([+-]?\\d+\\s"+f+"|(last|next)\\s"+f+")(\\sago)?",s=e.match(new RegExp(d,"gi")),!s)return g;for(h=0,u=s.length;u>h;h+=1)if(!i(s[h]))return g;return c.getTime()/1e3}},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);
|
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";PUM={getPopup:function(t){var o=e(t);return o.hasClass("pum-overlay")?o:o.hasClass("popmake")?o.parents(".pum-overlay"):o.parents(".pum-overlay").length?o.parents(".pum-overlay"):e()}},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(window.console&&console.warn("Method "+t+" 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)}),"string"==typeof popmake_powered_by&&""!==popmake_powered_by&&n.popmake("getContent").append(e(popmake_powered_by)),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")},open:function(t){var n=PUM.getPopup(this),i=n.popmake("getContainer"),a=n.popmake("getClose"),s=n.popmake("getSettings"),p=e("html");return s.meta.display.stackable||n.popmake("close_all"),n.addClass("pum-active").trigger("pumBeforeOpen"),s.meta.close.button_delay>0&&a.fadeOut(0),n.hasClass("preventOpen")||i.hasClass("preventOpen")?(n.removeClass("preventOpen").removeClass("pum-active").trigger("pumOpenPrevented"),this):(p.addClass("pum-open"),s.meta.display.overlay_disabled?p.addClass("pum-open-overlay-disabled"):p.addClass("pum-open-overlay"),s.meta.display.position_fixed!==o&&s.meta.display.position_fixed?p.addClass("pum-open-fixed"):p.addClass("pum-open-scrollable"),n.popmake("setup_close").popmake("reposition").css({"z-index":s.meta.display.overlay_zindex||1999999998}).popmake("animate",s.meta.display.animation_type,function(){s.meta.close.button_delay>0&&setTimeout(function(){a.fadeIn()},s.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),o=t.popmake("getClose").add(e(".popmake-close",t).not(o)),n=t.popmake("getSettings");return o.off("click.pum").on("click.pum",function(o){o.preventDefault(),e.fn.popmake.last_close_trigger="Close Button",t.popmake("close")}),(n.meta.close.esc_press||n.meta.close.f4_press)&&e(window).off("keyup.popmake").on("keyup.popmake",function(o){27===o.keyCode&&n.meta.close.esc_press&&(e.fn.popmake.last_close_trigger="ESC Key",t.popmake("close")),115===o.keyCode&&n.meta.close.f4_press&&(e.fn.popmake.last_close_trigger="F4 Key",t.popmake("close"))}),n.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));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,s=a.location,p={my:"",at:""},r={overlay:null,container:null};return s.indexOf("left")>=0&&(p={my:p.my+" left"+(0!==a.position_left?"+"+a.position_left:""),at:p.at+" left"}),s.indexOf("right")>=0&&(p={my:p.my+" right"+(0!==a.position_right?"-"+a.position_right:""),at:p.at+" right"}),s.indexOf("center")>=0&&(p="center"===s?{my:"center",at:"center"}:{my:p.my+" center",at:p.at+" center"}),s.indexOf("top")>=0&&(p={my:p.my+" top"+(0!==a.position_top?"+"+(e("body").hasClass("admin-bar")?parseInt(a.position_top,10)+32:a.position_top):""),at:p.at+" top"}),s.indexOf("bottom")>=0&&(p={my:p.my+" bottom"+(0!==a.position_bottom?"-"+a.position_bottom:""),at:p.at+" bottom"}),p.my=e.trim(p.my),p.at=e.trim(p.at),p.of=window,p.collision="none",p.using="function"==typeof t?t:e.fn.popmake.callbacks.reposition_using,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"}),n.addClass("custom-position").position(p).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),s=a.popmake("getContainer"),p=a.popmake("getTitle"),r=a.popmake("getContent"),c=a.popmake("getClose"),l=a.popmake("getSettings");switch(t===o&&(t=e.fn.popmake.themes[l.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:l.meta.display.overlay_zindex||998}),s.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:l.meta.display.zindex||999}),p.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}),c.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":c.css({top:t.close.position_top+"px",left:t.close.position_left+"px"});break;case"topright":c.css({top:t.close.position_top+"px",right:t.close.position_right+"px"});break;case"bottomleft":c.css({bottom:t.close.position_bottom+"px",left:t.close.position_left+"px"});break;case"bottomright":c.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,s="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(s).filter(":visible"),n=e(":focus"),i=o.length,p=o.index(n);t.shiftKey?0===p&&(o.get(i-1).focus(),t.preventDefault()):p===i-1&&(o.get(0).focus(),t.preventDefault())}},setFocusToFirstItem:function(){a.find(".pum-container *").filter(s).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),s=e(":focus");o.has(s).length||(i=s),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 o=PUM.getPopup(this);o.off("keydown.pum_accessibility").attr("aria-hidden","true"),n&&(n.attr("aria-hidden","false"),n=null),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,PUM_Analytics={beacon:function(t){var o=new Image;t=e.extend(!0,{},{url:pum_vars.ajaxurl||null,data:{action:"pum_analytics",_cache:+new Date},callback:function(){}},t),t.url&&(e(o).on("error success load done",t.callback),o.src=t.url+"?"+e.param(t.data))}},e(t).on("pumAfterOpen.core_analytics","body > .pum",function(){var t=PUM.getPopup(this),o={pid:parseInt(t.popmake("getSettings").id,10)||null,type:"open"};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,s=t.popmake("animation_origin",i.meta.display.animation_origin);return n.position(s).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,s=t.popmake("animation_origin",i.meta.display.animation_origin);return n.position(s),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);var pm_cookie,pm_remove_cookie;!function(e,t,o){"use strict";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 n=e.fn.popmake.cookie.raw?t:e.fn.popmake.cookie.parseCookieValue(t);return e.isFunction(o)?o(n):n},process:function(n,i,a,s){var p,r,c,l,m,u=n?o:{},f=new Date,d=t.cookie?t.cookie.split("; "):[];if(i!==o&&!e.isFunction(i)){switch(typeof a){case"number":f.setTime(+f+864e5*a),a=f;break;case"string":f.setTime(1e3*e.fn.popmake.utilities.strtotime("+"+a)),a=f}return void(t.cookie=[e.fn.popmake.cookie.encode(n),"=",e.fn.popmake.cookie.stringifyCookieValue(i),a?"; expires="+a.toUTCString():"",s?"; path="+s:""].join(""))}for(l=0,m=d.length;m>l;l+=1){if(p=d[l].split("="),r=e.fn.popmake.cookie.decode(p.shift()),c=p.join("="),n&&n===r){u=e.fn.popmake.cookie.read(c,i);break}c=e.fn.popmake.cookie.read(c),n||c===o||(u[r]=c)}return u},remove:function(t){return e.pm_cookie(t)===o?!1:(e.pm_cookie(t,"",-1),e.pm_cookie(t,"",-1,"/"),!e.pm_cookie(t))}},pm_cookie=e.pm_cookie=e.fn.popmake.cookie.process,pm_remove_cookie=e.pm_remove_cookie=e.fn.popmake.cookie.remove}(jQuery,document),function(e,t,o){"use strict";e.fn.popmake.methods.addCookie=function(t){return 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)},e.fn.popmake.methods.setCookie=function(t){e.pm_cookie(t.name,!0,t.session?null:t.time,t.path?"/":null)},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)})}},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),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,o){"use strict";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.methods.checkCookies=function(t){var n;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)if(e.pm_cookie(t.cookie.name[n])!==o)return!0;break;case"string":if(e.pm_cookie(t.cookie.name)!==o)return!0}return!1},e.fn.popmake.triggers={auto_open:function(t){var o=PUM.getPopup(this);setTimeout(function(){o.hasClass("pum-open")||o.popmake("getContainer").hasClass("active")||o.popmake("checkCookies",t)||(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"),s=[".popmake-"+a.id,".popmake-"+decodeURIComponent(a.slug),'a[href$="#popmake-'+a.id+'"]'];o.extra_selectors&&""!==o.extra_selectors&&s.push(o.extra_selectors),n=s.join(", "),e(n).addClass("pum-trigger").css({cursor:"pointer"}),e(t).on("click.pumTrigger",n,function(t){i.has(this).length>0||i.popmake("checkCookies",o)||(o.do_default||e(t.target).hasClass("do-default")||(t.preventDefault(),t.stopPropagation()),e.fn.popmake.last_open_trigger=this,i.popmake("open"))})},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)})}(jQuery,document),function(e,t,o){"use strict";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,s,p=[];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(),s=o.parent().children(a).index(o),"body"===a?!1:(i.length>0&&(i=i.split(" "),i=i[0]),void p.push(a+(n.length>0?"#"+n:i.length>0?"."+i.split(" ").join("."):":eq("+s+")")))}),p.reverse().join(" > ")},strtotime:function(e,t){function n(e,t,n){var i,a=l[t];a!==o&&(i=a-c.getDay(),0===i?i=7*n:i>0&&"last"===e?i-=7:0>i&&"next"===e&&(i+=7),c.setDate(c.getDate()+i))}function i(e){var t=e.split(" "),o=t[0],i=t[1].substring(0,3),a=/\d+/.test(o),s="ago"===t[2],p=("last"===o?-1:1)*(s?-1:1);if(a&&(p*=parseInt(o,10)),m.hasOwnProperty(i)&&!t[1].match(/^mon(day|\.)?$/i))return c["set"+m[i]](c["get"+m[i]]()+p);if("wee"===i)return c.setDate(c.getDate()+7*p);if("next"===o||"last"===o)n(o,i,p);else if(!a)return!1;return!0}var a,s,p,r,c,l,m,u,f,d,h,g=!1;if(!e)return g;if(e=e.replace(/^\s+|\s+$/g,"").replace(/\s{2,}/g," ").replace(/[\t\r\n]/g,"").toLowerCase(),s=e.match(/^(\d{1,4})([\-\.\/\:])(\d{1,2})([\-\.\/\:])(\d{1,4})(?:\s(\d{1,2}):(\d{2})?:?(\d{2})?)?(?:\s([A-Z]+)?)?$/),s&&s[2]===s[4])if(s[1]>1901)switch(s[2]){case"-":return s[3]>12||s[5]>31?g:new Date(s[1],parseInt(s[3],10)-1,s[5],s[6]||0,s[7]||0,s[8]||0,s[9]||0)/1e3;case".":return g;case"/":return s[3]>12||s[5]>31?g:new Date(s[1],parseInt(s[3],10)-1,s[5],s[6]||0,s[7]||0,s[8]||0,s[9]||0)/1e3}else if(s[5]>1901)switch(s[2]){case"-":return s[3]>12||s[1]>31?g:new Date(s[5],parseInt(s[3],10)-1,s[1],s[6]||0,s[7]||0,s[8]||0,s[9]||0)/1e3;case".":return s[3]>12||s[1]>31?g:new Date(s[5],parseInt(s[3],10)-1,s[1],s[6]||0,s[7]||0,s[8]||0,s[9]||0)/1e3;case"/":return s[1]>12||s[3]>31?g:new Date(s[5],parseInt(s[1],10)-1,s[3],s[6]||0,s[7]||0,s[8]||0,s[9]||0)/1e3}else switch(s[2]){case"-":return s[3]>12||s[5]>31||s[1]<70&&s[1]>38?g:(r=s[1]>=0&&s[1]<=38?+s[1]+2e3:s[1],new Date(r,parseInt(s[3],10)-1,s[5],s[6]||0,s[7]||0,s[8]||0,s[9]||0)/1e3);case".":return s[5]>=70?s[3]>12||s[1]>31?g:new Date(s[5],parseInt(s[3],10)-1,s[1],s[6]||0,s[7]||0,s[8]||0,s[9]||0)/1e3:s[5]<60&&!s[6]?s[1]>23||s[3]>59?g:(p=new Date,new Date(p.getFullYear(),p.getMonth(),p.getDate(),s[1]||0,s[3]||0,s[5]||0,s[9]||0)/1e3):g;case"/":return s[1]>12||s[3]>31||s[5]<70&&s[5]>38?g:(r=s[5]>=0&&s[5]<=38?+s[5]+2e3:s[5],new Date(r,parseInt(s[1],10)-1,s[3],s[6]||0,s[7]||0,s[8]||0,s[9]||0)/1e3);case":":return s[1]>23||s[3]>59||s[5]>59?g:(p=new Date,new Date(p.getFullYear(),p.getMonth(),p.getDate(),s[1]||0,s[3]||0,s[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(c=t?new Date(1e3*t):new Date,l={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6},m={yea:"FullYear",mon:"Month",day:"Date",hou:"Hours",min:"Minutes",sec:"Seconds"},f="(years?|months?|weeks?|days?|hours?|minutes?|min|seconds?|sec|sunday|sun\\.?|monday|mon\\.?|tuesday|tue\\.?|wednesday|wed\\.?|thursday|thu\\.?|friday|fri\\.?|saturday|sat\\.?)",d="([+-]?\\d+\\s"+f+"|(last|next)\\s"+f+")(\\sago)?",s=e.match(new RegExp(d,"gi")),!s)return g;for(h=0,u=s.length;u>h;h+=1)if(!i(s[h]))return g;return c.getTime()/1e3}},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/admin/admin-pages.php
CHANGED
@@ -27,39 +27,14 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
27 |
function popmake_admin_submenu_pages() {
|
28 |
global $popmake_settings_page, $popmake_tools_page, $popmake_extensions_page;
|
29 |
|
30 |
-
$popmake_settings_page = add_submenu_page(
|
31 |
-
'edit.php?post_type=popup',
|
32 |
-
__( 'Settings', 'popup-maker' ),
|
33 |
-
__( 'Settings', 'popup-maker' ),
|
34 |
-
apply_filters( 'popmake_admin_submenu_settings_capability', 'manage_options' ),
|
35 |
-
'settings',
|
36 |
-
'popmake_settings_page'
|
37 |
-
);
|
38 |
|
39 |
-
$popmake_tools_page = add_submenu_page(
|
40 |
-
'edit.php?post_type=popup',
|
41 |
-
__( 'Tools', 'popup-maker' ),
|
42 |
-
__( 'Tools', 'popup-maker' ),
|
43 |
-
apply_filters( 'popmake_admin_submenu_tools_capability', 'manage_options' ),
|
44 |
-
'tools',
|
45 |
-
'popmake_tools_page'
|
46 |
-
);
|
47 |
|
48 |
-
$popmake_extensions_page = add_submenu_page(
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
apply_filters( 'popmake_admin_submenu_extensions_capability', 'edit_posts' ),
|
53 |
-
'pum-extensions',
|
54 |
-
'popmake_extensions_page'
|
55 |
-
);
|
56 |
-
|
57 |
-
$popmake_appearance_themes_page = add_theme_page(
|
58 |
-
__( 'Popup Themes', 'popup-maker' ),
|
59 |
-
__( 'Popup Themes', 'popup-maker' ),
|
60 |
-
'edit_posts',
|
61 |
-
'edit.php?post_type=popup_theme'
|
62 |
-
);}
|
63 |
|
64 |
add_action( 'admin_menu', 'popmake_admin_submenu_pages' );
|
65 |
|
@@ -160,15 +135,28 @@ function popmake_is_admin_page() {
|
|
160 |
return false;
|
161 |
}
|
162 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
163 |
if ( 'popup' == $typenow || 'popup_theme' == $typenow ) {
|
164 |
return true;
|
165 |
}
|
166 |
-
|
167 |
$popmake_admin_pages = apply_filters( 'popmake_admin_pages', array(
|
168 |
$popmake_popup_themes_page,
|
169 |
$popmake_settings_page,
|
170 |
$popmake_tools_page,
|
171 |
-
$popmake_extensions_page
|
172 |
) );
|
173 |
|
174 |
// TODO Replace this whole function using the global $hook_suffix which is what add_submenu_page returns.
|
27 |
function popmake_admin_submenu_pages() {
|
28 |
global $popmake_settings_page, $popmake_tools_page, $popmake_extensions_page;
|
29 |
|
30 |
+
$popmake_settings_page = add_submenu_page( 'edit.php?post_type=popup', __( 'Settings', 'popup-maker' ), __( 'Settings', 'popup-maker' ), apply_filters( 'popmake_admin_submenu_settings_capability', 'manage_options' ), 'settings', 'popmake_settings_page' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
|
32 |
+
$popmake_tools_page = add_submenu_page( 'edit.php?post_type=popup', __( 'Tools', 'popup-maker' ), __( 'Tools', 'popup-maker' ), apply_filters( 'popmake_admin_submenu_tools_capability', 'manage_options' ), 'tools', 'popmake_tools_page' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
|
34 |
+
$popmake_extensions_page = add_submenu_page( 'edit.php?post_type=popup', __( 'Extend', 'popup-maker' ), __( 'Extend', 'popup-maker' ), apply_filters( 'popmake_admin_submenu_extensions_capability', 'edit_posts' ), 'pum-extensions', 'popmake_extensions_page' );
|
35 |
+
|
36 |
+
$popmake_appearance_themes_page = add_theme_page( __( 'Popup Themes', 'popup-maker' ), __( 'Popup Themes', 'popup-maker' ), 'edit_posts', 'edit.php?post_type=popup_theme' );
|
37 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
|
39 |
add_action( 'admin_menu', 'popmake_admin_submenu_pages' );
|
40 |
|
135 |
return false;
|
136 |
}
|
137 |
|
138 |
+
// when editing pages, $typenow isn't set until later!
|
139 |
+
if ( empty( $typenow ) ) {
|
140 |
+
// try to pick it up from the query string
|
141 |
+
if ( ! empty( $_GET['post'] ) ) {
|
142 |
+
$post = get_post( $_GET['post'] );
|
143 |
+
$typenow = $post->post_type;
|
144 |
+
} // try to pick it up from the quick edit AJAX post
|
145 |
+
elseif ( ! empty( $_POST['post_ID'] ) ) {
|
146 |
+
$post = get_post( $_POST['post_ID'] );
|
147 |
+
$typenow = $post->post_type;
|
148 |
+
}
|
149 |
+
}
|
150 |
+
|
151 |
if ( 'popup' == $typenow || 'popup_theme' == $typenow ) {
|
152 |
return true;
|
153 |
}
|
154 |
+
|
155 |
$popmake_admin_pages = apply_filters( 'popmake_admin_pages', array(
|
156 |
$popmake_popup_themes_page,
|
157 |
$popmake_settings_page,
|
158 |
$popmake_tools_page,
|
159 |
+
$popmake_extensions_page,
|
160 |
) );
|
161 |
|
162 |
// TODO Replace this whole function using the global $hook_suffix which is what add_submenu_page returns.
|
includes/admin/popups/metabox-display-fields.php
CHANGED
@@ -288,27 +288,28 @@ function popmake_admin_popup_form_display_tab_settings_position( $popup_id ) {
|
|
288 |
</td>
|
289 |
</tr>
|
290 |
<tr>
|
291 |
-
<th scope="row">
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
<
|
|
|
305 |
</td>
|
306 |
</tr>
|
307 |
<tr>
|
308 |
<th scope="row"><?php _e( 'Fixed Postioning', 'popup-maker' ); ?></th>
|
309 |
<td><?php
|
310 |
$position_fixed = popmake_get_popup_display( $popup_id, 'position_fixed', false );
|
311 |
-
switch( $position_fixed ) {
|
312 |
case 'true':
|
313 |
case true:
|
314 |
case 1:
|
@@ -322,6 +323,23 @@ function popmake_admin_popup_form_display_tab_settings_position( $popup_id ) {
|
|
322 |
<label for="popup_display_position_fixed" class="description"><?php _e( 'Checking this sets the positioning of the popup to fixed.', 'popup-maker' ); ?></label>
|
323 |
</td>
|
324 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
325 |
<tr class="top">
|
326 |
<th scope="row">
|
327 |
<label for="popup_display_position_top"><?php _e( 'Top', 'popup-maker' ); ?></label>
|
@@ -394,7 +412,7 @@ function popmake_admin_popup_form_display_tab_settings_position( $popup_id ) {
|
|
394 |
step="1"
|
395 |
/>
|
396 |
<span class="range-value-unit regular-text">px</span>
|
397 |
-
|
398 |
<p class="description"><?php printf( _x( 'Distance from the %s edge of the screen.', 'Screen Edge: top, bottom', 'popup-maker' ), strtolower( __( 'Right', 'popup-maker' ) ) ); ?></p>
|
399 |
</td>
|
400 |
</tr><?php
|
288 |
</td>
|
289 |
</tr>
|
290 |
<tr>
|
291 |
+
<th scope="row"><?php _e( 'Disable Repositioning', 'popup-maker' ); ?></th>
|
292 |
+
<td><?php
|
293 |
+
$disable_reposition = popmake_get_popup_display( $popup_id, 'disable_reposition', false );
|
294 |
+
switch ( $disable_reposition ) {
|
295 |
+
case 'true':
|
296 |
+
case true:
|
297 |
+
case 1:
|
298 |
+
$disable_reposition = true;
|
299 |
+
break;
|
300 |
+
default:
|
301 |
+
$disable_reposition = false;
|
302 |
+
break;
|
303 |
+
} ?>
|
304 |
+
<input type="checkbox" value="1" name="popup_display_disable_reposition" id="popup_display_disable_reposition" <?php checked( $disable_reposition, 1 ); ?>/>
|
305 |
+
<label for="popup_display_disable_reposition" class="description"><?php _e( 'This will disable automatic repositioning of the popup on window resizing.', 'popup-maker' ); ?></label>
|
306 |
</td>
|
307 |
</tr>
|
308 |
<tr>
|
309 |
<th scope="row"><?php _e( 'Fixed Postioning', 'popup-maker' ); ?></th>
|
310 |
<td><?php
|
311 |
$position_fixed = popmake_get_popup_display( $popup_id, 'position_fixed', false );
|
312 |
+
switch ( $position_fixed ) {
|
313 |
case 'true':
|
314 |
case true:
|
315 |
case 1:
|
323 |
<label for="popup_display_position_fixed" class="description"><?php _e( 'Checking this sets the positioning of the popup to fixed.', 'popup-maker' ); ?></label>
|
324 |
</td>
|
325 |
</tr>
|
326 |
+
<tr>
|
327 |
+
<th scope="row">
|
328 |
+
<label for="popup_display_location"><?php _e( 'Location', 'popup-maker' ); ?></label>
|
329 |
+
</th>
|
330 |
+
<td>
|
331 |
+
<select name="popup_display_location" id="popup_display_location">
|
332 |
+
<?php foreach ( apply_filters( 'popmake_popup_display_location_options', array() ) as $option => $value ) : ?>
|
333 |
+
<option
|
334 |
+
value="<?php echo $value; ?>"
|
335 |
+
<?php echo $value == popmake_get_popup_display( $popup_id, 'location' ) ? ' selected="selected"' : ''; ?>
|
336 |
+
><?php echo $option; ?></option>
|
337 |
+
<?php endforeach ?>
|
338 |
+
</select>
|
339 |
+
|
340 |
+
<p class="description"><?php _e( 'Choose where the popup will be displayed.', 'popup-maker' ); ?></p>
|
341 |
+
</td>
|
342 |
+
</tr>
|
343 |
<tr class="top">
|
344 |
<th scope="row">
|
345 |
<label for="popup_display_position_top"><?php _e( 'Top', 'popup-maker' ); ?></label>
|
412 |
step="1"
|
413 |
/>
|
414 |
<span class="range-value-unit regular-text">px</span>
|
415 |
+
|
416 |
<p class="description"><?php printf( _x( 'Distance from the %s edge of the screen.', 'Screen Edge: top, bottom', 'popup-maker' ), strtolower( __( 'Right', 'popup-maker' ) ) ); ?></p>
|
417 |
</td>
|
418 |
</tr><?php
|
includes/class-popmake-popup-fields.php
CHANGED
@@ -119,6 +119,13 @@ class Popmake_Popup_Fields extends Popmake_Fields {
|
|
119 |
'std' => false,
|
120 |
'priority' => 12,
|
121 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
'position_fixed' => array(
|
123 |
'label' => __( 'Fixed Postioning', 'popup-maker' ),
|
124 |
'description' => __( 'Checking this sets the positioning of the popup to fixed.', 'popup-maker' ),
|
119 |
'std' => false,
|
120 |
'priority' => 12,
|
121 |
),
|
122 |
+
'disable_reposition' => array(
|
123 |
+
'label' => __( 'Disable Repositioning', 'popup-maker' ),
|
124 |
+
'description' => __( 'This will disable automatic repositioning of the popup on window resizing.', 'popup-maker' ),
|
125 |
+
'type' => 'checkbox',
|
126 |
+
'std' => false,
|
127 |
+
'priority' => 13,
|
128 |
+
),
|
129 |
'position_fixed' => array(
|
130 |
'label' => __( 'Fixed Postioning', 'popup-maker' ),
|
131 |
'description' => __( 'Checking this sets the positioning of the popup to fixed.', 'popup-maker' ),
|
includes/class-pum-ajax.php
CHANGED
@@ -26,12 +26,35 @@ class PUM_Ajax {
|
|
26 |
* Creates and returns a 1x1 tracking gif to the browser.
|
27 |
*/
|
28 |
public static function serve_pixel() {
|
29 |
-
$gif =
|
30 |
header( 'Content-Type: image/gif' );
|
31 |
header( 'Content-Length: ' . strlen( $gif ) );
|
32 |
exit( $gif );
|
33 |
}
|
34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
/**
|
36 |
* Serves a proper json response.
|
37 |
*
|
26 |
* Creates and returns a 1x1 tracking gif to the browser.
|
27 |
*/
|
28 |
public static function serve_pixel() {
|
29 |
+
$gif = static::get_file( POPMAKE_DIR . 'assets/images/beacon.gif' );
|
30 |
header( 'Content-Type: image/gif' );
|
31 |
header( 'Content-Length: ' . strlen( $gif ) );
|
32 |
exit( $gif );
|
33 |
}
|
34 |
|
35 |
+
public static function get_file( $path ) {
|
36 |
+
|
37 |
+
if ( function_exists( 'realpath' ) ) {
|
38 |
+
$path = realpath( $path );
|
39 |
+
}
|
40 |
+
|
41 |
+
if ( ! $path || ! @is_file( $path ) ) {
|
42 |
+
return '';
|
43 |
+
}
|
44 |
+
|
45 |
+
return @file_get_contents( $path );
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Returns a 204 no content header.
|
50 |
+
*/
|
51 |
+
public static function serve_no_content() {
|
52 |
+
header( "HTTP/1.0 204 No Content" );
|
53 |
+
header( 'Content-Type: image/gif' );
|
54 |
+
header( 'Content-Length: 0' );
|
55 |
+
exit;
|
56 |
+
}
|
57 |
+
|
58 |
/**
|
59 |
* Serves a proper json response.
|
60 |
*
|
includes/class-pum-analytics.php
CHANGED
@@ -48,16 +48,27 @@ class PUM_Analytics {
|
|
48 |
|
49 |
$args = wp_parse_args( $_REQUEST, array(
|
50 |
'type' => null,
|
51 |
-
'method' =>
|
52 |
) );
|
53 |
|
54 |
if ( has_action( 'pum_analytics_' . $args['type'] ) ) {
|
55 |
do_action( 'pum_analytics_' . $_REQUEST['type'] );
|
56 |
}
|
57 |
|
58 |
-
|
59 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
}
|
|
|
61 |
}
|
62 |
|
63 |
public function track_open() {
|
48 |
|
49 |
$args = wp_parse_args( $_REQUEST, array(
|
50 |
'type' => null,
|
51 |
+
'method' => null,
|
52 |
) );
|
53 |
|
54 |
if ( has_action( 'pum_analytics_' . $args['type'] ) ) {
|
55 |
do_action( 'pum_analytics_' . $_REQUEST['type'] );
|
56 |
}
|
57 |
|
58 |
+
switch ( $args['method'] ) {
|
59 |
+
case 'image':
|
60 |
+
PUM_Ajax::serve_pixel();
|
61 |
+
break;
|
62 |
+
|
63 |
+
case 'json':
|
64 |
+
PUM_Ajax::serve_json();
|
65 |
+
break;
|
66 |
+
|
67 |
+
default:
|
68 |
+
PUM_Ajax::serve_no_content();
|
69 |
+
break;
|
70 |
}
|
71 |
+
|
72 |
}
|
73 |
|
74 |
public function track_open() {
|
includes/class-pum-condition-callbacks.php
CHANGED
@@ -7,6 +7,8 @@
|
|
7 |
class PUM_Condition_Callbacks {
|
8 |
|
9 |
/**
|
|
|
|
|
10 |
* @param array $settings
|
11 |
*
|
12 |
* @return bool
|
@@ -16,8 +18,11 @@ class PUM_Condition_Callbacks {
|
|
16 |
|
17 |
$target = explode( '_', $settings['target'] );
|
18 |
|
19 |
-
|
20 |
-
$modifier
|
|
|
|
|
|
|
21 |
|
22 |
switch ( $modifier ) {
|
23 |
case 'all':
|
@@ -33,28 +38,42 @@ class PUM_Condition_Callbacks {
|
|
33 |
return true;
|
34 |
}
|
35 |
break;
|
|
|
|
|
|
|
|
|
|
|
36 |
}
|
37 |
|
38 |
return false;
|
39 |
}
|
40 |
|
41 |
/**
|
|
|
|
|
42 |
* @param array $settings
|
43 |
*
|
44 |
* @return bool
|
45 |
*/
|
46 |
public static function taxonomy( $settings = array() ) {
|
47 |
|
48 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
return self::category( $settings );
|
50 |
-
} elseif (
|
51 |
return self::post_tag( $settings );
|
52 |
}
|
53 |
|
54 |
-
$taxonomy = str_replace( array( 'tax_', '_all', '_selected' ), array( '', '', '' ), $settings['target'] );
|
55 |
-
|
56 |
-
$modifier = str_replace( "tax_{$taxonomy}_", '', $settings['target'] );
|
57 |
-
|
58 |
switch ( $modifier ) {
|
59 |
case 'all':
|
60 |
if ( is_tax( $taxonomy ) ) {
|
@@ -74,23 +93,28 @@ class PUM_Condition_Callbacks {
|
|
74 |
}
|
75 |
|
76 |
/**
|
|
|
|
|
77 |
* @param array $settings
|
78 |
*
|
79 |
* @return bool
|
80 |
*/
|
81 |
-
public static function
|
82 |
|
83 |
-
$
|
|
|
|
|
|
|
84 |
|
85 |
switch ( $modifier ) {
|
86 |
case 'all':
|
87 |
-
if (
|
88 |
return true;
|
89 |
}
|
90 |
break;
|
91 |
|
92 |
case 'selected':
|
93 |
-
if (
|
94 |
return true;
|
95 |
}
|
96 |
break;
|
@@ -100,23 +124,28 @@ class PUM_Condition_Callbacks {
|
|
100 |
}
|
101 |
|
102 |
/**
|
|
|
|
|
103 |
* @param array $settings
|
104 |
*
|
105 |
* @return bool
|
106 |
*/
|
107 |
-
public static function
|
|
|
|
|
108 |
|
109 |
-
|
|
|
110 |
|
111 |
switch ( $modifier ) {
|
112 |
case 'all':
|
113 |
-
if (
|
114 |
return true;
|
115 |
}
|
116 |
break;
|
117 |
|
118 |
case 'selected':
|
119 |
-
if (
|
120 |
return true;
|
121 |
}
|
122 |
break;
|
@@ -126,115 +155,72 @@ class PUM_Condition_Callbacks {
|
|
126 |
}
|
127 |
|
128 |
/**
|
|
|
|
|
129 |
* @param array $settings
|
130 |
*
|
131 |
* @return bool
|
132 |
*/
|
133 |
public static function post_type_tax( $settings = array() ) {
|
134 |
|
135 |
-
|
136 |
-
return self::post_type_category( $settings );
|
137 |
-
} elseif ( strpos( $settings['target'], '_w_post_tag' ) !== false || strpos( $settings['target'], '_wp_post_tag' ) !== false ) {
|
138 |
-
return self::post_type_tag( $settings );
|
139 |
-
}
|
140 |
|
141 |
-
|
142 |
-
|
143 |
-
$w_wo = 'w';
|
144 |
-
} elseif ( strpos( $settings['target'], '_wo_' ) ) {
|
145 |
-
$target = explode( '_wo_', $settings['target'] );
|
146 |
-
$w_wo = 'wo';
|
147 |
-
} else {
|
148 |
-
return false;
|
149 |
-
}
|
150 |
|
151 |
-
|
152 |
-
$taxonomy
|
153 |
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
break;
|
160 |
|
161 |
-
|
162 |
-
|
163 |
-
return true;
|
164 |
-
}
|
165 |
-
break;
|
166 |
}
|
167 |
|
168 |
return false;
|
169 |
}
|
170 |
|
171 |
/**
|
|
|
|
|
172 |
* @param array $settings
|
173 |
*
|
174 |
* @return bool
|
175 |
*/
|
176 |
public static function post_type_category( $settings = array() ) {
|
177 |
|
178 |
-
|
179 |
-
$target = explode( '_w_', $settings['target'] );
|
180 |
-
$w_wo = 'w';
|
181 |
-
} elseif ( strpos( $settings['target'], '_wo_' ) ) {
|
182 |
-
$target = explode( '_wo_', $settings['target'] );
|
183 |
-
$w_wo = 'wo';
|
184 |
-
} else {
|
185 |
-
return false;
|
186 |
-
}
|
187 |
|
188 |
-
|
|
|
189 |
|
190 |
-
|
191 |
-
|
192 |
-
if ( is_singular( $post_type ) && has_category( wp_parse_id_list( $settings['selected'] ) ) ) {
|
193 |
-
return true;
|
194 |
-
}
|
195 |
-
break;
|
196 |
-
|
197 |
-
case 'wo':
|
198 |
-
if ( is_singular( $post_type ) && ! has_category( wp_parse_id_list( $settings['selected'] ) ) ) {
|
199 |
-
return true;
|
200 |
-
}
|
201 |
-
break;
|
202 |
}
|
203 |
|
204 |
return false;
|
205 |
}
|
206 |
|
207 |
/**
|
|
|
|
|
208 |
* @param array $settings
|
209 |
*
|
210 |
* @return bool
|
211 |
*/
|
212 |
public static function post_type_tag( $settings = array() ) {
|
213 |
|
214 |
-
|
215 |
-
$target = explode( '_w_', $settings['target'] );
|
216 |
-
$w_wo = 'w';
|
217 |
-
} elseif ( strpos( $settings['target'], '_wo_' ) ) {
|
218 |
-
$target = explode( '_wo_', $settings['target'] );
|
219 |
-
$w_wo = 'wo';
|
220 |
-
} else {
|
221 |
-
return false;
|
222 |
-
}
|
223 |
|
224 |
-
|
|
|
225 |
|
226 |
-
|
227 |
-
|
228 |
-
if ( is_singular( $post_type ) && has_tag( wp_parse_id_list( $settings['selected'] ) ) ) {
|
229 |
-
return true;
|
230 |
-
}
|
231 |
-
break;
|
232 |
-
|
233 |
-
case 'wo':
|
234 |
-
if ( is_singular( $post_type ) && ! has_tag( wp_parse_id_list( $settings['selected'] ) ) ) {
|
235 |
-
return true;
|
236 |
-
}
|
237 |
-
break;
|
238 |
}
|
239 |
|
240 |
return false;
|
7 |
class PUM_Condition_Callbacks {
|
8 |
|
9 |
/**
|
10 |
+
* Checks if this is one of the selected post_type items.
|
11 |
+
*
|
12 |
* @param array $settings
|
13 |
*
|
14 |
* @return bool
|
18 |
|
19 |
$target = explode( '_', $settings['target'] );
|
20 |
|
21 |
+
// Modifier should be the last key.
|
22 |
+
$modifier = array_pop( $target );
|
23 |
+
|
24 |
+
// Post type is the remaining keys combined.
|
25 |
+
$post_type = implode( '_', $target );
|
26 |
|
27 |
switch ( $modifier ) {
|
28 |
case 'all':
|
38 |
return true;
|
39 |
}
|
40 |
break;
|
41 |
+
case 'template':
|
42 |
+
if ( is_page() && is_page_template( $settings['selected'] ) ) {
|
43 |
+
return true;
|
44 |
+
}
|
45 |
+
break;
|
46 |
}
|
47 |
|
48 |
return false;
|
49 |
}
|
50 |
|
51 |
/**
|
52 |
+
* Checks if this is one of the selected taxonomy term.
|
53 |
+
*
|
54 |
* @param array $settings
|
55 |
*
|
56 |
* @return bool
|
57 |
*/
|
58 |
public static function taxonomy( $settings = array() ) {
|
59 |
|
60 |
+
$target = explode( '_', $settings['target'] );
|
61 |
+
|
62 |
+
// Remove the tax_ prefix.
|
63 |
+
array_shift( $target );
|
64 |
+
|
65 |
+
// Assign the last key as the modifier _all, _selected
|
66 |
+
$modifier = array_pop( $target );
|
67 |
+
|
68 |
+
// Whatever is left is the taxonomy.
|
69 |
+
$taxonomy = implode( '_', $target );
|
70 |
+
|
71 |
+
if ( $taxonomy == 'category' ) {
|
72 |
return self::category( $settings );
|
73 |
+
} elseif ( $taxonomy == 'post_tag' ) {
|
74 |
return self::post_tag( $settings );
|
75 |
}
|
76 |
|
|
|
|
|
|
|
|
|
77 |
switch ( $modifier ) {
|
78 |
case 'all':
|
79 |
if ( is_tax( $taxonomy ) ) {
|
93 |
}
|
94 |
|
95 |
/**
|
96 |
+
* Checks if this is one of the selected categories.
|
97 |
+
*
|
98 |
* @param array $settings
|
99 |
*
|
100 |
* @return bool
|
101 |
*/
|
102 |
+
public static function category( $settings = array() ) {
|
103 |
|
104 |
+
$target = explode( '_', $settings['target'] );
|
105 |
+
|
106 |
+
// Assign the last key as the modifier _all, _selected
|
107 |
+
$modifier = array_pop( $target );
|
108 |
|
109 |
switch ( $modifier ) {
|
110 |
case 'all':
|
111 |
+
if ( is_category() ) {
|
112 |
return true;
|
113 |
}
|
114 |
break;
|
115 |
|
116 |
case 'selected':
|
117 |
+
if ( is_category( wp_parse_id_list( $settings['selected'] ) ) ) {
|
118 |
return true;
|
119 |
}
|
120 |
break;
|
124 |
}
|
125 |
|
126 |
/**
|
127 |
+
* Checks if this is one of the selected tags.
|
128 |
+
*
|
129 |
* @param array $settings
|
130 |
*
|
131 |
* @return bool
|
132 |
*/
|
133 |
+
public static function post_tag( $settings = array() ) {
|
134 |
+
|
135 |
+
$target = explode( '_', $settings['target'] );
|
136 |
|
137 |
+
// Assign the last key as the modifier _all, _selected
|
138 |
+
$modifier = array_pop( $target );
|
139 |
|
140 |
switch ( $modifier ) {
|
141 |
case 'all':
|
142 |
+
if ( is_tag() ) {
|
143 |
return true;
|
144 |
}
|
145 |
break;
|
146 |
|
147 |
case 'selected':
|
148 |
+
if ( is_tag( wp_parse_id_list( $settings['selected'] ) ) ) {
|
149 |
return true;
|
150 |
}
|
151 |
break;
|
155 |
}
|
156 |
|
157 |
/**
|
158 |
+
* Checks if the post_type has the selected categories.
|
159 |
+
*
|
160 |
* @param array $settings
|
161 |
*
|
162 |
* @return bool
|
163 |
*/
|
164 |
public static function post_type_tax( $settings = array() ) {
|
165 |
|
166 |
+
$target = explode( '_w_', $settings['target'] );
|
|
|
|
|
|
|
|
|
167 |
|
168 |
+
// First key is the post type.
|
169 |
+
$post_type = array_shift( $target );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
170 |
|
171 |
+
// Last Key is the taxonomy
|
172 |
+
$taxonomy = array_pop( $target );
|
173 |
|
174 |
+
if ( $taxonomy == 'category' ) {
|
175 |
+
return self::post_type_category( $settings );
|
176 |
+
} elseif ( $taxonomy == 'post_tag' ) {
|
177 |
+
return self::post_type_tag( $settings );
|
178 |
+
}
|
|
|
179 |
|
180 |
+
if ( is_singular( $post_type ) && has_term( wp_parse_id_list( $settings['selected'] ), $taxonomy ) ) {
|
181 |
+
return true;
|
|
|
|
|
|
|
182 |
}
|
183 |
|
184 |
return false;
|
185 |
}
|
186 |
|
187 |
/**
|
188 |
+
* Checks if the post_type has the selected categories.
|
189 |
+
*
|
190 |
* @param array $settings
|
191 |
*
|
192 |
* @return bool
|
193 |
*/
|
194 |
public static function post_type_category( $settings = array() ) {
|
195 |
|
196 |
+
$target = explode( '_w_', $settings['target'] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
197 |
|
198 |
+
// First key is the post type.
|
199 |
+
$post_type = array_shift( $target );
|
200 |
|
201 |
+
if ( is_singular( $post_type ) && has_category( wp_parse_id_list( $settings['selected'] ) ) ) {
|
202 |
+
return true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
203 |
}
|
204 |
|
205 |
return false;
|
206 |
}
|
207 |
|
208 |
/**
|
209 |
+
* Checks is a post_type has the selected tags.
|
210 |
+
*
|
211 |
* @param array $settings
|
212 |
*
|
213 |
* @return bool
|
214 |
*/
|
215 |
public static function post_type_tag( $settings = array() ) {
|
216 |
|
217 |
+
$target = explode( '_w_', $settings['target'] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
218 |
|
219 |
+
// First key is the post type.
|
220 |
+
$post_type = array_shift( $target );
|
221 |
|
222 |
+
if ( is_singular( $post_type ) && has_tag( wp_parse_id_list( $settings['selected'] ) ) ) {
|
223 |
+
return true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
224 |
}
|
225 |
|
226 |
return false;
|
includes/class-pum-freemius.php
CHANGED
@@ -66,11 +66,6 @@ class PUM_Freemius {
|
|
66 |
'account' => false,
|
67 |
'support' => true,
|
68 |
),
|
69 |
-
/*
|
70 |
-
'permissions' => array(
|
71 |
-
'newsletter' => true,
|
72 |
-
)
|
73 |
-
*/
|
74 |
) );
|
75 |
}
|
76 |
|
@@ -88,7 +83,7 @@ class PUM_Freemius {
|
|
88 |
//$this->fs()->add_filter( 'permission_list', array( $this, 'permission_list' ) );
|
89 |
|
90 |
$this->fs()->add_action( 'after_account_connection', array( $this, 'account_connection' ), 10, 2 );
|
91 |
-
$this->fs()->add_action( '
|
92 |
}
|
93 |
|
94 |
|
66 |
'account' => false,
|
67 |
'support' => true,
|
68 |
),
|
|
|
|
|
|
|
|
|
|
|
69 |
) );
|
70 |
}
|
71 |
|
83 |
//$this->fs()->add_filter( 'permission_list', array( $this, 'permission_list' ) );
|
84 |
|
85 |
$this->fs()->add_action( 'after_account_connection', array( $this, 'account_connection' ), 10, 2 );
|
86 |
+
$this->fs()->add_action( 'after_sync_cron', array( $this, 'plan_sync' ), 10, 2 );
|
87 |
}
|
88 |
|
89 |
|
includes/class-pum-popup.php
CHANGED
@@ -294,6 +294,24 @@ if ( ! class_exists( 'PUM_Popup' ) ) {
|
|
294 |
if ( ! $this->conditions ) {
|
295 |
$this->conditions = array();
|
296 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
297 |
}
|
298 |
|
299 |
return apply_filters( 'pum_popup_get_conditions', $this->conditions, $this->ID );
|
294 |
if ( ! $this->conditions ) {
|
295 |
$this->conditions = array();
|
296 |
}
|
297 |
+
|
298 |
+
// Sanity Check on the values not operand value.
|
299 |
+
foreach ( $this->conditions as $group_key => $group ) {
|
300 |
+
|
301 |
+
foreach ( $group as $key => $condition ) {
|
302 |
+
|
303 |
+
// The condition target doesn't exist. Lets ignore this condition.
|
304 |
+
if ( empty( $condition['target'] ) ) {
|
305 |
+
unset( $this->conditions[ $group_key ][ $key ] );
|
306 |
+
continue;
|
307 |
+
}
|
308 |
+
|
309 |
+
// The not operand value is missing, set it to false.
|
310 |
+
if ( ! isset ( $condition['not_operand'] ) ) {
|
311 |
+
$this->conditions[ $group_key ][ $key ]['not_operand'] = false;
|
312 |
+
}
|
313 |
+
}
|
314 |
+
}
|
315 |
}
|
316 |
|
317 |
return apply_filters( 'pum_popup_get_conditions', $this->conditions, $this->ID );
|
includes/class-pum.php
CHANGED
@@ -7,7 +7,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
7 |
|
8 |
class PUM {
|
9 |
|
10 |
-
const VER = '1.4.
|
11 |
|
12 |
const DB_VER = 6;
|
13 |
|
7 |
|
8 |
class PUM {
|
9 |
|
10 |
+
const VER = '1.4.16';
|
11 |
|
12 |
const DB_VER = 6;
|
13 |
|
includes/defaults.php
CHANGED
@@ -22,6 +22,7 @@ function popmake_popup_display_defaults( $defaults = array() ) {
|
|
22 |
'stackable' => false,
|
23 |
'overlay_disabled' => false,
|
24 |
'scrollable_content' => false,
|
|
|
25 |
'size' => 'medium',
|
26 |
'responsive_min_width' => '',
|
27 |
'responsive_min_width_unit' => 'px',
|
@@ -29,10 +30,9 @@ function popmake_popup_display_defaults( $defaults = array() ) {
|
|
29 |
'responsive_max_width_unit' => 'px',
|
30 |
'custom_width' => 640,
|
31 |
'custom_width_unit' => 'px',
|
32 |
-
'custom_width_unit' => 'px',
|
33 |
'custom_height' => 380,
|
34 |
'custom_height_unit' => 'px',
|
35 |
-
'custom_height_auto' =>
|
36 |
'location' => 'center top',
|
37 |
'position_top' => 100,
|
38 |
'position_left' => 0,
|
22 |
'stackable' => false,
|
23 |
'overlay_disabled' => false,
|
24 |
'scrollable_content' => false,
|
25 |
+
'disable_reposition' => false,
|
26 |
'size' => 'medium',
|
27 |
'responsive_min_width' => '',
|
28 |
'responsive_min_width_unit' => 'px',
|
30 |
'responsive_max_width_unit' => 'px',
|
31 |
'custom_width' => 640,
|
32 |
'custom_width_unit' => 'px',
|
|
|
33 |
'custom_height' => 380,
|
34 |
'custom_height_unit' => 'px',
|
35 |
+
'custom_height_auto' => false,
|
36 |
'location' => 'center top',
|
37 |
'position_top' => 100,
|
38 |
'position_left' => 0,
|
includes/integrations/visual-composer.php
CHANGED
@@ -6,20 +6,31 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
6 |
}
|
7 |
|
8 |
final class Popmake_VisualComposer_Integration {
|
|
|
9 |
public static function init() {
|
10 |
-
add_filter( 'popmake_popup_post_type_args', array( __CLASS__, 'popup_post_type_args' )
|
|
|
11 |
}
|
12 |
|
13 |
public static function popup_post_type_args( $popup_args ) {
|
14 |
if ( defined( 'WPB_VC_VERSION' ) || ( ! empty( $_GET['page'] ) && in_array( $_GET['page'], array( 'fl-builder-settings' ) ) ) ) {
|
15 |
-
$popup_args['public']
|
16 |
$popup_args['exclude_from_search'] = true;
|
17 |
-
$popup_args['publicly_queryable']
|
18 |
-
$popup_args['show_in_nav_menus']
|
19 |
}
|
20 |
|
21 |
return $popup_args;
|
22 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
}
|
24 |
|
25 |
Popmake_VisualComposer_Integration::init();
|
6 |
}
|
7 |
|
8 |
final class Popmake_VisualComposer_Integration {
|
9 |
+
|
10 |
public static function init() {
|
11 |
+
add_filter( 'popmake_popup_post_type_args', array( __CLASS__, 'popup_post_type_args' ) );
|
12 |
+
add_action( 'admin_init', array( __CLASS__, 'force_enable_vc' ) );
|
13 |
}
|
14 |
|
15 |
public static function popup_post_type_args( $popup_args ) {
|
16 |
if ( defined( 'WPB_VC_VERSION' ) || ( ! empty( $_GET['page'] ) && in_array( $_GET['page'], array( 'fl-builder-settings' ) ) ) ) {
|
17 |
+
$popup_args['public'] = true;
|
18 |
$popup_args['exclude_from_search'] = true;
|
19 |
+
$popup_args['publicly_queryable'] = true;
|
20 |
+
$popup_args['show_in_nav_menus'] = false;
|
21 |
}
|
22 |
|
23 |
return $popup_args;
|
24 |
}
|
25 |
+
|
26 |
+
public static function force_enable_vc() {
|
27 |
+
if ( popmake_is_admin_popup_page() ) {
|
28 |
+
add_filter( 'vc_role_access_with_post_types_get_state', '__return_true' );
|
29 |
+
add_filter( 'vc_role_access_with_backend_editor_get_state', '__return_true' );
|
30 |
+
add_filter( 'vc_role_access_with_frontend_editor_get_state', '__return_false' );
|
31 |
+
add_filter( 'vc_check_post_type_validation', '__return_true' );
|
32 |
+
}
|
33 |
+
}
|
34 |
}
|
35 |
|
36 |
Popmake_VisualComposer_Integration::init();
|
includes/libs/freemius/includes/class-freemius.php
CHANGED
@@ -1805,7 +1805,7 @@
|
|
1805 |
|
1806 |
$active_plugin = self::get_active_plugins();
|
1807 |
|
1808 |
-
// Generate the list of active plugins separated by new line.
|
1809 |
$active_plugin_string = '';
|
1810 |
foreach ( $active_plugin as $plugin ) {
|
1811 |
$active_plugin_string .= sprintf(
|
@@ -2740,6 +2740,8 @@
|
|
2740 |
// Sync add-ons collection.
|
2741 |
$this->_sync_addons( true );
|
2742 |
}
|
|
|
|
|
2743 |
}
|
2744 |
|
2745 |
/**
|
@@ -4087,7 +4089,17 @@
|
|
4087 |
if ( ! isset( $this->_plugin_data ) ) {
|
4088 |
self::require_plugin_essentials();
|
4089 |
|
4090 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4091 |
}
|
4092 |
|
4093 |
return $this->_plugin_data;
|
1805 |
|
1806 |
$active_plugin = self::get_active_plugins();
|
1807 |
|
1808 |
+
// Generate the list of active plugins separated by new line.
|
1809 |
$active_plugin_string = '';
|
1810 |
foreach ( $active_plugin as $plugin ) {
|
1811 |
$active_plugin_string .= sprintf(
|
2740 |
// Sync add-ons collection.
|
2741 |
$this->_sync_addons( true );
|
2742 |
}
|
2743 |
+
|
2744 |
+
$this->do_action( 'after_sync_cron' );
|
2745 |
}
|
2746 |
|
2747 |
/**
|
4089 |
if ( ! isset( $this->_plugin_data ) ) {
|
4090 |
self::require_plugin_essentials();
|
4091 |
|
4092 |
+
/**
|
4093 |
+
* @author Vova Feldman (@svovaf)
|
4094 |
+
* @since 1.2.0 When using get_plugin_data() do NOT translate plugin data.
|
4095 |
+
*
|
4096 |
+
* @link https://github.com/Freemius/wordpress-sdk/issues/77
|
4097 |
+
*/
|
4098 |
+
$this->_plugin_data = get_plugin_data(
|
4099 |
+
$this->_plugin_main_file_path,
|
4100 |
+
false,
|
4101 |
+
false
|
4102 |
+
);
|
4103 |
}
|
4104 |
|
4105 |
return $this->_plugin_data;
|
includes/pum-condition-functions.php
CHANGED
@@ -31,34 +31,24 @@ function pum_generate_post_type_conditions() {
|
|
31 |
if ( $post_type->has_archive ) {
|
32 |
$conditions[ $name . '_index' ] = array(
|
33 |
'group' => __( 'General', 'popup-maker' ),
|
34 |
-
'name' => sprintf(
|
35 |
-
_x( '%s Archive', 'condition: post type plural label ie. Posts: All', 'popup-maker' ),
|
36 |
-
$post_type->labels->name
|
37 |
-
),
|
38 |
'callback' => array( 'PUM_Condition_Callbacks', 'post_type' ),
|
39 |
'priority' => 5,
|
40 |
);
|
41 |
}
|
42 |
-
|
|
|
43 |
'group' => $post_type->labels->name,
|
44 |
-
'name' => sprintf(
|
45 |
-
_x( 'All %s', 'condition: post type plural label ie. Posts: All', 'popup-maker' ),
|
46 |
-
$post_type->labels->name
|
47 |
-
),
|
48 |
'callback' => array( 'PUM_Condition_Callbacks', 'post_type' ),
|
49 |
);
|
|
|
50 |
$conditions[ $name . '_selected' ] = array(
|
51 |
'group' => $post_type->labels->name,
|
52 |
-
'name' => sprintf(
|
53 |
-
_x( '%s: Selected', 'condition: post type plural label ie. Posts: Selected', 'popup-maker' ),
|
54 |
-
$post_type->labels->name
|
55 |
-
),
|
56 |
'fields' => array(
|
57 |
'selected' => array(
|
58 |
-
'placeholder' => sprintf(
|
59 |
-
_x( 'Select %s.', 'condition: post type plural label ie. Select Posts', 'popup-maker' ),
|
60 |
-
strtolower( $post_type->labels->name )
|
61 |
-
),
|
62 |
'type' => 'postselect',
|
63 |
'post_type' => $name,
|
64 |
'multiple' => true,
|
@@ -68,24 +58,41 @@ function pum_generate_post_type_conditions() {
|
|
68 |
),
|
69 |
'callback' => array( 'PUM_Condition_Callbacks', 'post_type' ),
|
70 |
);
|
|
|
71 |
$conditions[ $name . '_ID' ] = array(
|
72 |
'group' => $post_type->labels->name,
|
73 |
-
'name' => sprintf(
|
74 |
-
_x( '%s: ID', 'condition: post type plural label ie. Posts: ID', 'popup-maker' ),
|
75 |
-
$post_type->labels->name
|
76 |
-
),
|
77 |
'fields' => array(
|
78 |
'selected' => array(
|
79 |
-
'placeholder' => sprintf(
|
80 |
-
|
81 |
-
strtolower( $post_type->labels->singular_name )
|
82 |
-
),
|
83 |
-
'type' => 'text',
|
84 |
),
|
85 |
),
|
86 |
'callback' => array( 'PUM_Condition_Callbacks', 'post_type' ),
|
87 |
);
|
88 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
$conditions = array_merge( $conditions, pum_generate_post_type_tax_conditions( $name ) );
|
90 |
|
91 |
}
|
@@ -104,20 +111,12 @@ function pum_generate_post_type_tax_conditions( $name ) {
|
|
104 |
$conditions = array();
|
105 |
foreach ( $taxonomies as $tax_name => $taxonomy ) {
|
106 |
|
107 |
-
|
108 |
-
$conditions[ $name . '_w_' . $tax_name ] = array(
|
109 |
'group' => $post_type->labels->name,
|
110 |
-
'name' => sprintf(
|
111 |
-
_x( '%1$s: With %2$s', 'condition: post type plural and taxonomy singular label ie. Posts: With Category', 'popup-maker' ),
|
112 |
-
$post_type->labels->name,
|
113 |
-
$taxonomy->labels->singular_name
|
114 |
-
),
|
115 |
'fields' => array(
|
116 |
'selected' => array(
|
117 |
-
'placeholder' => sprintf(
|
118 |
-
_x( 'Select %s.', 'condition: post type plural label ie. Select categories', 'popup-maker' ),
|
119 |
-
strtolower( $taxonomy->labels->name )
|
120 |
-
),
|
121 |
'type' => 'taxonomyselect',
|
122 |
'taxonomy' => $tax_name,
|
123 |
'multiple' => true,
|
@@ -144,26 +143,18 @@ function pum_generate_taxonomy_conditions() {
|
|
144 |
|
145 |
foreach ( $taxonomies as $tax_name => $taxonomy ) {
|
146 |
|
147 |
-
$conditions[ 'tax_' . $tax_name . '_all' ]
|
148 |
'group' => $taxonomy->labels->name,
|
149 |
-
'name' => sprintf(
|
150 |
-
_x( '%s: All', 'condition: taxonomy plural label ie. Categories: All', 'popup-maker' ),
|
151 |
-
$taxonomy->labels->name
|
152 |
-
),
|
153 |
'callback' => array( 'PUM_Condition_Callbacks', 'taxonomy' ),
|
154 |
);
|
|
|
155 |
$conditions[ 'tax_' . $tax_name . '_selected' ] = array(
|
156 |
'group' => $taxonomy->labels->name,
|
157 |
-
'name' => sprintf(
|
158 |
-
_x( '%s: Selected', 'condition: taxonomy plural label ie. Categories: Selected', 'popup-maker' ),
|
159 |
-
$taxonomy->labels->name
|
160 |
-
),
|
161 |
'fields' => array(
|
162 |
'selected' => array(
|
163 |
-
'placeholder' => sprintf(
|
164 |
-
_x( 'Select %s.', 'condition: taxonomy plural label ie. Select Categories', 'popup-maker' ),
|
165 |
-
strtolower( $taxonomy->labels->name )
|
166 |
-
),
|
167 |
'type' => 'taxonomyselect',
|
168 |
'taxonomy' => $tax_name,
|
169 |
'multiple' => true,
|
@@ -173,19 +164,14 @@ function pum_generate_taxonomy_conditions() {
|
|
173 |
),
|
174 |
'callback' => array( 'PUM_Condition_Callbacks', 'taxonomy' ),
|
175 |
);
|
176 |
-
|
|
|
177 |
'group' => $taxonomy->labels->name,
|
178 |
-
'name' => sprintf(
|
179 |
-
_x( '%s: IDs', 'condition: taxonomy plural label ie. Categories: Selected', 'popup-maker' ),
|
180 |
-
$taxonomy->labels->name
|
181 |
-
),
|
182 |
'fields' => array(
|
183 |
'selected' => array(
|
184 |
-
'placeholder' => sprintf(
|
185 |
-
|
186 |
-
strtolower( $taxonomy->labels->singular_name )
|
187 |
-
),
|
188 |
-
'type' => 'text',
|
189 |
),
|
190 |
),
|
191 |
'callback' => array( 'PUM_Condition_Callbacks', 'taxonomy' ),
|
@@ -204,10 +190,7 @@ function pum_generate_taxonomy_conditions() {
|
|
204 |
* @return array
|
205 |
*/
|
206 |
function pum_get_conditions() {
|
207 |
-
$conditions = array_merge(
|
208 |
-
pum_generate_post_type_conditions(),
|
209 |
-
pum_generate_taxonomy_conditions()
|
210 |
-
);
|
211 |
|
212 |
$conditions['is_front_page'] = array(
|
213 |
'group' => __( 'Pages' ),
|
31 |
if ( $post_type->has_archive ) {
|
32 |
$conditions[ $name . '_index' ] = array(
|
33 |
'group' => __( 'General', 'popup-maker' ),
|
34 |
+
'name' => sprintf( _x( '%s Archive', 'condition: post type plural label ie. Posts: All', 'popup-maker' ), $post_type->labels->name ),
|
|
|
|
|
|
|
35 |
'callback' => array( 'PUM_Condition_Callbacks', 'post_type' ),
|
36 |
'priority' => 5,
|
37 |
);
|
38 |
}
|
39 |
+
|
40 |
+
$conditions[ $name . '_all' ] = array(
|
41 |
'group' => $post_type->labels->name,
|
42 |
+
'name' => sprintf( _x( 'All %s', 'condition: post type plural label ie. Posts: All', 'popup-maker' ), $post_type->labels->name ),
|
|
|
|
|
|
|
43 |
'callback' => array( 'PUM_Condition_Callbacks', 'post_type' ),
|
44 |
);
|
45 |
+
|
46 |
$conditions[ $name . '_selected' ] = array(
|
47 |
'group' => $post_type->labels->name,
|
48 |
+
'name' => sprintf( _x( '%s: Selected', 'condition: post type plural label ie. Posts: Selected', 'popup-maker' ), $post_type->labels->name ),
|
|
|
|
|
|
|
49 |
'fields' => array(
|
50 |
'selected' => array(
|
51 |
+
'placeholder' => sprintf( _x( 'Select %s.', 'condition: post type plural label ie. Select Posts', 'popup-maker' ), strtolower( $post_type->labels->name ) ),
|
|
|
|
|
|
|
52 |
'type' => 'postselect',
|
53 |
'post_type' => $name,
|
54 |
'multiple' => true,
|
58 |
),
|
59 |
'callback' => array( 'PUM_Condition_Callbacks', 'post_type' ),
|
60 |
);
|
61 |
+
|
62 |
$conditions[ $name . '_ID' ] = array(
|
63 |
'group' => $post_type->labels->name,
|
64 |
+
'name' => sprintf( _x( '%s: ID', 'condition: post type plural label ie. Posts: ID', 'popup-maker' ), $post_type->labels->name ),
|
|
|
|
|
|
|
65 |
'fields' => array(
|
66 |
'selected' => array(
|
67 |
+
'placeholder' => sprintf( _x( '%s IDs: 128, 129', 'condition: post type singular label ie. Posts IDs', 'popup-maker' ), strtolower( $post_type->labels->singular_name ) ),
|
68 |
+
'type' => 'text',
|
|
|
|
|
|
|
69 |
),
|
70 |
),
|
71 |
'callback' => array( 'PUM_Condition_Callbacks', 'post_type' ),
|
72 |
);
|
73 |
|
74 |
+
if ( $name == 'page' && ! empty( wp_get_theme()->get_page_templates() ) ) {
|
75 |
+
$conditions[ $name . '_template' ] = array(
|
76 |
+
'group' => $post_type->labels->name,
|
77 |
+
'name' => sprintf( _x( '%s: With Template', 'condition: post type plural label ie. Pages: With Template', 'popup-maker' ), $post_type->labels->name ),
|
78 |
+
'fields' => array(
|
79 |
+
'selected' => array(
|
80 |
+
'type' => 'select',
|
81 |
+
'select2' => true,
|
82 |
+
'multiple' => true,
|
83 |
+
'as_array' => true,
|
84 |
+
'options' => array_flip(
|
85 |
+
array_merge(
|
86 |
+
array( 'default' => __( 'Default', 'popup-maker' ) ),
|
87 |
+
wp_get_theme()->get_page_templates()
|
88 |
+
)
|
89 |
+
),
|
90 |
+
),
|
91 |
+
),
|
92 |
+
'callback' => array( 'PUM_Condition_Callbacks', 'post_type' ),
|
93 |
+
);
|
94 |
+
}
|
95 |
+
|
96 |
$conditions = array_merge( $conditions, pum_generate_post_type_tax_conditions( $name ) );
|
97 |
|
98 |
}
|
111 |
$conditions = array();
|
112 |
foreach ( $taxonomies as $tax_name => $taxonomy ) {
|
113 |
|
114 |
+
$conditions[ $name . '_w_' . $tax_name ] = array(
|
|
|
115 |
'group' => $post_type->labels->name,
|
116 |
+
'name' => sprintf( _x( '%1$s: With %2$s', 'condition: post type plural and taxonomy singular label ie. Posts: With Category', 'popup-maker' ), $post_type->labels->name, $taxonomy->labels->singular_name ),
|
|
|
|
|
|
|
|
|
117 |
'fields' => array(
|
118 |
'selected' => array(
|
119 |
+
'placeholder' => sprintf( _x( 'Select %s.', 'condition: post type plural label ie. Select categories', 'popup-maker' ), strtolower( $taxonomy->labels->name ) ),
|
|
|
|
|
|
|
120 |
'type' => 'taxonomyselect',
|
121 |
'taxonomy' => $tax_name,
|
122 |
'multiple' => true,
|
143 |
|
144 |
foreach ( $taxonomies as $tax_name => $taxonomy ) {
|
145 |
|
146 |
+
$conditions[ 'tax_' . $tax_name . '_all' ] = array(
|
147 |
'group' => $taxonomy->labels->name,
|
148 |
+
'name' => sprintf( _x( '%s: All', 'condition: taxonomy plural label ie. Categories: All', 'popup-maker' ), $taxonomy->labels->name ),
|
|
|
|
|
|
|
149 |
'callback' => array( 'PUM_Condition_Callbacks', 'taxonomy' ),
|
150 |
);
|
151 |
+
|
152 |
$conditions[ 'tax_' . $tax_name . '_selected' ] = array(
|
153 |
'group' => $taxonomy->labels->name,
|
154 |
+
'name' => sprintf( _x( '%s: Selected', 'condition: taxonomy plural label ie. Categories: Selected', 'popup-maker' ), $taxonomy->labels->name ),
|
|
|
|
|
|
|
155 |
'fields' => array(
|
156 |
'selected' => array(
|
157 |
+
'placeholder' => sprintf( _x( 'Select %s.', 'condition: taxonomy plural label ie. Select Categories', 'popup-maker' ), strtolower( $taxonomy->labels->name ) ),
|
|
|
|
|
|
|
158 |
'type' => 'taxonomyselect',
|
159 |
'taxonomy' => $tax_name,
|
160 |
'multiple' => true,
|
164 |
),
|
165 |
'callback' => array( 'PUM_Condition_Callbacks', 'taxonomy' ),
|
166 |
);
|
167 |
+
|
168 |
+
$conditions[ 'tax_' . $tax_name . '_ID' ] = array(
|
169 |
'group' => $taxonomy->labels->name,
|
170 |
+
'name' => sprintf( _x( '%s: IDs', 'condition: taxonomy plural label ie. Categories: Selected', 'popup-maker' ), $taxonomy->labels->name ),
|
|
|
|
|
|
|
171 |
'fields' => array(
|
172 |
'selected' => array(
|
173 |
+
'placeholder' => sprintf( _x( '%s IDs: 128, 129', 'condition: taxonomy plural label ie. Category IDs', 'popup-maker' ), strtolower( $taxonomy->labels->singular_name ) ),
|
174 |
+
'type' => 'text',
|
|
|
|
|
|
|
175 |
),
|
176 |
),
|
177 |
'callback' => array( 'PUM_Condition_Callbacks', 'taxonomy' ),
|
190 |
* @return array
|
191 |
*/
|
192 |
function pum_get_conditions() {
|
193 |
+
$conditions = array_merge( pum_generate_post_type_conditions(), pum_generate_taxonomy_conditions() );
|
|
|
|
|
|
|
194 |
|
195 |
$conditions['is_front_page'] = array(
|
196 |
'group' => __( 'Pages' ),
|
languages/popup-maker.pot
CHANGED
@@ -16,39 +16,39 @@ msgstr ""
|
|
16 |
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
17 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n\n"
|
18 |
|
19 |
-
#: includes/admin/admin-pages.php:
|
20 |
msgid "Settings"
|
21 |
msgstr ""
|
22 |
|
23 |
-
#: includes/admin/admin-pages.php:
|
24 |
msgid "Tools"
|
25 |
msgstr ""
|
26 |
|
27 |
-
#: includes/admin/admin-pages.php:
|
28 |
msgid "Extend"
|
29 |
msgstr ""
|
30 |
|
31 |
-
#: includes/admin/admin-pages.php:
|
32 |
msgid "Popup Themes"
|
33 |
msgstr ""
|
34 |
|
35 |
-
#: includes/admin/admin-pages.php:
|
36 |
msgid "All Popups"
|
37 |
msgstr ""
|
38 |
|
39 |
-
#: includes/admin/admin-pages.php:
|
40 |
msgid "Add New"
|
41 |
msgstr ""
|
42 |
|
43 |
-
#: includes/admin/admin-pages.php:
|
44 |
msgid "All Themes"
|
45 |
msgstr ""
|
46 |
|
47 |
-
#: includes/admin/admin-pages.php:
|
48 |
msgid "Categories"
|
49 |
msgstr ""
|
50 |
|
51 |
-
#: includes/admin/admin-pages.php:
|
52 |
msgid "Tags"
|
53 |
msgstr ""
|
54 |
|
@@ -386,47 +386,47 @@ msgstr ""
|
|
386 |
msgid "Show all tags"
|
387 |
msgstr ""
|
388 |
|
389 |
-
#: includes/admin/popups/metabox-close-fields.php:20, includes/class-popmake-popup-fields.php:
|
390 |
msgid "Close Text"
|
391 |
msgstr ""
|
392 |
|
393 |
-
#: includes/admin/popups/metabox-close-fields.php:23, includes/class-popmake-popup-fields.php:
|
394 |
msgid "CLOSE"
|
395 |
msgstr ""
|
396 |
|
397 |
-
#: includes/admin/popups/metabox-close-fields.php:25, includes/class-popmake-popup-fields.php:
|
398 |
msgid "Use this to override the default text set in the popup theme."
|
399 |
msgstr ""
|
400 |
|
401 |
-
#: includes/admin/popups/metabox-close-fields.php:35, includes/class-popmake-popup-fields.php:
|
402 |
msgid "Close Button Delay"
|
403 |
msgstr ""
|
404 |
|
405 |
-
#: includes/admin/popups/metabox-close-fields.php:49, includes/class-popmake-popup-fields.php:
|
406 |
msgid "This delays the display of the close button."
|
407 |
msgstr ""
|
408 |
|
409 |
-
#: includes/admin/popups/metabox-close-fields.php:57, includes/class-popmake-popup-fields.php:
|
410 |
msgid "Click Overlay to Close"
|
411 |
msgstr ""
|
412 |
|
413 |
-
#: includes/admin/popups/metabox-close-fields.php:60, includes/class-popmake-popup-fields.php:
|
414 |
msgid "Checking this will cause popup to close when user clicks on overlay."
|
415 |
msgstr ""
|
416 |
|
417 |
-
#: includes/admin/popups/metabox-close-fields.php:69, includes/class-popmake-popup-fields.php:
|
418 |
msgid "Press ESC to Close"
|
419 |
msgstr ""
|
420 |
|
421 |
-
#: includes/admin/popups/metabox-close-fields.php:72, includes/class-popmake-popup-fields.php:
|
422 |
msgid "Checking this will cause popup to close when user presses ESC key."
|
423 |
msgstr ""
|
424 |
|
425 |
-
#: includes/admin/popups/metabox-close-fields.php:81, includes/class-popmake-popup-fields.php:
|
426 |
msgid "Press F4 to Close"
|
427 |
msgstr ""
|
428 |
|
429 |
-
#: includes/admin/popups/metabox-close-fields.php:84, includes/class-popmake-popup-fields.php:
|
430 |
msgid "Checking this will cause popup to close when user presses F4 key."
|
431 |
msgstr ""
|
432 |
|
@@ -538,60 +538,68 @@ msgstr ""
|
|
538 |
msgid "This enables other popups to remain open."
|
539 |
msgstr ""
|
540 |
|
541 |
-
#: includes/admin/popups/metabox-display-fields.php:
|
542 |
-
msgid "
|
543 |
msgstr ""
|
544 |
|
545 |
-
#: includes/admin/popups/metabox-display-fields.php:
|
546 |
-
msgid "
|
547 |
msgstr ""
|
548 |
|
549 |
-
#: includes/admin/popups/metabox-display-fields.php:
|
550 |
msgid "Fixed Postioning"
|
551 |
msgstr ""
|
552 |
|
553 |
-
#: includes/admin/popups/metabox-display-fields.php:
|
554 |
msgid "Checking this sets the positioning of the popup to fixed."
|
555 |
msgstr ""
|
556 |
|
557 |
-
#: includes/admin/popups/metabox-display-fields.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
558 |
msgid "Top"
|
559 |
msgstr ""
|
560 |
|
561 |
-
#: includes/admin/popups/metabox-display-fields.php:
|
562 |
msgctxt "Screen Edge: top, bottom"
|
563 |
msgid "Distance from the %s edge of the screen."
|
564 |
msgstr ""
|
565 |
|
566 |
-
#: includes/admin/popups/metabox-display-fields.php:
|
567 |
msgid "Bottom"
|
568 |
msgstr ""
|
569 |
|
570 |
-
#: includes/admin/popups/metabox-display-fields.php:
|
571 |
msgid "Left"
|
572 |
msgstr ""
|
573 |
|
574 |
-
#: includes/admin/popups/metabox-display-fields.php:
|
575 |
msgid "Right"
|
576 |
msgstr ""
|
577 |
|
578 |
-
#: includes/admin/popups/metabox-display-fields.php:
|
579 |
msgid "Z Index"
|
580 |
msgstr ""
|
581 |
|
582 |
-
#: includes/admin/popups/metabox-display-fields.php:
|
583 |
msgid "Overlay Z-Index"
|
584 |
msgstr ""
|
585 |
|
586 |
-
#: includes/admin/popups/metabox-display-fields.php:
|
587 |
msgid "Change the z-index layer level for the overlay."
|
588 |
msgstr ""
|
589 |
|
590 |
-
#: includes/admin/popups/metabox-display-fields.php:
|
591 |
msgid "Popup Z-Index"
|
592 |
msgstr ""
|
593 |
|
594 |
-
#: includes/admin/popups/metabox-display-fields.php:
|
595 |
msgid "Change the z-index layer level for the popup."
|
596 |
msgstr ""
|
597 |
|
@@ -939,7 +947,7 @@ msgstr ""
|
|
939 |
msgid "Once Weekly"
|
940 |
msgstr ""
|
941 |
|
942 |
-
#: includes/class-popmake-fields.php:174, includes/class-popmake-popup-fields.php:105, includes/class-popmake-popup-fields.php:
|
943 |
msgid "ms"
|
944 |
msgstr ""
|
945 |
|
@@ -979,15 +987,15 @@ msgstr ""
|
|
979 |
msgid "Submit"
|
980 |
msgstr ""
|
981 |
|
982 |
-
#: includes/class-pum-freemius.php:
|
983 |
msgid "Usage Statistics"
|
984 |
msgstr ""
|
985 |
|
986 |
-
#: includes/class-pum-freemius.php:
|
987 |
msgid "Popup & Theme Counts, Open Counts"
|
988 |
msgstr ""
|
989 |
|
990 |
-
#: includes/class-pum-freemius.php:
|
991 |
msgid "Allow %3$sPopup Maker%4$s to collect some usage data with %2$s to make the plugin even more awesome. If you skip this, that's okay! %3$sPopup Maker%4$s will still work just fine."
|
992 |
msgstr ""
|
993 |
|
@@ -1517,84 +1525,93 @@ msgctxt "Post Type Singular: Popup, Theme"
|
|
1517 |
msgid "%1$s submitted."
|
1518 |
msgstr ""
|
1519 |
|
1520 |
-
#: includes/pum-condition-functions.php:
|
1521 |
msgctxt "condition: post type plural label ie. Posts: All"
|
1522 |
msgid "%s Archive"
|
1523 |
msgstr ""
|
1524 |
|
1525 |
-
#: includes/pum-condition-functions.php:
|
1526 |
msgctxt "condition: post type plural label ie. Posts: All"
|
1527 |
msgid "All %s"
|
1528 |
msgstr ""
|
1529 |
|
1530 |
-
#: includes/pum-condition-functions.php:
|
1531 |
msgctxt "condition: post type plural label ie. Posts: Selected"
|
1532 |
msgid "%s: Selected"
|
1533 |
msgstr ""
|
1534 |
|
1535 |
-
#: includes/pum-condition-functions.php:
|
1536 |
msgctxt "condition: post type plural label ie. Select Posts"
|
1537 |
msgid "Select %s."
|
1538 |
msgstr ""
|
1539 |
|
1540 |
-
#: includes/pum-condition-functions.php:
|
1541 |
msgctxt "condition: post type plural label ie. Posts: ID"
|
1542 |
msgid "%s: ID"
|
1543 |
msgstr ""
|
1544 |
|
1545 |
-
#: includes/pum-condition-functions.php:
|
1546 |
msgctxt "condition: post type singular label ie. Posts IDs"
|
1547 |
msgid "%s IDs: 128, 129"
|
1548 |
msgstr ""
|
1549 |
|
1550 |
-
#: includes/pum-condition-functions.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1551 |
msgctxt "condition: post type plural and taxonomy singular label ie. Posts: With Category"
|
1552 |
msgid "%1$s: With %2$s"
|
1553 |
msgstr ""
|
1554 |
|
1555 |
-
#: includes/pum-condition-functions.php:
|
1556 |
msgctxt "condition: post type plural label ie. Select categories"
|
1557 |
msgid "Select %s."
|
1558 |
msgstr ""
|
1559 |
|
1560 |
-
#: includes/pum-condition-functions.php:
|
1561 |
msgctxt "condition: taxonomy plural label ie. Categories: All"
|
1562 |
msgid "%s: All"
|
1563 |
msgstr ""
|
1564 |
|
1565 |
-
#: includes/pum-condition-functions.php:
|
1566 |
msgctxt "condition: taxonomy plural label ie. Categories: Selected"
|
1567 |
msgid "%s: Selected"
|
1568 |
msgstr ""
|
1569 |
|
1570 |
-
#: includes/pum-condition-functions.php:
|
1571 |
msgctxt "condition: taxonomy plural label ie. Select Categories"
|
1572 |
msgid "Select %s."
|
1573 |
msgstr ""
|
1574 |
|
1575 |
-
#: includes/pum-condition-functions.php:
|
1576 |
msgctxt "condition: taxonomy plural label ie. Categories: Selected"
|
1577 |
msgid "%s: IDs"
|
1578 |
msgstr ""
|
1579 |
|
1580 |
-
#: includes/pum-condition-functions.php:
|
1581 |
msgctxt "condition: taxonomy plural label ie. Category IDs"
|
1582 |
msgid "%s IDs: 128, 129"
|
1583 |
msgstr ""
|
1584 |
|
1585 |
-
#: includes/pum-condition-functions.php:
|
1586 |
msgid "Home Page"
|
1587 |
msgstr ""
|
1588 |
|
1589 |
-
#: includes/pum-condition-functions.php:
|
1590 |
msgid "Blog Index"
|
1591 |
msgstr ""
|
1592 |
|
1593 |
-
#: includes/pum-condition-functions.php:
|
1594 |
msgid "Search Pages"
|
1595 |
msgstr ""
|
1596 |
|
1597 |
-
#: includes/pum-condition-functions.php:
|
1598 |
msgid "404 Pages"
|
1599 |
msgstr ""
|
1600 |
|
16 |
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
17 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n\n"
|
18 |
|
19 |
+
#: includes/admin/admin-pages.php:30, includes/admin/admin-pages.php:30, includes/admin/admin-pages.php:83, includes/admin/admin-setup.php:24, includes/admin/popups/class-metabox-cookies.php:69, includes/admin/popups/class-metabox-triggers.php:66
|
20 |
msgid "Settings"
|
21 |
msgstr ""
|
22 |
|
23 |
+
#: includes/admin/admin-pages.php:32, includes/admin/admin-pages.php:32, includes/admin/admin-pages.php:84
|
24 |
msgid "Tools"
|
25 |
msgstr ""
|
26 |
|
27 |
+
#: includes/admin/admin-pages.php:34, includes/admin/admin-pages.php:34, includes/admin/admin-pages.php:82
|
28 |
msgid "Extend"
|
29 |
msgstr ""
|
30 |
|
31 |
+
#: includes/admin/admin-pages.php:36, includes/admin/admin-pages.php:36
|
32 |
msgid "Popup Themes"
|
33 |
msgstr ""
|
34 |
|
35 |
+
#: includes/admin/admin-pages.php:75
|
36 |
msgid "All Popups"
|
37 |
msgstr ""
|
38 |
|
39 |
+
#: includes/admin/admin-pages.php:76
|
40 |
msgid "Add New"
|
41 |
msgstr ""
|
42 |
|
43 |
+
#: includes/admin/admin-pages.php:77
|
44 |
msgid "All Themes"
|
45 |
msgstr ""
|
46 |
|
47 |
+
#: includes/admin/admin-pages.php:78, includes/admin/popups/dashboard-columns.php:43, includes/class-pum-conditions.php:74
|
48 |
msgid "Categories"
|
49 |
msgstr ""
|
50 |
|
51 |
+
#: includes/admin/admin-pages.php:79, includes/admin/popups/dashboard-columns.php:39, includes/class-pum-conditions.php:75
|
52 |
msgid "Tags"
|
53 |
msgstr ""
|
54 |
|
386 |
msgid "Show all tags"
|
387 |
msgstr ""
|
388 |
|
389 |
+
#: includes/admin/popups/metabox-close-fields.php:20, includes/class-popmake-popup-fields.php:209
|
390 |
msgid "Close Text"
|
391 |
msgstr ""
|
392 |
|
393 |
+
#: includes/admin/popups/metabox-close-fields.php:23, includes/class-popmake-popup-fields.php:210, includes/class-popmake-popup-theme-fields.php:295, includes/class-popmake-popup-theme-fields.php:297, includes/defaults.php:156
|
394 |
msgid "CLOSE"
|
395 |
msgstr ""
|
396 |
|
397 |
+
#: includes/admin/popups/metabox-close-fields.php:25, includes/class-popmake-popup-fields.php:211
|
398 |
msgid "Use this to override the default text set in the popup theme."
|
399 |
msgstr ""
|
400 |
|
401 |
+
#: includes/admin/popups/metabox-close-fields.php:35, includes/class-popmake-popup-fields.php:216
|
402 |
msgid "Close Button Delay"
|
403 |
msgstr ""
|
404 |
|
405 |
+
#: includes/admin/popups/metabox-close-fields.php:49, includes/class-popmake-popup-fields.php:217
|
406 |
msgid "This delays the display of the close button."
|
407 |
msgstr ""
|
408 |
|
409 |
+
#: includes/admin/popups/metabox-close-fields.php:57, includes/class-popmake-popup-fields.php:227, includes/shortcodes/class-pum-shortcode-popup.php:218
|
410 |
msgid "Click Overlay to Close"
|
411 |
msgstr ""
|
412 |
|
413 |
+
#: includes/admin/popups/metabox-close-fields.php:60, includes/class-popmake-popup-fields.php:228, includes/shortcodes/class-pum-shortcode-popup.php:219
|
414 |
msgid "Checking this will cause popup to close when user clicks on overlay."
|
415 |
msgstr ""
|
416 |
|
417 |
+
#: includes/admin/popups/metabox-close-fields.php:69, includes/class-popmake-popup-fields.php:234
|
418 |
msgid "Press ESC to Close"
|
419 |
msgstr ""
|
420 |
|
421 |
+
#: includes/admin/popups/metabox-close-fields.php:72, includes/class-popmake-popup-fields.php:235
|
422 |
msgid "Checking this will cause popup to close when user presses ESC key."
|
423 |
msgstr ""
|
424 |
|
425 |
+
#: includes/admin/popups/metabox-close-fields.php:81, includes/class-popmake-popup-fields.php:241
|
426 |
msgid "Press F4 to Close"
|
427 |
msgstr ""
|
428 |
|
429 |
+
#: includes/admin/popups/metabox-close-fields.php:84, includes/class-popmake-popup-fields.php:242
|
430 |
msgid "Checking this will cause popup to close when user presses F4 key."
|
431 |
msgstr ""
|
432 |
|
538 |
msgid "This enables other popups to remain open."
|
539 |
msgstr ""
|
540 |
|
541 |
+
#: includes/admin/popups/metabox-display-fields.php:291, includes/class-popmake-popup-fields.php:123
|
542 |
+
msgid "Disable Repositioning"
|
543 |
msgstr ""
|
544 |
|
545 |
+
#: includes/admin/popups/metabox-display-fields.php:305, includes/class-popmake-popup-fields.php:124
|
546 |
+
msgid "This will disable automatic repositioning of the popup on window resizing."
|
547 |
msgstr ""
|
548 |
|
549 |
+
#: includes/admin/popups/metabox-display-fields.php:309, includes/class-popmake-popup-fields.php:130
|
550 |
msgid "Fixed Postioning"
|
551 |
msgstr ""
|
552 |
|
553 |
+
#: includes/admin/popups/metabox-display-fields.php:323, includes/class-popmake-popup-fields.php:131
|
554 |
msgid "Checking this sets the positioning of the popup to fixed."
|
555 |
msgstr ""
|
556 |
|
557 |
+
#: includes/admin/popups/metabox-display-fields.php:328, includes/admin/themes/metabox-close-fields.php:92, includes/class-popmake-popup-fields.php:137, includes/class-popmake-popup-theme-fields.php:331, includes/shortcodes/class-pum-shortcode-popup.php:135
|
558 |
+
msgid "Location"
|
559 |
+
msgstr ""
|
560 |
+
|
561 |
+
#: includes/admin/popups/metabox-display-fields.php:340, includes/class-popmake-popup-fields.php:138, includes/shortcodes/class-pum-shortcode-popup.php:136
|
562 |
+
msgid "Choose where the popup will be displayed."
|
563 |
+
msgstr ""
|
564 |
+
|
565 |
+
#: includes/admin/popups/metabox-display-fields.php:345, includes/admin/popups/metabox-display-fields.php:359, includes/admin/themes/metabox-close-fields.php:111, includes/class-popmake-popup-fields.php:145, includes/class-popmake-popup-fields.php:146, includes/class-popmake-popup-theme-fields.php:339, includes/input-options.php:129, includes/shortcodes/class-pum-shortcode-popup.php:143, includes/shortcodes/class-pum-shortcode-popup.php:144
|
566 |
msgid "Top"
|
567 |
msgstr ""
|
568 |
|
569 |
+
#: includes/admin/popups/metabox-display-fields.php:359, includes/admin/popups/metabox-display-fields.php:378, includes/admin/popups/metabox-display-fields.php:397, includes/admin/popups/metabox-display-fields.php:416, includes/class-popmake-popup-fields.php:146, includes/class-popmake-popup-fields.php:157, includes/class-popmake-popup-fields.php:168, includes/class-popmake-popup-fields.php:179, includes/shortcodes/class-pum-shortcode-popup.php:144, includes/shortcodes/class-pum-shortcode-popup.php:155, includes/shortcodes/class-pum-shortcode-popup.php:166, includes/shortcodes/class-pum-shortcode-popup.php:177
|
570 |
msgctxt "Screen Edge: top, bottom"
|
571 |
msgid "Distance from the %s edge of the screen."
|
572 |
msgstr ""
|
573 |
|
574 |
+
#: includes/admin/popups/metabox-display-fields.php:364, includes/admin/popups/metabox-display-fields.php:378, includes/admin/themes/metabox-close-fields.php:145, includes/class-popmake-popup-fields.php:156, includes/class-popmake-popup-fields.php:157, includes/class-popmake-popup-theme-fields.php:359, includes/input-options.php:131, includes/shortcodes/class-pum-shortcode-popup.php:154, includes/shortcodes/class-pum-shortcode-popup.php:155
|
575 |
msgid "Bottom"
|
576 |
msgstr ""
|
577 |
|
578 |
+
#: includes/admin/popups/metabox-display-fields.php:383, includes/admin/popups/metabox-display-fields.php:397, includes/admin/themes/metabox-close-fields.php:128, includes/class-popmake-popup-fields.php:167, includes/class-popmake-popup-fields.php:168, includes/class-popmake-popup-theme-fields.php:349, includes/input-options.php:85, includes/input-options.php:130, includes/shortcodes/class-pum-shortcode-popup.php:165, includes/shortcodes/class-pum-shortcode-popup.php:166
|
579 |
msgid "Left"
|
580 |
msgstr ""
|
581 |
|
582 |
+
#: includes/admin/popups/metabox-display-fields.php:402, includes/admin/popups/metabox-display-fields.php:416, includes/admin/themes/metabox-close-fields.php:162, includes/class-popmake-popup-fields.php:178, includes/class-popmake-popup-fields.php:179, includes/class-popmake-popup-theme-fields.php:369, includes/input-options.php:87, includes/input-options.php:132, includes/shortcodes/class-pum-shortcode-popup.php:176, includes/shortcodes/class-pum-shortcode-popup.php:177
|
583 |
msgid "Right"
|
584 |
msgstr ""
|
585 |
|
586 |
+
#: includes/admin/popups/metabox-display-fields.php:425
|
587 |
msgid "Z Index"
|
588 |
msgstr ""
|
589 |
|
590 |
+
#: includes/admin/popups/metabox-display-fields.php:429, includes/class-popmake-popup-fields.php:189
|
591 |
msgid "Overlay Z-Index"
|
592 |
msgstr ""
|
593 |
|
594 |
+
#: includes/admin/popups/metabox-display-fields.php:434, includes/class-popmake-popup-fields.php:190
|
595 |
msgid "Change the z-index layer level for the overlay."
|
596 |
msgstr ""
|
597 |
|
598 |
+
#: includes/admin/popups/metabox-display-fields.php:439, includes/class-popmake-popup-fields.php:198
|
599 |
msgid "Popup Z-Index"
|
600 |
msgstr ""
|
601 |
|
602 |
+
#: includes/admin/popups/metabox-display-fields.php:444, includes/class-popmake-popup-fields.php:199
|
603 |
msgid "Change the z-index layer level for the popup."
|
604 |
msgstr ""
|
605 |
|
947 |
msgid "Once Weekly"
|
948 |
msgstr ""
|
949 |
|
950 |
+
#: includes/class-popmake-fields.php:174, includes/class-popmake-popup-fields.php:105, includes/class-popmake-popup-fields.php:224, includes/shortcodes/class-pum-shortcode-popup.php:205
|
951 |
msgid "ms"
|
952 |
msgstr ""
|
953 |
|
987 |
msgid "Submit"
|
988 |
msgstr ""
|
989 |
|
990 |
+
#: includes/class-pum-freemius.php:97
|
991 |
msgid "Usage Statistics"
|
992 |
msgstr ""
|
993 |
|
994 |
+
#: includes/class-pum-freemius.php:98
|
995 |
msgid "Popup & Theme Counts, Open Counts"
|
996 |
msgstr ""
|
997 |
|
998 |
+
#: includes/class-pum-freemius.php:121
|
999 |
msgid "Allow %3$sPopup Maker%4$s to collect some usage data with %2$s to make the plugin even more awesome. If you skip this, that's okay! %3$sPopup Maker%4$s will still work just fine."
|
1000 |
msgstr ""
|
1001 |
|
1525 |
msgid "%1$s submitted."
|
1526 |
msgstr ""
|
1527 |
|
1528 |
+
#: includes/pum-condition-functions.php:34
|
1529 |
msgctxt "condition: post type plural label ie. Posts: All"
|
1530 |
msgid "%s Archive"
|
1531 |
msgstr ""
|
1532 |
|
1533 |
+
#: includes/pum-condition-functions.php:42
|
1534 |
msgctxt "condition: post type plural label ie. Posts: All"
|
1535 |
msgid "All %s"
|
1536 |
msgstr ""
|
1537 |
|
1538 |
+
#: includes/pum-condition-functions.php:48
|
1539 |
msgctxt "condition: post type plural label ie. Posts: Selected"
|
1540 |
msgid "%s: Selected"
|
1541 |
msgstr ""
|
1542 |
|
1543 |
+
#: includes/pum-condition-functions.php:51
|
1544 |
msgctxt "condition: post type plural label ie. Select Posts"
|
1545 |
msgid "Select %s."
|
1546 |
msgstr ""
|
1547 |
|
1548 |
+
#: includes/pum-condition-functions.php:64
|
1549 |
msgctxt "condition: post type plural label ie. Posts: ID"
|
1550 |
msgid "%s: ID"
|
1551 |
msgstr ""
|
1552 |
|
1553 |
+
#: includes/pum-condition-functions.php:67
|
1554 |
msgctxt "condition: post type singular label ie. Posts IDs"
|
1555 |
msgid "%s IDs: 128, 129"
|
1556 |
msgstr ""
|
1557 |
|
1558 |
+
#: includes/pum-condition-functions.php:77
|
1559 |
+
msgctxt "condition: post type plural label ie. Pages: With Template"
|
1560 |
+
msgid "%s: With Template"
|
1561 |
+
msgstr ""
|
1562 |
+
|
1563 |
+
#: includes/pum-condition-functions.php:86
|
1564 |
+
msgid "Default"
|
1565 |
+
msgstr ""
|
1566 |
+
|
1567 |
+
#: includes/pum-condition-functions.php:116
|
1568 |
msgctxt "condition: post type plural and taxonomy singular label ie. Posts: With Category"
|
1569 |
msgid "%1$s: With %2$s"
|
1570 |
msgstr ""
|
1571 |
|
1572 |
+
#: includes/pum-condition-functions.php:119
|
1573 |
msgctxt "condition: post type plural label ie. Select categories"
|
1574 |
msgid "Select %s."
|
1575 |
msgstr ""
|
1576 |
|
1577 |
+
#: includes/pum-condition-functions.php:148
|
1578 |
msgctxt "condition: taxonomy plural label ie. Categories: All"
|
1579 |
msgid "%s: All"
|
1580 |
msgstr ""
|
1581 |
|
1582 |
+
#: includes/pum-condition-functions.php:154
|
1583 |
msgctxt "condition: taxonomy plural label ie. Categories: Selected"
|
1584 |
msgid "%s: Selected"
|
1585 |
msgstr ""
|
1586 |
|
1587 |
+
#: includes/pum-condition-functions.php:157
|
1588 |
msgctxt "condition: taxonomy plural label ie. Select Categories"
|
1589 |
msgid "Select %s."
|
1590 |
msgstr ""
|
1591 |
|
1592 |
+
#: includes/pum-condition-functions.php:170
|
1593 |
msgctxt "condition: taxonomy plural label ie. Categories: Selected"
|
1594 |
msgid "%s: IDs"
|
1595 |
msgstr ""
|
1596 |
|
1597 |
+
#: includes/pum-condition-functions.php:173
|
1598 |
msgctxt "condition: taxonomy plural label ie. Category IDs"
|
1599 |
msgid "%s IDs: 128, 129"
|
1600 |
msgstr ""
|
1601 |
|
1602 |
+
#: includes/pum-condition-functions.php:197
|
1603 |
msgid "Home Page"
|
1604 |
msgstr ""
|
1605 |
|
1606 |
+
#: includes/pum-condition-functions.php:204
|
1607 |
msgid "Blog Index"
|
1608 |
msgstr ""
|
1609 |
|
1610 |
+
#: includes/pum-condition-functions.php:211
|
1611 |
msgid "Search Pages"
|
1612 |
msgstr ""
|
1613 |
|
1614 |
+
#: includes/pum-condition-functions.php:217
|
1615 |
msgid "404 Pages"
|
1616 |
msgstr ""
|
1617 |
|
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: WP Popup Maker
|
7 |
-
* Version: 1.4.
|
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.4.
|
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: WP Popup Maker
|
7 |
+
* Version: 1.4.16
|
8 |
* Author URI: https://wppopupmaker.com/
|
9 |
* Text Domain: popup-maker
|
10 |
*
|
144 |
}
|
145 |
|
146 |
if ( ! defined( 'POPMAKE_VERSION' ) ) {
|
147 |
+
define( 'POPMAKE_VERSION', '1.4.16' );
|
148 |
}
|
149 |
|
150 |
if ( ! defined( 'POPMAKE_DB_VERSION' ) ) {
|
readme.txt
CHANGED
@@ -4,9 +4,9 @@ Author URI: https://wppopupmaker.com/?utm_source=WordPress+Page&utm_medium=Readm
|
|
4 |
Plugin URI: https://wppopupmaker.com/?utm_source=WordPress+Page&utm_medium=Readme+Link&utm_campaign=Plugin+URI
|
5 |
Donate link:
|
6 |
Tags: responsive popup, promotion, popover, pop-up, pop over, marketing, lightbox, advertising, conversion, modal, popup, popups
|
7 |
-
Requires at least: 3.
|
8 |
-
Tested up to: 4.
|
9 |
-
Stable tag: 1.4.
|
10 |
License: GNU Version 3 or Any Later Version
|
11 |
|
12 |
Easily create attractive popups. Customize nearly every aspect of your popups, from theme & position, to targeting & cookies.
|
@@ -90,6 +90,18 @@ There are several common causes for this which include:
|
|
90 |
|
91 |
== Changelog ==
|
92 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
= v1.4.15 - 7/20/2016 =
|
94 |
* Improvement: Only showed the aria-label attribute if the label will be shown.
|
95 |
* Tweak: Updated the Freemius SDK.
|
4 |
Plugin URI: https://wppopupmaker.com/?utm_source=WordPress+Page&utm_medium=Readme+Link&utm_campaign=Plugin+URI
|
5 |
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.6
|
9 |
+
Stable tag: 1.4.16
|
10 |
License: GNU Version 3 or Any Later Version
|
11 |
|
12 |
Easily create attractive popups. Customize nearly every aspect of your popups, from theme & position, to targeting & cookies.
|
90 |
|
91 |
== Changelog ==
|
92 |
|
93 |
+
= v1.4.16 - 8/14/2016 =
|
94 |
+
* Feature: New Condition: Pages: With Template. Thanks @cedmund.
|
95 |
+
* Feature: Option to Disable reposition on window resize/scroll.
|
96 |
+
* Improvement: Enable Visual Composer for Popups by default (VC 4.8+).
|
97 |
+
* Improvement: Replaced usage of gif hex code with loading of an actual tracking gif to prevent security scanners from throwing false positives.
|
98 |
+
* Improvement: Changed default analytics response with a 204 no content heading, saving the need to load & return a tracking gif.
|
99 |
+
* Fix: Missing condition value bug fixed by adding sanity checks to conditions on get.
|
100 |
+
* Fix: Auto Height checkbox wouldn't stay unchecked.
|
101 |
+
* Fix: CSS class pum-open-overlay wasn't being removed from HTML element on popup close causing issues for next popup.
|
102 |
+
* Fix: Error in JS due to shortcodes: Uncaught Error: Syntax error, unrecognized expression.
|
103 |
+
* Fix: Issue where some custom post types not working with conditions.
|
104 |
+
|
105 |
= v1.4.15 - 7/20/2016 =
|
106 |
* Improvement: Only showed the aria-label attribute if the label will be shown.
|
107 |
* Tweak: Updated the Freemius SDK.
|