Version Description
- Fixed the mailto rewriting
- Added tags and categories to default theme
- Added post type on default theme
- Fixed some administrative CSS
- Revisited the theme selection and configuration
Download this release
Release Info
Developer | satollo |
Plugin | Newsletter |
Version | 3.3.5 |
Comparing to | |
See all releases |
Code changes from version 3.3.4 to 3.3.5
- admin.css +1 -1
- emails/languages/en_US.php +5 -0
- emails/new.php +26 -7
- emails/themes/default/theme-options.php +30 -27
- emails/themes/default/theme.php +20 -2
- includes/controls.php +3 -4
- includes/module.php +1 -1
- plugin.php +7 -5
- readme.txt +10 -2
- statistics/statistics.php +4 -1
admin.css
CHANGED
@@ -741,7 +741,7 @@ table.clicks {
|
|
741 |
list-style-position: inside;
|
742 |
}
|
743 |
|
744 |
-
.nl-checkbox-group {
|
745 |
float: left;
|
746 |
margin-right: 5px;
|
747 |
border: 1px solid #ccc;
|
741 |
list-style-position: inside;
|
742 |
}
|
743 |
|
744 |
+
.newsletter-checkbox-group, .nl-checkbox-group {
|
745 |
float: left;
|
746 |
margin-right: 5px;
|
747 |
border: 1px solid #ccc;
|
emails/languages/en_US.php
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
$options = array(
|
4 |
+
'theme'=>'default'
|
5 |
+
);
|
emails/new.php
CHANGED
@@ -118,16 +118,36 @@ function newsletter_emails_get_theme_options($theme) {
|
|
118 |
</ul>
|
119 |
|
120 |
-->
|
121 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
|
123 |
<h3>Set the theme options</h3>
|
124 |
<?php @include $module->get_current_theme_file_path('theme-options.php'); ?>
|
125 |
|
126 |
-
|
127 |
-
<?php $controls->button_primary('create', 'Create the email'); ?>
|
128 |
|
129 |
-
|
130 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
131 |
|
132 |
<!--
|
133 |
<div id="tabs-2">
|
@@ -148,7 +168,6 @@ function newsletter_emails_get_theme_options($theme) {
|
|
148 |
|
149 |
<h3>Preview</h3>
|
150 |
|
151 |
-
|
152 |
-
|
153 |
</form>
|
154 |
</div>
|
118 |
</ul>
|
119 |
|
120 |
-->
|
121 |
+
<div>
|
122 |
+
|
123 |
+
|
124 |
+
</div>
|
125 |
+
<table style="width: 100%">
|
126 |
+
<tr>
|
127 |
+
<td><?php $controls->button('save', 'Save options and refresh'); ?>
|
128 |
+
To create custom theme <a href="http://www.satollo.net/plugins/newsletter/newsletter-themes" target="_blank">read here</a>
|
129 |
+
|
130 |
+
</td>
|
131 |
+
<td>
|
132 |
+
<?php $controls->button_primary('create', 'Go to edit this message'); ?>
|
133 |
+
</td>
|
134 |
+
</tr>
|
135 |
+
<tr>
|
136 |
+
|
137 |
+
<td style="vertical-align: top"><div class="newsletter-box">
|
138 |
|
139 |
<h3>Set the theme options</h3>
|
140 |
<?php @include $module->get_current_theme_file_path('theme-options.php'); ?>
|
141 |
|
142 |
+
|
|
|
143 |
|
144 |
+
<!--<div class="hints">Theme options are saved for next time you'll use it!</div>-->
|
145 |
+
</div></td>
|
146 |
+
<td style="width: 600px; vertical-align: top"><iframe src="<?php echo wp_nonce_url(plugins_url('newsletter') . '/emails/preview.php?' . time()); ?>" width="100%" height="700" style="border: 1px solid #ccc"></iframe>
|
147 |
+
</td>
|
148 |
+
</tr>
|
149 |
+
</table>
|
150 |
+
|
151 |
|
152 |
<!--
|
153 |
<div id="tabs-2">
|
168 |
|
169 |
<h3>Preview</h3>
|
170 |
|
171 |
+
|
|
|
172 |
</form>
|
173 |
</div>
|
emails/themes/default/theme-options.php
CHANGED
@@ -1,27 +1,30 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
|
|
|
|
|
1 |
+
|
2 |
+
Base color
|
3 |
+
<?php $controls->color('theme_color'); ?> (format #RRGGBB)
|
4 |
+
<br><br>
|
5 |
+
Banner/Title
|
6 |
+
<?php $controls->wp_editor('theme_banner'); ?>
|
7 |
+
<div class="hints">
|
8 |
+
Create a content with an image (500 pixel wide) that will be your newsletter banner and that will replace the
|
9 |
+
title with your blog name.
|
10 |
+
</div>
|
11 |
+
<br>
|
12 |
+
<?php $controls->checkbox('theme_posts', 'Add latest posts'); ?>
|
13 |
+
<br>
|
14 |
+
<?php $controls->checkbox('theme_thumbnails', 'Add post thumbnails'); ?>
|
15 |
+
<br>
|
16 |
+
<?php $controls->checkbox('theme_excerpts', 'Add post excerpts'); ?>
|
17 |
+
<br><br>
|
18 |
+
Categories
|
19 |
+
<?php $controls->categories_group('theme_categories'); ?>
|
20 |
+
<br><br>
|
21 |
+
Tags
|
22 |
+
<?php $controls->text('theme_tags', 30); ?> (comma separated)
|
23 |
+
<br><br>
|
24 |
+
Max posts
|
25 |
+
<?php $controls->text('theme_max_posts', 5); ?>
|
26 |
+
<br><br>
|
27 |
+
Post types to include
|
28 |
+
<br>
|
29 |
+
<?php $controls->post_types('theme_post_types'); ?>
|
30 |
+
<div class="hints">Leave all uncheck for a default behavior.</div>
|
emails/themes/default/theme.php
CHANGED
@@ -13,8 +13,26 @@ global $newsletter, $post;
|
|
13 |
$color = $theme_options['theme_color'];
|
14 |
if (empty($color)) $color = '#0088cc';
|
15 |
|
16 |
-
if (isset($theme_options['theme_posts']))
|
17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
|
19 |
?><!DOCTYPE html>
|
20 |
<html>
|
13 |
$color = $theme_options['theme_color'];
|
14 |
if (empty($color)) $color = '#0088cc';
|
15 |
|
16 |
+
if (isset($theme_options['theme_posts'])) {
|
17 |
+
$filters = array();
|
18 |
+
|
19 |
+
if (empty($theme_options['theme_max_posts'])) $filters['showposts'] = 10;
|
20 |
+
else $filters['showposts'] = (int)$theme_options['theme_max_posts'];
|
21 |
+
|
22 |
+
if (!empty($theme_options['theme_categories'])) {
|
23 |
+
$filters['category__in'] = $theme_options['theme_categories'];
|
24 |
+
}
|
25 |
+
|
26 |
+
if (!empty($theme_options['theme_tags'])) {
|
27 |
+
$filters['tag'] = $theme_options['theme_tags'];
|
28 |
+
}
|
29 |
+
|
30 |
+
if (!empty($theme_options['theme_post_types'])) {
|
31 |
+
$filters['post_type'] = $theme_options['theme_post_types'];
|
32 |
+
}
|
33 |
+
|
34 |
+
$posts = get_posts($filters);
|
35 |
+
}
|
36 |
|
37 |
?><!DOCTYPE html>
|
38 |
<html>
|
includes/controls.php
CHANGED
@@ -158,7 +158,7 @@ class NewsletterControls {
|
|
158 |
$list[$post_type->name] = $post_type->labels->name;
|
159 |
}
|
160 |
|
161 |
-
$this->checkboxes_group(
|
162 |
}
|
163 |
|
164 |
function select_group($name, $options) {
|
@@ -229,7 +229,6 @@ class NewsletterControls {
|
|
229 |
echo '</label>';
|
230 |
}
|
231 |
echo '<div style="clear: both"></div>';
|
232 |
-
echo 'Want to create a custom theme? <a href="http://www.satollo.net/plugins/newsletter/newsletter-themes" target="_blank">Read here</a>';
|
233 |
}
|
234 |
|
235 |
function value($name) {
|
@@ -389,9 +388,9 @@ class NewsletterControls {
|
|
389 |
if ($show_mode) {
|
390 |
$this->select($name . '_mode', array('include' => 'To be included', 'exclude' => 'To be excluded'));
|
391 |
}
|
392 |
-
echo '<div class="newsletter-
|
393 |
foreach ($categories as &$c) {
|
394 |
-
echo '<div class="newsletter-
|
395 |
$this->checkbox_group($name, $c->cat_ID, esc_html($c->cat_name));
|
396 |
echo '</div>';
|
397 |
}
|
158 |
$list[$post_type->name] = $post_type->labels->name;
|
159 |
}
|
160 |
|
161 |
+
$this->checkboxes_group($name, $list);
|
162 |
}
|
163 |
|
164 |
function select_group($name, $options) {
|
229 |
echo '</label>';
|
230 |
}
|
231 |
echo '<div style="clear: both"></div>';
|
|
|
232 |
}
|
233 |
|
234 |
function value($name) {
|
388 |
if ($show_mode) {
|
389 |
$this->select($name . '_mode', array('include' => 'To be included', 'exclude' => 'To be excluded'));
|
390 |
}
|
391 |
+
echo '<div class="newsletter-checkboxes-group">';
|
392 |
foreach ($categories as &$c) {
|
393 |
+
echo '<div class="newsletter-checkboxes-item">';
|
394 |
$this->checkbox_group($name, $c->cat_ID, esc_html($c->cat_name));
|
395 |
echo '</div>';
|
396 |
}
|
includes/module.php
CHANGED
@@ -151,7 +151,7 @@ class NewsletterModule {
|
|
151 |
*/
|
152 |
function get_options($sub = '') {
|
153 |
$options = get_option($this->get_prefix($sub));
|
154 |
-
if ($options
|
155 |
return array();
|
156 |
return $options;
|
157 |
}
|
151 |
*/
|
152 |
function get_options($sub = '') {
|
153 |
$options = get_option($this->get_prefix($sub));
|
154 |
+
if ($options === false)
|
155 |
return array();
|
156 |
return $options;
|
157 |
}
|
plugin.php
CHANGED
@@ -4,16 +4,16 @@
|
|
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.3.
|
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.
|
11 |
|
12 |
-
Copyright
|
13 |
*/
|
14 |
|
15 |
// Useed as dummy parameter on css and js links
|
16 |
-
define('NEWSLETTER_VERSION', '3.3.
|
17 |
|
18 |
global $wpdb, $newsletter;
|
19 |
|
@@ -619,8 +619,10 @@ class Newsletter extends NewsletterModule {
|
|
619 |
|
620 |
$this->mailer->CharSet = 'UTF-8';
|
621 |
$this->mailer->From = $this->options['sender_email'];
|
622 |
-
|
623 |
-
|
|
|
|
|
624 |
}
|
625 |
if (!empty($this->options['reply_to'])) {
|
626 |
$this->mailer->AddReplyTo($this->options['reply_to']);
|
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.3.5
|
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.
|
11 |
|
12 |
+
Copyright 2009-2013 Stefano Lissa (email: stefano@satollo.net, web: http://www.satollo.net)
|
13 |
*/
|
14 |
|
15 |
// Useed as dummy parameter on css and js links
|
16 |
+
define('NEWSLETTER_VERSION', '3.3.5');
|
17 |
|
18 |
global $wpdb, $newsletter;
|
19 |
|
619 |
|
620 |
$this->mailer->CharSet = 'UTF-8';
|
621 |
$this->mailer->From = $this->options['sender_email'];
|
622 |
+
|
623 |
+
$return_path = $this->options['return_path'];
|
624 |
+
if (!empty($return_path)) {
|
625 |
+
$this->mailer->Sender = $return_path;
|
626 |
}
|
627 |
if (!empty($this->options['reply_to'])) {
|
628 |
$this->mailer->AddReplyTo($this->options['reply_to']);
|
readme.txt
CHANGED
@@ -1,8 +1,8 @@
|
|
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.5.
|
5 |
-
Stable tag: 3.3.
|
6 |
Donate link: http://www.satollo.net/donations
|
7 |
|
8 |
Add a real newsletter to your blog. In seconds. For free. With unlimited emails and subscribers.
|
@@ -55,6 +55,14 @@ No screen shots are available at this time.
|
|
55 |
|
56 |
== Changelog ==
|
57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
= 3.3.4 =
|
59 |
|
60 |
* Fixed the module version check
|
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.5.2
|
5 |
+
Stable tag: 3.3.5
|
6 |
Donate link: http://www.satollo.net/donations
|
7 |
|
8 |
Add a real newsletter to your blog. In seconds. For free. With unlimited emails and subscribers.
|
55 |
|
56 |
== Changelog ==
|
57 |
|
58 |
+
= 3.3.5 =
|
59 |
+
|
60 |
+
* Fixed the mailto rewriting
|
61 |
+
* Added tags and categories to default theme
|
62 |
+
* Added post type on default theme
|
63 |
+
* Fixed some administrative CSS
|
64 |
+
* Revisited the theme selection and configuration
|
65 |
+
|
66 |
= 3.3.4 =
|
67 |
|
68 |
* Fixed the module version check
|
statistics/statistics.php
CHANGED
@@ -17,7 +17,7 @@ class NewsletterStatistics extends NewsletterModule {
|
|
17 |
}
|
18 |
|
19 |
function __construct() {
|
20 |
-
parent::__construct('statistics', '1.0.
|
21 |
}
|
22 |
|
23 |
function upgrade() {
|
@@ -75,6 +75,9 @@ class NewsletterStatistics extends NewsletterModule {
|
|
75 |
return $matches[0];
|
76 |
if (substr($href, 0, 1) == '#')
|
77 |
return $matches[0];
|
|
|
|
|
|
|
78 |
|
79 |
$anchor = '';
|
80 |
if ($this->options['anchor'] == 1) {
|
17 |
}
|
18 |
|
19 |
function __construct() {
|
20 |
+
parent::__construct('statistics', '1.0.6');
|
21 |
}
|
22 |
|
23 |
function upgrade() {
|
75 |
return $matches[0];
|
76 |
if (substr($href, 0, 1) == '#')
|
77 |
return $matches[0];
|
78 |
+
if (substr($href, 0, 7) == 'mailto:')
|
79 |
+
return $matches[0];
|
80 |
+
|
81 |
|
82 |
$anchor = '';
|
83 |
if ($this->options['anchor'] == 1) {
|