Version Description
=
- Fixed action URL for hand written forms in the subscription text
- Fixed rewrite not working with specific html formatting
- Change the composer text editor height
=
Download this release
Release Info
Developer | satollo |
Plugin | Newsletter |
Version | 4.9.9 |
Comparing to | |
See all releases |
Code changes from version 4.9.8 to 4.9.9
- admin.css +2 -0
- emails/cpreview.php +26 -11
- emails/edit.php +30 -15
- emails/tnp-composer/_scripts/newsletter-builder.js +1 -0
- emails/tnp-composer/blocks/content-01-hero.block.png +0 -0
- emails/tnp-composer/blocks/content-02-heading.block.png +0 -0
- emails/tnp-composer/blocks/content-03-text.block.png +0 -0
- emails/tnp-composer/blocks/content-04-cta.block.png +0 -0
- emails/tnp-composer/blocks/content-05-image.block.png +0 -0
- emails/tnp-composer/blocks/content-06-posts.block.png +0 -0
- emails/tnp-composer/blocks/content-07-twocols.block.png +0 -0
- emails/tnp-composer/blocks/footer-01-footer.block.png +0 -0
- emails/tnp-composer/blocks/footer-02-canspam.block.png +0 -0
- emails/tnp-composer/blocks/footer-03-social.block.png +0 -0
- emails/tnp-composer/blocks/header-01-header.block.png +0 -0
- plugin.php +2 -2
- readme.txt +8 -2
- statistics/statistics.php +1 -1
- subscription/subscription.php +1 -1
- tnp-footer.php +3 -1
- tnp-header.php +1 -1
- users/import.php +5 -1
admin.css
CHANGED
@@ -234,6 +234,8 @@
|
|
234 |
#tnp-body .button-primary.tnp-button-white, #tnp-body .tnp-button.tnp-button-white {
|
235 |
color: #444!important;
|
236 |
background-color: #fff!important;
|
|
|
|
|
237 |
}
|
238 |
|
239 |
/* Form tables correction */
|
234 |
#tnp-body .button-primary.tnp-button-white, #tnp-body .tnp-button.tnp-button-white {
|
235 |
color: #444!important;
|
236 |
background-color: #fff!important;
|
237 |
+
box-shadow: none !important;
|
238 |
+
-webkit-box-shadow: none !important;
|
239 |
}
|
240 |
|
241 |
/* Form tables correction */
|
emails/cpreview.php
CHANGED
@@ -9,7 +9,8 @@ $module = NewsletterEmails::instance();
|
|
9 |
// Always required
|
10 |
$email = Newsletter::instance()->get_email((int) $_GET['id'], ARRAY_A);
|
11 |
$email['options'] = maybe_unserialize($email['options']);
|
12 |
-
if (!is_array($email['options']))
|
|
|
13 |
|
14 |
// TNP Composer style
|
15 |
wp_enqueue_style('tnpc-style', plugins_url('/tnp-composer/_css/newsletter-builder.css', __FILE__));
|
@@ -34,9 +35,20 @@ if (!$controls->is_action()) {
|
|
34 |
$controls->data = array_merge($controls->data, $email['options']);
|
35 |
|
36 |
foreach ($email['options'] as $name => $value) {
|
37 |
-
|
38 |
-
}
|
39 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
|
41 |
if ($controls->is_action('test') || $controls->is_action('save') || $controls->is_action('send') || $controls->is_action('editor')) {
|
42 |
|
@@ -63,7 +75,7 @@ if ($controls->is_action('test') || $controls->is_action('save') || $controls->i
|
|
63 |
if (isset($controls->data['sex'])) {
|
64 |
$email['options']['sex'] = $controls->data['sex'];
|
65 |
} else {
|
66 |
-
$email['options']['sex'] = array();
|
67 |
}
|
68 |
|
69 |
foreach ($controls->data as $name => $value) {
|
@@ -139,11 +151,11 @@ if ($controls->is_action('test') || $controls->is_action('save') || $controls->i
|
|
139 |
}
|
140 |
|
141 |
$res = Newsletter::instance()->save_email($email);
|
142 |
-
|
143 |
$e = $module->get_email($email_id);
|
144 |
$e->options = maybe_unserialize($e->options);
|
145 |
$query = apply_filters('newsletter_emails_email_query', $query, $e);
|
146 |
-
|
147 |
$email['query'] = $query;
|
148 |
if ($email['status'] == 'sent') {
|
149 |
$email['total'] = $email['sent'];
|
@@ -327,9 +339,9 @@ if ($controls->is_action('test')) {
|
|
327 |
}, 500);
|
328 |
</script>
|
329 |
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
|
334 |
</div>
|
335 |
|
@@ -401,7 +413,7 @@ if ($controls->is_action('test')) {
|
|
401 |
<td>
|
402 |
<?php
|
403 |
if ($email['status'] != 'sent') {
|
404 |
-
|
405 |
} else {
|
406 |
echo $email['sent'];
|
407 |
}
|
@@ -412,7 +424,7 @@ if ($controls->is_action('test')) {
|
|
412 |
</td>
|
413 |
</tr>
|
414 |
</table>
|
415 |
-
|
416 |
<?php do_action('newsletter_emails_edit_target', $module->get_email($email_id), $controls) ?>
|
417 |
</div>
|
418 |
|
@@ -423,6 +435,9 @@ if ($controls->is_action('test')) {
|
|
423 |
<th><?php _e('Keep private', 'newsletter') ?></th>
|
424 |
<td>
|
425 |
<?php $controls->yesno('private'); ?>
|
|
|
|
|
|
|
426 |
<p class="description">
|
427 |
<?php _e('Hide/show from public sent newsletter list.', 'newsletter') ?>
|
428 |
<?php _e('Required', 'newsletter') ?>: <a href="" target="_blank">Newsletter Archive Extension</a>
|
9 |
// Always required
|
10 |
$email = Newsletter::instance()->get_email((int) $_GET['id'], ARRAY_A);
|
11 |
$email['options'] = maybe_unserialize($email['options']);
|
12 |
+
if (!is_array($email['options']))
|
13 |
+
$email['options'] = array();
|
14 |
|
15 |
// TNP Composer style
|
16 |
wp_enqueue_style('tnpc-style', plugins_url('/tnp-composer/_css/newsletter-builder.css', __FILE__));
|
35 |
$controls->data = array_merge($controls->data, $email['options']);
|
36 |
|
37 |
foreach ($email['options'] as $name => $value) {
|
38 |
+
$controls->data['options_' . $name] = $value;
|
|
|
39 |
}
|
40 |
+
}
|
41 |
+
|
42 |
+
if ($controls->is_action('change-private')) {
|
43 |
+
$data = array();
|
44 |
+
$data['private'] = $controls->data['private'] ? 0 : 1;
|
45 |
+
$data['id'] = $email['id'];
|
46 |
+
Newsletter::instance()->save_email($data);
|
47 |
+
$controls->add_message_saved();
|
48 |
+
$controls->data = $email;
|
49 |
+
$controls->data['private'] = $data['private'];
|
50 |
+
}
|
51 |
+
|
52 |
|
53 |
if ($controls->is_action('test') || $controls->is_action('save') || $controls->is_action('send') || $controls->is_action('editor')) {
|
54 |
|
75 |
if (isset($controls->data['sex'])) {
|
76 |
$email['options']['sex'] = $controls->data['sex'];
|
77 |
} else {
|
78 |
+
$email['options']['sex'] = array();
|
79 |
}
|
80 |
|
81 |
foreach ($controls->data as $name => $value) {
|
151 |
}
|
152 |
|
153 |
$res = Newsletter::instance()->save_email($email);
|
154 |
+
|
155 |
$e = $module->get_email($email_id);
|
156 |
$e->options = maybe_unserialize($e->options);
|
157 |
$query = apply_filters('newsletter_emails_email_query', $query, $e);
|
158 |
+
|
159 |
$email['query'] = $query;
|
160 |
if ($email['status'] == 'sent') {
|
161 |
$email['total'] = $email['sent'];
|
339 |
}, 500);
|
340 |
</script>
|
341 |
|
342 |
+
<?php } else { ?>
|
343 |
+
<?php include __DIR__ . '/edit-html.php'; ?>
|
344 |
+
<?php } ?>
|
345 |
|
346 |
</div>
|
347 |
|
413 |
<td>
|
414 |
<?php
|
415 |
if ($email['status'] != 'sent') {
|
416 |
+
echo $wpdb->get_var(str_replace('*', 'count(*)', $email['query']));
|
417 |
} else {
|
418 |
echo $email['sent'];
|
419 |
}
|
424 |
</td>
|
425 |
</tr>
|
426 |
</table>
|
427 |
+
|
428 |
<?php do_action('newsletter_emails_edit_target', $module->get_email($email_id), $controls) ?>
|
429 |
</div>
|
430 |
|
435 |
<th><?php _e('Keep private', 'newsletter') ?></th>
|
436 |
<td>
|
437 |
<?php $controls->yesno('private'); ?>
|
438 |
+
<?php if ($email['status'] == 'sent') { ?>
|
439 |
+
<?php $controls->button('change-private', __('Toggle'))?>
|
440 |
+
<?php } ?>
|
441 |
<p class="description">
|
442 |
<?php _e('Hide/show from public sent newsletter list.', 'newsletter') ?>
|
443 |
<?php _e('Required', 'newsletter') ?>: <a href="" target="_blank">Newsletter Archive Extension</a>
|
emails/edit.php
CHANGED
@@ -7,7 +7,8 @@ $module = NewsletterEmails::instance();
|
|
7 |
// Always required
|
8 |
$email = Newsletter::instance()->get_email((int) $_GET['id'], ARRAY_A);
|
9 |
$email['options'] = maybe_unserialize($email['options']);
|
10 |
-
if (!is_array($email['options']))
|
|
|
11 |
|
12 |
if (empty($email)) {
|
13 |
echo 'Wrong email identifier';
|
@@ -33,8 +34,19 @@ if (!$controls->is_action()) {
|
|
33 |
}
|
34 |
}
|
35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
if ($controls->is_action('test') || $controls->is_action('save') || $controls->is_action('send') || $controls->is_action('editor')) {
|
37 |
|
|
|
38 |
// If we were editing with visual editor (==0), we must read the extra <body> content
|
39 |
$controls->data['message'] = str_ireplace('<script', '<noscript', $controls->data['message']);
|
40 |
$controls->data['message'] = str_ireplace('</script', '</noscript', $controls->data['message']);
|
@@ -65,7 +77,7 @@ if ($controls->is_action('test') || $controls->is_action('save') || $controls->i
|
|
65 |
if (isset($controls->data['sex'])) {
|
66 |
$email['options']['sex'] = $controls->data['sex'];
|
67 |
} else {
|
68 |
-
$email['options']['sex'] = array();
|
69 |
}
|
70 |
|
71 |
foreach ($controls->data as $name => $value) {
|
@@ -138,9 +150,9 @@ if ($controls->is_action('test') || $controls->is_action('save') || $controls->i
|
|
138 |
$query .= ")";
|
139 |
}
|
140 |
}
|
141 |
-
|
142 |
$res = Newsletter::instance()->save_email($email);
|
143 |
-
|
144 |
$e = $module->get_email($email_id);
|
145 |
$e->options = maybe_unserialize($e->options);
|
146 |
$query = apply_filters('newsletter_emails_email_query', $query, $e);
|
@@ -271,8 +283,8 @@ if ($email['editor'] == 0) {
|
|
271 |
|
272 |
</script>
|
273 |
<?php } ?>
|
274 |
-
|
275 |
-
|
276 |
#options-subject {
|
277 |
font-size: 20px;
|
278 |
display: inline-block;
|
@@ -351,7 +363,7 @@ if ($email['editor'] == 0) {
|
|
351 |
<?php if ($email['status'] == 'paused') $controls->button_confirm('abort', __('Stop', 'newsletter'), __('This totally stop the delivery, ok?', 'newsletter')); ?>
|
352 |
<?php if ($email['status'] != 'sending' && $email['status'] != 'sent') $controls->button_confirm('editor', 'Save and switch to ' . ($email['editor'] == 0 ? 'HTML source' : 'visual') . ' editor', 'Sure?'); ?>
|
353 |
</div>
|
354 |
-
|
355 |
<?php $controls->text('subject', 70, 'Subject'); ?>
|
356 |
|
357 |
<div id="tabs">
|
@@ -366,18 +378,18 @@ if ($email['editor'] == 0) {
|
|
366 |
|
367 |
<div id="tabs-a">
|
368 |
|
369 |
-
|
370 |
|
371 |
|
372 |
-
|
|
|
373 |
<?php if ($email['editor'] == 0) { ?>
|
374 |
-
|
|
|
|
|
|
|
375 |
|
376 |
-
<a href="https://www.thenewsletterplugin.com/plugins/newsletter/newsletter-tags" target="_blank"><?php _e('Available tags', 'newsletter') ?></a>
|
377 |
-
<br><br>
|
378 |
-
|
379 |
<?php $controls->editor('message', 30); ?>
|
380 |
-
|
381 |
<?php } else { ?>
|
382 |
<?php include __DIR__ . '/edit-html.php'; ?>
|
383 |
<?php } ?>
|
@@ -467,7 +479,7 @@ if ($email['editor'] == 0) {
|
|
467 |
</td>
|
468 |
</tr>
|
469 |
</table>
|
470 |
-
|
471 |
<?php do_action('newsletter_emails_edit_target', $module->get_email($email_id), $controls) ?>
|
472 |
</div>
|
473 |
|
@@ -478,6 +490,9 @@ if ($email['editor'] == 0) {
|
|
478 |
<th><?php _e('Keep private', 'newsletter') ?></th>
|
479 |
<td>
|
480 |
<?php $controls->yesno('private'); ?>
|
|
|
|
|
|
|
481 |
<p class="description">
|
482 |
<?php _e('Hide/show from public sent newsletter list.', 'newsletter') ?>
|
483 |
<?php _e('Required', 'newsletter') ?>: <a href="" target="_blank">Newsletter Archive Extension</a>
|
7 |
// Always required
|
8 |
$email = Newsletter::instance()->get_email((int) $_GET['id'], ARRAY_A);
|
9 |
$email['options'] = maybe_unserialize($email['options']);
|
10 |
+
if (!is_array($email['options']))
|
11 |
+
$email['options'] = array();
|
12 |
|
13 |
if (empty($email)) {
|
14 |
echo 'Wrong email identifier';
|
34 |
}
|
35 |
}
|
36 |
|
37 |
+
if ($controls->is_action('change-private')) {
|
38 |
+
$data = array();
|
39 |
+
$data['private'] = $controls->data['private'] ? 0 : 1;
|
40 |
+
$data['id'] = $email['id'];
|
41 |
+
Newsletter::instance()->save_email($data);
|
42 |
+
$controls->add_message_saved();
|
43 |
+
$controls->data = $email;
|
44 |
+
$controls->data['private'] = $data['private'];
|
45 |
+
}
|
46 |
+
|
47 |
if ($controls->is_action('test') || $controls->is_action('save') || $controls->is_action('send') || $controls->is_action('editor')) {
|
48 |
|
49 |
+
|
50 |
// If we were editing with visual editor (==0), we must read the extra <body> content
|
51 |
$controls->data['message'] = str_ireplace('<script', '<noscript', $controls->data['message']);
|
52 |
$controls->data['message'] = str_ireplace('</script', '</noscript', $controls->data['message']);
|
77 |
if (isset($controls->data['sex'])) {
|
78 |
$email['options']['sex'] = $controls->data['sex'];
|
79 |
} else {
|
80 |
+
$email['options']['sex'] = array();
|
81 |
}
|
82 |
|
83 |
foreach ($controls->data as $name => $value) {
|
150 |
$query .= ")";
|
151 |
}
|
152 |
}
|
153 |
+
|
154 |
$res = Newsletter::instance()->save_email($email);
|
155 |
+
|
156 |
$e = $module->get_email($email_id);
|
157 |
$e->options = maybe_unserialize($e->options);
|
158 |
$query = apply_filters('newsletter_emails_email_query', $query, $e);
|
283 |
|
284 |
</script>
|
285 |
<?php } ?>
|
286 |
+
|
287 |
+
<style>
|
288 |
#options-subject {
|
289 |
font-size: 20px;
|
290 |
display: inline-block;
|
363 |
<?php if ($email['status'] == 'paused') $controls->button_confirm('abort', __('Stop', 'newsletter'), __('This totally stop the delivery, ok?', 'newsletter')); ?>
|
364 |
<?php if ($email['status'] != 'sending' && $email['status'] != 'sent') $controls->button_confirm('editor', 'Save and switch to ' . ($email['editor'] == 0 ? 'HTML source' : 'visual') . ' editor', 'Sure?'); ?>
|
365 |
</div>
|
366 |
+
|
367 |
<?php $controls->text('subject', 70, 'Subject'); ?>
|
368 |
|
369 |
<div id="tabs">
|
378 |
|
379 |
<div id="tabs-a">
|
380 |
|
|
|
381 |
|
382 |
|
383 |
+
|
384 |
+
|
385 |
<?php if ($email['editor'] == 0) { ?>
|
386 |
+
<input type="button" class="button-primary" value="Add media" onclick="tnp_media()">
|
387 |
+
|
388 |
+
<a href="https://www.thenewsletterplugin.com/plugins/newsletter/newsletter-tags" target="_blank"><?php _e('Available tags', 'newsletter') ?></a>
|
389 |
+
<br><br>
|
390 |
|
|
|
|
|
|
|
391 |
<?php $controls->editor('message', 30); ?>
|
392 |
+
|
393 |
<?php } else { ?>
|
394 |
<?php include __DIR__ . '/edit-html.php'; ?>
|
395 |
<?php } ?>
|
479 |
</td>
|
480 |
</tr>
|
481 |
</table>
|
482 |
+
|
483 |
<?php do_action('newsletter_emails_edit_target', $module->get_email($email_id), $controls) ?>
|
484 |
</div>
|
485 |
|
490 |
<th><?php _e('Keep private', 'newsletter') ?></th>
|
491 |
<td>
|
492 |
<?php $controls->yesno('private'); ?>
|
493 |
+
<?php if ($email['status'] == 'sent') { ?>
|
494 |
+
<?php $controls->button('change-private', __('Toggle'))?>
|
495 |
+
<?php } ?>
|
496 |
<p class="description">
|
497 |
<?php _e('Hide/show from public sent newsletter list.', 'newsletter') ?>
|
498 |
<?php _e('Required', 'newsletter') ?>: <a href="" target="_blank">Newsletter Archive Extension</a>
|
emails/tnp-composer/_scripts/newsletter-builder.js
CHANGED
@@ -240,6 +240,7 @@ jQuery(function () {
|
|
240 |
menubar: false,
|
241 |
relative_urls: false,
|
242 |
remove_script_host: false,
|
|
|
243 |
toolbar: [
|
244 |
'fontselect fontsizeselect forecolor | bold italic underline | link | bullist numlist | emoticons | alignleft aligncenter alignright alignjustify tnp'
|
245 |
],
|
240 |
menubar: false,
|
241 |
relative_urls: false,
|
242 |
remove_script_host: false,
|
243 |
+
height: 500,
|
244 |
toolbar: [
|
245 |
'fontselect fontsizeselect forecolor | bold italic underline | link | bullist numlist | emoticons | alignleft aligncenter alignright alignjustify tnp'
|
246 |
],
|
emails/tnp-composer/blocks/content-01-hero.block.png
CHANGED
File without changes
|
emails/tnp-composer/blocks/content-02-heading.block.png
CHANGED
File without changes
|
emails/tnp-composer/blocks/content-03-text.block.png
CHANGED
File without changes
|
emails/tnp-composer/blocks/content-04-cta.block.png
CHANGED
File without changes
|
emails/tnp-composer/blocks/content-05-image.block.png
CHANGED
File without changes
|
emails/tnp-composer/blocks/content-06-posts.block.png
CHANGED
File without changes
|
emails/tnp-composer/blocks/content-07-twocols.block.png
CHANGED
File without changes
|
emails/tnp-composer/blocks/footer-01-footer.block.png
CHANGED
File without changes
|
emails/tnp-composer/blocks/footer-02-canspam.block.png
CHANGED
File without changes
|
emails/tnp-composer/blocks/footer-03-social.block.png
CHANGED
File without changes
|
emails/tnp-composer/blocks/header-01-header.block.png
CHANGED
File without changes
|
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: 4.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', '4.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: 4.9.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 |
*/
|
15 |
|
16 |
// Used as dummy parameter on css and js links
|
17 |
+
define('NEWSLETTER_VERSION', '4.9.9');
|
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.
|
5 |
-
Stable tag: 4.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,12 @@ Thank you, The Newsletter Team
|
|
85 |
|
86 |
== Changelog ==
|
87 |
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
== 4.9.8 ==
|
89 |
|
90 |
* Fixed the antibot option
|
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.0
|
5 |
+
Stable tag: 4.9.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 |
|
86 |
== Changelog ==
|
87 |
|
88 |
+
== 4.9.9 ==
|
89 |
+
|
90 |
+
* Fixed action URL for hand written forms in the subscription text
|
91 |
+
* Fixed rewrite not working with specific html formatting
|
92 |
+
* Change the composer text editor height
|
93 |
+
|
94 |
== 4.9.8 ==
|
95 |
|
96 |
* Fixed the antibot option
|
statistics/statistics.php
CHANGED
@@ -216,7 +216,7 @@ class NewsletterStatistics extends NewsletterModule {
|
|
216 |
$this->relink_email_token = $email_token;
|
217 |
|
218 |
$this->logger->debug('Relink with token: ' . $email_token);
|
219 |
-
$text = preg_replace_callback('/(<[aA][^>]+href
|
220 |
|
221 |
$signature = md5($email_id . $user_id . $email_token);
|
222 |
$text = str_replace('</body>', '<img width="1" height="1" alt="" src="' . home_url('/') . '?noti=' . urlencode(base64_encode($email_id . ';' . $user_id . ';' . $signature)) . '"/></body>', $text);
|
216 |
$this->relink_email_token = $email_token;
|
217 |
|
218 |
$this->logger->debug('Relink with token: ' . $email_token);
|
219 |
+
$text = preg_replace_callback('/(<[aA][^>]+href[\s]*=[\s]*["\'])([^>"\']+)(["\'][^>]*>)(.*?)(<\/[Aa]>)/s', array($this, 'relink_callback'), $text);
|
220 |
|
221 |
$signature = md5($email_id . $user_id . $email_token);
|
222 |
$text = str_replace('</body>', '<img width="1" height="1" alt="" src="' . home_url('/') . '?noti=' . urlencode(base64_encode($email_id . ';' . $user_id . ';' . $signature)) . '"/></body>', $text);
|
subscription/subscription.php
CHANGED
@@ -1849,7 +1849,7 @@ class NewsletterSubscription extends NewsletterModule {
|
|
1849 |
// Compatibility check
|
1850 |
if (stripos($message, '<form') !== false) {
|
1851 |
$message .= $module->get_form_javascript();
|
1852 |
-
$message = str_ireplace('<form', '<form method="post" action="' .
|
1853 |
} else {
|
1854 |
|
1855 |
if (strpos($message, '{subscription_form') === false) {
|
1849 |
// Compatibility check
|
1850 |
if (stripos($message, '<form') !== false) {
|
1851 |
$message .= $module->get_form_javascript();
|
1852 |
+
$message = str_ireplace('<form', '<form method="post" action="' . esc_attr(home_url('/')) . '?na=s" onsubmit="return newsletter_check(this)"', $message);
|
1853 |
} else {
|
1854 |
|
1855 |
if (strpos($message, '{subscription_form') === false) {
|
tnp-footer.php
CHANGED
@@ -17,7 +17,9 @@ if (!defined('ABSPATH')) exit;
|
|
17 |
<div>
|
18 |
<form target="_blank" action="https://www.thenewsletterplugin.com/?na=s" method="post">
|
19 |
<input type="email" name="ne" placeholder="Your email" required size="20" value="<?php echo esc_attr($current_user->user_email) ?>">
|
20 |
-
<input type="hidden"
|
|
|
|
|
21 |
<input type="submit" value="<?php _e('Stay updated', 'newsletter') ?>">
|
22 |
</form>
|
23 |
</div>
|
17 |
<div>
|
18 |
<form target="_blank" action="https://www.thenewsletterplugin.com/?na=s" method="post">
|
19 |
<input type="email" name="ne" placeholder="Your email" required size="20" value="<?php echo esc_attr($current_user->user_email) ?>">
|
20 |
+
<input type="hidden" value="plugin-footer" name="nr">
|
21 |
+
<input type="hidden" value="3" name="nl[]">
|
22 |
+
<input type="hidden" value="single" name="optin">
|
23 |
<input type="submit" value="<?php _e('Stay updated', 'newsletter') ?>">
|
24 |
</form>
|
25 |
</div>
|
tnp-header.php
CHANGED
@@ -171,7 +171,7 @@ if (isset($_GET['debug']) || !isset($dismissed['newsletter-lock']) && !file_exis
|
|
171 |
<a href="<?php echo $_SERVER['REQUEST_URI'] . '&noheader=1&dismiss=newsletter-subscribe' ?>" class="tnp-dismiss">×</a>
|
172 |
If you want to be informed of important updates of Newsletter, you may want to subscribe to our newsletter<br>
|
173 |
<form action="https://www.thenewsletterplugin.com/?na=s" target="_blank" method="post">
|
174 |
-
<input type="hidden" value="plugin" name="nr">
|
175 |
<input type="hidden" value="3" name="nl[]">
|
176 |
<input type="hidden" value="single" name="optin">
|
177 |
<input type="email" name="ne" value="<?php echo esc_attr(get_option('admin_email')) ?>">
|
171 |
<a href="<?php echo $_SERVER['REQUEST_URI'] . '&noheader=1&dismiss=newsletter-subscribe' ?>" class="tnp-dismiss">×</a>
|
172 |
If you want to be informed of important updates of Newsletter, you may want to subscribe to our newsletter<br>
|
173 |
<form action="https://www.thenewsletterplugin.com/?na=s" target="_blank" method="post">
|
174 |
+
<input type="hidden" value="plugin-header" name="nr">
|
175 |
<input type="hidden" value="3" name="nl[]">
|
176 |
<input type="hidden" value="single" name="optin">
|
177 |
<input type="email" name="ne" value="<?php echo esc_attr(get_option('admin_email')) ?>">
|
users/import.php
CHANGED
@@ -53,6 +53,10 @@ if ($controls->is_action('import')) {
|
|
53 |
|
54 |
// Builds a subscriber data structure
|
55 |
$email = $newsletter->normalize_email($data[0]);
|
|
|
|
|
|
|
|
|
56 |
if (!$newsletter->is_email($email)) {
|
57 |
$results .= '[INVALID EMAIL] ' . $line . "\n";
|
58 |
$error_count++;
|
@@ -152,7 +156,7 @@ if ($controls->is_action('import')) {
|
|
152 |
|
153 |
<h3>Results</h3>
|
154 |
|
155 |
-
<textarea wrap="off" style="width: 100%; height: 150px; font-size: 11px; font-family: monospace"><?php echo
|
156 |
|
157 |
<?php } ?>
|
158 |
|
53 |
|
54 |
// Builds a subscriber data structure
|
55 |
$email = $newsletter->normalize_email($data[0]);
|
56 |
+
if (empty($email)) {
|
57 |
+
continue;
|
58 |
+
}
|
59 |
+
|
60 |
if (!$newsletter->is_email($email)) {
|
61 |
$results .= '[INVALID EMAIL] ' . $line . "\n";
|
62 |
$error_count++;
|
156 |
|
157 |
<h3>Results</h3>
|
158 |
|
159 |
+
<textarea wrap="off" style="width: 100%; height: 150px; font-size: 11px; font-family: monospace"><?php echo esc_html($results) ?></textarea>
|
160 |
|
161 |
<?php } ?>
|
162 |
|