Newsletter - Version 5.0.3

Version Description

=

  • Added {email_url_encoded} tag
  • Changed https to http for compatibility with old servers

=

Download this release

Release Info

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

Code changes from version 5.0.2 to 5.0.3

includes/store.php CHANGED
@@ -87,7 +87,7 @@ class NewsletterStore {
87
 
88
  function sanitize($data) {
89
  global $wpdb;
90
- if ('utf8mb4' === $wpdb->charset) return $data;
91
  foreach ($data as $key => $value) {
92
  $data[$key] = preg_replace('%(?:\xF0[\x90-\xBF][\x80-\xBF]{2}|[\xF1-\xF3][\x80-\xBF]{3}|\xF4[\x80-\x8F][\x80-\xBF]{2})%xs', '', $value);
93
  }
87
 
88
  function sanitize($data) {
89
  global $wpdb;
90
+ if (strpos($wpdb->charset, 'utf8mb4') === 0) return $data;
91
  foreach ($data as $key => $value) {
92
  $data[$key] = preg_replace('%(?:\xF0[\x90-\xBF][\x80-\xBF]{2}|[\xF1-\xF3][\x80-\xBF]{3}|\xF4[\x80-\x8F][\x80-\xBF]{2})%xs', '', $value);
93
  }
main/extensions.php CHANGED
@@ -73,7 +73,7 @@ if (isset($_POST['email']) && check_admin_referer('subscribe')) {
73
  $body['nl'] = array('3', '4', '1');
74
  $body['optin'] = 'single';
75
 
76
- wp_remote_post('https://www.thenewsletterplugin.com/?na=ajaxsub', array('body'=>$body));
77
 
78
  update_option('newsletter_subscribed', time(), false);
79
 
73
  $body['nl'] = array('3', '4', '1');
74
  $body['optin'] = 'single';
75
 
76
+ wp_remote_post('http://www.thenewsletterplugin.com/?na=ajaxsub', array('body'=>$body));
77
 
78
  update_option('newsletter_subscribed', time(), false);
79
 
main/index.php CHANGED
@@ -66,7 +66,6 @@ $labels = array_reverse($labels);
66
 
67
  <div class="wrap" id="tnp-wrap">
68
 
69
- <?php $help_url = 'https://www.thenewsletterplugin.com/plugins/newsletter'; ?>
70
  <?php include NEWSLETTER_DIR . '/tnp-header.php'; ?>
71
 
72
  <div id="tnp-heading">
66
 
67
  <div class="wrap" id="tnp-wrap">
68
 
 
69
  <?php include NEWSLETTER_DIR . '/tnp-header.php'; ?>
70
 
71
  <div id="tnp-heading">
main/status.php CHANGED
@@ -635,10 +635,10 @@ $options = $module->get_options('status');
635
 
636
  <?php
637
  $res = true;
638
- $response = wp_remote_get('https://www.thenewsletterplugin.com/wp-content/versions/all.txt');
639
  if (is_wp_error($response)) {
640
  $res = false;
641
- $message = $reponse->get_error_message();
642
  } else {
643
  if (wp_remote_retrieve_response_code($response) != 200) {
644
  $res = false;
635
 
636
  <?php
637
  $res = true;
638
+ $response = wp_remote_get('http://www.thenewsletterplugin.com/wp-content/versions/all.txt');
639
  if (is_wp_error($response)) {
640
  $res = false;
641
+ $message = $response->get_error_message();
642
  } else {
643
  if (wp_remote_retrieve_response_code($response) != 200) {
644
  $res = false;
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.0.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.
@@ -14,7 +14,7 @@
14
  */
15
 
16
  // Used as dummy parameter on css and js links
17
- define('NEWSLETTER_VERSION', '5.0.2');
18
 
19
  global $wpdb, $newsletter;
20
 
@@ -1203,6 +1203,9 @@ class Newsletter extends NewsletterModule {
1203
  $text = str_replace($home . '%7B' . $tag_lower . '%7D', $url, $text);
1204
  $text = str_replace('{' . $tag_lower . '}', $url, $text);
1205
  $text = str_replace('%7B' . $tag_lower . '%7D', $url, $text);
 
 
 
1206
 
1207
  // for compatibility
1208
  $text = str_replace($home . $tag, $url, $text);
@@ -1332,7 +1335,7 @@ class Newsletter extends NewsletterModule {
1332
  if (!$force && !defined('NEWSLETTER_EXTENSION')) {
1333
  return;
1334
  }
1335
- $response = wp_remote_get('https://www.thenewsletterplugin.com/wp-content/versions/all.txt');
1336
  if (is_wp_error($response)) {
1337
  $this->logger->error($response);
1338
  return;
@@ -1431,7 +1434,7 @@ class Newsletter extends NewsletterModule {
1431
  $extensions_json = get_transient('tnp_extensions_json');
1432
 
1433
  if (false === $extensions_json) {
1434
- $url = "https://www.thenewsletterplugin.com/wp-content/extensions.json";
1435
  if (!empty($this->options['contract_key'])) {
1436
  $url = "http://www.thenewsletterplugin.com/wp-content/plugins/file-commerce-pro/extensions.php?k=" . $this->options['contract_key'];
1437
  }
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.0.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
  */
15
 
16
  // Used as dummy parameter on css and js links
17
+ define('NEWSLETTER_VERSION', '5.0.3');
18
 
19
  global $wpdb, $newsletter;
20
 
1203
  $text = str_replace($home . '%7B' . $tag_lower . '%7D', $url, $text);
1204
  $text = str_replace('{' . $tag_lower . '}', $url, $text);
1205
  $text = str_replace('%7B' . $tag_lower . '%7D', $url, $text);
1206
+
1207
+ $text = str_replace('%7B' . $tag_lower . '_encoded%7D', urlencode($url), $text);
1208
+ $text = str_replace('{' . $tag_lower . '_encoded}', urlencode($url), $text);
1209
 
1210
  // for compatibility
1211
  $text = str_replace($home . $tag, $url, $text);
1335
  if (!$force && !defined('NEWSLETTER_EXTENSION')) {
1336
  return;
1337
  }
1338
+ $response = wp_remote_get('http://www.thenewsletterplugin.com/wp-content/versions/all.txt');
1339
  if (is_wp_error($response)) {
1340
  $this->logger->error($response);
1341
  return;
1434
  $extensions_json = get_transient('tnp_extensions_json');
1435
 
1436
  if (false === $extensions_json) {
1437
+ $url = "http://www.thenewsletterplugin.com/wp-content/extensions.json";
1438
  if (!empty($this->options['contract_key'])) {
1439
  $url = "http://www.thenewsletterplugin.com/wp-content/plugins/file-commerce-pro/extensions.php?k=" . $this->options['contract_key'];
1440
  }
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.8
5
- Stable tag: 5.0.2
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,11 @@ Thank you, The Newsletter Team
85
 
86
  == Changelog ==
87
 
 
 
 
 
 
88
  == 5.0.2 ==
89
 
90
  * Fixed a notice on theme selection panel
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.8.1
5
+ Stable tag: 5.0.3
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.0.3 ==
89
+
90
+ * Added {email_url_encoded} tag
91
+ * Changed https to http for compatibility with old servers
92
+
93
  == 5.0.2 ==
94
 
95
  * Fixed a notice on theme selection panel
users/index.php CHANGED
@@ -117,7 +117,6 @@ $controls->data['search_page']++;
117
 
118
  <div class="wrap" id="tnp-wrap">
119
 
120
- <?php $help_url = 'https://www.thenewsletterplugin.com/plugins/newsletter/subscribers-module'; ?>
121
  <?php include NEWSLETTER_DIR . '/tnp-header.php'; ?>
122
 
123
  <div id="tnp-heading">
117
 
118
  <div class="wrap" id="tnp-wrap">
119
 
 
120
  <?php include NEWSLETTER_DIR . '/tnp-header.php'; ?>
121
 
122
  <div id="tnp-heading">