Newsletter - Version 6.6.8

Version Description

  • Fixed newsletter view returning "not found"
Download this release

Release Info

Developer satollo
Plugin Icon 128x128 Newsletter
Version 6.6.8
Comparing to
See all releases

Code changes from version 6.6.7 to 6.6.8

Files changed (6) hide show
  1. admin.css +5 -1
  2. admin.js +8 -0
  3. emails/emails.php +3 -0
  4. includes/controls.php +13 -2
  5. plugin.php +2 -2
  6. readme.txt +5 -1
admin.css CHANGED
@@ -2235,6 +2235,7 @@ span.tnp-email-status-new {
2235
  padding: 2px 10px;
2236
  border-radius: 4px;
2237
  color: #fff;
 
2238
  }
2239
 
2240
  span.tnp-email-status-paused {
@@ -2242,6 +2243,7 @@ span.tnp-email-status-paused {
2242
  padding: 2px 10px;
2243
  border-radius: 4px;
2244
  color: #fff;
 
2245
  }
2246
 
2247
  span.tnp-email-status-sending {
@@ -2249,7 +2251,7 @@ span.tnp-email-status-sending {
2249
  padding: 2px 10px;
2250
  border-radius: 4px;
2251
  color: #fff;
2252
-
2253
  }
2254
 
2255
  span.tnp-email-status-scheduled {
@@ -2257,6 +2259,7 @@ span.tnp-email-status-scheduled {
2257
  padding: 2px 10px;
2258
  border-radius: 4px;
2259
  color: #fff;
 
2260
  }
2261
 
2262
  span.tnp-email-status-sent {
@@ -2264,6 +2267,7 @@ span.tnp-email-status-sent {
2264
  padding: 2px 10px;
2265
  border-radius: 4px;
2266
  color: #fff;
 
2267
  }
2268
 
2269
 
2235
  padding: 2px 10px;
2236
  border-radius: 4px;
2237
  color: #fff;
2238
+ white-space: nowrap;
2239
  }
2240
 
2241
  span.tnp-email-status-paused {
2243
  padding: 2px 10px;
2244
  border-radius: 4px;
2245
  color: #fff;
2246
+ white-space: nowrap;
2247
  }
2248
 
2249
  span.tnp-email-status-sending {
2251
  padding: 2px 10px;
2252
  border-radius: 4px;
2253
  color: #fff;
2254
+ white-space: nowrap;
2255
  }
2256
 
2257
  span.tnp-email-status-scheduled {
2259
  padding: 2px 10px;
2260
  border-radius: 4px;
2261
  color: #fff;
2262
+ white-space: nowrap;
2263
  }
2264
 
2265
  span.tnp-email-status-sent {
2267
  padding: 2px 10px;
2268
  border-radius: 4px;
2269
  color: #fff;
2270
+ white-space: nowrap;
2271
  }
2272
 
2273
 
admin.js CHANGED
@@ -45,6 +45,14 @@ function tnp_toggle_schedule() {
45
  jQuery("#tnp-schedule").toggle();
46
  }
47
 
 
 
 
 
 
 
 
 
48
  window.onload = function () {
49
  jQuery('.tnp-counter-animation').each(function () {
50
  var _this = jQuery(this);
45
  jQuery("#tnp-schedule").toggle();
46
  }
47
 
48
+ function tnp_select_toggle(s, t) {
49
+ if (s.value == 1) {
50
+ jQuery("#options-" + t).show();
51
+ } else {
52
+ jQuery("#options-" + t).hide();
53
+ }
54
+ }
55
+
56
  window.onload = function () {
57
  jQuery('.tnp-counter-animation').each(function () {
58
  var _this = jQuery(this);
emails/emails.php CHANGED
@@ -499,6 +499,9 @@ class NewsletterEmails extends NewsletterModule {
499
  switch ($action) {
500
  case 'v':
501
  case 'view':
 
 
 
502
  if (empty($email)) {
503
  header("HTTP/1.0 404 Not Found");
504
  die('Email not found');
499
  switch ($action) {
500
  case 'v':
501
  case 'view':
502
+ if (empty($email)) {
503
+ $email = $this->get_email($_GET['id']);
504
+ }
505
  if (empty($email)) {
506
  header("HTTP/1.0 404 Not Found");
507
  die('Email not found');
includes/controls.php CHANGED
@@ -455,10 +455,14 @@ class NewsletterControls {
455
  echo '</select>&nbsp;&nbsp;&nbsp;';
456
  }
457
 
458
- function enabled($name = 'enabled') {
459
  $value = isset($this->data[$name]) ? (int) $this->data[$name] : 0;
460
 
461
- echo '<select style="width: 100px" name="options[' . esc_attr($name) . ']">';
 
 
 
 
462
  echo '<option value="0"';
463
  if ($value == 0) {
464
  echo ' selected';
@@ -470,6 +474,13 @@ class NewsletterControls {
470
  }
471
  echo '>', __('Enabled', 'newsletter'), '</option>';
472
  echo '</select>';
 
 
 
 
 
 
 
473
  }
474
 
475
  function disabled($name) {
455
  echo '</select>&nbsp;&nbsp;&nbsp;';
456
  }
457
 
458
+ function enabled($name = 'enabled', $attrs = []) {
459
  $value = isset($this->data[$name]) ? (int) $this->data[$name] : 0;
460
 
461
+ echo '<select style="width: 100px" name="options[', esc_attr($name), ']" id="options-', esc_attr($name), '"';
462
+ if (isset($attrs['bind_to'])) {
463
+ echo ' onchange="tnp_select_toggle(this, \'', $attrs['bind_to'], '\')"';
464
+ }
465
+ echo '>';
466
  echo '<option value="0"';
467
  if ($value == 0) {
468
  echo ' selected';
474
  }
475
  echo '>', __('Enabled', 'newsletter'), '</option>';
476
  echo '</select>';
477
+ if (isset($attrs['bind_to'])) {
478
+ if ($value) {
479
+ echo '<script>jQuery(function ($) {$("#options-', $attrs['bind_to'], '").show()})</script>';
480
+ } else {
481
+ echo '<script>jQuery(function ($) {$("#options-', $attrs['bind_to'], '").hide()})</script>';
482
+ }
483
+ }
484
  }
485
 
486
  function disabled($name) {
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.6.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.
@@ -35,7 +35,7 @@ if (version_compare(phpversion(), '5.6', '<')) {
35
  return;
36
  }
37
 
38
- define('NEWSLETTER_VERSION', '6.6.7');
39
 
40
  global $newsletter, $wpdb;
41
 
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.6.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.
35
  return;
36
  }
37
 
38
+ define('NEWSLETTER_VERSION', '6.6.8');
39
 
40
  global $newsletter, $wpdb;
41
 
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.4.1
5
- Stable tag: 6.6.7
6
  Requires PHP: 5.6
7
  Contributors: satollo,webagile,michael-travan
8
 
@@ -109,6 +109,10 @@ Thank you, The Newsletter Team
109
 
110
  == Changelog ==
111
 
 
 
 
 
112
  = 6.6.7 =
113
 
114
  * Fixed a debug notice on image resize
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.4.1
5
+ Stable tag: 6.6.8
6
  Requires PHP: 5.6
7
  Contributors: satollo,webagile,michael-travan
8
 
109
 
110
  == Changelog ==
111
 
112
+ = 6.6.8 =
113
+
114
+ * Fixed newsletter view returning "not found"
115
+
116
  = 6.6.7 =
117
 
118
  * Fixed a debug notice on image resize