Version Description
Download this release
Release Info
Developer | danieliser |
Plugin | Popup Maker – Popup Forms, Optins & More |
Version | 1.0.2 |
Comparing to | |
See all releases |
Code changes from version 1.0.1 to 1.0.2
- assets/scripts/popup-maker-site.js +3 -1
- assets/scripts/popup-maker-site.min.js +34 -2
- assets/styles/popup-maker-admin.css +5 -2
- assets/styles/popup-maker-admin.min.css +1 -1
- includes/admin/admin-setup.php +2 -2
- includes/admin/extensions/extensions-page.php +6 -3
- includes/admin/metabox-share.php +4 -5
- includes/admin/metabox-support.php +6 -7
- includes/admin/popups/{metabox-loading-fields.php → metabox-targeting-condition-fields.php} +0 -0
- includes/admin/popups/metabox.php +0 -1
- includes/admin/settings/register-settings.php +797 -780
- includes/admin/themes/metabox-close-fields.php +1 -1
- includes/admin/themes/metabox-container-fields.php +1 -1
- includes/admin/themes/metabox-overlay-fields.php +1 -1
- includes/admin/themes/metabox.php +1 -1
- includes/admin/welcome/about.php +6 -6
- includes/admin/welcome/getting-started.php +12 -7
- includes/extensions-functions.php +2 -2
- includes/install.php +4 -0
- includes/scripts.php +2 -2
- popup-maker.php +3 -3
- readme.txt +34 -17
assets/scripts/popup-maker-site.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/**
|
2 |
-
* Popup Maker v1.0
|
3 |
*/
|
4 |
(function (jQuery) {
|
5 |
"use strict";
|
@@ -23,6 +23,7 @@
|
|
23 |
jQuery.error('Method ' + method + ' does not exist on jQuery.fn.popmake');
|
24 |
};
|
25 |
|
|
|
26 |
jQuery.fn.popmake.last_open_trigger = null;
|
27 |
jQuery.fn.popmake.last_close_trigger = null;
|
28 |
|
@@ -151,6 +152,7 @@
|
|
151 |
$this
|
152 |
.addClass('active')
|
153 |
.trigger('popmakeAfterOpen');
|
|
|
154 |
if (callback !== undefined) {
|
155 |
callback();
|
156 |
}
|
1 |
/**
|
2 |
+
* Popup Maker v1.0.2
|
3 |
*/
|
4 |
(function (jQuery) {
|
5 |
"use strict";
|
23 |
jQuery.error('Method ' + method + ' does not exist on jQuery.fn.popmake');
|
24 |
};
|
25 |
|
26 |
+
jQuery.fn.popmake.last_open_popup = null;
|
27 |
jQuery.fn.popmake.last_open_trigger = null;
|
28 |
jQuery.fn.popmake.last_close_trigger = null;
|
29 |
|
152 |
$this
|
153 |
.addClass('active')
|
154 |
.trigger('popmakeAfterOpen');
|
155 |
+
jQuery.fn.popmake.last_open_popup = $this;
|
156 |
if (callback !== undefined) {
|
157 |
callback();
|
158 |
}
|
assets/scripts/popup-maker-site.min.js
CHANGED
@@ -1,4 +1,36 @@
|
|
1 |
/**
|
2 |
-
* Popup Maker v1.0
|
3 |
*/
|
4 |
-
(function(d){d.isFunction(d.fn.on)||(d.fn.on=function(a,e,c){return this.delegate(e,a,c)},d.fn.off=function(a,e,c){return this.undelegate(e,a,c)});d.fn.popmake=function(a){if(d.fn.popmake.methods[a])return d.fn.popmake.methods[a].apply(this,Array.prototype.slice.call(arguments,1));if("object"===typeof a||!a)return d.fn.popmake.methods.init.apply(this,arguments);d.error("Method "+a+" does not exist on jQuery.fn.popmake")};d.fn.popmake.last_open_trigger=null;d.fn.popmake.last_close_trigger=null;d.fn.popmake.methods= {init:function(a){return this.each(function(){var e=d(this),c=d.extend(!0,{},d.fn.popmake.defaults,e.data("popmake"),a);e.parent().is("body")||e.appendTo("body");d("#"+c.overlay.attr.id).length||d("<div>").attr(c.overlay.attr).appendTo("body");d(window).on("resize",function(){e.hasClass("active")&&d.fn.popmake.utilities.throttle(setTimeout(function(){e.popmake("reposition")},25),500,!1)});"string"===typeof popmake_powered_by&&""!==popmake_powered_by&&d(".popmake-content",e).append(d(popmake_powered_by)); e.data("popmake",c).on("popmakeBeforeOpen.hide_popup",function(){d(this).css({visibility:"visible"}).hide().addClass(c.container.active_class);c.meta.display.stackable||e.popmake("close_all")}).on("popmakeAfterClose.close_overlay",function(){var a=d("#"+c.overlay.attr.id);a.length&&a.is(":visible")&&a.fadeOut(c.close.close_speed)}).on("popmakeAfterClose.reset_videos",function(){d("iframe",e).filter('[src*="youtube"],[src*="vimeo"]').each(function(){var a=d(this).attr("src");d(this).attr("src","").attr("src", a)})}).on("popmakeBeforeOpen.setup_close",function(){e.popmake("setup_close")}).on("popmakeBeforeOpen.retheme",function(){e.popmake("retheme")}).on("popmakeBeforeOpen.reposition",function(){e.popmake("reposition")}).trigger("popmakeInit");return this})},setup_close:function(){var a=d(this),e=a.data("popmake"),c=d("#"+e.overlay.attr.id),b=d("."+e.close.attr["class"],a);b.off("click.popmake").on("click.popmake",function(b){b.preventDefault();b.stopPropagation();d.fn.popmake.last_close_trigger="Close Button"; a.popmake("close")});if(e.meta.close.esc_press||e.meta.close.f4_press)d(window).off("keyup.popmake").on("keyup.popmake",function(b){27===b.keyCode&&e.meta.close.esc_press&&(d.fn.popmake.last_close_trigger="ESC Key",a.popmake("close"));115===b.keyCode&&e.meta.close.f4_press&&(d.fn.popmake.last_close_trigger="F4 Key",a.popmake("close"))});if(e.meta.close.overlay_click)c.off("click.popmake").on("click.popmake",function(b){b.preventDefault();b.stopPropagation();d.fn.popmake.last_close_trigger="Overlay Click"; a.popmake("close")});a.on("popmakeAfterClose",function(){d(window).off("keyup.popmake");c.off("click.popmake");b.off("click.popmake")}).trigger("popmakeSetupClose")},open:function(a){var e=d(this),c=e.data("popmake");e.trigger("popmakeBeforeOpen").popmake("animate",c.meta.display.animation_type,function(){e.addClass("active").trigger("popmakeAfterOpen");void 0!==a&&a()});return this},close:function(){return this.each(function(){var a=d(this),e=a.data("popmake");a.trigger("popmakeBeforeClose").fadeOut(e.close.close_speed, function(){a.removeClass("active").trigger("popmakeAfterClose")});return this})},close_all:function(){var a=d(this).data("popmake");d("."+a.container.attr["class"]).removeClass("active").hide(0);return this},reposition:function(a){d(this).trigger("popmakeBeforeReposition");var e=d(this),c=e.data("popmake"),b=c.meta.display,g=b.location,f={my:"",at:""},h=!1;0<=g.indexOf("left")&&(f={my:f.my+" left"+(0!==b.position_left?"+"+b.position_left:""),at:f.at+" left"});0<=g.indexOf("right")&&(f={my:f.my+" right"+ (0!==b.position_right?"-"+b.position_right:""),at:f.at+" right"});0<=g.indexOf("center")&&(f="center"===g?{my:"center",at:"center"}:{my:f.my+" center",at:f.at+" center"});0<=g.indexOf("top")&&(f={my:f.my+" top"+(0!==b.position_top?"+"+b.position_top:""),at:f.at+" top"});0<=g.indexOf("bottom")&&(f={my:f.my+" bottom"+(0!==b.position_bottom?"-"+b.position_bottom:""),at:f.at+" bottom"});f.my=d.trim(f.my);f.at=d.trim(f.at);f.of=window;f.collision="fit";f.using="function"===typeof a?a:d.fn.popmake.callbacks.reposition_using; e.is(":hidden")&&(h=e.css("opacity"),e.css({opacity:0}).show());b.position_fixed?e.addClass("fixed"):e.removeClass("fixed");"custom"===c.meta.display.size?e.css({width:c.meta.display.custom_width+c.meta.display.custom_width_unit,height:c.meta.display.custom_height_auto?"auto":c.meta.display.custom_height+c.meta.display.custom_height_unit}):"auto"!==c.meta.display.size&&(""!==c.meta.display.responsive_min_width&&e.css({maxWidth:c.meta.display.responsive_min_width+c.meta.display.responsive_min_width_unit}), ""!==c.meta.display.responsive_max_width&&e.css({maxWidth:c.meta.display.responsive_max_width+c.meta.display.responsive_max_width_unit}));e.addClass("custom-position").position(f).trigger("popmakeAfterReposition");h&&e.css({opacity:h}).hide();return this},retheme:function(a){d(this).trigger("popmakeBeforeRetheme");var e=d(this),c=e.data("popmake"),b=d("#"+c.overlay.attr.id),g=d("."+c.title.attr["class"],e),f=d("> ."+c.content.attr["class"],e),h=d("> ."+c.close.attr["class"],e),k;void 0===a&&(a=d.fn.popmake.themes[c.theme_id], void 0===a&&(a=d.fn.popmake.themes[1]));c="yes"===a.container.boxshadow_inset?"inset ":"";k="yes"===a.close.boxshadow_inset?"inset ":"";b.removeAttr("style").css({backgroundColor:d.fn.popmake.utilities.convert_hex(a.overlay.background_color,a.overlay.background_opacity)});e.css({padding:a.container.padding+"px",backgroundColor:d.fn.popmake.utilities.convert_hex(a.container.background_color,a.container.background_opacity),borderStyle:a.container.border_style,borderColor:a.container.border_color,borderWidth:a.container.border_width+ "px",borderRadius:a.container.border_radius+"px",boxShadow:c+a.container.boxshadow_horizontal+"px "+a.container.boxshadow_vertical+"px "+a.container.boxshadow_blur+"px "+a.container.boxshadow_spread+"px "+d.fn.popmake.utilities.convert_hex(a.container.boxshadow_color,a.container.boxshadow_opacity)});g.css({color:a.title.font_color,lineHeight:a.title.line_height+"px",fontSize:a.title.font_size+"px",fontFamily:a.title.font_family,fontWeight:a.title.font_weight,fontStyle:a.title.font_style,textAlign:a.title.text_align, textShadow:a.title.textshadow_horizontal+"px "+a.title.textshadow_vertical+"px "+a.title.textshadow_blur+"px "+d.fn.popmake.utilities.convert_hex(a.title.textshadow_color,a.title.textshadow_opacity)});f.css({color:a.content.font_color,fontFamily:a.content.font_family,fontWeight:a.content.font_weight,fontStyle:a.content.font_style});d("p, label",f).css({color:a.content.font_color,fontFamily:a.content.font_family});h.html(a.close.text).css({padding:a.close.padding+"px",backgroundColor:d.fn.popmake.utilities.convert_hex(a.close.background_color, a.close.background_opacity),color:a.close.font_color,lineHeight:a.close.line_height+"px",fontSize:a.close.font_size+"px",fontWeight:a.close.font_weight,fontStyle:a.close.font_style,fontFamily:a.close.font_family,borderStyle:a.close.border_style,borderColor:a.close.border_color,borderWidth:a.close.border_width+"px",borderRadius:a.close.border_radius+"px",boxShadow:k+a.close.boxshadow_horizontal+"px "+a.close.boxshadow_vertical+"px "+a.close.boxshadow_blur+"px "+a.close.boxshadow_spread+"px "+d.fn.popmake.utilities.convert_hex(a.close.boxshadow_color, a.close.boxshadow_opacity),textShadow:a.close.textshadow_horizontal+"px "+a.close.textshadow_vertical+"px "+a.close.textshadow_blur+"px "+d.fn.popmake.utilities.convert_hex(a.close.textshadow_color,a.close.textshadow_opacity)});switch(a.close.location){case "topleft":h.css({top:a.close.position_top+"px",left:a.close.position_left+"px"});break;case "topright":h.css({top:a.close.position_top+"px",right:a.close.position_right+"px"});break;case "bottomleft":h.css({bottom:a.close.position_bottom+"px", left:a.close.position_left+"px"});break;case "bottomright":h.css({bottom:a.close.position_bottom+"px",right:a.close.position_right+"px"})}e.trigger("popmakeAfterRetheme",[a]);return this},animate_overlay:function(a,e,c){if(d(this).data("popmake").meta.display.overlay_disabled)c();else{if(d.fn.popmake.overlay_animations[a])return d.fn.popmake.overlay_animations[a].apply(this,Array.prototype.slice.call(arguments,1));d.error("Animation style "+d.fn.popmake.overlay_animations+" does not exist.")}return this}, animate:function(a,e){if(d.fn.popmake.animations[a])return d.fn.popmake.animations[a].apply(this,Array.prototype.slice.call(arguments,1));d.error("Animation style "+d.fn.popmake.animations+" does not exist.");return this},animation_origin:function(a){var e=d(this),c={my:"",at:""};switch(a){case "top":c={my:"left+"+e.offset().left+" bottom-100",at:"left top"};break;case "bottom":c={my:"left+"+e.offset().left+" top+100",at:"left bottom"};break;case "left":c={my:"right top+"+e.offset().top,at:"left top"}; break;case "right":c={my:"left top+"+e.offset().top,at:"right top"};break;default:0<=a.indexOf("left")&&(c={my:c.my+" right",at:c.at+" left"}),0<=a.indexOf("right")&&(c={my:c.my+" left",at:c.at+" right"}),0<=a.indexOf("center")&&(c={my:c.my+" center",at:c.at+" center"}),0<=a.indexOf("top")&&(c={my:c.my+" bottom-100",at:c.at+" top"}),0<=a.indexOf("bottom")&&(c={my:c.my+" top+100",at:c.at+" bottom"}),c.my=d.trim(c.my),c.at=d.trim(c.at)}c.of=window;c.collision="none";return c}};d.fn.popmake.callbacks= {reposition_using:function(a){d(this).css(a)}};d.fn.popmake.utilities={convert_hex:function(a,e){a=a.replace("#","");var c=parseInt(a.substring(0,2),16),b=parseInt(a.substring(2,4),16),d=parseInt(a.substring(4,6),16);return"rgba("+c+","+b+","+d+","+e/100+")"},debounce:function(a,e){var c;return function(){var b=this,d=arguments;window.clearTimeout(c);c=window.setTimeout(function(){a.apply(b,d)},e)}},throttle:function(a,d){var c=!1,b=function(){c=!1};return function(){c||(a.apply(this,arguments),window.setTimeout(b, d),c=!0)}},getXPath:function(a){var e=[],c,b,g,f,h;d.each(d(a).parents(),function(a,l){c=d(l);b=c.attr("id")||"";g=c.attr("class")||"";f=c.get(0).tagName.toLowerCase();h=c.parent().children(f).index(c);if("body"===f)return!1;0<g.length&&(g=g.split(" "),g=g[0]);e.push(f+(0<b.length?"#"+b:0<g.length?"."+g.split(" ").join("."):":eq("+h+")"))});return e.reverse().join(" > ")},strtotime:function(a,d){function c(a){var b=a.split(" ");a=b[0];var c=b[1].substring(0,3),d=/\d+/.test(a),e=("last"===a?-1:1)* ("ago"===b[2]?-1:1);d&&(e*=parseInt(a,10));if(k.hasOwnProperty(c)&&!b[1].match(/^mon(day|\.)?$/i))return f["set"+k[c]](f["get"+k[c]]()+e);if("wee"===c)return f.setDate(f.getDate()+7*e);if("next"===a||"last"===a)b=e,c=h[c],void 0!==c&&(c-=f.getDay(),0===c?c=7*b:0<c&&"last"===a?c-=7:0>c&&"next"===a&&(c+=7),f.setDate(f.getDate()+c));else if(!d)return!1;return!0}var b,g,f,h,k,l;if(!a)return!1;a=a.replace(/^\s+|\s+$/g,"").replace(/\s{2,}/g," ").replace(/[\t\r\n]/g,"").toLowerCase();if((b=a.match(/^(\d{1,4})([\-\.\/\:])(\d{1,2})([\-\.\/\:])(\d{1,4})(?:\s(\d{1,2}):(\d{2})?:?(\d{2})?)?(?:\s([A-Z]+)?)?$/))&& b[2]===b[4])if(1901<b[1])switch(b[2]){case "-":return 12<b[3]||31<b[5]?!1:new Date(b[1],parseInt(b[3],10)-1,b[5],b[6]||0,b[7]||0,b[8]||0,b[9]||0)/1E3;case ".":return!1;case "/":return 12<b[3]||31<b[5]?!1:new Date(b[1],parseInt(b[3],10)-1,b[5],b[6]||0,b[7]||0,b[8]||0,b[9]||0)/1E3}else if(1901<b[5])switch(b[2]){case "-":return 12<b[3]||31<b[1]?!1:new Date(b[5],parseInt(b[3],10)-1,b[1],b[6]||0,b[7]||0,b[8]||0,b[9]||0)/1E3;case ".":return 12<b[3]||31<b[1]?!1:new Date(b[5],parseInt(b[3],10)-1,b[1],b[6]|| 0,b[7]||0,b[8]||0,b[9]||0)/1E3;case "/":return 12<b[1]||31<b[3]?!1:new Date(b[5],parseInt(b[1],10)-1,b[3],b[6]||0,b[7]||0,b[8]||0,b[9]||0)/1E3}else switch(b[2]){case "-":if(12<b[3]||31<b[5]||70>b[1]&&38<b[1])return!1;g=0<=b[1]&&38>=b[1]?+b[1]+2E3:b[1];return new Date(g,parseInt(b[3],10)-1,b[5],b[6]||0,b[7]||0,b[8]||0,b[9]||0)/1E3;case ".":if(70<=b[5])return 12<b[3]||31<b[1]?!1:new Date(b[5],parseInt(b[3],10)-1,b[1],b[6]||0,b[7]||0,b[8]||0,b[9]||0)/1E3;if(60>b[5]&&!b[6]){if(23<b[1]||59<b[3])return!1; g=new Date;return new Date(g.getFullYear(),g.getMonth(),g.getDate(),b[1]||0,b[3]||0,b[5]||0,b[9]||0)/1E3}return!1;case "/":if(12<b[1]||31<b[3]||70>b[5]&&38<b[5])return!1;g=0<=b[5]&&38>=b[5]?+b[5]+2E3:b[5];return new Date(g,parseInt(b[1],10)-1,b[3],b[6]||0,b[7]||0,b[8]||0,b[9]||0)/1E3;case ":":if(23<b[1]||59<b[3]||59<b[5])return!1;g=new Date;return new Date(g.getFullYear(),g.getMonth(),g.getDate(),b[1]||0,b[3]||0,b[5]||0)/1E3}if("now"===a)return null===d||isNaN(d)?(new Date).getTime()/1E3||0:d||0; b=Date.parse(a);if(!isNaN(b))return b/1E3||0;f=d?new Date(1E3*d):new Date;h={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};k={yea:"FullYear",mon:"Month",day:"Date",hou:"Hours",min:"Minutes",sec:"Seconds"};b=a.match(RegExp("([+-]?\\d+\\s(years?|months?|weeks?|days?|hours?|minutes?|min|seconds?|sec|sunday|sun\\.?|monday|mon\\.?|tuesday|tue\\.?|wednesday|wed\\.?|thursday|thu\\.?|friday|fri\\.?|saturday|sat\\.?)|(last|next)\\s(years?|months?|weeks?|days?|hours?|minutes?|min|seconds?|sec|sunday|sun\\.?|monday|mon\\.?|tuesday|tue\\.?|wednesday|wed\\.?|thursday|thu\\.?|friday|fri\\.?|saturday|sat\\.?))(\\sago)?", "gi"));if(!b)return!1;l=0;for(g=b.length;l<g;l+=1)if(!c(b[l]))return!1;return f.getTime()/1E3}};d.fn.popmake.utilies=d.fn.popmake.utilities;d.fn.popmake.defaults={theme_id:popmake_default_theme,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"}}};d.fn.popmake.themes=popmake_themes;d.fn.popmake.overlay_animations= {none:function(a,e){var c=d(this).data("popmake");d("#"+c.overlay.attr.id).show(a,e)},fade:function(a,e){var c=d(this).data("popmake");d("#"+c.overlay.attr.id).fadeIn(a,e)},slide:function(a,e){var c=d(this).data("popmake");d("#"+c.overlay.attr.id).slideDown(a,e)}};d.fn.popmake.animations={none:function(a){var e=d(this);e.popmake("animate_overlay","none",0,function(){e.css({display:"block"});void 0!==a&&a()});return this},slide:function(a){var e=d(this).show(0).css({opacity:0}),c=e.data("popmake"), b=c.meta.display.animation_speed/2E3,c=e.popmake("animation_origin",c.meta.display.animation_origin);d("html").css("overflow-x","hidden");e.position(c).css({opacity:1}).popmake("animate_overlay","fade",1E3*b,function(){e.popmake("reposition",function(c){TweenLite.to(e,b,d.extend(c,{onComplete:function(){d("html").css("overflow-x","inherit");void 0!==a&&a()}}))})});return this},fade:function(a){var e=d(this).show(0).css({opacity:0}),c=e.data("popmake").meta.display.animation_speed/2E3;e.popmake("animate_overlay", "fade",1E3*c,function(){TweenLite.to(e,c,{opacity:1,onComplete:function(){void 0!==a&&a()}})});return this},fadeAndSlide:function(a){var e=d(this).show(0).css({opacity:0}),c=e.data("popmake"),b=c.meta.display.animation_speed/2E3,c=e.popmake("animation_origin",c.meta.display.animation_origin);d("html").css("overflow-x","hidden");e.position(c).popmake("animate_overlay","fade",1E3*b,function(){e.popmake("reposition",function(c){TweenLite.to(e,b,d.extend(c,{opacity:1,onComplete:function(){d("html").css("overflow-x", "inherit");void 0!==a&&a()}}))})});return this},grow:function(a){var e=d(this).show(0).css({opacity:0}),c=e.data("popmake"),b=c.meta.display.animation_speed/2E3,c=c.meta.display.animation_origin;if("top"===c||"bottom"===c)c="center "+c;if("left"===c||"right"===c)c+=" center";TweenLite.to(e,0,{transformOrigin:c,scale:0,opacity:1});e.popmake("animate_overlay","fade",1E3*b,function(){e.popmake("reposition",function(c){TweenLite.to(e,b,{scale:1,onComplete:function(){void 0!==a&&a()}})})});return this}, growAndSlide:function(a){var e=d(this).show(0).css({opacity:0}),c=e.data("popmake"),b=c.meta.display.animation_speed/2E3,c=e.popmake("animation_origin",c.meta.display.animation_origin);d("html").css("overflow-x","hidden");e.position(c);TweenLite.to(e,0,{scale:0,opacity:1,transformOrigin:"0 0"});e.popmake("animate_overlay","fade",1E3*b,function(){e.popmake("reposition",function(c){TweenLite.to(e,b,d.extend(c,{scale:1,transformOrigin:"50% 50%",onComplete:function(){d("html").css("overflow-x","inherit"); void 0!==a&&a()}}))})});return this}};d(".popmake").css({visibility:"visible"}).hide();d(document).ready(function(){d(".popmake").popmake().each(function(){var a=d(this),e=a.data("popmake"),e=".popmake-"+e.id+", .popmake-"+e.slug;d(e).css({cursor:"pointer"});d(document).on("click",e,function(c){c.preventDefault();c.stopPropagation();d.fn.popmake.last_open_trigger=d.fn.popmake.utilities.getXPath(this);a.popmake("open")})})})})(jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
/**
|
2 |
+
* Popup Maker v1.0.2
|
3 |
*/
|
4 |
+
(function(c){c.isFunction(c.fn.on)||(c.fn.on=function(a,e,d){return this.delegate(e,a,d)},c.fn.off=function(a,e,d){return this.undelegate(e,a,d)});c.fn.popmake=function(a){if(c.fn.popmake.methods[a])return c.fn.popmake.methods[a].apply(this,Array.prototype.slice.call(arguments,1));if("object"===typeof a||!a)return c.fn.popmake.methods.init.apply(this,arguments);c.error("Method "+a+" does not exist on jQuery.fn.popmake")};c.fn.popmake.last_open_popup=null;c.fn.popmake.last_open_trigger=null;c.fn.popmake.last_close_trigger=
|
5 |
+
null;c.fn.popmake.methods={init:function(a){return this.each(function(){var e=c(this),d=c.extend(!0,{},c.fn.popmake.defaults,e.data("popmake"),a);e.parent().is("body")||e.appendTo("body");c("#"+d.overlay.attr.id).length||c("<div>").attr(d.overlay.attr).appendTo("body");c(window).on("resize",function(){e.hasClass("active")&&c.fn.popmake.utilities.throttle(setTimeout(function(){e.popmake("reposition")},25),500,!1)});"string"===typeof popmake_powered_by&&""!==popmake_powered_by&&c(".popmake-content",
|
6 |
+
e).append(c(popmake_powered_by));e.data("popmake",d).on("popmakeBeforeOpen.hide_popup",function(){c(this).css({visibility:"visible"}).hide().addClass(d.container.active_class);d.meta.display.stackable||e.popmake("close_all")}).on("popmakeAfterClose.close_overlay",function(){var a=c("#"+d.overlay.attr.id);a.length&&a.is(":visible")&&a.fadeOut(d.close.close_speed)}).on("popmakeAfterClose.reset_videos",function(){c("iframe",e).filter('[src*="youtube"],[src*="vimeo"]').each(function(){var a=c(this).attr("src");
|
7 |
+
c(this).attr("src","").attr("src",a)})}).on("popmakeBeforeOpen.setup_close",function(){e.popmake("setup_close")}).on("popmakeBeforeOpen.retheme",function(){e.popmake("retheme")}).on("popmakeBeforeOpen.reposition",function(){e.popmake("reposition")}).trigger("popmakeInit");return this})},setup_close:function(){var a=c(this),e=a.data("popmake"),d=c("#"+e.overlay.attr.id),b=c("."+e.close.attr["class"],a);b.off("click.popmake").on("click.popmake",function(b){b.preventDefault();b.stopPropagation();c.fn.popmake.last_close_trigger=
|
8 |
+
"Close Button";a.popmake("close")});if(e.meta.close.esc_press||e.meta.close.f4_press)c(window).off("keyup.popmake").on("keyup.popmake",function(b){27===b.keyCode&&e.meta.close.esc_press&&(c.fn.popmake.last_close_trigger="ESC Key",a.popmake("close"));115===b.keyCode&&e.meta.close.f4_press&&(c.fn.popmake.last_close_trigger="F4 Key",a.popmake("close"))});if(e.meta.close.overlay_click)d.off("click.popmake").on("click.popmake",function(b){b.preventDefault();b.stopPropagation();c.fn.popmake.last_close_trigger=
|
9 |
+
"Overlay Click";a.popmake("close")});a.on("popmakeAfterClose",function(){c(window).off("keyup.popmake");d.off("click.popmake");b.off("click.popmake")}).trigger("popmakeSetupClose")},open:function(a){var e=c(this),d=e.data("popmake");e.trigger("popmakeBeforeOpen").popmake("animate",d.meta.display.animation_type,function(){e.addClass("active").trigger("popmakeAfterOpen");c.fn.popmake.last_open_popup=e;void 0!==a&&a()});return this},close:function(){return this.each(function(){var a=c(this),e=a.data("popmake");
|
10 |
+
a.trigger("popmakeBeforeClose").fadeOut(e.close.close_speed,function(){a.removeClass("active").trigger("popmakeAfterClose")});return this})},close_all:function(){var a=c(this).data("popmake");c("."+a.container.attr["class"]).removeClass("active").hide(0);return this},reposition:function(a){c(this).trigger("popmakeBeforeReposition");var e=c(this),d=e.data("popmake"),b=d.meta.display,g=b.location,f={my:"",at:""},h=!1;0<=g.indexOf("left")&&(f={my:f.my+" left"+(0!==b.position_left?"+"+b.position_left:
|
11 |
+
""),at:f.at+" left"});0<=g.indexOf("right")&&(f={my:f.my+" right"+(0!==b.position_right?"-"+b.position_right:""),at:f.at+" right"});0<=g.indexOf("center")&&(f="center"===g?{my:"center",at:"center"}:{my:f.my+" center",at:f.at+" center"});0<=g.indexOf("top")&&(f={my:f.my+" top"+(0!==b.position_top?"+"+b.position_top:""),at:f.at+" top"});0<=g.indexOf("bottom")&&(f={my:f.my+" bottom"+(0!==b.position_bottom?"-"+b.position_bottom:""),at:f.at+" bottom"});f.my=c.trim(f.my);f.at=c.trim(f.at);f.of=window;f.collision=
|
12 |
+
"fit";f.using="function"===typeof a?a:c.fn.popmake.callbacks.reposition_using;e.is(":hidden")&&(h=e.css("opacity"),e.css({opacity:0}).show());b.position_fixed?e.addClass("fixed"):e.removeClass("fixed");"custom"===d.meta.display.size?e.css({width:d.meta.display.custom_width+d.meta.display.custom_width_unit,height:d.meta.display.custom_height_auto?"auto":d.meta.display.custom_height+d.meta.display.custom_height_unit}):"auto"!==d.meta.display.size&&(""!==d.meta.display.responsive_min_width&&e.css({maxWidth:d.meta.display.responsive_min_width+
|
13 |
+
d.meta.display.responsive_min_width_unit}),""!==d.meta.display.responsive_max_width&&e.css({maxWidth:d.meta.display.responsive_max_width+d.meta.display.responsive_max_width_unit}));e.addClass("custom-position").position(f).trigger("popmakeAfterReposition");h&&e.css({opacity:h}).hide();return this},retheme:function(a){c(this).trigger("popmakeBeforeRetheme");var e=c(this),d=e.data("popmake"),b=c("#"+d.overlay.attr.id),g=c("."+d.title.attr["class"],e),f=c("> ."+d.content.attr["class"],e),h=c("> ."+d.close.attr["class"],
|
14 |
+
e),k;void 0===a&&(a=c.fn.popmake.themes[d.theme_id],void 0===a&&(a=c.fn.popmake.themes[1]));d="yes"===a.container.boxshadow_inset?"inset ":"";k="yes"===a.close.boxshadow_inset?"inset ":"";b.removeAttr("style").css({backgroundColor:c.fn.popmake.utilities.convert_hex(a.overlay.background_color,a.overlay.background_opacity)});e.css({padding:a.container.padding+"px",backgroundColor:c.fn.popmake.utilities.convert_hex(a.container.background_color,a.container.background_opacity),borderStyle:a.container.border_style,
|
15 |
+
borderColor:a.container.border_color,borderWidth:a.container.border_width+"px",borderRadius:a.container.border_radius+"px",boxShadow:d+a.container.boxshadow_horizontal+"px "+a.container.boxshadow_vertical+"px "+a.container.boxshadow_blur+"px "+a.container.boxshadow_spread+"px "+c.fn.popmake.utilities.convert_hex(a.container.boxshadow_color,a.container.boxshadow_opacity)});g.css({color:a.title.font_color,lineHeight:a.title.line_height+"px",fontSize:a.title.font_size+"px",fontFamily:a.title.font_family,
|
16 |
+
fontWeight:a.title.font_weight,fontStyle:a.title.font_style,textAlign:a.title.text_align,textShadow:a.title.textshadow_horizontal+"px "+a.title.textshadow_vertical+"px "+a.title.textshadow_blur+"px "+c.fn.popmake.utilities.convert_hex(a.title.textshadow_color,a.title.textshadow_opacity)});f.css({color:a.content.font_color,fontFamily:a.content.font_family,fontWeight:a.content.font_weight,fontStyle:a.content.font_style});c("p, label",f).css({color:a.content.font_color,fontFamily:a.content.font_family});
|
17 |
+
h.html(a.close.text).css({padding:a.close.padding+"px",backgroundColor:c.fn.popmake.utilities.convert_hex(a.close.background_color,a.close.background_opacity),color:a.close.font_color,lineHeight:a.close.line_height+"px",fontSize:a.close.font_size+"px",fontWeight:a.close.font_weight,fontStyle:a.close.font_style,fontFamily:a.close.font_family,borderStyle:a.close.border_style,borderColor:a.close.border_color,borderWidth:a.close.border_width+"px",borderRadius:a.close.border_radius+"px",boxShadow:k+a.close.boxshadow_horizontal+
|
18 |
+
"px "+a.close.boxshadow_vertical+"px "+a.close.boxshadow_blur+"px "+a.close.boxshadow_spread+"px "+c.fn.popmake.utilities.convert_hex(a.close.boxshadow_color,a.close.boxshadow_opacity),textShadow:a.close.textshadow_horizontal+"px "+a.close.textshadow_vertical+"px "+a.close.textshadow_blur+"px "+c.fn.popmake.utilities.convert_hex(a.close.textshadow_color,a.close.textshadow_opacity)});switch(a.close.location){case "topleft":h.css({top:a.close.position_top+"px",left:a.close.position_left+"px"});break;
|
19 |
+
case "topright":h.css({top:a.close.position_top+"px",right:a.close.position_right+"px"});break;case "bottomleft":h.css({bottom:a.close.position_bottom+"px",left:a.close.position_left+"px"});break;case "bottomright":h.css({bottom:a.close.position_bottom+"px",right:a.close.position_right+"px"})}e.trigger("popmakeAfterRetheme",[a]);return this},animate_overlay:function(a,e,d){if(c(this).data("popmake").meta.display.overlay_disabled)d();else{if(c.fn.popmake.overlay_animations[a])return c.fn.popmake.overlay_animations[a].apply(this,
|
20 |
+
Array.prototype.slice.call(arguments,1));c.error("Animation style "+c.fn.popmake.overlay_animations+" does not exist.")}return this},animate:function(a,e){if(c.fn.popmake.animations[a])return c.fn.popmake.animations[a].apply(this,Array.prototype.slice.call(arguments,1));c.error("Animation style "+c.fn.popmake.animations+" does not exist.");return this},animation_origin:function(a){var e=c(this),d={my:"",at:""};switch(a){case "top":d={my:"left+"+e.offset().left+" bottom-100",at:"left top"};break;case "bottom":d=
|
21 |
+
{my:"left+"+e.offset().left+" top+100",at:"left bottom"};break;case "left":d={my:"right top+"+e.offset().top,at:"left top"};break;case "right":d={my:"left top+"+e.offset().top,at:"right top"};break;default:0<=a.indexOf("left")&&(d={my:d.my+" right",at:d.at+" left"}),0<=a.indexOf("right")&&(d={my:d.my+" left",at:d.at+" right"}),0<=a.indexOf("center")&&(d={my:d.my+" center",at:d.at+" center"}),0<=a.indexOf("top")&&(d={my:d.my+" bottom-100",at:d.at+" top"}),0<=a.indexOf("bottom")&&(d={my:d.my+" top+100",
|
22 |
+
at:d.at+" bottom"}),d.my=c.trim(d.my),d.at=c.trim(d.at)}d.of=window;d.collision="none";return d}};c.fn.popmake.callbacks={reposition_using:function(a){c(this).css(a)}};c.fn.popmake.utilities={convert_hex:function(a,e){a=a.replace("#","");var d=parseInt(a.substring(0,2),16),b=parseInt(a.substring(2,4),16),c=parseInt(a.substring(4,6),16);return"rgba("+d+","+b+","+c+","+e/100+")"},debounce:function(a,c){var d;return function(){var b=this,g=arguments;window.clearTimeout(d);d=window.setTimeout(function(){a.apply(b,
|
23 |
+
g)},c)}},throttle:function(a,c){var d=!1,b=function(){d=!1};return function(){d||(a.apply(this,arguments),window.setTimeout(b,c),d=!0)}},getXPath:function(a){var e=[],d,b,g,f,h;c.each(c(a).parents(),function(a,l){d=c(l);b=d.attr("id")||"";g=d.attr("class")||"";f=d.get(0).tagName.toLowerCase();h=d.parent().children(f).index(d);if("body"===f)return!1;0<g.length&&(g=g.split(" "),g=g[0]);e.push(f+(0<b.length?"#"+b:0<g.length?"."+g.split(" ").join("."):":eq("+h+")"))});return e.reverse().join(" > ")},
|
24 |
+
strtotime:function(a,c){function d(a){var b=a.split(" ");a=b[0];var c=b[1].substring(0,3),d=/\d+/.test(a),e=("last"===a?-1:1)*("ago"===b[2]?-1:1);d&&(e*=parseInt(a,10));if(k.hasOwnProperty(c)&&!b[1].match(/^mon(day|\.)?$/i))return f["set"+k[c]](f["get"+k[c]]()+e);if("wee"===c)return f.setDate(f.getDate()+7*e);if("next"===a||"last"===a)b=e,c=h[c],void 0!==c&&(c-=f.getDay(),0===c?c=7*b:0<c&&"last"===a?c-=7:0>c&&"next"===a&&(c+=7),f.setDate(f.getDate()+c));else if(!d)return!1;return!0}var b,g,f,h,k,
|
25 |
+
l;if(!a)return!1;a=a.replace(/^\s+|\s+$/g,"").replace(/\s{2,}/g," ").replace(/[\t\r\n]/g,"").toLowerCase();if((b=a.match(/^(\d{1,4})([\-\.\/\:])(\d{1,2})([\-\.\/\:])(\d{1,4})(?:\s(\d{1,2}):(\d{2})?:?(\d{2})?)?(?:\s([A-Z]+)?)?$/))&&b[2]===b[4])if(1901<b[1])switch(b[2]){case "-":return 12<b[3]||31<b[5]?!1:new Date(b[1],parseInt(b[3],10)-1,b[5],b[6]||0,b[7]||0,b[8]||0,b[9]||0)/1E3;case ".":return!1;case "/":return 12<b[3]||31<b[5]?!1:new Date(b[1],parseInt(b[3],10)-1,b[5],b[6]||0,b[7]||0,b[8]||0,b[9]||
|
26 |
+
0)/1E3}else if(1901<b[5])switch(b[2]){case "-":return 12<b[3]||31<b[1]?!1:new Date(b[5],parseInt(b[3],10)-1,b[1],b[6]||0,b[7]||0,b[8]||0,b[9]||0)/1E3;case ".":return 12<b[3]||31<b[1]?!1:new Date(b[5],parseInt(b[3],10)-1,b[1],b[6]||0,b[7]||0,b[8]||0,b[9]||0)/1E3;case "/":return 12<b[1]||31<b[3]?!1:new Date(b[5],parseInt(b[1],10)-1,b[3],b[6]||0,b[7]||0,b[8]||0,b[9]||0)/1E3}else switch(b[2]){case "-":if(12<b[3]||31<b[5]||70>b[1]&&38<b[1])return!1;g=0<=b[1]&&38>=b[1]?+b[1]+2E3:b[1];return new Date(g,
|
27 |
+
parseInt(b[3],10)-1,b[5],b[6]||0,b[7]||0,b[8]||0,b[9]||0)/1E3;case ".":if(70<=b[5])return 12<b[3]||31<b[1]?!1:new Date(b[5],parseInt(b[3],10)-1,b[1],b[6]||0,b[7]||0,b[8]||0,b[9]||0)/1E3;if(60>b[5]&&!b[6]){if(23<b[1]||59<b[3])return!1;g=new Date;return new Date(g.getFullYear(),g.getMonth(),g.getDate(),b[1]||0,b[3]||0,b[5]||0,b[9]||0)/1E3}return!1;case "/":if(12<b[1]||31<b[3]||70>b[5]&&38<b[5])return!1;g=0<=b[5]&&38>=b[5]?+b[5]+2E3:b[5];return new Date(g,parseInt(b[1],10)-1,b[3],b[6]||0,b[7]||0,b[8]||
|
28 |
+
0,b[9]||0)/1E3;case ":":if(23<b[1]||59<b[3]||59<b[5])return!1;g=new Date;return new Date(g.getFullYear(),g.getMonth(),g.getDate(),b[1]||0,b[3]||0,b[5]||0)/1E3}if("now"===a)return null===c||isNaN(c)?(new Date).getTime()/1E3||0:c||0;b=Date.parse(a);if(!isNaN(b))return b/1E3||0;f=c?new Date(1E3*c):new Date;h={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};k={yea:"FullYear",mon:"Month",day:"Date",hou:"Hours",min:"Minutes",sec:"Seconds"};b=a.match(RegExp("([+-]?\\d+\\s(years?|months?|weeks?|days?|hours?|minutes?|min|seconds?|sec|sunday|sun\\.?|monday|mon\\.?|tuesday|tue\\.?|wednesday|wed\\.?|thursday|thu\\.?|friday|fri\\.?|saturday|sat\\.?)|(last|next)\\s(years?|months?|weeks?|days?|hours?|minutes?|min|seconds?|sec|sunday|sun\\.?|monday|mon\\.?|tuesday|tue\\.?|wednesday|wed\\.?|thursday|thu\\.?|friday|fri\\.?|saturday|sat\\.?))(\\sago)?",
|
29 |
+
"gi"));if(!b)return!1;l=0;for(g=b.length;l<g;l+=1)if(!d(b[l]))return!1;return f.getTime()/1E3}};c.fn.popmake.utilies=c.fn.popmake.utilities;c.fn.popmake.defaults={theme_id:popmake_default_theme,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,
|
30 |
+
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"}}};c.fn.popmake.themes=popmake_themes;c.fn.popmake.overlay_animations=
|
31 |
+
{none:function(a,e){var d=c(this).data("popmake");c("#"+d.overlay.attr.id).show(a,e)},fade:function(a,e){var d=c(this).data("popmake");c("#"+d.overlay.attr.id).fadeIn(a,e)},slide:function(a,e){var d=c(this).data("popmake");c("#"+d.overlay.attr.id).slideDown(a,e)}};c.fn.popmake.animations={none:function(a){var e=c(this);e.popmake("animate_overlay","none",0,function(){e.css({display:"block"});void 0!==a&&a()});return this},slide:function(a){var e=c(this).show(0).css({opacity:0}),d=e.data("popmake"),
|
32 |
+
b=d.meta.display.animation_speed/2E3,d=e.popmake("animation_origin",d.meta.display.animation_origin);c("html").css("overflow-x","hidden");e.position(d).css({opacity:1}).popmake("animate_overlay","fade",1E3*b,function(){e.popmake("reposition",function(d){TweenLite.to(e,b,c.extend(d,{onComplete:function(){c("html").css("overflow-x","inherit");void 0!==a&&a()}}))})});return this},fade:function(a){var e=c(this).show(0).css({opacity:0}),d=e.data("popmake").meta.display.animation_speed/2E3;e.popmake("animate_overlay",
|
33 |
+
"fade",1E3*d,function(){TweenLite.to(e,d,{opacity:1,onComplete:function(){void 0!==a&&a()}})});return this},fadeAndSlide:function(a){var e=c(this).show(0).css({opacity:0}),d=e.data("popmake"),b=d.meta.display.animation_speed/2E3,d=e.popmake("animation_origin",d.meta.display.animation_origin);c("html").css("overflow-x","hidden");e.position(d).popmake("animate_overlay","fade",1E3*b,function(){e.popmake("reposition",function(d){TweenLite.to(e,b,c.extend(d,{opacity:1,onComplete:function(){c("html").css("overflow-x",
|
34 |
+
"inherit");void 0!==a&&a()}}))})});return this},grow:function(a){var e=c(this).show(0).css({opacity:0}),d=e.data("popmake"),b=d.meta.display.animation_speed/2E3,d=d.meta.display.animation_origin;if("top"===d||"bottom"===d)d="center "+d;if("left"===d||"right"===d)d+=" center";TweenLite.to(e,0,{transformOrigin:d,scale:0,opacity:1});e.popmake("animate_overlay","fade",1E3*b,function(){e.popmake("reposition",function(c){TweenLite.to(e,b,{scale:1,onComplete:function(){void 0!==a&&a()}})})});return this},
|
35 |
+
growAndSlide:function(a){var e=c(this).show(0).css({opacity:0}),d=e.data("popmake"),b=d.meta.display.animation_speed/2E3,d=e.popmake("animation_origin",d.meta.display.animation_origin);c("html").css("overflow-x","hidden");e.position(d);TweenLite.to(e,0,{scale:0,opacity:1,transformOrigin:"0 0"});e.popmake("animate_overlay","fade",1E3*b,function(){e.popmake("reposition",function(d){TweenLite.to(e,b,c.extend(d,{scale:1,transformOrigin:"50% 50%",onComplete:function(){c("html").css("overflow-x","inherit");
|
36 |
+
void 0!==a&&a()}}))})});return this}};c(".popmake").css({visibility:"visible"}).hide();c(document).ready(function(){c(".popmake").popmake().each(function(){var a=c(this),e=a.data("popmake"),e=".popmake-"+e.id+", .popmake-"+e.slug;c(e).css({cursor:"pointer"});c(document).on("click",e,function(d){d.preventDefault();d.stopPropagation();c.fn.popmake.last_open_trigger=c.fn.popmake.utilities.getXPath(this);a.popmake("open")})})})})(jQuery);
|
assets/styles/popup-maker-admin.css
CHANGED
@@ -311,12 +311,12 @@ div.popmake-upgrade-tip {
|
|
311 |
}
|
312 |
.tab-box a {
|
313 |
font:300 18px/1.125 "Oswald";
|
314 |
-
color:#
|
315 |
}
|
316 |
.tab-box button {
|
317 |
font:300 18px/1.125 "Oswald";
|
318 |
color:#fff;
|
319 |
-
background:#
|
320 |
box-shadow: none;
|
321 |
border:0;
|
322 |
padding:5px 10px 7px;
|
@@ -360,6 +360,9 @@ div.popmake-upgrade-tip {
|
|
360 |
text-align: center;
|
361 |
text-transform: uppercase;
|
362 |
}
|
|
|
|
|
|
|
363 |
.extensions-available li > .action-links {
|
364 |
margin:0 10px;
|
365 |
text-align: center;
|
311 |
}
|
312 |
.tab-box a {
|
313 |
font:300 18px/1.125 "Oswald";
|
314 |
+
color:#9ABA27;
|
315 |
}
|
316 |
.tab-box button {
|
317 |
font:300 18px/1.125 "Oswald";
|
318 |
color:#fff;
|
319 |
+
background:#9ABA27;
|
320 |
box-shadow: none;
|
321 |
border:0;
|
322 |
padding:5px 10px 7px;
|
360 |
text-align: center;
|
361 |
text-transform: uppercase;
|
362 |
}
|
363 |
+
.extensions-available h3 a {
|
364 |
+
color: inherit;
|
365 |
+
}
|
366 |
.extensions-available li > .action-links {
|
367 |
margin:0 10px;
|
368 |
text-align: center;
|
assets/styles/popup-maker-admin.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
h3.title{color:#9aba27}#popuptitlediv #popuptitle{background-color:#fff;font-size:1.5em;height:1.8em;line-height:100%;margin:0;outline:medium none;padding:2px 8px;width:100%}#popuptitlediv #popuptitle input{color:#777;font-size:1.7em;padding:11px 10px;position:absolute}#popuptitlediv #popuptitle-prompt-text{font-size:1.4em;padding:8px 10px}#titlediv #title{margin:0 0 1em}.posttypediv,.taxonomydiv{margin-bottom:10px;clear:both;overflow:auto}option.bold{font-weight:700;font-size:1.125em}.popmake-range-manual{padding-right:25px;text-align:right;width:80px}.range-value-unit{position:relative;display:inline-block;margin-left:-30px;margin-right:10px;width:20px;text-align:left}.title-divider th{border-top:1px solid #ccc;padding:0}.form-table td,.form-table tr{padding-top:10px}.title-divider .title{font-size:1.125em;padding-left:0!important;padding-top:20px!important;padding-bottom:0!important}#menu-posts-popup ul.wp-submenu li:nth-child(0n+8) a{color:#9ABA27}.popmake-upgrade-tip{color:#333;line-height:2em!important}div.popmake-upgrade-tip{margin-bottom:15px;display:block;font-weight:700}.popmake-upgrade-tip img{float:left;margin-right:15px}.popmake-newsletter-optin{display:none;position:relative;width:100%;margin-bottom:10px}.popmake-newsletter-optin img{max-width:100%;width:100%}.popmake-newsletter-optin .popmake-optin-dismiss{display:inline-block;position:absolute;right:5px;bottom:5px;cursor:pointer;color:#6B8129;font-family:"Open Sans",sans-serif;text-transform:uppercase;font-size:.875em}.popmake-newsletter-optin .popmake-optin-dismiss:hover{color:#9ABA27}#popmake_popup_theme_preview{z-index:100}#popmake_popup_theme_preview .inside{margin-top:0;background:url(http://s.wordpress.com/mshots/v1/http://www.wordpress.org) no-repeat center top}#popmake_popup_theme_preview .empreview{padding-top:25px}.example-popup,.example-popup:before,.example-popup:after{-moz-box-sizing:border-box}.empreview .example-popup-overlay{position:absolute;display:block;width:100%;height:100%;top:0;left:0}.empreview .example-popup{display:block;position:relative;width:95%;max-width:400px;margin:0 auto 25px;font-size:16px;position:relative;z-index:99}.empreview .example-popup .close-popup{text-decoration:none;text-align:center;line-height:1;position:absolute;font-weight:700;cursor:pointer;min-width:1em}.popmake-support-links{list-style:none}.popmake-support-links li{margin-bottom:10px}.popmake-support-links a{color:#20252b;font-family:"Montserrat";font-size:1.25em;text-transform:uppercase;text-decoration:none}.popmake-support-links a span{margin-left:10px}.popmake-support-links a img{top:6px;position:relative;min-width:24px;max-width:24px;min-height:24px;max-height:24px}.button.rounded{box-shadow:none;border:0;border-radius:2px;background:#9aba27;color:#fff;padding-left:18px;padding-right:18px;transition:transform .5s;margin-bottom:10px}.button.rounded:hover,.button.rounded:focus{color:#fff;background:#20252b;transform:scale(1.125)}#popmake_popup_support{margin-bottom:10px}#popmake_popup_share .handlediv{display:none}#popmake_popup_share .hndle{display:none}#popmake_popup_share .inside{margin:0 0 20px}.loveit-shareit{font-weight:700!important;font-size:28px!important;color:#333;text-transform:uppercase}.loveit-shareit span{color:#9ABA27}.follow-box{text-align:center;padding:14px 36px;background:#fff;border:1px solid #e5e5e5}.share-buttons{margin:0 auto;width:68%;display:block;clear:both}.share-buttons li{text-align:center;width:32%;display:inline-block;float:left;margin-right:1%;margin-bottom:0}.share-buttons li:last-child{margin-right:0}.popmake-badge{padding-top:150px;height:52px;width:185px;color:#666;font-weight:700;font-size:14px;text-align:center;text-shadow:0 1px 0 rgba(255,255,255,.8);margin:0 -5px;background:url(../images/welcome/logo.png) no-repeat center center}.about-wrap .popmake-badge{position:absolute;top:0;right:0}.popmake-welcome-screenshots{float:right;margin-left:10px!important;padding:0 7.5em}.popmake-wrap .feature-section{margin-top:20px}.tab-box{margin-top:40px;position:relative;border:1px solid #ccc;max-width:500px;padding:20px 10px 5px}.tab-box h4{font:13px/30px "Open Sans",sans-serif;font-weight:700;position:absolute;background:#ccc;display:inline-block;padding:0 10px;top:-48px;left:-1px}.tab-box a{font:300 18px/1.125 "Oswald";color:#
|
1 |
+
h3.title{color:#9aba27}#popuptitlediv #popuptitle{background-color:#fff;font-size:1.5em;height:1.8em;line-height:100%;margin:0;outline:medium none;padding:2px 8px;width:100%}#popuptitlediv #popuptitle input{color:#777;font-size:1.7em;padding:11px 10px;position:absolute}#popuptitlediv #popuptitle-prompt-text{font-size:1.4em;padding:8px 10px}#titlediv #title{margin:0 0 1em}.posttypediv,.taxonomydiv{margin-bottom:10px;clear:both;overflow:auto}option.bold{font-weight:700;font-size:1.125em}.popmake-range-manual{padding-right:25px;text-align:right;width:80px}.range-value-unit{position:relative;display:inline-block;margin-left:-30px;margin-right:10px;width:20px;text-align:left}.title-divider th{border-top:1px solid #ccc;padding:0}.form-table td,.form-table tr{padding-top:10px}.title-divider .title{font-size:1.125em;padding-left:0!important;padding-top:20px!important;padding-bottom:0!important}#menu-posts-popup ul.wp-submenu li:nth-child(0n+8) a{color:#9ABA27}.popmake-upgrade-tip{color:#333;line-height:2em!important}div.popmake-upgrade-tip{margin-bottom:15px;display:block;font-weight:700}.popmake-upgrade-tip img{float:left;margin-right:15px}.popmake-newsletter-optin{display:none;position:relative;width:100%;margin-bottom:10px}.popmake-newsletter-optin img{max-width:100%;width:100%}.popmake-newsletter-optin .popmake-optin-dismiss{display:inline-block;position:absolute;right:5px;bottom:5px;cursor:pointer;color:#6B8129;font-family:"Open Sans",sans-serif;text-transform:uppercase;font-size:.875em}.popmake-newsletter-optin .popmake-optin-dismiss:hover{color:#9ABA27}#popmake_popup_theme_preview{z-index:100}#popmake_popup_theme_preview .inside{margin-top:0;background:url(http://s.wordpress.com/mshots/v1/http://www.wordpress.org) no-repeat center top}#popmake_popup_theme_preview .empreview{padding-top:25px}.example-popup,.example-popup:before,.example-popup:after{-moz-box-sizing:border-box}.empreview .example-popup-overlay{position:absolute;display:block;width:100%;height:100%;top:0;left:0}.empreview .example-popup{display:block;position:relative;width:95%;max-width:400px;margin:0 auto 25px;font-size:16px;position:relative;z-index:99}.empreview .example-popup .close-popup{text-decoration:none;text-align:center;line-height:1;position:absolute;font-weight:700;cursor:pointer;min-width:1em}.popmake-support-links{list-style:none}.popmake-support-links li{margin-bottom:10px}.popmake-support-links a{color:#20252b;font-family:"Montserrat";font-size:1.25em;text-transform:uppercase;text-decoration:none}.popmake-support-links a span{margin-left:10px}.popmake-support-links a img{top:6px;position:relative;min-width:24px;max-width:24px;min-height:24px;max-height:24px}.button.rounded{box-shadow:none;border:0;border-radius:2px;background:#9aba27;color:#fff;padding-left:18px;padding-right:18px;transition:transform .5s;margin-bottom:10px}.button.rounded:hover,.button.rounded:focus{color:#fff;background:#20252b;transform:scale(1.125)}#popmake_popup_support{margin-bottom:10px}#popmake_popup_share .handlediv{display:none}#popmake_popup_share .hndle{display:none}#popmake_popup_share .inside{margin:0 0 20px}.loveit-shareit{font-weight:700!important;font-size:28px!important;color:#333;text-transform:uppercase}.loveit-shareit span{color:#9ABA27}.follow-box{text-align:center;padding:14px 36px;background:#fff;border:1px solid #e5e5e5}.share-buttons{margin:0 auto;width:68%;display:block;clear:both}.share-buttons li{text-align:center;width:32%;display:inline-block;float:left;margin-right:1%;margin-bottom:0}.share-buttons li:last-child{margin-right:0}.popmake-badge{padding-top:150px;height:52px;width:185px;color:#666;font-weight:700;font-size:14px;text-align:center;text-shadow:0 1px 0 rgba(255,255,255,.8);margin:0 -5px;background:url(../images/welcome/logo.png) no-repeat center center}.about-wrap .popmake-badge{position:absolute;top:0;right:0}.popmake-welcome-screenshots{float:right;margin-left:10px!important;padding:0 7.5em}.popmake-wrap .feature-section{margin-top:20px}.tab-box{margin-top:40px;position:relative;border:1px solid #ccc;max-width:500px;padding:20px 10px 5px}.tab-box h4{font:13px/30px "Open Sans",sans-serif;font-weight:700;position:absolute;background:#ccc;display:inline-block;padding:0 10px;top:-48px;left:-1px}.tab-box a{font:300 18px/1.125 "Oswald";color:#9ABA27}.tab-box button{font:300 18px/1.125 "Oswald";color:#fff;background:#9ABA27;box-shadow:none;border:0;padding:5px 10px 7px;cursor:pointer;transition:transform .5s}.tab-box button:hover{transform:scale(1.125)}.extensions-available{display:block}.extensions-available img{width:100%;display:block;height:auto;max-width:100%}.extensions-available li{box-sizing:border-box;border:1px solid #ccc;padding:0 0 4px;background:#fff;vertical-align:top;width:280px;margin:0 10px 20px;display:inline;float:left;-webkit-box-shadow:1px 1px 4px rgba(0,0,0,.25);-moz-box-shadow:1px 1px 4px rgba(0,0,0,.25);box-shadow:1px 1px 4px rgba(0,0,0,.25)}.extensions-available h3{font:16px/1.5 "Montserrat" !important;text-align:center;text-transform:uppercase}.extensions-available h3 a{color:inherit}.extensions-available li>.action-links{margin:0 10px;text-align:center;display:block}.extensions-available .action-links .button{display:inline-block;margin-bottom:10px;margin-top:8px;background:#9ABA27;color:#fff;border-radius:0;border:0;box-shadow:none;font-weight:700;padding:7px 30px;height:auto;text-transform:uppercase;transition:transform .5s}.extensions-available .action-links .button.install{background:#00a651}.extensions-available .action-links .button:hover{transform:scale(1.125)}.extensions-available p{margin:10px;color:#717171;font-size:14px;text-align:center;font-style:italic;min-height:7.5em}.extensions-available a{display:block;text-align:center;text-decoration:none}@media only screen and (max-width:360px){.extensions-available li{display:block;margin:0 0 10px;width:100%}}@media only screen and (min-width:361px) and (max-width:768px){.extensions-available li{width:320px}}@media only screen and (min-width:769px) and (max-width:980px){.extensions-available li{width:240px}}
|
includes/admin/admin-setup.php
CHANGED
@@ -4,7 +4,7 @@ function popmake_plugin_action_links($links, $file) {
|
|
4 |
$settings_page_url = admin_url('edit.php?post_type=popup&page=settings');
|
5 |
$plugin_action_links = apply_filters('popmake_action_links', array(
|
6 |
//'settings' => '<a href="'. $settings_page_url .'">'.__( 'Settings', 'popup-maker' ).'</a>',
|
7 |
-
'extensions' => '<a href="https://wppopupmaker.com/extensions?utm_source=
|
8 |
));
|
9 |
foreach($plugin_action_links as $link) {
|
10 |
array_unshift( $links, $link );
|
@@ -28,7 +28,7 @@ function popmake_admin_notice() {
|
|
28 |
if(popmake_is_admin_page()) {
|
29 |
if(!get_user_meta( get_current_user_id(), '_popmake_dismiss_optin_newsletter_promo_banner', true )) {?>
|
30 |
<div class="popmake-optin popmake-newsletter-optin">
|
31 |
-
<a href="https://wppopupmaker.com/newsletter-sign-up" target="_blank" class="newsletter-banner">
|
32 |
<img src="<?php echo POPMAKE_URL; ?>/assets/images/admin/newsletter-banner.png"/>
|
33 |
</a>
|
34 |
<a class="popmake-optin-dismiss" data-optin-name="newsletter_promo_banner" data-optin-type="user"><?php _e( 'No Thanks', 'popup-maker' ); ?></a>
|
4 |
$settings_page_url = admin_url('edit.php?post_type=popup&page=settings');
|
5 |
$plugin_action_links = apply_filters('popmake_action_links', array(
|
6 |
//'settings' => '<a href="'. $settings_page_url .'">'.__( 'Settings', 'popup-maker' ).'</a>',
|
7 |
+
'extensions' => '<a href="https://wppopupmaker.com/extensions?utm_source=WP+Admin+Plugins+Page&utm_medium=Text+Link&utm_campaign=Extensions" target="_blank">'.__('Extensions', 'popup-maker' ).'</a>',
|
8 |
));
|
9 |
foreach($plugin_action_links as $link) {
|
10 |
array_unshift( $links, $link );
|
28 |
if(popmake_is_admin_page()) {
|
29 |
if(!get_user_meta( get_current_user_id(), '_popmake_dismiss_optin_newsletter_promo_banner', true )) {?>
|
30 |
<div class="popmake-optin popmake-newsletter-optin">
|
31 |
+
<a href="https://wppopupmaker.com/newsletter-sign-up?utm_source=Popmake+WP+Admin&utm_medium=Notification+Banner&utm_campaign=Newsletter+Signup" target="_blank" class="newsletter-banner">
|
32 |
<img src="<?php echo POPMAKE_URL; ?>/assets/images/admin/newsletter-banner.png"/>
|
33 |
</a>
|
34 |
<a class="popmake-optin-dismiss" data-optin-name="newsletter_promo_banner" data-optin-type="user"><?php _e( 'No Thanks', 'popup-maker' ); ?></a>
|
includes/admin/extensions/extensions-page.php
CHANGED
@@ -53,7 +53,11 @@ function popmake_extensions_page() {?>
|
|
53 |
{
|
54 |
foreach($extensions as $extension) :?>
|
55 |
<li class="available-extension-inner">
|
56 |
-
<h3
|
|
|
|
|
|
|
|
|
57 |
<?php $image = in_array($extension->slug, $existing_extension_images) ? POPMAKE_URL .'/assets/images/extensions/' . $extension->slug .'.jpg' : $extension->image;?>
|
58 |
<img class="extension-thumbnail" src="<?php esc_attr_e($image)?>">
|
59 |
<p><?php esc_html_e($extension->excerpt)?></p>
|
@@ -108,8 +112,7 @@ function popmake_extensions_page() {?>
|
|
108 |
*/
|
109 |
?>
|
110 |
<span class="action-links">
|
111 |
-
|
112 |
-
<span class="button"><?php _e( 'Coming Soon!', 'popup-maker' );?></span>
|
113 |
</span>
|
114 |
<!--<a href="<?php echo esc_url($extension->homepage);?>#features" target="_blank"><?php _e( 'View all the features.', 'popup-maker' );?></a>-->
|
115 |
</li>
|
53 |
{
|
54 |
foreach($extensions as $extension) :?>
|
55 |
<li class="available-extension-inner">
|
56 |
+
<h3>
|
57 |
+
<a target="_blank" href="<?php esc_attr_e($extension->homepage);?>?utm_source=Plugin+Admin&utm_medium=Extensions+Page+Extension+Names&utm_campaign=<?php esc_attr_e( str_replace(' ', '+', $extension->name) );?>">
|
58 |
+
<?php esc_html_e($extension->name)?>
|
59 |
+
</a>
|
60 |
+
</h3>
|
61 |
<?php $image = in_array($extension->slug, $existing_extension_images) ? POPMAKE_URL .'/assets/images/extensions/' . $extension->slug .'.jpg' : $extension->image;?>
|
62 |
<img class="extension-thumbnail" src="<?php esc_attr_e($image)?>">
|
63 |
<p><?php esc_html_e($extension->excerpt)?></p>
|
112 |
*/
|
113 |
?>
|
114 |
<span class="action-links">
|
115 |
+
<a class="button" target="_blank" href="<?php esc_attr_e($extension->homepage);?>?utm_source=Plugin+Admin&utm_medium=Extensions+Page+Extension+Buttons&utm_campaign=<?php esc_attr_e( str_replace(' ', '+', $extension->name) );?>"><?php _e( 'Coming SOon!', 'popup-maker' );?></a>
|
|
|
116 |
</span>
|
117 |
<!--<a href="<?php echo esc_url($extension->homepage);?>#features" target="_blank"><?php _e( 'View all the features.', 'popup-maker' );?></a>-->
|
118 |
</li>
|
includes/admin/metabox-share.php
CHANGED
@@ -9,17 +9,16 @@
|
|
9 |
* @since 1.0
|
10 |
* @return void
|
11 |
*/
|
12 |
-
function popmake_render_share_meta_box() {
|
13 |
-
global $post; ?>
|
14 |
<div id="popmake_share_fields" class="popmake_meta_table_wrap">
|
15 |
-
<?php do_action( 'popmake_share_meta_box_fields'
|
16 |
</div><?php
|
17 |
}
|
18 |
|
19 |
|
20 |
|
21 |
add_action('popmake_share_meta_box_fields', 'popmake_share_meta_box_links', 10);
|
22 |
-
function popmake_share_meta_box_links(
|
23 |
<h3 class="loveit-shareit" style="text-align:center">Love It? <span>Share It!</span></h3>
|
24 |
<ul class="share-buttons">
|
25 |
<li><div class="fb-like" data-href="https://wppopupmaker.com" data-width="100" data-ref="true" data-layout="box_count" data-action="like" data-show-faces="false" data-send="true"></div></li>
|
@@ -29,7 +28,7 @@ function popmake_share_meta_box_links( $popup_id ) { ?>
|
|
29 |
<br class="clear" />
|
30 |
<br class="clear" />
|
31 |
<div style="text-align:center">
|
32 |
-
<a class="button rounded" target="_blank" href="http://wordpress.org/support/view/plugin-reviews/popup-maker#postform"><?php _e( 'Rate Popup Maker on WP!', 'popup-maker' ); ?></a>
|
33 |
</div><?php
|
34 |
}
|
35 |
|
9 |
* @since 1.0
|
10 |
* @return void
|
11 |
*/
|
12 |
+
function popmake_render_share_meta_box() { ?>
|
|
|
13 |
<div id="popmake_share_fields" class="popmake_meta_table_wrap">
|
14 |
+
<?php do_action( 'popmake_share_meta_box_fields' ); ?>
|
15 |
</div><?php
|
16 |
}
|
17 |
|
18 |
|
19 |
|
20 |
add_action('popmake_share_meta_box_fields', 'popmake_share_meta_box_links', 10);
|
21 |
+
function popmake_share_meta_box_links() { ?>
|
22 |
<h3 class="loveit-shareit" style="text-align:center">Love It? <span>Share It!</span></h3>
|
23 |
<ul class="share-buttons">
|
24 |
<li><div class="fb-like" data-href="https://wppopupmaker.com" data-width="100" data-ref="true" data-layout="box_count" data-action="like" data-show-faces="false" data-send="true"></div></li>
|
28 |
<br class="clear" />
|
29 |
<br class="clear" />
|
30 |
<div style="text-align:center">
|
31 |
+
<a class="button rounded" target="_blank" href="http://wordpress.org/support/view/plugin-reviews/popup-maker#postform?utm_source=Plugin+Admin&utm_medium=WP+Review+Button&utm_campaign=WP+Reviews"><?php _e( 'Rate Popup Maker on WP!', 'popup-maker' ); ?></a>
|
32 |
</div><?php
|
33 |
}
|
34 |
|
includes/admin/metabox-support.php
CHANGED
@@ -9,32 +9,31 @@
|
|
9 |
* @since 1.0
|
10 |
* @return void
|
11 |
*/
|
12 |
-
function popmake_render_support_meta_box() {
|
13 |
-
global $post; ?>
|
14 |
<div id="popmake_support_fields" class="popmake_meta_table_wrap">
|
15 |
-
<?php do_action( 'popmake_support_meta_box_fields'
|
16 |
</div><?php
|
17 |
}
|
18 |
|
19 |
|
20 |
|
21 |
add_action('popmake_support_meta_box_fields', 'popmake_support_meta_box_links', 10);
|
22 |
-
function popmake_support_meta_box_links(
|
23 |
<ul class="popmake-support-links">
|
24 |
<li>
|
25 |
-
<a href="https://wppopupmaker.com/kb">
|
26 |
<img src="<?php echo POPMAKE_URL; ?>/assets/images/admin/knowledge-base.png"/>
|
27 |
<span><?php _e( 'Knowledge Base', 'popup-maker' ); ?></span>
|
28 |
</a>
|
29 |
</li>
|
30 |
<li>
|
31 |
-
<a href="https://wppopupmaker.com/support">
|
32 |
<img src="<?php echo POPMAKE_URL; ?>/assets/images/admin/member-forums.png"/>
|
33 |
<span><?php _e( 'Member Forums', 'popup-maker' ); ?></span>
|
34 |
</a>
|
35 |
</li>
|
36 |
<li>
|
37 |
-
<a href="https://wordpress.org/support/plugin/popup-maker">
|
38 |
<img src="<?php echo POPMAKE_URL; ?>/assets/images/admin/wordpress-forums.png"/>
|
39 |
<span><?php _e( 'WordPress Forums', 'popup-maker' ); ?></span>
|
40 |
</a>
|
9 |
* @since 1.0
|
10 |
* @return void
|
11 |
*/
|
12 |
+
function popmake_render_support_meta_box() { ?>
|
|
|
13 |
<div id="popmake_support_fields" class="popmake_meta_table_wrap">
|
14 |
+
<?php do_action( 'popmake_support_meta_box_fields' ); ?>
|
15 |
</div><?php
|
16 |
}
|
17 |
|
18 |
|
19 |
|
20 |
add_action('popmake_support_meta_box_fields', 'popmake_support_meta_box_links', 10);
|
21 |
+
function popmake_support_meta_box_links() { ?>
|
22 |
<ul class="popmake-support-links">
|
23 |
<li>
|
24 |
+
<a href="https://wppopupmaker.com/kb?utm_source=Plugin+Admin&utm_medium=Support+Metabox&utm_campaign=Knowledgebase">
|
25 |
<img src="<?php echo POPMAKE_URL; ?>/assets/images/admin/knowledge-base.png"/>
|
26 |
<span><?php _e( 'Knowledge Base', 'popup-maker' ); ?></span>
|
27 |
</a>
|
28 |
</li>
|
29 |
<li>
|
30 |
+
<a href="https://wppopupmaker.com/support?utm_source=Plugin+Admin&utm_medium=Support+Metabox&utm_campaign=Member+Forums">
|
31 |
<img src="<?php echo POPMAKE_URL; ?>/assets/images/admin/member-forums.png"/>
|
32 |
<span><?php _e( 'Member Forums', 'popup-maker' ); ?></span>
|
33 |
</a>
|
34 |
</li>
|
35 |
<li>
|
36 |
+
<a href="https://wordpress.org/support/plugin/popup-maker?utm_source=Plugin+Admin&utm_medium=Support+Metabox&utm_campaign=WordPress+Forums">
|
37 |
<img src="<?php echo POPMAKE_URL; ?>/assets/images/admin/wordpress-forums.png"/>
|
38 |
<span><?php _e( 'WordPress Forums', 'popup-maker' ); ?></span>
|
39 |
</a>
|
includes/admin/popups/{metabox-loading-fields.php → metabox-targeting-condition-fields.php}
RENAMED
File without changes
|
includes/admin/popups/metabox.php
CHANGED
@@ -53,7 +53,6 @@ function popmake_popup_meta_fields() {
|
|
53 |
}
|
54 |
}
|
55 |
foreach(popmake_get_supported_types() as $pt) {
|
56 |
-
var_dump($pt);
|
57 |
$labels = get_post_type_object( $pt ) ? get_post_type_object( $pt ) : get_taxonomy( $pt );
|
58 |
$plural = $pt . 's';
|
59 |
$fields[] = "popup_targeting_condition_on_{$plural}";
|
53 |
}
|
54 |
}
|
55 |
foreach(popmake_get_supported_types() as $pt) {
|
|
|
56 |
$labels = get_post_type_object( $pt ) ? get_post_type_object( $pt ) : get_taxonomy( $pt );
|
57 |
$plural = $pt . 's';
|
58 |
$fields[] = "popup_targeting_condition_on_{$plural}";
|
includes/admin/settings/register-settings.php
CHANGED
@@ -1,781 +1,798 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Register Settings
|
4 |
-
*
|
5 |
-
* @package POPMAKE
|
6 |
-
* @subpackage Admin/Settings
|
7 |
-
* @copyright Copyright (c) 2014, Daniel Iser
|
8 |
-
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
9 |
-
* @since 3
|
10 |
-
*/
|
11 |
-
|
12 |
-
// Exit if accessed directly
|
13 |
-
if ( !defined( 'ABSPATH' ) ) exit;
|
14 |
-
|
15 |
-
|
16 |
-
/**
|
17 |
-
* Get an option
|
18 |
-
*
|
19 |
-
* Looks to see if the specified setting exists, returns default if not
|
20 |
-
*
|
21 |
-
* @since 1.0
|
22 |
-
* @return mixed
|
23 |
-
*/
|
24 |
-
function popmake_get_option( $key = '', $default = false ) {
|
25 |
-
global $popmake_options;
|
26 |
-
$value = ! empty( $popmake_options[ $key ] ) ? $popmake_options[ $key ] : $default;
|
27 |
-
$value = apply_filters( 'popmake_get_option', $value, $key, $default );
|
28 |
-
return apply_filters( 'popmake_get_option_' . $key, $value, $key, $default );
|
29 |
-
}
|
30 |
-
|
31 |
-
/**
|
32 |
-
* Get Settings
|
33 |
-
*
|
34 |
-
* Retrieves all plugin settings
|
35 |
-
*
|
36 |
-
* @since 1.0
|
37 |
-
* @return array POPMAKE settings
|
38 |
-
*/
|
39 |
-
function popmake_get_settings() {
|
40 |
-
|
41 |
-
$settings = get_option( 'popmake_settings' );
|
42 |
-
|
43 |
-
if( empty( $settings ) ) {
|
44 |
-
|
45 |
-
// Update old settings with new single option
|
46 |
-
|
47 |
-
$license_settings = is_array( get_option( 'popmake_settings_licenses' ) ) ? get_option( 'popmake_settings_licenses' ) : array();
|
48 |
-
|
49 |
-
$settings = array_merge( $license_settings );
|
50 |
-
|
51 |
-
update_option( 'popmake_settings', $settings );
|
52 |
-
|
53 |
-
}
|
54 |
-
return apply_filters( 'popmake_get_settings', $settings );
|
55 |
-
}
|
56 |
-
|
57 |
-
/**
|
58 |
-
* Add all settings sections and fields
|
59 |
-
*
|
60 |
-
* @since 1.0
|
61 |
-
* @return void
|
62 |
-
*/
|
63 |
-
function popmake_register_settings() {
|
64 |
-
|
65 |
-
if ( false == get_option( 'popmake_settings' ) ) {
|
66 |
-
add_option( 'popmake_settings' );
|
67 |
-
}
|
68 |
-
|
69 |
-
foreach( popmake_get_registered_settings() as $tab => $settings ) {
|
70 |
-
|
71 |
-
add_settings_section(
|
72 |
-
'popmake_settings_' . $tab,
|
73 |
-
__return_null(),
|
74 |
-
'__return_false',
|
75 |
-
'popmake_settings_' . $tab
|
76 |
-
);
|
77 |
-
|
78 |
-
foreach ( $settings as $option ) {
|
79 |
-
|
80 |
-
$name = isset( $option['name'] ) ? $option['name'] : '';
|
81 |
-
|
82 |
-
add_settings_field(
|
83 |
-
'popmake_settings[' . $option['id'] . ']',
|
84 |
-
$name,
|
85 |
-
function_exists( 'popmake_' . $option['type'] . '_callback' ) ? 'popmake_' . $option['type'] . '_callback' : 'popmake_missing_callback',
|
86 |
-
'popmake_settings_' . $tab,
|
87 |
-
'popmake_settings_' . $tab,
|
88 |
-
array(
|
89 |
-
'section' => $tab,
|
90 |
-
'id' => isset( $option['id'] ) ? $option['id'] : null,
|
91 |
-
'desc' => ! empty( $option['desc'] ) ? $option['desc'] : '',
|
92 |
-
'name' => isset( $option['name'] ) ? $option['name'] : null,
|
93 |
-
'size' => isset( $option['size'] ) ? $option['size'] : null,
|
94 |
-
'options' => isset( $option['options'] ) ? $option['options'] : '',
|
95 |
-
'std' => isset( $option['std'] ) ? $option['std'] : '',
|
96 |
-
'min' => isset( $option['min'] ) ? $option['min'] : null,
|
97 |
-
'max' => isset( $option['max'] ) ? $option['max'] : null,
|
98 |
-
'step' => isset( $option['step'] ) ? $option['step'] : null
|
99 |
-
)
|
100 |
-
);
|
101 |
-
}
|
102 |
-
|
103 |
-
}
|
104 |
-
|
105 |
-
// Creates our settings in the options table
|
106 |
-
register_setting( 'popmake_settings', 'popmake_settings', 'popmake_settings_sanitize' );
|
107 |
-
|
108 |
-
}
|
109 |
-
add_action('admin_init', 'popmake_register_settings');
|
110 |
-
|
111 |
-
/**
|
112 |
-
* Retrieve the array of plugin settings
|
113 |
-
*
|
114 |
-
* @since 1.0
|
115 |
-
* @return array
|
116 |
-
*/
|
117 |
-
function popmake_get_registered_settings() {
|
118 |
-
|
119 |
-
/**
|
120 |
-
* 'Whitelisted' POPMAKE settings, filters are provided for each settings
|
121 |
-
* section to allow extensions and other plugins to add their own settings
|
122 |
-
*/
|
123 |
-
$popmake_settings = array(
|
124 |
-
/** General Settings */
|
125 |
-
'general' => apply_filters( 'popmake_settings_general',
|
126 |
-
array(
|
127 |
-
/*
|
128 |
-
'custom_post_type_support_heading' => array(
|
129 |
-
'id' => 'custom_post_type_support_heading',
|
130 |
-
'name' => '<strong>' . __( 'Support for CPTs', 'popup-maker' ) . '</strong>',
|
131 |
-
'desc' => '',
|
132 |
-
'type' => 'header'
|
133 |
-
),
|
134 |
-
'supported_post_types' => array(
|
135 |
-
'id' => 'supported_post_types',
|
136 |
-
'name' => __( 'Supported Post Types?', 'popup-maker' ),
|
137 |
-
//'desc' => __( 'Check this to defy how awesome Popup Maker is. <strong>For those who like to make little kids cry or are compulsive liers.</strong>.', 'popup-maker' ),
|
138 |
-
'type' => 'multicheck',
|
139 |
-
'options' => get_post_types(array('_builtin' => false, 'public' => true))
|
140 |
-
),
|
141 |
-
'supported_taxonomies' => array(
|
142 |
-
'id' => 'supported_taxonomies',
|
143 |
-
'name' => __( 'Supported Taxonomies?', 'popup-maker' ),
|
144 |
-
//'desc' => __( 'Check this to defy how awesome Popup Maker is. <strong>For those who like to make little kids cry or are compulsive liers.</strong>.', 'popup-maker' ),
|
145 |
-
'type' => 'multicheck',
|
146 |
-
'options' => get_taxonomies(array('_builtin' => false, 'public' => true))
|
147 |
-
),
|
148 |
-
*/
|
149 |
-
'powered_by' => array(
|
150 |
-
'id' => 'powered_by',
|
151 |
-
'name' => '<strong>' . __( 'Powered By', 'popup-maker' ) . '</strong>',
|
152 |
-
'desc' => '',
|
153 |
-
'type' => 'header'
|
154 |
-
),
|
155 |
-
'popmake_powered_by_opt_out' => array(
|
156 |
-
'id' => 'popmake_powered_by_opt_out',
|
157 |
-
'name' => __( 'Hide Powered By Link?', 'popup-maker' ),
|
158 |
-
'desc' => __( '
|
159 |
-
'type' => 'checkbox'
|
160 |
-
),
|
161 |
-
'popmake_powered_by_size' => array(
|
162 |
-
'id' => 'popmake_powered_by_size',
|
163 |
-
'name' => __( 'How much do you love it?', 'popup-maker' ),
|
164 |
-
'desc' => __( 'This affects the size of the credit link below your popups.', 'popup-maker' ),
|
165 |
-
'type' => 'select',
|
166 |
-
'options' => array(
|
167 |
-
'small' => 'A Little.',
|
168 |
-
'' => 'It\'s Pretty Good',
|
169 |
-
'large' => 'I Love It!',
|
170 |
-
)
|
171 |
-
),
|
172 |
-
/*
|
173 |
-
'tracking_settings' => array(
|
174 |
-
'id' => 'tracking_settings',
|
175 |
-
'name' => '<strong>' . __( 'Tracking Settings', 'popup-maker' ) . '</strong>',
|
176 |
-
'desc' => '',
|
177 |
-
'type' => 'header'
|
178 |
-
),
|
179 |
-
'allow_tracking' => array(
|
180 |
-
'id' => 'allow_tracking',
|
181 |
-
'name' => __( 'Allow Usage Tracking?', 'popup-maker' ),
|
182 |
-
'desc' => __( 'Allow Easy Digital Downloads to anonymously track how this plugin is used and help us make the plugin better. Opt-in and receive a 20% discount code for any purchase from the <a href="https://easydigitaldownloads.com/extensions" target="_blank">Easy Digital Downloads store</a>. Your discount code will be emailed to you.', 'popup-maker' ),
|
183 |
-
'type' => 'checkbox'
|
184 |
-
),
|
185 |
-
'uninstall_on_delete' => array(
|
186 |
-
'id' => 'uninstall_on_delete',
|
187 |
-
'name' => __( 'Remove Data on Uninstall?', 'popup-maker' ),
|
188 |
-
'desc' => __( 'Check this box if you would like POPMAKE to completely remove all of its data when the plugin is deleted.', 'popup-maker' ),
|
189 |
-
'type' => 'checkbox'
|
190 |
-
)
|
191 |
-
*/
|
192 |
-
)
|
193 |
-
),
|
194 |
-
'assets' => apply_filters( 'popmake_settings_assets',
|
195 |
-
array(
|
196 |
-
'disable_google_font_loading' => array(
|
197 |
-
'id' => 'disable_google_font_loading',
|
198 |
-
'name' => __( 'Don\'t Load Google Fonts', 'popup-maker' ),
|
199 |
-
'desc' => __( 'Check this disable loading of google fonts, useful if the fonts you chose are already loaded with your theme.', 'popup-maker' ),
|
200 |
-
'type' => 'checkbox'
|
201 |
-
),
|
202 |
-
)
|
203 |
-
),
|
204 |
-
|
205 |
-
/** Extension Settings */
|
206 |
-
'extensions' => apply_filters('popmake_settings_extensions',
|
207 |
-
array()
|
208 |
-
),
|
209 |
-
'licenses' => apply_filters('popmake_settings_licenses',
|
210 |
-
array()
|
211 |
-
),
|
212 |
-
);
|
213 |
-
|
214 |
-
return apply_filters( 'popmake_registered_settings', $popmake_settings );
|
215 |
-
}
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
/**
|
220 |
-
* Retrieve a list of all published pages
|
221 |
-
*
|
222 |
-
* On large sites this can be expensive, so only load if on the settings page or $force is set to true
|
223 |
-
*
|
224 |
-
* @since 1.0
|
225 |
-
* @param bool $force Force the pages to be loaded even if not on settings
|
226 |
-
* @return array $pages_options An array of the pages
|
227 |
-
*/
|
228 |
-
function popmake_get_pages( $force = false ) {
|
229 |
-
|
230 |
-
$pages_options = array( 0 => '' ); // Blank option
|
231 |
-
|
232 |
-
if( ( ! isset( $_GET['page'] ) || 'popmake-settings' != $_GET['page'] ) && ! $force ) {
|
233 |
-
return $pages_options;
|
234 |
-
}
|
235 |
-
|
236 |
-
$pages = get_pages();
|
237 |
-
if ( $pages ) {
|
238 |
-
foreach ( $pages as $page ) {
|
239 |
-
$pages_options[ $page->ID ] = $page->post_title;
|
240 |
-
}
|
241 |
-
}
|
242 |
-
|
243 |
-
return $pages_options;
|
244 |
-
}
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
/**
|
249 |
-
* Settings Sanitization
|
250 |
-
*
|
251 |
-
* Adds a settings error (for the updated message)
|
252 |
-
* At some point this will validate input
|
253 |
-
*
|
254 |
-
* @since 1.0
|
255 |
-
*
|
256 |
-
* @param array $input The value inputted in the field
|
257 |
-
*
|
258 |
-
* @return string $input Sanitizied value
|
259 |
-
*/
|
260 |
-
function popmake_settings_sanitize( $input = array() ) {
|
261 |
-
|
262 |
-
global $popmake_options;
|
263 |
-
|
264 |
-
if ( empty( $_POST['_wp_http_referer'] ) ) {
|
265 |
-
return $input;
|
266 |
-
}
|
267 |
-
|
268 |
-
parse_str( $_POST['_wp_http_referer'], $referrer );
|
269 |
-
|
270 |
-
$settings = popmake_get_registered_settings();
|
271 |
-
$tab = isset( $referrer['tab'] ) ? $referrer['tab'] : 'general';
|
272 |
-
|
273 |
-
$input = $input ? $input : array();
|
274 |
-
$input = apply_filters( 'popmake_settings_' . $tab . '_sanitize', $input );
|
275 |
-
|
276 |
-
// Loop through each setting being saved and pass it through a sanitization filter
|
277 |
-
foreach ( $input as $key => $value ) {
|
278 |
-
|
279 |
-
// Get the setting type (checkbox, select, etc)
|
280 |
-
$type = isset( $settings[$tab][$key]['type'] ) ? $settings[$tab][$key]['type'] : false;
|
281 |
-
if ( $type ) {
|
282 |
-
// Field type specific filter
|
283 |
-
$input[$key] = apply_filters( 'popmake_settings_sanitize_' . $type, $value, $key );
|
284 |
-
}
|
285 |
-
|
286 |
-
// General filter
|
287 |
-
$input[$key] = apply_filters( 'popmake_settings_sanitize', $value, $key );
|
288 |
-
}
|
289 |
-
|
290 |
-
// Loop through the whitelist and unset any that are empty for the tab being saved
|
291 |
-
if ( ! empty( $settings[$tab] ) ) {
|
292 |
-
foreach ( $settings[$tab] as $key => $value ) {
|
293 |
-
|
294 |
-
// settings used to have numeric keys, now they have keys that match the option ID. This ensures both methods work
|
295 |
-
if ( is_numeric( $key ) ) {
|
296 |
-
$key = $value['id'];
|
297 |
-
}
|
298 |
-
|
299 |
-
if ( empty( $input[$key] ) ) {
|
300 |
-
unset( $popmake_options[$key] );
|
301 |
-
}
|
302 |
-
|
303 |
-
}
|
304 |
-
}
|
305 |
-
|
306 |
-
// Merge our new settings with the existing
|
307 |
-
$output = array_merge( $popmake_options, $input );
|
308 |
-
add_settings_error( 'popmake-notices', '', __( 'Settings updated.', 'popup-maker' ), 'updated' );
|
309 |
-
|
310 |
-
return $output;
|
311 |
-
}
|
312 |
-
|
313 |
-
/**
|
314 |
-
* Sanitize text fields
|
315 |
-
*
|
316 |
-
* @since 1.0
|
317 |
-
* @param array $input The field value
|
318 |
-
* @return string $input Sanitizied value
|
319 |
-
*/
|
320 |
-
function popmake_sanitize_text_field( $input ) {
|
321 |
-
return trim( $input );
|
322 |
-
}
|
323 |
-
add_filter( 'popmake_settings_sanitize_text', 'popmake_sanitize_text_field' );
|
324 |
-
|
325 |
-
/**
|
326 |
-
* Retrieve settings tabs
|
327 |
-
*
|
328 |
-
* @since 1.0
|
329 |
-
* @return array $tabs
|
330 |
-
*/
|
331 |
-
function popmake_get_settings_tabs() {
|
332 |
-
|
333 |
-
$settings = popmake_get_registered_settings();
|
334 |
-
|
335 |
-
$tabs = array();
|
336 |
-
$tabs['general'] = __( 'General', 'popup-maker' );
|
337 |
-
$tabs['assets'] = __( 'Assets', 'popup-maker' );
|
338 |
-
|
339 |
-
if( ! empty( $settings['extensions'] ) ) {
|
340 |
-
$tabs['extensions'] = __( 'Extensions', 'popup-maker' );
|
341 |
-
}
|
342 |
-
if( ! empty( $settings['licenses'] ) ) {
|
343 |
-
$tabs['licenses'] = __( 'Licenses', 'popup-maker' );
|
344 |
-
}
|
345 |
-
if( ! empty( $settings['misc'] ) ) {
|
346 |
-
$tabs['misc'] = __( 'Misc', 'popup-maker' );
|
347 |
-
}
|
348 |
-
|
349 |
-
return apply_filters( 'popmake_settings_tabs', $tabs );
|
350 |
-
}
|
351 |
-
|
352 |
-
|
353 |
-
/**
|
354 |
-
*
|
355 |
-
*
|
356 |
-
* Renders the header.
|
357 |
-
*
|
358 |
-
* @since 1.0
|
359 |
-
* @param array $args Arguments passed by the setting
|
360 |
-
* @return void
|
361 |
-
*/
|
362 |
-
function
|
363 |
-
echo '
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
*
|
372 |
-
*
|
373 |
-
*
|
374 |
-
*
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
*
|
388 |
-
*
|
389 |
-
*
|
390 |
-
*
|
391 |
-
* @
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
*
|
411 |
-
*
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
*
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
*
|
560 |
-
*
|
561 |
-
*
|
562 |
-
*
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
}
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
*
|
724 |
-
*
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
781 |
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Register Settings
|
4 |
+
*
|
5 |
+
* @package POPMAKE
|
6 |
+
* @subpackage Admin/Settings
|
7 |
+
* @copyright Copyright (c) 2014, Daniel Iser
|
8 |
+
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
9 |
+
* @since 3
|
10 |
+
*/
|
11 |
+
|
12 |
+
// Exit if accessed directly
|
13 |
+
if ( !defined( 'ABSPATH' ) ) exit;
|
14 |
+
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Get an option
|
18 |
+
*
|
19 |
+
* Looks to see if the specified setting exists, returns default if not
|
20 |
+
*
|
21 |
+
* @since 1.0
|
22 |
+
* @return mixed
|
23 |
+
*/
|
24 |
+
function popmake_get_option( $key = '', $default = false ) {
|
25 |
+
global $popmake_options;
|
26 |
+
$value = ! empty( $popmake_options[ $key ] ) ? $popmake_options[ $key ] : $default;
|
27 |
+
$value = apply_filters( 'popmake_get_option', $value, $key, $default );
|
28 |
+
return apply_filters( 'popmake_get_option_' . $key, $value, $key, $default );
|
29 |
+
}
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Get Settings
|
33 |
+
*
|
34 |
+
* Retrieves all plugin settings
|
35 |
+
*
|
36 |
+
* @since 1.0
|
37 |
+
* @return array POPMAKE settings
|
38 |
+
*/
|
39 |
+
function popmake_get_settings() {
|
40 |
+
|
41 |
+
$settings = get_option( 'popmake_settings' );
|
42 |
+
|
43 |
+
if( empty( $settings ) ) {
|
44 |
+
|
45 |
+
// Update old settings with new single option
|
46 |
+
|
47 |
+
$license_settings = is_array( get_option( 'popmake_settings_licenses' ) ) ? get_option( 'popmake_settings_licenses' ) : array();
|
48 |
+
|
49 |
+
$settings = array_merge( $license_settings );
|
50 |
+
|
51 |
+
update_option( 'popmake_settings', $settings );
|
52 |
+
|
53 |
+
}
|
54 |
+
return apply_filters( 'popmake_get_settings', $settings );
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Add all settings sections and fields
|
59 |
+
*
|
60 |
+
* @since 1.0
|
61 |
+
* @return void
|
62 |
+
*/
|
63 |
+
function popmake_register_settings() {
|
64 |
+
|
65 |
+
if ( false == get_option( 'popmake_settings' ) ) {
|
66 |
+
add_option( 'popmake_settings', popmake_default_settings() );
|
67 |
+
}
|
68 |
+
|
69 |
+
foreach( popmake_get_registered_settings() as $tab => $settings ) {
|
70 |
+
|
71 |
+
add_settings_section(
|
72 |
+
'popmake_settings_' . $tab,
|
73 |
+
__return_null(),
|
74 |
+
'__return_false',
|
75 |
+
'popmake_settings_' . $tab
|
76 |
+
);
|
77 |
+
|
78 |
+
foreach ( $settings as $option ) {
|
79 |
+
|
80 |
+
$name = isset( $option['name'] ) ? $option['name'] : '';
|
81 |
+
|
82 |
+
add_settings_field(
|
83 |
+
'popmake_settings[' . $option['id'] . ']',
|
84 |
+
$name,
|
85 |
+
function_exists( 'popmake_' . $option['type'] . '_callback' ) ? 'popmake_' . $option['type'] . '_callback' : 'popmake_missing_callback',
|
86 |
+
'popmake_settings_' . $tab,
|
87 |
+
'popmake_settings_' . $tab,
|
88 |
+
array(
|
89 |
+
'section' => $tab,
|
90 |
+
'id' => isset( $option['id'] ) ? $option['id'] : null,
|
91 |
+
'desc' => ! empty( $option['desc'] ) ? $option['desc'] : '',
|
92 |
+
'name' => isset( $option['name'] ) ? $option['name'] : null,
|
93 |
+
'size' => isset( $option['size'] ) ? $option['size'] : null,
|
94 |
+
'options' => isset( $option['options'] ) ? $option['options'] : '',
|
95 |
+
'std' => isset( $option['std'] ) ? $option['std'] : '',
|
96 |
+
'min' => isset( $option['min'] ) ? $option['min'] : null,
|
97 |
+
'max' => isset( $option['max'] ) ? $option['max'] : null,
|
98 |
+
'step' => isset( $option['step'] ) ? $option['step'] : null
|
99 |
+
)
|
100 |
+
);
|
101 |
+
}
|
102 |
+
|
103 |
+
}
|
104 |
+
|
105 |
+
// Creates our settings in the options table
|
106 |
+
register_setting( 'popmake_settings', 'popmake_settings', 'popmake_settings_sanitize' );
|
107 |
+
|
108 |
+
}
|
109 |
+
add_action('admin_init', 'popmake_register_settings');
|
110 |
+
|
111 |
+
/**
|
112 |
+
* Retrieve the array of plugin settings
|
113 |
+
*
|
114 |
+
* @since 1.0
|
115 |
+
* @return array
|
116 |
+
*/
|
117 |
+
function popmake_get_registered_settings() {
|
118 |
+
|
119 |
+
/**
|
120 |
+
* 'Whitelisted' POPMAKE settings, filters are provided for each settings
|
121 |
+
* section to allow extensions and other plugins to add their own settings
|
122 |
+
*/
|
123 |
+
$popmake_settings = array(
|
124 |
+
/** General Settings */
|
125 |
+
'general' => apply_filters( 'popmake_settings_general',
|
126 |
+
array(
|
127 |
+
/*
|
128 |
+
'custom_post_type_support_heading' => array(
|
129 |
+
'id' => 'custom_post_type_support_heading',
|
130 |
+
'name' => '<strong>' . __( 'Support for CPTs', 'popup-maker' ) . '</strong>',
|
131 |
+
'desc' => '',
|
132 |
+
'type' => 'header'
|
133 |
+
),
|
134 |
+
'supported_post_types' => array(
|
135 |
+
'id' => 'supported_post_types',
|
136 |
+
'name' => __( 'Supported Post Types?', 'popup-maker' ),
|
137 |
+
//'desc' => __( 'Check this to defy how awesome Popup Maker is. <strong>For those who like to make little kids cry or are compulsive liers.</strong>.', 'popup-maker' ),
|
138 |
+
'type' => 'multicheck',
|
139 |
+
'options' => get_post_types(array('_builtin' => false, 'public' => true))
|
140 |
+
),
|
141 |
+
'supported_taxonomies' => array(
|
142 |
+
'id' => 'supported_taxonomies',
|
143 |
+
'name' => __( 'Supported Taxonomies?', 'popup-maker' ),
|
144 |
+
//'desc' => __( 'Check this to defy how awesome Popup Maker is. <strong>For those who like to make little kids cry or are compulsive liers.</strong>.', 'popup-maker' ),
|
145 |
+
'type' => 'multicheck',
|
146 |
+
'options' => get_taxonomies(array('_builtin' => false, 'public' => true))
|
147 |
+
),
|
148 |
+
*/
|
149 |
+
'powered_by' => array(
|
150 |
+
'id' => 'powered_by',
|
151 |
+
'name' => '<strong>' . __( 'Powered By', 'popup-maker' ) . '</strong>',
|
152 |
+
'desc' => '',
|
153 |
+
'type' => 'header'
|
154 |
+
),
|
155 |
+
'popmake_powered_by_opt_out' => array(
|
156 |
+
'id' => 'popmake_powered_by_opt_out',
|
157 |
+
'name' => __( 'Hide Powered By Link?', 'popup-maker' ),
|
158 |
+
'desc' => sprintf( __( 'If you check this box, it will hide the <em>Powered By Popup Maker</em> tag on all of your popups. But don\'t forget to <a href="%s">rate and review us on WordPress</a>!', 'popup-maker' ), 'https://wordpress.org/support/view/plugin-reviews/popup-maker?utm_source=Plugin+Admin&utm_medium=Powered+By+Review&utm_campaign=WP+Reviews'),
|
159 |
+
'type' => 'checkbox'
|
160 |
+
),
|
161 |
+
'popmake_powered_by_size' => array(
|
162 |
+
'id' => 'popmake_powered_by_size',
|
163 |
+
'name' => __( 'How much do you love it?', 'popup-maker' ),
|
164 |
+
'desc' => __( 'This affects the size of the credit link below your popups.', 'popup-maker' ),
|
165 |
+
'type' => 'select',
|
166 |
+
'options' => array(
|
167 |
+
'small' => 'A Little.',
|
168 |
+
'' => 'It\'s Pretty Good',
|
169 |
+
'large' => 'I Love It!',
|
170 |
+
)
|
171 |
+
),
|
172 |
+
/*
|
173 |
+
'tracking_settings' => array(
|
174 |
+
'id' => 'tracking_settings',
|
175 |
+
'name' => '<strong>' . __( 'Tracking Settings', 'popup-maker' ) . '</strong>',
|
176 |
+
'desc' => '',
|
177 |
+
'type' => 'header'
|
178 |
+
),
|
179 |
+
'allow_tracking' => array(
|
180 |
+
'id' => 'allow_tracking',
|
181 |
+
'name' => __( 'Allow Usage Tracking?', 'popup-maker' ),
|
182 |
+
'desc' => __( 'Allow Easy Digital Downloads to anonymously track how this plugin is used and help us make the plugin better. Opt-in and receive a 20% discount code for any purchase from the <a href="https://easydigitaldownloads.com/extensions" target="_blank">Easy Digital Downloads store</a>. Your discount code will be emailed to you.', 'popup-maker' ),
|
183 |
+
'type' => 'checkbox'
|
184 |
+
),
|
185 |
+
'uninstall_on_delete' => array(
|
186 |
+
'id' => 'uninstall_on_delete',
|
187 |
+
'name' => __( 'Remove Data on Uninstall?', 'popup-maker' ),
|
188 |
+
'desc' => __( 'Check this box if you would like POPMAKE to completely remove all of its data when the plugin is deleted.', 'popup-maker' ),
|
189 |
+
'type' => 'checkbox'
|
190 |
+
)
|
191 |
+
*/
|
192 |
+
)
|
193 |
+
),
|
194 |
+
'assets' => apply_filters( 'popmake_settings_assets',
|
195 |
+
array(
|
196 |
+
'disable_google_font_loading' => array(
|
197 |
+
'id' => 'disable_google_font_loading',
|
198 |
+
'name' => __( 'Don\'t Load Google Fonts', 'popup-maker' ),
|
199 |
+
'desc' => __( 'Check this disable loading of google fonts, useful if the fonts you chose are already loaded with your theme.', 'popup-maker' ),
|
200 |
+
'type' => 'checkbox'
|
201 |
+
),
|
202 |
+
)
|
203 |
+
),
|
204 |
+
|
205 |
+
/** Extension Settings */
|
206 |
+
'extensions' => apply_filters('popmake_settings_extensions',
|
207 |
+
array()
|
208 |
+
),
|
209 |
+
'licenses' => apply_filters('popmake_settings_licenses',
|
210 |
+
array()
|
211 |
+
),
|
212 |
+
);
|
213 |
+
|
214 |
+
return apply_filters( 'popmake_registered_settings', $popmake_settings );
|
215 |
+
}
|
216 |
+
|
217 |
+
|
218 |
+
|
219 |
+
/**
|
220 |
+
* Retrieve a list of all published pages
|
221 |
+
*
|
222 |
+
* On large sites this can be expensive, so only load if on the settings page or $force is set to true
|
223 |
+
*
|
224 |
+
* @since 1.0
|
225 |
+
* @param bool $force Force the pages to be loaded even if not on settings
|
226 |
+
* @return array $pages_options An array of the pages
|
227 |
+
*/
|
228 |
+
function popmake_get_pages( $force = false ) {
|
229 |
+
|
230 |
+
$pages_options = array( 0 => '' ); // Blank option
|
231 |
+
|
232 |
+
if( ( ! isset( $_GET['page'] ) || 'popmake-settings' != $_GET['page'] ) && ! $force ) {
|
233 |
+
return $pages_options;
|
234 |
+
}
|
235 |
+
|
236 |
+
$pages = get_pages();
|
237 |
+
if ( $pages ) {
|
238 |
+
foreach ( $pages as $page ) {
|
239 |
+
$pages_options[ $page->ID ] = $page->post_title;
|
240 |
+
}
|
241 |
+
}
|
242 |
+
|
243 |
+
return $pages_options;
|
244 |
+
}
|
245 |
+
|
246 |
+
|
247 |
+
|
248 |
+
/**
|
249 |
+
* Settings Sanitization
|
250 |
+
*
|
251 |
+
* Adds a settings error (for the updated message)
|
252 |
+
* At some point this will validate input
|
253 |
+
*
|
254 |
+
* @since 1.0
|
255 |
+
*
|
256 |
+
* @param array $input The value inputted in the field
|
257 |
+
*
|
258 |
+
* @return string $input Sanitizied value
|
259 |
+
*/
|
260 |
+
function popmake_settings_sanitize( $input = array() ) {
|
261 |
+
|
262 |
+
global $popmake_options;
|
263 |
+
|
264 |
+
if ( empty( $_POST['_wp_http_referer'] ) ) {
|
265 |
+
return $input;
|
266 |
+
}
|
267 |
+
|
268 |
+
parse_str( $_POST['_wp_http_referer'], $referrer );
|
269 |
+
|
270 |
+
$settings = popmake_get_registered_settings();
|
271 |
+
$tab = isset( $referrer['tab'] ) ? $referrer['tab'] : 'general';
|
272 |
+
|
273 |
+
$input = $input ? $input : array();
|
274 |
+
$input = apply_filters( 'popmake_settings_' . $tab . '_sanitize', $input );
|
275 |
+
|
276 |
+
// Loop through each setting being saved and pass it through a sanitization filter
|
277 |
+
foreach ( $input as $key => $value ) {
|
278 |
+
|
279 |
+
// Get the setting type (checkbox, select, etc)
|
280 |
+
$type = isset( $settings[$tab][$key]['type'] ) ? $settings[$tab][$key]['type'] : false;
|
281 |
+
if ( $type ) {
|
282 |
+
// Field type specific filter
|
283 |
+
$input[$key] = apply_filters( 'popmake_settings_sanitize_' . $type, $value, $key );
|
284 |
+
}
|
285 |
+
|
286 |
+
// General filter
|
287 |
+
$input[$key] = apply_filters( 'popmake_settings_sanitize', $value, $key );
|
288 |
+
}
|
289 |
+
|
290 |
+
// Loop through the whitelist and unset any that are empty for the tab being saved
|
291 |
+
if ( ! empty( $settings[$tab] ) ) {
|
292 |
+
foreach ( $settings[$tab] as $key => $value ) {
|
293 |
+
|
294 |
+
// settings used to have numeric keys, now they have keys that match the option ID. This ensures both methods work
|
295 |
+
if ( is_numeric( $key ) ) {
|
296 |
+
$key = $value['id'];
|
297 |
+
}
|
298 |
+
|
299 |
+
if ( empty( $input[$key] ) ) {
|
300 |
+
unset( $popmake_options[$key] );
|
301 |
+
}
|
302 |
+
|
303 |
+
}
|
304 |
+
}
|
305 |
+
|
306 |
+
// Merge our new settings with the existing
|
307 |
+
$output = array_merge( $popmake_options, $input );
|
308 |
+
add_settings_error( 'popmake-notices', '', __( 'Settings updated.', 'popup-maker' ), 'updated' );
|
309 |
+
|
310 |
+
return $output;
|
311 |
+
}
|
312 |
+
|
313 |
+
/**
|
314 |
+
* Sanitize text fields
|
315 |
+
*
|
316 |
+
* @since 1.0
|
317 |
+
* @param array $input The field value
|
318 |
+
* @return string $input Sanitizied value
|
319 |
+
*/
|
320 |
+
function popmake_sanitize_text_field( $input ) {
|
321 |
+
return trim( $input );
|
322 |
+
}
|
323 |
+
add_filter( 'popmake_settings_sanitize_text', 'popmake_sanitize_text_field' );
|
324 |
+
|
325 |
+
/**
|
326 |
+
* Retrieve settings tabs
|
327 |
+
*
|
328 |
+
* @since 1.0
|
329 |
+
* @return array $tabs
|
330 |
+
*/
|
331 |
+
function popmake_get_settings_tabs() {
|
332 |
+
|
333 |
+
$settings = popmake_get_registered_settings();
|
334 |
+
|
335 |
+
$tabs = array();
|
336 |
+
$tabs['general'] = __( 'General', 'popup-maker' );
|
337 |
+
$tabs['assets'] = __( 'Assets', 'popup-maker' );
|
338 |
+
|
339 |
+
if( ! empty( $settings['extensions'] ) ) {
|
340 |
+
$tabs['extensions'] = __( 'Extensions', 'popup-maker' );
|
341 |
+
}
|
342 |
+
if( ! empty( $settings['licenses'] ) ) {
|
343 |
+
$tabs['licenses'] = __( 'Licenses', 'popup-maker' );
|
344 |
+
}
|
345 |
+
if( ! empty( $settings['misc'] ) ) {
|
346 |
+
$tabs['misc'] = __( 'Misc', 'popup-maker' );
|
347 |
+
}
|
348 |
+
|
349 |
+
return apply_filters( 'popmake_settings_tabs', $tabs );
|
350 |
+
}
|
351 |
+
|
352 |
+
|
353 |
+
/**
|
354 |
+
* Section Callback
|
355 |
+
*
|
356 |
+
* Renders the header.
|
357 |
+
*
|
358 |
+
* @since 1.0
|
359 |
+
* @param array $args Arguments passed by the setting
|
360 |
+
* @return void
|
361 |
+
*/
|
362 |
+
function popmake_section_callback( $args ) {
|
363 |
+
echo '</td></tr></tbody></table>';
|
364 |
+
echo $args['desc'];
|
365 |
+
echo '<table class="form-table"><tbody><tr style="display:none;"><td colspan="2">';
|
366 |
+
}
|
367 |
+
|
368 |
+
|
369 |
+
|
370 |
+
/**
|
371 |
+
* Header Callback
|
372 |
+
*
|
373 |
+
* Renders the header.
|
374 |
+
*
|
375 |
+
* @since 1.0
|
376 |
+
* @param array $args Arguments passed by the setting
|
377 |
+
* @return void
|
378 |
+
*/
|
379 |
+
function popmake_header_callback( $args ) {
|
380 |
+
echo '<hr/>';
|
381 |
+
}
|
382 |
+
|
383 |
+
/**
|
384 |
+
* Checkbox Callback
|
385 |
+
*
|
386 |
+
* Renders checkboxes.
|
387 |
+
*
|
388 |
+
* @since 1.0
|
389 |
+
* @param array $args Arguments passed by the setting
|
390 |
+
* @global $popmake_options Array of all the POPMAKE Options
|
391 |
+
* @return void
|
392 |
+
*/
|
393 |
+
function popmake_checkbox_callback( $args ) {
|
394 |
+
global $popmake_options;
|
395 |
+
|
396 |
+
$checked = isset( $popmake_options[ $args[ 'id' ] ] ) ? checked( 1, $popmake_options[ $args[ 'id' ] ], false ) : '';
|
397 |
+
$html = '<input type="checkbox" id="popmake_settings[' . $args['id'] . ']" name="popmake_settings[' . $args['id'] . ']" value="1" ' . $checked . '/>';
|
398 |
+
$html .= '<label for="popmake_settings[' . $args['id'] . ']"> ' . $args['desc'] . '</label>';
|
399 |
+
|
400 |
+
echo $html;
|
401 |
+
}
|
402 |
+
|
403 |
+
/**
|
404 |
+
* Multicheck Callback
|
405 |
+
*
|
406 |
+
* Renders multiple checkboxes.
|
407 |
+
*
|
408 |
+
* @since 1.0
|
409 |
+
* @param array $args Arguments passed by the setting
|
410 |
+
* @global $popmake_options Array of all the POPMAKE Options
|
411 |
+
* @return void
|
412 |
+
*/
|
413 |
+
function popmake_multicheck_callback( $args ) {
|
414 |
+
global $popmake_options;
|
415 |
+
|
416 |
+
if ( ! empty( $args['options'] ) ) {
|
417 |
+
foreach( $args['options'] as $key => $option ):
|
418 |
+
if( isset( $popmake_options[$args['id']][$key] ) ) { $enabled = $option; } else { $enabled = NULL; }
|
419 |
+
echo '<input name="popmake_settings[' . $args['id'] . '][' . $key . ']" id="popmake_settings[' . $args['id'] . '][' . $key . ']" type="checkbox" value="' . $option . '" ' . checked($option, $enabled, false) . '/> ';
|
420 |
+
echo '<label for="popmake_settings[' . $args['id'] . '][' . $key . ']">' . $option . '</label><br/>';
|
421 |
+
endforeach;
|
422 |
+
echo '<p class="description">' . $args['desc'] . '</p>';
|
423 |
+
}
|
424 |
+
}
|
425 |
+
|
426 |
+
/**
|
427 |
+
* Radio Callback
|
428 |
+
*
|
429 |
+
* Renders radio boxes.
|
430 |
+
*
|
431 |
+
* @since 1.0
|
432 |
+
* @param array $args Arguments passed by the setting
|
433 |
+
* @global $popmake_options Array of all the POPMAKE Options
|
434 |
+
* @return void
|
435 |
+
*/
|
436 |
+
function popmake_radio_callback( $args ) {
|
437 |
+
global $popmake_options;
|
438 |
+
|
439 |
+
foreach ( $args['options'] as $key => $option ) :
|
440 |
+
$checked = false;
|
441 |
+
|
442 |
+
if ( isset( $popmake_options[ $args['id'] ] ) && $popmake_options[ $args['id'] ] == $key )
|
443 |
+
$checked = true;
|
444 |
+
elseif( isset( $args['std'] ) && $args['std'] == $key && ! isset( $popmake_options[ $args['id'] ] ) )
|
445 |
+
$checked = true;
|
446 |
+
|
447 |
+
echo '<input name="popmake_settings[' . $args['id'] . ']"" id="popmake_settings[' . $args['id'] . '][' . $key . ']" type="radio" value="' . $key . '" ' . checked(true, $checked, false) . '/> ';
|
448 |
+
echo '<label for="popmake_settings[' . $args['id'] . '][' . $key . ']">' . $option . '</label><br/>';
|
449 |
+
endforeach;
|
450 |
+
|
451 |
+
echo '<p class="description">' . $args['desc'] . '</p>';
|
452 |
+
}
|
453 |
+
|
454 |
+
|
455 |
+
/**
|
456 |
+
* Text Callback
|
457 |
+
*
|
458 |
+
* Renders text fields.
|
459 |
+
*
|
460 |
+
* @since 1.0
|
461 |
+
* @param array $args Arguments passed by the setting
|
462 |
+
* @global $popmake_options Array of all the POPMAKE Options
|
463 |
+
* @return void
|
464 |
+
*/
|
465 |
+
function popmake_text_callback( $args ) {
|
466 |
+
global $popmake_options;
|
467 |
+
|
468 |
+
if ( isset( $popmake_options[ $args['id'] ] ) )
|
469 |
+
$value = $popmake_options[ $args['id'] ];
|
470 |
+
else
|
471 |
+
$value = isset( $args['std'] ) ? $args['std'] : '';
|
472 |
+
|
473 |
+
$size = ( isset( $args['size'] ) && ! is_null( $args['size'] ) ) ? $args['size'] : 'regular';
|
474 |
+
$html = '<input type="text" class="' . $size . '-text" id="popmake_settings[' . $args['id'] . ']" name="popmake_settings[' . $args['id'] . ']" value="' . esc_attr( stripslashes( $value ) ) . '"/>';
|
475 |
+
$html .= '<label for="popmake_settings[' . $args['id'] . ']"> ' . $args['desc'] . '</label>';
|
476 |
+
|
477 |
+
echo $html;
|
478 |
+
}
|
479 |
+
|
480 |
+
/**
|
481 |
+
* Number Callback
|
482 |
+
*
|
483 |
+
* Renders number fields.
|
484 |
+
*
|
485 |
+
* @since 1.0
|
486 |
+
* @param array $args Arguments passed by the setting
|
487 |
+
* @global $popmake_options Array of all the POPMAKE Options
|
488 |
+
* @return void
|
489 |
+
*/
|
490 |
+
function popmake_number_callback( $args ) {
|
491 |
+
global $popmake_options;
|
492 |
+
|
493 |
+
if ( isset( $popmake_options[ $args['id'] ] ) )
|
494 |
+
$value = $popmake_options[ $args['id'] ];
|
495 |
+
else
|
496 |
+
$value = isset( $args['std'] ) ? $args['std'] : '';
|
497 |
+
|
498 |
+
$max = isset( $args['max'] ) ? $args['max'] : 999999;
|
499 |
+
$min = isset( $args['min'] ) ? $args['min'] : 0;
|
500 |
+
$step = isset( $args['step'] ) ? $args['step'] : 1;
|
501 |
+
|
502 |
+
$size = ( isset( $args['size'] ) && ! is_null( $args['size'] ) ) ? $args['size'] : 'regular';
|
503 |
+
$html = '<input type="number" step="' . esc_attr( $step ) . '" max="' . esc_attr( $max ) . '" min="' . esc_attr( $min ) . '" class="' . $size . '-text" id="popmake_settings[' . $args['id'] . ']" name="popmake_settings[' . $args['id'] . ']" value="' . esc_attr( stripslashes( $value ) ) . '"/>';
|
504 |
+
$html .= '<label for="popmake_settings[' . $args['id'] . ']"> ' . $args['desc'] . '</label>';
|
505 |
+
|
506 |
+
echo $html;
|
507 |
+
}
|
508 |
+
|
509 |
+
/**
|
510 |
+
* Textarea Callback
|
511 |
+
*
|
512 |
+
* Renders textarea fields.
|
513 |
+
*
|
514 |
+
* @since 1.0
|
515 |
+
* @param array $args Arguments passed by the setting
|
516 |
+
* @global $popmake_options Array of all the POPMAKE Options
|
517 |
+
* @return void
|
518 |
+
*/
|
519 |
+
function popmake_textarea_callback( $args ) {
|
520 |
+
global $popmake_options;
|
521 |
+
|
522 |
+
if ( isset( $popmake_options[ $args['id'] ] ) )
|
523 |
+
$value = $popmake_options[ $args['id'] ];
|
524 |
+
else
|
525 |
+
$value = isset( $args['std'] ) ? $args['std'] : '';
|
526 |
+
|
527 |
+
$html = '<textarea class="large-text" cols="50" rows="5" id="popmake_settings[' . $args['id'] . ']" name="popmake_settings[' . $args['id'] . ']">' . esc_textarea( stripslashes( $value ) ) . '</textarea>';
|
528 |
+
$html .= '<label for="popmake_settings[' . $args['id'] . ']"> ' . $args['desc'] . '</label>';
|
529 |
+
|
530 |
+
echo $html;
|
531 |
+
}
|
532 |
+
|
533 |
+
/**
|
534 |
+
* Password Callback
|
535 |
+
*
|
536 |
+
* Renders password fields.
|
537 |
+
*
|
538 |
+
* @since 1.0
|
539 |
+
* @param array $args Arguments passed by the setting
|
540 |
+
* @global $popmake_options Array of all the POPMAKE Options
|
541 |
+
* @return void
|
542 |
+
*/
|
543 |
+
function popmake_password_callback( $args ) {
|
544 |
+
global $popmake_options;
|
545 |
+
|
546 |
+
if ( isset( $popmake_options[ $args['id'] ] ) )
|
547 |
+
$value = $popmake_options[ $args['id'] ];
|
548 |
+
else
|
549 |
+
$value = isset( $args['std'] ) ? $args['std'] : '';
|
550 |
+
|
551 |
+
$size = ( isset( $args['size'] ) && ! is_null( $args['size'] ) ) ? $args['size'] : 'regular';
|
552 |
+
$html = '<input type="password" class="' . $size . '-text" id="popmake_settings[' . $args['id'] . ']" name="popmake_settings[' . $args['id'] . ']" value="' . esc_attr( $value ) . '"/>';
|
553 |
+
$html .= '<label for="popmake_settings[' . $args['id'] . ']"> ' . $args['desc'] . '</label>';
|
554 |
+
|
555 |
+
echo $html;
|
556 |
+
}
|
557 |
+
|
558 |
+
/**
|
559 |
+
* Missing Callback
|
560 |
+
*
|
561 |
+
* If a function is missing for settings callbacks alert the user.
|
562 |
+
*
|
563 |
+
* @since 1.0
|
564 |
+
* @param array $args Arguments passed by the setting
|
565 |
+
* @return void
|
566 |
+
*/
|
567 |
+
function popmake_missing_callback($args) {
|
568 |
+
printf( __( 'The callback function used for the <strong>%s</strong> setting is missing.', 'popup-maker' ), $args['id'] );
|
569 |
+
}
|
570 |
+
|
571 |
+
/**
|
572 |
+
* Select Callback
|
573 |
+
*
|
574 |
+
* Renders select fields.
|
575 |
+
*
|
576 |
+
* @since 1.0
|
577 |
+
* @param array $args Arguments passed by the setting
|
578 |
+
* @global $popmake_options Array of all the POPMAKE Options
|
579 |
+
* @return void
|
580 |
+
*/
|
581 |
+
function popmake_select_callback($args) {
|
582 |
+
global $popmake_options;
|
583 |
+
|
584 |
+
if ( isset( $popmake_options[ $args['id'] ] ) )
|
585 |
+
$value = $popmake_options[ $args['id'] ];
|
586 |
+
else
|
587 |
+
$value = isset( $args['std'] ) ? $args['std'] : '';
|
588 |
+
|
589 |
+
$html = '<select id="popmake_settings[' . $args['id'] . ']" name="popmake_settings[' . $args['id'] . ']"/>';
|
590 |
+
|
591 |
+
foreach ( $args['options'] as $option => $name ) :
|
592 |
+
$selected = selected( $option, $value, false );
|
593 |
+
$html .= '<option value="' . $option . '" ' . $selected . '>' . $name . '</option>';
|
594 |
+
endforeach;
|
595 |
+
|
596 |
+
$html .= '</select>';
|
597 |
+
$html .= '<label for="popmake_settings[' . $args['id'] . ']"> ' . $args['desc'] . '</label>';
|
598 |
+
|
599 |
+
echo $html;
|
600 |
+
}
|
601 |
+
|
602 |
+
/**
|
603 |
+
* Color select Callback
|
604 |
+
*
|
605 |
+
* Renders color select fields.
|
606 |
+
*
|
607 |
+
* @since 1.0
|
608 |
+
* @param array $args Arguments passed by the setting
|
609 |
+
* @global $popmake_options Array of all the POPMAKE Options
|
610 |
+
* @return void
|
611 |
+
*/
|
612 |
+
function popmake_color_select_callback( $args ) {
|
613 |
+
global $popmake_options;
|
614 |
+
|
615 |
+
if ( isset( $popmake_options[ $args['id'] ] ) )
|
616 |
+
$value = $popmake_options[ $args['id'] ];
|
617 |
+
else
|
618 |
+
$value = isset( $args['std'] ) ? $args['std'] : '';
|
619 |
+
|
620 |
+
$html = '<select id="popmake_settings[' . $args['id'] . ']" name="popmake_settings[' . $args['id'] . ']"/>';
|
621 |
+
|
622 |
+
foreach ( $args['options'] as $option => $color ) :
|
623 |
+
$selected = selected( $option, $value, false );
|
624 |
+
$html .= '<option value="' . $option . '" ' . $selected . '>' . $color['label'] . '</option>';
|
625 |
+
endforeach;
|
626 |
+
|
627 |
+
$html .= '</select>';
|
628 |
+
$html .= '<label for="popmake_settings[' . $args['id'] . ']"> ' . $args['desc'] . '</label>';
|
629 |
+
|
630 |
+
echo $html;
|
631 |
+
}
|
632 |
+
|
633 |
+
/**
|
634 |
+
* Rich Editor Callback
|
635 |
+
*
|
636 |
+
* Renders rich editor fields.
|
637 |
+
*
|
638 |
+
* @since 1.0
|
639 |
+
* @param array $args Arguments passed by the setting
|
640 |
+
* @global $popmake_options Array of all the POPMAKE Options
|
641 |
+
* @global $wp_version WordPress Version
|
642 |
+
*/
|
643 |
+
function popmake_rich_editor_callback( $args ) {
|
644 |
+
global $popmake_options, $wp_version;
|
645 |
+
|
646 |
+
if ( isset( $popmake_options[ $args['id'] ] ) ) {
|
647 |
+
$value = $popmake_options[ $args['id'] ];
|
648 |
+
} else {
|
649 |
+
$value = isset( $args['std'] ) ? $args['std'] : '';
|
650 |
+
}
|
651 |
+
|
652 |
+
$rows = isset( $args['size'] ) ? $args['size'] : 20;
|
653 |
+
|
654 |
+
if ( $wp_version >= 3.3 && function_exists( 'wp_editor' ) ) {
|
655 |
+
ob_start();
|
656 |
+
wp_editor( stripslashes( $value ), 'popmake_settings_' . $args['id'], array( 'textarea_name' => 'popmake_settings[' . $args['id'] . ']', 'textarea_rows' => $rows ) );
|
657 |
+
$html = ob_get_clean();
|
658 |
+
} else {
|
659 |
+
$html = '<textarea class="large-text" rows="10" id="popmake_settings[' . $args['id'] . ']" name="popmake_settings[' . $args['id'] . ']">' . esc_textarea( stripslashes( $value ) ) . '</textarea>';
|
660 |
+
}
|
661 |
+
|
662 |
+
$html .= '<br/><label for="popmake_settings[' . $args['id'] . ']"> ' . $args['desc'] . '</label>';
|
663 |
+
|
664 |
+
echo $html;
|
665 |
+
}
|
666 |
+
|
667 |
+
/**
|
668 |
+
* Upload Callback
|
669 |
+
*
|
670 |
+
* Renders upload fields.
|
671 |
+
*
|
672 |
+
* @since 1.0
|
673 |
+
* @param array $args Arguments passed by the setting
|
674 |
+
* @global $popmake_options Array of all the POPMAKE Options
|
675 |
+
* @return void
|
676 |
+
*/
|
677 |
+
function popmake_upload_callback( $args ) {
|
678 |
+
global $popmake_options;
|
679 |
+
|
680 |
+
if ( isset( $popmake_options[ $args['id'] ] ) )
|
681 |
+
$value = $popmake_options[$args['id']];
|
682 |
+
else
|
683 |
+
$value = isset($args['std']) ? $args['std'] : '';
|
684 |
+
|
685 |
+
$size = ( isset( $args['size'] ) && ! is_null( $args['size'] ) ) ? $args['size'] : 'regular';
|
686 |
+
$html = '<input type="text" class="' . $size . '-text" id="popmake_settings[' . $args['id'] . ']" name="popmake_settings[' . $args['id'] . ']" value="' . esc_attr( stripslashes( $value ) ) . '"/>';
|
687 |
+
$html .= '<span> <input type="button" class="popmake_settings_upload_button button-secondary" value="' . __( 'Upload File', 'popup-maker' ) . '"/></span>';
|
688 |
+
$html .= '<label for="popmake_settings[' . $args['id'] . ']"> ' . $args['desc'] . '</label>';
|
689 |
+
|
690 |
+
echo $html;
|
691 |
+
}
|
692 |
+
|
693 |
+
|
694 |
+
/**
|
695 |
+
* Color picker Callback
|
696 |
+
*
|
697 |
+
* Renders color picker fields.
|
698 |
+
*
|
699 |
+
* @since 1.0
|
700 |
+
* @param array $args Arguments passed by the setting
|
701 |
+
* @global $popmake_options Array of all the POPMAKE Options
|
702 |
+
* @return void
|
703 |
+
*/
|
704 |
+
function popmake_color_callback( $args ) {
|
705 |
+
global $popmake_options;
|
706 |
+
|
707 |
+
if ( isset( $popmake_options[ $args['id'] ] ) )
|
708 |
+
$value = $popmake_options[ $args['id'] ];
|
709 |
+
else
|
710 |
+
$value = isset( $args['std'] ) ? $args['std'] : '';
|
711 |
+
|
712 |
+
$default = isset( $args['std'] ) ? $args['std'] : '';
|
713 |
+
|
714 |
+
$size = ( isset( $args['size'] ) && ! is_null( $args['size'] ) ) ? $args['size'] : 'regular';
|
715 |
+
$html = '<input type="text" class="popmake-color-picker" id="popmake_settings[' . $args['id'] . ']" name="popmake_settings[' . $args['id'] . ']" value="' . esc_attr( $value ) . '" data-default-color="' . esc_attr( $default ) . '" />';
|
716 |
+
$html .= '<label for="popmake_settings[' . $args['id'] . ']"> ' . $args['desc'] . '</label>';
|
717 |
+
|
718 |
+
echo $html;
|
719 |
+
}
|
720 |
+
|
721 |
+
|
722 |
+
/**
|
723 |
+
* Descriptive text callback.
|
724 |
+
*
|
725 |
+
* Renders descriptive text onto the settings field.
|
726 |
+
*
|
727 |
+
* @since 1.0
|
728 |
+
* @param array $args Arguments passed by the setting
|
729 |
+
* @return void
|
730 |
+
*/
|
731 |
+
function popmake_descriptive_text_callback( $args ) {
|
732 |
+
echo esc_html( $args['desc'] );
|
733 |
+
}
|
734 |
+
|
735 |
+
/**
|
736 |
+
* Registers the license field callback for Software Licensing
|
737 |
+
*
|
738 |
+
* @since 1.0
|
739 |
+
* @param array $args Arguments passed by the setting
|
740 |
+
* @global $popmake_options Array of all the POPMAKE Options
|
741 |
+
* @return void
|
742 |
+
*/
|
743 |
+
if ( ! function_exists( 'popmake_license_key_callback' ) ) {
|
744 |
+
function popmake_license_key_callback( $args ) {
|
745 |
+
global $popmake_options;
|
746 |
+
|
747 |
+
if ( isset( $popmake_options[ $args['id'] ] ) )
|
748 |
+
$value = $popmake_options[ $args['id'] ];
|
749 |
+
else
|
750 |
+
$value = isset( $args['std'] ) ? $args['std'] : '';
|
751 |
+
|
752 |
+
$size = ( isset( $args['size'] ) && ! is_null( $args['size'] ) ) ? $args['size'] : 'regular';
|
753 |
+
|
754 |
+
$html = '<input type="'. ($value == '' ? 'text' : 'password') . '" class="' . $size . '-text" id="popmake_settings[' . $args['id'] . ']" name="popmake_settings[' . $args['id'] . ']" value="' . esc_attr( $value ) . '"/>';
|
755 |
+
|
756 |
+
if ( 'valid' == get_option( $args['options']['is_valid_license_option'] ) ) {
|
757 |
+
$html .= '<input type="submit" class="button-secondary" name="' . $args['id'] . '_deactivate" value="' . __( 'Deactivate License', 'popup-maker' ) . '"/>';
|
758 |
+
}
|
759 |
+
$html .= '<label for="popmake_settings[' . $args['id'] . ']"> ' . $args['desc'] . '</label>';
|
760 |
+
|
761 |
+
echo $html;
|
762 |
+
}
|
763 |
+
}
|
764 |
+
|
765 |
+
|
766 |
+
function popmake_sanitize_license_key_field( $new, $key ) {
|
767 |
+
global $popmake_options;
|
768 |
+
$old = !empty($popmake_options[$key]) ? $popmake_options[$key] : null;
|
769 |
+
if( $old && $old != $new ) {
|
770 |
+
unset($popmake_options[$key]); // new license has been entered, so must reactivate
|
771 |
+
}
|
772 |
+
if($new != '')
|
773 |
+
{
|
774 |
+
if($old === null || $old == '')
|
775 |
+
{
|
776 |
+
$new = SHA1($new);
|
777 |
+
}
|
778 |
+
elseif($old && $old != $new && $old != SHA1($new))
|
779 |
+
{
|
780 |
+
$new = SHA1($new);
|
781 |
+
}
|
782 |
+
}
|
783 |
+
return $new;
|
784 |
+
}
|
785 |
+
//add_filter('popmake_settings_sanitize_license_key', 'popmake_sanitize_license_key_field', 10, 2);
|
786 |
+
|
787 |
+
/**
|
788 |
+
* Hook Callback
|
789 |
+
*
|
790 |
+
* Adds a do_action() hook in place of the field
|
791 |
+
*
|
792 |
+
* @since 1.0
|
793 |
+
* @param array $args Arguments passed by the setting
|
794 |
+
* @return void
|
795 |
+
*/
|
796 |
+
function popmake_hook_callback( $args ) {
|
797 |
+
do_action( 'popmake_' . $args['id'] );
|
798 |
}
|
includes/admin/themes/metabox-close-fields.php
CHANGED
@@ -276,7 +276,7 @@ add_action('popmake_popup_theme_close_meta_box_fields', 'popmake_popup_theme_clo
|
|
276 |
function popmake_popup_theme_close_meta_box_field_atb_extension_promotion( $popup_theme_id ) { ?>
|
277 |
<tr>
|
278 |
<th colspan="2" class="popmake-upgrade-tip">
|
279 |
-
<img style="" src="<?php echo POPMAKE_URL;?>/assets/images/admin/icon-advanced-theme-builder.png"/> <?php _e( 'Want to use background images?', 'popup-maker' ); ?> <a href="https://wppopupmaker.com/extensions/advanced-theme-builder" target="_blank"><?php _e( 'Check out Advanced Theme Builder!', 'popup-maker' ); ?></a>.
|
280 |
</th>
|
281 |
</tr><?php
|
282 |
}
|
276 |
function popmake_popup_theme_close_meta_box_field_atb_extension_promotion( $popup_theme_id ) { ?>
|
277 |
<tr>
|
278 |
<th colspan="2" class="popmake-upgrade-tip">
|
279 |
+
<img style="" src="<?php echo POPMAKE_URL;?>/assets/images/admin/icon-advanced-theme-builder.png"/> <?php _e( 'Want to use background images?', 'popup-maker' ); ?> <a href="https://wppopupmaker.com/extensions/advanced-theme-builder?utm_source=Plugin+Admin+Theme+Editor&utm_medium=Text+Link&utm_campaign=Advanced+Theme+Builder" target="_blank"><?php _e( 'Check out Advanced Theme Builder!', 'popup-maker' ); ?></a>.
|
280 |
</th>
|
281 |
</tr><?php
|
282 |
}
|
includes/admin/themes/metabox-container-fields.php
CHANGED
@@ -67,7 +67,7 @@ add_action('popmake_popup_theme_container_meta_box_fields', 'popmake_popup_theme
|
|
67 |
function popmake_popup_theme_container_meta_box_field_atb_extension_promotion( $popup_theme_id ) { ?>
|
68 |
<tr>
|
69 |
<th colspan="2" class="popmake-upgrade-tip">
|
70 |
-
<img style="" src="<?php echo POPMAKE_URL;?>/assets/images/admin/icon-advanced-theme-builder.png"/> <?php _e( 'Want to use background images?', 'popup-maker' ); ?> <a href="https://wppopupmaker.com/extensions/advanced-theme-builder" target="_blank"><?php _e( 'Check out Advanced Theme Builder!', 'popup-maker' ); ?></a>.
|
71 |
</th>
|
72 |
</tr><?php
|
73 |
}
|
67 |
function popmake_popup_theme_container_meta_box_field_atb_extension_promotion( $popup_theme_id ) { ?>
|
68 |
<tr>
|
69 |
<th colspan="2" class="popmake-upgrade-tip">
|
70 |
+
<img style="" src="<?php echo POPMAKE_URL;?>/assets/images/admin/icon-advanced-theme-builder.png"/> <?php _e( 'Want to use background images?', 'popup-maker' ); ?> <a href="https://wppopupmaker.com/extensions/advanced-theme-builder?utm_source=Plugin+Admin+Theme+Editor&utm_medium=Text+Link&utm_campaign=Advanced+Theme+Builder" target="_blank"><?php _e( 'Check out Advanced Theme Builder!', 'popup-maker' ); ?></a>.
|
71 |
</th>
|
72 |
</tr><?php
|
73 |
}
|
includes/admin/themes/metabox-overlay-fields.php
CHANGED
@@ -40,7 +40,7 @@ add_action('popmake_popup_theme_overlay_meta_box_fields', 'popmake_popup_theme_o
|
|
40 |
function popmake_popup_theme_overlay_meta_box_field_atb_extension_promotion( $popup_theme_id ) { ?>
|
41 |
<tr>
|
42 |
<th colspan="2" class="popmake-upgrade-tip">
|
43 |
-
<img style="" src="<?php echo POPMAKE_URL;?>/assets/images/admin/icon-advanced-theme-builder.png"/> <?php _e( 'Want to use background images?', 'popup-maker' ); ?> <a href="https://wppopupmaker.com/extensions/advanced-theme-builder" target="_blank"><?php _e( 'Check out Advanced Theme Builder!', 'popup-maker' ); ?></a>.
|
44 |
</th>
|
45 |
</tr><?php
|
46 |
}
|
40 |
function popmake_popup_theme_overlay_meta_box_field_atb_extension_promotion( $popup_theme_id ) { ?>
|
41 |
<tr>
|
42 |
<th colspan="2" class="popmake-upgrade-tip">
|
43 |
+
<img style="" src="<?php echo POPMAKE_URL;?>/assets/images/admin/icon-advanced-theme-builder.png"/> <?php _e( 'Want to use background images?', 'popup-maker' ); ?> <a href="https://wppopupmaker.com/extensions/advanced-theme-builder?utm_source=Plugin+Admin+Theme+Editor&utm_medium=Text+Link&utm_campaign=Advanced+Theme+Builder" target="_blank"><?php _e( 'Check out Advanced Theme Builder!', 'popup-maker' ); ?></a>.
|
44 |
</th>
|
45 |
</tr><?php
|
46 |
}
|
includes/admin/themes/metabox.php
CHANGED
@@ -231,7 +231,7 @@ function popmake_popup_thmem_ut_extension_promotion() {
|
|
231 |
if(popmake_is_admin_popup_theme_page()) { ?>
|
232 |
<div id="popuptitlediv">
|
233 |
<div class="popmake-upgrade-tip">
|
234 |
-
<img style="" src="<?php echo POPMAKE_URL;?>/assets/images/admin/icon-unlimited-themes.png"/> <?php _e( 'Need more than one (1) theme?', 'popup-maker' ); ?> <a href="https://wppopupmaker.com/extensions/unlimited-themes" target="_blank"><?php _e( 'Check out Unlimited Themes!', 'popup-maker' ); ?></a>.
|
235 |
</div>
|
236 |
</div><?php
|
237 |
}
|
231 |
if(popmake_is_admin_popup_theme_page()) { ?>
|
232 |
<div id="popuptitlediv">
|
233 |
<div class="popmake-upgrade-tip">
|
234 |
+
<img style="" src="<?php echo POPMAKE_URL;?>/assets/images/admin/icon-unlimited-themes.png"/> <?php _e( 'Need more than one (1) theme?', 'popup-maker' ); ?> <a href="https://wppopupmaker.com/extensions/unlimited-themes?utm_source=Plugin+Admin+Theme+Editor&utm_medium=Text+Link&utm_campaign=Unlimited+Themes" target="_blank"><?php _e( 'Check out Unlimited Themes!', 'popup-maker' ); ?></a>.
|
235 |
</div>
|
236 |
</div><?php
|
237 |
}
|
includes/admin/welcome/about.php
CHANGED
@@ -19,9 +19,9 @@ function popmake_about_page() {
|
|
19 |
<p>
|
20 |
<?php printf(
|
21 |
__( 'Use %sAuto Open%s, %sScroll Triggered%s & %sExit Intent Popup%s Extensions to enhance your popups’ effectiveness and easily convert users into cash.', 'popup-maker' ),
|
22 |
-
'<a href="https://wppopupmaker.com/extensions/auto-open-popups" target="_blank">', '</a>',
|
23 |
-
'<a href="https://wppopupmaker.com/extensions/scroll-triggered-popups" target="_blank">', '</a>',
|
24 |
-
'<a href="https://wppopupmaker.com/extensions/exit-intent-popups" target="_blank">', '</a>'
|
25 |
); ?>
|
26 |
</p>
|
27 |
</div>
|
@@ -55,8 +55,8 @@ function popmake_about_page() {
|
|
55 |
<p>
|
56 |
<?php printf(
|
57 |
__( 'If you need to create an unlimited number of themes and customize your popups, check out our %sUnlimited Themes%s Extension. Also, you may be interested in our %sAdvanced Theme Builder%s Extension, which allows you to add background images to many elements of your popup within a couple of clicks.', 'popup-maker' ),
|
58 |
-
'<a href="https://wppopupmaker.com/extensions/unlimited-themes" target="_blank">', '</a>',
|
59 |
-
'<a href="https://wppopupmaker.com/extensions/advanced-theme-builder" target="_blank">', '</a>'
|
60 |
); ?>
|
61 |
</p>
|
62 |
</div>
|
@@ -71,7 +71,7 @@ function popmake_about_page() {
|
|
71 |
<p>
|
72 |
<?php printf(
|
73 |
__( 'Easily convert abandoning users into cash with our Exit Intent Extension. Exit Intent now comes with Hard Exit Technology. Learn more %shere%s.', 'popup-maker' ),
|
74 |
-
'<a href="https://wppopupmaker.com/extensions/exit-intent-popups" target="_blank">', '</a>'
|
75 |
); ?>
|
76 |
</p>
|
77 |
</div>
|
19 |
<p>
|
20 |
<?php printf(
|
21 |
__( 'Use %sAuto Open%s, %sScroll Triggered%s & %sExit Intent Popup%s Extensions to enhance your popups’ effectiveness and easily convert users into cash.', 'popup-maker' ),
|
22 |
+
'<a href="https://wppopupmaker.com/extensions/auto-open-popups?utm_source=WP+Welcome+About&utm_medium=Text+Link&utm_campaign=Auto+Open" target="_blank">', '</a>',
|
23 |
+
'<a href="https://wppopupmaker.com/extensions/scroll-triggered-popups?utm_source=WP+Welcome+About&utm_medium=Text+Link&utm_campaign=Scroll+Triggered" target="_blank">', '</a>',
|
24 |
+
'<a href="https://wppopupmaker.com/extensions/exit-intent-popups?utm_source=WP+Welcome+About&utm_medium=Text+Link&utm_campaign=Exit+Intent" target="_blank">', '</a>'
|
25 |
); ?>
|
26 |
</p>
|
27 |
</div>
|
55 |
<p>
|
56 |
<?php printf(
|
57 |
__( 'If you need to create an unlimited number of themes and customize your popups, check out our %sUnlimited Themes%s Extension. Also, you may be interested in our %sAdvanced Theme Builder%s Extension, which allows you to add background images to many elements of your popup within a couple of clicks.', 'popup-maker' ),
|
58 |
+
'<a href="https://wppopupmaker.com/extensions/unlimited-themes?utm_source=WP+Welcome+About&utm_medium=Text+Link&utm_campaign=Unlimited+Themes" target="_blank">', '</a>',
|
59 |
+
'<a href="https://wppopupmaker.com/extensions/advanced-theme-builder?utm_source=WP+Welcome+About&utm_medium=Text+Link&utm_campaign=Advanced+Theme+Builder" target="_blank">', '</a>'
|
60 |
); ?>
|
61 |
</p>
|
62 |
</div>
|
71 |
<p>
|
72 |
<?php printf(
|
73 |
__( 'Easily convert abandoning users into cash with our Exit Intent Extension. Exit Intent now comes with Hard Exit Technology. Learn more %shere%s.', 'popup-maker' ),
|
74 |
+
'<a href="https://wppopupmaker.com/extensions/exit-intent-popups?utm_source=WP+Welcome+About&utm_medium=Text+Link&utm_campaign=Exit+Intent" target="_blank">', '</a>'
|
75 |
); ?>
|
76 |
</p>
|
77 |
</div>
|
includes/admin/welcome/getting-started.php
CHANGED
@@ -68,13 +68,18 @@ function popmake_getting_started_page() {
|
|
68 |
<div class="feature-section">
|
69 |
|
70 |
<h4><?php _e( 'Top-Notch Support','popup-maker' );?></h4>
|
71 |
-
<p
|
72 |
-
|
|
|
|
|
|
|
|
|
|
|
73 |
<h4><?php _e( 'Need a Solution Now?', 'popup-maker' );?></h4>
|
74 |
<p><?php
|
75 |
printf(
|
76 |
__( 'Our <a href="%s" target="_blank">Priority Support Forums</a> are there for customers that need a solution and/or more in-depth assistance immediately.', 'popup-maker' ),
|
77 |
-
'https://wppopupmaker.com/support/pricing'
|
78 |
);?>
|
79 |
</p>
|
80 |
</div>
|
@@ -89,7 +94,7 @@ function popmake_getting_started_page() {
|
|
89 |
<p><?php
|
90 |
printf(
|
91 |
__( 'New extensions that make Popup Maker even more powerful are released nearly every single week. <a href="%s" target="_blank">Subscribe to the newsletter</a> to stay up to date with our latest releases. Signup now to ensure you do not miss a release!', 'popup-maker' ),
|
92 |
-
'https://wppopupmaker.com/newsletter-sign-up'
|
93 |
);?>
|
94 |
</p>
|
95 |
|
@@ -97,7 +102,7 @@ function popmake_getting_started_page() {
|
|
97 |
<p><?php
|
98 |
printf(
|
99 |
__( '<a href="%s" target="_blank">Signup now</a> to hear about the latest tutorial releases that explain how to take Popup Maker further.', 'popup-maker' ),
|
100 |
-
'https://wppopupmaker.com/newsletter-sign-up'
|
101 |
);?>
|
102 |
</p>
|
103 |
|
@@ -117,7 +122,7 @@ function popmake_getting_started_page() {
|
|
117 |
<p><?php
|
118 |
printf(
|
119 |
__( '<a href="%s" target="_blank">The Extensions store</a> has a list of all available extensions, including convenient category filters so you can find exactly what you are looking for.', 'popup-maker' ),
|
120 |
-
'https://wppopupmaker.com/extensions'
|
121 |
);?>
|
122 |
</p>
|
123 |
|
@@ -127,7 +132,7 @@ function popmake_getting_started_page() {
|
|
127 |
<div class="return-to-dashboard">
|
128 |
<a href="<?php echo esc_url( admin_url( 'post.php?post='. popmake_get_default_popup_theme() .'&action=edit' ) ); ?>"><?php _e( 'Customize Your First Theme', 'popup-maker' ); ?></a> ·
|
129 |
<a href="<?php echo esc_url( admin_url( 'post-new.php?post_type=popup' ) ); ?>"><?php _e( 'Create a Modal', 'popup-maker' ); ?></a> ·
|
130 |
-
<a href="<?php echo esc_url( 'https://wppopupmaker.com/getting-started' ); ?>" target="_blank"><?php _e( 'View the Full Getting Started Guide', 'popup-maker' ); ?></a>
|
131 |
</div>
|
132 |
</div><?php
|
133 |
}
|
68 |
<div class="feature-section">
|
69 |
|
70 |
<h4><?php _e( 'Top-Notch Support','popup-maker' );?></h4>
|
71 |
+
<p>
|
72 |
+
<?php printf(
|
73 |
+
__( 'We provide top-notch support! If you encounter a problem or have a question, post a question in the %sWordPress Support Forums%s, or if you’ve purchased a membership or extension, the %sMembers Only Forums%s.', 'popup-maker' ),
|
74 |
+
'<a href="https://wordpress.org/support/plugin/popup-maker?utm_source=WP+Welcome+Getting+Started&utm_medium=Text+Link&utm_campaign=WordPress+Forums" target="_blank">', '</a>',
|
75 |
+
'<a href="https://wppopupmaker.com/extensions/auto-open-popups?utm_source=WP+Welcome+Getting+Started&utm_medium=Text+Link&utm_campaign=Member+Forums" target="_blank">', '</a>'
|
76 |
+
); ?>
|
77 |
+
</p>
|
78 |
<h4><?php _e( 'Need a Solution Now?', 'popup-maker' );?></h4>
|
79 |
<p><?php
|
80 |
printf(
|
81 |
__( 'Our <a href="%s" target="_blank">Priority Support Forums</a> are there for customers that need a solution and/or more in-depth assistance immediately.', 'popup-maker' ),
|
82 |
+
'https://wppopupmaker.com/support/pricing?utm_source=WP+Welcome+Getting+Started&utm_medium=Text+Link&utm_campaign=Priority+Support'
|
83 |
);?>
|
84 |
</p>
|
85 |
</div>
|
94 |
<p><?php
|
95 |
printf(
|
96 |
__( 'New extensions that make Popup Maker even more powerful are released nearly every single week. <a href="%s" target="_blank">Subscribe to the newsletter</a> to stay up to date with our latest releases. Signup now to ensure you do not miss a release!', 'popup-maker' ),
|
97 |
+
'https://wppopupmaker.com/newsletter-sign-up?utm_source=WP+Welcome+Getting+Started&utm_medium=Text+Link&utm_campaign=Newsletter+Signup'
|
98 |
);?>
|
99 |
</p>
|
100 |
|
102 |
<p><?php
|
103 |
printf(
|
104 |
__( '<a href="%s" target="_blank">Signup now</a> to hear about the latest tutorial releases that explain how to take Popup Maker further.', 'popup-maker' ),
|
105 |
+
'https://wppopupmaker.com/newsletter-sign-up?utm_source=WP+Welcome+Getting+Started&utm_medium=Text+Link&utm_campaign=Newsletter+Signup'
|
106 |
);?>
|
107 |
</p>
|
108 |
|
122 |
<p><?php
|
123 |
printf(
|
124 |
__( '<a href="%s" target="_blank">The Extensions store</a> has a list of all available extensions, including convenient category filters so you can find exactly what you are looking for.', 'popup-maker' ),
|
125 |
+
'https://wppopupmaker.com/extensions?utm_source=WP+Welcome+Getting+Started&utm_medium=Text+Link&utm_campaign=Extensions'
|
126 |
);?>
|
127 |
</p>
|
128 |
|
132 |
<div class="return-to-dashboard">
|
133 |
<a href="<?php echo esc_url( admin_url( 'post.php?post='. popmake_get_default_popup_theme() .'&action=edit' ) ); ?>"><?php _e( 'Customize Your First Theme', 'popup-maker' ); ?></a> ·
|
134 |
<a href="<?php echo esc_url( admin_url( 'post-new.php?post_type=popup' ) ); ?>"><?php _e( 'Create a Modal', 'popup-maker' ); ?></a> ·
|
135 |
+
<a href="<?php echo esc_url( 'https://wppopupmaker.com/getting-started?utm_source=WP+Welcome+Getting+Started&utm_medium=Text+Link&utm_campaign=Getting+Started' ); ?>" target="_blank"><?php _e( 'View the Full Getting Started Guide', 'popup-maker' ); ?></a>
|
136 |
</div>
|
137 |
</div><?php
|
138 |
}
|
includes/extensions-functions.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
|
3 |
function popmake_available_extensions() {
|
4 |
-
|
5 |
|
6 |
// data to send in our API request
|
7 |
$api_params = array(
|
@@ -17,7 +17,7 @@ function popmake_available_extensions() {
|
|
17 |
|
18 |
$extensions = json_decode( wp_remote_retrieve_body( $response ) );
|
19 |
set_site_transient( 'popup-maker-extension-list', $extensions, 86400 );
|
20 |
-
|
21 |
return $extensions;
|
22 |
}
|
23 |
|
1 |
<?php
|
2 |
|
3 |
function popmake_available_extensions() {
|
4 |
+
if(($extensions = get_site_transient('popup-maker-extension-list')) === false) {
|
5 |
|
6 |
// data to send in our API request
|
7 |
$api_params = array(
|
17 |
|
18 |
$extensions = json_decode( wp_remote_retrieve_body( $response ) );
|
19 |
set_site_transient( 'popup-maker-extension-list', $extensions, 86400 );
|
20 |
+
}
|
21 |
return $extensions;
|
22 |
}
|
23 |
|
includes/install.php
CHANGED
@@ -54,6 +54,10 @@ function popmake_install() {
|
|
54 |
|
55 |
}
|
56 |
|
|
|
|
|
|
|
|
|
57 |
update_option( 'popmake_settings', array_merge( $popmake_options, $options ) );
|
58 |
update_option( 'popmake_version', POPMAKE_VERSION );
|
59 |
|
54 |
|
55 |
}
|
56 |
|
57 |
+
if(!isset($popmake_options['popmake_powered_by_size'])) {
|
58 |
+
$popmake_options['popmake_powered_by_size'] = '';
|
59 |
+
}
|
60 |
+
|
61 |
update_option( 'popmake_settings', array_merge( $popmake_options, $options ) );
|
62 |
update_option( 'popmake_version', POPMAKE_VERSION );
|
63 |
|
includes/scripts.php
CHANGED
@@ -31,8 +31,8 @@ function popmake_load_site_scripts() {
|
|
31 |
wp_localize_script('popup-maker-site', 'ajaxurl', admin_url('admin-ajax.php') );
|
32 |
wp_localize_script('popup-maker-site', 'popmake_default_theme', popmake_get_default_popup_theme() );
|
33 |
wp_localize_script('popup-maker-site', 'popmake_themes', array('l10n_print_after' => 'popmake_themes = ' . json_encode( popmake_get_popup_themes_data() ) . ';'));
|
34 |
-
if(
|
35 |
-
$size = $popmake_options['popmake_powered_by_size'];
|
36 |
wp_localize_script('popup-maker-site', 'popmake_powered_by', '<div class="powered-by-popmake '. $size .'"><a href="https://wppopupmaker.com" target="_blank"><img src="' . POPMAKE_URL . '/assets/images/admin/powered-by-popup-maker.png" alt="'. __( 'Powered By Popup Maker', 'popup-maker' ) .'"/></a></div>' );
|
37 |
}
|
38 |
|
31 |
wp_localize_script('popup-maker-site', 'ajaxurl', admin_url('admin-ajax.php') );
|
32 |
wp_localize_script('popup-maker-site', 'popmake_default_theme', popmake_get_default_popup_theme() );
|
33 |
wp_localize_script('popup-maker-site', 'popmake_themes', array('l10n_print_after' => 'popmake_themes = ' . json_encode( popmake_get_popup_themes_data() ) . ';'));
|
34 |
+
if(!isset($popmake_options['popmake_powered_by_opt_out']) || $popmake_options['popmake_powered_by_opt_out'] == false) {
|
35 |
+
$size = !empty($popmake_options['popmake_powered_by_size']) ? $popmake_options['popmake_powered_by_size'] : '';
|
36 |
wp_localize_script('popup-maker-site', 'popmake_powered_by', '<div class="powered-by-popmake '. $size .'"><a href="https://wppopupmaker.com" target="_blank"><img src="' . POPMAKE_URL . '/assets/images/admin/powered-by-popup-maker.png" alt="'. __( 'Powered By Popup Maker', 'popup-maker' ) .'"/></a></div>' );
|
37 |
}
|
38 |
|
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: Wizard Internet Solutions
|
7 |
-
* Version: 1.0.
|
8 |
* Author URI: http://wizardinternetsolutions.com
|
9 |
* Text Domain: popup-maker
|
10 |
*
|
@@ -144,7 +144,7 @@ final class Popup_Maker {
|
|
144 |
}
|
145 |
|
146 |
if ( !defined('POPMAKE_VERSION') ) {
|
147 |
-
define('POPMAKE_VERSION', '1.0.
|
148 |
}
|
149 |
|
150 |
if ( !defined('POPMAKE_DB_VERSION') ) {
|
@@ -203,7 +203,7 @@ final class Popup_Maker {
|
|
203 |
require_once POPMAKE_DIR . 'includes/admin/popups/dashboard-columns.php';
|
204 |
require_once POPMAKE_DIR . 'includes/admin/popups/metabox-close-fields.php';
|
205 |
require_once POPMAKE_DIR . 'includes/admin/popups/metabox-display-fields.php';
|
206 |
-
require_once POPMAKE_DIR . 'includes/admin/popups/metabox-
|
207 |
require_once POPMAKE_DIR . 'includes/admin/popups/post-type-item-metaboxes.php';
|
208 |
require_once POPMAKE_DIR . 'includes/admin/themes/metabox.php';
|
209 |
require_once POPMAKE_DIR . 'includes/admin/themes/metabox-close-fields.php';
|
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: Wizard Internet Solutions
|
7 |
+
* Version: 1.0.2
|
8 |
* Author URI: http://wizardinternetsolutions.com
|
9 |
* Text Domain: popup-maker
|
10 |
*
|
144 |
}
|
145 |
|
146 |
if ( !defined('POPMAKE_VERSION') ) {
|
147 |
+
define('POPMAKE_VERSION', '1.0.2' );
|
148 |
}
|
149 |
|
150 |
if ( !defined('POPMAKE_DB_VERSION') ) {
|
203 |
require_once POPMAKE_DIR . 'includes/admin/popups/dashboard-columns.php';
|
204 |
require_once POPMAKE_DIR . 'includes/admin/popups/metabox-close-fields.php';
|
205 |
require_once POPMAKE_DIR . 'includes/admin/popups/metabox-display-fields.php';
|
206 |
+
require_once POPMAKE_DIR . 'includes/admin/popups/metabox-targeting-condition-fields.php';
|
207 |
require_once POPMAKE_DIR . 'includes/admin/popups/post-type-item-metaboxes.php';
|
208 |
require_once POPMAKE_DIR . 'includes/admin/themes/metabox.php';
|
209 |
require_once POPMAKE_DIR . 'includes/admin/themes/metabox-close-fields.php';
|
readme.txt
CHANGED
@@ -1,12 +1,15 @@
|
|
1 |
=== Popup Maker ===
|
2 |
Contributors: danieliser, waltmesser
|
3 |
Author URI: http://wizardinternetsolutions.com
|
4 |
-
Plugin URI: https://wppopupmaker.com
|
5 |
Donate link:
|
6 |
-
Tags:
|
7 |
Requires at least: 3.4
|
8 |
Tested up to: 4.0.1
|
9 |
-
Stable tag: 1.0.
|
|
|
|
|
|
|
10 |
Easily turn users into cash using Popup Maker - the most versatile & expansive popup plugin for WordPress!
|
11 |
|
12 |
== Description ==
|
@@ -19,24 +22,24 @@ Use any of your forms from the most popular form plugins, out-of-the-box, inside
|
|
19 |
* Ninja Forms
|
20 |
* Contact Form 7
|
21 |
|
22 |
-
[Subscribe to our Newsletter](https://wppopupmaker.com/newsletter-sign-up "Popup Maker Newsletter Sign Up") and receive tutorials and guides tailored to teaching you how to drastically improve your conversion rates using Popup Maker.
|
23 |
|
24 |
* If you like the plugin please rate & review it! If you love the plugin and want news & updates, follow us on [Twitter](https://twitter.com/wppopupmaker "Popup Maker on Twitter")!
|
25 |
-
* Check out the [Popup Maker Website](https://wppopupmaker.com "Popup Maker Website") for everything Popup Maker.
|
26 |
|
27 |
= Core Features =
|
28 |
* Unlimited Content Customization
|
29 |
-
* Use the Popup Maker WYSIWIG Content Editor to easily create as many popups as you like with any content you like! Plus, use Short Codes, HTML, and other code to give your popups ultimate power! Adding content in Popup Maker is just like adding content in WordPress.
|
30 |
* Use Popups Conditionally
|
31 |
-
* Target specific users for your popups! Our Targeting Conditions feature allows you to tailor your popups to specific users by giving you the ability to use popups exactly where you want. Use Auto Open, Scroll Triggered & Exit Intent Popup Extensions to enhance your popups' effectiveness.
|
32 |
* One (1) Customizable Popup Theme
|
33 |
-
* Customize every aspect of our default theme to match your needs. To differentiate your popup themes, you can create unlimited themes by upgrading to the Unlimited Themes Extension.
|
34 |
* Popup Opening Animations
|
35 |
-
*
|
36 |
-
* Complete Positioning Control
|
37 |
-
* Popup Maker offers you pixel perfect positioning settings to match your needs and fit your website perfectly.
|
38 |
* Theme Builder
|
39 |
-
*
|
40 |
* Scrollable Content
|
41 |
* Use the Scrollable Content Feature to add more content to your popups and ensure all of your content is visible to users!
|
42 |
* Responsive Popups
|
@@ -55,7 +58,7 @@ Use any of your forms from the most popular form plugins, out-of-the-box, inside
|
|
55 |
* Advanced Theme Builder (coming soon)
|
56 |
* Unlimited Themes (coming soon)
|
57 |
|
58 |
-
For more information, visit [Popup Maker](https://wppopupmaker.com "WordPress Popup Maker")!
|
59 |
|
60 |
[Plugin Developers Site](http://wizardinternetsolutions.com "Web & Plugin Development") - Wizard Internet Solutions
|
61 |
|
@@ -64,14 +67,28 @@ For more information, visit [Popup Maker](https://wppopupmaker.com "WordPress Po
|
|
64 |
1. Create an infinite amount of popups and put any content inside your popups! No restrictions, no limitations - customize your popup content to fit your needs.
|
65 |
2. Use the Popup Maker WYSIWIG Content Editor to easily customize your popups' content! Plus, use Short Codes, HTML, and other code to give your popups ultimate power. Adding popups and content in Popup Maker is just like adding pages and content in WordPress.
|
66 |
3. Popup Maker offers you pixel perfect positioning settings to match your needs and fit your website perfectly.
|
67 |
-
4. Create high performing themes in minutes with our user friendly Theme Builder.
|
68 |
5. Theme every element of your popups to blend perfectly into your site: Background Overlay, Popup Container, Close Button, Google Fonts & much more. All in all, customize your popup theme with over 60 options!
|
69 |
|
70 |
== Changelog ==
|
71 |
-
|
72 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
= v1.0.1 =
|
74 |
* Removed links to getting started from "Dashboard" Admin Menu.
|
75 |
* Added Line Height Setting to Both Title and Close, Allowing Perfect Circles for close button.
|
76 |
* Updated admin styles.
|
77 |
-
* Misc Admin changes, including new filters/hooks for upcoming extensions.
|
|
|
|
|
|
1 |
=== Popup Maker ===
|
2 |
Contributors: danieliser, waltmesser
|
3 |
Author URI: http://wizardinternetsolutions.com
|
4 |
+
Plugin URI: https://wppopupmaker.com?utm_source=WordPress+Page&utm_medium=Text+Link&utm_campaign=Plugin+URI
|
5 |
Donate link:
|
6 |
+
Tags: popup,popups,modal,modals,popup form,form modal,conversion,conversions,dialog box
|
7 |
Requires at least: 3.4
|
8 |
Tested up to: 4.0.1
|
9 |
+
Stable tag: 1.0.2
|
10 |
+
|
11 |
+
|
12 |
+
License: GNU Version 2 or Any Later Version
|
13 |
Easily turn users into cash using Popup Maker - the most versatile & expansive popup plugin for WordPress!
|
14 |
|
15 |
== Description ==
|
22 |
* Ninja Forms
|
23 |
* Contact Form 7
|
24 |
|
25 |
+
[Subscribe to our Newsletter](https://wppopupmaker.com/newsletter-sign-up?utm_source=WordPress+Page&utm_medium=Text+Link&utm_campaign=Newsletter+Signup "Popup Maker Newsletter Sign Up") and receive tutorials and guides tailored to teaching you how to drastically improve your conversion rates using Popup Maker.
|
26 |
|
27 |
* If you like the plugin please rate & review it! If you love the plugin and want news & updates, follow us on [Twitter](https://twitter.com/wppopupmaker "Popup Maker on Twitter")!
|
28 |
+
* Check out the [Popup Maker Website](https://wppopupmaker.com?utm_source=WordPress+Page&utm_medium=Text+Link&utm_campaign=Home+Page "Popup Maker Website") for everything Popup Maker.
|
29 |
|
30 |
= Core Features =
|
31 |
* Unlimited Content Customization
|
32 |
+
* Use the Popup Maker WYSIWIG Content Editor to easily create as many popups as you like with any content you like! Plus, use Short Codes, HTML, and other code to give your popups ultimate power! Adding content and popups in Popup Maker is just like adding content and pages in WordPress.
|
33 |
* Use Popups Conditionally
|
34 |
+
* Target specific users for your popups! Our Targeting Conditions feature allows you to tailor your popups to specific users by giving you the ability to use popups exactly where you want. Use [Auto Open](https://wppopupmaker.com/extensions/auto-open-popups?utm_source=WordPress+Page&utm_medium=Text+Link&utm_campaign=Auto+Open "Auto Open Popups"), [Scroll Triggered](https://wppopupmaker.com/extensions/scroll-triggered-popups?utm_source=WordPress+Page&utm_medium=Text+Link&utm_campaign=Scroll+Triggered "Scroll Triggered Popups") & [Exit Intent](https://wppopupmaker.com/extensions/exit-intent-popups?utm_source=WordPress+Page&utm_medium=Text+Link&utm_campaign=Exit+Intent "Exit Intent Popups") Popup Extensions to enhance your popups' effectiveness.
|
35 |
* One (1) Customizable Popup Theme
|
36 |
+
* Customize every aspect of our default theme to match your needs � from colors to Google Fonts. To differentiate your popup themes on your popups, you can create unlimited themes by upgrading to the [Unlimited Themes Extension](https://wppopupmaker.com/extensions/unlimited-themes?utm_source=WordPress+Page&utm_medium=Text+Link&utm_campaign=Unlimited+Themes "Unlimited Popup Themes").
|
37 |
* Popup Opening Animations
|
38 |
+
* Our WordPress Popup Plugin gives your popup more power and allows you to customize how it pops up by choosing from several opening animations.
|
39 |
+
* Complete Positioning and Size Control
|
40 |
+
* Popup Maker offers you pixel perfect positioning settings to match your needs and fit your website perfectly � from centered popups to anchored popups. Plus, choose from a grab bag full of responsive sizes ready to go, out-of-the-box, or customize your own popup size using 4 units of measurement: pixels, %, EM, and REM.
|
41 |
* Theme Builder
|
42 |
+
* Theme every element of your popups to blend perfectly into your site: Background Overlay, Popup Container, Close Button, Google Fonts & much more. All in all, customize your popup theme with over 60 options! Plus, don't be worried to go with the flow, you can easily revert to old saves with Revision History! Want more options? Get our [Advanced Theme Builder](https://wppopupmaker.com/extensions/advanced-theme-builder?utm_source=WordPress+Page&utm_medium=Text+Link&utm_campaign=Advanced+Theme+Builder "Advanced Theme Builder")!
|
43 |
* Scrollable Content
|
44 |
* Use the Scrollable Content Feature to add more content to your popups and ensure all of your content is visible to users!
|
45 |
* Responsive Popups
|
58 |
* Advanced Theme Builder (coming soon)
|
59 |
* Unlimited Themes (coming soon)
|
60 |
|
61 |
+
For more information, visit [Popup Maker](https://wppopupmaker.com?utm_source=WordPress+Page&utm_medium=Text+Link&utm_campaign=Home+Page "WordPress Popup Maker")!
|
62 |
|
63 |
[Plugin Developers Site](http://wizardinternetsolutions.com "Web & Plugin Development") - Wizard Internet Solutions
|
64 |
|
67 |
1. Create an infinite amount of popups and put any content inside your popups! No restrictions, no limitations - customize your popup content to fit your needs.
|
68 |
2. Use the Popup Maker WYSIWIG Content Editor to easily customize your popups' content! Plus, use Short Codes, HTML, and other code to give your popups ultimate power. Adding popups and content in Popup Maker is just like adding pages and content in WordPress.
|
69 |
3. Popup Maker offers you pixel perfect positioning settings to match your needs and fit your website perfectly.
|
70 |
+
4. Create high performing themes in minutes with our user friendly Theme Builder. Don't be worried to go with the flow, you can easily revert to old saves with Revision History.
|
71 |
5. Theme every element of your popups to blend perfectly into your site: Background Overlay, Popup Container, Close Button, Google Fonts & much more. All in all, customize your popup theme with over 60 options!
|
72 |
|
73 |
== Changelog ==
|
74 |
+
|
75 |
+
= v1.0.2 =
|
76 |
+
* Resized Extension page images to load quicker on extensions page.
|
77 |
+
* Added last_open_popup proerty to popmake jQuery function.
|
78 |
+
* Resized Extension page images to load quicker on extensions page.
|
79 |
+
* Fixed misc Admin Styles.
|
80 |
+
* Corrected support links.
|
81 |
+
* Fixed Bug in Meta boxes on settings page.
|
82 |
+
* Renamed files appropriately.
|
83 |
+
* Added new section callback for settings API.
|
84 |
+
* Fixed small glitch in Opt In for Credit Link.
|
85 |
+
|
86 |
+
|
87 |
= v1.0.1 =
|
88 |
* Removed links to getting started from "Dashboard" Admin Menu.
|
89 |
* Added Line Height Setting to Both Title and Close, Allowing Perfect Circles for close button.
|
90 |
* Updated admin styles.
|
91 |
+
* Misc Admin changes, including new filters/hooks for upcoming extensions.
|
92 |
+
|
93 |
+
= v1.0.0 =
|
94 |
+
* Initial Release
|