Email Subscribers & Newsletters - Version 4.1.2.2

Version Description

(31.05.2019) = * Fix: Fatal error: Call to undefined function get_plugins()

Download this release

Release Info

Developer Icegram
Plugin Icon 128x128 Email Subscribers & Newsletters
Version 4.1.2.2
Comparing to
See all releases

Code changes from version 4.1.2.1 to 4.1.2.2

email-subscribers.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Email Subscribers & Newsletters
4
  * Plugin URI: https://www.icegram.com/
5
  * Description: Add subscription forms on website, send HTML newsletters & automatically notify subscribers about new blog posts once it is published.
6
- * Version: 4.1.2.1
7
  * Author: Icegram
8
  * Author URI: https://www.icegram.com/
9
  * Requires at least: 3.9
@@ -24,7 +24,7 @@ if ( ! defined( 'WPINC' ) ) {
24
  * Define constants
25
  */
26
  define( 'ES_PLUGIN_DIR', dirname( __FILE__ ) );
27
- define( 'ES_PLUGIN_VERSION', '4.1.2.1' );
28
  define( 'ES_PLUGIN_BASE_NAME', plugin_basename( __FILE__ ) );
29
 
30
  if ( ! defined( 'ES_PLUGIN_FILE' ) ) {
3
  * Plugin Name: Email Subscribers & Newsletters
4
  * Plugin URI: https://www.icegram.com/
5
  * Description: Add subscription forms on website, send HTML newsletters & automatically notify subscribers about new blog posts once it is published.
6
+ * Version: 4.1.2.2
7
  * Author: Icegram
8
  * Author URI: https://www.icegram.com/
9
  * Requires at least: 3.9
24
  * Define constants
25
  */
26
  define( 'ES_PLUGIN_DIR', dirname( __FILE__ ) );
27
+ define( 'ES_PLUGIN_VERSION', '4.1.2.2' );
28
  define( 'ES_PLUGIN_BASE_NAME', plugin_basename( __FILE__ ) );
29
 
30
  if ( ! defined( 'ES_PLUGIN_FILE' ) ) {
includes/admin/class-es-newsletters.php CHANGED
@@ -62,6 +62,30 @@ class ES_Newsletters {
62
  $message = __( sprintf( 'A new broadcast has been created successfully! Contacts from selected list will be notified within an hour. Want to notify now? <a href="%s" target="_blank">Click here</a>', $reports_url ), 'email-subscribers' );
63
 
64
  ES_Common::show_message( $message, 'success' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
65
  }
66
 
67
  $this->prepare_newsletter_settings_form();
62
  $message = __( sprintf( 'A new broadcast has been created successfully! Contacts from selected list will be notified within an hour. Want to notify now? <a href="%s" target="_blank">Click here</a>', $reports_url ), 'email-subscribers' );
63
 
64
  ES_Common::show_message( $message, 'success' );
65
+
66
+ // **************** Quick Feedback - Start ********************
67
+ global $ig_es_feedback;
68
+
69
+ if ( ! $ig_es_feedback->can_show_feedback_widget() ) {
70
+ return;
71
+ }
72
+
73
+ $event = 'broadcast.created';
74
+ if ( ! $ig_es_feedback->is_event_transient_set( $ig_es_feedback->event_prefix . $event ) ) {
75
+
76
+ $params = array(
77
+ 'type' => 'emoji',
78
+ 'event' => $event,
79
+ 'title' => "How's your experience sending broadcast?",
80
+ 'position' => 'top-end',
81
+ 'width' => 300,
82
+ 'delay' => 2, // seconds
83
+ 'confirmButtonText' => __( 'Send', 'email-subscribers' )
84
+ );
85
+
86
+ ES_Common::render_feedback_widget( $params );
87
+ }
88
+ // **************** Quick Feedback - End ********************
89
  }
90
 
91
  $this->prepare_newsletter_settings_form();
includes/feedback.php CHANGED
@@ -84,4 +84,4 @@ function ig_es_render_feedback_widget() {
84
 
85
  }
86
 
87
- add_action( 'admin_footer', 'ig_es_render_feedback_widget' );
84
 
85
  }
86
 
87
+ //add_action( 'admin_footer', 'ig_es_render_feedback_widget' );
includes/feedback/class-ig-feedback-v-1-0-1.php CHANGED
@@ -160,7 +160,8 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_1' ) ) {
160
  'allowEscapeKey' => true,
161
  'showCloseButton' => true,
162
  'confirmButtonText' => __( 'Ok', 'email-subscribers' ),
163
- 'backdrop' => true
 
164
  );
165
 
166
  $params = wp_parse_args( $params, $default_params );
@@ -201,100 +202,88 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_1' ) ) {
201
  return jQuery.post(ajaxurl, data);
202
  }
