Popups, Welcome Bar, Optins and Lead Generation Plugin – Icegram - Version 2.0.3

Version Description

  • Fix: WooCommerce product added twice in cart when Cache Friendly option is enabled.
  • Fix: Secured Icegram from Stored XSS vulnerability.

=

Download this release

Release Info

Developer Icegram
Plugin Icon 128x128 Popups, Welcome Bar, Optins and Lead Generation Plugin – Icegram
Version 2.0.3
Comparing to
See all releases

Code changes from version 2.0.2 to 2.0.3

icegram.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Icegram - Popups, Optins, CTAs & lot more...
4
  * Plugin URI: https://www.icegram.com/
5
  * Description: All in one solution to inspire, convert and engage your audiences. Action bars, Popup windows, Messengers, Toast notifications and more. Awesome themes and powerful rules.
6
- * Version: 2.0.2
7
  * Tested up to: 5.8
8
  * Author: icegram
9
  * Author URI: https://www.icegram.com/
@@ -121,7 +121,7 @@ if ( ! defined( 'IG_PLUGIN_FILE' ) ) {
121
  }
122
 
123
  if ( ! defined( 'IG_PLUGIN_VERSION' ) ) {
124
- define( 'IG_PLUGIN_VERSION', '2.0.2' );
125
  }
126
 
127
  require plugin_dir_path( __FILE__ ) . 'lite/class-icegram.php';
3
  * Plugin Name: Icegram - Popups, Optins, CTAs & lot more...
4
  * Plugin URI: https://www.icegram.com/
5
  * Description: All in one solution to inspire, convert and engage your audiences. Action bars, Popup windows, Messengers, Toast notifications and more. Awesome themes and powerful rules.
6
+ * Version: 2.0.3
7
  * Tested up to: 5.8
8
  * Author: icegram
9
  * Author URI: https://www.icegram.com/
121
  }
122
 
123
  if ( ! defined( 'IG_PLUGIN_VERSION' ) ) {
124
+ define( 'IG_PLUGIN_VERSION', '2.0.3' );
125
  }
126
 
127
  require plugin_dir_path( __FILE__ ) . 'lite/class-icegram.php';
