Newsletter - Version 5.9.3

Version Description

  • Fixed multi newsletter deletion warning
  • Fixed privacy checkbox
  • Fixed a link on header warning
Download this release

Release Info

Developer satollo
Plugin Icon 128x128 Newsletter
Version 5.9.3
Comparing to
See all releases

Code changes from version 5.9.2 to 5.9.3

includes/module.php CHANGED
@@ -799,12 +799,22 @@ class NewsletterModule {
799
  return $email;
800
  }
801
 
 
 
 
 
 
 
802
  function delete_email($id) {
803
  global $wpdb;
804
  $r = $this->store->delete(NEWSLETTER_EMAILS_TABLE, $id);
805
  if ($r !== false) {
806
- $wpdb->delete(NEWSLETTER_STATS_TABLE, array('email_id' => $id));
807
- $wpdb->delete(NEWSLETTER_SENT_TABLE, array('email_id' => $id));
 
 
 
 
808
  }
809
  return $r;
810
  }
@@ -986,13 +996,13 @@ class NewsletterModule {
986
  return null;
987
  }
988
  }
989
-
990
  if ($context == 'preconfirm') {
991
  $user_token = md5($user->token);
992
  } else {
993
  $user_token = $user->token;
994
  }
995
-
996
  if ($token != $user_token) {
997
  if ($die_on_fail) {
998
  die(__('No subscriber found.', 'newsletter'));
799
  return $email;
800
  }
801
 
802
+ /**
803
+ *
804
+ * @global wpdb $wpdb
805
+ * @param int|array $id
806
+ * @return boolean
807
+ */
808
  function delete_email($id) {
809
  global $wpdb;
810
  $r = $this->store->delete(NEWSLETTER_EMAILS_TABLE, $id);
811
  if ($r !== false) {
812
+ // $id could be an array if IDs
813
+ $id = (array) $id;
814
+ foreach ($id as $email_id) {
815
+ $wpdb->delete(NEWSLETTER_STATS_TABLE, array('email_id' => $email_id));
816
+ $wpdb->delete(NEWSLETTER_SENT_TABLE, array('email_id' => $email_id));
817
+ }
818
  }
819
  return $r;
820
  }
996
  return null;
997
  }
998
  }
999
+
1000
  if ($context == 'preconfirm') {
1001
  $user_token = md5($user->token);
1002
  } else {
1003
  $user_token = $user->token;
1004
  }
