Newsletter - Version 6.4.8

Version Description

  • Antispam on PHP API
Download this release

Release Info

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

Code changes from version 6.4.7 to 6.4.8

Files changed (4) hide show
  1. includes/TNP.php +18 -0
  2. includes/logger.php +2 -2
  3. plugin.php +2 -2
  4. readme.txt +5 -1
includes/TNP.php CHANGED
@@ -21,6 +21,9 @@ class TNP {
21
  */
22
 
23
  public static function subscribe($params) {
 
 
 
24
 
25
  $newsletter = Newsletter::instance();
26
  $subscription = NewsletterSubscription::instance();
@@ -122,6 +125,21 @@ class TNP {
122
  }
123
 
124
  apply_filters('newsletter_api_subscribe', $params);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
125
 
126
  $user = TNP::add_subscriber($params);
127
 
21
  */
22
 
23
  public static function subscribe($params) {
24
+
25
+ $logger = new NewsletterLogger('phpapi');
26
+ $logger->debug($params);
27
 
28
  $newsletter = Newsletter::instance();
29
  $subscription = NewsletterSubscription::instance();
125
  }
126
 
127
  apply_filters('newsletter_api_subscribe', $params);
128
+
129
+ $full_name = '';
130
+ if (isset($params['name'])) {
131
+ $params['name'] = $newsletter->normalize_name($params['name']);
132
+ $full_name .= $params['name'];
133
+ }
134
+
135
+ if (isset($params['surname'])) {
136
+ $params['surname'] = $newsletter->normalize_name($params['surname']);
137
+ $full_name .= ' ' . $params['surname'];
138
+ }
139
+
140
+ $ip = $newsletter->get_remote_ip();
141
+
142
+ NewsletterSubscription::instance()->valid_subscription_or_die($email, $full_name, $ip);
143
 
144
  $user = TNP::add_subscriber($params);
145
 
includes/logger.php CHANGED
@@ -70,9 +70,9 @@ class NewsletterLogger {
70
  }
71
 
72
  // The "logs" dir is created on Newsletter constructor.
73
- $res = @file_put_contents($this->file, $time . ' - m: ' . size_format(memory_get_usage(), 1) . ', u: ' . $user_id . ' - ' . $text . "\n", FILE_APPEND | FILE_TEXT);
74
  if ($res === false) {
75
- $this->level = self::NONE;
76
  }
77
  }
78
 
70
  }
71
 
72
  // The "logs" dir is created on Newsletter constructor.
73
+ $res = @file_put_contents($this->file, $time . ' - v: ' . NEWSLETTER_VERSION . ' - m: ' . size_format(memory_get_usage(), 1) . ', u: ' . $user_id . ' - ' . $text . "\n", FILE_APPEND | FILE_TEXT);
74
  if ($res === false) {
75
+ //$this->level = self::NONE;
76
  }
77
  }
78
 
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: 6.4.7
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.
@@ -28,7 +28,7 @@
28
 
29
  */
30
 
31
- define('NEWSLETTER_VERSION', '6.4.7');
32
 
33
  global $newsletter, $wpdb;
34
 
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: 6.4.8
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.
28
 
29
  */
30
 
31
+ define('NEWSLETTER_VERSION', '6.4.8');
32
 
33
  global $newsletter, $wpdb;
34
 
readme.txt CHANGED
@@ -2,7 +2,7 @@
2
  Tags: email, email marketing, newsletter, newsletter subscribers, welcome email, signup forms, contact, lead generation, popup, marketing automation
3
  Requires at least: 3.4.0
4
  Tested up to: 5.3.2
5
- Stable tag: 6.4.7
6
  Requires PHP: 5.6
7
  Contributors: satollo,webagile,michael-travan
8
 
@@ -109,6 +109,10 @@ Thank you, The Newsletter Team
109
 
110
  == Changelog ==
111
 
 
 
 
 
112
  = 6.4.7 =
113
 
114
  * Default theme thumbnail fix
2
  Tags: email, email marketing, newsletter, newsletter subscribers, welcome email, signup forms, contact, lead generation, popup, marketing automation
3
  Requires at least: 3.4.0
4
  Tested up to: 5.3.2
5
+ Stable tag: 6.4.8
6
  Requires PHP: 5.6
7
  Contributors: satollo,webagile,michael-travan
8
 
109
 
110
  == Changelog ==
111
 
112
+ = 6.4.8 =
113
+
114
+ * Antispam on PHP API
115
+
116
  = 6.4.7 =
117
 
118
  * Default theme thumbnail fix