203
 
204
- Swal.mixin({
205
- footer: '<?php echo $this->footer; ?>',
206
- position: '<?php echo $params['position']; ?>',
207
- width: <?php echo $params['width']; ?>,
208
- animation: false,
209
- focusConfirm: false,
210
- allowEscapeKey: '<?php echo $params['allowEscapeKey']; ?>',
211
- showCloseButton: '<?php echo $params['showCloseButton']; ?>',
212
- allowOutsideClick: '<?php echo $params['allowOutsideClick']; ?>',
213
- showLoaderOnConfirm: true,
214
- confirmButtonText: '<?php echo $params['confirmButtonText']; ?>',
215
- backdrop: '<?php echo (int) $params['backdrop']; ?>'
216
- }).queue([
217
- {
218
- title: '<p class="ig-feedback-title"><?php echo esc_js( $params['title'] ); ?></p>',
219
- html: '<?php echo $html; ?>',
220
- customClass: {
221
- popup: 'animated fadeInUpBig'
222
- },
223
- onOpen: () => {
224
- var clicked = false;
225
- var selectedReaction = '';
226
- jQuery('.ig-emoji').hover(function () {
227
- reaction = jQuery(this).attr('data-reaction');
228
- jQuery('#emoji-info').text(reaction);
229
- }, function () {
230
- if (!clicked) {
231
- jQuery('#emoji-info').text('');
232
- } else {
233
- jQuery('#emoji-info').text(selectedReaction);
234
- }
235
- });
236
-
237
- jQuery('.ig-emoji').on('click', function () {
238
- clicked = true;
239
- jQuery('.ig-emoji').removeClass('active');
240
- jQuery(this).addClass('active');
241
- selectedReaction = jQuery(this).attr('data-reaction');
242
- jQuery('#emoji-info').text(reaction);
243
- });
244
- },
245
- preConfirm: () => {
246
-
247
- var rating = jQuery("input[name='rating']:checked").val();
248
- var details = '';
249
-
250
- if (rating === undefined) {
251
- Swal.showValidationMessage('Please give your input');
252
- return;
253
- }
254
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
255
 
256
- return doSend(rating, details);
257
-
258
- /*
259
- Swal.insertQueueStep({
260
- input: 'textarea',
261
- //html: '<textarea class="swal2-textarea" id="details" placeholder style="display: flex;"></textarea>' +
262
- // '<p class="info"><input type="checkbox" name="permission" class="anonymous_data_collection" value="1" id="anonymous_data_collection">Help us to improve by opting in to our anonymous plugin data collection.</p>',
263
- confirmButtonText: 'Send',
264
- title: '<p class="ig-feedback-title">Anything else you would like to share about your experience</p>',
265
- showLoaderOnConfirm: true,
266
-
267
- preConfirm: (details) => {
268
 
269
- //var enable_system_info = document.getElementById('anonymous_data_collection').checked;
270
- //var details = document.getElementById('details').value;
271
 
272
- return doSend(rating, details);
 
 
 
 
 
 
 
 
273
 
274
- }
275
- });
276
- */
277
- }
278
- },
279
 
280
- ]).then(response => {
 
281
 
282
- if (response.hasOwnProperty('value')) {
 
283
 
284
- Swal.fire({
285
- type: 'success',
286
- width: <?php echo $params['width']; ?>,
287
- title: "Thank You!",
288
- showConfirmButton: false,
289
- position: '<?php echo $params['position']; ?>',
290
- timer: 1500,
291
- animation: false
292
- });
293
 
294
- } else if (response.hasOwnProperty('dismiss')) {
295
- doSend(0, 'dismiss');
296
- }
297
- });
298
  </script>
