Version Description
- Fix for Automated
Download this release
Release Info
Developer | satollo |
Plugin | Newsletter |
Version | 6.1.7 |
Comparing to | |
See all releases |
Code changes from version 6.1.6 to 6.1.7
- emails/emails.php +1 -2
- main/status.php +27 -0
- plugin.php +32 -32
- readme.txt +5 -1
emails/emails.php
CHANGED
@@ -223,8 +223,7 @@ class NewsletterEmails extends NewsletterModule {
|
|
223 |
}
|
224 |
}
|
225 |
|
226 |
-
if ($has_dynamic_blocks && $all_empty) {
|
227 |
-
die('all empty');
|
228 |
return '';
|
229 |
}
|
230 |
|
223 |
}
|
224 |
}
|
225 |
|
226 |
+
if (!empty($context['last_run']) && $has_dynamic_blocks && $all_empty) {
|
|
|
227 |
return '';
|
228 |
}
|
229 |
|
main/status.php
CHANGED
@@ -354,6 +354,33 @@ $speed = Newsletter::$instance->options['scheduler_max'];
|
|
354 |
</td>
|
355 |
|
356 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
357 |
|
358 |
|
359 |
<?php
|
354 |
</td>
|
355 |
|
356 |
</tr>
|
357 |
+
|
358 |
+
<?php
|
359 |
+
$value = (int) ini_get('max_execution_time');
|
360 |
+
$res = true;
|
361 |
+
if ($value != 0 && $value < NEWSLETTER_CRON_INTERVAL) {
|
362 |
+
$res = set_time_limit(NEWSLETTER_CRON_INTERVAL);
|
363 |
+
}
|
364 |
+
?>
|
365 |
+
|
366 |
+
<tr>
|
367 |
+
<td>Addons update</td>
|
368 |
+
<td>
|
369 |
+
<?php if (NEWSLETTER_EXTENSION_UPDATE) { ?>
|
370 |
+
<span class="tnp-ok">OK</span>
|
371 |
+
<?php } else { ?>
|
372 |
+
<span class="tnp-maybe">MAYBE</span>
|
373 |
+
<?php } ?>
|
374 |
+
</td>
|
375 |
+
<td>
|
376 |
+
<?php if (!NEWSLETTER_EXTENSION_UPDATE) { ?>
|
377 |
+
Newsletter Addons update is disabled (probably in your <code>wp-config.php</code> file)
|
378 |
+
<?php } else { ?>
|
379 |
+
Newsletter Addons can be updated
|
380 |
+
<?php } ?>
|
381 |
+
</td>
|
382 |
+
|
383 |
+
</tr>
|
384 |
|
385 |
|
386 |
<?php
|
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.1.
|
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.
|
@@ -29,7 +29,7 @@
|
|
29 |
*/
|
30 |
|
31 |
// Used as dummy parameter on css and js links
|
32 |
-
define('NEWSLETTER_VERSION', '6.1.
|
33 |
|
34 |
global $newsletter, $wpdb;
|
35 |
|
@@ -154,7 +154,7 @@ class Newsletter extends NewsletterModule {
|
|
154 |
|
155 |
add_action('init', array($this, 'hook_init'), 1);
|
156 |
add_action('newsletter', array($this, 'hook_newsletter'), 1);
|
157 |
-
add_action('newsletter_extension_versions', array($this, 'hook_newsletter_extension_versions'), 1);
|
158 |
add_action('plugins_loaded', array($this, 'hook_plugins_loaded'));
|
159 |
|
160 |
// This specific event is created by "Feed by mail" panel on configuration
|
@@ -308,7 +308,8 @@ class Newsletter extends NewsletterModule {
|
|
308 |
wp_schedule_event(time() + 30, 'newsletter', 'newsletter');
|
309 |
|
310 |
wp_clear_scheduled_hook('newsletter_extension_versions');
|
311 |
-
|
|
|
312 |
|
313 |
$subscription_options = get_option('newsletter', array());
|
314 |
|
@@ -330,7 +331,7 @@ class Newsletter extends NewsletterModule {
|
|
330 |
$info_options = $this->options;
|
331 |
$this->save_options($info_options, 'info');
|
332 |
}
|
333 |
-
|
334 |
if (!empty($this->options['editor'])) {
|
335 |
if (empty($this->options['roles'])) {
|
336 |
$this->options['roles'] = array('editor');
|
@@ -455,7 +456,7 @@ class Newsletter extends NewsletterModule {
|
|
455 |
die();
|
456 |
}
|
457 |
}
|
458 |
-
|
459 |
function hook_in_admin_header() {
|
460 |
if (!$this->is_admin_page()) {
|
461 |
add_action('admin_notices', array($this, 'hook_admin_notices'));
|
@@ -1092,28 +1093,27 @@ class Newsletter extends NewsletterModule {
|
|
1092 |
/**
|
1093 |
* Called weekly if at least one extension is active.
|
1094 |
*/
|
1095 |
-
function hook_newsletter_extension_versions($force = false) {
|
1096 |
-
|
1097 |
-
|
1098 |
-
|
1099 |
-
|
1100 |
-
|
1101 |
-
|
1102 |
-
|
1103 |
-
|
1104 |
-
|
1105 |
-
|
1106 |
-
update_option('newsletter_extension_versions', $versions, false);
|
1107 |
-
}
|
1108 |
|
1109 |
function get_extension_version($extension_id) {
|
1110 |
-
$
|
1111 |
-
|
|
|
1112 |
return null;
|
1113 |
}
|
1114 |
-
foreach ($
|
1115 |
-
if ($
|
1116 |
-
return $
|
1117 |
}
|
1118 |
}
|
1119 |
|
@@ -1126,7 +1126,7 @@ class Newsletter extends NewsletterModule {
|
|
1126 |
* $extension is an instance of an extension
|
1127 |
*/
|
1128 |
function set_extension_update_data($value, $extension) {
|
1129 |
-
|
1130 |
// See the wp_update_plugins function
|
1131 |
if (!is_object($value)) {
|
1132 |
return $value;
|
@@ -1141,6 +1141,8 @@ class Newsletter extends NewsletterModule {
|
|
1141 |
return $value;
|
1142 |
}
|
1143 |
|
|
|
|
|
1144 |
if (!function_exists('get_plugin_data')) {
|
1145 |
return $value;
|
1146 |
}
|
@@ -1151,12 +1153,10 @@ class Newsletter extends NewsletterModule {
|
|
1151 |
return $value;
|
1152 |
}
|
1153 |
|
1154 |
-
if (
|
1155 |
-
|
1156 |
-
|
1157 |
-
|
1158 |
-
$plugin_data = get_plugin_data(WPMU_PLUGIN_DIR . '/' . $extension->plugin, false, false);
|
1159 |
-
}
|
1160 |
}
|
1161 |
|
1162 |
if (!isset($plugin_data)) {
|
@@ -1202,7 +1202,7 @@ class Newsletter extends NewsletterModule {
|
|
1202 |
$extensions_response = wp_remote_get($url);
|
1203 |
$extensions_json = wp_remote_retrieve_body($extensions_response);
|
1204 |
if (!empty($extensions_json)) {
|
1205 |
-
set_transient('tnp_extensions_json', $extensions_json,
|
1206 |
}
|
1207 |
}
|
1208 |
|
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.1.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.
|
29 |
*/
|
30 |
|
31 |
// Used as dummy parameter on css and js links
|
32 |
+
define('NEWSLETTER_VERSION', '6.1.7');
|
33 |
|
34 |
global $newsletter, $wpdb;
|
35 |
|
154 |
|
155 |
add_action('init', array($this, 'hook_init'), 1);
|
156 |
add_action('newsletter', array($this, 'hook_newsletter'), 1);
|
157 |
+
//add_action('newsletter_extension_versions', array($this, 'hook_newsletter_extension_versions'), 1);
|
158 |
add_action('plugins_loaded', array($this, 'hook_plugins_loaded'));
|
159 |
|
160 |
// This specific event is created by "Feed by mail" panel on configuration
|
308 |
wp_schedule_event(time() + 30, 'newsletter', 'newsletter');
|
309 |
|
310 |
wp_clear_scheduled_hook('newsletter_extension_versions');
|
311 |
+
// No more required
|
312 |
+
//wp_schedule_event(time() + 30, 'daily', 'newsletter_extension_versions');
|
313 |
|
314 |
$subscription_options = get_option('newsletter', array());
|
315 |
|
331 |
$info_options = $this->options;
|
332 |
$this->save_options($info_options, 'info');
|
333 |
}
|
334 |
+
|
335 |
if (!empty($this->options['editor'])) {
|
336 |
if (empty($this->options['roles'])) {
|
337 |
$this->options['roles'] = array('editor');
|
456 |
die();
|
457 |
}
|
458 |
}
|
459 |
+
|
460 |
function hook_in_admin_header() {
|
461 |
if (!$this->is_admin_page()) {
|
462 |
add_action('admin_notices', array($this, 'hook_admin_notices'));
|
1093 |
/**
|
1094 |
* Called weekly if at least one extension is active.
|
1095 |
*/
|
1096 |
+
// function hook_newsletter_extension_versions($force = false) {
|
1097 |
+
//
|
1098 |
+
// $response = wp_remote_get('http://www.thenewsletterplugin.com/wp-content/versions/all.txt?ts=' . time());
|
1099 |
+
// if (is_wp_error($response)) {
|
1100 |
+
// $this->logger->error($response);
|
1101 |
+
// return;
|
1102 |
+
// }
|
1103 |
+
//
|
1104 |
+
// $versions = json_decode(wp_remote_retrieve_body($response));
|
1105 |
+
// update_option('newsletter_extension_versions', $versions, false);
|
1106 |
+
// }
|
|
|
|
|
1107 |
|
1108 |
function get_extension_version($extension_id) {
|
1109 |
+
$extensions = $this->getTnpExtensions();
|
1110 |
+
|
1111 |
+
if (!is_array($extensions)) {
|
1112 |
return null;
|
1113 |
}
|
1114 |
+
foreach ($extensions as $extension) {
|
1115 |
+
if ($extension->id == $extension_id) {
|
1116 |
+
return $extension->version;
|
1117 |
}
|
1118 |
}
|
1119 |
|
1126 |
* $extension is an instance of an extension
|
1127 |
*/
|
1128 |
function set_extension_update_data($value, $extension) {
|
1129 |
+
|
1130 |
// See the wp_update_plugins function
|
1131 |
if (!is_object($value)) {
|
1132 |
return $value;
|
1141 |
return $value;
|
1142 |
}
|
1143 |
|
1144 |
+
include_once(ABSPATH . 'wp-admin/includes/plugin.php');
|
1145 |
+
|
1146 |
if (!function_exists('get_plugin_data')) {
|
1147 |
return $value;
|
1148 |
}
|
1153 |
return $value;
|
1154 |
}
|
1155 |
|
1156 |
+
if (file_exists(WP_PLUGIN_DIR . '/' . $extension->plugin)) {
|
1157 |
+
$plugin_data = get_plugin_data(WP_PLUGIN_DIR . '/' . $extension->plugin, false, false);
|
1158 |
+
} else if (file_exists(WPMU_PLUGIN_DIR . '/' . $extension->plugin)) {
|
1159 |
+
$plugin_data = get_plugin_data(WPMU_PLUGIN_DIR . '/' . $extension->plugin, false, false);
|
|
|
|
|
1160 |
}
|
1161 |
|
1162 |
if (!isset($plugin_data)) {
|
1202 |
$extensions_response = wp_remote_get($url);
|
1203 |
$extensions_json = wp_remote_retrieve_body($extensions_response);
|
1204 |
if (!empty($extensions_json)) {
|
1205 |
+
set_transient('tnp_extensions_json', $extensions_json, 72 * 60 * 60);
|
1206 |
}
|
1207 |
}
|
1208 |
|
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.2
|
5 |
-
Stable tag: 6.1.
|
6 |
Contributors: satollo,webagile,michael-travan
|
7 |
|
8 |
Add a real newsletter system to your blog. For free. With unlimited newsletters and subscribers.
|
@@ -108,6 +108,10 @@ Thank you, The Newsletter Team
|
|
108 |
|
109 |
== Changelog ==
|
110 |
|
|
|
|
|
|
|
|
|
111 |
= 6.1.6 =
|
112 |
|
113 |
* Fixed roles management
|
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.2
|
5 |
+
Stable tag: 6.1.7
|
6 |
Contributors: satollo,webagile,michael-travan
|
7 |
|
8 |
Add a real newsletter system to your blog. For free. With unlimited newsletters and subscribers.
|
108 |
|
109 |
== Changelog ==
|
110 |
|
111 |
+
= 6.1.7 =
|
112 |
+
|
113 |
+
* Fix for Automated
|
114 |
+
|
115 |
= 6.1.6 =
|
116 |
|
117 |
* Fixed roles management
|