Version Description
- Fixed integration with addons manager
- Support for new addon format
- Added PHP minimum version declaration
Download this release
Release Info
Developer | satollo |
Plugin | Newsletter |
Version | 6.2.0 |
Comparing to | |
See all releases |
Code changes from version 6.1.9 to 6.2.0
- includes/controls.php +7 -0
- includes/module.php +78 -6
- plugin.php +8 -6
- readme.txt +8 -1
- users/import.php +1 -1
includes/controls.php
CHANGED
@@ -258,6 +258,13 @@ class NewsletterControls {
|
|
258 |
'YE' => 'Yemen',
|
259 |
'ZM' => 'Zambia',
|
260 |
'ZW' => 'Zimbabwe',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
261 |
);
|
262 |
|
263 |
function __construct($options = null) {
|
258 |
'YE' => 'Yemen',
|
259 |
'ZM' => 'Zambia',
|
260 |
'ZW' => 'Zimbabwe',
|
261 |
+
'XX' => 'Undefined',
|
262 |
+
|
263 |
+
'CW' => 'Curaçao',
|
264 |
+
'SS' => 'South Sudan',
|
265 |
+
'EU' => 'Europe (generic)',
|
266 |
+
'A1' => 'Anonymous IP',
|
267 |
+
'A2' => 'Satellite IP'
|
268 |
);
|
269 |
|
270 |
function __construct($options = null) {
|
includes/module.php
CHANGED
@@ -3,11 +3,12 @@
|
|
3 |
defined('ABSPATH') || exit;
|
4 |
|
5 |
class TNP_Composer {
|
|
|
6 |
static $block_dirs = array();
|
7 |
-
|
8 |
static function register_block($dir) {
|
9 |
// Checks
|
10 |
-
|
11 |
if (!file_exists($dir . '/block.php')) {
|
12 |
$error = new WP_Error('1', 'block.php missing on folder ' . $dir);
|
13 |
NewsletterEmails::instance()->logger->error($error);
|
@@ -16,6 +17,7 @@ class TNP_Composer {
|
|
16 |
self::$block_dirs[] = $dir;
|
17 |
return true;
|
18 |
}
|
|
|
19 |
}
|
20 |
|
21 |
/**
|
@@ -96,6 +98,74 @@ class TNP_Theme {
|
|
96 |
|
97 |
}
|
98 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
class NewsletterModule {
|
100 |
|
101 |
/**
|
@@ -660,13 +730,15 @@ class NewsletterModule {
|
|
660 |
}
|
661 |
|
662 |
function add_menu_page($page, $title, $capability = '') {
|
663 |
-
if (!Newsletter::instance()->is_allowed())
|
|
|
664 |
$name = 'newsletter_' . $this->module . '_' . $page;
|
665 |
add_submenu_page('newsletter_main_index', $title, $title, 'exist', $name, array($this, 'menu_page'));
|
666 |
}
|
667 |
-
|
668 |
function add_admin_page($page, $title) {
|
669 |
-
if (!Newsletter::instance()->is_allowed())
|
|
|
670 |
$name = 'newsletter_' . $this->module . '_' . $page;
|
671 |
$name = apply_filters('newsletter_admin_page', $name);
|
672 |
add_submenu_page(null, $title, $title, 'exist', $name, array($this, 'menu_page'));
|
@@ -685,7 +757,7 @@ class NewsletterModule {
|
|
685 |
$page = str_replace('_', '-', $page);
|
686 |
|
687 |
$file = NEWSLETTER_DIR . '/' . $module . '/' . $page . '.php';
|
688 |
-
|
689 |
require $file;
|
690 |
}
|
691 |
|
3 |
defined('ABSPATH') || exit;
|
4 |
|
5 |
class TNP_Composer {
|
6 |
+
|
7 |
static $block_dirs = array();
|
8 |
+
|
9 |
static function register_block($dir) {
|
10 |
// Checks
|
11 |
+
|
12 |
if (!file_exists($dir . '/block.php')) {
|
13 |
$error = new WP_Error('1', 'block.php missing on folder ' . $dir);
|
14 |
NewsletterEmails::instance()->logger->error($error);
|
17 |
self::$block_dirs[] = $dir;
|
18 |
return true;
|
19 |
}
|
20 |
+
|
21 |
}
|
22 |
|
23 |
/**
|
98 |
|
99 |
}
|
100 |
|
101 |
+
class NewsletterAddon {
|
102 |
+
|
103 |
+
var $logger;
|
104 |
+
var $admin_logger;
|
105 |
+
var $name;
|
106 |
+
var $options;
|
107 |
+
var $version;
|
108 |
+
|
109 |
+
public function __construct($name, $version = '0.0.0') {
|
110 |
+
$this->name = $name;
|
111 |
+
$this->version = $version;
|
112 |
+
if (is_admin()) {
|
113 |
+
$old_version = get_option('newsletter_' . $name . '_version', '0.0.0');
|
114 |
+
if ($version > $old_version) {
|
115 |
+
$this->upgrade($old_version === '0.0.0');
|
116 |
+
update_option('newsletter_' . $name . '_version', $version, false);
|
117 |
+
}
|
118 |
+
}
|
119 |
+
add_action('init', array($this, 'init'));
|
120 |
+
}
|
121 |
+
|
122 |
+
function upgrade($first_install = false) {
|
123 |
+
}
|
124 |
+
|
125 |
+
function init() {
|
126 |
+
}
|
127 |
+
|
128 |
+
function get_logger() {
|
129 |
+
if (!$this->logger) {
|
130 |
+
$this->logger = new NewsletterLogger($this->name);
|
131 |
+
}
|
132 |
+
return $this->logger;
|
133 |
+
}
|
134 |
+
|
135 |
+
function get_admin_logger() {
|
136 |
+
if (!$this->admin_logger) {
|
137 |
+
$this->admin_logger = new NewsletterLogger($this->name . '-admin');
|
138 |
+
}
|
139 |
+
return $this->admin_logger;
|
140 |
+
}
|
141 |
+
|
142 |
+
function setup_options() {
|
143 |
+
$this->options = get_option('newsletter_' . $this->name, array());
|
144 |
+
}
|
145 |
+
|
146 |
+
function save_options($options) {
|
147 |
+
update_option('newsletter_' . $this->name, $options);
|
148 |
+
$this->setup_options();
|
149 |
+
}
|
150 |
+
|
151 |
+
/**
|
152 |
+
* @global wpdb $wpdb
|
153 |
+
* @param string $query
|
154 |
+
*/
|
155 |
+
function query($query) {
|
156 |
+
global $wpdb;
|
157 |
+
|
158 |
+
$r = $wpdb->query($query);
|
159 |
+
if ($r === false) {
|
160 |
+
$logger = $this->get_logger();
|
161 |
+
$logger->fatal($query);
|
162 |
+
$logger->fatal($wpdb->last_error);
|
163 |
+
}
|
164 |
+
return $r;
|
165 |
+
}
|
166 |
+
|
167 |
+
}
|
168 |
+
|
169 |
class NewsletterModule {
|
170 |
|
171 |
/**
|
730 |
}
|
731 |
|
732 |
function add_menu_page($page, $title, $capability = '') {
|
733 |
+
if (!Newsletter::instance()->is_allowed())
|
734 |
+
return;
|
735 |
$name = 'newsletter_' . $this->module . '_' . $page;
|
736 |
add_submenu_page('newsletter_main_index', $title, $title, 'exist', $name, array($this, 'menu_page'));
|
737 |
}
|
738 |
+
|
739 |
function add_admin_page($page, $title) {
|
740 |
+
if (!Newsletter::instance()->is_allowed())
|
741 |
+
return;
|
742 |
$name = 'newsletter_' . $this->module . '_' . $page;
|
743 |
$name = apply_filters('newsletter_admin_page', $name);
|
744 |
add_submenu_page(null, $title, $title, 'exist', $name, array($this, 'menu_page'));
|
757 |
$page = str_replace('_', '-', $page);
|
758 |
|
759 |
$file = NEWSLETTER_DIR . '/' . $module . '/' . $page . '.php';
|
760 |
+
|
761 |
require $file;
|
762 |
}
|
763 |
|
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.
|
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.
|
33 |
|
34 |
global $newsletter, $wpdb;
|
35 |
|
@@ -1126,6 +1126,8 @@ class Newsletter extends NewsletterModule {
|
|
1126 |
//$this->logger->error('No get_plugin_data function available!');
|
1127 |
return $value;
|
1128 |
}
|
|
|
|
|
1129 |
|
1130 |
foreach ($extensions as $extension) {
|
1131 |
|
@@ -1153,9 +1155,9 @@ class Newsletter extends NewsletterModule {
|
|
1153 |
$plugin->plugin = $extension->plugin;
|
1154 |
$plugin->new_version = $extension->version;
|
1155 |
$plugin->url = $extension->url;
|
1156 |
-
if (class_exists('NewsletterExtensions') && $
|
1157 |
// NO filters here!
|
1158 |
-
$plugin->package = NewsletterExtensions::$instance->get_package($extension->id);
|
1159 |
} else {
|
1160 |
|
1161 |
}
|
@@ -1239,7 +1241,7 @@ class Newsletter extends NewsletterModule {
|
|
1239 |
|
1240 |
function hook_plugins_loaded() {
|
1241 |
|
1242 |
-
|
1243 |
|
1244 |
if (function_exists('load_plugin_textdomain')) {
|
1245 |
load_plugin_textdomain('newsletter', false, plugin_basename(dirname(__FILE__)) . '/languages');
|
@@ -1300,7 +1302,7 @@ class Newsletter extends NewsletterModule {
|
|
1300 |
return NEWSLETTER_LICENSE_KEY;
|
1301 |
} else {
|
1302 |
if (!empty($this->options['contract_key'])) {
|
1303 |
-
return $this->options['contract_key'];
|
1304 |
}
|
1305 |
}
|
1306 |
return false;
|
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.2.0
|
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.2.0');
|
33 |
|
34 |
global $newsletter, $wpdb;
|
35 |
|
1126 |
//$this->logger->error('No get_plugin_data function available!');
|
1127 |
return $value;
|
1128 |
}
|
1129 |
+
|
1130 |
+
$license_key = $this->get_license_key();
|
1131 |
|
1132 |
foreach ($extensions as $extension) {
|
1133 |
|
1155 |
$plugin->plugin = $extension->plugin;
|
1156 |
$plugin->new_version = $extension->version;
|
1157 |
$plugin->url = $extension->url;
|
1158 |
+
if (class_exists('NewsletterExtensions') && $extension->downloadable) {
|
1159 |
// NO filters here!
|
1160 |
+
$plugin->package = NewsletterExtensions::$instance->get_package($extension->id, $license_key);
|
1161 |
} else {
|
1162 |
|
1163 |
}
|
1241 |
|
1242 |
function hook_plugins_loaded() {
|
1243 |
|
1244 |
+
do_action('newsletter_loaded', NEWSLETTER_VERSION);
|
1245 |
|
1246 |
if (function_exists('load_plugin_textdomain')) {
|
1247 |
load_plugin_textdomain('newsletter', false, plugin_basename(dirname(__FILE__)) . '/languages');
|
1302 |
return NEWSLETTER_LICENSE_KEY;
|
1303 |
} else {
|
1304 |
if (!empty($this->options['contract_key'])) {
|
1305 |
+
return trim($this->options['contract_key']);
|
1306 |
}
|
1307 |
}
|
1308 |
return false;
|
readme.txt
CHANGED
@@ -2,7 +2,8 @@
|
|
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.3
|
5 |
-
Stable tag: 6.
|
|
|
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 +109,12 @@ Thank you, The Newsletter Team
|
|
108 |
|
109 |
== Changelog ==
|
110 |
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
= 6.1.9 =
|
112 |
|
113 |
* Fixed a missing default on profile configuration
|
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.3
|
5 |
+
Stable tag: 6.2.0
|
6 |
+
Requires PHP: 5.6
|
7 |
Contributors: satollo,webagile,michael-travan
|
8 |
|
9 |
Add a real newsletter system to your blog. For free. With unlimited newsletters and subscribers.
|
109 |
|
110 |
== Changelog ==
|
111 |
|
112 |
+
= 6.2.0 =
|
113 |
+
|
114 |
+
* Fixed integration with addons manager
|
115 |
+
* Support for new addon format
|
116 |
+
* Added PHP minimum version declaration
|
117 |
+
|
118 |
= 6.1.9 =
|
119 |
|
120 |
* Fixed a missing default on profile configuration
|
users/import.php
CHANGED
@@ -229,7 +229,7 @@ if ($controls->is_action('import')) {
|
|
229 |
<div class="tnp-tip">
|
230 |
<span class="tip-button">Tip</span>
|
231 |
<span class="tip-content">
|
232 |
-
Simply paste
|
233 |
</span>
|
234 |
</div>
|
235 |
</th>
|
229 |
<div class="tnp-tip">
|
230 |
<span class="tip-button">Tip</span>
|
231 |
<span class="tip-content">
|
232 |
+
Simply paste CSV text here.
|
233 |
</span>
|
234 |
</div>
|
235 |
</th>
|