299
  <?php
300
  }
@@ -815,9 +804,6 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_1' ) ) {
815
  $set_transient = ! empty( $data['misc']['set_transient'] ) ? $data['misc']['set_transient'] : false;
816
  $system_info = ! empty( $data['misc']['system_info'] ) ? $data['misc']['system_info'] : false;
817
 
818
- $logger = get_ig_logger();
819
- $logger->info( 'DAta' . print_r( $data, true ) );
820
-
821
  unset( $data['misc'] );
822
 
823
  $meta_info = array(
@@ -851,8 +837,6 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_1' ) ) {
851
  $this->set_event_transient( $data['event'] );
852
  }
853
 
854
- $logger->info( 'DAta' . print_r( $data, true ) );
855
-
856
  $response = wp_remote_post( $this->get_api_url( $is_dev_mode ), $args );
857
 
858
  $result['status'] = 'success';
160
  'allowEscapeKey' => true,
161
  'showCloseButton' => true,
162
  'confirmButtonText' => __( 'Ok', 'email-subscribers' ),
163
+ 'backdrop' => true,
164
+ 'delay' => 3 // In Seconds
165
  );
166
 
167
  $params = wp_parse_args( $params, $default_params );
202
  return jQuery.post(ajaxurl, data);
203
  }
204
 
205
+ function showWidget(delay) {
206
+ setTimeout(function () {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
207
 
208
+ Swal.mixin({
209
+ footer: '<?php echo $this->footer; ?>',
210
+ position: '<?php echo $params['position']; ?>',
211
+ width: <?php echo $params['width']; ?>,
212
+ animation: false,
213
+ focusConfirm: false,
214
+ allowEscapeKey: '<?php echo $params['allowEscapeKey']; ?>',
215
+ showCloseButton: '<?php echo $params['showCloseButton']; ?>',
216
+ allowOutsideClick: '<?php echo $params['allowOutsideClick']; ?>',
217
+ showLoaderOnConfirm: true,
218
+ confirmButtonText: '<?php echo $params['confirmButtonText']; ?>',
219
+ backdrop: '<?php echo (int) $params['backdrop']; ?>'
220
+ }).queue([
221
+ {
222
+ title: '<p class="ig-feedback-title"><?php echo esc_js( $params['title'] ); ?></p>',
223
+ html: '<?php echo $html; ?>',
224
+ customClass: {
225
+ popup: 'animated fadeInUpBig'
226
+ },
227
+ onOpen: () => {
228
+ var clicked = false;
229
+ var selectedReaction = '';
230
+ jQuery('.ig-emoji').hover(function () {
231
+ reaction = jQuery(this).attr('data-reaction');
232
+ jQuery('#emoji-info').text(reaction);
233
+ }, function () {
234
+ if (!clicked) {
235
+ jQuery('#emoji-info').text('');
236
+ } else {
237
+ jQuery('#emoji-info').text(selectedReaction);
238
+ }
239
+ });
240
+
241
+ jQuery('.ig-emoji').on('click', function () {
242
+ clicked = true;
243
+ jQuery('.ig-emoji').removeClass('active');
244
+ jQuery(this).addClass('active');
245
+ selectedReaction = jQuery(this).attr('data-reaction');
246
+ jQuery('#emoji-info').text(reaction);
247
+ });
248
+ },
249
+ preConfirm: () => {
250
+
251
+ var rating = jQuery("input[name='rating']:checked").val();
252
+ var details = '';
253
+
254
+ if (rating === undefined) {
255
+ Swal.showValidationMessage('Please give your input');
256
+ return;
257
+ }
258
+
259
+ return doSend(rating, details);
260
+ }
261
+ },
262
 
263
+ ]).then(response => {
 
 
 
 
 
 
 
 
 
 
 
264
 
265
+ if (response.hasOwnProperty('value')) {
 
266
 
267
+ Swal.fire({
268
+ type: 'success',
269
+ width: <?php echo $params['width']; ?>,
270
+ title: "Thank You!",
271
+ showConfirmButton: false,
272
+ position: '<?php echo $params['position']; ?>',
273
+ timer: 1500,
274
+ animation: false
275
+ });
276
 
277
+ }
278
+ });
 
 
 
279
 
280
+ }, delay * 1000);
281
+ }
282
 
