Subscribe2 - Version 4.15

Version Description

Download this release

Release Info

Developer MattyRob
Plugin Icon 128x128 Subscribe2
Version 4.15
Comparing to
See all releases

Code changes from version 4.14 to 4.15

Files changed (5) hide show
  1. ReadMe.txt +9 -3
  2. counterwidget.php +1 -1
  3. include/options.php +16 -0
  4. subscribe2.php +12 -12
  5. subscribe2.pot +6 -6
ReadMe.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://subscribe2.wordpress.com/donate/
4
Tags: posts, subscription, email, subscribe, notify, notification
5
Requires at least: 2.0.x
6
Tested up to: 2.7
7
- Stable tag: 4.14
8
9
Sends a list of subscribers an email notification when new posts are published to your blog
10
@@ -93,13 +93,19 @@ Registered Users have registered with your WorPress blog (provided you have enab
93
94
== Screenshots ==
95
96
- 1. The Write->Subscribers admin page generated by the plugin.
97
- 2. The Manage->Subscribers admin page generated by the plugin.
98
3. The Users->Subscriptions admin page generated by the plugin.
99
4. The Options->Subscribe2 admin page generated by the plugin.
100
101
== Version History ==
102
103
Version 4.14 by Matthew Robinson
104
105
* Reordered some functions to improve grouping
4
Tags: posts, subscription, email, subscribe, notify, notification
5
Requires at least: 2.0.x
6
Tested up to: 2.7
7
+ Stable tag: 4.15
8
9
Sends a list of subscribers an email notification when new posts are published to your blog
10
93
94
== Screenshots ==
95
96
+ 1. The Posts->Mail Subscribers admin page generated by the plugin.
97
+ 2. The Tools->Subscribers admin page generated by the plugin.
98
3. The Users->Subscriptions admin page generated by the plugin.
99
4. The Options->Subscribe2 admin page generated by the plugin.
100
101
== Version History ==
102
103
+ Version 4.15 by Matthew Robinson
104
+
105
+ * Fixed E_DEPRECATE warning caused by a variable being passed by reference to the ksort() function
106
+ * Fixed called to undefined function caused by typo
107
+ * Fixed a syntax error in the SQL code constructors affecting some users
108
+
109
Version 4.14 by Matthew Robinson
110
111
* Reordered some functions to improve grouping
counterwidget.php CHANGED
@@ -1,7 +1,7 @@
1
<?php
2
/*
3
Plugin Name: Subscribe2 Counter Widget
4
- Version: 4.14
5
Plugin URI: http://subscribe2.wordpress.com
6
Description: Adds a sidebar widget to easily customize and display your Subscribe2 subscribers stats.
7
Author: Matthew Robinson
1
<?php
2
/*
3
Plugin Name: Subscribe2 Counter Widget
4
+ Version: 4.15
5
Plugin URI: http://subscribe2.wordpress.com
6
Description: Adds a sidebar widget to easily customize and display your Subscribe2 subscribers stats.
7
Author: Matthew Robinson
include/options.php CHANGED
@@ -6,6 +6,10 @@ if (!isset($this->subscribe2_options['autosub'])) {
6
$this->subscribe2_options['autosub'] = "no";
7
} // option to autosubscribe registered users to new categories
8
9
if (!isset($this->subscribe2_options['wpregdef'])) {
10
$this->subscribe2_options['wpregdef'] = "no";
11
} // option to check registration form box by default
@@ -90,11 +94,23 @@ if (!isset($this->subscribe2_options['mailtext'])) {
90
$this->subscribe2_options['mailtext'] = __("BLOGNAME has posted a new item, 'TITLE'\n\nPOST\n\nYou may view the latest post at\nPERMALINK\n\nYou received this e-mail because you asked to be notified when new updates are posted.\nBest regards,\nMYNAME\nEMAIL", "subscribe2");
91
} // Default notification email text
92
93
if (!isset($this->subscribe2_options['confirm_email'])) {
94
$this->subscribe2_options['confirm_email'] = __("BLOGNAME has received a request to ACTION for this email address. To complete your request please click on the link below:\n\nLINK\n\nIf you did not request this, please feel free to disregard this notice!\n\nThank you,\nMYNAME.", "subscribe2");
95
} // Default confirmation email text
96
97
if (!isset($this->subscribe2_options['remind_email'])) {
98
$this->subscribe2_options['remind_email'] = __("This email address was subscribed for notifications at BLOGNAME (BLOGLINK) but the subscription remains incomplete.\n\nIf you wish to complete your subscription please click on the link below:\n\nLINK\n\nIf you do not wish to complete your subscription please ignore this email and your address will be removed from our database.\n\nRegards,\nMYNAME", "subscribe2");
99
} // Default reminder email text
100
?>
6
$this->subscribe2_options['autosub'] = "no";
7
} // option to autosubscribe registered users to new categories
8
9
+ if (!isset($this->subscribe2_options['newreg_override'])) {
10
+ $this->subscribe2_options['newreg_override'] = "no";
11
+ } // option to autosubscribe registered users to new categories
12
+
13
if (!isset($this->subscribe2_options['wpregdef'])) {
14
$this->subscribe2_options['wpregdef'] = "no";
15
} // option to check registration form box by default
94
$this->subscribe2_options['mailtext'] = __("BLOGNAME has posted a new item, 'TITLE'\n\nPOST\n\nYou may view the latest post at\nPERMALINK\n\nYou received this e-mail because you asked to be notified when new updates are posted.\nBest regards,\nMYNAME\nEMAIL", "subscribe2");
95
} // Default notification email text
96
97
+ if (!isset($this->subscribe2_options['notification_subject'])) {
98
+ $this->subscribe2_options['notification_subject'] = "[BLOGNAME] TITLE";
99
+ } // Default notification email subject
100
+
101
if (!isset($this->subscribe2_options['confirm_email'])) {
102
$this->subscribe2_options['confirm_email'] = __("BLOGNAME has received a request to ACTION for this email address. To complete your request please click on the link below:\n\nLINK\n\nIf you did not request this, please feel free to disregard this notice!\n\nThank you,\nMYNAME.", "subscribe2");
103
} // Default confirmation email text
104
105
+ if (!isset($this->subscribe2_options['confirm_subject'])) {
106
+ $this->subscribe2_options['confirm_subject'] = "[BLOGNAME] " . __('Please confirm your request', 'subscribe2');
107
+ } // Default confirmation email subject
108
+
109
if (!isset($this->subscribe2_options['remind_email'])) {
110
$this->subscribe2_options['remind_email'] = __("This email address was subscribed for notifications at BLOGNAME (BLOGLINK) but the subscription remains incomplete.\n\nIf you wish to complete your subscription please click on the link below:\n\nLINK\n\nIf you do not wish to complete your subscription please ignore this email and your address will be removed from our database.\n\nRegards,\nMYNAME", "subscribe2");
111
} // Default reminder email text
112
+
113
+ if (!isset($this->subscribe2_options['remind_subject'])) {
114
+ $this->subscribe2_options['remind_subject'] = "[BLOGNAME] " . __('Subscription Reminder', 'subscribe2');;
115
+ } // Default reminder email subject
116
?>
subscribe2.php CHANGED
@@ -3,7 +3,7 @@
3
Plugin Name: Subscribe2
4
Plugin URI: http://subscribe2.wordpress.com
5
Description: Notifies an email list when new entries are posted.
6
- Version: 4.14
7
Author: Matthew Robinson
8
Author URI: http://subscribe2.wordpress.com
9
*/
@@ -31,7 +31,7 @@ along with Subscribe2. If not, see <http://www.gnu.org/licenses/>.
31
32
// our version number. Don't touch this or any line below
33
// unless you know exacly what you are doing
34
- define('S2VERSION', '4.14');
35
define('S2PATH', trailingslashit(dirname(__FILE__)));
36
37
// Pre-2.6 compatibility
@@ -495,7 +495,7 @@ class s2class {
495
// Get email subject
496
$subject = stripslashes(strip_tags($this->substitute($this->s2_subject)));
497
// Get the message template
498
- $mailtext = apply_filter('s2_email_template', $this->subscribe2_options['mailtext']);
499
$mailtext = stripslashes($this->substitute($mailtext));
500
501
$plaintext = $post->post_content;
@@ -915,15 +915,15 @@ class s2class {
915
if ('' != $r['cats']) {
916
$JOIN .= "INNER JOIN $wpdb->usermeta AS d ON a.user_id = d.user_id ";
917
foreach (explode(',', $r['cats']) as $cat) {
918
- ('' == $and) ? $and = "d.meta_key='{$this->get_usermeta_keyname('s2_cat')}$cat'" : $and .= " OR d.meta_key='{$this->get_usermeta_keyname('s2_cat')}$cat'";
919
}
920
$AND .= " AND ($and)";
921
}
922
923
if ($s2_mu) {
924
- $sql = "SELECT a.user_id FROM $wpdb->usermeta AS a INNER JOIN $wpdb->usermeta AS e ON a.user_id = e.user_id " . $JOIN . "WHERE a.meta_key='" . $wpdb->prefix . "capabilities' AND e.meta_key='{$this->get_usermeta_keyname('s2_subscribed')}'" . $AND;
925
} else {
926
- $sql = "SELECT a.user_id FROM $wpdb->usermeta AS a " . $JOIN . "WHERE a.meta_key='{$this->get_usermeta_keyname('s2_subscribed')}'" . $AND;
927
}
928
$result = $wpdb->get_col($sql);
929
if ($result) {
@@ -2159,7 +2159,7 @@ class s2class {
2159
}
2160
2161
if (!empty($blogs_subscribed)) {
2162
- ksort(&$blogs_subscribed);
2163
$unsubscribe_link = get_bloginfo('url') . "/wp-admin/?s2mu_unsubscribe=";
2164
echo '<h2>' . __('Subscribed Blogs', 'subscribe2') . '</h2>'."\r\n";
2165
@@ -2177,7 +2177,7 @@ class s2class {
2177
}
2178
2179
if (!empty($blogs_notsubscribed)) {
2180
- ksort(&$blogs_notsubscribed);
2181
$subscribe_link = get_bloginfo('url') . "/wp-admin/?s2mu_subscribe=";
2182
echo "<h2>" . __('Subscribe to new blogs', 'subscribe2') . "</h2>\r\n";
2183
echo "<ul class=\"s2_blogs s2_blogs_unsubscribed\">";
@@ -2354,16 +2354,16 @@ class s2class {
2354
if ($s2_mu) {
2355
$count['registered'] = $wpdb->get_var("SELECT COUNT(meta_key) FROM $wpdb->usermeta WHERE meta_key='" . $wpdb->prefix . "capabilities'");
2356
} else {
2357
- $count['registered'] = $wpdb->get_var("SELECT COUNT(meta_key) FROM $wpdb->usermeta WHERE meta_key='{$this->get_usermeta_keyname('s2_subscribed')}'");
2358
}
2359
$count['all'] = ($count['confirmed'] + $count['unconfirmed'] + $count['registered']);
2360
if ($s2_mu) {
2361
foreach ($all_cats as $cat) {
2362
- $count[$cat->name] = $wpdb->get_var("SELECT COUNT(a.meta_key) FROM $wpdb->usermeta AS a INNER JOIN $wpdb->usermeta AS b ON a.user_id = b.user_id WHERE a.meta_key='" . $wpdb->prefix . "capabilities' AND b.meta_key=('{$this->get_usermeta_keyname('s2_cat')}$cat->term_id')");
2363
}
2364
} else {
2365
foreach ($all_cats as $cat) {
2366
- $count[$cat->name] = $wpdb->get_var("SELECT COUNT(meta_value) FROM $wpdb->usermeta WHERE meta_key='{$this->get_usermeta_keyname('s2_cat')}$cat->term_id'");
2367
}
2368
}
2369
@@ -2948,7 +2948,7 @@ class s2class {
2948
$all_post_cats_string = implode(',', $all_post_cats);
2949
$registered = $this->get_registered("cats=$all_post_cats_string");
2950
$recipients = array_merge((array)$public, (array)$registered);
2951
- $mailtext = apply_filter('s2_email_template', $this->subscribe2_options['mailtext']);
2952
$mailtext = stripslashes($this->substitute($mailtext));
2953
$mailtext = str_replace("TABLE", $table, $mailtext);
2954
$mailtext = str_replace("POSTTIME", $message_posttime, $mailtext);
3
Plugin Name: Subscribe2
4
Plugin URI: http://subscribe2.wordpress.com
5
Description: Notifies an email list when new entries are posted.
6
+ Version: 4.15
7
Author: Matthew Robinson
8
Author URI: http://subscribe2.wordpress.com
9
*/
31
32
// our version number. Don't touch this or any line below
33
// unless you know exacly what you are doing
34
+ define('S2VERSION', '4.15');
35
define('S2PATH', trailingslashit(dirname(__FILE__)));
36
37
// Pre-2.6 compatibility
495
// Get email subject
496
$subject = stripslashes(strip_tags($this->substitute($this->s2_subject)));
497
// Get the message template
498
+ $mailtext = apply_filters('s2_email_template', $this->subscribe2_options['mailtext']);
499
$mailtext = stripslashes($this->substitute($mailtext));
500
501
$plaintext = $post->post_content;
915
if ('' != $r['cats']) {
916
$JOIN .= "INNER JOIN $wpdb->usermeta AS d ON a.user_id = d.user_id ";
917
foreach (explode(',', $r['cats']) as $cat) {
918
+ ('' == $and) ? $and = "d.meta_key='" . $this->get_usermeta_keyname('s2_cat') . "$cat'" : $and .= " OR d.meta_key='" . $this->get_usermeta_keyname('s2_cat') . "$cat'";
919
}
920
$AND .= " AND ($and)";
921
}
922
923
if ($s2_mu) {
924
+ $sql = "SELECT a.user_id FROM $wpdb->usermeta AS a INNER JOIN $wpdb->usermeta AS e ON a.user_id = e.user_id " . $JOIN . "WHERE a.meta_key='" . $wpdb->prefix . "capabilities' AND e.meta_key='" . $this->get_usermeta_keyname('s2_subscribed') . "'" . $AND;
925
} else {
926
+ $sql = "SELECT a.user_id FROM $wpdb->usermeta AS a " . $JOIN . "WHERE a.meta_key='" . $this->get_usermeta_keyname('s2_subscribed') . "'" . $AND;
927
}
928
$result = $wpdb->get_col($sql);
929
if ($result) {
2159
}
2160
2161
if (!empty($blogs_subscribed)) {
2162
+ ksort($blogs_subscribed);
2163
$unsubscribe_link = get_bloginfo('url') . "/wp-admin/?s2mu_unsubscribe=";
2164
echo '<h2>' . __('Subscribed Blogs', 'subscribe2') . '</h2>'."\r\n";
2165
2177
}
2178
2179
if (!empty($blogs_notsubscribed)) {
2180
+ ksort($blogs_notsubscribed);
2181
$subscribe_link = get_bloginfo('url') . "/wp-admin/?s2mu_subscribe=";
2182
echo "<h2>" . __('Subscribe to new blogs', 'subscribe2') . "</h2>\r\n";
2183
echo "<ul class=\"s2_blogs s2_blogs_unsubscribed\">";
2354
if ($s2_mu) {
2355
$count['registered'] = $wpdb->get_var("SELECT COUNT(meta_key) FROM $wpdb->usermeta WHERE meta_key='" . $wpdb->prefix . "capabilities'");
2356
} else {
2357
+ $count['registered'] = $wpdb->get_var("SELECT COUNT(meta_key) FROM $wpdb->usermeta WHERE meta_key='" . $this->get_usermeta_keyname('s2_subscribed') . "'");
2358
}
2359
$count['all'] = ($count['confirmed'] + $count['unconfirmed'] + $count['registered']);
2360
if ($s2_mu) {
2361
foreach ($all_cats as $cat) {
2362
+ $count[$cat->name] = $wpdb->get_var("SELECT COUNT(a.meta_key) FROM $wpdb->usermeta AS a INNER JOIN $wpdb->usermeta AS b ON a.user_id = b.user_id WHERE a.meta_key='" . $wpdb->prefix . "capabilities' AND b.meta_key=('" . $this->get_usermeta_keyname('s2_cat') . "$cat->term_id')");
2363
}
2364
} else {
2365
foreach ($all_cats as $cat) {
2366
+ $count[$cat->name] = $wpdb->get_var("SELECT COUNT(meta_value) FROM $wpdb->usermeta WHERE meta_key='" . $this->get_usermeta_keyname('s2_cat') . "$cat->term_id'");
2367
}
2368
}
2369
2948
$all_post_cats_string = implode(',', $all_post_cats);
2949
$registered = $this->get_registered("cats=$all_post_cats_string");
2950
$recipients = array_merge((array)$public, (array)$registered);
2951
+ $mailtext = apply_filters('s2_email_template', $this->subscribe2_options['mailtext']);
2952
$mailtext = stripslashes($this->substitute($mailtext));
2953
$mailtext = str_replace("TABLE", $table, $mailtext);
2954
$mailtext = str_replace("POSTTIME", $message_posttime, $mailtext);
subscribe2.pot CHANGED
@@ -8,7 +8,7 @@ msgid ""
8
msgstr ""
9
"Project-Id-Version: PACKAGE VERSION\n"
10
"Report-Msgid-Bugs-To: \n"
11
- "POT-Creation-Date: 2009-03-19 19:21+0000\n"
12
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -130,7 +130,7 @@ msgstr ""
130
msgid "Subscribe2 Options"
131
msgstr ""
132
133
- #: subscribe2.php:115 subscribe2.php:2682 subscribe2.php:2782
134
msgid "Subscribe2"
135
msgstr ""
136
@@ -713,19 +713,19 @@ msgstr ""
713
msgid "Title:"
714
msgstr ""
715
716
- #: subscribe2.php:2756
717
msgid "[Un]Subscribe to Posts"
718
msgstr ""
719
720
- #: subscribe2.php:2834
721
msgid "Weekly"
722
msgstr ""
723
724
- #: subscribe2.php:2902
725
msgid "Posted on"
726
msgstr ""
727
728
- #: subscribe2.php:2947
729
msgid "Digest Email"
730
msgstr ""
731
8
msgstr ""
9
"Project-Id-Version: PACKAGE VERSION\n"
10
"Report-Msgid-Bugs-To: \n"
11
+ "POT-Creation-Date: 2009-03-20 15:54+0000\n"
12
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
"Language-Team: LANGUAGE <LL@li.org>\n"
130
msgid "Subscribe2 Options"
131
msgstr ""
132
133
+ #: subscribe2.php:115 subscribe2.php:2682 subscribe2.php:2781
134
msgid "Subscribe2"
135
msgstr ""
136
713
msgid "Title:"
714
msgstr ""
715
716
+ #: subscribe2.php:2755
717
msgid "[Un]Subscribe to Posts"
718
msgstr ""
719
720
+ #: subscribe2.php:2833
721
msgid "Weekly"
722
msgstr ""
723
724
+ #: subscribe2.php:2901
725
msgid "Posted on"
726
msgstr ""
727
728
+ #: subscribe2.php:2946
729
msgid "Digest Email"
730
msgstr ""
731