Version Description
- Hotfix- Bug with ajax mode & testmode preventing plugin to work. Please update
Download this release
Release Info
Developer | timersys |
Plugin | Popups – WordPress Popup |
Version | 1.2.3.1 |
Comparing to | |
See all releases |
Code changes from version 1.2.3 to 1.2.3.1
- README.txt +5 -1
- popups.php +1 -1
- public/assets/js/min/public-min.js +1 -1
- public/assets/js/public.js +5 -7
- public/class-social-popup.php +10 -16
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
|
5 |
Requires at least: 3.6
|
6 |
Tested up to: 4.1
|
7 |
-
Stable tag: 1.2.3
|
8 |
Text Domain: spucpt
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -100,6 +100,10 @@ Yes if you need to debug you can use uncompressed javascript by addings ([this c
|
|
100 |
|
101 |
== Changelog ==
|
102 |
|
|
|
|
|
|
|
|
|
103 |
= 1.2.3 =
|
104 |
|
105 |
* Added Ajax mode in settings page to make popups compatible with cache plugins
|
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
|
5 |
Requires at least: 3.6
|
6 |
Tested up to: 4.1
|
7 |
+
Stable tag: 1.2.3.1
|
8 |
Text Domain: spucpt
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
100 |
|
101 |
== Changelog ==
|
102 |
|
103 |
+
= 1.2.3.1 =
|
104 |
+
|
105 |
+
* Hotfix- Bug with ajax mode & testmode preventing plugin to work. Please update
|
106 |
+
|
107 |
= 1.2.3 =
|
108 |
|
109 |
* Added Ajax mode in settings page to make popups compatible with cache plugins
|
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.2.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
|
11 |
* @socialpopup
|
12 |
* Plugin Name: Popups - WordPress Popup
|
13 |
* Plugin URI: http://www.timersys.com/free-plugins/social-popup/
|
14 |
+
* Version: 1.2.3.1
|
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,e,n,o){var a={url:spuvar.ajax_url,data:t,cache:!1,type:"POST",dataType:"json",timeout:3e4},o=o||!1,e=e||!1,n=n||!1;i&&(a.url=i),e&&(a.success=e),n&&(a.error=n),o&&(a.dataType=o),$.ajax(a)}function i(t,i,e){if(e){var n=new Date;n.setTime(n.getTime()+24*e*60*60*1e3);var o="; expires="+n.toGMTString()}else var o="";document.cookie=t+"="+i+o+"; path=/"}function e(t){for(var i=t+"=",e=document.cookie.split(";"),n=0;n<e.length;n++){for(var o=e[n];" "==o.charAt(0);)o=o.substring(1,o.length);if(0==o.indexOf(i))return o.substring(i.length,o.length)}return null}function n(){FB.Event.subscribe("edge.create",function(t,i){var e=$(i).parents(".spu-box").data("box-id");e&&(
|
1 |
+
!function($){"use strict";function t(t,i,e,n,o){var a={url:spuvar.ajax_url,data:t,cache:!1,type:"POST",dataType:"json",timeout:3e4},o=o||!1,e=e||!1,n=n||!1;i&&(a.url=i),e&&(a.success=e),n&&(a.error=n),o&&(a.dataType=o),$.ajax(a)}function i(t,i,e){if(e){var n=new Date;n.setTime(n.getTime()+24*e*60*60*1e3);var o="; expires="+n.toGMTString()}else var o="";document.cookie=t+"="+i+o+"; path=/"}function e(t){for(var i=t+"=",e=document.cookie.split(";"),n=0;n<e.length;n++){for(var o=e[n];" "==o.charAt(0);)o=o.substring(1,o.length);if(0==o.indexOf(i))return o.substring(i.length,o.length)}return null}function n(){FB.Event.subscribe("edge.create",function(t,i){var e=$(i).parents(".spu-box").data("box-id");e&&(d.hide(e),d.track(e,!0))}),p=!0,clearInterval(l)}function o(t){var i=$(t.target).parents(".spu-box").data("box-id");i&&d.hide(i)}function a(t){if("on"==t.state){var i=jQuery(".spu-gogl").data("box-id");i&&d.hide(i)}}function r(t){if("confirm"==t.type){var i=jQuery(".spu-gogl").data("box-id");i&&d.hide(i)}}function s(){if(spuvar_social.facebook)try{FB.XFBML.parse()}catch(t){}spuvar_social.google&&gapi.plusone.go(),spuvar_social.twitter&&twttr.widgets.load()}var d=function(){function n(t){var i=d[t],e=$(window).width(),n=$(window).height(),o=i.height(),a=i.width();i.css({position:"fixed",top:n/2-o/2,left:e/2-a/2})}function o(t){var i=$(t).find(".spu-facebook");if(i.length){var e=i.find(".fb-like > span").width();if(0==e){var n=i.find(".fb-like").data("layout");i.append("box_count"==n?'<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 a(t,e){var o=d[t],a=$("#spu-bg-"+t),r=o.data("bgopa");if(o.is(":animated"))return!1;if(e===!0&&o.is(":visible")||e===!1&&o.is(":hidden"))return!1;if(e===!1){var s=parseInt(o.data("cookie"));s>0&&i("spu_box_"+t,!0,s)}else o.hasClass("spu-centered")&&($(window).resize(function(){n(t)}),n(t));var u=o.data("spuanimation");return"fade"===u?o.fadeToggle("slow"):o.slideToggle("slow"),e===!0&&r>0?a.fadeIn():a.fadeOut(),e}var r=$(window).height(),s=spuvar.is_admin,d=[];return $(".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),n=i.data("trigger"),u=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),g="percentage"==n?parseInt(i.data("trigger-number"),10)/100:.8,w=g*$(document).height();o(i),$(".spu-google").width($(".spu-google").width()-20),$(".spu-twitter").width($(".spu-twitter").width()-12);var m=0,v=0,b=i.width(),y=i.find(".spu-content").width(),_=i.data("total");$(".spu-shortcode").wrapAll('<div class="spu_shortcodes"/>'),_&&!spuvar.disable_style&&$(window).width()>b&&($(this).find(".spu-shortcode").each(function(){m+=$(this).width()}),v=y-m-_),v>0&&($(this).find(".spu-shortcode").each(function(){3==_?$(this).css("margin-left",v/(_-1)):$(this).css("margin-left",v/2)}),2==_?$(this).find(".spu-shortcode").last().css("margin-left",0):3==_&&$(this).find(".spu-shortcode").first().css("margin-left",0)),$(document).keyup(function(t){27==t.keyCode&&a(f,!1)});var x=navigator.userAgent,k=x.match(/iPad/i)||x.match(/iPhone/i)?"touchstart":"click";$("body").on(k,function(t){void 0!==t.originalEvent&&a(f,!1)}),$("body").on(k,".spu-box",function(t){t.stopPropagation()}),i.hide().css("left",""),d[f]=i;var T=function(){u&&clearTimeout(u),u=window.setTimeout(function(){var t=$(window).scrollTop(),i=t+r>=w;i?(p||$(window).unbind("scroll",T),a(f,!0)):a(f,!1)},100)},j=function(){u&&clearTimeout(u),u=window.setTimeout(function(){a(f,!0)},1e3*h)},I=e("spu_box_"+f);if((void 0==I||""==I||s&&c)&&("seconds"==n?j():($(window).bind("scroll",T),T()),window.location.hash&&window.location.hash.length>0)){var F=window.location.hash,P;F.substring(1)===i.attr("id")&&setTimeout(function(){a(f,!0)},100)}i.find(".spu-close-popup").click(function(){a(f,!1),"percentage"==n&&$(window).unbind("scroll",T)}),$('a[href="#'+i.attr("id")+'"]').click(function(){return a(f,!0),!1}),i.find(".gform_wrapper form").addClass("gravity-form"),i.on("submit",'form:not(".wpcf7-form, .gravity-form")',function(i){i.preventDefault(),track(f,!0);var e=!0,n=$(this),o=n.serialize(),r=n.attr("action"),s=function(t,i,e){console.log("Spu Form error: "+i+" - "+e)},d=function(t){var i=$(t).filter("#spu-"+f).html();$("#spu-"+f).html(i),$("#spu-"+f).find(".mc4wp-form-error").length||setTimeout(function(){a(f,!1)},1e3*spuvar.seconds_confirmation_close)};return t(o,r,d,s,"html"),e}),$("body").on("mailsent.wpcf7",function(){a(f,!1)}),$(document).on("gform_confirmation_loaded",function(){a(f,!1)})}),{show:function(t){return a(t,!0)},hide:function(t){return a(t,!1)},request:function(i,e,n,o){return t(i,e,n,o)}}};if(spuvar.ajax_mode){var u={pid:spuvar.pid,referrer:document.referrer},c=function(t){$("body").append(t),s(),d()},f=function(t,i,e){console.log("Problem loading popups - error: "+i+" - "+e)};t(u,spuvar.ajax_mode_url,c,f,"html")}else jQuery(window).load(function(){d()});var p=!1,l=setInterval(function(){"undefined"==typeof FB||p||n()},1e3);"undefined"!=typeof twttr&&twttr.ready(function(t){t.events.bind("tweet",o),t.events.bind("follow",o)})}(jQuery);
|
public/assets/js/public.js
CHANGED
@@ -163,7 +163,7 @@ var SPU = function() {
|
|
163 |
// show box if cookie not set or if in test mode
|
164 |
var cookieValue = spuReadCookie( 'spu_box_' + id );
|
165 |
|
166 |
-
if( ( cookieValue == undefined || cookieValue == '' ) || ( isAdmin &&
|
167 |
|
168 |
if(triggerMethod == 'seconds') {
|
169 |
triggerSecondsCheck();
|
@@ -371,22 +371,20 @@ if( spuvar.ajax_mode ) {
|
|
371 |
|
372 |
var data = {
|
373 |
pid : spuvar.pid,
|
374 |
-
referrer : document.referrer
|
375 |
-
action : 'spu_load',
|
376 |
}
|
377 |
-
|
378 |
|
379 |
$('body').append(response);
|
380 |
-
|
381 |
reload_socials();
|
382 |
-
|
383 |
SPU();
|
384 |
|
|
|
385 |
},
|
386 |
error_cb = function (data, error, errorThrown){
|
387 |
console.log('Problem loading popups - error: ' + error + ' - ' + errorThrown);
|
388 |
}
|
389 |
-
request(data, spuvar.
|
390 |
} else {
|
391 |
|
392 |
jQuery(window).load(function() {
|
163 |
// show box if cookie not set or if in test mode
|
164 |
var cookieValue = spuReadCookie( 'spu_box_' + id );
|
165 |
|
166 |
+
if( ( cookieValue == undefined || cookieValue == '' ) || ( isAdmin && testMode ) ) {
|
167 |
|
168 |
if(triggerMethod == 'seconds') {
|
169 |
triggerSecondsCheck();
|
371 |
|
372 |
var data = {
|
373 |
pid : spuvar.pid,
|
374 |
+
referrer : document.referrer
|
|
|
375 |
}
|
376 |
+
,success_cb = function(response) {
|
377 |
|
378 |
$('body').append(response);
|
|
|
379 |
reload_socials();
|
|
|
380 |
SPU();
|
381 |
|
382 |
+
|
383 |
},
|
384 |
error_cb = function (data, error, errorThrown){
|
385 |
console.log('Problem loading popups - error: ' + error + ' - ' + errorThrown);
|
386 |
}
|
387 |
+
request(data, spuvar.ajax_mode_url , success_cb, error_cb, 'html');
|
388 |
} else {
|
389 |
|
390 |
jQuery(window).load(function() {
|
public/class-social-popup.php
CHANGED
@@ -23,7 +23,7 @@ class SocialPopup {
|
|
23 |
*
|
24 |
* @var string
|
25 |
*/
|
26 |
-
const VERSION = '1.2.3';
|
27 |
|
28 |
/**
|
29 |
* Popups to use acrros files
|
@@ -387,11 +387,11 @@ class SocialPopup {
|
|
387 |
wp_localize_script( 'spu-public', 'spuvar',
|
388 |
array(
|
389 |
'is_admin' => current_user_can( 'administrator' ),
|
390 |
-
'disable_style' =>
|
391 |
-
'safe_mode' =>
|
392 |
-
'ajax_mode' =>
|
393 |
'ajax_url' => admin_url('admin-ajax.php'),
|
394 |
-
'
|
395 |
'pid' => get_queried_object_id(),
|
396 |
'is_front_page' => is_front_page(),
|
397 |
'seconds_confirmation_close' => apply_filters( 'spu/spuvar/seconds_confirmation_close', 5 ),
|
@@ -590,10 +590,7 @@ class SocialPopup {
|
|
590 |
echo '<div id="fb-root" class=" fb_reset"></div>';
|
591 |
|
592 |
}
|
593 |
-
|
594 |
-
if( defined( 'DOING_AJAX' ) ) {
|
595 |
-
die(); //we are in ajax mode
|
596 |
-
}
|
597 |
}
|
598 |
|
599 |
/**
|
@@ -624,18 +621,15 @@ class SocialPopup {
|
|
624 |
*/
|
625 |
function register_spu_ajax() {
|
626 |
|
627 |
-
|
628 |
-
return;
|
629 |
-
|
630 |
-
if ( empty( $_POST['spu_action'] ) || $_POST['spu_action'] != 'spu_load' ) {
|
631 |
-
|
632 |
return;
|
633 |
-
|
634 |
-
}
|
635 |
|
636 |
define( 'DOING_AJAX', TRUE );
|
637 |
|
|
|
638 |
$this->print_boxes();
|
|
|
639 |
|
640 |
die();
|
641 |
}
|
23 |
*
|
24 |
* @var string
|
25 |
*/
|
26 |
+
const VERSION = '1.2.3.1';
|
27 |
|
28 |
/**
|
29 |
* Popups to use acrros files
|
387 |
wp_localize_script( 'spu-public', 'spuvar',
|
388 |
array(
|
389 |
'is_admin' => current_user_can( 'administrator' ),
|
390 |
+
'disable_style' => isset( $this->spu_settings['shortcodes_style'] ) ? $this->spu_settings['shortcodes_style'] : '',
|
391 |
+
'safe_mode' => isset( $this->spu_settings['safe'] ) ? $this->spu_settings['safe'] : '',
|
392 |
+
'ajax_mode' => isset( $this->spu_settings['ajax_mode'] ) ? $this->spu_settings['ajax_mode'] :'',
|
393 |
'ajax_url' => admin_url('admin-ajax.php'),
|
394 |
+
'ajax_mode_url' => site_url('/?spu_action=spu_load'),
|
395 |
'pid' => get_queried_object_id(),
|
396 |
'is_front_page' => is_front_page(),
|
397 |
'seconds_confirmation_close' => apply_filters( 'spu/spuvar/seconds_confirmation_close', 5 ),
|
590 |
echo '<div id="fb-root" class=" fb_reset"></div>';
|
591 |
|
592 |
}
|
593 |
+
|
|
|
|
|
|
|
594 |
}
|
595 |
|
596 |
/**
|
621 |
*/
|
622 |
function register_spu_ajax() {
|
623 |
|
624 |
+
if ( empty( $_REQUEST['spu_action'] ) || $_REQUEST['spu_action'] != 'spu_load' )
|
|
|
|
|
|
|
|
|
625 |
return;
|
626 |
+
|
|
|
627 |
|
628 |
define( 'DOING_AJAX', TRUE );
|
629 |
|
630 |
+
|
631 |
$this->print_boxes();
|
632 |
+
|
633 |
|
634 |
die();
|
635 |
}
|