Version Description
- Support for the Add on Manager
Download this release
Release Info
Developer | satollo |
Plugin | Newsletter |
Version | 5.7.8 |
Comparing to | |
See all releases |
Code changes from version 5.7.7 to 5.7.8
- main/extensions.php +75 -142
- plugin.php +11 -13
- readme.txt +5 -1
- subscription/subscription.php +5 -5
main/extensions.php
CHANGED
@@ -6,80 +6,20 @@ $extensions = $module->getTnpExtensions();
|
|
6 |
|
7 |
$controls->data = get_option('newsletter_main');
|
8 |
|
9 |
-
if ($
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
break;
|
16 |
-
}
|
17 |
-
}
|
18 |
-
|
19 |
-
$id = $extension->id;
|
20 |
-
$slug = $extension->slug;
|
21 |
-
|
22 |
-
$source = 'http://www.thenewsletterplugin.com/wp-content/plugins/file-commerce-pro/get.php?f=' . $id .
|
23 |
-
'&k=' . urlencode(Newsletter::instance()->options['contract_key']);
|
24 |
|
25 |
-
|
26 |
-
require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
|
27 |
-
}
|
28 |
|
29 |
-
|
30 |
-
|
31 |
-
$result = $upgrader->install($source);
|
32 |
-
if (!$result || is_wp_error($result)) {
|
33 |
-
$controls->errors = __('Error while installing', 'newsletter');
|
34 |
-
if (is_wp_error($result)) {
|
35 |
-
$controls->errors .= ': ' . $result->get_error_message();
|
36 |
-
}
|
37 |
-
} else {
|
38 |
-
$result = activate_plugin($extension->wp_slug);
|
39 |
-
if (is_wp_error($result)) {
|
40 |
-
$controls->errors .= __('Error while activating:', 'newsletter') . " " . $result->get_error_message();
|
41 |
-
} else {
|
42 |
-
$controls->messages .= __('Installed and activated', 'newsletter');
|
43 |
-
}
|
44 |
-
}
|
45 |
-
wp_clean_plugins_cache(false);
|
46 |
-
//wp_redirect(admin_url('admin.php') . '?page=newsletter_main_extensions');
|
47 |
-
//die();
|
48 |
-
}
|
49 |
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
if ($e->id == $_GET['id']) {
|
54 |
-
$extension = $e;
|
55 |
-
break;
|
56 |
-
}
|
57 |
-
}
|
58 |
-
$result = activate_plugin($extension->wp_slug);
|
59 |
-
if (is_wp_error($result)) {
|
60 |
-
$controls->errors .= __('Error while activating:', 'newsletter') . " " . $result->get_error_message();
|
61 |
-
} else {
|
62 |
-
$controls->messages .= __('Activated', 'newsletter');
|
63 |
-
}
|
64 |
-
wp_clean_plugins_cache(false);
|
65 |
-
wp_redirect(admin_url('admin.php') . '?page=newsletter_main_extensions');
|
66 |
-
die();
|
67 |
-
}
|
68 |
-
|
69 |
-
if (isset($_POST['email']) && check_admin_referer('subscribe')) {
|
70 |
-
$body = array();
|
71 |
-
$body['ne'] = $_POST['email'];
|
72 |
-
$body['nr'] = 'extensions';
|
73 |
-
$body['nl'] = array('3', '4', '1');
|
74 |
-
$body['optin'] = 'single';
|
75 |
-
|
76 |
-
wp_remote_post('http://www.thenewsletterplugin.com/?na=ajaxsub', array('body'=>$body));
|
77 |
-
|
78 |
-
update_option('newsletter_subscribed', time(), false);
|
79 |
-
|
80 |
-
$id = (int)$_POST['id'];
|
81 |
-
wp_redirect(wp_nonce_url(admin_url('admin.php'), 'save') . '&page=newsletter_main_extensions&act=install&id=' . $id);
|
82 |
-
die();
|
83 |
}
|
84 |
|
85 |
$subscribed = get_option('newsletter_subscribed', false);
|
@@ -87,144 +27,137 @@ $subscribed = get_option('newsletter_subscribed', false);
|
|
87 |
|
88 |
<div class="wrap" id="tnp-wrap">
|
89 |
|
90 |
-
|
91 |
|
92 |
<div id="tnp-heading">
|
93 |
|
94 |
<h2><?php _e('Extensions', 'newsletter') ?></h2>
|
95 |
|
|
|
|
|
96 |
</div>
|
97 |
|
98 |
<div id="tnp-body">
|
99 |
|
100 |
-
|
101 |
|
102 |
-
<!--PREMIUM EXTENSIONS-->
|
103 |
-
|
104 |
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
|
110 |
-
<!--PREMIUM EXTENSIONS-->
|
111 |
-
|
112 |
<div class="tnp-extension-premium-box <?php echo $e->slug ?>">
|
113 |
<div class="tnp-extensions-image"><img src="<?php echo $e->image ?>" alt="" /></div>
|
114 |
<h3><?php echo $e->title ?></h3>
|
115 |
<p><?php echo $e->description ?></p>
|
116 |
<div class="tnp-extension-premium-action">
|
117 |
-
|
118 |
<span><i class="fa fa-check" aria-hidden="true"></i> <?php _e('Plugin active', 'newsletter') ?></span>
|
119 |
-
|
120 |
<a href="<?php echo $e->activate_url ?>" class="tnp-extension-activate">
|
121 |
<i class="fa fa-power-off" aria-hidden="true"></i> <?php _e('Activate', 'newsletter') ?>
|
122 |
</a>
|
123 |
-
|
124 |
-
<a href="<?php echo $e->
|
125 |
-
|
126 |
</a>
|
127 |
-
|
128 |
-
<a href="https://www.thenewsletterplugin.com/premium?utm_source=plugin&utm_medium=link&utm_campaign=extpanel" class="tnp-extension-buy" target="_blank">
|
129 |
-
<i class="fa fa-shopping-cart" aria-hidden="true"></i> Buy Now
|
130 |
-
</a>
|
131 |
-
<?php } ?>
|
132 |
</div>
|
133 |
</div>
|
134 |
-
|
135 |
-
|
136 |
|
137 |
<!--FREE EXTENSIONS-->
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
<div class="tnp-extension-free-box <?php echo $e->slug ?>">
|
150 |
<img class="tnp-extensions-free-badge" src="<?php echo plugins_url('newsletter')?>/images/extension-free.png">
|
151 |
<div class="tnp-extensions-image"><img src="<?php echo $e->image ?>"></div>
|
152 |
<h3><?php echo $e->title ?></h3>
|
153 |
<p><?php echo $e->description ?></p>
|
154 |
<div class="tnp-extension-free-action">
|
155 |
-
|
156 |
<span><i class="fa fa-check" aria-hidden="true"></i> <?php _e('Plugin active', 'newsletter') ?></span>
|
157 |
-
|
158 |
<a href="<?php echo $e->activate_url ?>" class="tnp-extension-activate">
|
159 |
<i class="fa fa-power-off" aria-hidden="true"></i> <?php _e('Activate', 'newsletter') ?>
|
160 |
</a>
|
161 |
-
|
162 |
-
<a href="<?php echo $e->
|
163 |
-
<i class="fa fa-download" aria-hidden="true"></i>
|
164 |
</a>
|
165 |
-
|
166 |
</div>
|
167 |
</div>
|
168 |
-
|
169 |
|
170 |
-
|
171 |
|
172 |
-
<!--
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
<?php if ($e->type == "integration") { ?>
|
181 |
<div class="tnp-integration-box <?php echo $e->slug ?>">
|
182 |
<div class="tnp-extensions-image"><img src="<?php echo $e->image ?>" alt="" /></div>
|
183 |
<h3><?php echo $e->title ?></h3>
|
184 |
<p><?php echo $e->description ?></p>
|
185 |
<div class="tnp-integration-action">
|
186 |
-
|
187 |
<span><i class="fa fa-check" aria-hidden="true"></i> <?php _e('Plugin active', 'newsletter') ?></span>
|
188 |
-
|
189 |
<a href="<?php echo $e->activate_url ?>" class="tnp-extension-activate">
|
190 |
<i class="fa fa-power-off" aria-hidden="true"></i> <?php _e('Activate', 'newsletter') ?>
|
191 |
</a>
|
192 |
-
|
193 |
-
<a href="<?php echo $e->
|
194 |
-
|
195 |
-
</a>
|
196 |
-
<?php } else { ?>
|
197 |
-
<a href="https://www.thenewsletterplugin.com/premium?utm_source=plugin&utm_medium=link&utm_campaign=extpanel" class="tnp-extension-buy" target="_blank">
|
198 |
-
<i class="fa fa-shopping-cart" aria-hidden="true"></i> Buy Now
|
199 |
</a>
|
200 |
-
|
201 |
</div>
|
202 |
</div>
|
203 |
-
|
204 |
|
205 |
-
|
206 |
|
207 |
|
208 |
-
|
209 |
|
210 |
<p style="color: white;">No extensions available.</p>
|
211 |
|
212 |
-
|
213 |
|
214 |
|
215 |
<p class="clear"></p>
|
216 |
|
217 |
</div>
|
218 |
|
219 |
-
|
220 |
|
221 |
</div>
|
222 |
|
223 |
<script>
|
224 |
-
function newsletter_subscribe(id) {
|
225 |
-
|
226 |
-
|
227 |
-
}
|
228 |
</script>
|
229 |
|
230 |
<div id="tnp-subscribe-overlay">
|
@@ -233,10 +166,10 @@ function newsletter_subscribe(id) {
|
|
233 |
<img src="https://cdn.thenewsletterplugin.com/newsletters-img/tnp-logo-colore-text-white@2x.png">
|
234 |
</div>
|
235 |
<div id="tnp-subscribe-title">
|
236 |
-
Subscribe our newsletter to get this extension<br>
|
237 |
and be informed about updates and best practices.</div>
|
238 |
<form method="post" action="?page=newsletter_main_extensions&noheader=true">
|
239 |
-
|
240 |
<input type="hidden" value="id" name="id" id="tnp-extension-id">
|
241 |
<div id="tnp-subscribe-email-wrapper"><input type="email" id="tnp-subscribe-email" name="email" value="<?php echo esc_attr(get_option('admin_email')) ?>"></div>
|
242 |
<div id="tnp-subscribe-submit-wrapper"><input type="submit" id="tnp-subscribe-submit" value="<?php esc_attr_e('Subscribe', 'newsletter') ?>"></div>
|
6 |
|
7 |
$controls->data = get_option('newsletter_main');
|
8 |
|
9 |
+
if (isset($_POST['email']) && check_admin_referer('subscribe')) {
|
10 |
+
$body = array();
|
11 |
+
$body['ne'] = $_POST['email'];
|
12 |
+
$body['nr'] = 'extensions';
|
13 |
+
$body['nl'] = array('3', '4', '1');
|
14 |
+
$body['optin'] = 'single';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
|
16 |
+
wp_remote_post('http://www.thenewsletterplugin.com/?na=ajaxsub', array('body'=>$body));
|
|
|
|
|
17 |
|
18 |
+
update_option('newsletter_subscribed', time(), false);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
|
20 |
+
$id = (int)$_POST['id'];
|
21 |
+
wp_redirect(wp_nonce_url(admin_url('admin.php'), 'save') . '&page=newsletter_main_extensions&act=install&id=' . $id);
|
22 |
+
die();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
}
|
24 |
|
25 |
$subscribed = get_option('newsletter_subscribed', false);
|
27 |
|
28 |
<div class="wrap" id="tnp-wrap">
|
29 |
|
30 |
+
<?php include NEWSLETTER_DIR . '/tnp-header.php'; ?>
|
31 |
|
32 |
<div id="tnp-heading">
|
33 |
|
34 |
<h2><?php _e('Extensions', 'newsletter') ?></h2>
|
35 |
|
36 |
+
<p><?php _e('Extend your Newsletter experience with our addons', 'newsletter') ?>.</p>
|
37 |
+
|
38 |
</div>
|
39 |
|
40 |
<div id="tnp-body">
|
41 |
|
42 |
+
<?php if (is_array($extensions)) { ?>
|
43 |
|
44 |
+
<!--PREMIUM EXTENSIONS-->
|
45 |
+
<?php foreach ($extensions AS $e) { ?>
|
46 |
|
47 |
+
<?php
|
48 |
+
$e->activate_url = wp_nonce_url(admin_url('admin.php') . '?page=newsletter_main_extensions&act=activate&id=' . $e->id, 'save');
|
49 |
+
$e->install_url = wp_nonce_url(admin_url('admin.php') . '?page=newsletter_main_extensions&act=install&id=' . $e->id, 'save');
|
50 |
+
?>
|
51 |
|
52 |
+
<!--PREMIUM EXTENSIONS-->
|
53 |
+
<?php if ($e->type == "premium") { ?>
|
54 |
<div class="tnp-extension-premium-box <?php echo $e->slug ?>">
|
55 |
<div class="tnp-extensions-image"><img src="<?php echo $e->image ?>" alt="" /></div>
|
56 |
<h3><?php echo $e->title ?></h3>
|
57 |
<p><?php echo $e->description ?></p>
|
58 |
<div class="tnp-extension-premium-action">
|
59 |
+
<?php if (is_plugin_active($e->wp_slug)) { ?>
|
60 |
<span><i class="fa fa-check" aria-hidden="true"></i> <?php _e('Plugin active', 'newsletter') ?></span>
|
61 |
+
<?php } elseif (file_exists(WP_PLUGIN_DIR . "/" . $e->wp_slug)) { ?>
|
62 |
<a href="<?php echo $e->activate_url ?>" class="tnp-extension-activate">
|
63 |
<i class="fa fa-power-off" aria-hidden="true"></i> <?php _e('Activate', 'newsletter') ?>
|
64 |
</a>
|
65 |
+
<?php } else { ?>
|
66 |
+
<a href="<?php echo $e->url ?>" class="tnp-extension-install" target="_blank">
|
67 |
+
BUY NOW
|
68 |
</a>
|
69 |
+
<?php } ?>
|
|
|
|
|
|
|
|
|
70 |
</div>
|
71 |
</div>
|
72 |
+
<?php } ?>
|
73 |
+
<?php } ?>
|
74 |
|
75 |
<!--FREE EXTENSIONS-->
|
76 |
+
<?php foreach ($extensions AS $e) { ?>
|
77 |
+
|
78 |
+
<?php
|
79 |
+
$e->activate_url = wp_nonce_url(admin_url('admin.php') . '?page=newsletter_main_extensions&act=activate&id=' . $e->id, 'save');
|
80 |
+
if ($subscribed) {
|
81 |
+
$e->install_url = wp_nonce_url(admin_url('admin.php') . '?page=newsletter_main_extensions&act=install&id=' . $e->id, 'save');
|
82 |
+
} else {
|
83 |
+
$e->install_url = 'javascript:newsletter_subscribe(' . $e->id . ')';
|
84 |
+
}
|
85 |
+
?>
|
86 |
+
<?php if ($e->type == "free") { ?>
|
87 |
<div class="tnp-extension-free-box <?php echo $e->slug ?>">
|
88 |
<img class="tnp-extensions-free-badge" src="<?php echo plugins_url('newsletter')?>/images/extension-free.png">
|
89 |
<div class="tnp-extensions-image"><img src="<?php echo $e->image ?>"></div>
|
90 |
<h3><?php echo $e->title ?></h3>
|
91 |
<p><?php echo $e->description ?></p>
|
92 |
<div class="tnp-extension-free-action">
|
93 |
+
<?php if (is_plugin_active($e->wp_slug)) { ?>
|
94 |
<span><i class="fa fa-check" aria-hidden="true"></i> <?php _e('Plugin active', 'newsletter') ?></span>
|
95 |
+
<?php } elseif (file_exists(WP_PLUGIN_DIR . "/" . $e->wp_slug)) { ?>
|
96 |
<a href="<?php echo $e->activate_url ?>" class="tnp-extension-activate">
|
97 |
<i class="fa fa-power-off" aria-hidden="true"></i> <?php _e('Activate', 'newsletter') ?>
|
98 |
</a>
|
99 |
+
<?php } else { ?>
|
100 |
+
<a href="<?php echo $e->url ?>" class="tnp-extension-install" target="_blank">
|
101 |
+
<i class="fa fa-download" aria-hidden="true"></i> Download now
|
102 |
</a>
|
103 |
+
<?php } ?>
|
104 |
</div>
|
105 |
</div>
|
106 |
+
<?php } ?>
|
107 |
|
108 |
+
<?php } ?>
|
109 |
|
110 |
+
<!-- INTEGRATIONS -->
|
111 |
+
<?php foreach ($extensions AS $e) { ?>
|
112 |
+
|
113 |
+
<?php
|
114 |
+
$e->activate_url = wp_nonce_url(admin_url('admin.php') . '?page=newsletter_main_extensions&act=activate&id=' . $e->id, 'save');
|
115 |
+
$e->install_url = wp_nonce_url(admin_url('admin.php') . '?page=newsletter_main_extensions&act=install&id=' . $e->id, 'save');
|
116 |
+
?>
|
117 |
+
<?php if ($e->type == "integration") { ?>
|
|
|
118 |
<div class="tnp-integration-box <?php echo $e->slug ?>">
|
119 |
<div class="tnp-extensions-image"><img src="<?php echo $e->image ?>" alt="" /></div>
|
120 |
<h3><?php echo $e->title ?></h3>
|
121 |
<p><?php echo $e->description ?></p>
|
122 |
<div class="tnp-integration-action">
|
123 |
+
<?php if (is_plugin_active($e->wp_slug)) { ?>
|
124 |
<span><i class="fa fa-check" aria-hidden="true"></i> <?php _e('Plugin active', 'newsletter') ?></span>
|
125 |
+
<?php } elseif (file_exists(WP_PLUGIN_DIR . "/" . $e->wp_slug)) { ?>
|
126 |
<a href="<?php echo $e->activate_url ?>" class="tnp-extension-activate">
|
127 |
<i class="fa fa-power-off" aria-hidden="true"></i> <?php _e('Activate', 'newsletter') ?>
|
128 |
</a>
|
129 |
+
<?php } else { ?>
|
130 |
+
<a href="<?php echo $e->url ?>" class="tnp-extension-install" target="_blank">
|
131 |
+
BUY NOW
|
|
|
|
|
|
|
|
|
132 |
</a>
|
133 |
+
<?php } ?>
|
134 |
</div>
|
135 |
</div>
|
136 |
+
<?php } ?>
|
137 |
|
138 |
+
<?php } ?>
|
139 |
|
140 |
|
141 |
+
<?php } else { ?>
|
142 |
|
143 |
<p style="color: white;">No extensions available.</p>
|
144 |
|
145 |
+
<?php } ?>
|
146 |
|
147 |
|
148 |
<p class="clear"></p>
|
149 |
|
150 |
</div>
|
151 |
|
152 |
+
<?php include NEWSLETTER_DIR . '/tnp-footer.php'; ?>
|
153 |
|
154 |
</div>
|
155 |
|
156 |
<script>
|
157 |
+
function newsletter_subscribe(id) {
|
158 |
+
document.getElementById("tnp-extension-id").value = id;
|
159 |
+
jQuery("#tnp-subscribe-overlay").fadeIn(500);
|
160 |
+
}
|
161 |
</script>
|
162 |
|
163 |
<div id="tnp-subscribe-overlay">
|
166 |
<img src="https://cdn.thenewsletterplugin.com/newsletters-img/tnp-logo-colore-text-white@2x.png">
|
167 |
</div>
|
168 |
<div id="tnp-subscribe-title">
|
169 |
+
Subscribe our newsletter to get this extension<br>
|
170 |
and be informed about updates and best practices.</div>
|
171 |
<form method="post" action="?page=newsletter_main_extensions&noheader=true">
|
172 |
+
<?php wp_nonce_field('subscribe'); ?>
|
173 |
<input type="hidden" value="id" name="id" id="tnp-extension-id">
|
174 |
<div id="tnp-subscribe-email-wrapper"><input type="email" id="tnp-subscribe-email" name="email" value="<?php echo esc_attr(get_option('admin_email')) ?>"></div>
|
175 |
<div id="tnp-subscribe-submit-wrapper"><input type="submit" id="tnp-subscribe-submit" value="<?php esc_attr_e('Subscribe', 'newsletter') ?>"></div>
|
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.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.
|
@@ -14,7 +14,7 @@
|
|
14 |
*/
|
15 |
|
16 |
// Used as dummy parameter on css and js links
|
17 |
-
define('NEWSLETTER_VERSION', '5.7.
|
18 |
|
19 |
global $newsletter, $wpdb;
|
20 |
|
@@ -332,12 +332,12 @@ class Newsletter extends NewsletterModule {
|
|
332 |
$this->add_admin_page('smtp', 'SMTP');
|
333 |
$this->add_admin_page('status', 'Status', 'manage_options');
|
334 |
$this->add_admin_page('info', 'Company info');
|
335 |
-
//$this->add_admin_page('diagnostic', 'Diagnostic');
|
336 |
-
//$this->add_admin_page('startup', 'Quick Startup');
|
337 |
}
|
338 |
|
339 |
function add_extensions_menu() {
|
340 |
-
|
|
|
|
|
341 |
}
|
342 |
|
343 |
/**
|
@@ -709,7 +709,6 @@ class Newsletter extends NewsletterModule {
|
|
709 |
if (!$user_id) {
|
710 |
return;
|
711 |
}
|
712 |
-
//$this->logger->debug('Query');
|
713 |
$wpdb->query($wpdb->prepare("insert into " . $wpdb->prefix . 'newsletter_sent (user_id, email_id, time, status, error) values (%d, %d, %d, %d, %s) on duplicate key update time=%d, status=%d, error=%s', $user_id, $email_id, time(), $status, $error, time(), $status, $error));
|
714 |
}
|
715 |
|
@@ -1133,12 +1132,11 @@ class Newsletter extends NewsletterModule {
|
|
1133 |
$plugin->url = '';
|
1134 |
$value->response[$extension->plugin] = $plugin;
|
1135 |
|
1136 |
-
|
1137 |
-
|
1138 |
-
|
1139 |
-
|
1140 |
-
$value->response[$extension->plugin]->package =
|
1141 |
-
'&k=' . Newsletter::instance()->options['contract_key'];
|
1142 |
}
|
1143 |
|
1144 |
return $value;
|
@@ -1150,7 +1148,7 @@ class Newsletter extends NewsletterModule {
|
|
1150 |
*/
|
1151 |
function getTnpExtensions() {
|
1152 |
|
1153 |
-
$extensions_json = get_transient('tnp_extensions_json');
|
1154 |
|
1155 |
if (false === $extensions_json) {
|
1156 |
$url = "http://www.thenewsletterplugin.com/wp-content/extensions.json";
|
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.7.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.
|
14 |
*/
|
15 |
|
16 |
// Used as dummy parameter on css and js links
|
17 |
+
define('NEWSLETTER_VERSION', '5.7.8');
|
18 |
|
19 |
global $newsletter, $wpdb;
|
20 |
|
332 |
$this->add_admin_page('smtp', 'SMTP');
|
333 |
$this->add_admin_page('status', 'Status', 'manage_options');
|
334 |
$this->add_admin_page('info', 'Company info');
|
|
|
|
|
335 |
}
|
336 |
|
337 |
function add_extensions_menu() {
|
338 |
+
if (!class_exists('NewsletterExtensions')) {
|
339 |
+
$this->add_menu_page('extensions', '<span style="color:#27AE60; font-weight: bold;">Add-ons</span>');
|
340 |
+
}
|
341 |
}
|
342 |
|
343 |
/**
|
709 |
if (!$user_id) {
|
710 |
return;
|
711 |
}
|
|
|
712 |
$wpdb->query($wpdb->prepare("insert into " . $wpdb->prefix . 'newsletter_sent (user_id, email_id, time, status, error) values (%d, %d, %d, %d, %s) on duplicate key update time=%d, status=%d, error=%s', $user_id, $email_id, time(), $status, $error, time(), $status, $error));
|
713 |
}
|
714 |
|
1132 |
$plugin->url = '';
|
1133 |
$value->response[$extension->plugin] = $plugin;
|
1134 |
|
1135 |
+
$value->response[$extension->plugin]->package = '';
|
1136 |
+
|
1137 |
+
if (class_exists('NewsletterExtensions')) {
|
1138 |
+
// NO filters here!
|
1139 |
+
$value->response[$extension->plugin]->package = NewsletterExtensions::$instance->get_package($extension->id);
|
|
|
1140 |
}
|
1141 |
|
1142 |
return $value;
|
1148 |
*/
|
1149 |
function getTnpExtensions() {
|
1150 |
|
1151 |
+
$extensions_json = false; //get_transient('tnp_extensions_json');
|
1152 |
|
1153 |
if (false === $extensions_json) {
|
1154 |
$url = "http://www.thenewsletterplugin.com/wp-content/extensions.json";
|
readme.txt
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
Tags: newsletter,email,subscription,mass mail,list build,email marketing,direct mailing,automation,automated,mailing list
|
3 |
Requires at least: 3.4.0
|
4 |
Tested up to: 4.9.8
|
5 |
-
Stable tag: 5.7.
|
6 |
Contributors: satollo,webagile,michael-travan
|
7 |
|
8 |
Add a real newsletter system to your blog. For free. With unlimited newsletters and subscribers.
|
@@ -117,6 +117,10 @@ Thank you, The Newsletter Team
|
|
117 |
|
118 |
== Changelog ==
|
119 |
|
|
|
|
|
|
|
|
|
120 |
= 5.7.7 =
|
121 |
|
122 |
* TinyMCE library fix
|
2 |
Tags: newsletter,email,subscription,mass mail,list build,email marketing,direct mailing,automation,automated,mailing list
|
3 |
Requires at least: 3.4.0
|
4 |
Tested up to: 4.9.8
|
5 |
+
Stable tag: 5.7.8
|
6 |
Contributors: satollo,webagile,michael-travan
|
7 |
|
8 |
Add a real newsletter system to your blog. For free. With unlimited newsletters and subscribers.
|
117 |
|
118 |
== Changelog ==
|
119 |
|
120 |
+
= 5.7.8 =
|
121 |
+
|
122 |
+
* Support for the [Add on Manager](https://www.thenewsletterplugin.com/documentation/how-to-install-the-addons-manager)
|
123 |
+
|
124 |
= 5.7.7 =
|
125 |
|
126 |
* TinyMCE library fix
|
subscription/subscription.php
CHANGED
@@ -71,19 +71,19 @@ class NewsletterSubscription extends NewsletterModule {
|
|
71 |
$data = array();
|
72 |
$data['messages'] = array();
|
73 |
if (isset($options['email_error'])) {
|
74 |
-
$data['messages']['email_error'] = $
|
75 |
}
|
76 |
if (isset($options['name_error'])) {
|
77 |
-
$data['messages']['name_error'] = $
|
78 |
}
|
79 |
if (isset($options['surname_error'])) {
|
80 |
-
$data['messages']['surname_error'] = $
|
81 |
}
|
82 |
if (isset($options['profile_error'])) {
|
83 |
-
$data['messages']['profile_error'] = $
|
84 |
}
|
85 |
if (isset($options['privacy_error'])) {
|
86 |
-
$data['messages']['privacy_error'] = $
|
87 |
}
|
88 |
$data['profile_max'] = NEWSLETTER_PROFILE_MAX;
|
89 |
wp_localize_script('newsletter-subscription', 'newsletter', $data);
|
71 |
$data = array();
|
72 |
$data['messages'] = array();
|
73 |
if (isset($options['email_error'])) {
|
74 |
+
$data['messages']['email_error'] = $options['email_error'];
|
75 |
}
|
76 |
if (isset($options['name_error'])) {
|
77 |
+
$data['messages']['name_error'] = $options['name_error'];
|
78 |
}
|
79 |
if (isset($options['surname_error'])) {
|
80 |
+
$data['messages']['surname_error'] = $options['surname_error'];
|
81 |
}
|
82 |
if (isset($options['profile_error'])) {
|
83 |
+
$data['messages']['profile_error'] = $options['profile_error'];
|
84 |
}
|
85 |
if (isset($options['privacy_error'])) {
|
86 |
+
$data['messages']['privacy_error'] = $options['privacy_error'];
|
87 |
}
|
88 |
$data['profile_max'] = NEWSLETTER_PROFILE_MAX;
|
89 |
wp_localize_script('newsletter-subscription', 'newsletter', $data);
|