Newsletter - Version 5.1.5

Version Description

=

  • Re-confirmation is now allows for unsubscribed and bounced
  • Fixed to minimal widget and minimal css
  • Fixed the approx. subscriber count on newsletter creation (was showing encoded data)

=

Download this release

Release Info

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

Code changes from version 5.1.4 to 5.1.5

admin.css CHANGED
@@ -245,6 +245,7 @@
245
  max-width: 200px;
246
  color: #000000;
247
  background-color: #ECF0F1;
 
248
  }
249
 
250
  #tnp-body .form-table th small {
245
  max-width: 200px;
246
  color: #000000;
247
  background-color: #ECF0F1;
248
+ vertical-align: top;
249
  }
250
 
251
  #tnp-body .form-table th small {
emails/edit-editor.php CHANGED
@@ -17,6 +17,7 @@
17
  image_title: true,
18
  plugins: "table fullscreen legacyoutput textcolor colorpicker link image code lists advlist",
19
  relative_urls: false,
 
20
  remove_script_host: false,
21
  document_base_url: "<?php echo esc_js(get_option('home')) ?>/",
22
  content_css: ["<?php echo plugins_url('newsletter') ?>/emails/editor.css", "<?php echo home_url('/') . '?na=emails-css&id=' . $email_id . '&' . time(); ?>"]
17
  image_title: true,
18
  plugins: "table fullscreen legacyoutput textcolor colorpicker link image code lists advlist",
19
  relative_urls: false,
20
+ convert_urls: false,
21
  remove_script_host: false,
22
  document_base_url: "<?php echo esc_js(get_option('home')) ?>/",
23
  content_css: ["<?php echo plugins_url('newsletter') ?>/emails/editor.css", "<?php echo home_url('/') . '?na=emails-css&id=' . $email_id . '&' . time(); ?>"]
emails/edit.php CHANGED
@@ -6,6 +6,9 @@ $module = NewsletterEmails::instance();
6
 
7
  // Always required
8
  $email = Newsletter::instance()->get_email($_GET['id'], ARRAY_A);
 
 
 
9
 