lite/assets/js/main.js CHANGED
@@ -63,6 +63,17 @@ try {
63
  icegram_timing['start'] = Date.now();
64
 
65
  if(icegram_pre_data.post_obj['cache_compatibility'] === 'yes'){
 
 
 
 
 
 
 
 
 
 
 
66
  jQuery.ajax({
67
  url: icegram_pre_data.ajax_url,
68
  type: "POST",
63
  icegram_timing['start'] = Date.now();
64
 
65
  if(icegram_pre_data.post_obj['cache_compatibility'] === 'yes'){
66
+
67
+ // Check if 'add-to-cart' property is present.
68
+ if ( icegram_pre_data.post_obj.hasOwnProperty('add-to-cart') ) {
69
+
70
+ /**
71
+ * Remove 'add-to-cart' property to avoid conflict with WooCommerce add to cart functionality.
72
+ * Product getting added twice on add to cart when ajax add-to-cart is disabled in WooCommerce and cache compatibility is enabled in Icegram.
73
+ */
74
+ delete icegram_pre_data.post_obj['add-to-cart'];
75
+ }
76
+
77
  jQuery.ajax({
78
  url: icegram_pre_data.ajax_url,
79
  type: "POST",
lite/assets/js/main.min.js CHANGED
@@ -1 +1 @@
1
- function load_scripts_and_css(a){var b={};jQuery.each(a.css,function(a,c){b["ig_css_"+a]=1}),jQuery.each(a.scripts,function(a,c){b["ig_script_"+a]=1});var c=function(c){var d=c.target.id||"";""!=d&&b.hasOwnProperty(d)&&delete b[d],jQuery.isEmptyObject(b)&&(jQuery(window).trigger("scripts_loaded.icegram"),jQuery(function(){window.icegram=new Icegram,window.icegram.init(a),jQuery("body").addClass("ig_"+icegram_pre_data.post_obj.device),icegram_timing.end=Date.now()}))};jQuery.each(a.css,function(a,b){jQuery("<link>").attr("type","text/css").attr("rel","stylesheet").attr("id","ig_css_"+a).attr("media","all").appendTo("head").on("load",c).attr("href",b)});var d=a.scripts.shift();jQuery("<script>").attr("type","text/javascript").attr("id","ig_script_0").appendTo("body").on("load",function(b){c(b),jQuery.each(a.scripts,function(a,b){jQuery("<script>").attr("type","text/javascript").attr("id","ig_script_"+(a+1)).appendTo("body").on("load",c).attr("src",b)})}).attr("src",d)}try{var icegram_data,icegram_timing={};icegram_pre_data.post_obj.referral_url=window.location.href,icegram_timing.start=Date.now(),"yes"===icegram_pre_data.post_obj.cache_compatibility?(jQuery.ajax({url:icegram_pre_data.ajax_url,type:"POST",async:!0,cache:!1,data:icegram_pre_data.post_obj,dataType:"json",success:function(a){a?(icegram_data=a,load_scripts_and_css(icegram_data)):jQuery(".ig_inline_container:empty").remove()},error:function(a){}}),jQuery(window).on("init.icegram",function(a,b){"undefined"!=typeof b&&"undefined"!=typeof b.messages&&jQuery.each(b.messages,function(a,b){b.data.assets&&(jQuery.each(b.data.assets.styles||[],function(a,b){var c=jQuery("<div/>").html(b).find("link").attr("href");c&&0==jQuery('link[href="'+c+'"]').length&&jQuery("body").append(b)}),jQuery.each(b.data.assets.scripts||[],function(a,b){var c=jQuery("<div/>").html("<script "+b).find("script").attr("src");c&&0==jQuery('script[src="'+c+'"]').length&&jQuery("body").append("<script "+b)}))})})):"undefined"!=typeof icegram_data&&load_scripts_and_css(icegram_data),jQuery(window).on("init.icegram",function(a,b){"undefined"!=typeof b&&"undefined"!=typeof b.messages&&jQuery.each(b.messages,function(a,b){"yes"==b.data.use_custom_code&&"undefined"!=typeof b.data.custom_js&&jQuery("body").append(b.data.custom_js)}),jQuery("body").find(".trigger_onclick").length&&jQuery.each(jQuery("body").find(".trigger_onclick"),function(a,c){var d="",e=jQuery(c).data("campaigns"),f=b.get_message_by_campaign_id(e);jQuery.each(f,function(a,b){var c=parseInt(b.data.id);d+="icegram.get_message_by_id("+c+").show();"}),jQuery(c).children().length?jQuery(c).children().attr("onclick",d):jQuery(c).attr("onclick",d)})})}catch(err){console.log(err)}
1
+ function load_scripts_and_css(a){var b={};jQuery.each(a.css,function(a,c){b["ig_css_"+a]=1}),jQuery.each(a.scripts,function(a,c){b["ig_script_"+a]=1});var c=function(c){var d=c.target.id||"";""!=d&&b.hasOwnProperty(d)&&delete b[d],jQuery.isEmptyObject(b)&&(jQuery(window).trigger("scripts_loaded.icegram"),jQuery(function(){window.icegram=new Icegram,window.icegram.init(a),jQuery("body").addClass("ig_"+icegram_pre_data.post_obj.device),icegram_timing.end=Date.now()}))};jQuery.each(a.css,function(a,b){jQuery("<link>").attr("type","text/css").attr("rel","stylesheet").attr("id","ig_css_"+a).attr("media","all").appendTo("head").on("load",c).attr("href",b)});var d=a.scripts.shift();jQuery("<script>").attr("type","text/javascript").attr("id","ig_script_0").appendTo("body").on("load",function(b){c(b),jQuery.each(a.scripts,function(a,b){jQuery("<script>").attr("type","text/javascript").attr("id","ig_script_"+(a+1)).appendTo("body").on("load",c).attr("src",b)})}).attr("src",d)}try{var icegram_data,icegram_timing={};icegram_pre_data.post_obj.referral_url=window.location.href,icegram_timing.start=Date.now(),"yes"===icegram_pre_data.post_obj.cache_compatibility?(icegram_pre_data.post_obj.hasOwnProperty("add-to-cart")&&delete icegram_pre_data.post_obj["add-to-cart"],jQuery.ajax({url:icegram_pre_data.ajax_url,type:"POST",async:!0,cache:!1,data:icegram_pre_data.post_obj,dataType:"json",success:function(a){a?(icegram_data=a,load_scripts_and_css(icegram_data)):jQuery(".ig_inline_container:empty").remove()},error:function(a){}}),jQuery(window).on("init.icegram",function(a,b){"undefined"!=typeof b&&"undefined"!=typeof b.messages&&jQuery.each(b.messages,function(a,b){b.data.assets&&(jQuery.each(b.data.assets.styles||[],function(a,b){var c=jQuery("<div/>").html(b).find("link").attr("href");c&&0==jQuery('link[href="'+c+'"]').length&&jQuery("body").append(b)}),jQuery.each(b.data.assets.scripts||[],function(a,b){var c=jQuery("<div/>").html("<script "+b).find("script").attr("src");c&&0==jQuery('script[src="'+c+'"]').length&&jQuery("body").append("<script "+b)}))})})):"undefined"!=typeof icegram_data&&load_scripts_and_css(icegram_data),jQuery(window).on("init.icegram",function(a,b){"undefined"!=typeof b&&"undefined"!=typeof b.messages&&jQuery.each(b.messages,function(a,b){"yes"==b.data.use_custom_code&&"undefined"!=typeof b.data.custom_js&&jQuery("body").append(b.data.custom_js)}),jQuery("body").find(".trigger_onclick").length&&jQuery.each(jQuery("body").find(".trigger_onclick"),function(a,c){var d="",e=jQuery(c).data("campaigns"),f=b.get_message_by_campaign_id(e);jQuery.each(f,function(a,b){var c=parseInt(b.data.id);d+="icegram.get_message_by_id("+c+").show();"}),jQuery(c).children().length?jQuery(c).children().attr("onclick",d):jQuery(c).attr("onclick",d)})})}catch(err){console.log(err)}
lite/class-icegram.php CHANGED
@@ -790,6 +790,10 @@ if ( ! class_exists( 'Icegram' ) ) {
790
  if ( ! is_array( $message_data ) || empty( $message_data ) ) {
791
  continue;
792
  }
 
 
 
 
793
 
794
  // Don't show a seen message again - if needed
795
  // change to campaign targetting in v1.9.1
790
  if ( ! is_array( $message_data ) || empty( $message_data ) ) {
791
  continue;
792
  }
793
+
794
+ $messages[$key]['headline'] = isset( $message_data['headline'] ) ? wp_kses_post( $message_data['headline'] ) : '';
795
+ $messages[$key]['label'] = isset( $message_data['label'] ) ? wp_kses_post( $message_data['label'] ) : '';
796
+ $messages[$key]['title'] = isset( $message_data['title'] ) ? wp_kses_post( $message_data['title'] ) : '';
797
 
798
  // Don't show a seen message again - if needed
799
  // change to campaign targetting in v1.9.1
lite/classes/class-icegram-campaign-admin.php CHANGED
@@ -692,6 +692,16 @@ public function campaign_data_tab_content($tabs) {
692
  $message_data['position'] = $message_data['position']['ig_default'];
693
  }
694
 
 
 
 
 
 
 
 
 
 
 
695
  if( empty( $message_data['rainmaker_form_code'] ) && ! empty( $message_data['form_html_original'] ) && strpos( $message_data['form_html_original'], 'rainmaker_form') ) {
696
  $rm_shortcode_pos = strpos($message_data['form_html_original'], '"')+1;
697
  $rm_shortcode = substr($message_data['form_html_original'], $rm_shortcode_pos , strripos($message_data['form_html_original'], "\\") - $rm_shortcode_pos);
692
  $message_data['position'] = $message_data['position']['ig_default'];
693
  }
694
 
695
+ if( isset( $message_data['title'] ) ) {
696
+ $message_data['title'] = wp_kses_post( $message_data['title'] );
697
+ }
698
+ if( isset( $message_data['headline'] ) ) {
699
+ $message_data['headline'] = wp_kses_post( $message_data['headline'] );
700
+ }
701
+ if( isset( $message_data['label'] ) ) {
702
+ $message_data['label'] = wp_kses_post( $message_data['label'] );
703
+ }
704
+
705
  if( empty( $message_data['rainmaker_form_code'] ) && ! empty( $message_data['form_html_original'] ) && strpos( $message_data['form_html_original'], 'rainmaker_form') ) {
706
  $rm_shortcode_pos = strpos($message_data['form_html_original'], '"')+1;
707
  $rm_shortcode = substr($message_data['form_html_original'], $rm_shortcode_pos , strripos($message_data['form_html_original'], "\\") - $rm_shortcode_pos);
lite/classes/feedback.php CHANGED
@@ -87,9 +87,8 @@ if ( ! function_exists( 'ig_can_ask_user_for_review' ) ) {
87
 
88
  $total_campaigns = wp_count_posts( 'ig_campaign' );
89
  $total_campaigns_publish = $total_campaigns->publish;
90
- $total_campaigns_draft = $total_campaigns->draft;
91
 
92
- if ( $total_campaigns_draft == 0 && $total_campaigns_publish == 0 ) {
93
  return false;
94
  }
95
  }
87
 
88
  $total_campaigns = wp_count_posts( 'ig_campaign' );
89
  $total_campaigns_publish = $total_campaigns->publish;
 
90
 
91
+ if ( $total_campaigns_publish == 0 ) {
92
  return false;
93
  }
94
  }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.icegram.com/
4
  Tags: popup, optin, hellobar, lead capture, form, marketing, notification, messenger, targeting, monster, ninja ,wordpress lead generation, wordpress lightbox optin, wordpress lightbox optin form, wordpress lightbox optins, wordpress mobile optin forms, wordpress mobile popup, wordpress mobile popups, wordpress optin form, wordpress overlay popup, wordpress popup, wordpress popup form, wordpress popup plugin, wordpress popup solution, wordpress popups, popups, subscribe, wp popups, optin bars, action grabber, promotion, popup message, leads, lists, builder, action bar, floating bar, footer bar, hellobar alternative, pop over, Popup plugin, aweber, campaign monitor, constant contact, email list, exit-intent, onclick popup, analytics, Hubspot, popup ads, pop-up, Mailing list pop-up, re-targeting, Animation, Popups with Animation, Responsive Popup, split testing, AB testing
5
  Requires at least: 3.9
6
  Tested up to: 5.8
7
- Stable tag: 2.0.2
8
  License: GPLv3
9
 
10
  The best WP popup plugin that lets you create a popup within seconds. Customize popup, target popups to show offers, email signups, social buttons, etc and instantly increase conversions on your website.
@@ -242,13 +242,18 @@ Contact Us, provide as much detail of the problem as you can. We will try to sol
242
 
243
  == Upgrade Notice ==
244
 
245
- = 2.0.2 =
246
 
247
- * Update: UI/UX improvements
248
- * Fix: Icegram account connection issue [Premium]
249
 
250
  == Changelog ==
251
 
 
 
 
 
 
252
  **2.0.2 (27.07.2021)**
253
 
254
  * Update: UI/UX improvements
4
  Tags: popup, optin, hellobar, lead capture, form, marketing, notification, messenger, targeting, monster, ninja ,wordpress lead generation, wordpress lightbox optin, wordpress lightbox optin form, wordpress lightbox optins, wordpress mobile optin forms, wordpress mobile popup, wordpress mobile popups, wordpress optin form, wordpress overlay popup, wordpress popup, wordpress popup form, wordpress popup plugin, wordpress popup solution, wordpress popups, popups, subscribe, wp popups, optin bars, action grabber, promotion, popup message, leads, lists, builder, action bar, floating bar, footer bar, hellobar alternative, pop over, Popup plugin, aweber, campaign monitor, constant contact, email list, exit-intent, onclick popup, analytics, Hubspot, popup ads, pop-up, Mailing list pop-up, re-targeting, Animation, Popups with Animation, Responsive Popup, split testing, AB testing
5
  Requires at least: 3.9
6
  Tested up to: 5.8
7
+ Stable tag: 2.0.3
8
  License: GPLv3
9
 
10
  The best WP popup plugin that lets you create a popup within seconds. Customize popup, target popups to show offers, email signups, social buttons, etc and instantly increase conversions on your website.
242
 
243
  == Upgrade Notice ==
244
 
245
+ = 2.0.3 =
246
 
247
+ * Fix: WooCommerce product added twice in cart when Cache Friendly option is enabled.
248
+ * Fix: Secured Icegram from Stored XSS vulnerability.
249
 
250
  == Changelog ==
251
 
252
+ **2.0.3 (17.08.2021)**
253
+
254
+ * Fix: WooCommerce product added twice when Cache Friendly option is enabled.
255
+ * Fix: Secured Icegram from Stored XSS vulnerability.
256
+
257
  **2.0.2 (27.07.2021)**
258
 
259
  * Update: UI/UX improvements