1005
+
1006
  if ($token != $user_token) {
1007
  if ($die_on_fail) {
1008
  die(__('No subscriber found.', 'newsletter'));
plugin.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin Name: Newsletter
5
  Plugin URI: https://www.thenewsletterplugin.com/plugins/newsletter
6
  Description: Newsletter is a cool plugin to create your own subscriber list, to send newsletters, to build your business. <strong>Before update give a look to <a href="https://www.thenewsletterplugin.com/category/release">this page</a> to know what's changed.</strong>
7
- Version: 5.9.2
8
  Author: Stefano Lissa & The Newsletter Team
9
  Author URI: https://www.thenewsletterplugin.com
10
  Disclaimer: Use at your own risk. No warranty expressed or implied is provided.
@@ -29,7 +29,7 @@
29
  */
30
 
31
  // Used as dummy parameter on css and js links
32
- define('NEWSLETTER_VERSION', '5.9.2');
33
 
34
  global $newsletter, $wpdb;
35
 
4
  Plugin Name: Newsletter
5
  Plugin URI: https://www.thenewsletterplugin.com/plugins/newsletter
6
  Description: Newsletter is a cool plugin to create your own subscriber list, to send newsletters, to build your business. <strong>Before update give a look to <a href="https://www.thenewsletterplugin.com/category/release">this page</a> to know what's changed.</strong>
7
+ Version: 5.9.3
8
  Author: Stefano Lissa & The Newsletter Team
9
  Author URI: https://www.thenewsletterplugin.com
10
  Disclaimer: Use at your own risk. No warranty expressed or implied is provided.
29
  */
30
 
31
  // Used as dummy parameter on css and js links
32
+ define('NEWSLETTER_VERSION', '5.9.3');
33
 
34
  global $newsletter, $wpdb;
35
 
readme.txt CHANGED
@@ -2,7 +2,7 @@
2
  Tags: newsletter,email,subscription,mass mail,list build,email marketing,direct mailing,automation,automated,mailing list
3
  Requires at least: 3.4.0
4
  Tested up to: 5.1.1
5
- Stable tag: 5.9.2
6
  Contributors: satollo,webagile,michael-travan
7
 
8
  Add a real newsletter system to your blog. For free. With unlimited newsletters and subscribers.
@@ -122,6 +122,12 @@ Thank you, The Newsletter Team
122
 
123
  == Changelog ==
124
 
 
 
 
 
 
 
125
  = 5.9.2 =
126
 
127
  * Fixed a debug notice on subscription page
2
  Tags: newsletter,email,subscription,mass mail,list build,email marketing,direct mailing,automation,automated,mailing list
3
  Requires at least: 3.4.0
4
  Tested up to: 5.1.1
5
+ Stable tag: 5.9.3
6
  Contributors: satollo,webagile,michael-travan
7
 
8
  Add a real newsletter system to your blog. For free. With unlimited newsletters and subscribers.
122
 
123
  == Changelog ==
124
 
125
+ = 5.9.3 =
126
+
127
+ * Fixed multi newsletter deletion warning
128
+ * Fixed privacy checkbox
129
+ * Fixed a link on header warning
130
+
131
  = 5.9.2 =
132
 
133
  * Fixed a debug notice on subscription page
subscription/subscription.php CHANGED
@@ -1098,6 +1098,8 @@ class NewsletterSubscription extends NewsletterModule {
1098
  }
1099
 
1100
  function _shortcode_label($name, $attrs, $suffix = null) {
 
 
1101
  if (!$suffix) {
1102
  $suffix = $name;
1103
  }
@@ -1109,7 +1111,7 @@ class NewsletterSubscription extends NewsletterModule {
1109
  $buffer .= esc_html($attrs['label']);
1110
  }
1111
  } else {
1112
- $buffer .= esc_html($this->options_profile[$name]);
1113
  }
1114
  $buffer .= "</label>\n";
1115
  return $buffer;
@@ -1280,13 +1282,13 @@ class NewsletterSubscription extends NewsletterModule {
1280
  }
1281
 
1282
  if (strpos($name, 'privacy') === 0) {
1283
-
1284
  if (!isset($attrs['url'])) {
1285
- $attrs['url'] = $this->options_profile['privacy_url'];
1286
  }
1287
 
1288
  if (!isset($attrs['label'])) {
1289
- $attrs['label'] = $this->options_profile['privacy_label'];
1290
  }
1291
 
1292
  $buffer .= '<div class="tnp-field tnp-field-checkbox tnp-field-privacy">';
1098
  }
1099
 
1100
  function _shortcode_label($name, $attrs, $suffix = null) {
1101
+ $options_profile = $this->get_options('profile', $this->get_current_language());
1102
+
1103
  if (!$suffix) {
1104
  $suffix = $name;
1105
  }
1111
  $buffer .= esc_html($attrs['label']);
1112
  }
1113
  } else {
1114
+ $buffer .= esc_html($options_profile[$name]);
1115
  }
1116
  $buffer .= "</label>\n";
1117
  return $buffer;
1282
  }
1283
 
1284
  if (strpos($name, 'privacy') === 0) {
1285
+ $options_profile = $this->get_options('profile', $this->get_current_language());
1286
  if (!isset($attrs['url'])) {
1287
+ $attrs['url'] = $this->get_privacy_url();
1288
  }
1289
 
1290
  if (!isset($attrs['label'])) {
1291
+ $attrs['label'] = $options_profile['privacy'];
1292
  }
1293
 
1294
  $buffer .= '<div class="tnp-field tnp-field-checkbox tnp-field-privacy">';
tnp-header.php CHANGED
@@ -209,7 +209,7 @@ $warning |= empty($status_options['mail']);
209
  <a href="<?php echo $_SERVER['REQUEST_URI'] . '&noheader=1&dismiss=newsletter-page' ?>" class="tnp-dismiss">&times;</a>
210
 
211
  You should create a blog page to show the subscription form and the subscription messages. Go to the
212
- <a href="?page=newsletter_subscription_options">subscription panel</a> to configure it.
213
 
214
  </div>
215
  <?php } ?>
209
  <a href="<?php echo $_SERVER['REQUEST_URI'] . '&noheader=1&dismiss=newsletter-page' ?>" class="tnp-dismiss">&times;</a>
210
 
211
  You should create a blog page to show the subscription form and the subscription messages. Go to the
212
+ <a href="?page=newsletter_main_main">general settings panel</a> to configure it.
213
 
214
  </div>
215
  <?php } ?>