283
+ var delay = <?php echo $params['delay']; ?>;
284
+ showWidget(delay);
285
 
 
 
 
 
 
 
 
 
 
286
 
 
 
 
 
287
  </script>
288
  <?php
289
  }
804
  $set_transient = ! empty( $data['misc']['set_transient'] ) ? $data['misc']['set_transient'] : false;
805
  $system_info = ! empty( $data['misc']['system_info'] ) ? $data['misc']['system_info'] : false;
806
 
 
 
 
807
  unset( $data['misc'] );
808
 
809
  $meta_info = array(
837
  $this->set_event_transient( $data['event'] );
838
  }
839
 
 
 
840
  $response = wp_remote_post( $this->get_api_url( $is_dev_mode ), $args );
841
 
842
  $result['status'] = 'success';
includes/feedback/class-ig-tracker-v-1-0-1.php CHANGED
@@ -30,6 +30,10 @@ if ( ! class_exists( 'IG_Tracker_V_1_0_1' ) ) {
30
  'inactive_plugins' => array()
31
  );
32
 
 
 
 
 
33
  $all_plugins = get_plugins();
34
  $active_plugins = get_option( 'active_plugins', array() );
35
 
30
  'inactive_plugins' => array()
31
  );
32
 
33
+ if ( ! function_exists( 'get_plugins' ) ) {
34
+ require_once ABSPATH . 'wp-admin/includes/plugin.php';
35
+ }
36
+
37
  $all_plugins = get_plugins();
38
  $active_plugins = get_option( 'active_plugins', array() );
39
 
includes/pro-features.php CHANGED
@@ -5,18 +5,16 @@ add_filter( 'ig_es_registered_settings', 'ig_es_add_upsale', 10, 2 );
5
  // Add additional tab "Comments" in Audience > Sync
6
  add_filter( 'ig_es_sync_users_tabs', 'ig_es_add_sync_users_tabs', 11, 1 );
7
 
8
-
9
  add_action( 'ig_es_sync_users_tabs_comments', 'ig_es_add_comments_tab_settings' );
10
  add_action( 'ig_es_sync_users_tabs_woocommerce', 'ig_es_add_woocommerce_tab_settings' );
11
 
