Popups – WordPress Popup - Version 1.4.6

Version Description

  • Added manual trigger option on display options
  • Fixed bug with session check
  • Fixed bug with border when no color was choosen
  • Now operators can be modified upon rules
  • Changes for premium version
Download this release

Release Info

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

Code changes from version 1.4.5.1 to 1.4.6

README.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: timersys
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=K4T6L69EV9G2Q
4
  Tags: popup,twitter,google+, facebook,Popups, twitter follow, facebook like, google plus,social boost, social splash, postmatic, mailpoet, facebook popup, scroll popups, popups, wordpress popup, wp popups, cf7, gf, gravity forms, contact form 7, ifs, infusion soft, subscribe, login popup, ajax login popups
5
  Requires at least: 3.6
6
- Tested up to: 4.4.2
7
- Stable tag: 1.4.5.1
8
  Text Domain: popups
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -16,6 +16,7 @@ Most complete free Popups plugin, scroll triggered popups, compatible with socia
16
  The new Popups plugin can display multiple popups. Is the perfect solution to increase your social followers, add call to actions, increase your mailing lists by adding a form like mailchimp or to display any important message in a simple popup.
17
 
18
  It's compatible with the major form plugins like (read FAQ):
 
19
  * Gravity Forms
20
  * Ninja Forms
21
  * Contact form 7
@@ -26,7 +27,7 @@ It's compatible with the major form plugins like (read FAQ):
26
  * Mailchimp for WP
27
  * Postmatic
28
  * Any generic form
