Version Description
- Fixed bug preventing to save settings
- Fixed bug with popups not closing
Download this release
Release Info
Developer | timersys |
Plugin | Popups – WordPress Popup |
Version | 1.3.0.2 |
Comparing to | |
See all releases |
Code changes from version 1.3.0.1 to 1.3.0.2
- README.txt +5 -1
- admin/class-social-popup-admin.php +10 -5
- popups.php +1 -1
- public/assets/css/public.css +1 -0
- public/assets/js/min/public-min.js +1 -1
- public/assets/js/public.js +1 -1
- public/class-social-popup.php +2 -2
README.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
|
|
4 |
Tags: twitter,google+, facebook,Popups, twitter follow, facebook like, google plus,social boost, social splash, popup, facebook popup, scroll popups, popups, wordpress popup, wp popups, cf7, gf, gravity forms, contact form 7, ifs, infusion soft, subscribe
|
5 |
Requires at least: 3.6
|
6 |
Tested up to: 4.2.1
|
7 |
-
Stable tag: 1.3.0.
|
8 |
Text Domain: spucpt
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -109,6 +109,10 @@ Yes if you need to debug you can use uncompressed javascript by addings ([this c
|
|
109 |
|
110 |
== Changelog ==
|
111 |
|
|
|
|
|
|
|
|
|
112 |
= 1.3.0.1 =
|
113 |
|
114 |
* New editor style only show on popups now
|
4 |
Tags: twitter,google+, facebook,Popups, twitter follow, facebook like, google plus,social boost, social splash, popup, facebook popup, scroll popups, popups, wordpress popup, wp popups, cf7, gf, gravity forms, contact form 7, ifs, infusion soft, subscribe
|
5 |
Requires at least: 3.6
|
6 |
Tested up to: 4.2.1
|
7 |
+
Stable tag: 1.3.0.2
|
8 |
Text Domain: spucpt
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
109 |
|
110 |
== Changelog ==
|
111 |
|
112 |
+
= 1.3.0.2 =
|
113 |
+
* Fixed bug preventing to save settings
|
114 |
+
* Fixed bug with popups not closing
|
115 |
+
|
116 |
= 1.3.0.1 =
|
117 |
|
118 |
* New editor style only show on popups now
|
admin/class-social-popup-admin.php
CHANGED
@@ -215,23 +215,28 @@ class SocialPopup_Admin {
|
|
215 |
*/
|
216 |
public function settings_page() {
|
217 |
|
218 |
-
$defaults = array(
|
|
|
|
|
219 |
'debug' => '',
|
220 |
'safe' => '',
|
221 |
'shortcodes_style' => '',
|
222 |
'facebook' => '',
|
223 |
'google' => '',
|
224 |
'twitter' => '',
|
225 |
-
|
226 |
-
|
|
|
|
|
|
|
|
|
227 |
|
228 |
if ( isset( $_POST['spu_nonce'] ) && wp_verify_nonce( $_POST['spu_nonce'], 'spu_save_settings' ) ) {
|
229 |
-
$opts =
|
230 |
update_option( 'spu_settings' , $opts );
|
231 |
}
|
232 |
|
233 |
|
234 |
-
|
235 |
include 'views/settings-page.php';
|
236 |
|
237 |
}
|
215 |
*/
|
216 |
public function settings_page() {
|
217 |
|
218 |
+
$defaults = apply_filters( 'spu/settings_page/defaults_opts', array(
|
219 |
+
'aff_link' => '',
|
220 |
+
'ajax_mode' => '',
|
221 |
'debug' => '',
|
222 |
'safe' => '',
|
223 |
'shortcodes_style' => '',
|
224 |
'facebook' => '',
|
225 |
'google' => '',
|
226 |
'twitter' => '',
|
227 |
+
'spu_license_key' => '',
|
228 |
+
'ua_code' => '',
|
229 |
+
'mc_api' => '',
|
230 |
+
));
|
231 |
+
$opts = apply_filters( 'spu/settings_page/opts', wp_parse_args(get_option( 'spu_settings', $defaults ), $defaults ) );
|
232 |
+
|
233 |
|
234 |
if ( isset( $_POST['spu_nonce'] ) && wp_verify_nonce( $_POST['spu_nonce'], 'spu_save_settings' ) ) {
|
235 |
+
$opts = wp_parse_args(esc_sql( @$_POST['spu_settings'] ), $defaults);
|
236 |
update_option( 'spu_settings' , $opts );
|
237 |
}
|
238 |
|
239 |
|
|
|
240 |
include 'views/settings-page.php';
|
241 |
|
242 |
}
|
popups.php
CHANGED
@@ -11,7 +11,7 @@
|
|
11 |
* @socialpopup
|
12 |
* Plugin Name: Popups - WordPress Popup
|
13 |
* Plugin URI: http://www.timersys.com/free-plugins/social-popup/
|
14 |
-
* Version: 1.3.0.
|
15 |
* Description: This plugin will display a popup or splash screen when a new user visit your site showing a Google+, twitter and facebook follow links. This will increase you followers ratio in a 40%. Popup will be close depending on your settings. Check readme.txt for full details.
|
16 |
* Author: Damian Logghe
|
17 |
* Author URI: http://wp.timersys.com
|
11 |
* @socialpopup
|
12 |
* Plugin Name: Popups - WordPress Popup
|
13 |
* Plugin URI: http://www.timersys.com/free-plugins/social-popup/
|
14 |
+
* Version: 1.3.0.2
|
15 |
* Description: This plugin will display a popup or splash screen when a new user visit your site showing a Google+, twitter and facebook follow links. This will increase you followers ratio in a 40%. Popup will be close depending on your settings. Check readme.txt for full details.
|
16 |
* Author: Damian Logghe
|
17 |
* Author URI: http://wp.timersys.com
|
public/assets/css/public.css
CHANGED
@@ -101,6 +101,7 @@ body {
|
|
101 |
text-shadow: 0 1px 0 #fff;
|
102 |
opacity: .3;
|
103 |
filter: alpha(opacity=30);
|
|
|
104 |
}
|
105 |
p.spu-powered {
|
106 |
position: absolute;
|
101 |
text-shadow: 0 1px 0 #fff;
|
102 |
opacity: .3;
|
103 |
filter: alpha(opacity=30);
|
104 |
+
color: #000;
|
105 |
}
|
106 |
p.spu-powered {
|
107 |
position: absolute;
|
public/assets/js/min/public-min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function($){"use strict";function t(t,i,o,e,n){var r={url:spuvar.ajax_url,data:t,cache:!1,type:"POST",dataType:"json",timeout:3e4},n=n||!1,o=o||!1,e=e||!1;i&&(r.url=i),o&&(r.success=o),e&&(r.error=e),n&&(r.dataType=n),$.ajax(r)}function i(t,i,o){if(o){var e=new Date;e.setTime(e.getTime()+24*o*60*60*1e3);var n="; expires="+e.toGMTString()}else var n="";document.cookie=t+"="+i+n+"; path=/"}function o(t){for(var i=t+"=",o=document.cookie.split(";"),e=0;e<o.length;e++){for(var n=o[e];" "==n.charAt(0);)n=n.substring(1,n.length);if(0==n.indexOf(i))return n.substring(i.length,n.length)}return null}function e(){try{FB.Event.subscribe("edge.create",function(t,i){var o=$(i).parents(".spu-box").data("box-id");o&&SPU.hide(o)})}catch(t){}l=!0,clearInterval(h)}function n(t){var i=$(t.target).parents(".spu-box").data("box-id");i&&SPU.hide(i)}function r(t){if("on"==t.state){var i=jQuery(".spu-gogl").data("box-id");i&&SPU.hide(i)}}function a(t){if("confirm"==t.type){var i=jQuery(".spu-gogl").data("box-id");i&&SPU.hide(i)}}function s(){if(spuvar_social.facebook)try{FB.XFBML.parse()}catch(t){}if(spuvar_social.google)try{gapi.plusone.go()}catch(t){}if(spuvar_social.twitter)try{twttr.widgets.load()}catch(t){}}function u(){$(".spu-box form").each(function(){var t=$(this).attr("action");t&&$(this).attr("action",t.replace("?spu_action=spu_load",""))}),$.fn.wpcf7InitForm&&$(".spu-box div.wpcf7 > form").wpcf7InitForm()}var d=function(){function e(t){var i=d[t],o=$(window).width(),e=$(window).height(),n=i.outerHeight(),r=i.outerWidth(),a=i.data("width"),s=0,u=e/2-n/2,c="fixed",f=$(document).scrollTop();i.hasClass("spu-centered")&&(o>a&&(s=o/2-r/2),i.css({left:s,position:c,top:u})),n+50>e&&(c="absolute",u=f,i.css({position:c,top:u,bottom:"auto"}))}function n(t){var i=$(t).find(".spu-facebook");if(i.length){var o=i.find(".fb-like > span").width();if(0==o){var e=i.find(".fb-like").data("layout");i.append("box_count"==e?'<style type="text/css"> #'+$(t).attr("id")+" .fb-like iframe, #"+$(t).attr("id")+" .fb_iframe_widget span, #"+$(t).attr("id")+" .fb_iframe_widget{ height: 63px !important;width: 80px !important;}</style>":'<style type="text/css"> #'+$(t).attr("id")+" .fb-like iframe, #"+$(t).attr("id")+" .fb_iframe_widget span, #"+$(t).attr("id")+" .fb_iframe_widget{ height: 20px !important;width: 80px !important;}</style>")}}}function r(t,o,n){var r=d[t],a=$("#spu-bg-"+t),s=r.data("bgopa");if(r.is(":animated"))return!1;if(o===!0&&r.is(":visible")||o===!1&&r.is(":hidden"))return!1;if(o===!1){var u=parseInt(r.data("cookie"));u>0&&i("spu_box_"+t,!0,u),r.trigger("spu.box_close",[t])}else r.trigger("spu.box_open",[t]),$(window).resize(function(){e(t)}),e(t);var c=r.data("spuanimation"),f=r.data("close-on-conversion");return"fade"===c?o===!0?r.fadeIn("slow"):o===!1&&f&&r.fadeOut("slow"):o===!0?r.slideDown("slow"):o===!1&&f&&r.slideUp("slow"),o===!0&&s>0?a.fadeIn():o===!1&&f&&a.fadeOut(),o}var a=$(window).height(),u=spuvar.is_admin,d=[];return s(),$(".spu-content").children().first().css({"margin-top":0,"padding-top":0}).end().last().css({"margin-bottom":0,"padding-bottom":0}),$(".spu-box").each(function(){spuvar.safe_mode&&$(this).prependTo("body");var i=$(this),e=i.data("trigger"),s=0,c=1===parseInt(i.data("test-mode")),f=i.data("box-id"),p=1===parseInt(i.data("auto-hide")),l=parseInt(i.data("seconds-close")),h=parseInt(i.data("trigger-number"),10),m="percentage"==e?parseInt(i.data("trigger-number"),10)/100:.8,g=m*$(document).height();n(i),$(".spu-google").width($(".spu-google").width()-20),$(".spu-twitter").width($(".spu-twitter ").width()-50);var w=0,b=0,v=i.outerWidth(),_=i.find(".spu-content").width(),y=i.data("total");i.find(".spu-shortcode").wrapAll('<div class="spu_shortcodes"/>'),y&&!spuvar.disable_style&&$(window).width()>v&&(i.find(".spu-shortcode").each(function(){w+=$(this).width()}),b=_-w-y),b>0&&(i.find(".spu-shortcode").each(function(){$(this).css("margin-left",b/2)}),2==y?i.find(".spu-shortcode").last().css("margin-left",0):3==y&&i.find(".spu-shortcode").first().css("margin-left",0)),$(document).keyup(function(t){27==t.keyCode&&r(f,!1,!1)});var x=navigator.userAgent,T=x.match(/iPad/i)||x.match(/iPhone/i)?"touchstart":"click";$("body").on(T,function(t){void 0!==t.originalEvent&&r(f,!1,!1)}),$("body").on(T,".spu-box",function(t){t.stopPropagation()}),i.hide().css("left",""),d[f]=i;var k=function(){s&&clearTimeout(s),s=window.setTimeout(function(){var t=$(window).scrollTop(),i=t+a>=g;i?(p||$(window).unbind("scroll",k),r(f,!0,!1)):r(f,!1,!1)},100)},I=function(){s&&clearTimeout(s),s=window.setTimeout(function(){r(f,!0,!1)},1e3*h)},j=o("spu_box_"+f);if((void 0==j||""==j||u&&c)&&("seconds"==e?I():($(window).bind("scroll",k),k()),window.location.hash&&window.location.hash.length>0)){var P=window.location.hash,S;P.substring(1)===i.attr("id")&&setTimeout(function(){r(f,!0,!1)},100)}i.find(".spu-close-popup").click
|
1 |
+
!function($){"use strict";function t(t,i,o,e,n){var r={url:spuvar.ajax_url,data:t,cache:!1,type:"POST",dataType:"json",timeout:3e4},n=n||!1,o=o||!1,e=e||!1;i&&(r.url=i),o&&(r.success=o),e&&(r.error=e),n&&(r.dataType=n),$.ajax(r)}function i(t,i,o){if(o){var e=new Date;e.setTime(e.getTime()+24*o*60*60*1e3);var n="; expires="+e.toGMTString()}else var n="";document.cookie=t+"="+i+n+"; path=/"}function o(t){for(var i=t+"=",o=document.cookie.split(";"),e=0;e<o.length;e++){for(var n=o[e];" "==n.charAt(0);)n=n.substring(1,n.length);if(0==n.indexOf(i))return n.substring(i.length,n.length)}return null}function e(){try{FB.Event.subscribe("edge.create",function(t,i){var o=$(i).parents(".spu-box").data("box-id");o&&SPU.hide(o)})}catch(t){}l=!0,clearInterval(h)}function n(t){var i=$(t.target).parents(".spu-box").data("box-id");i&&SPU.hide(i)}function r(t){if("on"==t.state){var i=jQuery(".spu-gogl").data("box-id");i&&SPU.hide(i)}}function a(t){if("confirm"==t.type){var i=jQuery(".spu-gogl").data("box-id");i&&SPU.hide(i)}}function s(){if(spuvar_social.facebook)try{FB.XFBML.parse()}catch(t){}if(spuvar_social.google)try{gapi.plusone.go()}catch(t){}if(spuvar_social.twitter)try{twttr.widgets.load()}catch(t){}}function u(){$(".spu-box form").each(function(){var t=$(this).attr("action");t&&$(this).attr("action",t.replace("?spu_action=spu_load",""))}),$.fn.wpcf7InitForm&&$(".spu-box div.wpcf7 > form").wpcf7InitForm()}var d=function(){function e(t){var i=d[t],o=$(window).width(),e=$(window).height(),n=i.outerHeight(),r=i.outerWidth(),a=i.data("width"),s=0,u=e/2-n/2,c="fixed",f=$(document).scrollTop();i.hasClass("spu-centered")&&(o>a&&(s=o/2-r/2),i.css({left:s,position:c,top:u})),n+50>e&&(c="absolute",u=f,i.css({position:c,top:u,bottom:"auto"}))}function n(t){var i=$(t).find(".spu-facebook");if(i.length){var o=i.find(".fb-like > span").width();if(0==o){var e=i.find(".fb-like").data("layout");i.append("box_count"==e?'<style type="text/css"> #'+$(t).attr("id")+" .fb-like iframe, #"+$(t).attr("id")+" .fb_iframe_widget span, #"+$(t).attr("id")+" .fb_iframe_widget{ height: 63px !important;width: 80px !important;}</style>":'<style type="text/css"> #'+$(t).attr("id")+" .fb-like iframe, #"+$(t).attr("id")+" .fb_iframe_widget span, #"+$(t).attr("id")+" .fb_iframe_widget{ height: 20px !important;width: 80px !important;}</style>")}}}function r(t,o,n){var r=d[t],a=$("#spu-bg-"+t),s=r.data("bgopa");if(r.is(":animated"))return!1;if(o===!0&&r.is(":visible")||o===!1&&r.is(":hidden"))return!1;if(o===!1){var u=parseInt(r.data("cookie"));u>0&&i("spu_box_"+t,!0,u),r.trigger("spu.box_close",[t])}else r.trigger("spu.box_open",[t]),$(window).resize(function(){e(t)}),e(t);var c=r.data("spuanimation"),f=r.data("close-on-conversion");return"fade"===c?o===!0?r.fadeIn("slow"):o===!1&&f&&r.fadeOut("slow"):o===!0?r.slideDown("slow"):o===!1&&f&&r.slideUp("slow"),o===!0&&s>0?a.fadeIn():o===!1&&f&&a.fadeOut(),o}var a=$(window).height(),u=spuvar.is_admin,d=[];return s(),$(".spu-content").children().first().css({"margin-top":0,"padding-top":0}).end().last().css({"margin-bottom":0,"padding-bottom":0}),$(".spu-box").each(function(){spuvar.safe_mode&&$(this).prependTo("body");var i=$(this),e=i.data("trigger"),s=0,c=1===parseInt(i.data("test-mode")),f=i.data("box-id"),p=1===parseInt(i.data("auto-hide")),l=parseInt(i.data("seconds-close")),h=parseInt(i.data("trigger-number"),10),m="percentage"==e?parseInt(i.data("trigger-number"),10)/100:.8,g=m*$(document).height();n(i),$(".spu-google").width($(".spu-google").width()-20),$(".spu-twitter").width($(".spu-twitter ").width()-50);var w=0,b=0,v=i.outerWidth(),_=i.find(".spu-content").width(),y=i.data("total");i.find(".spu-shortcode").wrapAll('<div class="spu_shortcodes"/>'),y&&!spuvar.disable_style&&$(window).width()>v&&(i.find(".spu-shortcode").each(function(){w+=$(this).width()}),b=_-w-y),b>0&&(i.find(".spu-shortcode").each(function(){$(this).css("margin-left",b/2)}),2==y?i.find(".spu-shortcode").last().css("margin-left",0):3==y&&i.find(".spu-shortcode").first().css("margin-left",0)),$(document).keyup(function(t){27==t.keyCode&&r(f,!1,!1)});var x=navigator.userAgent,T=x.match(/iPad/i)||x.match(/iPhone/i)?"touchstart":"click";$("body").on(T,function(t){void 0!==t.originalEvent&&r(f,!1,!1)}),$("body").on(T,".spu-box",function(t){t.stopPropagation()}),i.hide().css("left",""),d[f]=i;var k=function(){s&&clearTimeout(s),s=window.setTimeout(function(){var t=$(window).scrollTop(),i=t+a>=g;i?(p||$(window).unbind("scroll",k),r(f,!0,!1)):r(f,!1,!1)},100)},I=function(){s&&clearTimeout(s),s=window.setTimeout(function(){r(f,!0,!1)},1e3*h)},j=o("spu_box_"+f);if((void 0==j||""==j||u&&c)&&("seconds"==e?I():($(window).bind("scroll",k),k()),window.location.hash&&window.location.hash.length>0)){var P=window.location.hash,S;P.substring(1)===i.attr("id")&&setTimeout(function(){r(f,!0,!1)},100)}i.find(".spu-close-popup").on("click",function(){r(f,!1,!1),"percentage"==e&&$(window).unbind("scroll",k)}),$('a[href="#'+i.attr("id")+'"]').click(function(){return r(f,!0,!1),!1}),i.find(".gform_wrapper form").addClass("gravity-form"),i.on("submit","form.spu-disable-ajax",function(){i.trigger("spu.form_submitted",[f]),r(f,!1,!0)}),i.on("submit",'form:not(".wpcf7-form, .gravity-form, .infusion-form, .spu-disable-ajax")',function(o){o.preventDefault();var e=!0,n=$(this),a=n.serialize(),s=n.attr("action"),u=function(t,i,o){console.log("Spu Form error: "+i+" - "+o)},d=function(t){var i=$(t).filter("#spu-"+f).html();$("#spu-"+f).html(i),$("#spu-"+f).find(".mc4wp-form-error").length||setTimeout(function(){r(f,!1,!0)},1e3*spuvar.seconds_confirmation_close)};return t(a,s,d,u,"html"),i.trigger("spu.form_submitted",[f]),e}),$("body").on("mailsent.wpcf7",function(){i.trigger("spu.form_submitted",[f]),r(f,!1,!0)}),$(document).on("gform_confirmation_loaded",function(){i.trigger("spu.form_submitted",[f]),r(f,!1,!0)}),i.on("submit",".infusion-form",function(t){t.preventDefault(),i.trigger("spu.form_submitted",[f]),r(f,!1,!0),this.submit()})}),{show:function(t){return r(t,!0,!1)},hide:function(t){return r(t,!1,!1)},request:function(i,o,e,n){return t(i,o,e,n)}}};if(spuvar.ajax_mode){var c={pid:spuvar.pid,referrer:document.referrer,is_category:spuvar.is_category,is_archive:spuvar.is_archive},f=function(t){$("body").append(t),window.SPU=d(),u()},p=function(t,i,o){console.log("Problem loading popups - error: "+i+" - "+o)};t(c,spuvar.ajax_mode_url,f,p,"html")}else jQuery(window).load(function(){window.SPU=d()});var l=!1,h=setInterval(function(){"undefined"==typeof FB||l||e()},1e3);if("undefined"!=typeof twttr)try{twttr.ready(function(t){t.events.bind("tweet",n),t.events.bind("follow",n)})}catch(m){}}(jQuery);
|
public/assets/js/public.js
CHANGED
@@ -181,7 +181,7 @@ var SPU_master = function() {
|
|
181 |
}
|
182 |
} /* end check cookie */
|
183 |
|
184 |
-
|
185 |
|
186 |
// hide box
|
187 |
toggleBox( id, false, false );
|
181 |
}
|
182 |
} /* end check cookie */
|
183 |
|
184 |
+
$box.on('click','.spu-close-popup',function() {
|
185 |
|
186 |
// hide box
|
187 |
toggleBox( id, false, false );
|
public/class-social-popup.php
CHANGED
@@ -23,7 +23,7 @@ class SocialPopup {
|
|
23 |
*
|
24 |
* @var string
|
25 |
*/
|
26 |
-
const VERSION = '1.3.0.
|
27 |
|
28 |
/**
|
29 |
* Popups to use acrros files
|
@@ -101,7 +101,7 @@ class SocialPopup {
|
|
101 |
add_action( 'wp_enqueue_scripts', array( $this, 'register_scripts' ) );
|
102 |
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
|
103 |
|
104 |
-
if(
|
105 |
//print boxes
|
106 |
add_action( 'wp_footer', array( $this, 'print_boxes' ) );
|
107 |
}
|
23 |
*
|
24 |
* @var string
|
25 |
*/
|
26 |
+
const VERSION = '1.3.0.2';
|
27 |
|
28 |
/**
|
29 |
* Popups to use acrros files
|
101 |
add_action( 'wp_enqueue_scripts', array( $this, 'register_scripts' ) );
|
102 |
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
|
103 |
|
104 |
+
if( empty($this->spu_settings['ajax_mode'] ) ) {
|
105 |
//print boxes
|
106 |
add_action( 'wp_footer', array( $this, 'print_boxes' ) );
|
107 |
}
|