Version Description
- Fixed email encoding when sent with wp_mail() and an encoding is selected on main settings
- Optimization on sending process
- Test newsletter stats cleared when real delivery starts
- Improved image resize
- Fixed security page help texts
Download this release
Release Info
Developer | satollo |
Plugin | Newsletter |
Version | 6.3.8 |
Comparing to | |
See all releases |
Code changes from version 6.3.7 to 6.3.8
- emails/blocks/posts/block.php +13 -2
- emails/blocks/posts/options.php +9 -0
- emails/edit.php +5 -2
- emails/emails.php +7 -1
- emails/tnp-composer/_scripts/newsletter-builder.js +1 -0
- emails/tnp-composer/index.php +1 -0
- includes/controls.php +1 -1
- includes/helper.php +5 -5
- includes/mailers.php +8 -1
- includes/module.php +7 -0
- plugin.php +11 -23
- readme.txt +9 -1
- statistics/statistics.php +8 -4
- subscription/antibot.php +10 -4
- users/import.php +1 -1
emails/blocks/posts/block.php
CHANGED
@@ -66,8 +66,19 @@ if (!empty($context['last_run'])) {
|
|
66 |
|
67 |
$posts = Newsletter::instance()->get_posts($filters, $options['language']);
|
68 |
|
69 |
-
if (
|
70 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
}
|
72 |
|
73 |
$out['subject'] = $posts[0]->post_title;
|
66 |
|
67 |
$posts = Newsletter::instance()->get_posts($filters, $options['language']);
|
68 |
|
69 |
+
if ($context['type'] == 'automated') {
|
70 |
+
// No new posts
|
71 |
+
if (empty($posts)) {
|
72 |
+
if (isset($options['automated_required'])) {
|
73 |
+
$out['return_empty_message'] = true;
|
74 |
+
}
|
75 |
+
return;
|
76 |
+
}
|
77 |
+
|
78 |
+
if ($options['automated_include'] == 'max') {
|
79 |
+
unset($filters['date_query']);
|
80 |
+
$posts = Newsletter::instance()->get_posts($filters, $options['language']);
|
81 |
+
}
|
82 |
}
|
83 |
|
84 |
$out['subject'] = $posts[0]->post_title;
|
emails/blocks/posts/options.php
CHANGED
@@ -3,7 +3,16 @@
|
|
3 |
/* @var $options array contains all the options the current block we're ediging contains */
|
4 |
/* @var $controls NewsletterControls */
|
5 |
/* @var $fields NewsletterFields */
|
|
|
6 |
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
|
8 |
<?php $fields->select('layout', __('Layout', 'newsletter'), array('one' => __('One column', 'newsletter'), 'two' => __('Two columns', 'newsletter'))) ?>
|
9 |
|
3 |
/* @var $options array contains all the options the current block we're ediging contains */
|
4 |
/* @var $controls NewsletterControls */
|
5 |
/* @var $fields NewsletterFields */
|
6 |
+
|
7 |
?>
|
8 |
+
<?php if ($context['type'] == 'automated') { ?>
|
9 |
+
<p>This is a dynamic block which is regenerated with the latest posts when Automated generate a new newsletter.</p>
|
10 |
+
|
11 |
+
<?php $fields->select('automated_include', __('What to include', 'newsletter'), array('new' => __('New posts after last newsletter', 'newsletter'),
|
12 |
+
'max' => __('Always max posts if at least one is new', 'newsletter')),
|
13 |
+
array('description'=>'This option is effective only when the newsletter is generated, not while composing')) ?>
|
14 |
+
<?php $fields->checkbox('automated_required', __('Required', 'newsletter'), array('description'=>'This block must return content or the newslettter has not to be sent')) ?>
|
15 |
+
<?php } ?>
|
16 |
|
17 |
<?php $fields->select('layout', __('Layout', 'newsletter'), array('one' => __('One column', 'newsletter'), 'two' => __('Two columns', 'newsletter'))) ?>
|
18 |
|
emails/edit.php
CHANGED
@@ -216,15 +216,18 @@ if ($controls->is_action('test') || $controls->is_action('save') || $controls->i
|
|
216 |
}
|
217 |
|
218 |
if ($controls->is_action('send') || $controls->is_action('schedule')) {
|
|
|
|
|
|
|
219 |
if ($email['subject'] == '') {
|
220 |
$controls->errors = __('A subject is required to send', 'newsletter');
|
221 |
} else {
|
222 |
$wpdb->update(NEWSLETTER_EMAILS_TABLE, array('status' => 'sending'), array('id' => $email_id));
|
223 |
$email['status'] = 'sending';
|
224 |
if ($controls->is_action('send')) {
|
225 |
-
|
226 |
} else {
|
227 |
-
|
228 |
}
|
229 |
}
|
230 |
}
|
216 |
}
|
217 |
|
218 |
if ($controls->is_action('send') || $controls->is_action('schedule')) {
|
219 |
+
|
220 |
+
NewsletterStatistics::instance()->reset_stats($email);
|
221 |
+
|
222 |
if ($email['subject'] == '') {
|
223 |
$controls->errors = __('A subject is required to send', 'newsletter');
|
224 |
} else {
|
225 |
$wpdb->update(NEWSLETTER_EMAILS_TABLE, array('status' => 'sending'), array('id' => $email_id));
|
226 |
$email['status'] = 'sending';
|
227 |
if ($controls->is_action('send')) {
|
228 |
+
$controls->messages = __( 'Now sending.', 'newsletter' );
|
229 |
} else {
|
230 |
+
$controls->messages = __( 'Scheduled.', 'newsletter' );
|
231 |
}
|
232 |
}
|
233 |
}
|
emails/emails.php
CHANGED
@@ -92,6 +92,9 @@ class NewsletterEmails extends NewsletterModule {
|
|
92 |
include NEWSLETTER_INCLUDES_DIR . '/controls.php';
|
93 |
}
|
94 |
$options = $this->options_decode(stripslashes_deep($_REQUEST['options']));
|
|
|
|
|
|
|
95 |
|
96 |
// $defaults = array(
|
97 |
// 'block_padding_top' => 15,
|
@@ -213,6 +216,9 @@ class NewsletterEmails extends NewsletterModule {
|
|
213 |
|
214 |
ob_start();
|
215 |
$out = $this->render_block($options['block_id'], true, $options, $context);
|
|
|
|
|
|
|
216 |
if (empty($subject) && !empty($out['subject'])) {
|
217 |
$subject = $out['subject'];
|
218 |
}
|
@@ -289,7 +295,7 @@ class NewsletterEmails extends NewsletterModule {
|
|
289 |
return;
|
290 |
}
|
291 |
|
292 |
-
$out = array('subject' => '');
|
293 |
|
294 |
|
295 |
ob_start();
|
92 |
include NEWSLETTER_INCLUDES_DIR . '/controls.php';
|
93 |
}
|
94 |
$options = $this->options_decode(stripslashes_deep($_REQUEST['options']));
|
95 |
+
|
96 |
+
$context = array('type'=>'');
|
97 |
+
if (isset($_REQUEST['context_type'])) $context['type'] = $_REQUEST['context_type'];
|
98 |
|
99 |
// $defaults = array(
|
100 |
// 'block_padding_top' => 15,
|
216 |
|
217 |
ob_start();
|
218 |
$out = $this->render_block($options['block_id'], true, $options, $context);
|
219 |
+
if ($out['return_empty_message']) {
|
220 |
+
return '';
|
221 |
+
}
|
222 |
if (empty($subject) && !empty($out['subject'])) {
|
223 |
$subject = $out['subject'];
|
224 |
}
|
295 |
return;
|
296 |
}
|
297 |
|
298 |
+
$out = array('subject' => '', 'return_empty_message'=>false);
|
299 |
|
300 |
|
301 |
ob_start();
|
emails/tnp-composer/_scripts/newsletter-builder.js
CHANGED
@@ -62,6 +62,7 @@ jQuery.fn.perform_block_edit = function () {
|
|
62 |
jQuery("#tnpc-block-options-form").load(ajaxurl, {
|
63 |
action: "tnpc_options",
|
64 |
id: container.data("id"),
|
|
|
65 |
options: options
|
66 |
}, function () {
|
67 |
start_options = jQuery("#tnpc-block-options-form").serialize();
|
62 |
jQuery("#tnpc-block-options-form").load(ajaxurl, {
|
63 |
action: "tnpc_options",
|
64 |
id: container.data("id"),
|
65 |
+
context_type: tnp_context_type,
|
66 |
options: options
|
67 |
}, function () {
|
68 |
start_options = jQuery("#tnpc-block-options-form").serialize();
|
emails/tnp-composer/index.php
CHANGED
@@ -138,6 +138,7 @@ $block_options = get_option('newsletter_main');
|
|
138 |
<script type="text/javascript">
|
139 |
TNP_PLUGIN_URL = "<?php echo NEWSLETTER_URL ?>";
|
140 |
TNP_HOME_URL = "<?php echo home_url('/', is_ssl() ? 'https' : 'http') ?>";
|
|
|
141 |
</script>
|
142 |
<script type="text/javascript" src="<?php echo plugins_url('newsletter'); ?>/emails/tnp-composer/_scripts/newsletter-builder.js?ver=<?php echo time() ?>"></script>
|
143 |
|
138 |
<script type="text/javascript">
|
139 |
TNP_PLUGIN_URL = "<?php echo NEWSLETTER_URL ?>";
|
140 |
TNP_HOME_URL = "<?php echo home_url('/', is_ssl() ? 'https' : 'http') ?>";
|
141 |
+
tnp_context_type = "<?php echo $context_type?>";
|
142 |
</script>
|
143 |
<script type="text/javascript" src="<?php echo plugins_url('newsletter'); ?>/emails/tnp-composer/_scripts/newsletter-builder.js?ver=<?php echo time() ?>"></script>
|
144 |
|
includes/controls.php
CHANGED
@@ -1670,7 +1670,7 @@ class NewsletterControls {
|
|
1670 |
echo '<input type="hidden" name="options[subject]" id="options-subject" value="', esc_attr($value), '">';
|
1671 |
}
|
1672 |
|
1673 |
-
function composer_load($name = 'body', $show_subject = false, $show_test = true) {
|
1674 |
|
1675 |
global $controls;
|
1676 |
global $tnpc_show_subject;
|
1670 |
echo '<input type="hidden" name="options[subject]" id="options-subject" value="', esc_attr($value), '">';
|
1671 |
}
|
1672 |
|
1673 |
+
function composer_load($name = 'body', $show_subject = false, $show_test = true, $context_type = '') {
|
1674 |
|
1675 |
global $controls;
|
1676 |
global $tnpc_show_subject;
|
includes/helper.php
CHANGED
@@ -111,13 +111,13 @@ function tnp_media_resize($media_id, $size) {
|
|
111 |
$r = wp_mkdir_p($uploads['basedir'] . '/newsletter/thumbnails/' . $pathinfo['dirname']);
|
112 |
|
113 |
if (!$r) {
|
114 |
-
$src = wp_get_attachment_image_src($media_id,
|
115 |
return $src[0];
|
116 |
}
|
117 |
|
118 |
$editor = wp_get_image_editor($absolute_file);
|
119 |
if (is_wp_error($editor)) {
|
120 |
-
$src = wp_get_attachment_image_src($media_id,
|
121 |
return $src[0];
|
122 |
//return $editor;
|
123 |
//return $uploads['baseurl'] . '/' . $relative_file;
|
@@ -125,7 +125,7 @@ function tnp_media_resize($media_id, $size) {
|
|
125 |
|
126 |
$original_size = $editor->get_size();
|
127 |
if ($width > $original_size['width'] || $height > $original_size['height']) {
|
128 |
-
$src = wp_get_attachment_image_src($media_id,
|
129 |
return $src[0];
|
130 |
}
|
131 |
|
@@ -133,13 +133,13 @@ function tnp_media_resize($media_id, $size) {
|
|
133 |
$resized = $editor->resize($width, $height, $crop);
|
134 |
|
135 |
if (is_wp_error($resized)) {
|
136 |
-
$src = wp_get_attachment_image_src($media_id,
|
137 |
return $src[0];
|
138 |
}
|
139 |
|
140 |
$saved = $editor->save($absolute_thumb);
|
141 |
if (is_wp_error($saved)) {
|
142 |
-
$src = wp_get_attachment_image_src($media_id,
|
143 |
return $src[0];
|
144 |
//return $saved;
|
145 |
//return $uploads['baseurl'] . '/' . $relative_file;
|
111 |
$r = wp_mkdir_p($uploads['basedir'] . '/newsletter/thumbnails/' . $pathinfo['dirname']);
|
112 |
|
113 |
if (!$r) {
|
114 |
+
$src = wp_get_attachment_image_src($media_id, 'full');
|
115 |
return $src[0];
|
116 |
}
|
117 |
|
118 |
$editor = wp_get_image_editor($absolute_file);
|
119 |
if (is_wp_error($editor)) {
|
120 |
+
$src = wp_get_attachment_image_src($media_id, 'full');
|
121 |
return $src[0];
|
122 |
//return $editor;
|
123 |
//return $uploads['baseurl'] . '/' . $relative_file;
|
125 |
|
126 |
$original_size = $editor->get_size();
|
127 |
if ($width > $original_size['width'] || $height > $original_size['height']) {
|
128 |
+
$src = wp_get_attachment_image_src($media_id, 'full');
|
129 |
return $src[0];
|
130 |
}
|
131 |
|
133 |
$resized = $editor->resize($width, $height, $crop);
|
134 |
|
135 |
if (is_wp_error($resized)) {
|
136 |
+
$src = wp_get_attachment_image_src($media_id, 'full');
|
137 |
return $src[0];
|
138 |
}
|
139 |
|
140 |
$saved = $editor->save($absolute_thumb);
|
141 |
if (is_wp_error($saved)) {
|
142 |
+
$src = wp_get_attachment_image_src($media_id, 'full');
|
143 |
return $src[0];
|
144 |
//return $saved;
|
145 |
//return $uploads['baseurl'] . '/' . $relative_file;
|
includes/mailers.php
CHANGED
@@ -111,13 +111,20 @@ class NewsletterDefaultMailer extends NewsletterMailer {
|
|
111 |
|
112 |
if (!$this->filter_active) {
|
113 |
add_action('phpmailer_init', function ($mailer) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
// If there is not a current message, wp_mail() was not called by us
|
115 |
if (is_null($this->current_message)) {
|
116 |
return;
|
117 |
}
|
118 |
|
119 |
/* @var $mailer PHPMailer */
|
120 |
-
$mailer->Sender =
|
121 |
|
122 |
if (!empty($this->current_message->body) && !empty($this->current_message->body_text)) {
|
123 |
$mailer->AltBody = $this->current_message->body_text;
|
111 |
|
112 |
if (!$this->filter_active) {
|
113 |
add_action('phpmailer_init', function ($mailer) {
|
114 |
+
$newsletter = Newsletter::instance();
|
115 |
+
if (!empty($newsletter->options['content_transfer_encoding'])) {
|
116 |
+
$mailer->Encoding = $newsletter->options['content_transfer_encoding'];
|
117 |
+
} else {
|
118 |
+
$mailer->Encoding = 'base64';
|
119 |
+
}
|
120 |
+
|
121 |
// If there is not a current message, wp_mail() was not called by us
|
122 |
if (is_null($this->current_message)) {
|
123 |
return;
|
124 |
}
|
125 |
|
126 |
/* @var $mailer PHPMailer */
|
127 |
+
$mailer->Sender = $newsletter->options['return_path'];
|
128 |
|
129 |
if (!empty($this->current_message->body) && !empty($this->current_message->body_text)) {
|
130 |
$mailer->AltBody = $this->current_message->body_text;
|
includes/module.php
CHANGED
@@ -2247,6 +2247,13 @@ class NewsletterModule {
|
|
2247 |
return round($value / $total * 100);
|
2248 |
}
|
2249 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2250 |
static function to_int_id($var) {
|
2251 |
if (is_object($var)) {
|
2252 |
return (int) $var->id;
|
2247 |
return round($value / $total * 100);
|
2248 |
}
|
2249 |
|
2250 |
+
/**
|
2251 |
+
* Takes in a variable and checks if object, array or scalar and return the integer representing
|
2252 |
+
* a database record id.
|
2253 |
+
*
|
2254 |
+
* @param mixed $var
|
2255 |
+
* @return in
|
2256 |
+
*/
|
2257 |
static function to_int_id($var) {
|
2258 |
if (is_object($var)) {
|
2259 |
return (int) $var->id;
|
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.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.
|
@@ -28,7 +28,7 @@
|
|
28 |
|
29 |
*/
|
30 |
|
31 |
-
define('NEWSLETTER_VERSION', '6.3.
|
32 |
|
33 |
global $newsletter, $wpdb;
|
34 |
|
@@ -143,7 +143,7 @@ class Newsletter extends NewsletterModule {
|
|
143 |
return $schedules;
|
144 |
}, 1000);
|
145 |
|
146 |
-
parent::__construct('main', '1.5.
|
147 |
|
148 |
$max = $this->options['scheduler_max'];
|
149 |
if (!is_numeric($max)) {
|
@@ -233,17 +233,6 @@ class Newsletter extends NewsletterModule {
|
|
233 |
return;
|
234 |
}
|
235 |
|
236 |
-
if ($this->action == 'fu') {
|
237 |
-
$user = $this->check_user();
|
238 |
-
if ($user == null) {
|
239 |
-
die('No user');
|
240 |
-
}
|
241 |
-
$wpdb->query("update " . NEWSLETTER_USERS_TABLE . " set followup=2 where id=" . $user->id);
|
242 |
-
$options_followup = get_option('newsletter_followup');
|
243 |
-
$this->message = $options_followup['unsubscribed_text'];
|
244 |
-
return;
|
245 |
-
}
|
246 |
-
|
247 |
if ($this->action == 'test') {
|
248 |
echo 'ok';
|
249 |
die();
|
@@ -680,15 +669,15 @@ class Newsletter extends NewsletterModule {
|
|
680 |
$this->logger->debug(__METHOD__ . '> Processing user ID: ' . $user->id);
|
681 |
$user = apply_filters('newsletter_send_user', $user);
|
682 |
$message = $this->build_message($email, $user);
|
683 |
-
|
|
|
684 |
if (!$test) {
|
685 |
-
$this->save_sent_message($message);
|
686 |
$wpdb->query("update " . NEWSLETTER_EMAILS_TABLE . " set sent=sent+1, last_id=" . $user->id . " where id=" . $email->id . " limit 1");
|
687 |
}
|
688 |
|
689 |
$r = $mailer->send($message);
|
690 |
|
691 |
-
if (
|
692 |
$this->save_sent_message($message);
|
693 |
}
|
694 |
|
@@ -718,11 +707,10 @@ class Newsletter extends NewsletterModule {
|
|
718 |
$this->logger->debug(__METHOD__ . '> Processing user ID: ' . $user->id);
|
719 |
$user = apply_filters('newsletter_send_user', $user);
|
720 |
$message = $this->build_message($email, $user);
|
721 |
-
|
722 |
$messages[] = $message;
|
723 |
-
|
724 |
if (!$test) {
|
725 |
-
$this->save_sent_message($message);
|
726 |
$wpdb->query("update " . NEWSLETTER_EMAILS_TABLE . " set sent=sent+1, last_id=" . $user->id . " where id=" . $email->id . " limit 1");
|
727 |
}
|
728 |
$this->email_limit--;
|
@@ -732,7 +720,7 @@ class Newsletter extends NewsletterModule {
|
|
732 |
$r = $mailer->send_batch($messages);
|
733 |
|
734 |
foreach ($messages as $message) {
|
735 |
-
if (
|
736 |
$this->save_sent_message($message);
|
737 |
}
|
738 |
}
|
@@ -1143,9 +1131,9 @@ class Newsletter extends NewsletterModule {
|
|
1143 |
$extensions_json = get_transient('tnp_extensions_json');
|
1144 |
|
1145 |
if (empty($extensions_json)) {
|
1146 |
-
$url = "http://www.thenewsletterplugin.com/wp-content/extensions.json";
|
1147 |
if (!empty($this->options['contract_key'])) {
|
1148 |
-
$url = "http://www.thenewsletterplugin.com/wp-content/plugins/file-commerce-pro/extensions.php?k=" . $this->options['contract_key'];
|
1149 |
}
|
1150 |
$extensions_response = wp_remote_get($url);
|
1151 |
$extensions_json = wp_remote_retrieve_body($extensions_response);
|
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.3.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.3.8');
|
32 |
|
33 |
global $newsletter, $wpdb;
|
34 |
|
143 |
return $schedules;
|
144 |
}, 1000);
|
145 |
|
146 |
+
parent::__construct('main', '1.5.2', null, array('info', 'smtp'));
|
147 |
|
148 |
$max = $this->options['scheduler_max'];
|
149 |
if (!is_numeric($max)) {
|
233 |
return;
|
234 |
}
|
235 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
236 |
if ($this->action == 'test') {
|
237 |
echo 'ok';
|
238 |
die();
|
669 |
$this->logger->debug(__METHOD__ . '> Processing user ID: ' . $user->id);
|
670 |
$user = apply_filters('newsletter_send_user', $user);
|
671 |
$message = $this->build_message($email, $user);
|
672 |
+
$this->save_sent_message($message);
|
673 |
+
|
674 |
if (!$test) {
|
|
|
675 |
$wpdb->query("update " . NEWSLETTER_EMAILS_TABLE . " set sent=sent+1, last_id=" . $user->id . " where id=" . $email->id . " limit 1");
|
676 |
}
|
677 |
|
678 |
$r = $mailer->send($message);
|
679 |
|
680 |
+
if (!empty($message->error)) {
|
681 |
$this->save_sent_message($message);
|
682 |
}
|
683 |
|
707 |
$this->logger->debug(__METHOD__ . '> Processing user ID: ' . $user->id);
|
708 |
$user = apply_filters('newsletter_send_user', $user);
|
709 |
$message = $this->build_message($email, $user);
|
710 |
+
$this->save_sent_message($message);
|
711 |
$messages[] = $message;
|
712 |
+
|
713 |
if (!$test) {
|
|
|
714 |
$wpdb->query("update " . NEWSLETTER_EMAILS_TABLE . " set sent=sent+1, last_id=" . $user->id . " where id=" . $email->id . " limit 1");
|
715 |
}
|
716 |
$this->email_limit--;
|
720 |
$r = $mailer->send_batch($messages);
|
721 |
|
722 |
foreach ($messages as $message) {
|
723 |
+
if (!empty($message->error)) {
|
724 |
$this->save_sent_message($message);
|
725 |
}
|
726 |
}
|
1131 |
$extensions_json = get_transient('tnp_extensions_json');
|
1132 |
|
1133 |
if (empty($extensions_json)) {
|
1134 |
+
$url = "http://www.thenewsletterplugin.com/wp-content/extensions.json?ver=" . NEWSLETTER_VERSION;
|
1135 |
if (!empty($this->options['contract_key'])) {
|
1136 |
+
$url = "http://www.thenewsletterplugin.com/wp-content/plugins/file-commerce-pro/extensions.php?k=" . $this->options['contract_key'] . '&ver=' . NEWSLETTER_VERSION;
|
1137 |
}
|
1138 |
$extensions_response = wp_remote_get($url);
|
1139 |
$extensions_json = wp_remote_retrieve_body($extensions_response);
|
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.2.4
|
5 |
-
Stable tag: 6.3.
|
6 |
Requires PHP: 5.6
|
7 |
Contributors: satollo,webagile,michael-travan
|
8 |
|
@@ -109,6 +109,14 @@ Thank you, The Newsletter Team
|
|
109 |
|
110 |
== Changelog ==
|
111 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
= 6.3.7 =
|
113 |
|
114 |
* Schedules registration 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.2.4
|
5 |
+
Stable tag: 6.3.8
|
6 |
Requires PHP: 5.6
|
7 |
Contributors: satollo,webagile,michael-travan
|
8 |
|
109 |
|
110 |
== Changelog ==
|
111 |
|
112 |
+
= 6.3.8 =
|
113 |
+
|
114 |
+
* Fixed email encoding when sent with wp_mail() and an encoding is selected on main settings
|
115 |
+
* Optimization on sending process
|
116 |
+
* Test newsletter stats cleared when real delivery starts
|
117 |
+
* Improved image resize
|
118 |
+
* Fixed security page help texts
|
119 |
+
|
120 |
= 6.3.7 =
|
121 |
|
122 |
* Schedules registration fix
|
statistics/statistics.php
CHANGED
@@ -1,9 +1,6 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
4 |
-
exit;
|
5 |
-
|
6 |
-
require_once NEWSLETTER_INCLUDES_DIR . '/module.php';
|
7 |
|
8 |
class NewsletterStatistics extends NewsletterModule {
|
9 |
|
@@ -293,6 +290,13 @@ class NewsletterStatistics extends NewsletterModule {
|
|
293 |
$wpdb->query($wpdb->prepare("update " . $wpdb->prefix . "newsletter_sent s1 join " . $wpdb->prefix . "newsletter_stats s2 on s1.user_id=s2.user_id and s1.email_id=s2.email_id and s1.email_id=%d set s1.open=1, s1.ip=s2.ip", $email->id));
|
294 |
$wpdb->query($wpdb->prepare("update " . $wpdb->prefix . "newsletter_sent s1 join " . $wpdb->prefix . "newsletter_stats s2 on s1.user_id=s2.user_id and s1.email_id=s2.email_id and s2.url<>'' and s1.email_id=%d set s1.open=2, s1.ip=s2.ip", $email->id));
|
295 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
296 |
|
297 |
function get_total_count($email_id) {
|
298 |
global $wpdb;
|
1 |
<?php
|
2 |
|
3 |
+
defined('ABSPATH') || exit;
|
|
|
|
|
|
|
4 |
|
5 |
class NewsletterStatistics extends NewsletterModule {
|
6 |
|
290 |
$wpdb->query($wpdb->prepare("update " . $wpdb->prefix . "newsletter_sent s1 join " . $wpdb->prefix . "newsletter_stats s2 on s1.user_id=s2.user_id and s1.email_id=s2.email_id and s1.email_id=%d set s1.open=1, s1.ip=s2.ip", $email->id));
|
291 |
$wpdb->query($wpdb->prepare("update " . $wpdb->prefix . "newsletter_sent s1 join " . $wpdb->prefix . "newsletter_stats s2 on s1.user_id=s2.user_id and s1.email_id=s2.email_id and s2.url<>'' and s1.email_id=%d set s1.open=2, s1.ip=s2.ip", $email->id));
|
292 |
}
|
293 |
+
|
294 |
+
function reset_stats($email) {
|
295 |
+
global $wpdb;
|
296 |
+
$email_id = $this->to_int_id($email);
|
297 |
+
$this->query("delete from " . $wpdb->prefix . "newsletter_sent where email_id=" . $email_id);
|
298 |
+
$this->query("delete from " . $wpdb->prefix . "newsletter_stats where email_id=" . $email_id);
|
299 |
+
}
|
300 |
|
301 |
function get_total_count($email_id) {
|
302 |
global $wpdb;
|
subscription/antibot.php
CHANGED
@@ -145,21 +145,27 @@ if ($controls->is_action()) {
|
|
145 |
<div id="tabs-blacklists">
|
146 |
<table class="form-table">
|
147 |
<tr>
|
148 |
-
<th
|
|
|
|
|
|
|
149 |
<td>
|
150 |
<?php
|
151 |
$controls->textarea('ip_blacklist');
|
152 |
?>
|
153 |
-
|
154 |
</td>
|
155 |
</tr>
|
156 |
<tr>
|
157 |
-
<th
|
|
|
|
|
|
|
158 |
<td>
|
159 |
<?php
|
160 |
$controls->textarea('address_blacklist');
|
161 |
?>
|
162 |
-
|
163 |
</td>
|
164 |
</tr>
|
165 |
</table>
|
145 |
<div id="tabs-blacklists">
|
146 |
<table class="form-table">
|
147 |
<tr>
|
148 |
+
<th>
|
149 |
+
<?php _e('IP black list', 'newsletter') ?>
|
150 |
+
<?php $controls->field_help('https://www.thenewsletterplugin.com/documentation/antiflood#ip') ?>
|
151 |
+
</th>
|
152 |
<td>
|
153 |
<?php
|
154 |
$controls->textarea('ip_blacklist');
|
155 |
?>
|
156 |
+
<p class="description"><?php _e('One per line', 'newsletter')?></p>
|
157 |
</td>
|
158 |
</tr>
|
159 |
<tr>
|
160 |
+
<th>
|
161 |
+
<?php _e('Address black list', 'newsletter') ?>
|
162 |
+
<?php $controls->field_help('https://www.thenewsletterplugin.com/documentation/antiflood#domains') ?>
|
163 |
+
</th>
|
164 |
<td>
|
165 |
<?php
|
166 |
$controls->textarea('address_blacklist');
|
167 |
?>
|
168 |
+
<p class="description"><?php _e('One per line', 'newsletter')?></p>
|
169 |
</td>
|
170 |
</tr>
|
171 |
</table>
|
users/import.php
CHANGED
@@ -25,7 +25,7 @@ if ($controls->is_action('import')) {
|
|
25 |
}
|
26 |
|
27 |
// Set the selected preferences inside the
|
28 |
-
if (!is_array($controls->data['preferences']))
|
29 |
$controls->data['preferences'] = array();
|
30 |
|
31 |
// if ($options['followup'] == 'activate') {
|
25 |
}
|
26 |
|
27 |
// Set the selected preferences inside the
|
28 |
+
if (!isset($controls->data['preferences']) || !is_array($controls->data['preferences']))
|
29 |
$controls->data['preferences'] = array();
|
30 |
|
31 |
// if ($options['followup'] == 'activate') {
|