29
- * Facebook Login popups using the [Facebook login pro plugin](http://wp.timersys.com/facebook-login/)
30
 
31
  There are multiple display filters that can be combined:
32
 
@@ -40,7 +41,7 @@ There are multiple display filters that can be combined:
40
  * Show or not to mobile and tablet users
41
  * Show depending on post type, post template, post name, post format, post status and post taxonomy
42
  * Show depending on page template, if page is parent, page name, page type
43
- * Geotarget popups using the [Geotargeting plugin](http://wp.timersys.com/geotargeting/)
44
 
45
  = Need it in another language? Help us [translate Popup Plugin](https://www.transifex.com/projects/p/popups/) =
46
 
@@ -57,12 +58,13 @@ There are multiple display filters that can be combined:
57
 
58
  > <strong>Premium Version</strong><br>
59
  >
60
- > Check the **new premium version** available in ([https://wp.timersys.com/popups/](http://wp.timersys.com/popups/?utm_source=readme%20file&utm_medium=readme%20links&utm_campaign=Popups%20Premium))
61
  >
62
  > * Beautiful optin forms for popular mail providers
63
  > * Currently supporting MailChimp, Aweber, Postmatic, Mailpoet, Constant Contact
64
- > * New popup positions such as top/bottoms bars or fullscreen modes
65
  > * More Display Rules: Show after N(numbers) of pages viewed
 
66
  > * More Display Rules: Show/hide if another popup already converted
67
  > * Track impressions and Conversions of social networks and forms like CF7 or Gravity forms
68
  > * Track impressions and Conversions in Google Analytics
@@ -78,7 +80,7 @@ There are multiple display filters that can be combined:
78
 
79
  = Plugin's Official Site =
80
 
81
- Popups ([http://wp.timersys.com/free-plugins/social-popup/](http://wp.timersys.com/free-plugins/popups/))
82
 
83
  = Github =
84
 
@@ -101,7 +103,7 @@ Increase your Twitter followers with Twitter likebox Plugin ([http://wordpress.o
101
 
102
  = Wordpress Social Invitations =
103
 
104
- Enhance your site by letting your users send Social Invitations ([http://wp.timersys.com/wordpress-social-invitations/](http://wp.timersys.com/wordpress-social-invitations/?utm_source=social-popup&utm_medium=readme))
105
 
106
  == Installation ==
107
 
@@ -155,6 +157,10 @@ To use custom conversions check [this code](https://gist.github.com/timersys/7fa
155
  = If I have multiple Gravity forms on my page, form is not working =
156
  On certain occasions multiple GF instances can cause problems. There is a plugin that fixes that https://wordpress.org/plugins/gravity-forms-multiple-form-instances/
157
 
 
 
 
 
158
  = I closed the popup but youtube is still playing. How I fix it? =
159
  Check [this gist](https://gist.github.com/timersys/99db1a8d2c8db74cb954) for instructions
160
 
@@ -185,6 +191,13 @@ If you have cache be sure to enable AJAX mode in the plugin settings page
185
 
186
  == Changelog ==
187
 
 
 
 
 
 
 
 
188
  = 1.4.5.1 =
189
  * Missing commit that only affect premium version
190
 
@@ -317,7 +330,7 @@ If you have cache be sure to enable AJAX mode in the plugin settings page
317
  * Fixed spuvar_social undefined when not using wordpress jquery
318
  * Fixed wpml support in ajax mode
319
  * Added trigger events in javascript so devs can hook in
320
- * Added geotargeting support in popups using [Geotargeting plugin](http://wp.timersys.com/geotargeting/)
321
  * Fixed undefined variable in admin
322
 
323
  = 1.2.3.3 =
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=K4T6L69EV9G2Q
4
  Tags: popup,twitter,google+, facebook,Popups, twitter follow, facebook like, google plus,social boost, social splash, postmatic, mailpoet, facebook popup, scroll popups, popups, wordpress popup, wp popups, cf7, gf, gravity forms, contact form 7, ifs, infusion soft, subscribe, login popup, ajax login popups
5
  Requires at least: 3.6
6
+ Tested up to: 4.5
7
+ Stable tag: 1.4.6
8
  Text Domain: popups
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
16
  The new Popups plugin can display multiple popups. Is the perfect solution to increase your social followers, add call to actions, increase your mailing lists by adding a form like mailchimp or to display any important message in a simple popup.
17
 
18
  It's compatible with the major form plugins like (read FAQ):
19
+
20
  * Gravity Forms
21
  * Ninja Forms
22
  * Contact form 7
27
  * Mailchimp for WP
28
  * Postmatic
29
  * Any generic form
30
+ * Facebook Login popups using the [Facebook login pro plugin](https://timersys.com/facebook-login/)
31
 
32
  There are multiple display filters that can be combined:
33
 
41
  * Show or not to mobile and tablet users
42
  * Show depending on post type, post template, post name, post format, post status and post taxonomy
43
  * Show depending on page template, if page is parent, page name, page type
44
+ * Geotarget popups using the [Geotargeting plugin](https://timersys.com/geotargeting/)
45
 
46
  = Need it in another language? Help us [translate Popup Plugin](https://www.transifex.com/projects/p/popups/) =
47
 
58
 
59
  > <strong>Premium Version</strong><br>
60
  >
61
+ > Check the **new premium version** available in ([https://wp.timersys.com/popups/](https://timersys.com/popups/?utm_source=readme%20file&utm_medium=readme%20links&utm_campaign=Popups%20Premium))
62
  >
63
  > * Beautiful optin forms for popular mail providers
64
  > * Currently supporting MailChimp, Aweber, Postmatic, Mailpoet, Constant Contact
65
+ > * New popup positions: top/bottoms bars , fullscreen mode, after post content
66
  > * More Display Rules: Show after N(numbers) of pages viewed
67
+ > * More Display Rules: Show popup at certain time
68
  > * More Display Rules: Show/hide if another popup already converted
69
  > * Track impressions and Conversions of social networks and forms like CF7 or Gravity forms
70
  > * Track impressions and Conversions in Google Analytics
80
 
81
  = Plugin's Official Site =
82
 
83
+ Popups ([https://timersys.com/free-plugins/social-popup/](https://timersys.com/free-plugins/popups/))
84
 
85
  = Github =
86
 
103
 
104
  = Wordpress Social Invitations =
105
 
106
+ Enhance your site by letting your users send Social Invitations ([https://timersys.com/wordpress-social-invitations/](https://timersys.com/wordpress-social-invitations/?utm_source=social-popup&utm_medium=readme))
107
 
108
  == Installation ==
109
 
157
  = If I have multiple Gravity forms on my page, form is not working =
158
  On certain occasions multiple GF instances can cause problems. There is a plugin that fixes that https://wordpress.org/plugins/gravity-forms-multiple-form-instances/
159
 
160
+ = How to make Popups plugin compatible with Maxbuttons Plugin (https://es.wordpress.org/plugins/maxbuttons/) =
161
+ Check the following gists ( https://gist.github.com/timersys/e3648ba93955ddef4087 )
162
+
163
+
164
  = I closed the popup but youtube is still playing. How I fix it? =
165
  Check [this gist](https://gist.github.com/timersys/99db1a8d2c8db74cb954) for instructions
166
 
191
 
192
  == Changelog ==
193
 
194
+ = 1.4.6 =
195
+ * Added manual trigger option on display options
196
+ * Fixed bug with session check
197
+ * Fixed bug with border when no color was choosen
198
+ * Now operators can be modified upon rules
199
+ * Changes for premium version
200
+
201
  = 1.4.5.1 =
202
  * Missing commit that only affect premium version
203
 
330
  * Fixed spuvar_social undefined when not using wordpress jquery
331
  * Fixed wpml support in ajax mode
332
  * Added trigger events in javascript so devs can hook in
333
+ * Added geotargeting support in popups using [Geotargeting plugin](https://timersys.com/geotargeting/)
334
  * Fixed undefined variable in admin
335
 
336
  = 1.2.3.3 =
admin/assets/js/admin.js CHANGED
@@ -142,6 +142,7 @@ SPU_ADMIN = (function ( $ ) {
142
  rule_id = $tr.attr('data-id'),
143
  $group = $tr.closest('.rules-group'),
144
  group_id = $group.attr('data-id'),
 
145
  ajax_data = {
146
  'action' : "spu/field_group/render_rules",
147
  'nonce' : spu_js.nonce,
@@ -154,7 +155,7 @@ SPU_ADMIN = (function ( $ ) {
154
 
155
  // add loading gif
156
  var div = $('<div class="spu-loading"><img src="'+spu_js.admin_url+'/images/wpspin_light.gif"/> </div>');
157
- $tr.find('td.value').html( div );
158
 
159
 
160
  // load rules html
@@ -164,12 +165,35 @@ SPU_ADMIN = (function ( $ ) {
164
  type: 'post',
165
  dataType: 'html',
166
  success: function(html){
167
-
168
- div.replaceWith(html);
169
 
170
  }
171
  });
172
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
173
 
174
  });
175
 
142
  rule_id = $tr.attr('data-id'),
143
  $group = $tr.closest('.rules-group'),
144
  group_id = $group.attr('data-id'),
145
+ val_td = $tr.find('td.value'),
146
  ajax_data = {
147
  'action' : "spu/field_group/render_rules",
148
  'nonce' : spu_js.nonce,
155
 
156
  // add loading gif
157
  var div = $('<div class="spu-loading"><img src="'+spu_js.admin_url+'/images/wpspin_light.gif"/> </div>');
158
+ val_td.html( div );
159
 
160
 
161
  // load rules html
165
  type: 'post',
166
  dataType: 'html',
167
  success: function(html){
168
+
169
+ val_td.html(html);
170
 
171
  }
172
  });
173
+
174
+ // Operators Rules
175
+ var operator_td = $tr.find('td.operator'),
176
+ ajax_data = {
177
+ 'action' : "spu/field_group/render_operator",
178
+ 'nonce' : spu_js.nonce,
179
+ 'rule_id' : rule_id,
180
+ 'group_id' : group_id,
181
+ 'value' : '',
182
+ 'param' : $(this).val()
183
+ };
184
+
185
+ operator_td.html( div );
186
+ $.ajax({
187
+ url: ajaxurl,
188
+ data: ajax_data,
189
+ type: 'post',
190
+ dataType: 'html',
191
+ success: function(html){
192
+
193
+ operator_td.html(html);
194
+
195
+ }
196
+ });
197
 
198
  });
199
 
admin/assets/js/min/admin-min.js CHANGED
@@ -1 +1 @@
1
- var spu={rules:null};SPU_ADMIN=function($){function t(t){"percentage"==t||"visible"==t?$("tr.auto_hide").fadeIn("fast"):$("tr.auto_hide").fadeOut("fast")}function e(t,e){return t.val()?parseInt(t.val()):void 0!==e?e+"px":0}function r(t,e){return t.val().length>0?t.wpColorPicker("color"):void 0!==e?e:""}function n(){var t=$("#content_ifr").contents().find("html");t.trigger("spu_tinymce_init"),t.css({background:"#9C9B9B;"}),("undefined"==typeof spup_js||""==$("#spu_optin").val())&&(t.find(".spu-fields-container").remove(),t.find("#tinymce").css({padding:"25px","background-color":r($("#spu-background-color")),"border-color":r($("#spu-border-color")),"border-width":e($("#spu-border-width")),"border-style":"solid",width:$("#spu-width").val(),color:r($("#spu-color")),height:"auto","min-width":"200px","max-width":"100%",margin:"8px auto 0;"}))}return $(document).ready(function(){spu.rules.init();var e=$("#spu-appearance input.spu-color-field"),r=$("#spu_optin");!e.length||r.length&&""!=r.val()||e.wpColorPicker({change:n,clear:n}),$("#spu-appearance :input").not(".spu-color-field").change(n),t($("#spu_trigger").val()),$("#spu_trigger").change(function(){t($(this).val())})}),spu.rules={$el:null,init:function(){var t=this;t.$el=$("#spu-rules"),t.$el.on("click",".rules-add-rule",function(){return t.add_rule($(this).closest("tr")),!1}),t.$el.on("click",".rules-remove-rule",function(){return t.remove_rule($(this).closest("tr")),!1}),t.$el.on("click",".rules-add-group",function(){return t.add_group(),!1}),t.$el.on("change",".param select",function(){var t=$(this).closest("tr"),e=t.attr("data-id"),r=t.closest(".rules-group"),n=r.attr("data-id"),a={action:"spu/field_group/render_rules",nonce:spu_js.nonce,rule_id:e,group_id:n,value:"",param:$(this).val()},i=$('<div class="spu-loading"><img src="'+spu_js.admin_url+'/images/wpspin_light.gif"/> </div>');t.find("td.value").html(i),$.ajax({url:ajaxurl,data:a,type:"post",dataType:"html",success:function(t){i.replaceWith(t)}})})},add_rule:function(t){var e=t.clone(),r=e.attr("data-id"),n="rule_"+(parseInt(r.replace("rule_",""),10)+1);return e.find("[name]").each(function(){$(this).attr("name",$(this).attr("name").replace(r,n)),$(this).attr("id",$(this).attr("id").replace(r,n))}),e.attr("data-id",n),t.after(e),!1},remove_rule:function(t){var e=t.siblings("tr").length;0==e?this.remove_group(t.closest(".rules-group")):t.remove()},add_group:function(){var t=this.$el.find(".rules-group:last"),e=t.clone(),r=e.attr("data-id"),n="group_"+(parseInt(r.replace("group_",""),10)+1);e.find("[name]").each(function(){$(this).attr("name",$(this).attr("name").replace(r,n)),$(this).attr("id",$(this).attr("id").replace(r,n))}),e.attr("data-id",n),e.find("h4").text(spu_js.l10n.or),e.find("tr:not(:first)").remove(),t.after(e)},remove_group:function(t){t.remove()}},{onTinyMceInit:function(){n()}}}(jQuery);
1
+ var spu={rules:null};SPU_ADMIN=function($){function t(t){"percentage"==t||"visible"==t?$("tr.auto_hide").fadeIn("fast"):$("tr.auto_hide").fadeOut("fast")}function r(t,r){return t.val()?parseInt(t.val()):void 0!==r?r+"px":0}function e(t,r){return t.val().length>0?t.wpColorPicker("color"):void 0!==r?r:""}function n(){var t=$("#content_ifr").contents().find("html");t.trigger("spu_tinymce_init"),t.css({background:"#9C9B9B;"}),("undefined"==typeof spup_js||""==$("#spu_optin").val())&&(t.find(".spu-fields-container").remove(),t.find("#tinymce").css({padding:"25px","background-color":e($("#spu-background-color")),"border-color":e($("#spu-border-color")),"border-width":r($("#spu-border-width")),"border-style":"solid",width:$("#spu-width").val(),color:e($("#spu-color")),height:"auto","min-width":"200px","max-width":"100%",margin:"8px auto 0;"}))}return $(document).ready(function(){spu.rules.init();var r=$("#spu-appearance input.spu-color-field"),e=$("#spu_optin");!r.length||e.length&&""!=e.val()||r.wpColorPicker({change:n,clear:n}),$("#spu-appearance :input").not(".spu-color-field").change(n),t($("#spu_trigger").val()),$("#spu_trigger").change(function(){t($(this).val())})}),spu.rules={$el:null,init:function(){var t=this;t.$el=$("#spu-rules"),t.$el.on("click",".rules-add-rule",function(){return t.add_rule($(this).closest("tr")),!1}),t.$el.on("click",".rules-remove-rule",function(){return t.remove_rule($(this).closest("tr")),!1}),t.$el.on("click",".rules-add-group",function(){return t.add_group(),!1}),t.$el.on("change",".param select",function(){var t=$(this).closest("tr"),r=t.attr("data-id"),e=t.closest(".rules-group"),n=e.attr("data-id"),a=t.find("td.value"),i={action:"spu/field_group/render_rules",nonce:spu_js.nonce,rule_id:r,group_id:n,value:"",param:$(this).val()},o=$('<div class="spu-loading"><img src="'+spu_js.admin_url+'/images/wpspin_light.gif"/> </div>');a.html(o),$.ajax({url:ajaxurl,data:i,type:"post",dataType:"html",success:function(t){a.html(t)}});var u=t.find("td.operator"),i={action:"spu/field_group/render_operator",nonce:spu_js.nonce,rule_id:r,group_id:n,value:"",param:$(this).val()};u.html(o),$.ajax({url:ajaxurl,data:i,type:"post",dataType:"html",success:function(t){u.html(t)}})})},add_rule:function(t){var r=t.clone(),e=r.attr("data-id"),n="rule_"+(parseInt(e.replace("rule_",""),10)+1);return r.find("[name]").each(function(){$(this).attr("name",$(this).attr("name").replace(e,n)),$(this).attr("id",$(this).attr("id").replace(e,n))}),r.attr("data-id",n),t.after(r),!1},remove_rule:function(t){var r=t.siblings("tr").length;0==r?this.remove_group(t.closest(".rules-group")):t.remove()},add_group:function(){var t=this.$el.find(".rules-group:last"),r=t.clone(),e=r.attr("data-id"),n="group_"+(parseInt(e.replace("group_",""),10)+1);r.find("[name]").each(function(){$(this).attr("name",$(this).attr("name").replace(e,n)),$(this).attr("id",$(this).attr("id").replace(e,n))}),r.attr("data-id",n),r.find("h4").text(spu_js.l10n.or),r.find("tr:not(:first)").remove(),t.after(r)},remove_group:function(t){t.remove()}},{onTinyMceInit:function(){n()}}}(jQuery);
admin/class-social-popup-admin.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package SocialPopup_Admin
6
  * @author Damian Logghe <info@timersys.com>
7
  * @license GPL-2.0+
8
- * @link http://wp.timersys.com
9
  * @copyright 2014 Timersys
10
  */
11
 
@@ -112,6 +112,7 @@ class SocialPopup_Admin {
112
 
113
  //AJAX Actions
114
  add_action('wp_ajax_spu/field_group/render_rules', array( $this->helper, 'ajax_render_rules' ) );
 
115
 
116
  //Tinymce
117
  add_filter( 'tiny_mce_before_init', array($this, 'tinymce_init') );
5
  * @package SocialPopup_Admin
6
  * @author Damian Logghe <info@timersys.com>
7
  * @license GPL-2.0+
8
+ * @link https://timersys.com
9
  * @copyright 2014 Timersys
10
  */
11
 
112
 
113
  //AJAX Actions
114
  add_action('wp_ajax_spu/field_group/render_rules', array( $this->helper, 'ajax_render_rules' ) );
115
+ add_action('wp_ajax_spu/field_group/render_operator', array( $this->helper, 'ajax_render_operator' ) );
116
 
117
  //Tinymce
118
  add_filter( 'tiny_mce_before_init', array($this, 'tinymce_init') );
admin/views/metaboxes/metabox-donate.php CHANGED
@@ -10,7 +10,7 @@ if ( !defined( 'ABSPATH' ) ) exit;
10
  <p><?php _e( 'Some other ways to support this plugin', 'popups' );?></p>
11
  <ul class="ul-square">
12
  <li><a href="http://wordpress.org/support/view/plugin-reviews/popups?rate=5#postform" target="_blank"><?php _e( 'Leave a &#9733;&#9733;&#9733;&#9733;&#9733; review on WordPress.org', 'popups' );?></a></li>
13
- <li><a href="http://wp.timersys.com/free-plugins/popups/" target="_blank"><?php _e( 'Write about Popups on your blog', 'popups' );?></a></li>
14
  <li><a href="http://twitter.com/intent/tweet/?text=I+am+using+Social+PopUP+on+my+WordPress+site.+It%27s+great%21&amp;via=chifliiii&amp;url=http%3A%2F%2Fwordpress.org%2Fplugins%2Fpopups%2F" target="_blank"><?php _e( 'Tweet about Popups', 'popups' );?></a></li>
15
  <li><a href="http://wordpress.org/plugins/popups/#compatibility"><?php _e( 'Vote "works" on the WordPress.org plugin page', 'popups' );?></a></li>
16
  </ul>
10
  <p><?php _e( 'Some other ways to support this plugin', 'popups' );?></p>
11
  <ul class="ul-square">
12
  <li><a href="http://wordpress.org/support/view/plugin-reviews/popups?rate=5#postform" target="_blank"><?php _e( 'Leave a &#9733;&#9733;&#9733;&#9733;&#9733; review on WordPress.org', 'popups' );?></a></li>
13
+ <li><a href="https://timersys.com/free-plugins/popups/" target="_blank"><?php _e( 'Write about Popups on your blog', 'popups' );?></a></li>
14
  <li><a href="http://twitter.com/intent/tweet/?text=I+am+using+Social+PopUP+on+my+WordPress+site.+It%27s+great%21&amp;via=chifliiii&amp;url=http%3A%2F%2Fwordpress.org%2Fplugins%2Fpopups%2F" target="_blank"><?php _e( 'Tweet about Popups', 'popups' );?></a></li>
15
  <li><a href="http://wordpress.org/plugins/popups/#compatibility"><?php _e( 'Vote "works" on the WordPress.org plugin page', 'popups' );?></a></li>
16
  </ul>
admin/views/metaboxes/metabox-links.php CHANGED
@@ -4,7 +4,7 @@ if ( !defined( 'ABSPATH' ) ) exit;
4
  ?>
5
 
6
  <p><?php _e( 'My name is', 'popups' );?> <a href="http://twitter.com/chifliiiii">Damian Logghe</a>. <?php _e( 'I develop WordPress plugins and themes.', 'popups' );?></p>
7
- <p><?php printf(__( 'Take a look at my <a href="%s">site</a> to see my other plugins or hire me. Subscribe to get updates!', 'popups' ), 'http://wp.timersys.com/');?></p>
8
  <h4><?php _e( 'Other plugins I built:', 'popups' );?></h4>
9
  <ul>
10
  <li> <a href="http://wordpress.org/plugins/wpfavs/" target="_blank">Wp Favs</a> - <?php _e( 'Install multiple plugins and create collections', 'popups' );?></li>
4
  ?>
5
 
6
  <p><?php _e( 'My name is', 'popups' );?> <a href="http://twitter.com/chifliiiii">Damian Logghe</a>. <?php _e( 'I develop WordPress plugins and themes.', 'popups' );?></p>
7
+ <p><?php printf(__( 'Take a look at my <a href="%s">site</a> to see my other plugins or hire me. Subscribe to get updates!', 'popups' ), 'https://timersys.com/');?></p>
8
  <h4><?php _e( 'Other plugins I built:', 'popups' );?></h4>
9
  <ul>
10
  <li> <a href="http://wordpress.org/plugins/wpfavs/" target="_blank">Wp Favs</a> - <?php _e( 'Install multiple plugins and create collections', 'popups' );?></li>
admin/views/metaboxes/metabox-options.php CHANGED
@@ -26,6 +26,7 @@ if ( !defined( 'ABSPATH' ) ) exit;?>
26
 
27
  <option value="seconds" <?php selected($opts['trigger'], 'seconds'); ?>><?php _e( 'seconds after page load', 'popups' ); ?></option>
28
  <option value="percentage" <?php selected($opts['trigger'], 'percentage'); ?>>% <?php _e( 'of page height', 'popups' ); ?></option>
 
29
  <?php do_action( 'spu/metaboxes/trigger_options', $opts );?>
30
  </select>
31
  </td>
26
 
27
  <option value="seconds" <?php selected($opts['trigger'], 'seconds'); ?>><?php _e( 'seconds after page load', 'popups' ); ?></option>
28
  <option value="percentage" <?php selected($opts['trigger'], 'percentage'); ?>>% <?php _e( 'of page height', 'popups' ); ?></option>
29
+ <option value="manual" <?php selected($opts['trigger'], 'percentage'); ?>>% <?php _e( 'Manual Triggering', 'popups' ); ?></option>
30
  <?php do_action( 'spu/metaboxes/trigger_options', $opts );?>
31
  </select>
32
  </td>
admin/views/metaboxes/metabox-premium.php CHANGED
@@ -17,13 +17,17 @@ if($today > $blackbegin && $today < $blackend) : ?>
17
  <h2><?php _e( 'Popups Premium Features:', 'popups' );?></h2>
18
  <ul>
19
  <li><?php _e( 'Beautiful optin forms for popular mail providers', 'popups' );?></li>
20
- <li><?php _e( 'Currently supporting MailChimp, Aweber, Postmatic, Mailpoet', 'popups' );?></li>
21
  <li><?php _e( 'Track impressions and Conversions of social likes and forms submissions like Contact Form 7, Gravity forms, etc', 'popups' );?></li>
22
  <li><?php _e( 'Track impressions and Conversions also in Google Analytics', 'popups' );?></li>
23
  <li><?php _e( 'Exit Intent technology', 'popups' );?></li>
24
- <li><?php _e( '8 New animations effects', 'popups' );?> - <a href="http://wp.timersys.com/popups/?utm_source=Plugin&utm_medium=demo-button&utm_campaign=Popups%20Premium">Online demo</a></li>
 
25
  <li><?php _e( 'Exit Intent technology', 'popups' );?></li>
26
  <li><?php _e( 'New trigger methods', 'popups' );?></li>
 
 
 
27
  <li><?php _e( 'Timer for auto closing', 'popups' );?></li>
28
  <li><?php _e( 'Ability to disable close button', 'popups' );?></li>
29
  <li><?php _e( 'Ability to disable Advanced close methods like esc or clicking outside of the popup', 'popups' );?></li>
@@ -31,5 +35,5 @@ if($today > $blackbegin && $today < $blackend) : ?>
31
  </ul>
32
  <p><strong>Hurry up and get your copy!</strong> Take advantage of this <span style="color:red">launch offer</span> before the price goes up. We have a <strong>lot of new features</strong> to be added soon like aweber integration, etc</p>
33
  <p style="text-align:center">
34
- <a class="button-primary" href="http://wp.timersys.com/downloads/popups-premium/?utm_source=Plugin&utm_medium=buy-button&utm_campaign=Popups%20Premium"><?php _e( 'Buy Now!', 'popups' );?></a>
35
  </p>
17
  <h2><?php _e( 'Popups Premium Features:', 'popups' );?></h2>
18
  <ul>
19
  <li><?php _e( 'Beautiful optin forms for popular mail providers', 'popups' );?></li>
20
+ <li><?php _e( 'Currently supporting MailChimp, Aweber, Postmatic, Mailpoet, Constant Contact', 'popups' );?></li>
21
  <li><?php _e( 'Track impressions and Conversions of social likes and forms submissions like Contact Form 7, Gravity forms, etc', 'popups' );?></li>
22
  <li><?php _e( 'Track impressions and Conversions also in Google Analytics', 'popups' );?></li>
23
  <li><?php _e( 'Exit Intent technology', 'popups' );?></li>
24
+ <li><?php _e( 'New popup positions: top/bottoms bars , fullscreen mode, after post content', 'popups' );?></li>
25
+ <li><?php _e( '8 New animations effects', 'popups' );?> - <a href="https://timersys.com/popups/?utm_source=Plugin&utm_medium=demo-button&utm_campaign=Popups%20Premium">Online demo</a></li>
26
  <li><?php _e( 'Exit Intent technology', 'popups' );?></li>
27
  <li><?php _e( 'New trigger methods', 'popups' );?></li>
28
+ <li><?php _e( 'More Display Rules: Show after N(numbers) of pages viewed', 'popups' );?></li>
29
+ <li><?php _e( 'More Display Rules: Show popup at certain time', 'popups' );?></li>
30
+ <li><?php _e( 'More Display Rules: Show/hide if another popup already converted', 'popups' );?></li>
31
  <li><?php _e( 'Timer for auto closing', 'popups' );?></li>
32
  <li><?php _e( 'Ability to disable close button', 'popups' );?></li>
33
  <li><?php _e( 'Ability to disable Advanced close methods like esc or clicking outside of the popup', 'popups' );?></li>
35
  </ul>
36
  <p><strong>Hurry up and get your copy!</strong> Take advantage of this <span style="color:red">launch offer</span> before the price goes up. We have a <strong>lot of new features</strong> to be added soon like aweber integration, etc</p>
37
  <p style="text-align:center">
38
+ <a class="button-primary" href="https://timersys.com/downloads/popups-premium/?utm_source=Plugin&utm_medium=buy-button&utm_campaign=Popups%20Premium"><?php _e( 'Buy Now!', 'popups' );?></a>
39
  </p>
admin/views/metaboxes/metabox-rules.php CHANGED
@@ -56,26 +56,16 @@ if ( !defined( 'ABSPATH' ) ) exit;
56
 
57
  ?></td>
58
  <td class="operator"><?php
59
-
60
- $choices = array(
61
- '==' => __("is equal to", 'popups' ),
62
- '!=' => __("is not equal to", 'popups' ),
63
- );
64
-
65
-
66
- // allow custom rules rules
67
- $choices = apply_filters( 'spu/metaboxes/rule_operators', $choices );
68
-
69
  $args = array(
70
  'group_id' => $group_id,
71
  'rule_id' => $rule_id,
72
  'name' => 'spu_rules[' . $group_id . '][' . $rule_id . '][operator]',
73
- 'value' => $rule['operator']
 
74
 
75
  );
76
-
77
- Spu_Helper::print_select( $args, $choices );
78
-
79
 
80
  ?></td>
81
  <td class="value"><?php
56
 
57
  ?></td>
58
  <td class="operator"><?php
59
+
 
 
 
 
 
 
 
 
 
60
  $args = array(
61
  'group_id' => $group_id,
62
  'rule_id' => $rule_id,
63
  'name' => 'spu_rules[' . $group_id . '][' . $rule_id . '][operator]',
64
+ 'value' => $rule['operator'],
65
+ 'param' => $rule['param'],
66
 
67
  );
68
+ Spu_Helper::ajax_render_operator( $args );
 
 
69
 
70
  ?></td>
71
  <td class="value"><?php
includes/class-spu-helper.php CHANGED
@@ -13,6 +13,64 @@ class Spu_Helper {
13
  */
14
  protected static $plugin_slug = '';
15
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  /**
17
  * ajax_render_rules
18
  *
@@ -20,7 +78,7 @@ class Spu_Helper {
20
  * @since 2.0
21
  * I took this functions from the awesome Advanced custom fields plugin http://www.advancedcustomfields.com/
22
  */
23
-
24
  public static function ajax_render_rules( $options = array() )
25
  {
26
 
13
  */
14
  protected static $plugin_slug = '';
15
 
16
+ /**
17
+ * ajax_render_operator
18
+ *
19
+ * @description creates the HTML for the field group operator metabox. Called from both Ajax and PHP
20
+ * @since 1.4.6
21
+ * I took this functions from the awesome Advanced custom fields plugin http://www.advancedcustomfields.com/
22
+ */
23
+
24
+ public static function ajax_render_operator( $options = array() ) {
25
+ // defaults
26
+ $defaults = array(
27
+ 'group_id' => 0,
28
+ 'rule_id' => 0,
29
+ 'value' => null,
30
+ 'param' => null,
31
+ );
32
+
33
+ $is_ajax = false;
34
+
35
+ if( isset($_POST['nonce']) && wp_verify_nonce($_POST['nonce'], 'spu_nonce') )
36
+ {
37
+ $is_ajax = true;
38
+ }
39
+
40
+ // Is AJAX call?
41
+ if( $is_ajax )
42
+ {
43
+ $options = array_merge($defaults, $_POST);
44
+ $options['name'] = 'spu_rules[' . $options['group_id'] . '][' . $options['rule_id'] . '][operator]';
45
+ }
46
+ else
47
+ {
48
+ $options = array_merge($defaults, $options);
49
+ }
50
+ // default for all rules
51
+ $choices = array(
52
+ '==' => __("is equal to", 'popups' ),
53
+ '!=' => __("is not equal to", 'popups' ),
54
+ );
55
+ if( $options['param'] == 'local_time' ) {
56
+ $choices = array(
57
+ '<' => __("less than", 'popups' ),
58
+ '>' => __("greater than", 'popups' ),
59
+ );
60
+ }
61
+
62
+ // allow custom operators
63
+ $choices = apply_filters( 'spu/metaboxes/rule_operators', $choices, $options );
64
+
65
+ self::print_select( $options, $choices );
66
+
67
+ // ajax?
68
+ if( $is_ajax )
69
+ {
70
+ die();
71
+ }
72
+ }
73
+
74
  /**
75
  * ajax_render_rules
76
  *
78
  * @since 2.0
79
  * I took this functions from the awesome Advanced custom fields plugin http://www.advancedcustomfields.com/
80
  */
81
+
82
  public static function ajax_render_rules( $options = array() )
83
  {
84
 
popups.php CHANGED
@@ -11,10 +11,10 @@
11
  * @socialpopup
12
  * Plugin Name: Popups - WordPress Popup
13
  * Plugin URI: http://www.timersys.com/free-plugins/social-popup/
14
- * Version: 1.4.5.1
15
  * Description: Most complete free Popups plugin, scroll triggered popups, compatible with social networks, Gravity Forms, Ninja Forms, Contact form 7, Mailpoet, Mailchimp for WP, Postmatic, etc
16
  * Author: Damian Logghe
17
- * Author URI: http://wp.timersys.com
18
  * Text Domain: popups
19
  * License: GPL-2.0+
20
  * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
@@ -30,7 +30,7 @@ if ( ! defined( 'WPINC' ) ) {
30
  * Public-Facing Functionality
31
  *----------------------------------------------------------------------------*/
32
 
33
- define( 'SPU_VERSION' , '1.4.5.1' );
34
  define( 'SPU_PLUGIN_DIR' , plugin_dir_path(__FILE__) );
35
  define( 'SPU_PLUGIN_URL' , plugin_dir_url(__FILE__) );
36
  define( 'SPU_PLUGIN_HOOK' , basename( dirname( __FILE__ ) ) . '/' . basename( __FILE__ ) );
11
  * @socialpopup
12
  * Plugin Name: Popups - WordPress Popup
13
  * Plugin URI: http://www.timersys.com/free-plugins/social-popup/
14
+ * Version: 1.4.6
15
  * Description: Most complete free Popups plugin, scroll triggered popups, compatible with social networks, Gravity Forms, Ninja Forms, Contact form 7, Mailpoet, Mailchimp for WP, Postmatic, etc
16
  * Author: Damian Logghe
17
+ * Author URI: https://timersys.com
18
  * Text Domain: popups
19
  * License: GPL-2.0+
20
  * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
30
  * Public-Facing Functionality
31
  *----------------------------------------------------------------------------*/
32
 
33
+ define( 'SPU_VERSION' , '1.4.6' );
34
  define( 'SPU_PLUGIN_DIR' , plugin_dir_path(__FILE__) );
35
  define( 'SPU_PLUGIN_URL' , plugin_dir_url(__FILE__) );
36
  define( 'SPU_PLUGIN_HOOK' , basename( dirname( __FILE__ ) ) . '/' . basename( __FILE__ ) );
public/class-social-popup.php CHANGED
@@ -706,12 +706,13 @@ class SocialPopup {
706
 
707
  if ( ! empty( $wpml_settings['custom_posts_sync_option']['spucpt'] ) ) {
708
 
 
709
  $sql = "select DISTINCT * from $wpdb->posts as a
710
  LEFT JOIN {$wpdb->prefix}icl_translations as b
711
  ON a.ID = b.element_id
712
  WHERE a.post_status = 'publish'
713
  AND a.post_type = 'spucpt'
714
- AND b.language_code = '" . esc_sql( ICL_LANGUAGE_CODE ) . "'
715
  GROUP BY a.ID";
716
 
717
  $ids = $wpdb->get_results( $sql );
706
 
707
  if ( ! empty( $wpml_settings['custom_posts_sync_option']['spucpt'] ) ) {
708
 
709
+ $lang_code = isset( $_GET['lang'] ) ? $_GET['lang'] : ICL_LANGUAGE_CODE;
710
  $sql = "select DISTINCT * from $wpdb->posts as a
711
  LEFT JOIN {$wpdb->prefix}icl_translations as b
712
  ON a.ID = b.element_id
713
  WHERE a.post_status = 'publish'
714
  AND a.post_type = 'spucpt'
715
+ AND b.language_code = '" . esc_sql( $lang_code ) . "'
716
  GROUP BY a.ID";
717
 
718
  $ids = $wpdb->get_results( $sql );
public/includes/class-spu-rules.php CHANGED
@@ -5,10 +5,8 @@
5
  * Class that will compare rules and determine if popup needs to show
6
  * @since: 2.0
7
  */
8
- if(!isset($_SESSION) )
9
- {
10
  session_start();
11
- }
12
  class Spu_Rules
13
  {
14
  /**
@@ -986,8 +984,8 @@ class Spu_Rules
986
 
987
  $post_type = isset( $wp_query->query_vars['post_type'] ) ? $wp_query->query_vars['post_type'] : '';
988
 
989
- $post_type = empty( $post_type ) ? get_post_type($this->post_id) : '';
990
-
991
  return $post_type;
992
  }
993
 
5
  * Class that will compare rules and determine if popup needs to show
6
  * @since: 2.0
7
  */
8
+ if( session_id() == '' )
 
9
  session_start();
 
10
  class Spu_Rules
11
  {
12
  /**
984
 
985
  $post_type = isset( $wp_query->query_vars['post_type'] ) ? $wp_query->query_vars['post_type'] : '';
986
 
987
+ $post_type = empty( $post_type ) ? get_post_type($this->post_id) : get_post_type();
988
+
989
  return $post_type;
990
  }
991
 
public/views/popup.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package Popups
6
  * @author Damian Logghe <info@timersys.com
7
  * @license GPL-2.0+
8
- * @link http://wp.timersys.com
9
  * @copyright 2014 Timersys
10
  */
11
 
@@ -43,7 +43,7 @@ do_action( 'spu/popup/before_popup', $box, $opts, $css);
43
  #spu-<?php echo $box->ID; ?> {
44
  background-color: <?php echo ( !empty( $css['background_color'] ) ) ? esc_attr($css['background_color']) : 'white'; ?>;
45
  <?php if ( !empty( $css['color'] ) ) { ?>color: <?php echo esc_attr($css['color']); ?>;<?php } ?>
46
- <?php if ( !empty( $css['border_color'] ) && !empty( $css['border_width'] ) ) { ?>border: <?php echo esc_attr($css['border_width']) . 'px' ?> solid <?php echo esc_attr($css['border_color']); ?>;<?php } ?>
47
  <?php echo ( empty( $opts['optin'] ) || $opts['optin'] == 'custom' ) ? 'width: ' . esc_attr( $width ) : ''; ?>;
48
 
49
  }
@@ -63,7 +63,7 @@ do_action( 'spu/popup/before_popup', $box, $opts, $css);
63
  <span class="spu-close spu-close-popup"><i class="spu-icon spu-icon-close"></i></span>
64
  <span class="spu-timer"></span>
65
  <?php if( $opts['powered_link'] == '1' ) {
66
- $aff_link = !empty($this->spu_settings['aff_link']) ? $this->spu_settings['aff_link'] : 'http://wp.timersys.com/popups/';
67
  ?>
68
  <p class="spu-powered">Powered by <a href="<?php echo $aff_link;?>" target="_blank">WordPress Popup</a></p>
69
  <?php } ?>
5
  * @package Popups
6
  * @author Damian Logghe <info@timersys.com
7
  * @license GPL-2.0+
8
+ * @link https://timersys.com
9
  * @copyright 2014 Timersys
10
  */
11
 
43
  #spu-<?php echo $box->ID; ?> {
44
  background-color: <?php echo ( !empty( $css['background_color'] ) ) ? esc_attr($css['background_color']) : 'white'; ?>;
45
  <?php if ( !empty( $css['color'] ) ) { ?>color: <?php echo esc_attr($css['color']); ?>;<?php } ?>
46
+ <?php if ( !empty( $css['border_width'] ) ) { ?>border: <?php echo esc_attr($css['border_width']) . 'px' ?> solid <?php echo esc_attr($css['border_color']); echo !empty( $opts['optin'] ) ? ' !important':'';?>;<?php } ?>
47
  <?php echo ( empty( $opts['optin'] ) || $opts['optin'] == 'custom' ) ? 'width: ' . esc_attr( $width ) : ''; ?>;
48
 
49
  }
63
  <span class="spu-close spu-close-popup"><i class="spu-icon spu-icon-close"></i></span>
64
  <span class="spu-timer"></span>
65
  <?php if( $opts['powered_link'] == '1' ) {
66
+ $aff_link = !empty($this->spu_settings['aff_link']) ? $this->spu_settings['aff_link'] : 'https://timersys.com/popups/';
67
  ?>
68
  <p class="spu-powered">Powered by <a href="<?php echo $aff_link;?>" target="_blank">WordPress Popup</a></p>
69
  <?php } ?>