Version Description
- Hotfix for draft popups showing
Download this release
Release Info
Developer | timersys |
Plugin | Popups – WordPress Popup |
Version | 1.9.1.1 |
Comparing to | |
See all releases |
Code changes from version 1.9.1 to 1.9.1.1
- README.txt +3 -1
- popups.php +2 -2
- public/assets/js/public.js +16 -2
- public/class-social-popup.php +3 -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: 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, popupmaker
|
5 |
Requires at least: 3.6
|
6 |
Tested up to: 4.9.4
|
7 |
-
Stable tag: 1.9.1
|
8 |
Text Domain: popups
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -189,6 +189,8 @@ If you have cache be sure to enable AJAX mode in the plugin settings page
|
|
189 |
|
190 |
== Changelog ==
|
191 |
|
|
|
|
|
192 |
= 1.9.1 =
|
193 |
* Added ninja forms 3 compatibility (thanks https://github.com/cr0ybot)
|
194 |
* Fixed compatibility with latest WPML version
|
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, popupmaker
|
5 |
Requires at least: 3.6
|
6 |
Tested up to: 4.9.4
|
7 |
+
Stable tag: 1.9.1.1
|
8 |
Text Domain: popups
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
189 |
|
190 |
== Changelog ==
|
191 |
|
192 |
+
= 1.9.1.1 =
|
193 |
+
* Hotfix for draft popups showing
|
194 |
= 1.9.1 =
|
195 |
* Added ninja forms 3 compatibility (thanks https://github.com/cr0ybot)
|
196 |
* Fixed compatibility with latest WPML version
|
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.9.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: https://timersys.com
|
@@ -30,7 +30,7 @@ if ( ! defined( 'WPINC' ) ) {
|
|
30 |
* Public-Facing Functionality
|
31 |
*----------------------------------------------------------------------------*/
|
32 |
|
33 |
-
define( 'SPU_VERSION' , '1.9.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.9.1.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: https://timersys.com
|
30 |
* Public-Facing Functionality
|
31 |
*----------------------------------------------------------------------------*/
|
32 |
|
33 |
+
define( 'SPU_VERSION' , '1.9.1.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__ ) );
|
public/assets/js/public.js
CHANGED
@@ -64,8 +64,10 @@ var SPU_master = function() {
|
|
64 |
event = (ua.match(/iPad/i) || ua.match(/iPhone/i)) ? "touchstart" : "click";
|
65 |
|
66 |
$('body').on(event, function (ev) {
|
67 |
-
|
68 |
-
|
|
|
|
|
69 |
|
70 |
toggleBox( id, false, false );
|
71 |
|
@@ -304,7 +306,19 @@ var SPU_master = function() {
|
|
304 |
});
|
305 |
}
|
306 |
|
|
|
|
|
|
|
|
|
|
|
307 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
308 |
|
309 |
});
|
310 |
|
64 |
event = (ua.match(/iPad/i) || ua.match(/iPhone/i)) ? "touchstart" : "click";
|
65 |
|
66 |
$('body').on(event, function (ev) {
|
67 |
+
var $target = $(ev.target);
|
68 |
+
// test that event is user triggered and not programatically,
|
69 |
+
// and that it is not fired from input within the box
|
70 |
+
if( ev.originalEvent !== undefined && ! ( $.contains( $box, $target ) && $target.is('input') ) ) {
|
71 |
|
72 |
toggleBox( id, false, false );
|
73 |
|
306 |
});
|
307 |
}
|
308 |
|
309 |
+
// Ninja Forms 3 does not use a form element
|
310 |
+
var box_nf3 = $box.find('.nf-form-cont');
|
311 |
+
if ( box_nf3.length ) {
|
312 |
+
$(document).on('nfFormSubmitResponse', function(){
|
313 |
+
$box.trigger('spu.form_submitted', [id]);
|
314 |
|
315 |
+
// delay box close so user sees submission feedback
|
316 |
+
// should this delay be a config option?
|
317 |
+
setTimeout( function(){
|
318 |
+
toggleBox(id, false, true );
|
319 |
+
}, spuvar.seconds_confirmation_close * 1000);
|
320 |
+
});
|
321 |
+
}
|
322 |
|
323 |
});
|
324 |
|
public/class-social-popup.php
CHANGED
@@ -470,7 +470,7 @@ class SocialPopup {
|
|
470 |
return $spu_ids;
|
471 |
}
|
472 |
}
|
473 |
-
$post_status = isset( $_REQUEST['is_preview'] ) ? "AND (post_status='publish' OR post_status='draft')" : "AND post_status='publish'";
|
474 |
return $wpdb->get_results( "SELECT ID, post_content, MAX(CASE WHEN pm1.meta_key = 'spu_rules' then pm1.meta_value ELSE NULL END) as spu_rules,
|
475 |
MAX(CASE WHEN pm1.meta_key = 'spu_ab_parent' then pm1.meta_value ELSE NULL END) as spu_ab_parent
|
476 |
FROM $wpdb->posts p LEFT JOIN $wpdb->postmeta pm1 ON ( pm1.post_id = p.ID) WHERE post_type='spucpt' {$post_status} GROUP BY p.ID");
|
@@ -779,7 +779,7 @@ class SocialPopup {
|
|
779 |
*/
|
780 |
protected function get_polylang_ids( ) {
|
781 |
global $wpdb;
|
782 |
-
$post_status = isset( $_REQUEST['is_preview'] ) ? "AND (post_status='publish' OR post_status='draft')" : "AND post_status='publish'";
|
783 |
|
784 |
$sql = "SELECT description
|
785 |
FROM $wpdb->posts p
|
@@ -822,7 +822,7 @@ class SocialPopup {
|
|
822 |
$wpml_settings = get_option( 'icl_sitepress_settings', true);
|
823 |
|
824 |
if ( ! empty( $wpml_settings['custom_posts_sync_option']['spucpt'] ) ) {
|
825 |
-
$post_status = isset( $_REQUEST['is_preview'] ) ? "AND (post_status='publish' OR post_status='draft')" : "AND post_status='publish'";
|
826 |
$lang_code = isset( $_GET['lang'] ) ? $_GET['lang'] : ICL_LANGUAGE_CODE;
|
827 |
$sql = "SELECT DISTINCT ID, post_content,
|
828 |
MAX(CASE WHEN pm1.meta_key = 'spu_rules' then pm1.meta_value ELSE NULL END) as spu_rules,
|
470 |
return $spu_ids;
|
471 |
}
|
472 |
}
|
473 |
+
$post_status = isset( $_REQUEST['is_preview'] ) && $_REQUEST['is_preview'] == '1' ? "AND (post_status='publish' OR post_status='draft')" : "AND post_status='publish'";
|
474 |
return $wpdb->get_results( "SELECT ID, post_content, MAX(CASE WHEN pm1.meta_key = 'spu_rules' then pm1.meta_value ELSE NULL END) as spu_rules,
|
475 |
MAX(CASE WHEN pm1.meta_key = 'spu_ab_parent' then pm1.meta_value ELSE NULL END) as spu_ab_parent
|
476 |
FROM $wpdb->posts p LEFT JOIN $wpdb->postmeta pm1 ON ( pm1.post_id = p.ID) WHERE post_type='spucpt' {$post_status} GROUP BY p.ID");
|
779 |
*/
|
780 |
protected function get_polylang_ids( ) {
|
781 |
global $wpdb;
|
782 |
+
$post_status = isset( $_REQUEST['is_preview'] ) && $_REQUEST['is_preview'] == '1' ? "AND (post_status='publish' OR post_status='draft')" : "AND post_status='publish'";
|
783 |
|
784 |
$sql = "SELECT description
|
785 |
FROM $wpdb->posts p
|
822 |
$wpml_settings = get_option( 'icl_sitepress_settings', true);
|
823 |
|
824 |
if ( ! empty( $wpml_settings['custom_posts_sync_option']['spucpt'] ) ) {
|
825 |
+
$post_status = isset( $_REQUEST['is_preview'] ) && $_REQUEST['is_preview'] == '1' ? "AND (post_status='publish' OR post_status='draft')" : "AND post_status='publish'";
|
826 |
$lang_code = isset( $_GET['lang'] ) ? $_GET['lang'] : ICL_LANGUAGE_CODE;
|
827 |
$sql = "SELECT DISTINCT ID, post_content,
|
828 |
MAX(CASE WHEN pm1.meta_key = 'spu_rules' then pm1.meta_value ELSE NULL END) as spu_rules,
|