Newsletter - Version 3.4.9

Version Description

  • Fixed some warnings in debug mode
  • Fixed the disabling setting of the social icons (on default newsletter themes)
  • Added filters on widget for WPML
  • Added filter for single line feeds refused by some mail servers
Download this release

Release Info

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

Code changes from version 3.4.8 to 3.4.9

emails/themes/default/social-options.php CHANGED
@@ -2,7 +2,7 @@
2
  <table class="form-table">
3
  <tr>
4
  <th>Social block</th>
5
- <td><?php $controls->checkbox('theme_social'); ?> Disable</td>
6
  </tr>
7
  <tr>
8
  <th>Facebook</th>
2
  <table class="form-table">
3
  <tr>
4
  <th>Social block</th>
5
+ <td><?php $controls->checkbox('theme_social_disable'); ?> Disable</td>
6
  </tr>
7
  <tr>
8
  <th>Facebook</th>
feed/languages/en_US.php CHANGED
@@ -1,5 +1,6 @@
1
  <?php
2
 
3
  $options = array(
4
- 'theme'=>'default'
 
5
  );
1
  <?php
2
 
3
  $options = array(
4
+ 'theme'=>'default',
5
+ 'subscription'=>0
6
  );
plugin.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin Name: Newsletter
5
  Plugin URI: http://www.satollo.net/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.satollo.net/plugins/newsletter#update">this page</a> to know what's changed.</strong>
7
- Version: 3.4.8
8
  Author: Stefano Lissa
9
  Author URI: http://www.satollo.net
10
  Disclaimer: Use at your own risk. No warranty expressed or implied is provided.
@@ -13,7 +13,7 @@
13
  */
14
 
15
  // Useed as dummy parameter on css and js links
16
- define('NEWSLETTER_VERSION', '3.4.8');
17
 
18
  global $wpdb, $newsletter;
19
 
