Version Description
- Fixed the newsletter_replace filter
- Added the person title for salutation
- Changed the profile field panel
- Fixed the massive deletion of unsubscribed users
Download this release
Release Info
Developer | satollo |
Plugin | Newsletter |
Version | 3.2.8 |
Comparing to | |
See all releases |
Code changes from version 3.2.7 to 3.2.8
- admin.css +14 -0
- plugin.php +25 -7
- readme.txt +8 -1
- subscription/menu.inc.php +2 -2
- subscription/profile.php +82 -67
- subscription/subscription.php +1 -1
- users/massive.php +1 -0
admin.css
CHANGED
@@ -914,4 +914,18 @@ table.clicks {
|
|
914 |
margin-bottom: 5px;
|
915 |
}
|
916 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
917 |
|
914 |
margin-bottom: 5px;
|
915 |
}
|
916 |
|
917 |
+
.newsletter-option-grid th {
|
918 |
+
text-align: right;
|
919 |
+
width: auto;
|
920 |
+
border: 0;
|
921 |
+
padding: 3px;
|
922 |
+
font-weight: normal;
|
923 |
+
vertical-align: top;
|
924 |
+
padding-right: 15px;
|
925 |
+
}
|
926 |
+
.newsletter-option-grid td {
|
927 |
+
border: 0;
|
928 |
+
padding: 3px;
|
929 |
+
vertical-align: top;
|
930 |
+
}
|
931 |
|
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.2.
|
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.2.
|
17 |
|
18 |
global $wpdb, $newsletter;
|
19 |
|
@@ -128,7 +128,7 @@ class Newsletter extends NewsletterModule {
|
|
128 |
|
129 |
add_action('init', array($this, 'hook_init'));
|
130 |
add_action('newsletter', array($this, 'hook_newsletter'), 1);
|
131 |
-
|
132 |
|
133 |
// This specific event is created by "Feed by mail" panel on configuration
|
134 |
add_action('shutdown', array($this, 'hook_shutdown'));
|
@@ -343,7 +343,7 @@ class Newsletter extends NewsletterModule {
|
|
343 |
function relink($text, $email_id, $user_id) {
|
344 |
return NewsletterStatistics::instance()->relink($text, $email_id, $user_id);
|
345 |
}
|
346 |
-
|
347 |
/**
|
348 |
* Runs every 5 minutes and look for emails that need to be processed.
|
349 |
*/
|
@@ -736,19 +736,26 @@ class Newsletter extends NewsletterModule {
|
|
736 |
$user = $this->get_user($user['id']);
|
737 |
}
|
738 |
|
739 |
-
$
|
|
|
|
|
|
|
|
|
|
|
740 |
|
741 |
//$text = str_replace('{home_url}', get_option('home'), $text);
|
742 |
//$text = str_replace('{blog_url}', get_option('home'), $text);
|
743 |
$text = $this->replace_url($text, 'BLOG_URL', get_option('home'));
|
744 |
$text = $this->replace_url($text, 'HOME_URL', get_option('home'));
|
745 |
-
|
746 |
$text = str_replace('{blog_title}', get_option('blogname'), $text);
|
747 |
$text = str_replace('{blog_description}', get_option('blogdescription'), $text);
|
748 |
|
749 |
$text = $this->replace_date($text);
|
750 |
|
751 |
if ($user != null) {
|
|
|
|
|
752 |
$text = str_replace('{email}', $user->email, $text);
|
753 |
if (empty($user->name)) {
|
754 |
$text = str_replace(' {name}', '', $text);
|
@@ -756,6 +763,17 @@ class Newsletter extends NewsletterModule {
|
|
756 |
} else {
|
757 |
$text = str_replace('{name}', $user->name, $text);
|
758 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
759 |
$text = str_replace('{surname}', $user->surname, $text);
|
760 |
$text = str_replace('{token}', $user->token, $text);
|
761 |
$text = str_replace('%7Btoken%7D', $user->token, $text);
|
@@ -797,7 +815,7 @@ class Newsletter extends NewsletterModule {
|
|
797 |
$text = $this->replace_url($text, 'FEED_SUBSCRIPTION_URL', self::add_qs($base, 'nm=es' . $id_token));
|
798 |
$text = $this->replace_url($text, 'FEED_UNSUBSCRIPTION_URL', self::add_qs($base, 'nm=eu' . $id_token));
|
799 |
|
800 |
-
|
801 |
if (empty($options_profile['profile_url']))
|
802 |
$text = $this->replace_url($text, 'PROFILE_URL', plugins_url('newsletter/do/profile.php') . '?nk=' . $nk);
|
803 |
else
|
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.2.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 |
*/
|
14 |
|
15 |
// Useed as dummy parameter on css and js links
|
16 |
+
define('NEWSLETTER_VERSION', '3.2.8');
|
17 |
|
18 |
global $wpdb, $newsletter;
|
19 |
|
128 |
|
129 |
add_action('init', array($this, 'hook_init'));
|
130 |
add_action('newsletter', array($this, 'hook_newsletter'), 1);
|
131 |
+
|
132 |
|
133 |
// This specific event is created by "Feed by mail" panel on configuration
|
134 |
add_action('shutdown', array($this, 'hook_shutdown'));
|
343 |
function relink($text, $email_id, $user_id) {
|
344 |
return NewsletterStatistics::instance()->relink($text, $email_id, $user_id);
|
345 |
}
|
346 |
+
|
347 |
/**
|
348 |
* Runs every 5 minutes and look for emails that need to be processed.
|
349 |
*/
|
736 |
$user = $this->get_user($user['id']);
|
737 |
}
|
738 |
|
739 |
+
$email = null;
|
740 |
+
if (is_numeric($email_id)) {
|
741 |
+
$email = $this->get_email($email_id);
|
742 |
+
}
|
743 |
+
|
744 |
+
$text = apply_filters('newsletter_replace', $text, $user, $email);
|
745 |
|
746 |
//$text = str_replace('{home_url}', get_option('home'), $text);
|
747 |
//$text = str_replace('{blog_url}', get_option('home'), $text);
|
748 |
$text = $this->replace_url($text, 'BLOG_URL', get_option('home'));
|
749 |
$text = $this->replace_url($text, 'HOME_URL', get_option('home'));
|
750 |
+
|
751 |
$text = str_replace('{blog_title}', get_option('blogname'), $text);
|
752 |
$text = str_replace('{blog_description}', get_option('blogdescription'), $text);
|
753 |
|
754 |
$text = $this->replace_date($text);
|
755 |
|
756 |
if ($user != null) {
|
757 |
+
$options_profile = get_option('newsletter_profile');
|
758 |
+
|
759 |
$text = str_replace('{email}', $user->email, $text);
|
760 |
if (empty($user->name)) {
|
761 |
$text = str_replace(' {name}', '', $text);
|
763 |
} else {
|
764 |
$text = str_replace('{name}', $user->name, $text);
|
765 |
}
|
766 |
+
|
767 |
+
switch ($user->sex) {
|
768 |
+
case 'm': $text = str_replace('{title}', $options_profile['title_male'], $text);
|
769 |
+
break;
|
770 |
+
case 'f': $text = str_replace('{title}', $options_profile['title_female'], $text);
|
771 |
+
break;
|
772 |
+
case 'n': $text = str_replace('{title}', $options_profile['title_none'], $text);
|
773 |
+
break;
|
774 |
+
}
|
775 |
+
|
776 |
+
|
777 |
$text = str_replace('{surname}', $user->surname, $text);
|
778 |
$text = str_replace('{token}', $user->token, $text);
|
779 |
$text = str_replace('%7Btoken%7D', $user->token, $text);
|
815 |
$text = $this->replace_url($text, 'FEED_SUBSCRIPTION_URL', self::add_qs($base, 'nm=es' . $id_token));
|
816 |
$text = $this->replace_url($text, 'FEED_UNSUBSCRIPTION_URL', self::add_qs($base, 'nm=eu' . $id_token));
|
817 |
|
818 |
+
|
819 |
if (empty($options_profile['profile_url']))
|
820 |
$text = $this->replace_url($text, 'PROFILE_URL', plugins_url('newsletter/do/profile.php') . '?nk=' . $nk);
|
821 |
else
|
readme.txt
CHANGED
@@ -2,7 +2,7 @@
|
|
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.1
|
5 |
-
Stable tag: 3.2.
|
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,13 @@ No screen shots are available at this time.
|
|
55 |
|
56 |
== Changelog ==
|
57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
= 3.2.7 =
|
59 |
|
60 |
* Added a controls for the Reports module version 1.0.4
|
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.1
|
5 |
+
Stable tag: 3.2.8
|
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.2.8 =
|
59 |
+
|
60 |
+
* Fixed the newsletter_replace filter
|
61 |
+
* Added the person title for salutation
|
62 |
+
* Changed the profile field panel
|
63 |
+
* Fixed the massive deletion of unsubscribed users
|
64 |
+
|
65 |
= 3.2.7 =
|
66 |
|
67 |
* Added a controls for the Reports module version 1.0.4
|
subscription/menu.inc.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<h5>Subscription Module</h5>
|
2 |
<div id="newsletter-nav">
|
3 |
-
<a class="button" href="<?php echo $module->get_admin_page_url('options'); ?>">Subscription
|
4 |
-
<a class="button" href="<?php echo $module->get_admin_page_url('profile'); ?>">Form fields and
|
5 |
<a class="button" href="<?php echo $module->get_admin_page_url('forms'); ?>">Alternative forms</a>
|
6 |
</div>
|
1 |
<h5>Subscription Module</h5>
|
2 |
<div id="newsletter-nav">
|
3 |
+
<a class="button" href="<?php echo $module->get_admin_page_url('options'); ?>">Subscription steps</a>
|
4 |
+
<a class="button" href="<?php echo $module->get_admin_page_url('profile'); ?>">Form fields and translation</a>
|
5 |
<a class="button" href="<?php echo $module->get_admin_page_url('forms'); ?>">Alternative forms</a>
|
6 |
</div>
|
subscription/profile.php
CHANGED
@@ -20,7 +20,7 @@ else {
|
|
20 |
}
|
21 |
}
|
22 |
|
23 |
-
$status = array(0=>'Disabled/Private', 1=>'Only on profile page', 2=>'Even on subscription forms');
|
24 |
$rules = array(0=>'Optional', 1=>'Required');
|
25 |
?>
|
26 |
<script type="text/javascript" src="<?php echo get_option('siteurl'); ?>/wp-content/plugins/newsletter/tiny_mce/tiny_mce.js"></script>
|
@@ -73,79 +73,94 @@ $rules = array(0=>'Optional', 1=>'Required');
|
|
73 |
</ul>
|
74 |
|
75 |
<div id="tabs-2">
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
131 |
</td>
|
132 |
</tr>
|
133 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
134 |
<div class="hints">
|
135 |
-
|
136 |
-
a checkbox the use must check to proceed with subscription.
|
137 |
</div>
|
138 |
</td>
|
139 |
</tr>
|
140 |
<tr>
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
|
|
|
|
149 |
|
150 |
</table>
|
151 |
</div>
|
20 |
}
|
21 |
}
|
22 |
|
23 |
+
$status = array(0=>'Disabled/Private use', 1=>'Only on profile page', 2=>'Even on subscription forms');
|
24 |
$rules = array(0=>'Optional', 1=>'Required');
|
25 |
?>
|
26 |
<script type="text/javascript" src="<?php echo get_option('siteurl'); ?>/wp-content/plugins/newsletter/tiny_mce/tiny_mce.js"></script>
|
73 |
</ul>
|
74 |
|
75 |
<div id="tabs-2">
|
76 |
+
<div class="tab-preamble">
|
77 |
+
<p>The main subscriber fields. Only the email field is, of course, mandatory.</p>
|
78 |
+
</div>
|
79 |
+
<table class="form-table">
|
80 |
+
<tr>
|
81 |
+
<th>Email</th>
|
82 |
+
<td>
|
83 |
+
<table class="newsletter-option-grid">
|
84 |
+
<tr><th>Field label</th><td><?php $controls->text('email', 50); ?></td></tr>
|
85 |
+
<tr><th>Error message</th><td><?php $controls->text('email_error', 50); ?></td></tr>
|
86 |
+
</table>
|
87 |
+
</td>
|
88 |
+
</tr>
|
89 |
+
<tr>
|
90 |
+
<th>Name or first name</th>
|
91 |
+
<td>
|
92 |
+
<table class="newsletter-option-grid">
|
93 |
+
<tr><th>Field label</th><td><?php $controls->text('name', 50); ?></td></tr>
|
94 |
+
<tr><th>When to show</th><td><?php $controls->select('name_status', $status); ?></td></tr>
|
95 |
+
<tr><th>Rules</th><td><?php $controls->select('surname_rules', $rules); ?></td></tr>
|
96 |
+
<tr><th>Error message</th><td><?php $controls->text('name_error', 50); ?></td></tr>
|
97 |
+
</table>
|
98 |
+
<div class="hints">
|
99 |
+
If you want to collect only a generic "name", use only this field and not the
|
100 |
+
last name field.
|
101 |
+
</div>
|
102 |
+
</td>
|
103 |
+
</tr>
|
104 |
+
<tr>
|
105 |
+
<th>Last name</th>
|
106 |
+
<td>
|
107 |
+
<table class="newsletter-option-grid">
|
108 |
+
<tr><th>Field label</th><td><?php $controls->text('surname', 50); ?></td></tr>
|
109 |
+
<tr><th>When to show</th><td><?php $controls->select('surname_status', $status); ?></td></tr>
|
110 |
+
<tr><th>Rules</th><td><?php $controls->select('surname_rules', $rules); ?></td></tr>
|
111 |
+
<tr><th>Error message</th><td><?php $controls->text('surname_error', 50); ?></td></tr>
|
112 |
+
</table>
|
113 |
+
</td>
|
114 |
+
</tr>
|
115 |
+
<tr>
|
116 |
+
<th>Sex/Gender</th>
|
117 |
+
<td>
|
118 |
+
<table class="newsletter-option-grid">
|
119 |
+
<tr><th>Field label</th><td><?php $controls->text('sex', 50); ?></td></tr>
|
120 |
+
<tr><th>When to show</th><td><?php $controls->select('sex_status', $status); ?></td></tr>
|
121 |
+
<tr><th>Value labels</th><td>
|
122 |
+
female: <?php $controls->text('sex_female'); ?>
|
123 |
+
male: <?php $controls->text('sex_male'); ?>
|
124 |
+
not specified: <?php $controls->text('sex_none'); ?>
|
125 |
+
</td></tr>
|
126 |
+
|
127 |
+
<tr><th>Salutation titles</th><td>
|
128 |
+
|
129 |
+
for males: <?php $controls->text('title_male'); ?> (ex. "Mr")<br>
|
130 |
+
for females: <?php $controls->text('title_female'); ?> (ex. "Mrs")<br>
|
131 |
+
for others: <?php $controls->text('title_none'); ?>
|
132 |
+
</td></tr>
|
133 |
+
</table>
|
134 |
+
<div class="hints">
|
135 |
+
Salutation titles are inserted in emails message when the tag {title} is used. For example
|
136 |
+
"Good morning {title} {surname} {name}".
|
137 |
+
</div>
|
138 |
</td>
|
139 |
</tr>
|
140 |
+
|
141 |
+
<tr>
|
142 |
+
<th>Button labels</th>
|
143 |
+
<td>
|
144 |
+
<table class="newsletter-option-grid">
|
145 |
+
<tr><th>Subscribe button</th><td><?php $controls->text('subscribe'); ?></td></tr>
|
146 |
+
<tr><th>Save button</th><td><?php $controls->text('save'); ?> (on profile page)</td></tr>
|
147 |
+
</table>
|
148 |
<div class="hints">
|
149 |
+
For "subscribe" insert an URL to an image (http://...) to use it as a graphical button.
|
|
|
150 |
</div>
|
151 |
</td>
|
152 |
</tr>
|
153 |
<tr>
|
154 |
+
<th>Privacy check box</th>
|
155 |
+
<td>
|
156 |
+
<table class="newsletter-option-grid">
|
157 |
+
<tr><th>Label</th><td><?php $controls->text('privacy', 50); ?></td></tr>
|
158 |
+
<tr><th>Error message</th><td><?php $controls->text('privacy_error', 50); ?></td></tr>
|
159 |
+
<tr><th>Privacy URL</th><td><?php $controls->text('privacy_url', 50); ?></td></tr>
|
160 |
+
</table>
|
161 |
+
</td>
|
162 |
+
</tr>
|
163 |
+
|
164 |
|
165 |
</table>
|
166 |
</div>
|
subscription/subscription.php
CHANGED
@@ -116,7 +116,7 @@ class NewsletterSubscription extends NewsletterModule {
|
|
116 |
}
|
117 |
|
118 |
function admin_menu() {
|
119 |
-
$this->add_menu_page('options', 'Subscription');
|
120 |
$this->add_admin_page('profile', 'Profile');
|
121 |
$this->add_admin_page('forms', 'Forms');
|
122 |
}
|
116 |
}
|
117 |
|
118 |
function admin_menu() {
|
119 |
+
$this->add_menu_page('options', 'Subscription Steps');
|
120 |
$this->add_admin_page('profile', 'Profile');
|
121 |
$this->add_admin_page('forms', 'Forms');
|
122 |
}
|
users/massive.php
CHANGED
@@ -17,6 +17,7 @@ if ($controls->is_action('remove_unconfirmed')) {
|
|
17 |
}
|
18 |
|
19 |
if ($controls->is_action('remove_unsubscribed')) {
|
|
|
20 |
$controls->messages = $r . ' unsubscribed deleted (profiles associated to WordPress users are never deleted).';
|
21 |
}
|
22 |
|
17 |
}
|
18 |
|
19 |
if ($controls->is_action('remove_unsubscribed')) {
|
20 |
+
$r = $wpdb->query("delete from " . NEWSLETTER_USERS_TABLE . " where status='U'");
|
21 |
$controls->messages = $r . ' unsubscribed deleted (profiles associated to WordPress users are never deleted).';
|
22 |
}
|
23 |
|