Newsletter - Version 5.2.0

Version Description

=

  • Fixed email_url tag (broken to fix Automated in previous version)

=

Download this release

Release Info

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

Code changes from version 5.1.9 to 5.2.0

Files changed (4) hide show
  1. includes/module.php +7 -7
  2. main/status.php +1 -1
  3. plugin.php +2 -2
  4. readme.txt +6 -2
includes/module.php CHANGED
@@ -814,6 +814,7 @@ class NewsletterModule {
814
  function get_list($id) {
815
  global $wpdb;
816
  $id = (int) $id;
 
817
  $list = get_option('newsletter_list_' . $id, array());
818
  $profile = get_option('newsletter_profile');
819
  $list['name'] = $profile['list_' . $id];
@@ -1031,36 +1032,35 @@ class NewsletterModule {
1031
 
1032
  $options_subscription = NewsletterSubscription::instance()->options;
1033
 
 
 
1034
  if ($email) {
1035
  $text = str_replace('{email_id}', $email->id, $text);
1036
  $text = str_replace('{email_subject}', $email->subject, $text);
 
1037
  }
1038
 
1039
- $home_url = home_url('/');
1040
- //$text = $this->replace_url($text, 'SUBSCRIPTION_CONFIRM_URL', self::add_qs(plugins_url('do.php', __FILE__), 'a=c' . $id_token));
1041
 
1042
  $text = $this->replace_url($text, 'SUBSCRIPTION_CONFIRM_URL', $home_url . '?na=c&nk=' . $nk);
1043
  $text = $this->replace_url($text, 'ACTIVATION_URL', $home_url . '?na=c&nk=' . $nk);
1044
 
1045
  $text = $this->replace_url($text, 'UNSUBSCRIPTION_CONFIRM_URL', $home_url . '?na=uc&nk=' . $nk . ($email ? '&nek=' . $email->id : ''));
1046
- //$text = $this->replace_url($text, 'UNSUBSCRIPTION_CONFIRM_URL', NEWSLETTER_URL . '/do/unsubscribe.php?nk=' . $nk);
1047
  $text = $this->replace_url($text, 'UNSUBSCRIPTION_URL', $home_url . '?na=u&nk=' . $nk . ($email ? '&nek=' . $email->id : ''));
1048
- // $text = $this->replace_url($text, 'CHANGE_URL', plugins_url('newsletter/do/change.php'));
1049
  // Obsolete.
1050
  $text = $this->replace_url($text, 'FOLLOWUP_SUBSCRIPTION_URL', self::add_qs($base, 'nm=fs' . $id_token));
1051
  $text = $this->replace_url($text, 'FOLLOWUP_UNSUBSCRIPTION_URL', self::add_qs($base, 'nm=fu' . $id_token));
1052
  $text = $this->replace_url($text, 'FEED_SUBSCRIPTION_URL', self::add_qs($base, 'nm=es' . $id_token));
1053
  $text = $this->replace_url($text, 'FEED_UNSUBSCRIPTION_URL', self::add_qs($base, 'nm=eu' . $id_token));
1054
 
1055
-
1056
  if (empty($options_profile['profile_url']))
1057
  $text = $this->replace_url($text, 'PROFILE_URL', $home_url . '?na=p&nk=' . $nk);
1058
  else
1059
  $text = $this->replace_url($text, 'PROFILE_URL', self::add_qs($options_profile['profile_url'], 'ni=' . $user->id . '&nt=' . $user->token));
1060
 
1061
  $text = $this->replace_url($text, 'UNLOCK_URL', $home_url . '?na=ul&nk=' . $nk);
1062
- if (!empty($email_id)) {
1063
- $text = $this->replace_url($text, 'EMAIL_URL', $home_url . '?na=v&id=' . $email_id . '&nk=' . $nk);
1064
  }
1065
  } else {
1066
  $text = $this->replace_url($text, 'SUBSCRIPTION_CONFIRM_URL', '#');
814
  function get_list($id) {
815
  global $wpdb;
816
  $id = (int) $id;
817
+ if (!$id) return null;
818
  $list = get_option('newsletter_list_' . $id, array());
819
  $profile = get_option('newsletter_profile');
820
  $list['name'] = $profile['list_' . $id];
1032
 
1033
  $options_subscription = NewsletterSubscription::instance()->options;
1034
 
1035
+ $home_url = home_url('/');
1036
+
1037
  if ($email) {
1038
  $text = str_replace('{email_id}', $email->id, $text);
1039
  $text = str_replace('{email_subject}', $email->subject, $text);
1040
+ $text = $this->replace_url($text, 'EMAIL_URL', $home_url . '?na=v&id=' . $email->id . '&nk=' . $nk);
1041
  }
1042
 
 
 
1043
 
1044
  $text = $this->replace_url($text, 'SUBSCRIPTION_CONFIRM_URL', $home_url . '?na=c&nk=' . $nk);
1045
  $text = $this->replace_url($text, 'ACTIVATION_URL', $home_url . '?na=c&nk=' . $nk);
1046
 
1047
  $text = $this->replace_url($text, 'UNSUBSCRIPTION_CONFIRM_URL', $home_url . '?na=uc&nk=' . $nk . ($email ? '&nek=' . $email->id : ''));
 
1048
  $text = $this->replace_url($text, 'UNSUBSCRIPTION_URL', $home_url . '?na=u&nk=' . $nk . ($email ? '&nek=' . $email->id : ''));
1049
+
1050
  // Obsolete.
1051
  $text = $this->replace_url($text, 'FOLLOWUP_SUBSCRIPTION_URL', self::add_qs($base, 'nm=fs' . $id_token));
1052
  $text = $this->replace_url($text, 'FOLLOWUP_UNSUBSCRIPTION_URL', self::add_qs($base, 'nm=fu' . $id_token));
1053
  $text = $this->replace_url($text, 'FEED_SUBSCRIPTION_URL', self::add_qs($base, 'nm=es' . $id_token));
1054
  $text = $this->replace_url($text, 'FEED_UNSUBSCRIPTION_URL', self::add_qs($base, 'nm=eu' . $id_token));
1055
 
 
1056
  if (empty($options_profile['profile_url']))
1057
  $text = $this->replace_url($text, 'PROFILE_URL', $home_url . '?na=p&nk=' . $nk);
1058
  else
1059
  $text = $this->replace_url($text, 'PROFILE_URL', self::add_qs($options_profile['profile_url'], 'ni=' . $user->id . '&nt=' . $user->token));
1060
 
1061
  $text = $this->replace_url($text, 'UNLOCK_URL', $home_url . '?na=ul&nk=' . $nk);
1062
+ if ($email) {
1063
+
1064
  }
1065
  } else {
1066
  $text = $this->replace_url($text, 'SUBSCRIPTION_CONFIRM_URL', '#');
main/status.php CHANGED
@@ -585,7 +585,7 @@ $options = $module->get_options('status');
585
  </td>
586
  <td>
587
  <?php if ($wp_cron_calls_avg > NEWSLETTER_CRON_INTERVAL * 1.1) { ?>
588
- The blog cron system is NOT triggere enough often.
589
 
590
  <?php } else { ?>
591
 
585
  </td>
586
  <td>
587
  <?php if ($wp_cron_calls_avg > NEWSLETTER_CRON_INTERVAL * 1.1) { ?>
588
+ The blog cron system is NOT triggered enough often.
589
 
590
  <?php } else { ?>
591
 
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.1.9
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.1.9');
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.2.0
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.2.0');
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.1
5
- Stable tag: 5.1.9
6
  Contributors: satollo,webagile,michael-travan
7
 
8
  Add a real newsletter system to your blog. For free. With unlimited newsletters and subscribers.
@@ -85,6 +85,10 @@ Thank you, The Newsletter Team
85
 
86
  == Changelog ==
87
 
 
 
 
 
88
  == 5.1.9 ==
89
 
90
  * Fixed debug notice on test email from Automated Extension
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.2
5
+ Stable tag: 5.2.0
6
  Contributors: satollo,webagile,michael-travan
7
 
8
  Add a real newsletter system to your blog. For free. With unlimited newsletters and subscribers.
85
 
86
  == Changelog ==
87
 
88
+ == 5.2.0 ==
89
+
90
+ * Fixed email_url tag (broken to fix Automated in previous version)
91
+
92
  == 5.1.9 ==
93
 
94
  * Fixed debug notice on test email from Automated Extension