Popups – WordPress Popup - Version 1.3.0.3

Version Description

  • Social providers not loading on https sites
  • Fixed bug preventing popups to show on non ajax mode
Download this release

Release Info

Developer timersys
Plugin Icon 128x128 Popups – WordPress Popup
Version 1.3.0.3
Comparing to
See all releases

Code changes from version 1.3.0.2 to 1.3.0.3

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.2
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.2 =
113
  * Fixed bug preventing to save settings
114
  * Fixed bug with popups not closing
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.3
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.3 =
113
+ * Social providers not loading on https sites
114
+ * Fixed bug preventing popups to show on non ajax mode
115
+
116
  = 1.3.0.2 =
117
  * Fixed bug preventing to save settings
118
  * Fixed bug with popups not closing
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.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
11
  * @socialpopup
12
  * Plugin Name: Popups - WordPress Popup
13
  * Plugin URI: http://www.timersys.com/free-plugins/social-popup/
14
+ * Version: 1.3.0.3
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/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").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);
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.on("click",".spu-close-popup",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
@@ -180,7 +180,7 @@ var SPU_master = function() {
180
  }
181
  }
182
  } /* end check cookie */
183
-
184
  $box.on('click','.spu-close-popup',function() {
185
 
186
  // hide box
@@ -554,7 +554,6 @@ function twitterCB(intent_event) {
554
  SPU.hide(box_id);
555
  }
556
  }
557
-
558
  function googleCB(a) {
559
 
560
  if( "on" == a.state ) {
180
  }
181
  }
182
  } /* end check cookie */
183
+ //close popup
184
  $box.on('click','.spu-close-popup',function() {
185
 
186
  // hide box
554
  SPU.hide(box_id);
555
  }
556
  }
 
557
  function googleCB(a) {
558
 
559
  if( "on" == a.state ) {
public/class-social-popup.php CHANGED
@@ -23,7 +23,7 @@ class SocialPopup {
23
  *
24
  * @var string
25
  */
26
- const VERSION = '1.3.0.2';
27
 
28
  /**
29
  * Popups to use acrros files
@@ -341,11 +341,11 @@ class SocialPopup {
341
 
342
  wp_register_script( 'spu-public', $js_url, array( 'jquery' ), self::VERSION, true );
343
 
344
- wp_register_script( 'spu-facebook', 'http://connect.facebook.net/'.get_locale().'/all.js#xfbml=1', array('jquery'), self::VERSION, FALSE);
345
 
346
- wp_register_script( 'spu-twitter', 'http://platform.twitter.com/widgets.js', array('jquery'), self::VERSION, FALSE);
347
 
348
- wp_register_script( 'spu-google', 'https://apis.google.com/js/plusone.js', array('jquery'), self::VERSION, FALSE);
349
 
350
  }
351
 
23
  *
24
  * @var string
25
  */
26
+ const VERSION = '1.3.0.3';
27
 
28
  /**
29
  * Popups to use acrros files
341
 
342
  wp_register_script( 'spu-public', $js_url, array( 'jquery' ), self::VERSION, true );
343
 
344
+ wp_register_script( 'spu-facebook', '//connect.facebook.net/'.get_locale().'/all.js#xfbml=1', array('jquery'), self::VERSION, FALSE);
345
 
346
+ wp_register_script( 'spu-twitter', '//platform.twitter.com/widgets.js', array('jquery'), self::VERSION, FALSE);
347
 
348
+ wp_register_script( 'spu-google', '//apis.google.com/js/plusone.js', array('jquery'), self::VERSION, FALSE);
349
 
350
  }
351