Newsletter - Version 4.7.5

Version Description

  • Removed references to old css
  • Fixed the relative URLs problem in the composer
Download this release

Release Info

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

Code changes from version 4.7.3 to 4.7.5

emails/edit.php CHANGED
@@ -287,7 +287,7 @@ if ($email['editor'] == 0) {
287
  <form method="post" action="" id="newsletter-form">
288
  <?php $controls->init(array('cookie_name' => 'newsletter_emails_edit_tab')); ?>
289
 
290
- <div class="submit">
291
  <?php $controls->button_back('?page=newsletter_emails_index') ?>
292
  <?php if ($email['status'] != 'sending' && $email['status'] != 'sent') $controls->button_save(); ?>
293
  <?php if ($email['status'] != 'sending' && $email['status'] != 'sent') $controls->button_confirm('test', 'Save and test', 'Save and send test emails to test addresses?'); ?>
287
  <form method="post" action="" id="newsletter-form">
288
  <?php $controls->init(array('cookie_name' => 'newsletter_emails_edit_tab')); ?>
289
 
290
+ <div class="tnp-submit">
291
  <?php $controls->button_back('?page=newsletter_emails_index') ?>
292
  <?php if ($email['status'] != 'sending' && $email['status'] != 'sent') $controls->button_save(); ?>
293
  <?php if ($email['status'] != 'sending' && $email['status'] != 'sent') $controls->button_confirm('test', 'Save and test', 'Save and send test emails to test addresses?'); ?>
emails/themes/cta-2015/theme.php CHANGED
@@ -133,6 +133,11 @@ $social_icon_url = plugins_url('newsletter') . '/emails/themes/cta-2015/images';
133
  <a href="<?php echo $theme_options['main_vimeo_url'] ?>"><img src="<?php echo $social_icon_url ?>/vimeo.png"></a>
134
  </td>
135
  <?php } ?>
 
 
 
 
 
136
  </tr>
137
  </table>
138
 
133
  <a href="<?php echo $theme_options['main_vimeo_url'] ?>"><img src="<?php echo $social_icon_url ?>/vimeo.png"></a>
134
  </td>
135
  <?php } ?>
136
+ <?php if (!empty($theme_options['main_instagram_url'])) { ?>
137
+ <td align="center" valign="top">
138
+ <a href="<?php echo $theme_options['main_instagram_url'] ?>"><img src="<?php echo $social_icon_url ?>/instagram.png"></a>
139
+ </td>
140
+ <?php } ?>
141
  </tr>
142
  </table>
143
 
emails/themes/default/images/instagram.png ADDED
Binary file
emails/themes/default/images/pinterest.png CHANGED
Binary file
emails/themes/default/images/tumblr.png CHANGED
Binary file
emails/themes/default/social-options.php CHANGED
@@ -39,4 +39,8 @@ if (!defined('ABSPATH')) exit;
39
  <th>Soundcloud</th>
40
  <td><?php $controls->text_url('theme_soundcloud', 30); ?></td>
41
  </tr>
 
 
 
 
42
  </table>
39
  <th>Soundcloud</th>
40
  <td><?php $controls->text_url('theme_soundcloud', 30); ?></td>
41
  </tr>
42
+ <tr>
43
+ <th>Instagram</th>
44
+ <td><?php $controls->text_url('theme_instagram', 30); ?></td>
45
+ </tr>
46
  </table>
emails/themes/default/social.php CHANGED
@@ -54,5 +54,10 @@ $social_icon_url = plugins_url('newsletter') . '/emails/themes/default/images';
54
  <a href="<?php echo esc_attr($theme_options['theme_soundcloud']) ?>"><img src="<?php echo $social_icon_url ?>/soundcloud.png"><br>SoundCloud</a>
55
  </td>
56
  <?php } ?>
 
 
 
 
 
57
  </tr>
58
  </table>
54
  <a href="<?php echo esc_attr($theme_options['theme_soundcloud']) ?>"><img src="<?php echo $social_icon_url ?>/soundcloud.png"><br>SoundCloud</a>
55
  </td>