@@ -564,20 +564,37 @@ class Newsletter extends NewsletterModule {
564
  // Simple message is asumed to be html
565
  if (!is_array($message)) {
566
  $this->mailer->IsHTML(true);
 
 
 
567
  $this->mailer->Body = $message;
568
  } else {
569
  // Only html is present?
570
  if (empty($message['text'])) {
571
  $this->mailer->IsHTML(true);
 
 
 
572
  $this->mailer->Body = $message['html'];
573
  }
574
  // Only text is present?
575
  else if (empty($message['html'])) {
576
  $this->mailer->IsHTML(false);
 
 
 
577
  $this->mailer->Body = $message['text'];
578
  } else {
579
  $this->mailer->IsHTML(true);
580
-
 
 
 
 
 
 
 
 
581
  $this->mailer->Body = $message['html'];
582
  $this->mailer->AltBody = $message['text'];
583
  }
4
  Plugin Name: Newsletter
5
  Plugin URI: http://www.satollo.net/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.satollo.net/plugins/newsletter#update">this page</a> to know what's changed.</strong>
7
+ Version: 3.4.9
8
  Author: Stefano Lissa
9
  Author URI: http://www.satollo.net
10
  Disclaimer: Use at your own risk. No warranty expressed or implied is provided.
13
  */
14
 
15
  // Useed as dummy parameter on css and js links
16
+ define('NEWSLETTER_VERSION', '3.4.9');
17
 
18
  global $wpdb, $newsletter;
19
 
564
  // Simple message is asumed to be html
565
  if (!is_array($message)) {
566
  $this->mailer->IsHTML(true);
567
+ $message = str_replace("\r\n", "\n", $message);
568
+ $message = str_replace("\r", "\n", $message);
569
+ $message = str_replace("\n", "\r\n", $message);
570
  $this->mailer->Body = $message;
571
  } else {
572
  // Only html is present?
573
  if (empty($message['text'])) {
574
  $this->mailer->IsHTML(true);
575
+ $message['html'] = str_replace("\r\n", "\n", $message['html']);
576
+ $message['html'] = str_replace("\r", "\n", $message['html']);
577
+ $message['html'] = str_replace("\n", "\r\n", $message['html']);
578
  $this->mailer->Body = $message['html'];
579
  }
580
  // Only text is present?
581
  else if (empty($message['html'])) {
582
  $this->mailer->IsHTML(false);
583
+ $message['text'] = str_replace("\r\n", "\n", $message['text']);
584
+ $message['text'] = str_replace("\r", "\n", $message['text']);
585
+ $message['text'] = str_replace("\n", "\r\n", $message['text']);
586
  $this->mailer->Body = $message['text'];
587
  } else {
588
  $this->mailer->IsHTML(true);
589
+
590
+ $message['text'] = str_replace("\r\n", "\n", $message['text']);
591
+ $message['text'] = str_replace("\r", "\n", $message['text']);
592
+ $message['text'] = str_replace("\n", "\r\n", $message['text']);
593
+
594
+ $message['html'] = str_replace("\r\n", "\n", $message['html']);
595
+ $message['html'] = str_replace("\r", "\n", $message['html']);
596
+ $message['html'] = str_replace("\n", "\r\n", $message['html']);
597
+
598
  $this->mailer->Body = $message['html'];
599
  $this->mailer->AltBody = $message['text'];
600
  }
readme.txt CHANGED
@@ -1,7 +1,7 @@
1
  === Newsletter ===
2
  Tags: newsletter,email,subscription,mass mail,list build,email marketing,direct mailing
3
  Requires at least: 3.3.0
4
- Tested up to: 3.7.1
5
  Stable tag: trunk
6
  Donate link: http://www.satollo.net/donations
7
 
@@ -57,6 +57,13 @@ No screen shots are available at this time.
57
 
58
  == Changelog ==
59
 
 
 
 
 
 
 
 
60
  = 3.4.8 =
61
 
62
  * Added a javascript protection against auto confirmation from bot
1
  === Newsletter ===
2
  Tags: newsletter,email,subscription,mass mail,list build,email marketing,direct mailing
3
  Requires at least: 3.3.0
4
+ Tested up to: 3.8.1
5
  Stable tag: trunk
6
  Donate link: http://www.satollo.net/donations
7
 
57
 
58
  == Changelog ==
59
 
60
+ = 3.4.9 =
61
+
62
+ * Fixed some warnings in debug mode
63
+ * Fixed the disabling setting of the social icons (on default newsletter themes)
64
+ * Added filters on widget for WPML
65
+ * Added filter for single line feeds refused by some mail servers
66
+
67
  = 3.4.8 =
68
 
69
  * Added a javascript protection against auto confirmation from bot
subscription/languages/profile-en_US.php CHANGED
@@ -5,11 +5,15 @@ $options['email'] = 'Email';
5
  $options['email_error'] = 'The email is not correct';
6
  $options['name'] = 'Name';
7
  $options['name_error'] = 'The name is not correct';
 
 
8
  $options['surname'] = 'Last name';
9
  $options['surname_error'] = 'The last name is not correct';
 
10
  $options['sex'] = 'I\'m';
11
  $options['privacy'] = 'Subscribing I accept the privacy rules of this site';
12
  $options['privacy_error'] = 'You must accept the privacy statement';
 
13
  $options['subscribe'] = 'Subscribe';
14
  $options['save'] = 'Save';
15
 
@@ -20,3 +24,11 @@ $options['title_none'] = 'Dear';
20
  $options['sex_male'] = 'Man';
21
  $options['sex_female'] = 'Woman';
22
  $options['sex_none'] = 'None';
 
 
 
 
 
 
 
 
5
  $options['email_error'] = 'The email is not correct';
6
  $options['name'] = 'Name';
7
  $options['name_error'] = 'The name is not correct';
8
+ $options['name_status'] = 0;
9
+ $options['name_rules'] = 0;
10
  $options['surname'] = 'Last name';
11
  $options['surname_error'] = 'The last name is not correct';
12
+ $options['surname_status'] = 0;
13
  $options['sex'] = 'I\'m';
14
  $options['privacy'] = 'Subscribing I accept the privacy rules of this site';
15
  $options['privacy_error'] = 'You must accept the privacy statement';
16
+ $options['privacy_status'] = 0;
17
  $options['subscribe'] = 'Subscribe';
18
  $options['save'] = 'Save';
19
 
24
  $options['sex_male'] = 'Man';
25
  $options['sex_female'] = 'Woman';
26
  $options['sex_none'] = 'None';
27
+
28
+ for ($i = 1; $i <= NEWSLETTER_LIST_MAX; $i++) {
29
+ $options['list_' . $i . '_status'] = 0;
30
+ }
31
+
32
+ for ($i=1; $i<=NEWSLETTER_PROFILE_MAX; $i++) {
33
+ $options['profile_' . $i . '_status'] = 0;
34
+ }
subscription/subscription.php CHANGED
@@ -600,11 +600,10 @@ class NewsletterSubscription extends NewsletterModule {
600
 
601
  function get_form_javascript() {
602
  $options_profile = get_option('newsletter_profile');
603
- $buffer .= "\n\n";
604
  $buffer .= '<script type="text/javascript">' . "\n";
605
  $buffer .= '//<![CDATA[' . "\n";
606
  $buffer .= 'if (typeof newsletter_check !== "function") {' . "\n";
607
- ;
608
  $buffer .= 'window.newsletter_check = function (f) {' . "\n";
609
  $buffer .= ' var re = /^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-]{1,})+\.)+([a-zA-Z0-9]{2,})+$/;' . "\n";
610
  $buffer .= ' if (!re.test(f.elements["ne"].value)) {' . "\n";
600
 
601
  function get_form_javascript() {
602
  $options_profile = get_option('newsletter_profile');
603
+ $buffer = "\n\n";
604
  $buffer .= '<script type="text/javascript">' . "\n";
605
  $buffer .= '//<![CDATA[' . "\n";
606
  $buffer .= 'if (typeof newsletter_check !== "function") {' . "\n";
 
607
  $buffer .= 'window.newsletter_check = function (f) {' . "\n";
608
  $buffer .= ' var re = /^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-]{1,})+\.)+([a-zA-Z0-9]{2,})+$/;' . "\n";
609
  $buffer .= ' if (!re.test(f.elements["ne"].value)) {' . "\n";
todo.txt CHANGED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ * Consider the custom taxonomies
2
+
3
+ function categories_group($name, $show_mode = false, $taxonomy = ‘category’, $top_level = false) {
4
+
5
+ $categories = get_categories( array( ‘taxonomy’ => $taxonomy, ‘hide_empty’ => 0 , ‘parent’ => (($top_level) ? 0 : ”) ) );
6
+
7
+ I need to filter for custom taxonomy. Mayby passing the args would do best and keep flexibility.
8
+
9
+ function categories_group($name, $show_mode = false, $cat_args = ”) {
10
+
11
+ $categories = get_categories( $args );
12
+
widget.php CHANGED
@@ -94,11 +94,14 @@ class NewsletterWidget extends WP_Widget {
94
  extract($args);
95
 
96
  echo $before_widget;
 
 
97
  if (!empty($instance['title'])) {
98
- echo $before_title . $instance['title'] . $after_title;
 
99
  }
100
 
101
- $buffer = $instance['text'];
102
  $options = get_option('newsletter');
103
  $options_profile = get_option('newsletter_profile');
104
 
94
  extract($args);
95
 
96
  echo $before_widget;
97
+
98
+ // Filters are used for WPML
99
  if (!empty($instance['title'])) {
100
+ $title = apply_filters('widget_title', $instance['title'], $instance);
101
+ echo $before_title . $title . $after_title;
102
  }
103
 
104
+ $buffer = apply_filters('widget_text', $instance['text'], $instance);
105
  $options = get_option('newsletter');
106
  $options_profile = get_option('newsletter_profile');
107