12
  function ig_es_add_upsale( $fields ) {
 
13
 
14
- $active_plugins = (array) get_option( 'active_plugins', array() );
15
- if ( is_multisite() ) {
16
- $active_plugins = array_merge( $active_plugins, get_site_option( 'active_sitewide_plugins', array() ) );
17
- }
18
 
19
- if ( ! ( in_array( 'email-subscribers-premium/email-subscribers-premium.php', $active_plugins ) || array_key_exists( 'email-subscribers-premium/email-subscribers-premium.php', $active_plugins ) ) ) {
20
 
21
  // Security settings
22
  $field_security['es_upsale_security'] = array(
@@ -42,25 +40,33 @@ function ig_es_add_upsale( $fields ) {
42
  }
43
 
44
  function ig_es_add_sync_users_tabs( $tabs ) {
45
- global $ig_es_tracker;
46
 
47
- $tabs['comments'] = array(
48
- 'name' => __( 'Comments', 'email-subscribers' ),
49
- 'indicator_option' => 'ig_es_show_sync_comment_users_indicator',
50
- 'indicator_label' => 'Starter'
51
- );
52
 
53
- $woocommerce_plugin = 'woocommerce/woocommerce.php';
54
- $active_plugins = $ig_es_tracker::get_active_plugins();
55
 
56
- if ( in_array( $woocommerce_plugin, $active_plugins ) ) {
57
- $tabs['woocommerce'] = array(
58
- 'name' => __( 'WooCommerce', 'email-subscribers' ),
59
- 'indicator_option' => 'ig_es_show_sync_woocommerce_users_indicator',
60
  'indicator_label' => 'Starter'
61
  );
 
 
 
 
 
 
 
 
 
 
 
 
62
  }
63
 
 
64
  return $tabs;
65
  }
66
 
@@ -84,7 +90,8 @@ function ig_es_add_comments_tab_settings( $tab_options ) {
84
  <h2>Sync Comment Users</h2>
85
  <p>Quickly add to your mailing list when someone post a comment on your website.</p>
86
  <h2>How to setup?</h2>
87
- <p>Once you upgrade to <a href="https://www.icegram.com/email-subscribers-starter/?utm_source=in_app&utm_medium=comment_sync&utm_campaign=es_upsale#sync_comment_users">Email Subscribers Starter</a>, you will have settings panel where you need to enable Comment user sync and select the list in which you want to add people whenever someone post a comment.</p>
 
88
  <hr>
89
  <p class="help">Checkout <a href="https://www.icegram.com/email-subscribers-starter/?utm_source=in_app&utm_medium=comment_sync&utm_campaign=es_upsale#sync_comment_users">Email Subscribers Starter</a> now</p>
90
  </div>
@@ -112,7 +119,8 @@ function ig_es_add_woocommerce_tab_settings( $tab_options ) {
112
  <h2>Sync WooCommerce Customers</h2>
113
  <p>Are you using WooCommerce for your online business? You can use this integration to add to a specific list whenever someone make a purchase from you</p>
114
  <h2>How to setup?</h2>
115
- <p>Once you upgrade to <a href="https://www.icegram.com/email-subscribers-starter/?utm_source=in_app&utm_medium=woocommerce_sync&utm_campaign=es_upsale#sync_woocommerce_customers">Email Subscribers Starter</a>, you will have settings panel where you need to enable WooCommerce sync and select the list in which you want to add people whenever they purchase something
 
116
  from you.</p>
117
  <hr>
118
  <p class="help">Checkout <a href="https://www.icegram.com/email-subscribers-starter/?utm_source=in_app&utm_medium=woocommerce_sync&utm_campaign=es_upsale#sync_woocommerce_customers">Email Subscribers Starter</a> Now</p>
5
  // Add additional tab "Comments" in Audience > Sync
6
  add_filter( 'ig_es_sync_users_tabs', 'ig_es_add_sync_users_tabs', 11, 1 );
7
 
 
8
  add_action( 'ig_es_sync_users_tabs_comments', 'ig_es_add_comments_tab_settings' );
9
  add_action( 'ig_es_sync_users_tabs_woocommerce', 'ig_es_add_woocommerce_tab_settings' );
10
 
11
  function ig_es_add_upsale( $fields ) {
12
+ global $ig_es_tracker;
13
 
14
+ $es_premium = 'email-subscribers-premium/email-subscribers-premium.php';
15
+ $all_plugins = $ig_es_tracker::get_plugins();
 
 
16
 
17
+ if ( ! in_array( $es_premium, $all_plugins ) ) {
18
 
19
  // Security settings
20
  $field_security['es_upsale_security'] = array(
40
  }
41
 
42
  function ig_es_add_sync_users_tabs( $tabs ) {
43
+ global $ig_es_tracker;
44
 
45
+ $es_premium = 'email-subscribers-premium/email-subscribers-premium.php';
46
+ $all_plugins = $ig_es_tracker::get_plugins();
 
 
 
47
 
48
+ if ( ! in_array( $es_premium, $all_plugins ) ) {
 
49
 
50
+ $tabs['comments'] = array(
51
+ 'name' => __( 'Comments', 'email-subscribers' ),
52
+ 'indicator_option' => 'ig_es_show_sync_comment_users_indicator',
 
53
  'indicator_label' => 'Starter'
54
  );
55
+
56
+ $woocommerce_plugin = 'woocommerce/woocommerce.php';
57
+
58
+ $active_plugins = $ig_es_tracker::get_active_plugins();
59
+
60
+ if ( in_array( $woocommerce_plugin, $active_plugins ) ) {
61
+ $tabs['woocommerce'] = array(
62
+ 'name' => __( 'WooCommerce', 'email-subscribers' ),
63
+ 'indicator_option' => 'ig_es_show_sync_woocommerce_users_indicator',
64
+ 'indicator_label' => 'Starter'
65
+ );
66
+ }
67
  }
68
 
69
+
70
  return $tabs;
71
  }
72
 
90
  <h2>Sync Comment Users</h2>
91
  <p>Quickly add to your mailing list when someone post a comment on your website.</p>
92
  <h2>How to setup?</h2>
93
+ <p>Once you upgrade to <a href="https://www.icegram.com/email-subscribers-starter/?utm_source=in_app&utm_medium=comment_sync&utm_campaign=es_upsale#sync_comment_users">Email Subscribers Starter</a>, you will have settings panel where you need to enable Comment user sync and select the list in which you want to add people whenever someone post a
94
+ comment.</p>
95
  <hr>
96
  <p class="help">Checkout <a href="https://www.icegram.com/email-subscribers-starter/?utm_source=in_app&utm_medium=comment_sync&utm_campaign=es_upsale#sync_comment_users">Email Subscribers Starter</a> now</p>
97
  </div>
119
  <h2>Sync WooCommerce Customers</h2>
120
  <p>Are you using WooCommerce for your online business? You can use this integration to add to a specific list whenever someone make a purchase from you</p>
121
  <h2>How to setup?</h2>
122
+ <p>Once you upgrade to <a href="https://www.icegram.com/email-subscribers-starter/?utm_source=in_app&utm_medium=woocommerce_sync&utm_campaign=es_upsale#sync_woocommerce_customers">Email Subscribers Starter</a>, you will have settings panel where you need to enable WooCommerce sync and select the list in which you want to add people whenever they
123
+ purchase something
124
  from you.</p>
125
  <hr>
126
  <p class="help">Checkout <a href="https://www.icegram.com/email-subscribers-starter/?utm_source=in_app&utm_medium=woocommerce_sync&utm_campaign=es_upsale#sync_woocommerce_customers">Email Subscribers Starter</a> Now</p>
readme.txt CHANGED
@@ -5,7 +5,7 @@ Author URI: https://www.icegram.com/
5
  Tags: subscription, newsletter, email marketing, post notification, email newsletter form, email signup, email widget, newsletter signup, subscribe, subscription form, bulk emails, signup form, list builder, lead generation, welcome email, contacts
6
  Requires at least: 3.9
7
  Tested up to: 5.2.1
8
- Stable tag: 4.1.2.1
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses
11
 
@@ -301,6 +301,9 @@ Use our free plugin [Email Subscribers - Group Selector](https://wordpress.org/p
301
 
302
  == Changelog ==
303
 
 
 
 
304
  = 4.1.2.1 (30.05.2019) =
305
  * Fix: Unable to use sync functionality
306
 
5
  Tags: subscription, newsletter, email marketing, post notification, email newsletter form, email signup, email widget, newsletter signup, subscribe, subscription form, bulk emails, signup form, list builder, lead generation, welcome email, contacts
6
  Requires at least: 3.9
7
  Tested up to: 5.2.1
8
+ Stable tag: 4.1.2.2
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses
11
 
301
 
302
  == Changelog ==
303
 
304
+ = 4.1.2.2 (31.05.2019) =
305
+ * Fix: Fatal error: Call to undefined function get_plugins()
306
+
307
  = 4.1.2.1 (30.05.2019) =
308
  * Fix: Unable to use sync functionality
309