Newsletter - Version 5.4.4

Version Description

  • Fixed warning on default option init
Download this release

Release Info

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

Code changes from version 5.4.3 to 5.4.4

Files changed (3) hide show
  1. includes/module.php +8 -5
  2. plugin.php +2 -2
  3. readme.txt +6 -2
includes/module.php CHANGED
@@ -230,7 +230,10 @@ class NewsletterModule {
230
  if (!empty($sub)) {
231
  $sub = '-' . $sub;
232
  }
233
- include NEWSLETTER_DIR . '/' . $this->module . '/defaults' . $sub . '.php';
 
 
 
234
 
235
  if (!isset($options) || !is_array($options)) {
236
  return array();
@@ -1171,11 +1174,11 @@ class NewsletterModule {
1171
  if (is_object($user)) {
1172
  $r = $wpdb->query($wpdb->prepare("update " . NEWSLETTER_USERS_TABLE . " set status=%s where id=%d limit 1", $status, $user->id));
1173
  } else {
1174
- $id_or_email = strtolower(trim($id_or_email));
1175
- if (is_numeric($id_or_email)) {
1176
- $r = $wpdb->query($wpdb->prepare("update " . NEWSLETTER_USERS_TABLE . " set status=%s where id=%d limit 1", $status, $id_or_email));
1177
  } else {
1178
- $r = $wpdb->query($wpdb->prepare("update " . NEWSLETTER_USERS_TABLE . " set status=%s where email=%s limit 1", $status, $id_or_email));
1179
  }
1180
  }
1181
 
230
  if (!empty($sub)) {
231
  $sub = '-' . $sub;
232
  }
233
+ $file = NEWSLETTER_DIR . '/' . $this->module . '/defaults' . $sub . '.php';
234
+ if (file_exists($file)) {
235
+ @include $file;
236
+ }
237
 
238
  if (!isset($options) || !is_array($options)) {
239
  return array();
1174
  if (is_object($user)) {
1175
  $r = $wpdb->query($wpdb->prepare("update " . NEWSLETTER_USERS_TABLE . " set status=%s where id=%d limit 1", $status, $user->id));
1176
  } else {
1177
+ $user = strtolower(trim($user));
1178
+ if (is_numeric($user)) {
1179
+ $r = $wpdb->query($wpdb->prepare("update " . NEWSLETTER_USERS_TABLE . " set status=%s where id=%d limit 1", $status, $user));
1180
  } else {
1181
+ $r = $wpdb->query($wpdb->prepare("update " . NEWSLETTER_USERS_TABLE . " set status=%s where email=%s limit 1", $status, $user));
1182
  }
1183
  }
1184
 
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.4.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.
@@ -14,7 +14,7 @@
14
  */
15
 
16
  // Used as dummy parameter on css and js links
17
- define('NEWSLETTER_VERSION', '5.4.3');
18
 
19
  global $wpdb, $newsletter;
20
 
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.4.4
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.
14
  */
15
 
16
  // Used as dummy parameter on css and js links
17
+ define('NEWSLETTER_VERSION', '5.4.4');
18
 
19
  global $wpdb, $newsletter;
20
 
readme.txt CHANGED
@@ -1,8 +1,8 @@
1
  === Newsletter ===
2
  Tags: newsletter,email,subscription,mass mail,list build,email marketing,direct mailing,automation,automated
3
  Requires at least: 3.4.0
4
- Tested up to: 4.9.5
5
- Stable tag: 5.4.3
6
  Contributors: satollo,webagile,michael-travan
7
 
8
  Add a real newsletter system to your blog. For free. With unlimited newsletters and subscribers.
@@ -90,6 +90,10 @@ Thank you, The Newsletter Team
90
 
91
  == Changelog ==
92
 
 
 
 
 
93
  = 5.4.3 =
94
 
95
  * Improved the profile editing page and the email change check with activation id in double opt-in mode
1
  === Newsletter ===
2
  Tags: newsletter,email,subscription,mass mail,list build,email marketing,direct mailing,automation,automated
3
  Requires at least: 3.4.0
4
+ Tested up to: 4.9.9
5
+ Stable tag: 5.4.4
6
  Contributors: satollo,webagile,michael-travan
7
 
8
  Add a real newsletter system to your blog. For free. With unlimited newsletters and subscribers.
90
 
91
  == Changelog ==
92
 
93
+ = 5.4.4 =
94
+
95
+ * Fixed warning on default option init
96
+
97
  = 5.4.3 =
98
 
99
  * Improved the profile editing page and the email change check with activation id in double opt-in mode