56
  <?php } ?>
57
+ <?php if (!empty($theme_options['theme_instagram'])) { ?>
58
+ <td style="text-align: center; vertical-align: top" align="center" valign="top">
59
+ <a href="<?php echo esc_attr($theme_options['theme_instagram']) ?>"><img src="<?php echo $social_icon_url ?>/instagram.png"><br>Instagram</a>
60
+ </td>
61
+ <?php } ?>
62
  </tr>
63
  </table>
emails/themes/default/social_main.php CHANGED
@@ -42,5 +42,10 @@ $social_icon_url = plugins_url('newsletter') . '/emails/themes/default/images';
42
  <a href="<?php echo esc_attr($theme_options['main_vimeo_url']) ?>"><img src="<?php echo $social_icon_url ?>/vimeo.png"></a>
43
  </td>
44
  <?php } ?>
 
 
 
 
 
45
  </tr>
46
  </table>
42
  <a href="<?php echo esc_attr($theme_options['main_vimeo_url']) ?>"><img src="<?php echo $social_icon_url ?>/vimeo.png"></a>
43
  </td>
44
  <?php } ?>
45
+ <?php if (!empty($theme_options['main_instagram_url'])) { ?>
46
+ <td style="text-align: center; vertical-align: top" align="center" valign="top">
47
+ <a href="<?php echo esc_attr($theme_options['main_instagram_url']) ?>"><img src="<?php echo $social_icon_url ?>/instagram.png"></a>
48
+ </td>
49
+ <?php } ?>
50
  </tr>
51
  </table>
emails/themes/linear/theme.php CHANGED
@@ -76,7 +76,7 @@ $posts = get_posts($filters);
76
  <tr>
77
  <td valign="top" align="left">
78
  <?php
