Version Description
- Fixed composer block background editing
- Fixed API functions
- Minor fixes
Download this release
Release Info
Developer | webagile |
Plugin | Newsletter |
Version | 5.3.6 |
Comparing to | |
See all releases |
Code changes from version 5.3.5 to 5.3.6
- emails/emails.php +2 -2
- emails/tnp-composer/blocks/content-02-heading.block.php +1 -1
- emails/tnp-composer/blocks/content-03-text.block.php +1 -2
- emails/tnp-composer/blocks/footer-01-footer.block.php +1 -1
- emails/tnp-composer/blocks/header-01-header.block.php +2 -1
- includes/TNP.php +13 -16
- plugin.php +2 -2
- readme.txt +7 -1
- statistics/statistics.php +1 -1
emails/emails.php
CHANGED
@@ -119,12 +119,12 @@ class NewsletterEmails extends NewsletterModule {
|
|
119 |
|
120 |
echo '<table border="0" cellpadding="0" cellspacing="0" align="center" width="100%" style="border-collapse: collapse; width: 100%;" class="tnpc-row" data-id="', esc_attr($block_id), "\">\n";
|
121 |
echo "<tr>\n";
|
122 |
-
echo '<td align="center" style="padding: 0;"
|
123 |
echo '<!--[if mso]><table border="0" cellpadding="0" align="center" cellspacing="0" width="' . $width . '"><tr><td width="' . $width . '"><![endif]-->', "\n";
|
124 |
|
125 |
echo '<table border="0" cellpadding="0" align="center" cellspacing="0" width="100%" style="width: 100%!important; max-width: ', $width, 'px!important">', "\n";
|
126 |
echo "<tr>\n";
|
127 |
-
echo '<td align="center" style="', $style, 'text-align: center;" bgcolor="', $options['block_background'], '" width="100%">', "\n";
|
128 |
|
129 |
echo $content;
|
130 |
|
119 |
|
120 |
echo '<table border="0" cellpadding="0" cellspacing="0" align="center" width="100%" style="border-collapse: collapse; width: 100%;" class="tnpc-row" data-id="', esc_attr($block_id), "\">\n";
|
121 |
echo "<tr>\n";
|
122 |
+
echo '<td align="center" style="padding: 0;">', "\n";
|
123 |
echo '<!--[if mso]><table border="0" cellpadding="0" align="center" cellspacing="0" width="' . $width . '"><tr><td width="' . $width . '"><![endif]-->', "\n";
|
124 |
|
125 |
echo '<table border="0" cellpadding="0" align="center" cellspacing="0" width="100%" style="width: 100%!important; max-width: ', $width, 'px!important">', "\n";
|
126 |
echo "<tr>\n";
|
127 |
+
echo '<td class="edit-block" align="center" style="', $style, 'text-align: center;" bgcolor="', $options['block_background'], '" width="100%">', "\n";
|
128 |
|
129 |
echo $content;
|
130 |
|
emails/tnp-composer/blocks/content-02-heading.block.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
|
2 |
<table border="0" cellpadding="0" align="center" cellspacing="0" width="100%" >
|
3 |
<tr>
|
4 |
-
<td
|
5 |
|
6 |
<div style="line-height: normal; font-size: 25px; font-family: Helvetica; color: #333333; text-align: center; border: 0; width: 100%!important; display: block; background-color: transparent" class="tnpc-row-edit" data-type="title">An Awesome Title</div>
|
7 |
|
1 |
|
2 |
<table border="0" cellpadding="0" align="center" cellspacing="0" width="100%" >
|
3 |
<tr>
|
4 |
+
<td align="center" style="padding: 15px;">
|
5 |
|
6 |
<div style="line-height: normal; font-size: 25px; font-family: Helvetica; color: #333333; text-align: center; border: 0; width: 100%!important; display: block; background-color: transparent" class="tnpc-row-edit" data-type="title">An Awesome Title</div>
|
7 |
|
emails/tnp-composer/blocks/content-03-text.block.php
CHANGED
@@ -1,7 +1,6 @@
|
|
1 |
-
|
2 |
<table border="0" cellpadding="0" align="center" cellspacing="0" width="100%">
|
3 |
<tr>
|
4 |
-
<td
|
5 |
|
6 |
<table border="0" cellpadding="0" cellspacing="0" class="responsive-table" width="100%" style="width: 100%!important">
|
7 |
<tr>
|
|
|
1 |
<table border="0" cellpadding="0" align="center" cellspacing="0" width="100%">
|
2 |
<tr>
|
3 |
+
<td align="center" style="padding: 20px 15px 20px 15px;">
|
4 |
|
5 |
<table border="0" cellpadding="0" cellspacing="0" class="responsive-table" width="100%" style="width: 100%!important">
|
6 |
<tr>
|
emails/tnp-composer/blocks/footer-01-footer.block.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<!-- FOOTER -->
|
2 |
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
3 |
<tr>
|
4 |
-
<td
|
5 |
|
6 |
<table width="500" border="0" cellspacing="0" cellpadding="0" align="center" class="responsive-table">
|
7 |
<tr>
|
1 |
<!-- FOOTER -->
|
2 |
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
3 |
<tr>
|
4 |
+
<td align="center" style="padding: 20px 0px;">
|
5 |
|
6 |
<table width="500" border="0" cellspacing="0" cellpadding="0" align="center" class="responsive-table">
|
7 |
<tr>
|
emails/tnp-composer/blocks/header-01-header.block.php
CHANGED
@@ -5,12 +5,13 @@ if (!empty($block_options['header_logo']['url'])) {
|
|
5 |
$logo_url = 'https://placehold.it/180x100&text=' . urlencode($block_options['header_title']);
|
6 |
}
|
7 |
$logo_alt = $block_options['header_title'];
|
|
|
8 |
?>
|
9 |
|
10 |
|
11 |
<table border="0" cellpadding="0" align="center" cellspacing="0" width="100%">
|
12 |
<tr>
|
13 |
-
<td
|
14 |
|
15 |
<table border="0" cellpadding="0" cellspacing="0" width="500" class="wrapper">
|
16 |
<!-- LOGO/PREHEADER TEXT -->
|
5 |
$logo_url = 'https://placehold.it/180x100&text=' . urlencode($block_options['header_title']);
|
6 |
}
|
7 |
$logo_alt = $block_options['header_title'];
|
8 |
+
$options['block_background'] = '#333333';
|
9 |
?>
|
10 |
|
11 |
|
12 |
<table border="0" cellpadding="0" align="center" cellspacing="0" width="100%">
|
13 |
<tr>
|
14 |
+
<td align="center" style="padding: 0px 15px 0px 15px;">
|
15 |
|
16 |
<table border="0" cellpadding="0" cellspacing="0" width="500" class="wrapper">
|
17 |
<!-- LOGO/PREHEADER TEXT -->
|
includes/TNP.php
CHANGED
@@ -32,17 +32,9 @@ class TNP {
|
|
32 |
|
33 |
// Form field configuration
|
34 |
$options_profile = get_option('newsletter_profile', array());
|
35 |
-
|
36 |
-
$optin = (int) $
|
37 |
-
|
38 |
-
switch ($params['optin']) {
|
39 |
-
case 'single': $optin = 1;
|
40 |
-
break;
|
41 |
-
case 'double': $optin = 0;
|
42 |
-
break;
|
43 |
-
}
|
44 |
-
}
|
45 |
-
|
46 |
$email = $newsletter->normalize_email(stripslashes($params['email']));
|
47 |
|
48 |
// Should never reach this point without a valid email address
|
@@ -51,7 +43,7 @@ class TNP {
|
|
51 |
}
|
52 |
|
53 |
$user = $newsletter->get_user($email);
|
54 |
-
|
55 |
if ($user != null) {
|
56 |
|
57 |
$newsletter->logger->info('Subscription of an address with status ' . $user->status);
|
@@ -96,9 +88,14 @@ class TNP {
|
|
96 |
$user = array('id' => $user->id);
|
97 |
} else {
|
98 |
$newsletter->logger->info("New email address");
|
99 |
-
$user = array('email' => $email);
|
100 |
}
|
101 |
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
$user = TNP::add_subscriber($params);
|
103 |
|
104 |
// TODO: decidere se applicare i filtri sulle API
|
@@ -120,12 +117,12 @@ class TNP {
|
|
120 |
}
|
121 |
|
122 |
$prefix = ($user->status == 'C') ? 'confirmed_' : 'confirmation_';
|
123 |
-
|
124 |
if (empty($options[$prefix . 'disabled'])) {
|
125 |
$message = $options[$prefix . 'message'];
|
126 |
|
127 |
if ($user->status == 'S') {
|
128 |
-
$message = $
|
129 |
}
|
130 |
|
131 |
// TODO: This is always empty!
|
@@ -198,7 +195,7 @@ class TNP {
|
|
198 |
}
|
199 |
|
200 |
if (!empty($params['gender'])) {
|
201 |
-
$user['
|
202 |
}
|
203 |
|
204 |
if (is_array($params['profile'])) {
|
32 |
|
33 |
// Form field configuration
|
34 |
$options_profile = get_option('newsletter_profile', array());
|
35 |
+
|
36 |
+
$optin = (int) $options['noconfirmation']; // 0 - double, 1 - single
|
37 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
$email = $newsletter->normalize_email(stripslashes($params['email']));
|
39 |
|
40 |
// Should never reach this point without a valid email address
|
43 |
}
|
44 |
|
45 |
$user = $newsletter->get_user($email);
|
46 |
+
|
47 |
if ($user != null) {
|
48 |
|
49 |
$newsletter->logger->info('Subscription of an address with status ' . $user->status);
|
88 |
$user = array('id' => $user->id);
|
89 |
} else {
|
90 |
$newsletter->logger->info("New email address");
|
|
|
91 |
}
|
92 |
|
93 |
+
if ($optin) {
|
94 |
+
$params['status'] = 'C';
|
95 |
+
} else {
|
96 |
+
$params['status'] = 'S';
|
97 |
+
}
|
98 |
+
|
99 |
$user = TNP::add_subscriber($params);
|
100 |
|
101 |
// TODO: decidere se applicare i filtri sulle API
|
117 |
}
|
118 |
|
119 |
$prefix = ($user->status == 'C') ? 'confirmed_' : 'confirmation_';
|
120 |
+
|
121 |
if (empty($options[$prefix . 'disabled'])) {
|
122 |
$message = $options[$prefix . 'message'];
|
123 |
|
124 |
if ($user->status == 'S') {
|
125 |
+
$message = $subscription->add_microdata($message);
|
126 |
}
|
127 |
|
128 |
// TODO: This is always empty!
|
195 |
}
|
196 |
|
197 |
if (!empty($params['gender'])) {
|
198 |
+
$user['sex'] = $newsletter->normalize_sex($params['gender']);
|
199 |
}
|
200 |
|
201 |
if (is_array($params['profile'])) {
|
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.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.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.3.6
|
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.3.6');
|
18 |
|
19 |
global $wpdb, $newsletter;
|
20 |
|
readme.txt
CHANGED
@@ -2,7 +2,7 @@
|
|
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.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,12 @@ Thank you, The Newsletter Team
|
|
90 |
|
91 |
== Changelog ==
|
92 |
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
= 5.3.5 =
|
94 |
|
95 |
* Fixed error notice on profile.php
|
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.3.6
|
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.3.6 =
|
94 |
+
|
95 |
+
* Fixed composer block background editing
|
96 |
+
* Fixed API functions
|
97 |
+
* Minor fixes
|
98 |
+
|
99 |
= 5.3.5 =
|
100 |
|
101 |
* Fixed error notice on profile.php
|
statistics/statistics.php
CHANGED
@@ -139,7 +139,7 @@ class NewsletterStatistics extends NewsletterModule {
|
|
139 |
|
140 |
$ip = $this->get_remote_ip();
|
141 |
|
142 |
-
$wpdb->query($wpdb->prepare("update " . NEWSLETTER_SENT_TABLE . " set open=1, ip=%s where email_id=%d and user_id=%d
|
143 |
$res = $wpdb->insert(NEWSLETTER_STATS_TABLE, array(
|
144 |
'email_id' => (int) $email_id,
|
145 |
'user_id' => (int) $user_id,
|
139 |
|
140 |
$ip = $this->get_remote_ip();
|
141 |
|
142 |
+
$wpdb->query($wpdb->prepare("update " . NEWSLETTER_SENT_TABLE . " set open=1, ip=%s where email_id=%d and user_id=%d and open=0 limit 1", $ip, $email_id, $user_id));
|
143 |
$res = $wpdb->insert(NEWSLETTER_STATS_TABLE, array(
|
144 |
'email_id' => (int) $email_id,
|
145 |
'user_id' => (int) $user_id,
|