10
  if (empty($email)) {
11
  echo 'Wrong email identifier';
@@ -97,7 +100,8 @@ if ($controls->is_action('test') || $controls->is_action('save') || $controls->i
97
 
98
  // Reset the options
99
  $email['options'] = array();
100
- if ($composer) $email['options']['composer'] = true;
 
101
 
102
  foreach ($controls->data as $name => $value) {
103
  if (strpos($name, 'options_') === 0) {
@@ -325,7 +329,7 @@ if (isset($controls->data['options_status']) && $controls->data['options_status'
325
  <?php if ($email['status'] == 'paused') $controls->button_confirm('continue', __('Continue', 'newsletter'), 'Continue the delivery?'); ?>
326
  <?php if ($email['status'] == 'paused') $controls->button_confirm('abort', __('Stop', 'newsletter'), __('This totally stop the delivery, ok?', 'newsletter')); ?>
327
  <?php if ($email['status'] != 'sending' && $email['status'] != 'sent') $controls->button('editor', __('Switch editor')); ?>
328
- <?php //if ($images) $controls->button_confirm('import', __('Import images', 'newsletter'), 'Proceed?') ?>
329
  </div>
330
 
331
  <?php $controls->text('subject', 70, 'Subject'); ?>
@@ -379,14 +383,7 @@ if (isset($controls->data['options_status']) && $controls->data['options_status'
379
  <?php _e('Leaving all multichoice options unselected is like to select all them', 'newsletter'); ?>
380
  </p>
381
  <table class="form-table">
382
-
383
- <tr valign="top">
384
- <th><?php _e('Gender', 'newsletter') ?></th>
385
- <td>
386
- <?php $controls->checkboxes_group('options_sex', array('f' => 'Women', 'm' => 'Men', 'n' => 'Not specified')); ?>
387
- </td>
388
- </tr>
389
- <tr valign="top">
390
  <th><?php _e('Lists', 'newsletter') ?></th>
391
  <td>
392
  <?php
@@ -399,25 +396,30 @@ if (isset($controls->data['options_status']) && $controls->data['options_status'
399
  <p><?php _e('must not in one of', 'newsletter') ?></p>
400
 
401
  <?php $controls->select2('options_lists_exclude', $lists, null, true, null, __('None', 'newsletter')); ?>
402
-
403
-
404
  </td>
405
  </tr>
 
 
 
 
 
 
 
406
 
407
- <tr valign="top">
408
  <th><?php _e('Status', 'newsletter') ?></th>
409
  <td>
410
  <?php $controls->select('options_status', array('C' => __('Confirmed', 'newsletter'), 'S' => __('Not confirmed', 'newsletter'))); ?>
411
 
412
  </td>
413
  </tr>
414
- <tr valign="top">
415
  <th><?php _e('Only to subscribers linked to WP users', 'newsletter') ?></th>
416
  <td>
417
  <?php $controls->yesno('options_wp_users'); ?>
418
  </td>
419
  </tr>
420
- <tr valign="top">
421
  <th>
422
  <?php _e('Approximated subscribers count', 'newsletter') ?>
423
  </th>
@@ -442,7 +444,7 @@ if (isset($controls->data['options_status']) && $controls->data['options_status'
442
 
443
  <div id="tabs-d">
444
  <table class="form-table">
445
- <tr valign="top">
446
  <th><?php _e('Keep private', 'newsletter') ?></th>
447
  <td>
448
  <?php $controls->yesno('private'); ?>
@@ -455,13 +457,13 @@ if (isset($controls->data['options_status']) && $controls->data['options_status'
455
  </p>
456
  </td>
457
  </tr>
458
- <tr valign="top">
459
  <th><?php _e('Track clicks and message opening', 'newsletter') ?></th>
460
  <td>
461
  <?php $controls->yesno('track'); ?>
462
  </td>
463
  </tr>
464
- <tr valign="top">
465
  <th><?php _e('Send on', 'newsletter') ?></th>
466
  <td>
467
  <?php $controls->datetime('send_on'); ?> (now: <?php echo date_i18n(get_option('date_format') . ' ' . get_option('time_format')); ?>)
@@ -474,19 +476,19 @@ if (isset($controls->data['options_status']) && $controls->data['options_status'
474
 
475
  <div id="tabs-status">
476
  <table class="form-table">
477
- <tr valign="top">
478
  <th>Email status</th>
479
  <td><?php echo esc_html($email['status']); ?></td>
480
  </tr>
481
- <tr valign="top">
482
  <th>Messages sent</th>
483
  <td><?php echo $email['sent']; ?> of <?php echo $email['total']; ?></td>
484
  </tr>
485
- <tr valign="top">
486
  <th>Query (tech)</th>
487
  <td><?php echo esc_html($email['query']); ?></td>
488
  </tr>
489
- <tr valign="top">
490
  <th>Token (tech)</th>
491
  <td><?php echo esc_html($email['token']); ?></td>
492
  </tr>
6
 
7
  // Always required
8
  $email = Newsletter::instance()->get_email($_GET['id'], ARRAY_A);
9
+ if (empty($email['query'])) {
10
+ $email['query'] = "select * from " . NEWSLETTER_USERS_TABLE . " where status='C'";
11
+ }
12
 
13
  if (empty($email)) {
14
  echo 'Wrong email identifier';
100
 
101
  // Reset the options
102
  $email['options'] = array();
103
+ if ($composer)
104
+ $email['options']['composer'] = true;
105
 
106
  foreach ($controls->data as $name => $value) {
107
  if (strpos($name, 'options_') === 0) {
329
  <?php if ($email['status'] == 'paused') $controls->button_confirm('continue', __('Continue', 'newsletter'), 'Continue the delivery?'); ?>
330
  <?php if ($email['status'] == 'paused') $controls->button_confirm('abort', __('Stop', 'newsletter'), __('This totally stop the delivery, ok?', 'newsletter')); ?>
331
  <?php if ($email['status'] != 'sending' && $email['status'] != 'sent') $controls->button('editor', __('Switch editor')); ?>
332
+ <?php //if ($images) $controls->button_confirm('import', __('Import images', 'newsletter'), 'Proceed?') ?>
333
  </div>
334
 
335
  <?php $controls->text('subject', 70, 'Subject'); ?>
383
  <?php _e('Leaving all multichoice options unselected is like to select all them', 'newsletter'); ?>
384
  </p>
385
  <table class="form-table">
386
+ <tr>
 
 
 
 
 
 
 
387
  <th><?php _e('Lists', 'newsletter') ?></th>
388
  <td>
389
  <?php
396
  <p><?php _e('must not in one of', 'newsletter') ?></p>
397
 
398
  <?php $controls->select2('options_lists_exclude', $lists, null, true, null, __('None', 'newsletter')); ?>
 
 
399
  </td>
400
  </tr>
401
+ <tr>
402
+ <th><?php _e('Gender', 'newsletter') ?></th>
403
+ <td>
404
+ <?php $controls->checkboxes_group('options_sex', array('f' => 'Women', 'm' => 'Men', 'n' => 'Not specified')); ?>
405
+ </td>
406
+ </tr>
407
+
408
 
409
+ <tr>
410
  <th><?php _e('Status', 'newsletter') ?></th>
411
  <td>
412
  <?php $controls->select('options_status', array('C' => __('Confirmed', 'newsletter'), 'S' => __('Not confirmed', 'newsletter'))); ?>
413
 
414
  </td>
415
  </tr>
416
+ <tr>
417
  <th><?php _e('Only to subscribers linked to WP users', 'newsletter') ?></th>
418
  <td>
419
  <?php $controls->yesno('options_wp_users'); ?>
420
  </td>
421
  </tr>
422
+ <tr>
423
  <th>
424
  <?php _e('Approximated subscribers count', 'newsletter') ?>
425
  </th>
444
 
445
  <div id="tabs-d">
446
  <table class="form-table">
447
+ <tr>
448
  <th><?php _e('Keep private', 'newsletter') ?></th>
449
  <td>
450
  <?php $controls->yesno('private'); ?>
457
  </p>
458
  </td>
459
  </tr>
460
+ <tr>
461
  <th><?php _e('Track clicks and message opening', 'newsletter') ?></th>
462
  <td>
463
  <?php $controls->yesno('track'); ?>
464
  </td>
465
  </tr>
466
+ <tr>
467
  <th><?php _e('Send on', 'newsletter') ?></th>
468
  <td>
469
  <?php $controls->datetime('send_on'); ?> (now: <?php echo date_i18n(get_option('date_format') . ' ' . get_option('time_format')); ?>)
476
 
477
  <div id="tabs-status">
478
  <table class="form-table">
479
+ <tr>
480
  <th>Email status</th>
481
  <td><?php echo esc_html($email['status']); ?></td>
482
  </tr>
483
+ <tr>
484
  <th>Messages sent</th>
485
  <td><?php echo $email['sent']; ?> of <?php echo $email['total']; ?></td>
486
  </tr>
487
+ <tr>
488
  <th>Query (tech)</th>
489
  <td><?php echo esc_html($email['query']); ?></td>
490
  </tr>
491
+ <tr>
492
  <th>Token (tech)</th>
493
  <td><?php echo esc_html($email['token']); ?></td>
494
  </tr>
emails/emails.php CHANGED
@@ -1,7 +1,6 @@
1
  <?php
2
 
3
- if (!defined('ABSPATH'))
4
- exit;
5
 
6
  require_once NEWSLETTER_INCLUDES_DIR . '/themes.php';
7
  require_once NEWSLETTER_INCLUDES_DIR . '/module.php';
@@ -445,11 +444,13 @@ class NewsletterEmails extends NewsletterModule {
445
  }
446
 
447
  function get_blocks() {
448
- /* READ THE BLOCKS */
449
- $blocks_dir = NEWSLETTER_DIR . '/emails/tnp-composer/blocks/';
450
- $files = glob($blocks_dir . '*.block.php', GLOB_BRACE);
451
  $blocks = array();
452
- foreach ($files as $file) {
 
 
 
 
453
  $path_parts = pathinfo($file);
454
  $filename = $path_parts['filename'];
455
  $section = substr($filename, 0, strpos($filename, '-'));
@@ -462,6 +463,7 @@ class NewsletterEmails extends NewsletterModule {
462
  $block['description'] = '';
463
  $blocks[$filename] = $block;
464
  }
 
465
 
466
  $list = $this->scan_blocks_dir(__DIR__ . '/blocks');
467
 
1
  <?php
2
 
3
+ defined('ABSPATH') || exit;
 
4
 
5
  require_once NEWSLETTER_INCLUDES_DIR . '/themes.php';
6
  require_once NEWSLETTER_INCLUDES_DIR . '/module.php';
444
  }
445
 
446
  function get_blocks() {
447
+
 
 
448
  $blocks = array();
449
+
450
+ $handle = opendir(NEWSLETTER_DIR . '/emails/tnp-composer/blocks');
451
+ while ($file = readdir($handle)) {
452
+ if (strpos($file, '.php') === false) continue;
453
+
454
  $path_parts = pathinfo($file);
455
  $filename = $path_parts['filename'];
456
  $section = substr($filename, 0, strpos($filename, '-'));
463
  $block['description'] = '';
464
  $blocks[$filename] = $block;
465
  }
466
+ closedir($handle);
467
 
468
  $list = $this->scan_blocks_dir(__DIR__ . '/blocks');
469
 
emails/themes/theme-1/theme-options.php CHANGED
@@ -28,13 +28,13 @@ $controls->merge_defaults($theme_defaults);
28
  ?>
29
 
30
  <table class="form-table">
31
- <tr valign="top">
32
  <th>Max new posts to include</th>
33
  <td>
34
  <?php $controls->text('theme_max_posts', 5); ?> (it defaults to 10 if empty or invalid)
35
  </td>
36
  </tr>
37
- <tr valign="top">
38
  <th>Categories</th>
39
  <td>
40
  <?php $controls->categories_group('theme_categories'); ?>
28
  ?>
29
 
30
  <table class="form-table">
31
+ <tr>
32
  <th>Max new posts to include</th>
33
  <td>
34
  <?php $controls->text('theme_max_posts', 5); ?> (it defaults to 10 if empty or invalid)
35
  </td>
36
  </tr>
37
+ <tr>
38
  <th>Categories</th>
39
  <td>
40
  <?php $controls->categories_group('theme_categories'); ?>
emails/themes/theme-3/theme-options.php CHANGED
@@ -29,13 +29,13 @@ $controls->merge_defaults($theme_defaults);
29
  ?>
30
  <p>This theme build an email loading all new posts after the date of the last run.</p>
31
  <table class="form-table">
32
- <tr valign="top">
33
  <th>Max new posts to include</th>
34
  <td>
35
  <?php $controls->text('theme_max_posts', 5); ?> (it defaults to 10 if empty or invalid)
36
  </td>
37
  </tr>
38
- <tr valign="top">
39
  <th>Categories</th>
40
  <td>
41
  <?php $controls->categories_group('theme_categories'); ?>
29
  ?>
30
  <p>This theme build an email loading all new posts after the date of the last run.</p>
31
  <table class="form-table">
32
+ <tr>
33
  <th>Max new posts to include</th>
34
  <td>
35
  <?php $controls->text('theme_max_posts', 5); ?> (it defaults to 10 if empty or invalid)
36
  </td>
37
  </tr>
38
+ <tr>
39
  <th>Categories</th>
40
  <td>
41
  <?php $controls->categories_group('theme_categories'); ?>
emails/themes/vimeo-like/theme-options.php CHANGED
@@ -28,13 +28,13 @@ defined('ABSPATH') || exit;
28
 
29
  <div id="tabs-a">
30
  <table class="form-table">
31
- <tr valign="top">
32
  <th>Max new posts to include</th>
33
  <td>
34
  <?php $controls->select_number('theme_max_posts', 1, 50); ?>
35
  </td>
36
  </tr>
37
- <tr valign="top">
38
  <th>Categories to include</th>
39
  <td><?php $controls->categories_group('theme_categories'); ?></td>
40
  </tr>
@@ -45,19 +45,19 @@ defined('ABSPATH') || exit;
45
  <p class="description">Leave all uncheck for a default behavior.</p>
46
  </td>
47
  </tr>
48
- <tr valign="top">
49
  <th>Pre header message</th>
50
  <td>
51
  <?php $controls->textarea_fixed('theme_pre_message', '100%', 120); ?>
52
  </td>
53
  </tr>
54
- <tr valign="top">
55
  <th>Footer message</th>
56
  <td>
57
  <?php $controls->textarea_fixed('theme_footer_message', '100%', 120); ?>
58
  </td>
59
  </tr>
60
- <tr valign="top">
61
  <th>Read more label</th>
62
  <td>
63
  <?php $controls->text('theme_read_more'); ?>
28
 
29
  <div id="tabs-a">
30
  <table class="form-table">
31
+ <tr>
32
  <th>Max new posts to include</th>
33
  <td>
34
  <?php $controls->select_number('theme_max_posts', 1, 50); ?>
35
  </td>
36
  </tr>
37
+ <tr>
38
  <th>Categories to include</th>
39
  <td><?php $controls->categories_group('theme_categories'); ?></td>
40
  </tr>
45
  <p class="description">Leave all uncheck for a default behavior.</p>
46
  </td>
47
  </tr>
48
+ <tr>
49
  <th>Pre header message</th>
50
  <td>
51
  <?php $controls->textarea_fixed('theme_pre_message', '100%', 120); ?>
52
  </td>
53
  </tr>
54
+ <tr>
55
  <th>Footer message</th>
56
  <td>
57
  <?php $controls->textarea_fixed('theme_footer_message', '100%', 120); ?>
58
  </td>
59
  </tr>
60
+ <tr>
61
  <th>Read more label</th>
62
  <td>
63
  <?php $controls->text('theme_read_more'); ?>
includes/controls.php CHANGED
@@ -608,7 +608,7 @@ class NewsletterControls {
608
  $value = $this->get_value($name);
609
 
610
  echo '<select id="options-', esc_attr($name), '" name="', $option_name, '" style="', $style, '"',
611
- ($multiple ? ' multiple' : ''), ' placeholder="', esc_attr($placeholder), '">';
612
  if (!empty($first)) {
613
  echo '<option value="">' . esc_html($first) . '</option>';
614
  }
@@ -1448,7 +1448,7 @@ class NewsletterControls {
1448
  */
1449
  static function panel_help($url, $text = '') {
1450
  if (empty($text)) $text = __('Need help?', 'newsletter');
1451
- echo '<div class="tnp-panel-help"><a href="', $url, '" target="_blank">', $text, '</a></div>';
1452
  }
1453
 
1454
  /**
608
  $value = $this->get_value($name);
609
 
610
  echo '<select id="options-', esc_attr($name), '" name="', $option_name, '" style="', $style, '"',
611
+ ($multiple ? ' multiple' : ''), '>';
612
  if (!empty($first)) {
613
  echo '<option value="">' . esc_html($first) . '</option>';
614
  }
1448
  */
1449
  static function panel_help($url, $text = '') {
1450
  if (empty($text)) $text = __('Need help?', 'newsletter');
1451
+ echo '<span class="tnp-panel-help"><a href="', $url, '" target="_blank">', $text, '</a></span>';
1452
  }
1453
 
1454
  /**
main/info.php CHANGED
@@ -42,7 +42,7 @@ if (!$controls->is_action()) {
42
  <h3><?php _e('Header Settings', 'newsletter') ?></h3>
43
 
44
  <table class="form-table">
45
- <tr valign="top">
46
  <th>
47
  <?php _e('Logo', 'newsletter') ?><br>
48
  <?php $controls->help('https://www.thenewsletterplugin.com/documentation/newsletter-configuration#company-logo') ?>
@@ -68,13 +68,13 @@ if (!$controls->is_action()) {
68
  <h3><?php _e('Footer Settings', 'newsletter') ?></h3>
69
 
70
  <table class="form-table">
71
- <tr valign="top">
72
  <th><?php _e('Company name', 'newsletter') ?></th>
73
  <td>
74
  <?php $controls->text('footer_title', 40); ?>
75
  </td>
76
  </tr>
77
- <tr valign="top">
78
  <th><?php _e('Address', 'newsletter') ?></th>
79
  <td>
80
  <?php $controls->text('footer_contact', 40); ?>
@@ -92,61 +92,61 @@ if (!$controls->is_action()) {
92
  <div id="tabs-social">
93
 
94
  <table class="form-table">
95
- <tr valign="top">
96
  <th>Facebook URL</th>
97
  <td>
98
  <?php $controls->text('facebook_url', 40); ?>
99
  </td>
100
  </tr>
101
- <tr valign="top">
102
  <th>Twitter URL</th>
103
  <td>
104
  <?php $controls->text('twitter_url', 40); ?>
105
  </td>
106
  </tr>
107
- <tr valign="top">
108
  <th>Instagram URL</th>
109
  <td>
110
  <?php $controls->text('instagram_url', 40); ?>
111
  </td>
112
  </tr>
113
- <tr valign="top">
114
  <th>Google+ URL</th>
115
  <td>
116
  <?php $controls->text('googleplus_url', 40); ?>
117
  </td>
118
  </tr>
119
- <tr valign="top">
120
  <th>Pinterest URL</th>
121
  <td>
122
  <?php $controls->text('pinterest_url', 40); ?>
123
  </td>
124
  </tr>
125
- <tr valign="top">
126
  <th>Linkedin URL</th>
127
  <td>
128
  <?php $controls->text('linkedin_url', 40); ?>
129
  </td>
130
  </tr>
131
- <tr valign="top">
132
  <th>Tumblr URL</th>
133
  <td>
134
  <?php $controls->text('tumblr_url', 40); ?>
135
  </td>
136
  </tr>
137
- <tr valign="top">
138
  <th>YouTube URL</th>
139
  <td>
140
  <?php $controls->text('youtube_url', 40); ?>
141
  </td>
142
  </tr>
143
- <tr valign="top">
144
  <th>Vimeo URL</th>
145
  <td>
146
  <?php $controls->text('vimeo_url', 40); ?>
147
  </td>
148
  </tr>
149
- <tr valign="top">
150
  <th>Soundcloud URL</th>
151
  <td>
152
  <?php $controls->text('soundcloud_url', 40); ?>
42
  <h3><?php _e('Header Settings', 'newsletter') ?></h3>
43
 
44
  <table class="form-table">
45
+ <tr>
46
  <th>
47
  <?php _e('Logo', 'newsletter') ?><br>
48
  <?php $controls->help('https://www.thenewsletterplugin.com/documentation/newsletter-configuration#company-logo') ?>
68
  <h3><?php _e('Footer Settings', 'newsletter') ?></h3>
69
 
70
  <table class="form-table">
71
+ <tr>
72
  <th><?php _e('Company name', 'newsletter') ?></th>
73
  <td>
74
  <?php $controls->text('footer_title', 40); ?>
75
  </td>
76
  </tr>
77
+ <tr>
78
  <th><?php _e('Address', 'newsletter') ?></th>
79
  <td>
80
  <?php $controls->text('footer_contact', 40); ?>
92
  <div id="tabs-social">
93
 
94
  <table class="form-table">
95
+ <tr>
96
  <th>Facebook URL</th>
97
  <td>
98
  <?php $controls->text('facebook_url', 40); ?>
99
  </td>
100
  </tr>
101
+ <tr>
102
  <th>Twitter URL</th>
103
  <td>
104
  <?php $controls->text('twitter_url', 40); ?>
105
  </td>
106
  </tr>
107
+ <tr>
108
  <th>Instagram URL</th>
109
  <td>
110
  <?php $controls->text('instagram_url', 40); ?>
111
  </td>
112
  </tr>
113
+ <tr>
114
  <th>Google+ URL</th>
115
  <td>
116
  <?php $controls->text('googleplus_url', 40); ?>
117
  </td>
118
  </tr>
119
+ <tr>
120
  <th>Pinterest URL</th>
121
  <td>
122
  <?php $controls->text('pinterest_url', 40); ?>
123
  </td>
124
  </tr>
125
+ <tr>
126
  <th>Linkedin URL</th>
127
  <td>
128
  <?php $controls->text('linkedin_url', 40); ?>
129
  </td>
130
  </tr>
131
+ <tr>
132
  <th>Tumblr URL</th>
133
  <td>
134
  <?php $controls->text('tumblr_url', 40); ?>
135
  </td>
136
  </tr>
137
+ <tr>
138
  <th>YouTube URL</th>
139
  <td>
140
  <?php $controls->text('youtube_url', 40); ?>
141
  </td>
142
  </tr>
143
+ <tr>
144
  <th>Vimeo URL</th>
145
  <td>
146
  <?php $controls->text('vimeo_url', 40); ?>
147
  </td>
148
  </tr>
149
+ <tr>
150
  <th>Soundcloud URL</th>
151
  <td>
152
  <?php $controls->text('soundcloud_url', 40); ?>
main/main.php CHANGED
@@ -123,7 +123,7 @@ if (!empty($return_path)) {
123
 
124
  <table class="form-table">
125
 
126
- <tr valign="top">
127
  <th><?php _e('Sender email address', 'newsletter') ?></th>
128
  <td>
129
  <?php $controls->text_email('sender_email', 40); ?>
@@ -137,14 +137,14 @@ if (!empty($return_path)) {
137
  </td>
138
  </tr>
139
 
140
- <tr valign="top">
141
  <th><?php _e('Return path', 'newsletter') ?></th>
142
  <td>
143
  <?php $controls->text_email('return_path', 40); ?>
144
  <?php $controls->help('https://www.thenewsletterplugin.com/plugins/newsletter/newsletter-configuration#return-path') ?>
145
  </td>
146
  </tr>
147
- <tr valign="top">
148
  <th><?php _e('Reply to', 'newsletter') ?></th>
149
  <td>
150
  <?php $controls->text_email('reply_to', 40); ?>
@@ -152,7 +152,7 @@ if (!empty($return_path)) {
152
  </td>
153
  </tr>
154
 
155
- <tr valign="top">
156
  <th><?php _e('License key', 'newsletter') ?></th>
157
  <td>
158
  <?php if (defined('NEWSLETTER_LICENSE_KEY')) { ?>
@@ -195,7 +195,7 @@ if (!empty($return_path)) {
195
 
196
  <table class="form-table">
197
 
198
- <tr valign="top">
199
  <th><?php _e('Enable access to blog editors?', 'newsletter') ?></th>
200
  <td>
201
  <?php $controls->yesno('editor'); ?>
@@ -211,21 +211,21 @@ if (!empty($return_path)) {
211
  </td>
212
  </tr>
213
 
214
- <tr valign="top">
215
  <th><?php _e('Debug mode', 'newsletter') ?></th>
216
  <td>
217
  <?php $controls->yesno('debug', 40); ?>
218
  </td>
219
  </tr>
220
 
221
- <tr valign="top">
222
  <th><?php _e('Send email directly', 'newsletter') ?></th>
223
  <td>
224
  <?php $controls->yesno('phpmailer'); ?>
225
  <?php $controls->help('https://www.thenewsletterplugin.com/configuration-tnin-send-email'); ?>
226
  </td>
227
  </tr>
228
- <tr valign="top">
229
  <th><?php _e('Email encoding', 'newsletter') ?></th>
230
  <td>
231
  <?php $controls->select('content_transfer_encoding', array('' => 'Default', '8bit' => '8 bit', 'base64' => 'Base 64', 'binary' => 'Binary', 'quoted-printable' => 'Quoted printable', '7bit' => '7 bit')); ?>
123
 
124
  <table class="form-table">
125
 
126
+ <tr>
127
  <th><?php _e('Sender email address', 'newsletter') ?></th>
128
  <td>
129
  <?php $controls->text_email('sender_email', 40); ?>
137
  </td>
138
  </tr>
139
 
140
+ <tr>
141
  <th><?php _e('Return path', 'newsletter') ?></th>
142
  <td>
143
  <?php $controls->text_email('return_path', 40); ?>
144
  <?php $controls->help('https://www.thenewsletterplugin.com/plugins/newsletter/newsletter-configuration#return-path') ?>
145
  </td>
146
  </tr>
147
+ <tr>
148
  <th><?php _e('Reply to', 'newsletter') ?></th>
149
  <td>
150
  <?php $controls->text_email('reply_to', 40); ?>
152
  </td>
153
  </tr>
154
 
155
+ <tr>
156
  <th><?php _e('License key', 'newsletter') ?></th>
157
  <td>
158
  <?php if (defined('NEWSLETTER_LICENSE_KEY')) { ?>
195
 
196
  <table class="form-table">
197
 
198
+ <tr>
199
  <th><?php _e('Enable access to blog editors?', 'newsletter') ?></th>
200
  <td>
201
  <?php $controls->yesno('editor'); ?>
211
  </td>
212
  </tr>
213
 
214
+ <tr>
215
  <th><?php _e('Debug mode', 'newsletter') ?></th>
216
  <td>
217
  <?php $controls->yesno('debug', 40); ?>
218
  </td>
219
  </tr>
220
 
221
+ <tr>
222
  <th><?php _e('Send email directly', 'newsletter') ?></th>
223
  <td>
224
  <?php $controls->yesno('phpmailer'); ?>
225
  <?php $controls->help('https://www.thenewsletterplugin.com/configuration-tnin-send-email'); ?>
226
  </td>
227
  </tr>
228
+ <tr>
229
  <th><?php _e('Email encoding', 'newsletter') ?></th>
230
  <td>
231
  <?php $controls->select('content_transfer_encoding', array('' => 'Default', '8bit' => '8 bit', 'base64' => 'Base 64', 'binary' => 'Binary', 'quoted-printable' => 'Quoted printable', '7bit' => '7 bit')); ?>
main/status.php CHANGED
@@ -43,6 +43,11 @@ if ($controls->is_action('reschedule')) {
43
  $controls->add_message_done();
44
  }
45
 
 
 
 
 
 
46
  if ($controls->is_action('test')) {
47
 
48
  if (!NewsletterModule::is_email($controls->data['test_email'])) {
@@ -498,6 +503,7 @@ $options = $module->get_options('status');
498
  <?php $controls->button('reschedule', 'Reset') ?>
499
  <?php } else if ($delta <= -600) { ?>
500
  The scheduler is very late: <?php echo $delta ?> seconds (<a href="https://www.thenewsletterplugin.com/plugins/newsletter/newsletter-delivery-engine" target="_blank">read more</a>)
 
501
  <?php } else { ?>
502
  Next execution is planned in <?php echo $delta ?> seconds (negative values are ok).
503
  <?php } ?>
43
  $controls->add_message_done();
44
  }
45
 
46
+ if ($controls->is_action('trigger')) {
47
+ Newsletter::instance()->hook_newsletter();
48
+ $controls->messages = 'Triggered';
49
+ }
50
+
51
  if ($controls->is_action('test')) {
52
 
53
  if (!NewsletterModule::is_email($controls->data['test_email'])) {
503
  <?php $controls->button('reschedule', 'Reset') ?>
504
  <?php } else if ($delta <= -600) { ?>
505
  The scheduler is very late: <?php echo $delta ?> seconds (<a href="https://www.thenewsletterplugin.com/plugins/newsletter/newsletter-delivery-engine" target="_blank">read more</a>)
506
+ <?php $controls->button('trigger', 'Trigger') ?>
507
  <?php } else { ?>
508
  Next execution is planned in <?php echo $delta ?> seconds (negative values are ok).
509
  <?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: 5.1.4
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.1.4');
18
 
19
  global $wpdb, $newsletter;
20
 
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.1.5
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.1.5');
18
 
19
  global $wpdb, $newsletter;
20
 
readme.txt CHANGED
@@ -2,7 +2,7 @@
2
  Tags: newsletter,email,subscription,mass mail,list build,email marketing,direct mailing,automation,automated
3
  Requires at least: 3.4.0
4
  Tested up to: 4.9
5
- Stable tag: 5.1.4
6
  Contributors: satollo,webagile,michael-travan
7
 
8
  Add a real newsletter system to your blog. For free. With unlimited newsletters and subscribers.
@@ -85,6 +85,12 @@ Thank you, The Newsletter Team
85
 
86
  == Changelog ==
87
 
 
 
 
 
 
 
88
  == 5.1.4 ==
89
 
90
  * Fixed notices on email edit panel
2
  Tags: newsletter,email,subscription,mass mail,list build,email marketing,direct mailing,automation,automated
3
  Requires at least: 3.4.0
4
  Tested up to: 4.9
5
+ Stable tag: 5.1.5
6
  Contributors: satollo,webagile,michael-travan
7
 
8
  Add a real newsletter system to your blog. For free. With unlimited newsletters and subscribers.
85
 
86
  == Changelog ==
87
 
88
+ == 5.1.5 ==
89
+
90
+ * Re-confirmation is now allows for unsubscribed and bounced
91
+ * Fixed to minimal widget and minimal css
92
+ * Fixed the approx. subscriber count on newsletter creation (was showing encoded data)
93
+
94
  == 5.1.4 ==
95
 
96
  * Fixed notices on email edit panel
subscription/forms.php CHANGED
@@ -43,7 +43,7 @@ if ($controls->is_action('save')) {
43
  <div id="tabs-forms">
44
  <table class="form-table">
45
  <?php for ($i = 1; $i <= 10; $i++) { ?>
46
- <tr valign="top">
47
  <th>Form <?php echo $i; ?></th>
48
  <td>
49
  <?php $controls->textarea('form_' . $i); ?>
43
  <div id="tabs-forms">
44
  <table class="form-table">
45
  <?php for ($i = 1; $i <= 10; $i++) { ?>
46
+ <tr>
47
  <th>Form <?php echo $i; ?></th>
48
  <td>
49
  <?php $controls->textarea('form_' . $i); ?>
subscription/options.php CHANGED
@@ -191,14 +191,14 @@ if (empty($controls->data['page'])) {
191
 
192
  <div id="tabs-general">
193
  <table class="form-table">
194
- <tr valign="top">
195
  <th><?php _e('Opt In', 'newsletter') ?></th>
196
  <td>
197
  <?php $controls->select('noconfirmation', array(0 => __('Double Opt In', 'newsletter'), 1 => __('Single Opt In', 'newsletter'))); ?>
198
  <?php $controls->help('https://www.thenewsletterplugin.com/documentation/subscription#opt-in') ?>
199
  </td>
200
  </tr>
201
- <tr valign="top">
202
  <th><?php _e('Dedicated page', 'newsletter') ?></th>
203
  <td>
204
  <?php $controls->page('page', __('Unstyled page', 'newsletter')); ?>
@@ -218,14 +218,14 @@ if (empty($controls->data['page'])) {
218
  <?php } ?>
219
  </td>
220
  </tr>
221
- <tr valign="top">
222
  <th><?php _e('Notifications', 'newsletter') ?></th>
223
  <td>
224
  <?php $controls->yesno('notify'); ?>
225
  <?php $controls->text_email('notify_email'); ?>
226
  </td>
227
  </tr>
228
- <tr valign="top">
229
  <th><?php _e('Custom styles', 'newsletter') ?></th>
230
  <td>
231
  <?php if (apply_filters('newsletter_enqueue_style', true) === false) { ?>
@@ -241,19 +241,19 @@ if (empty($controls->data['page'])) {
241
  <div id="tabs-2">
242
 
243
  <table class="form-table">
244
- <tr valign="top">
245
  <th><?php _e('Subscription page', 'newsletter') ?><br><?php echo $controls->help('https://www.thenewsletterplugin.com/documentation/newsletter-tags') ?></th>
246
  <td>
247
  <?php $controls->wp_editor('subscription_text'); ?>
248
  </td>
249
  </tr>
250
- <tr valign="top">
251
  <th><?php _e('Forced lists', 'newsletter') ?></th>
252
  <td>
253
  <?php $controls->preferences(); ?>
254
  </td>
255
  </tr>
256
- <tr valign="top">
257
  <th><?php _e('Disable antibot/antispam?', 'newsletter') ?></th>
258
  <td>
259
  <?php $controls->yesno('antibot_disable'); ?>
@@ -262,7 +262,7 @@ if (empty($controls->data['page'])) {
262
  </p>
263
  </td>
264
  </tr>
265
- <tr valign="top">
266
  <th><?php _e('Antiflood', 'newsletter') ?></th>
267
  <td>
268
  <?php
@@ -286,7 +286,7 @@ if (empty($controls->data['page'])) {
286
 
287
  <table class="form-table">
288
  <!--
289
- <tr valign="top">
290
  <th>Already subscribed page content</th>
291
  <td>
292
  <?php //$controls->wp_editor('already_confirmed_text'); ?><br>
@@ -299,7 +299,7 @@ if (empty($controls->data['page'])) {
299
  </td>
300
  </tr>
301
  -->
302
- <tr valign="top">
303
  <th><?php _e('Error page', 'newsletter') ?></th>
304
  <td>
305
  <?php $controls->wp_editor('error_text'); ?>
@@ -315,14 +315,14 @@ if (empty($controls->data['page'])) {
315
  <?php $controls->panel_help('https://www.thenewsletterplugin.com/documentation/subscription#activation') ?>
316
 
317
  <table class="form-table">
318
- <tr valign="top">
319
  <th><?php _e('Activation message', 'newsletter') ?></th>
320
  <td>
321
  <?php $controls->wp_editor('confirmation_text'); ?>
322
  </td>
323
  </tr>
324
 
325
- <tr valign="top">
326
  <th><?php _e ('Alternative activation page', 'newsletter'); ?></th>
327
  <td>
328
  <?php $controls->text('confirmation_url', 70, 'https://...'); ?>
@@ -331,7 +331,7 @@ if (empty($controls->data['page'])) {
331
 
332
 
333
  <!-- CONFIRMATION EMAIL -->
334
- <tr valign="top">
335
  <th><?php _e('Activation email', 'newsletter') ?></th>
336
  <td>
337
  <?php $controls->email('confirmation', 'wordpress'); ?>
@@ -348,21 +348,21 @@ if (empty($controls->data['page'])) {
348
  <?php $controls->panel_help('https://www.thenewsletterplugin.com/documentation/subscription#welcome') ?>
349
  </p>
350
  <table class="form-table">
351
- <tr valign="top">
352
  <th><?php _e('Welcome message', 'newsletter') ?></th>
353
  <td>
354
  <?php $controls->wp_editor('confirmed_text'); ?>
355
  </td>
356
  </tr>
357
 
358
- <tr valign="top">
359
  <th><?php _e('Alternative welcome page URL', 'newsletter') ?></th>
360
  <td>
361
  <?php $controls->text('confirmed_url', 70, 'https://...'); ?>
362
  </td>
363
  </tr>
364
 
365
- <tr valign="top">
366
  <th><?php _e('Conversion tracking code', 'newsletter') ?>
367
  <?php $controls->help('https://www.thenewsletterplugin.com/documentation/subscription#conversion') ?></th>
368
  <td>
@@ -371,7 +371,7 @@ if (empty($controls->data['page'])) {
371
  </tr>
372
 
373
  <!-- WELCOME/CONFIRMED EMAIL -->
374
- <tr valign="top">
375
  <th>
376
  <?php _e('Welcome email', 'newsletter') ?>
377
  </th>
@@ -390,7 +390,7 @@ if (empty($controls->data['page'])) {
390
 
391
  <table class="form-table">
392
 
393
- <tr valign="top">
394
  <th><?php _e('Profile page', 'newsletter') ?>
395
  <br><?php $controls->help('https://www.thenewsletterplugin.com/documentation/subscription#profile') ?>
396
  </th>
@@ -399,7 +399,7 @@ if (empty($controls->data['page'])) {
399
  </td>
400
  </tr>
401
 
402
- <tr valign="top">
403
  <th><?php _e('Alternative profile page URL', 'newsletter') ?></th>
404
  <td>
405
  <?php $controls->text('profile_url', 70); ?>
191
 
192
  <div id="tabs-general">
193
  <table class="form-table">
194
+ <tr>
195
  <th><?php _e('Opt In', 'newsletter') ?></th>
196
  <td>
197
  <?php $controls->select('noconfirmation', array(0 => __('Double Opt In', 'newsletter'), 1 => __('Single Opt In', 'newsletter'))); ?>
198
  <?php $controls->help('https://www.thenewsletterplugin.com/documentation/subscription#opt-in') ?>
199
  </td>
200
  </tr>
201
+ <tr>
202
  <th><?php _e('Dedicated page', 'newsletter') ?></th>
203
  <td>
204
  <?php $controls->page('page', __('Unstyled page', 'newsletter')); ?>
218
  <?php } ?>
219
  </td>
220
  </tr>
221
+ <tr>
222
  <th><?php _e('Notifications', 'newsletter') ?></th>
223
  <td>
224
  <?php $controls->yesno('notify'); ?>
225
  <?php $controls->text_email('notify_email'); ?>
226
  </td>
227
  </tr>
228
+ <tr>
229
  <th><?php _e('Custom styles', 'newsletter') ?></th>
230
  <td>
231
  <?php if (apply_filters('newsletter_enqueue_style', true) === false) { ?>
241
  <div id="tabs-2">
242
 
243
  <table class="form-table">
244
+ <tr>
245
  <th><?php _e('Subscription page', 'newsletter') ?><br><?php echo $controls->help('https://www.thenewsletterplugin.com/documentation/newsletter-tags') ?></th>
246
  <td>
247
  <?php $controls->wp_editor('subscription_text'); ?>
248
  </td>
249
  </tr>
250
+ <tr>
251
  <th><?php _e('Forced lists', 'newsletter') ?></th>
252
  <td>
253
  <?php $controls->preferences(); ?>
254
  </td>
255
  </tr>
256
+ <tr>
257
  <th><?php _e('Disable antibot/antispam?', 'newsletter') ?></th>
258
  <td>
259
  <?php $controls->yesno('antibot_disable'); ?>
262
  </p>
263
  </td>
264
  </tr>
265
+ <tr>
266
  <th><?php _e('Antiflood', 'newsletter') ?></th>
267
  <td>
268
  <?php
286
 
287
  <table class="form-table">
288
  <!--
289
+ <tr>
290
  <th>Already subscribed page content</th>
291
  <td>
292
  <?php //$controls->wp_editor('already_confirmed_text'); ?><br>
299
  </td>
300
  </tr>
301
  -->
302
+ <tr>
303
  <th><?php _e('Error page', 'newsletter') ?></th>
304
  <td>
305
  <?php $controls->wp_editor('error_text'); ?>
315
  <?php $controls->panel_help('https://www.thenewsletterplugin.com/documentation/subscription#activation') ?>
316
 
317
  <table class="form-table">
318
+ <tr>
319
  <th><?php _e('Activation message', 'newsletter') ?></th>
320
  <td>
321
  <?php $controls->wp_editor('confirmation_text'); ?>
322
  </td>
323
  </tr>
324
 
325
+ <tr>
326
  <th><?php _e ('Alternative activation page', 'newsletter'); ?></th>
327
  <td>
328
  <?php $controls->text('confirmation_url', 70, 'https://...'); ?>
331
 
332
 
333
  <!-- CONFIRMATION EMAIL -->
334
+ <tr>
335
  <th><?php _e('Activation email', 'newsletter') ?></th>
336
  <td>
337
  <?php $controls->email('confirmation', 'wordpress'); ?>
348
  <?php $controls->panel_help('https://www.thenewsletterplugin.com/documentation/subscription#welcome') ?>
349
  </p>
350
  <table class="form-table">
351
+ <tr>
352
  <th><?php _e('Welcome message', 'newsletter') ?></th>
353
  <td>
354
  <?php $controls->wp_editor('confirmed_text'); ?>
355
  </td>
356
  </tr>
357
 
358
+ <tr>
359
  <th><?php _e('Alternative welcome page URL', 'newsletter') ?></th>
360
  <td>
361
  <?php $controls->text('confirmed_url', 70, 'https://...'); ?>
362
  </td>
363
  </tr>
364
 
365
+ <tr>
366
  <th><?php _e('Conversion tracking code', 'newsletter') ?>
367
  <?php $controls->help('https://www.thenewsletterplugin.com/documentation/subscription#conversion') ?></th>
368
  <td>
371
  </tr>
372
 
373
  <!-- WELCOME/CONFIRMED EMAIL -->
374
+ <tr>
375
  <th>
376
  <?php _e('Welcome email', 'newsletter') ?>
377
  </th>
390
 
391
  <table class="form-table">
392
 
393
+ <tr>
394
  <th><?php _e('Profile page', 'newsletter') ?>
395
  <br><?php $controls->help('https://www.thenewsletterplugin.com/documentation/subscription#profile') ?>
396
  </th>
399
  </td>
400
  </tr>
401
 
402
+ <tr>
403
  <th><?php _e('Alternative profile page URL', 'newsletter') ?></th>
404
  <td>
405
  <?php $controls->text('profile_url', 70); ?>
subscription/style.css CHANGED
@@ -46,6 +46,7 @@ CUSTOM CSS RULES.
46
  text-shadow: none;
47
  color: #444;
48
  font-size: 14px;
 
49
  margin: 0;
50
  line-height: normal;
51
  box-sizing: border-box;
@@ -263,6 +264,7 @@ CUSTOM CSS RULES.
263
  background-color: #f4f4f4;
264
  color: #444;
265
  font-size: 14px;
 
266
  box-sizing: border-box;
267
  border-radius: 0px;
268
  }
@@ -271,6 +273,7 @@ CUSTOM CSS RULES.
271
  width: 29%;
272
  box-sizing: border-box;
273
  display: inline-block;
 
274
  border: 1px;
275
  border-color: #ddd;
276
  background-color: #444;
@@ -278,6 +281,7 @@ CUSTOM CSS RULES.
278
  text-shadow: none;
279
  color: #fff;
280
  font-size: 14px;
 
281
  box-sizing: border-box;
282
  border-radius: 0px;
283
  }
46
  text-shadow: none;
47
  color: #444;
48
  font-size: 14px;
49
+ line-height: 20px;
50
  margin: 0;
51
  line-height: normal;
52
  box-sizing: border-box;
264
  background-color: #f4f4f4;
265
  color: #444;
266
  font-size: 14px;
267
+ line-height: 20px;
268
  box-sizing: border-box;
269
  border-radius: 0px;
270
  }
273
  width: 29%;
274
  box-sizing: border-box;
275
  display: inline-block;
276
+ padding: 10px;
277
  border: 1px;
278
  border-color: #ddd;
279
  background-color: #444;
281
  text-shadow: none;
282
  color: #fff;
283
  font-size: 14px;
284
+ line-height: 20px;
285
  box-sizing: border-box;
286
  border-radius: 0px;
287
  }
subscription/subscription.php CHANGED
@@ -597,43 +597,41 @@ class NewsletterSubscription extends NewsletterModule {
597
  die('No subscriber found.');
598
  }
599
 
 
 
600
  if ($user->status == 'C') {
601
  do_action('newsletter_user_confirmed', $user);
602
  return $user;
603
  }
604
 
605
- if ($user->status != 'S') {
606
- $this->logger->debug('Was not in status S');
607
- $user->status = 'E';
608
- return $user;
609
- }
610
- setcookie('newsletter', $user->id . '-' . $user->token, time() + 60 * 60 * 24 * 365, '/');
611
- $newsletter->set_user_status($user->id, 'C');
612
  $user->status = 'C';
613
  do_action('newsletter_user_confirmed', $user);
614
  $this->notify_admin($user, 'Newsletter subscription');
615
 
616
- // Check if is connected to a wp user
617
- if ($user->wp_user_id) {
618
- /* @var $wpdb wpdb */
619
- global $wpdb;
620
- //$wpdb->update($wpdb->users, array('user_email'=>$user->email), array('id'=>$user->wp_user_id));
621
- }
622
-
623
  if (!$emails) {
624
  return $user;
625
  }
 
 
 
 
 
 
 
 
 
 
 
626
 
627
- if (empty($this->options['confirmed_disabled'])) {
628
- $message = $this->options['confirmed_message'];
629
- // TODO: This is always empty!
630
- $message_text = $this->options['confirmed_message_text'];
631
- $subject = $this->options['confirmed_subject'];
632
-
633
- $this->mail($user->email, $newsletter->replace($subject, $user), $newsletter->replace($message, $user));
634
  }
635
-
636
- return $user;
637
  }
638
 
639
  /**
@@ -1759,12 +1757,13 @@ class NewsletterSubscription extends NewsletterModule {
1759
 
1760
  function get_subscription_form_minimal($attrs) {
1761
  $options_profile = get_option('newsletter_profile');
1762
- if (!is_array($attrs))
1763
  $attrs = array();
1764
- $attrs = array_merge(array('referrer' => 'minimal', 'button' => $options_profile['subscribe'], 'placeholder' => $options_profile['email']), $attrs);
 
1765
 
1766
  $form = '';
1767
- $form .= '<div class="tnp tnp-subscription-minimal">';
1768
  $form .= '<form action="' . esc_attr(home_url('/')) . '?na=s" method="post">';
1769
  $form .= '<input type="hidden" name="nr" value="' . esc_attr($attrs['referrer']) . '">';
1770
  $form .= '<input class="tnp-email" type="email" required name="ne" value="" placeholder="' . esc_attr($attrs['placeholder']) . '">';
597
  die('No subscriber found.');
598
  }
599
 
600
+ setcookie('newsletter', $user->id . '-' . $user->token, time() + 60 * 60 * 24 * 365, '/');
601
+
602
  if ($user->status == 'C') {
603
  do_action('newsletter_user_confirmed', $user);
604
  return $user;
605
  }
606
 
607
+ // if ($user->status != 'S') {
608
+ // $this->logger->debug('Was not in status S');
609
+ // $user->status = 'E';
610
+ // return $user;
611
+ // }
612
+
613
+ $this->set_user_status($user->id, 'C');
614
  $user->status = 'C';
615
  do_action('newsletter_user_confirmed', $user);
616
  $this->notify_admin($user, 'Newsletter subscription');
617
 
 
 
 
 
 
 
 
618
  if (!$emails) {
619
  return $user;
620
  }
621
+
622
+ $this->send_message('confirmed', $user);
623
+
624
+ return $user;
625
+ }
626
+
627
+ function send_message($type, $user) {
628
+ if (empty($this->options[$type . '_disabled'])) {
629
+ $message = $this->options[$type . '_message'];
630
+ //$message_text = $this->options[$type . '_message_text'];
631
+ $subject = $this->options[$type . '_subject'];
632
 
633
+ $this->mail($user->email, $this->replace($subject, $user), $this->replace($message, $user));
 
 
 
 
 
 
634
  }
 
 
635
  }
636
 
637
  /**
1757
 
1758
  function get_subscription_form_minimal($attrs) {
1759
  $options_profile = get_option('newsletter_profile');
1760
+ if (!is_array($attrs)) {
1761
  $attrs = array();
1762
+ }
1763
+ $attrs = array_merge(array('class'=>'', 'referrer' => 'minimal', 'button' => $options_profile['subscribe'], 'placeholder' => $options_profile['email']), $attrs);
1764
 
1765
  $form = '';
1766
+ $form .= '<div class="tnp tnp-subscription-minimal ' . $attrs['class'] . '">';
1767
  $form .= '<form action="' . esc_attr(home_url('/')) . '?na=s" method="post">';
1768
  $form .= '<input type="hidden" name="nr" value="' . esc_attr($attrs['referrer']) . '">';
1769
  $form .= '<input class="tnp-email" type="email" required name="ne" value="" placeholder="' . esc_attr($attrs['placeholder']) . '">';
subscription/template.php CHANGED
@@ -99,7 +99,7 @@ if (!$controls->is_action()) {
99
  <?php $controls->button_save(); ?>
100
  </p>
101
  <table class="form-table">
102
- <tr valign="top">
103
  <th>Enabled?</th>
104
  <td>
105
  <?php $controls->yesno('enabled'); ?>
99
  <?php $controls->button_save(); ?>
100
  </p>
101
  <table class="form-table">
102
+ <tr>
103
  <th>Enabled?</th>
104
  <td>
105
  <?php $controls->yesno('enabled'); ?>
subscription/unsubscription.php CHANGED
@@ -75,7 +75,7 @@ if (!$controls->is_action()) {
75
  <?php $controls->init(); ?>
76
 
77
  <table class="form-table">
78
- <tr valign="top">
79
  <th><?php _e('Unsubscription message', 'newsletter') ?></th>
80
  <td>
81
  <?php $controls->wp_editor('unsubscription_text'); ?>
@@ -87,7 +87,7 @@ if (!$controls->is_action()) {
87
  </td>
88
  </tr>
89
 
90
- <tr valign="top">
91
  <th><?php _e('Goodbye message', 'newsletter') ?></th>
92
  <td>
93
  <?php $controls->wp_editor('unsubscribed_text'); ?>
@@ -97,7 +97,7 @@ if (!$controls->is_action()) {
97
  </td>
98
  </tr>
99
 
100
- <tr valign="top">
101
  <th><?php _e('Goodbye email', 'newsletter') ?></th>
102
  <td>
103
  <?php $controls->email('unsubscribed', 'wordpress', true); ?>
75
  <?php $controls->init(); ?>
76
 
77
  <table class="form-table">
78
+ <tr>
79
  <th><?php _e('Unsubscription message', 'newsletter') ?></th>
80
  <td>
81
  <?php $controls->wp_editor('unsubscription_text'); ?>
87
  </td>
88
  </tr>
89
 
90
+ <tr>
91
  <th><?php _e('Goodbye message', 'newsletter') ?></th>
92
  <td>
93
  <?php $controls->wp_editor('unsubscribed_text'); ?>
97
  </td>
98
  </tr>
99
 
100
+ <tr>
101
  <th><?php _e('Goodbye email', 'newsletter') ?></th>
102
  <td>
103
  <?php $controls->email('unsubscribed', 'wordpress', true); ?>
tnp-footer.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- if (!defined('ABSPATH')) exit;
3
  ?>
4
  <div id="tnp-footer">
5
  <div>
@@ -13,6 +13,7 @@ if (!defined('ABSPATH')) exit;
13
  <li><a href="https://www.thenewsletterplugin.com/account"><?php _e('Your Account', 'newsletter') ?></a></li>
14
  <li><a href="https://www.thenewsletterplugin.com/forums"><?php _e('Forum', 'newsletter') ?></a></li>
15
  <li><a href="https://www.thenewsletterplugin.com/blog"><?php _e('Blog', 'newsletter') ?></a></li>
 
16
  </div>
17
  <div>
18
  <form target="_blank" action="https://www.thenewsletterplugin.com/?na=s" method="post">
1
  <?php
2
+ defined('ABSPATH') || exit;
3
  ?>
4
  <div id="tnp-footer">
5
  <div>
13
  <li><a href="https://www.thenewsletterplugin.com/account"><?php _e('Your Account', 'newsletter') ?></a></li>
14
  <li><a href="https://www.thenewsletterplugin.com/forums"><?php _e('Forum', 'newsletter') ?></a></li>
15
  <li><a href="https://www.thenewsletterplugin.com/blog"><?php _e('Blog', 'newsletter') ?></a></li>
16
+ </ul>
17
  </div>
18
  <div>
19
  <form target="_blank" action="https://www.thenewsletterplugin.com/?na=s" method="post">
tnp-header.php CHANGED
@@ -35,7 +35,7 @@ $warning |= empty($status_options['mail']);
35
  ?>
36
 
37
  <div class="tnp-drowpdown" id="tnp-header">
38
- <a href="?page=newsletter_main_index"><img src="<?php echo plugins_url('newsletter'); ?>/images/header/tnp-logo-red-header.png" class="tnp-header-logo"style="vertical-align: bottom;"></a>
39
  <ul>
40
  <li><a href="#"><i class="fa fa-users"></i> <?php _e('Subscribers', 'newsletter') ?> <i class="fa fa-chevron-down"></i></a>
41
  <ul>
@@ -58,8 +58,8 @@ $warning |= empty($status_options['mail']);
58
  <ul>
59
  <li><a href="?page=newsletter_subscription_options"><i class="fa fa-sign-in"></i> <?php _e('Subscription', 'newsletter') ?>
60
  <small><?php _e('The subscription process in detail', 'newsletter') ?></small></a></li>
61
-
62
-
63
  <li>
64
  <a href="?page=newsletter_subscription_profile"><i class="fa fa-check-square-o"></i> <?php _e('Subscription Form Fields, Buttons, Labels', 'newsletter') ?>
65
  <small><?php _e('When and what data to collect', 'newsletter') ?></small></a>
@@ -72,7 +72,7 @@ $warning |= empty($status_options['mail']);
72
  <a href="?page=newsletter_subscription_unsubscription"><i class="fa fa-sign-out"></i> <?php _e('Unsubscription', 'newsletter') ?>
73
  <small><?php _e('How to give the last goodbye (or avoid it!)', 'newsletter') ?></small></a>
74
  </li>
75
-
76
  <li>
77
  <a href="?page=newsletter_subscription_forms"><i class="fa fa-pencil"></i> <?php _e('Custom Forms', 'newsletter') ?>
78
  <small><?php _e('Hand coded form storage', 'newsletter') ?></small></a>
@@ -83,7 +83,7 @@ $warning |= empty($status_options['mail']);
83
  </li>
84
  <?php
85
  newsletter_print_entries('subscription');
86
- ?>
87
  </ul>
88
  </li>
89
  <li><a href="#"><i class="fa fa-newspaper-o"></i> <?php _e('Newsletters', 'newsletter') ?> <i class="fa fa-chevron-down"></i></a>
@@ -103,7 +103,7 @@ $warning |= empty($status_options['mail']);
103
  <small><?php _e('Delivery speed, sender details, ...', 'newsletter') ?></small></a></li>
104
  <li><a href="?page=newsletter_main_info"><i class="fa fa-info"></i> <?php _e('Company Info', 'newsletter') ?>
105
  <small><?php _e('Social, address, logo and general info', 'newsletter') ?></small></a></li>
106
-
107
  <?php if (!class_exists('NewsletterSmtp')) { ?>
108
  <li>
109
  <a href="?page=newsletter_main_smtp"><i class="fa fa-envelope-o"></i> <?php _e('SMTP', 'newsletter') ?>
@@ -111,13 +111,13 @@ $warning |= empty($status_options['mail']);
111
  </a>
112
  </li>
113
  <?php } ?>
114
-
115
  <?php
116
  newsletter_print_entries('settings');
117
  ?>
118
  </ul>
119
  </li>
120
-
121
  <li>
122
  <a href="?page=newsletter_main_status"><i class="fa fa-thermometer"></i> <?php _e('Status', 'newsletter') ?>
123
  <?php if ($warning) { ?>
@@ -125,7 +125,7 @@ $warning |= empty($status_options['mail']);
125
  <?php } ?>
126
  </a>
127
  </li>
128
-
129
  <?php
130
  if (empty(Newsletter::instance()->options['contract_key']) && !defined('NEWSLETTER_LICENSE_KEY')) {
131
  ?>
@@ -136,25 +136,18 @@ $warning |= empty($status_options['mail']);
136
  ?>
137
  <?php if (empty(Newsletter::instance()->options['licence_expires'])) { ?>
138
  <li class="tnp-professional-extensions-button-red">
139
- <a href="?page=newsletter_main_main">
140
- <i class="fa fa-hand-paper-o" style="color: white"></i> <?php _e('Licence not valid', 'newsletter') ?>
141
- </a>
142
  <?php } else { ?>
143
  <?php if (Newsletter::instance()->options['licence_expires'] > time()) { ?>
144
  <li class="tnp-professional-extensions-button">
145
- <a href="?page=newsletter_main_extensions">
146
- <i class="fa fa-check-square-o"></i> <?php _e('Licence active', 'newsletter') ?>
147
- </a>
148
  <?php } elseif (Newsletter::instance()->options['licence_expires'] < time()) { ?>
149
  <li class="tnp-professional-extensions-button-red">
150
- <a href="?page=newsletter_main_main">
151
- <i class="fa fa-hand-paper-o" style="color: white"></i> <?php _e('Licence expired', 'newsletter') ?>
152
- </a>
153
  <?php } ?>
154
  <?php } ?>
155
- </a>
156
  </li>
157
- <?php } ?>
158
  </ul>
159
  </div>
160
 
35
  ?>
36
 
37
  <div class="tnp-drowpdown" id="tnp-header">
38
+ <a href="?page=newsletter_main_index"><img src="<?php echo plugins_url('newsletter'); ?>/images/header/tnp-logo-red-header.png" class="tnp-header-logo" style="vertical-align: bottom;"></a>
39
  <ul>
40
  <li><a href="#"><i class="fa fa-users"></i> <?php _e('Subscribers', 'newsletter') ?> <i class="fa fa-chevron-down"></i></a>
41
  <ul>
58
  <ul>
59
  <li><a href="?page=newsletter_subscription_options"><i class="fa fa-sign-in"></i> <?php _e('Subscription', 'newsletter') ?>
60
  <small><?php _e('The subscription process in detail', 'newsletter') ?></small></a></li>
61
+
62
+
63
  <li>
64
  <a href="?page=newsletter_subscription_profile"><i class="fa fa-check-square-o"></i> <?php _e('Subscription Form Fields, Buttons, Labels', 'newsletter') ?>
65
  <small><?php _e('When and what data to collect', 'newsletter') ?></small></a>
72
  <a href="?page=newsletter_subscription_unsubscription"><i class="fa fa-sign-out"></i> <?php _e('Unsubscription', 'newsletter') ?>
73
  <small><?php _e('How to give the last goodbye (or avoid it!)', 'newsletter') ?></small></a>
74
  </li>
75
+
76
  <li>
77
  <a href="?page=newsletter_subscription_forms"><i class="fa fa-pencil"></i> <?php _e('Custom Forms', 'newsletter') ?>
78
  <small><?php _e('Hand coded form storage', 'newsletter') ?></small></a>
83
  </li>
84
  <?php
85
  newsletter_print_entries('subscription');
86
+ ?>
87
  </ul>
88
  </li>
89
  <li><a href="#"><i class="fa fa-newspaper-o"></i> <?php _e('Newsletters', 'newsletter') ?> <i class="fa fa-chevron-down"></i></a>
103
  <small><?php _e('Delivery speed, sender details, ...', 'newsletter') ?></small></a></li>
104
  <li><a href="?page=newsletter_main_info"><i class="fa fa-info"></i> <?php _e('Company Info', 'newsletter') ?>
105
  <small><?php _e('Social, address, logo and general info', 'newsletter') ?></small></a></li>
106
+
107
  <?php if (!class_exists('NewsletterSmtp')) { ?>
108
  <li>
109
  <a href="?page=newsletter_main_smtp"><i class="fa fa-envelope-o"></i> <?php _e('SMTP', 'newsletter') ?>
111
  </a>
112
  </li>
113
  <?php } ?>
114
+
115
  <?php
116
  newsletter_print_entries('settings');
117
  ?>
118
  </ul>
119
  </li>
120
+
121
  <li>
122
  <a href="?page=newsletter_main_status"><i class="fa fa-thermometer"></i> <?php _e('Status', 'newsletter') ?>
123
  <?php if ($warning) { ?>
125
  <?php } ?>
126
  </a>
127
  </li>
128
+
129
  <?php
130
  if (empty(Newsletter::instance()->options['contract_key']) && !defined('NEWSLETTER_LICENSE_KEY')) {
131
  ?>
136
  ?>
137
  <?php if (empty(Newsletter::instance()->options['licence_expires'])) { ?>
138
  <li class="tnp-professional-extensions-button-red">
139
+ <a href="?page=newsletter_main_main"><i class="fa fa-hand-paper-o" style="color: white"></i> <?php _e('Licence not valid', 'newsletter') ?></a>
 
 
140
  <?php } else { ?>
141
  <?php if (Newsletter::instance()->options['licence_expires'] > time()) { ?>
142
  <li class="tnp-professional-extensions-button">
143
+ <a href="?page=newsletter_main_extensions"><i class="fa fa-check-square-o"></i> <?php _e('Licence active', 'newsletter') ?></a>
 
 
144
  <?php } elseif (Newsletter::instance()->options['licence_expires'] < time()) { ?>
145
  <li class="tnp-professional-extensions-button-red">
146
+ <a href="?page=newsletter_main_main"><i class="fa fa-hand-paper-o" style="color: white"></i> <?php _e('Licence expired', 'newsletter') ?></a>
 
 
147
  <?php } ?>
148
  <?php } ?>
 
149
  </li>
150
+ <?php } ?>
151
  </ul>
152
  </div>
153
 
users/edit.php CHANGED
@@ -113,37 +113,37 @@ function percentValue($value, $total) {
113
 
114
  <table class="form-table">
115
 
116
- <tr valign="top">
117
  <th><?php _e ('Email', 'newsletter'); ?></th>
118
  <td>
119
  <?php $controls->text('email', 60); ?>
120
  </td>
121
  </tr>
122
- <tr valign="top">
123
  <th><?php _e ('First name', 'newsletter'); ?></th>
124
  <td>
125
  <?php $controls->text('name', 50); ?>
126
  </td>
127
  </tr>
128
- <tr valign="top">
129
  <th><?php _e('Last name', 'newsletter'); ?></th>
130
  <td>
131
  <?php $controls->text('surname', 50); ?>
132
  </td>
133
  </tr>
134
- <tr valign="top">
135
  <th><?php _e ('Gender', 'newsletter'); ?></th>
136
  <td>
137
  <?php $controls->select('sex', array('n' => 'Not specified', 'f' => 'female', 'm' => 'male')); ?>
138
  </td>
139
  </tr>
140
- <tr valign="top">
141
  <th><?php _e ('Status', 'newsletter'); ?></th>
142
  <td>
143
  <?php $controls->select('status', array('C' => 'Confirmed', 'S' => 'Not confirmed', 'U' => 'Unsubscribed', 'B' => 'Bounced')); ?>
144
  </td>
145
  </tr>
146
- <tr valign="top">
147
  <th><?php _e ('Test subscriber', 'newsletter'); ?>
148
  <br><?php $controls->help('https://www.thenewsletterplugin.com/documentation/subscribers#test-subscribers') ?></th>
149
  <td>
@@ -153,7 +153,7 @@ function percentValue($value, $total) {
153
 
154
  <?php do_action('newsletter_user_edit_extra', $controls); ?>
155
 
156
- <tr valign="top">
157
  <th>Feed by mail</th>
158
  <td>
159
  <?php $controls->yesno('feed'); ?>
@@ -201,37 +201,37 @@ function percentValue($value, $total) {
201
  <div id="tabs-other" class="tnp-tab">
202
 
203
  <table class="form-table">
204
- <tr valign="top">
205
  <th>ID</th>
206
  <td>
207
  <?php $controls->value('id'); ?>
208
  </td>
209
  </tr>
210
- <tr valign="top">
211
  <th><?php _e('Created', 'newsletter') ?></th>
212
  <td>
213
  <?php $controls->value('created'); ?>
214
  </td>
215
  </tr>
216
- <tr valign="top">
217
  <th><?php _e('WP user ID', 'newsletter') ?></th>
218
  <td>
219
  <?php $controls->text('wp_user_id'); ?>
220
  </td>
221
  </tr>
222
- <tr valign="top">
223
  <th><?php _e ('IP address', 'newsletter'); ?></th>
224
  <td>
225
  <?php $controls->value('ip'); ?>
226
  </td>
227
  </tr>
228
- <tr valign="top">
229
  <th><?php _e ('Secret token', 'newsletter'); ?></th>
230
  <td>
231
  <?php $controls->text('token', 50); ?>
232
  </td>
233
  </tr>
234
- <tr valign="top">
235
  <th><?php _e ('Profile URL', 'newsletter'); ?></th>
236
  <td>
237
  <?php $profile_url = esc_html(home_url('/') . '?na=pe&nk=' . $id . '-' . $controls->data['token']); ?>
113
 
114
  <table class="form-table">
115
 
116
+ <tr>
117
  <th><?php _e ('Email', 'newsletter'); ?></th>
118
  <td>
119
  <?php $controls->text('email', 60); ?>
120
  </td>
121
  </tr>
122
+ <tr>
123
  <th><?php _e ('First name', 'newsletter'); ?></th>
124
  <td>
125
  <?php $controls->text('name', 50); ?>
126
  </td>
127
  </tr>
128
+ <tr>
129
  <th><?php _e('Last name', 'newsletter'); ?></th>
130
  <td>
131
  <?php $controls->text('surname', 50); ?>
132
  </td>
133
  </tr>
134
+ <tr>
135
  <th><?php _e ('Gender', 'newsletter'); ?></th>
136
  <td>
137
  <?php $controls->select('sex', array('n' => 'Not specified', 'f' => 'female', 'm' => 'male')); ?>
138
  </td>
139
  </tr>
140
+ <tr>
141
  <th><?php _e ('Status', 'newsletter'); ?></th>
142
  <td>
143
  <?php $controls->select('status', array('C' => 'Confirmed', 'S' => 'Not confirmed', 'U' => 'Unsubscribed', 'B' => 'Bounced')); ?>
144
  </td>
145
  </tr>
146
+ <tr>
147
  <th><?php _e ('Test subscriber', 'newsletter'); ?>
148
  <br><?php $controls->help('https://www.thenewsletterplugin.com/documentation/subscribers#test-subscribers') ?></th>
149
  <td>
153
 
154
  <?php do_action('newsletter_user_edit_extra', $controls); ?>
155
 
156
+ <tr>
157
  <th>Feed by mail</th>
158
  <td>
159
  <?php $controls->yesno('feed'); ?>
201
  <div id="tabs-other" class="tnp-tab">
202
 
203
  <table class="form-table">
204
+ <tr>
205
  <th>ID</th>
206
  <td>
207
  <?php $controls->value('id'); ?>
208
  </td>
209
  </tr>
210
+ <tr>
211
  <th><?php _e('Created', 'newsletter') ?></th>
212
  <td>
213
  <?php $controls->value('created'); ?>
214
  </td>
215
  </tr>
216
+ <tr>
217
  <th><?php _e('WP user ID', 'newsletter') ?></th>
218
  <td>
219
  <?php $controls->text('wp_user_id'); ?>
220
  </td>
221
  </tr>
222
+ <tr>
223
  <th><?php _e ('IP address', 'newsletter'); ?></th>
224
  <td>
225
  <?php $controls->value('ip'); ?>
226
  </td>
227
  </tr>
228
+ <tr>
229
  <th><?php _e ('Secret token', 'newsletter'); ?></th>
230
  <td>
231
  <?php $controls->text('token', 50); ?>
232
  </td>
233
  </tr>
234
+ <tr>
235
  <th><?php _e ('Profile URL', 'newsletter'); ?></th>
236
  <td>
237
  <?php $profile_url = esc_html(home_url('/') . '?na=pe&nk=' . $id . '-' . $controls->data['token']); ?>
users/import.php CHANGED
@@ -166,7 +166,7 @@ if ($controls->is_action('import')) {
166
 
167
  <table class="form-table">
168
 
169
- <tr valign="top">
170
  <th><?php _e('Import Subscribers As', 'newsletter') ?></th>
171
  <td>
172
  <?php $controls->select('import_as', array('C' => __('Confirmed', 'newsletter'), 'S' => __('Not confirmed', 'newsletter'))); ?>
@@ -175,7 +175,7 @@ if ($controls->is_action('import')) {
175
  </td>
176
  </tr>
177
 
178
- <tr valign="top">
179
  <th><?php _e('Import mode', 'newsletter') ?></th>
180
  <td>
181
  <?php $controls->select('mode', array('update' => 'Update', 'overwrite' => 'Overwrite', 'skip' => 'Skip')); ?>
@@ -188,7 +188,7 @@ if ($controls->is_action('import')) {
188
  </td>
189
  </tr>
190
 
191
- <tr valign="top">
192
  <th><?php _e('Lists', 'newsletter') ?></th>
193
  <td>
194
  <?php $controls->preferences_group('preferences', true); ?>
@@ -198,14 +198,14 @@ if ($controls->is_action('import')) {
198
  </td>
199
  </tr>
200
 
201
- <tr valign="top">
202
  <th><?php _e('Field separator', 'newsletter') ?></th>
203
  <td>
204
  <?php $controls->select('separator', array(';' => 'Semicolon', ',' => 'Comma', 'tab' => 'Tabulation')); ?>
205
  </td>
206
  </tr>
207
 
208
- <tr valign="top">
209
  <th>
210
  <?php _e('CSV file', 'newsletter') ?>
211
  <div class="tnp-tip">
@@ -219,7 +219,7 @@ if ($controls->is_action('import')) {
219
  <input type="file" name="csv_file" />
220
  </td>
221
  </tr>
222
- <tr valign="top">
223
  <th>CSV text
224
  <div class="tnp-tip">
225
  <span class="tip-button">Tip</span>
166
 
167
  <table class="form-table">
168
 
169
+ <tr>
170
  <th><?php _e('Import Subscribers As', 'newsletter') ?></th>
171
  <td>
172
  <?php $controls->select('import_as', array('C' => __('Confirmed', 'newsletter'), 'S' => __('Not confirmed', 'newsletter'))); ?>
175
  </td>
176
  </tr>
177
 
178
+ <tr>
179
  <th><?php _e('Import mode', 'newsletter') ?></th>
180
  <td>
181
  <?php $controls->select('mode', array('update' => 'Update', 'overwrite' => 'Overwrite', 'skip' => 'Skip')); ?>
188
  </td>
189
  </tr>
190
 
191
+ <tr>
192
  <th><?php _e('Lists', 'newsletter') ?></th>
193
  <td>
194
  <?php $controls->preferences_group('preferences', true); ?>
198
  </td>
199
  </tr>
200
 
201
+ <tr>
202
  <th><?php _e('Field separator', 'newsletter') ?></th>
203
  <td>
204
  <?php $controls->select('separator', array(';' => 'Semicolon', ',' => 'Comma', 'tab' => 'Tabulation')); ?>
205
  </td>
206
  </tr>
207
 
208
+ <tr>
209
  <th>
210
  <?php _e('CSV file', 'newsletter') ?>
211
  <div class="tnp-tip">
219
  <input type="file" name="csv_file" />
220
  </td>
221
  </tr>
222
+ <tr>
223
  <th>CSV text
224
  <div class="tnp-tip">
225
  <span class="tip-button">Tip</span>
users/new.php CHANGED
@@ -45,7 +45,7 @@ if ($controls->is_action('save')) {
45
  <?php $controls->init(); ?>
46
 
47
  <table class="form-table">
48
- <tr valign="top">
49
  <th><?php _e('Email', 'newsletter')?></th>
50
  <td>
51
  <?php $controls->text_email('email', 60); ?>
45
  <?php $controls->init(); ?>
46
 
47
  <table class="form-table">
48
+ <tr>
49
  <th><?php _e('Email', 'newsletter')?></th>
50
  <td>
51
  <?php $controls->text_email('email', 60); ?>
users/statistics-time.php CHANGED
@@ -12,13 +12,13 @@ if (!defined('ABSPATH'))
12
 
13
  <table class="widefat">
14
  <thead>
15
- <tr valign="top">
16
  <th><?php _e('Year and month', 'newsletter') ?></th>
17
  <th><?php _e('Total', 'newsletter') ?></th>
18
  </tr>
19
  </thead>
20
  <?php foreach ($months as &$day) { ?>
21
- <tr valign="top">
22
  <td><?php echo $day->d; ?></td>
23
  <td><?php echo $day->c; ?></td>
24
  </tr>
@@ -35,13 +35,13 @@ if (!defined('ABSPATH'))
35
  ?>
36
  <table class="widefat">
37
  <thead>
38
- <tr valign="top">
39
  <th><?php _e('Date', 'newsletter') ?></th>
40
  <th><?php _e('Total', 'newsletter') ?></th>
41
  </tr>
42
  </thead>
43
  <?php foreach ($list as $day) { ?>
44
- <tr valign="top">
45
  <td><?php echo $day->d; ?></td>
46
  <td><?php echo $day->c; ?></td>
47
  </tr>
12
 
13
  <table class="widefat">
14
  <thead>
15
+ <tr>
16
  <th><?php _e('Year and month', 'newsletter') ?></th>
17
  <th><?php _e('Total', 'newsletter') ?></th>
18
  </tr>
19
  </thead>
20
  <?php foreach ($months as &$day) { ?>
21
+ <tr>
22
  <td><?php echo $day->d; ?></td>
23
  <td><?php echo $day->c; ?></td>
24
  </tr>
35
  ?>
36
  <table class="widefat">
37
  <thead>
38
+ <tr>
39
  <th><?php _e('Date', 'newsletter') ?></th>
40
  <th><?php _e('Total', 'newsletter') ?></th>
41
  </tr>
42
  </thead>
43
  <?php foreach ($list as $day) { ?>
44
+ <tr>
45
  <td><?php echo $day->d; ?></td>
46
  <td><?php echo $day->c; ?></td>
47
  </tr>
users/statistics.php CHANGED
@@ -56,7 +56,7 @@ $controls = new NewsletterControls();
56
  </tr>
57
  </thead>
58
  <tbody>
59
- <tr valign="top">
60
  <td><?php _e('Any', 'newsletter') ?></td>
61
  <td>
62
  <?php echo $wpdb->get_var("select count(*) from " . NEWSLETTER_USERS_TABLE); ?>
56
  </tr>
57
  </thead>
58
  <tbody>
59
+ <tr>
60
  <td><?php _e('Any', 'newsletter') ?></td>
61
  <td>
62
  <?php echo $wpdb->get_var("select count(*) from " . NEWSLETTER_USERS_TABLE); ?>
widget/minimal.php CHANGED
@@ -56,7 +56,8 @@ class NewsletterWidgetMinimal extends WP_Widget {
56
  if (!is_array($instance)) {
57
  $instance = array();
58
  }
59
- $instance = array_merge(array('title' => '', 'text' => '', 'button'=>''), $instance);
 
60
  $options_profile = get_option('newsletter_profile');
61
  if (!is_array($instance['nl'])) {
62
  $instance['nl'] = array();
56
  if (!is_array($instance)) {
57
  $instance = array();
58
  }
59
+ $profile_options = NewsletterSubscription::instance()->get_options('profile');
60
+ $instance = array_merge(array('title' => '', 'text' => '', 'button'=>$profile_options['subscribe'], 'nl'=>array()), $instance);
61
  $options_profile = get_option('newsletter_profile');
62
  if (!is_array($instance['nl'])) {
63
  $instance['nl'] = array();
widget/standard.php CHANGED
@@ -167,13 +167,6 @@ class NewsletterWidget extends WP_Widget {
167
  }
168
 
169
  function update($new_instance, $old_instance) {
170
- // $instance = $old_instance;
171
- // $instance['title'] = strip_tags($new_instance['title']);
172
- // $instance['text'] = $new_instance['text'];
173
- // if (isset($new_instance['old_form']))
174
- // $instance['old_form'] = 1;
175
- // else
176
- // unset($instance['old_form']);
177
  return $new_instance;
178
  }
179
 
167
  }
168
 
169
  function update($new_instance, $old_instance) {
 
 
 
 
 
 
 
170
  return $new_instance;
171
  }
172