79
- foreach (array('facebook', 'twitter', 'youtube', 'linkedin', 'googleplus', 'pinterest', 'tumblr') as $social) {
80
  if (empty($theme_options["theme_$social"]))
81
  continue;
82
  ?>
76
  <tr>
77
  <td valign="top" align="left">
78
  <?php
79
+ foreach (array('facebook', 'twitter', 'youtube', 'linkedin', 'googleplus', 'pinterest', 'tumblr', 'instagram') as $social) {
80
  if (empty($theme_options["theme_$social"]))
81
  continue;
82
  ?>
emails/tnp-composer/_scripts/newsletter-builder.js CHANGED
@@ -93,6 +93,8 @@ jQuery.fn.hover_edit = function () {
93
  tinymce.init({
94
  selector: '#tnpc-edit-text .text',
95
  menubar: false,
 
 
96
  toolbar: [
97
  'fontselect fontsizeselect forecolor | bold italic underline | link | bullist numlist | emoticons | alignleft aligncenter alignright alignjustify tnp'
98
  ],
93
  tinymce.init({
94
  selector: '#tnpc-edit-text .text',
95
  menubar: false,
96
+ relative_urls: false,
97
+ remove_script_host: false,
98
  toolbar: [
99
  'fontselect fontsizeselect forecolor | bold italic underline | link | bullist numlist | emoticons | alignleft aligncenter alignright alignjustify tnp'
100
  ],
emails/tnp-composer/blocks/footer-03-social.block.php CHANGED
@@ -47,6 +47,11 @@
47
  <a href="<?php echo $block_options['soundcloud'] ?>"><img src="<?php echo $social_icon_url ?>/soundcloud.png" alt="SoundCloud"></a>
48
  </span>
49
  <?php } ?>
 
 
 
 
 
50
  <?php if (!$configured) { ?>
51
  <p>Configure your social links in the <a href="?page=newsletter_main_info">Social configuration section</a>.<br/>
52
  Then remove and add again this block.</p>
47
  <a href="<?php echo $block_options['soundcloud'] ?>"><img src="<?php echo $social_icon_url ?>/soundcloud.png" alt="SoundCloud"></a>
48
  </span>
49
  <?php } ?>
50
+ <?php if (!empty($block_options['instagram_url'])) { $configured = true; ?>
51
+ <span class="tnpc-row-edit" data-type="image">
52
+ <a href="<?php echo $block_options['instagram'] ?>"><img src="<?php echo $social_icon_url ?>/instagram.png" alt="Instagram"></a>
53
+ </span>
54
+ <?php } ?>
55
  <?php if (!$configured) { ?>
56
  <p>Configure your social links in the <a href="?page=newsletter_main_info">Social configuration section</a>.<br/>
57
  Then remove and add again this block.</p>
main/info.php CHANGED
@@ -177,6 +177,15 @@ if (!$controls->is_action()) {
177
  </p>
178
  </td>
179
  </tr>
 
 
 
 
 
 
 
 
 
180
  </table>
181
  </div>
182
  </div>
177
  </p>
178
  </td>
179
  </tr>
180
+ <tr valign="top">
181
+ <th>Instagram</th>
182
+ <td>
183
+ <?php $controls->text('instagram_url', 40); ?>
184
+ <p class="description">
185
+ Your Vimeo url (e.g. http://instagram.com/...)
186
+ </p>
187
+ </td>
188
+ </tr>
189
  </table>
190
  </div>
191
  </div>
main/main.php CHANGED
@@ -242,9 +242,7 @@ if (!empty($controls->data['contract_key'])) {
242
  <td>
243
  <?php $controls->textarea('css'); ?>
244
  <p class="description">
245
- Add here your own css to style the forms. The whole form is enclosed in a div with class
246
- "newsletter" and it's made with a table (guys, I know about your table less design
247
- mission, don't blame me too much!)
248
  </p>
249
  </td>
250
  </tr>
242
  <td>
243
  <?php $controls->textarea('css'); ?>
244
  <p class="description">
245
+ This option is obsolete and will be removed, use the custom style field in the subscription configuration panel.
 
 
246
  </p>
247
  </td>
248
  </tr>
plugin.php CHANGED
@@ -4,17 +4,17 @@
4
  Plugin Name: Newsletter
5
  Plugin URI: http://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="http://www.thenewsletterplugin.com/category/release">this page</a> to know what's changed.</strong>
7
- Version: 4.7.3
8
  Author: Stefano Lissa & The Newsletter Team
9
  Author URI: http://www.thenewsletterplugin.com
10
  Disclaimer: Use at your own risk. No warranty expressed or implied is provided.
11
  Text Domain: newsletter
12
 
13
- Copyright 2009-2016 The Newsletter Team (email: info@thenewsletterplugin.com, web: http://www.thenewsletterplugin.com)
14
  */
15
 
16
  // Used as dummy parameter on css and js links
17
- define('NEWSLETTER_VERSION', '4.7.3');
18
 
19
  global $wpdb, $newsletter;
20
 
@@ -106,7 +106,7 @@ class Newsletter extends NewsletterModule {
106
  var $action = '';
107
  static $instance;
108
 
109
- const MAX_CRON_SAMPLES = 300;
110
 
111
  /**
112
  * @return Newsletter
@@ -470,15 +470,6 @@ class Newsletter extends NewsletterModule {
470
  echo $this->options['css'];
471
  echo "</style>";
472
  }
473
-
474
- // TODO: move on subscription module
475
- $profile_options = get_option('newsletter_profile');
476
- if (!empty($profile_options['style'])) {
477
- echo '<link href="' . NewsletterSubscription::instance()->get_style_url($profile_options['style']) . '" type="text/css" rel="stylesheet">';
478
- }
479
- if (!empty($profile_options['widget_style'])) {
480
- echo '<link href="' . NewsletterSubscription::instance()->get_style_url($profile_options['widget_style']) . '" type="text/css" rel="stylesheet">';
481
- }
482
  }
483
 
484
  function relink($text, $email_id, $user_id, $email_token = '') {
@@ -494,16 +485,18 @@ class Newsletter extends NewsletterModule {
494
  $this->logger->debug('hook_newsletter> Start');
495
 
496
  // Do not accept job activation before at least 4 minutes are elapsed from the last run.
497
- if (!$this->check_transient('engine', NEWSLETTER_CRON_INTERVAL))
498
  return;
 
499
 
500
  // Retrieve all email in "sending" status
501
  $emails = $wpdb->get_results("select * from " . NEWSLETTER_EMAILS_TABLE . " where status='sending' and send_on<" . time() . " order by id asc");
502
  $this->logger->debug('hook_newsletter> Emails found in sending status: ' . count($emails));
503
- foreach ($emails as &$email) {
504
  $this->logger->debug('hook_newsletter> Sending email ' . $email->id);
505
- if (!$this->send($email))
506
  break;
 
507
  }
508
  // Remove the semaphore so the delivery engine can be activated again
509
  $this->delete_transient('engine');
4
  Plugin Name: Newsletter
5
  Plugin URI: http://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="http://www.thenewsletterplugin.com/category/release">this page</a> to know what's changed.</strong>
7
+ Version: 4.7.5
8
  Author: Stefano Lissa & The Newsletter Team
9
  Author URI: http://www.thenewsletterplugin.com
10
  Disclaimer: Use at your own risk. No warranty expressed or implied is provided.
11
  Text Domain: newsletter
12
 
13
+ Copyright 2009-2017 The Newsletter Team (email: info@thenewsletterplugin.com, web: http://www.thenewsletterplugin.com)
14
  */
15
 
16
  // Used as dummy parameter on css and js links
17
+ define('NEWSLETTER_VERSION', '4.7.5');
18
 
19
  global $wpdb, $newsletter;
20
 
106
  var $action = '';
107
  static $instance;
108
 
109
+ const MAX_CRON_SAMPLES = 100;
110
 
111
  /**
112
  * @return Newsletter
470
  echo $this->options['css'];
471
  echo "</style>";
472
  }
 
 
 
 
 
 
 
 
 
473
  }
474
 
475
  function relink($text, $email_id, $user_id, $email_token = '') {
485
  $this->logger->debug('hook_newsletter> Start');
486
 
487
  // Do not accept job activation before at least 4 minutes are elapsed from the last run.
488
+ if (!$this->check_transient('engine', NEWSLETTER_CRON_INTERVAL)) {
489
  return;
490
+ }
491
 
492
  // Retrieve all email in "sending" status
493
  $emails = $wpdb->get_results("select * from " . NEWSLETTER_EMAILS_TABLE . " where status='sending' and send_on<" . time() . " order by id asc");
494
  $this->logger->debug('hook_newsletter> Emails found in sending status: ' . count($emails));
495
+ foreach ($emails as $email) {
496
  $this->logger->debug('hook_newsletter> Sending email ' . $email->id);
497
+ if (!$this->send($email)) {
498
  break;
499
+ }
500
  }
501
  // Remove the semaphore so the delivery engine can be activated again
502
  $this->delete_transient('engine');
readme.txt CHANGED
@@ -1,8 +1,8 @@
1
  === Newsletter ===
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.7.0
5
- Stable tag: 4.7.3
6
  Contributors: satollo,webagile,michael-travan
7
 
8
  Add a real newsletter system to your blog. For free. With unlimited newsletters and subscribers.
@@ -77,6 +77,15 @@ Thank you, The Newsletter Team
77
 
78
  == Changelog ==
79
 
 
 
 
 
 
 
 
 
 
80
  = 4.7.3 =
81
 
82
  * Added custom CSS field to customize the forms appearance
1
  === Newsletter ===
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.7
5
+ Stable tag: 4.7.5
6
  Contributors: satollo,webagile,michael-travan
7
 
8
  Add a real newsletter system to your blog. For free. With unlimited newsletters and subscribers.
77
 
78
  == Changelog ==
79
 
80
+ = 4.7.5 =
81
+
82
+ * Removed references to old css
83
+ * Fixed the relative URLs problem in the composer
84
+
85
+ = 4.7.4 =
86
+
87
+ * Improved widget CSS
88
+
89
  = 4.7.3 =
90
 
91
  * Added custom CSS field to customize the forms appearance
subscription/languages/en_US.php CHANGED
@@ -38,8 +38,8 @@ $options['subscription_text'] =
38
  // Message show after a subbscription request has made.
39
  $options['confirmation_text'] =
40
  "<p>You have successfully subscribed to the newsletter. You'll
41
- receive a confirmation email in few minutes. Please follow the
42
- link in it to confirm your subscription. If the email takes
43
  more than 15 minutes to appear in your mailbox, please check
44
  your spam folder.</p>";
45
 
38
  // Message show after a subbscription request has made.
39
  $options['confirmation_text'] =
40
  "<p>You have successfully subscribed to the newsletter. You'll
41
+ receive a confirmation email in a few minutes. Please follow the
42
+ link to confirm your subscription. If the email takes
43
  more than 15 minutes to appear in your mailbox, please check
44
  your spam folder.</p>";
45
 
subscription/style.css CHANGED
@@ -34,6 +34,7 @@
34
  font-size: 14px;
35
  margin: 0;
36
  line-height: normal;
 
37
  }
38
 
39
  .tnp-subscription input[type=checkbox], .tnp-widget input[type=radio] {
@@ -65,20 +66,22 @@
65
  font-size: 13px;
66
  }
67
 
68
- .tnp-profile .tnp-field {
69
  margin-bottom: 10px;
70
  border: 0;
71
  padding: 0;
72
  }
73
 
74
- .tnp-profile label {
75
  display: block;
76
  color: #333;
77
  font-size: 14px;
78
  }
79
 
80
- .tnp-profile input[type=text], .tnp-profile input[type=email], .tnp-profile input[type=submit], .tnp-profile select {
81
- width: 100%;
 
 
82
  padding: 10px;
83
  display: block;
84
  border: 1px;
@@ -88,23 +91,25 @@
88
  font-size: 14px;
89
  margin: 0;
90
  line-height: normal;
 
 
91
  }
92
 
93
- .tnp-profile input[type=checkbox], .tnp-profile input[type=radio] {
94
  width: auto;
95
  display: inline;
96
  }
97
 
98
- .tnp-profile .tnp-list-label {
99
  margin-left: 15px;
100
  }
101
 
102
  /* Antireset - http://www.satollo.net/css-and-select-space-between-the-options-and-the-arrow */
103
- .tnp-profile select option {
104
  margin-right: 10px;
105
  }
106
 
107
- .tnp-profile input[type=submit] {
108
  background-color: #444;
109
  color: #fff;
110
  }
@@ -114,6 +119,7 @@
114
  .tnp-widget {
115
  width: 100%;
116
  display: block;
 
117
  }
118
 
119
  .tnp-widget .tnp-field {
@@ -138,6 +144,7 @@
138
  color: #444;
139
  font-size: 14px;
140
  line-height: normal;
 
141
  }
142
 
143
  .tnp-widget input[type=checkbox], .tnp-widget input[type=radio] {
@@ -185,6 +192,7 @@
185
  background-color: #f4f4f4;
186
  color: #444;
187
  font-size: 14px;
 
188
  }
189
 
190
  .tnp-widget-minimal input.tnp-submit {
@@ -199,11 +207,13 @@
199
  font-size: 14px;
200
  line-height: normal;
201
  border-radius: 0px;
 
202
  }
203
 
204
 
205
  .tnp-subscription-minimal {
206
  width: 100%;
 
207
  }
208
 
209
  .tnp-subscription-minimal form {
@@ -223,6 +233,7 @@
223
  background-color: #f4f4f4;
224
  color: #444;
225
  font-size: 14px;
 
226
  }
227
 
228
  .tnp-subscription-minimal input.tnp-submit {
@@ -235,6 +246,7 @@
235
  background-color: #444;
236
  color: #fff;
237
  font-size: 14px;
 
238
  }
239
 
240
 
34
  font-size: 14px;
35
  margin: 0;
36
  line-height: normal;
37
+ box-sizing: border-box;
38
  }
39
 
40
  .tnp-subscription input[type=checkbox], .tnp-widget input[type=radio] {
66
  font-size: 13px;
67
  }
68
 
69
+ .tnp-profile form .tnp-field {
70
  margin-bottom: 10px;
71
  border: 0;
72
  padding: 0;
73
  }
74
 
75
+ tnp-profile form .tnp-field label {
76
  display: block;
77
  color: #333;
78
  font-size: 14px;
79
  }
80
 
81
+ .tnp-profile form .tnp-field input[type=text],
82
+ .tnp-profile form .tnp-field input[type=email],
83
+ .tnp-profile form .tnp-field input[type=submit],
84
+ .tnp-profile form .tnp-field select {
85
  padding: 10px;
86
  display: block;
87
  border: 1px;
91
  font-size: 14px;
92
  margin: 0;
93
  line-height: normal;
94
+ box-sizing: border-box;
95
+ border-radius: 0;
96
  }
97
 
98
+ .tnp-profile form input[type=checkbox], .tnp-profile input[type=radio] {
99
  width: auto;
100
  display: inline;
101
  }
102
 
103
+ .tnp-profile form .tnp-list-label {
104
  margin-left: 15px;
105
  }
106
 
107
  /* Antireset - http://www.satollo.net/css-and-select-space-between-the-options-and-the-arrow */
108
+ .tnp-profile form select option {
109
  margin-right: 10px;
110
  }
111
 
112
+ .tnp-profile form .tnp-field input[type=submit] {
113
  background-color: #444;
114
  color: #fff;
115
  }
119
  .tnp-widget {
120
  width: 100%;
121
  display: block;
122
+ box-sizing: border-box;
123
  }
124
 
125
  .tnp-widget .tnp-field {
144
  color: #444;
145
  font-size: 14px;
146
  line-height: normal;
147
+ box-sizing: border-box;
148
  }
149
 
150
  .tnp-widget input[type=checkbox], .tnp-widget input[type=radio] {
192
  background-color: #f4f4f4;
193
  color: #444;
194
  font-size: 14px;
195
+ box-sizing: border-box;
196
  }
197
 
198
  .tnp-widget-minimal input.tnp-submit {
207
  font-size: 14px;
208
  line-height: normal;
209
  border-radius: 0px;
210
+ box-sizing: border-box;
211
  }
212
 
213
 
214
  .tnp-subscription-minimal {
215
  width: 100%;
216
+ box-sizing: border-box;
217
  }
218
 
219
  .tnp-subscription-minimal form {
233
  background-color: #f4f4f4;
234
  color: #444;
235
  font-size: 14px;
236
+ box-sizing: border-box;
237
  }
238
 
239
  .tnp-subscription-minimal input.tnp-submit {
246
  background-color: #444;
247
  color: #fff;
248
  font-size: 14px;
249
+ box-sizing: border-box;
250
  }
251
 
252
 
subscription/subscription.php CHANGED
@@ -1572,7 +1572,7 @@ class NewsletterSubscription extends NewsletterModule {
1572
  $buffer .= '<form action="' . esc_attr(home_url('/') . '?na=ps') . '" method="post">';
1573
  $buffer .= '<input type="hidden" name="nk" value="' . esc_attr($user->id . '-' . $user->token) . '">';
1574
 
1575
- $buffer .= '<div class="newsletter-field tnp-field-email">';
1576
  $buffer .= '<label>' . esc_html($options['email']) . '</label>';
1577
  $buffer .= '<input class="tnp-email" type="text" name="ne" required value="' . esc_attr($user->email) . '">';
1578
  $buffer .= "</div>\n";
1572
  $buffer .= '<form action="' . esc_attr(home_url('/') . '?na=ps') . '" method="post">';
1573
  $buffer .= '<input type="hidden" name="nk" value="' . esc_attr($user->id . '-' . $user->token) . '">';
1574
 
1575
+ $buffer .= '<div class="tnp-field tnp-field-email">';
1576
  $buffer .= '<label>' . esc_html($options['email']) . '</label>';
1577
  $buffer .= '<input class="tnp-email" type="text" name="ne" required value="' . esc_attr($user->email) . '">';
1578
  $buffer .= "</div>\n";