Subscribe2 - Version 8.6

Version Description

Download this release

Release Info

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

Code changes from version 8.5 to 8.6

ReadMe.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: MattyRob, Skippy, RavanH
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2387904
4
  Tags: posts, subscription, email, subscribe, notify, notification
5
  Requires at least: 3.1
6
- Tested up to: 3.4.2
7
- Stable tag: 8.5
8
  License: GPL3
9
 
10
  Sends a list of subscribers an email notification when new posts are published to your blog
@@ -17,14 +17,14 @@ Email Notifications can be sent on a per-post basis or periodically in a Digest
17
 
18
  The plugin also handles subscription requests allowing users to publicly subscribe (**Public Subscribers**) by submitting their email address in an easy to use form or to register with your blog (**Registered Users**) which enables greater flexibility over the email content for per-post notifications for the subscriber. Admins are given control over the presentation of the email notifications, can bulk manage subscriptions for users and manually send email notices to subscribers.
19
 
20
- The format of the email can also be customised for per-post notifications, subscribe2 can generate emails for each of the following formats:
21
 
22
  * plaintext excerpt
23
  * plaintext full post (Registered Users only)
24
  * HTML excerpt (Registered Users only)
25
  * HTML full post (Registered Users only)
26
 
27
- If you want to send full content HTML emails to Public Subscribers too then upgrade to [Subscribe2 HTML](http://wpplugins.com/plugin/46/subscribe2-html).
28
 
29
  == Installation ==
30
 
@@ -36,7 +36,7 @@ AUTOMATIC INSTALLATION
36
  4. Configure the options to taste, including the email template and any categories which should be excluded from notification
37
  5. Click the "Tools" admin menu link, and select "Subscribers".
38
  6. Manually subscribe people as you see fit.
39
- 7. Create a [WordPress Page](http://codex.wordpress.org/Pages) to display the subscription form. When creating the page, you may click the "S2" button on the QuickBar to automatically insert the subscribe2 token. Or, if you prefer, you may manually insert the subscribe2 shortcode or token: [subscribe2] or the HTML invisible `<!--subscribe2-->` ***Ensure the token is on a line by itself and that it has a blank line above and below.***
40
  This token will automatically be replaced by dynamic subscription information and will display all forms and messages as necessary.
41
  8. In the WordPress "Settings" area for Subscribe2 select the page name in the "Appearance" section that of the WordPress page created in step 7.
42
 
@@ -48,7 +48,7 @@ MANUAL INSTALLATION
48
  4. Configure the options to taste, including the email template and any categories which should be excluded from notification
49
  5. Click the "Tools" admin menu link, and select "Subscribers".
50
  6. Manually subscribe people as you see fit.
51
- 7. Create a [WordPress Page](http://codex.wordpress.org/Pages) to display the subscription form. When creating the page, you may click the "S2" button on the QuickBar to automatically insert the subscribe2 token. Or, if you prefer, you may manually insert the subscribe2 shortcode or token: [subscribe2] or the HTML invisible `<!--subscribe2-->` ***Ensure the token is on a line by itself and that it has a blank line above and below.***
52
  This token will automatically be replaced by dynamic subscription information and will display all forms and messages as necessary.
53
  8. In the WordPress "Settings" area for Subscribe2 select the page name in the "Appearance" section that of the WordPress page created in step 7.
54
 
@@ -56,10 +56,10 @@ This token will automatically be replaced by dynamic subscription information an
56
 
57
  = I want HTML email to be the default email type =
58
 
59
- You need to pay for the [Subscribe2 HTML version](http://wpplugins.com/plugin/46/subscribe2-html).
60
 
61
  = Where can I get help? =
62
- So, you've downloaded the plugin an it isn't doing what you expect. First you should read the included documentation. There is a ReadMe.txt file and a PDF startup guide installed with the plugin.
63
 
64
  Next you could search in the [WordPress forums](http://wordpress.org/support/), the old [Subscribe2 Forum](http://getsatisfaction.com/subscribe2/), or the [Subscribe2 blog FAQs](http://subscribe2.wordpress.com/category/faq/).
65
 
@@ -98,9 +98,9 @@ These restrictions broadly fall into one of three areas. These are the sender de
98
 
99
  **Header Details**. Some hosting providers place a restriction on the maximum number of recipients in any one email message. Some hosts simply block all emails on certain low-cost hosting plans.
100
 
101
- Subscribe2 provides a facility to work around a restriction of the maximum number of recipients per email by sending batches of emails. To enable this feature, go to Settings->Subscribe2 and located the setting to restrict the number of recipients per email. If this is set to 30 then each outgoing email notification will only contain addresses for 30 recipients.
102
 
103
- Reminder: because subscribe2 places all recipients in BCC fields, and places the blog admin in the TO field, the blog admin will receive one email per batched delivery. So if you have 90 subscribers, the blog admin should receive three post notification emails, one for each set of 30 BCC recipients.
104
 
105
  Batches will occur for each group of message as described above. A site like this with many public and registered subscribers could conceivably generate a lot of email for your own inbox.
106
 
@@ -132,7 +132,23 @@ Yes, this is possible, it just requires a little bit of code. Subscribe2 uses th
132
  }
133
  add_filter('cron_schedules', 'add_my_new_sched');`
134
 
135
- = When I click on Send Preview in Settings->Susbcribe2 I get 4 emails, why =
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
136
 
137
  Subscribe2 supports 4 potential email formats for Susbcribers so you will get a preview for each of the different possibilities.
138
 
@@ -161,11 +177,11 @@ Subscribe2 creates four (4) new admin menus in the back end of WordPress. These
161
 
162
  There are basically only 2 types of subscriber. Public Subscribers and Registered Subscribers.
163
 
164
- Public subscribers have provided their email address for email notification of your new posts. When they enter there address on your site they are sent an email asking them to confirm their request and added to a list of Unconfirmed Subscribers. Once they complete their request by clicking on the link in their email they will become Confirmed Subscribers. They will receive a limited email notification when new post is made or periodically (unless that post is assigned to one of the excluded categories you defined). The general public will receive a plaintext email with an excerpt of the post: either the excerpt you created when making the post, the portion of text before a <!--more--> tag (if present), or the first 50 words or so of the post.
165
 
166
- Registered Users have registered with your WordPress blog (provided you have enabled this in the core WordPress settings). Registered users of the blog can elect to receive email notifications for specific categories (unless Digest email are select, then it is an opt in or out decision). The Users->Subscription menu item will also allow them greater control to select the delivery format (plaintext or HTML), amount of message (excerpt or full post), and the categories to which they want to subscribe. You, the blog owner, have the option (Options->Subscribe2) to allow registered users to subscribe to your excluded categories or not.
167
 
168
- **Note** You can send HTML emails to Public Subscribers with the paid [Subscribe2 HTML version](http://wpplugins.com/plugin/46/subscribe2-html) of the plugin.
169
 
170
  = Can I put the form elsewhere? (header, footer, sidebar without the widget) =
171
 
@@ -288,7 +304,7 @@ I'm open to suggestions but since the software is written by me for use on my si
288
 
289
  = I'd like to be able to send my subscribers notifications in HTML =
290
 
291
- By default Public Subscribers get plain text emails and only Registered Subscribers can opt to receive email in HTML format. If you really want HTML for all you need to pay for the [Subscribe2 HTML version](http://wpplugins.com/plugin/46/subscribe2-html).
292
 
293
  = Which version should I be using, I'm on WordPress x.x.x? =
294
 
@@ -309,13 +325,37 @@ Secondly, make sure that the token ([subscribe2] or <!--subscribe2-->) is correc
309
 
310
  == Screenshots ==
311
 
312
- 1. The Subsribe2->Mail Subscribers admin page generated by the plugin.
313
- 2. The Subsribe2->Subscribers admin page generated by the plugin.
314
- 3. The Subsribe2->Subscriptions admin page generated by the plugin.
315
- 4. The Subsribe2->Subscribe2 admin page generated by the plugin.
316
 
317
  == Changelog ==
318
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
319
  = Version 8.5 by Matthew Robinson =
320
 
321
  * Fixed width of a page select drop down in the Widget settings - thanks to Balky79
@@ -606,7 +646,7 @@ Secondly, make sure that the token ([subscribe2] or <!--subscribe2-->) is correc
606
  = Version 5.0 by Matthew Robinson =
607
 
608
  * Change version number to reflect change in the on going support of the plugin which is now a searchable forum or a paid service
609
- * Added links to online Subscribe2 resources into the Options->Subsribe2 page
610
  * Fixed Digest Time Dropdown to recall Cron Task scheduled time
611
  * Fixed code using updated [Admin Menu Plugin](http://wordpress.org/extend/plugins/ozh-admin-drop-down-menu/) API
612
  * Fixed foreach() error in widget rename function
@@ -762,7 +802,7 @@ Secondly, make sure that the token ([subscribe2] or <!--subscribe2-->) is correc
762
  * Added BCCLIMIT and S2PAGE to options page with AJAX editing
763
  * Improved setting of CRON task base time
764
  * Improved handling of option values in the options form
765
- * Full XHTML compliance on all subscribe2 admin pages
766
  * Decode HTML entity codes in notification email subjects
767
  * Added Subscribe2 support for blogging via email
768
  * Work-around fix implemented for WordPress the_title bug
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=2387904
4
  Tags: posts, subscription, email, subscribe, notify, notification
5
  Requires at least: 3.1
6
+ Tested up to: 3.5
7
+ Stable tag: 8.6
8
  License: GPL3
9
 
10
  Sends a list of subscribers an email notification when new posts are published to your blog
17
 
18
  The plugin also handles subscription requests allowing users to publicly subscribe (**Public Subscribers**) by submitting their email address in an easy to use form or to register with your blog (**Registered Users**) which enables greater flexibility over the email content for per-post notifications for the subscriber. Admins are given control over the presentation of the email notifications, can bulk manage subscriptions for users and manually send email notices to subscribers.
19
 
20
+ The format of the email can also be customised for per-post notifications, Subscribe2 can generate emails for each of the following formats:
21
 
22
  * plaintext excerpt
23
  * plaintext full post (Registered Users only)
24
  * HTML excerpt (Registered Users only)
25
  * HTML full post (Registered Users only)
26
 
27
+ If you want to send full content HTML emails to Public Subscribers too then upgrade to [Subscribe2 HTML](http://semperplugins.com/plugins/subscribe2-html/).
28
 
29
  == Installation ==
30
 
36
  4. Configure the options to taste, including the email template and any categories which should be excluded from notification
37
  5. Click the "Tools" admin menu link, and select "Subscribers".
38
  6. Manually subscribe people as you see fit.
39
+ 7. Create a [WordPress Page](http://codex.wordpress.org/Pages) to display the subscription form. When creating the page, you may click the "S2" button on the QuickBar to automatically insert the Subscribe2 token. Or, if you prefer, you may manually insert the Subscribe2 shortcode or token: [subscribe2] or the HTML invisible `<!--subscribe2-->` ***Ensure the token is on a line by itself and that it has a blank line above and below.***
40
  This token will automatically be replaced by dynamic subscription information and will display all forms and messages as necessary.
41
  8. In the WordPress "Settings" area for Subscribe2 select the page name in the "Appearance" section that of the WordPress page created in step 7.
42
 
48
  4. Configure the options to taste, including the email template and any categories which should be excluded from notification
49
  5. Click the "Tools" admin menu link, and select "Subscribers".
50
  6. Manually subscribe people as you see fit.
51
+ 7. Create a [WordPress Page](http://codex.wordpress.org/Pages) to display the subscription form. When creating the page, you may click the "S2" button on the QuickBar to automatically insert the Subscribe2 token. Or, if you prefer, you may manually insert the Subscribe2 shortcode or token: [subscribe2] or the HTML invisible `<!--subscribe2-->` ***Ensure the token is on a line by itself and that it has a blank line above and below.***
52
  This token will automatically be replaced by dynamic subscription information and will display all forms and messages as necessary.
53
  8. In the WordPress "Settings" area for Subscribe2 select the page name in the "Appearance" section that of the WordPress page created in step 7.
54
 
56
 
57
  = I want HTML email to be the default email type =
58
 
59
+ You need to pay for the [Subscribe2 HTML version](http://semperplugins.com/plugins/subscribe2-html/).
60
 
61
  = Where can I get help? =
62
+ So, you've downloaded the plugin an it isn't doing what you expect. First you should read the included documentation. There is a [ReadMe.txt](http://plugins.svn.wordpress.org/subscribe2/trunk/ReadMe.txt) file and a [legacy PDF startup guide](http://plugins.svn.wordpress.org/subscribe2/tags/6.0/The%20WordPress%20Subscriber%20User%20Guide.pdf) installed with the plugin.
63
 
64
  Next you could search in the [WordPress forums](http://wordpress.org/support/), the old [Subscribe2 Forum](http://getsatisfaction.com/subscribe2/), or the [Subscribe2 blog FAQs](http://subscribe2.wordpress.com/category/faq/).
65
 
98
 
99
  **Header Details**. Some hosting providers place a restriction on the maximum number of recipients in any one email message. Some hosts simply block all emails on certain low-cost hosting plans.
100
 
101
+ Subscribe2 provides a facility to work around a restriction of the maximum number of recipients per email by sending batches of emails. To enable this feature, go to Subscribe2->Settings and locate the setting to restrict the number of recipients per email. If this is set to 30 then each outgoing email notification will only contain addresses for 30 recipients.
102
 
103
+ Reminder: Because Subscribe2 places all recipients in BCC fields, and places the blog admin in the TO field, the blog admin will receive one email per batched delivery. So if you have 90 subscribers, the blog admin should receive three post notification emails, one for each set of 30 BCC recipients.
104
 
105
  Batches will occur for each group of message as described above. A site like this with many public and registered subscribers could conceivably generate a lot of email for your own inbox.
106
 
132
  }
133
  add_filter('cron_schedules', 'add_my_new_sched');`
134
 
135
+ = I'd like to change the size of the image inserted by the {IMAGE} keyword in the paid version of the code. Is this possible? =
136
+
137
+ Yes, this is possible, it just requires a little bit of code. Subscribe2 introduced a filter in version 8.6 that allows on-the-fly customisation of the image size. Use the code below in a plugin of your own.
138
+
139
+ `function my_s2_image_size() {
140
+ // return a pre-defined size like 'thumbnail' or 'full'
141
+ // or return a physical size as an array like array(300, 300) or array(150, 150)
142
+
143
+ // examples:
144
+ return 'thumbnail';
145
+ return 'full'
146
+ return array(300,300);
147
+ }
148
+
149
+ add_filter('s2_image_size', 'my_s2_image_size');`
150
+
151
+ = When I click on Send Preview in Susbcribe2->Settings I get 4 emails, why =
152
 
153
  Subscribe2 supports 4 potential email formats for Susbcribers so you will get a preview for each of the different possibilities.
154
 
177
 
178
  There are basically only 2 types of subscriber. Public Subscribers and Registered Subscribers.
179
 
180
+ Public Subscribers have provided their email address for email notification of your new posts. When they enter there address on your site they are sent an email asking them to confirm their request and added to a list of Unconfirmed Subscribers. Once they complete their request by clicking on the link in their email they will become Confirmed Subscribers. They will receive a limited email notification when new post is made or periodically (unless that post is assigned to one of the excluded categories you defined). These Public Subscribers will receive a plaintext email with an excerpt of the post: either the excerpt you created when making the post, the portion of text before a <!--more--> tag (if present), or the first 50 words or so of the post.
181
 
182
+ Registered Users have registered with your WordPress blog (provided you have enabled this in the core WordPress settings). Registered users of the blog can elect to receive email notifications for specific categories (unless Digest email are select, then it is an opt in or out decision). The Subscribe2->Your Subscriptions menu item will also allow them greater control to select the delivery format (plaintext or HTML), amount of message (excerpt or full post), and the categories to which they want to subscribe. You, the blog owner, have the option (Subscribe2->Settings) to allow registered users to subscribe to your excluded categories or not.
183
 
184
+ **Note** You can send HTML emails to Public Subscribers with the paid [Subscribe2 HTML version](http://semperplugins.com/plugins/subscribe2-html/) of the plugin.
185
 
186
  = Can I put the form elsewhere? (header, footer, sidebar without the widget) =
187
 
304
 
305
  = I'd like to be able to send my subscribers notifications in HTML =
306
 
307
+ By default Public Subscribers get plain text emails and only Registered Subscribers can opt to receive email in HTML format. If you really want HTML for all you need to pay for the [Subscribe2 HTML version](http://semperplugins.com/plugins/subscribe2-html/).
308
 
309
  = Which version should I be using, I'm on WordPress x.x.x? =
310
 
325
 
326
  == Screenshots ==
327
 
328
+ 1. The Subscribe2->Mail Subscribers admin page generated by the plugin.
329
+ 2. The Subscribe2->Subscribers admin page generated by the plugin.
330
+ 3. The Subscribe2->Subscriptions admin page generated by the plugin.
331
+ 4. The Subscribe2->Subscribe2 admin page generated by the plugin.
332
 
333
  == Changelog ==
334
 
335
+ = Version 8.6 by Matthew Robinson =
336
+
337
+ * Minor layout update to Widget Settings
338
+ * Fix for non-sending notifications for pages - proposed by ctcdesign
339
+ * Fix for a translation domain error in admin/settings.php - proposed by monpelaud
340
+ * Fix for deprecated is_blog_user() function on Multisite installs - proposed by hallcp
341
+ * Extend Subscribe2 database table to collect additional data to meet DreamHost privacy policy - thanks to matt, joshukraine and Dreamhost
342
+ * Refresh Subscribers page in admin, tables now sortable on present columns
343
+ * Order CSS files better by applying CSSComb
344
+ * Reuse $value variable in the 'frontend' class to reduce translation strings
345
+ * Improve AJAX form to obey the shortcode hide parameter - proposed by bwsl
346
+ * Correct spelling error in the Settings page - proposed by dimadin
347
+ * Call translation code via a hook to allow greater dynamic control - proposed by dimadin
348
+ * Look in more locations for translation files, can place in core languages folder now for upgrade protection
349
+ * Refresh Settings page in admin to a tabbed interface
350
+ * Strip HTML from email subject to improve compatibility with other plugins and WordPress 3.5
351
+ * Fixed bug in the display of compulsory categories in the Settings page
352
+ * Add option to manually send emails to All Registered Users and Public Subscribers - proposed by TigWeb
353
+ * Enable TinyURL link shortening for Digest Notification Emails if {TINYLINK} is present in the Email Template
354
+ * Fixed bug in TinyURL error handling and fallback when link generation fails
355
+ * Fixed bug where {DATE} was left blank in the subject field for future scheduled post notifications - thanks to Steve Savoy
356
+ * Added a filter to allow on-the-fly alteration of the size of the {IMAGE} in the paid version
357
+ * Fixed a warning message for a core function ready for WordPress 3.6
358
+
359
  = Version 8.5 by Matthew Robinson =
360
 
361
  * Fixed width of a page select drop down in the Widget settings - thanks to Balky79
646
  = Version 5.0 by Matthew Robinson =
647
 
648
  * Change version number to reflect change in the on going support of the plugin which is now a searchable forum or a paid service
649
+ * Added links to online Subscribe2 resources into the Options->Subscribe2 page
650
  * Fixed Digest Time Dropdown to recall Cron Task scheduled time
651
  * Fixed code using updated [Admin Menu Plugin](http://wordpress.org/extend/plugins/ozh-admin-drop-down-menu/) API
652
  * Fixed foreach() error in widget rename function
802
  * Added BCCLIMIT and S2PAGE to options page with AJAX editing
803
  * Improved setting of CRON task base time
804
  * Improved handling of option values in the options form
805
+ * Full XHTML compliance on all Subscribe2 admin pages
806
  * Decode HTML entity codes in notification email subjects
807
  * Added Subscribe2 support for blogging via email
808
  * Work-around fix implemented for WordPress the_title bug
admin/send_email.php CHANGED
@@ -71,10 +71,10 @@ echo "<p>" . __('Subject', 'subscribe2') . ": <input type=\"text\" size=\"69\" n
71
  echo "<textarea rows=\"12\" cols=\"75\" name=\"content\">" . $body . "</textarea>";
72
  echo "<br /><br />\r\n";
73
  echo __('Recipients:', 'subscribe2') . " ";
74
- $this->display_subscriber_dropdown('registered', false, array('all'));
75
  echo "<input type=\"hidden\" name=\"s2_admin\" value=\"mail\" />";
76
  echo "</p>";
77
- echo "<p class=\"submit\"><input type=\"submit\" class=\"button-secondary\" name=\"preview\" value=\"" . __('Preview', 'subscribe2') . "\" /><input type=\"submit\" class=\"button-primary\" name=\"send\" value=\"" . __('Send', 'subscribe2') . "\" /></p>";
78
  echo "</form></div>\r\n";
79
  echo "<div style=\"clear: both;\"><p>&nbsp;</p></div>";
80
 
71
  echo "<textarea rows=\"12\" cols=\"75\" name=\"content\">" . $body . "</textarea>";
72
  echo "<br /><br />\r\n";
73
  echo __('Recipients:', 'subscribe2') . " ";
74
+ $this->display_subscriber_dropdown('registered', false);
75
  echo "<input type=\"hidden\" name=\"s2_admin\" value=\"mail\" />";
76
  echo "</p>";
77
+ echo "<p class=\"submit\"><input type=\"submit\" class=\"button-secondary\" name=\"preview\" value=\"" . __('Preview', 'subscribe2') . "\" />&nbsp;<input type=\"submit\" class=\"button-primary\" name=\"send\" value=\"" . __('Send', 'subscribe2') . "\" /></p>";
78
  echo "</form></div>\r\n";
79
  echo "<div style=\"clear: both;\"><p>&nbsp;</p></div>";
80
 
admin/settings.php CHANGED
@@ -3,7 +3,7 @@ if ( !function_exists('add_action') ) {
3
  exit();
4
  }
5
 
6
- global $s2nonce, $wpdb, $wp_version;
7
 
8
  // was anything POSTed?
9
  if ( isset( $_POST['s2_admin']) ) {
@@ -30,158 +30,81 @@ if ( isset( $_POST['s2_admin']) ) {
30
  echo "<div id=\"message\" class=\"updated fade\"><p><strong>" . __('Attempt made to resend the Digest Notification email', 'subscribe2') . "</strong></p></div>";
31
  }
32
  } elseif ( isset($_POST['submit']) ) {
33
- // BCClimit
34
- if ( is_numeric($_POST['bcc']) && $_POST['bcc'] >= 0 ) {
35
- $this->subscribe2_options['bcclimit'] = $_POST['bcc'];
36
- }
37
- // admin_email
38
- $this->subscribe2_options['admin_email'] = $_POST['admin_email'];
39
-
40
- // send as blogname, author or admin?
41
- if ( is_numeric($_POST['sender']) ) {
42
- $sender = $_POST['sender'];
43
- } elseif ($_POST['sender'] == 'author') {
44
- $sender = 'author';
45
- } else {
46
- $sender = 'blogname';
47
- }
48
- $this->subscribe2_options['sender'] = $sender;
49
-
50
- // send email for pages, private and password protected posts
51
- $this->subscribe2_options['stylesheet'] = $_POST['stylesheet'];
52
- $this->subscribe2_options['pages'] = $_POST['pages'];
53
- $this->subscribe2_options['password'] = $_POST['password'];
54
- $this->subscribe2_options['private'] = $_POST['private'];
55
- $this->subscribe2_options['stickies'] = $_POST['stickies'];
56
- $this->subscribe2_options['cron_order'] = $_POST['cron_order'];
57
- $this->subscribe2_options['tracking'] = $_POST['tracking'];
58
-
59
- // send per-post or digest emails
60
- $email_freq = $_POST['email_freq'];
61
- $scheduled_time = wp_next_scheduled('s2_digest_cron');
62
- if ( $email_freq != $this->subscribe2_options['email_freq'] || $_POST['hour'] != date('H', $scheduled_time) ) {
63
- $this->subscribe2_options['email_freq'] = $email_freq;
64
- wp_clear_scheduled_hook('s2_digest_cron');
65
- $scheds = (array)wp_get_schedules();
66
- $interval = ( isset($scheds[$email_freq]['interval']) ) ? (int) $scheds[$email_freq]['interval'] : 0;
67
- if ( $interval == 0 ) {
68
- // if we are on per-post emails remove last_cron entry
69
- unset($this->subscribe2_options['last_s2cron']);
70
- unset($this->subscribe2_options['previous_s2cron']);
71
- } else {
72
- // if we are using digest schedule the event and prime last_cron as now
73
- $time = time() + $interval;
74
- $timestamp = mktime($_POST['hour'], 0, 0, date('m', $time), date('d', $time), date('Y', $time));
75
- while ($timestamp < time()) {
76
- // if we are trying to set the time in the past increment it forward
77
- // by the interval period until it is in the future
78
- $timestamp += $interval;
79
  }
80
- wp_schedule_event($timestamp, $email_freq, 's2_digest_cron');
81
- if ( !isset($this->subscribe2_options['last_s2cron']) ) {
82
- $this->subscribe2_options['last_s2cron'] = current_time('mysql');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83
  }
84
  }
85
  }
86
 
87
- // email subject and body templates
88
- // ensure that are not empty before updating
89
- if ( !empty($_POST['notification_subject']) ) {
90
- $this->subscribe2_options['notification_subject'] = $_POST['notification_subject'];
91
- }
92
- if ( !empty($_POST['mailtext']) ) {
93
- $this->subscribe2_options['mailtext'] = $_POST['mailtext'];
94
- }
95
- if ( !empty($_POST['confirm_subject']) ) {
96
- $this->subscribe2_options['confirm_subject'] = $_POST['confirm_subject'];
97
- }
98
- if ( !empty($_POST['confirm_email']) ) {
99
- $this->subscribe2_options['confirm_email'] = $_POST['confirm_email'];
100
- }
101
- if ( !empty($_POST['remind_subject']) ) {
102
- $this->subscribe2_options['remind_subject'] = $_POST['remind_subject'];
103
- }
104
- if ( !empty($_POST['remind_email']) ) {
105
- $this->subscribe2_options['remind_email'] = $_POST['remind_email'];
106
- }
107
-
108
- // compulsory categories
109
- if ( !empty($_POST['compulsory']) ) {
110
- sort($_POST['compulsory']);
111
- $compulsory_cats = implode(',', $_POST['compulsory']);
112
- } else {
113
- $compulsory_cats = '';
114
- }
115
- $this->subscribe2_options['compulsory'] = $compulsory_cats;
116
-
117
- // excluded categories
118
- if ( !empty($_POST['category']) ) {
119
- sort($_POST['category']);
120
- $exclude_cats = implode(',', $_POST['category']);
121
- } else {
122
- $exclude_cats = '';
123
- }
124
- $this->subscribe2_options['exclude'] = $exclude_cats;
125
- // allow override?
126
- ( isset($_POST['reg_override']) ) ? $override = '1' : $override = '0';
127
- $this->subscribe2_options['reg_override'] = $override;
128
-
129
- // excluded formats
130
- if ( !empty($_POST['format']) ) {
131
- $exclude_formats = implode(',', $_POST['format']);
132
- } else {
133
- $exclude_formats = '';
134
- }
135
- $this->subscribe2_options['exclude_formats'] = $exclude_formats;
136
-
137
- // default WordPress page where Subscribe2 token is placed
138
- if ( is_numeric($_POST['page']) && $_POST['page'] >= 0 ) {
139
- $this->subscribe2_options['s2page'] = $_POST['page'];
140
- }
141
-
142
- // Number of subscriber per page
143
- if ( is_numeric($_POST['entries']) && $_POST['entries'] > 0 ) {
144
- $this->subscribe2_options['entries'] = (int)$_POST['entries'];
145
- }
146
-
147
- // show meta link?
148
- ( isset($_POST['show_meta']) && $_POST['show_meta'] == '1' ) ? $showmeta = '1' : $showmeta = '0';
149
- $this->subscribe2_options['show_meta'] = $showmeta;
150
-
151
- // show button?
152
- ( isset($_POST['show_button']) && $_POST['show_button'] == '1' ) ? $showbutton = '1' : $showbutton = '0';
153
- $this->subscribe2_options['show_button'] = $showbutton;
154
-
155
- // enable AJAX style form
156
- ( isset($_POST['ajax']) && $_POST['ajax'] == '1' ) ? $ajax = '1' : $ajax = '0';
157
- $this->subscribe2_options['ajax'] = $ajax;
158
-
159
- // show widget in Presentation->Widgets
160
- ( isset($_POST['widget']) && $_POST['widget'] == '1' ) ? $showwidget = '1' : $showwidget = '0';
161
- $this->subscribe2_options['widget'] = $showwidget;
162
-
163
- // show counterwidget in Presentation->Widgets
164
- ( isset($_POST['counterwidget']) && $_POST['counterwidget'] == '1' ) ? $showcounterwidget = '1' : $showcounterwidget = '0';
165
- $this->subscribe2_options['counterwidget'] = $showcounterwidget;
166
-
167
- // Subscribe2 over ride postmeta checked by default
168
- ( isset($_POST['s2meta_default']) && $_POST['s2meta_default'] == '1' ) ? $s2meta_default = '1' : $s2meta_default = '0';
169
- $this->subscribe2_options['s2meta_default'] = $s2meta_default;
170
-
171
- //automatic subscription
172
- $this->subscribe2_options['autosub'] = $_POST['autosub'];
173
- $this->subscribe2_options['newreg_override'] = $_POST['newreg_override'];
174
- $this->subscribe2_options['wpregdef'] = $_POST['wpregdef'];
175
- $this->subscribe2_options['autoformat'] = $_POST['autoformat'];
176
- $this->subscribe2_options['show_autosub'] = $_POST['show_autosub'];
177
- $this->subscribe2_options['autosub_def'] = $_POST['autosub_def'];
178
- $this->subscribe2_options['comment_subs'] = $_POST['comment_subs'];
179
- $this->subscribe2_options['comment_def'] = $_POST['comment_def'];
180
- $this->subscribe2_options['one_click_profile'] = $_POST['one_click_profile'];
181
-
182
- //barred domains
183
- $this->subscribe2_options['barred'] = $_POST['barred'];
184
-
185
  echo "<div id=\"message\" class=\"updated fade\"><p><strong>$this->options_saved</strong></p></div>";
186
  update_option('subscribe2_options', $this->subscribe2_options);
187
  }
@@ -206,302 +129,333 @@ if ( !strstr($_SERVER['SERVER_NAME'], $domain) && $this->subscribe2_options['sen
206
  echo "<div id=\"sender_message\" class=\"error\"><p class=\"s2_error\"><strong>" . __('You appear to be sending notifications from an email address from a different domain name to your blog, this may result in failed emails', 'subscribe2') . "</strong></p></div>";
207
  }
208
 
 
 
 
209
  // show our form
210
  echo "<div class=\"wrap\">";
211
  echo "<div id=\"icon-options-general\" class=\"icon32\"></div>";
212
- echo "<h2>" . __('Subscribe2 Settings', 'subscribe2') . "</h2>\r\n";
213
- echo "<a href=\"http://subscribe2.wordpress.com/\">" . __('Plugin Blog', 'subscribe2') . "</a> | ";
214
- echo "<a href=\"https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=2387904\">" . __('Make a donation via PayPal', 'subscribe2') . "</a>";
 
 
 
 
 
 
 
 
 
215
  echo "<form method=\"post\">\r\n";
216
  if ( function_exists('wp_nonce_field') ) {
217
  wp_nonce_field('subscribe2-options_subscribers' . $s2nonce);
218
  }
219
  echo "<input type=\"hidden\" name=\"s2_admin\" value=\"options\" />\r\n";
220
- echo "<input type=\"hidden\" id=\"jsbcc\" value=\"" . $this->subscribe2_options['bcclimit'] . "\" />";
221
- echo "<input type=\"hidden\" id=\"jspage\" value=\"" . $this->subscribe2_options['s2page'] . "\" />";
222
  echo "<input type=\"hidden\" id=\"jsentries\" value=\"" . $this->subscribe2_options['entries'] . "\" />";
223
 
224
- // settings for outgoing emails
225
- echo "<div class=\"s2_admin\" id=\"s2_notification_settings\">\r\n";
226
- echo "<h2>" . __('Notification Settings', 'subscribe2') . "</h2>\r\n";
227
- echo __('Restrict the number of recipients per email to (0 for unlimited)', 'subscribe2') . ': ';
228
- echo "<span id=\"s2bcc_1\"><span id=\"s2bcc\" style=\"background-color: #FFFBCC\">" . $this->subscribe2_options['bcclimit'] . "</span> ";
229
- echo "<a href=\"#\" onclick=\"s2_show('bcc'); return false;\">" . __('Edit', 'subscribe2') . "</a></span>\n";
230
- echo "<span id=\"s2bcc_2\">\r\n";
231
- echo "<input type=\"text\" name=\"bcc\" value=\"" . $this->subscribe2_options['bcclimit'] . "\" size=\"3\" />\r\n";
232
- echo "<a href=\"#\" onclick=\"s2_update('bcc'); return false;\">". __('Update', 'subscribe2') . "</a>\n";
233
- echo "<a href=\"#\" onclick=\"s2_revert('bcc'); return false;\">". __('Revert', 'subscribe2') . "</a></span>\n";
234
-
235
- echo "<br /><br />" . __('Send Admins notifications for new', 'subscribe2') . ': ';
236
- echo "<label><input type=\"radio\" name=\"admin_email\" value=\"subs\"" . checked($this->subscribe2_options['admin_email'], 'subs', false) . " />\r\n";
237
- echo __('Subscriptions', 'subscribe2') . "</label>&nbsp;&nbsp;";
238
- echo "<label><input type=\"radio\" name=\"admin_email\" value=\"unsubs\"" . checked($this->subscribe2_options['admin_email'], 'unsubs', false) . " />\r\n";
239
- echo __('Unsubscriptions', 'subscribe2') . "</label>&nbsp;&nbsp;";
240
- echo "<label><input type=\"radio\" name=\"admin_email\" value=\"both\"" . checked($this->subscribe2_options['admin_email'], 'both', false) . " />\r\n";
241
- echo __('Both', 'subscribe2') . "</label>&nbsp;&nbsp;";
242
- echo "<label><input type=\"radio\" name=\"admin_email\" value=\"none\"" . checked($this->subscribe2_options['admin_email'], 'none', false) . " />\r\n";
243
- echo __('Neither', 'subscribe2') . "</label><br /><br />\r\n";
244
-
245
- echo __('Include theme CSS stylesheet in HTML notifications', 'subscribe2') . ': ';
246
- echo "<label><input type=\"radio\" name=\"stylesheet\" value=\"yes\"" . checked($this->subscribe2_options['stylesheet'], 'yes', false) . " /> ";
247
- echo __('Yes', 'subscribe2') . "</label>&nbsp;&nbsp;";
248
- echo "<label><input type=\"radio\" name=\"stylesheet\" value=\"no\"" . checked($this->subscribe2_options['stylesheet'], 'no', false) . " /> ";
249
- echo __('No', 'subscribe2') . "</label><br /><br />\r\n";
250
-
251
- echo __('Send Emails for Pages', 'subscribe2') . ': ';
252
- echo "<label><input type=\"radio\" name=\"pages\" value=\"yes\"" . checked($this->subscribe2_options['pages'], 'yes', false) . " /> ";
253
- echo __('Yes', 'subscribe2') . "</label>&nbsp;&nbsp;";
254
- echo "<label><input type=\"radio\" name=\"pages\" value=\"no\"" . checked($this->subscribe2_options['pages'], 'no', false) . " /> ";
255
- echo __('No', 'subscribe2') . "</label><br /><br />\r\n";
256
- $s2_post_types = apply_filters('s2_post_types', NULL);
257
- if ( !empty($s2_post_types) ) {
258
- $types = '';
259
- echo __('Subscribe2 will send email notifications for the following custom post types', 'subscribe2') . ': <strong>';
260
- foreach ($s2_post_types as $type) {
261
- ('' == $types) ? $types = ucwords($type) : $types .= ", " . ucwords($type);
262
- }
263
- echo $types . "</strong><br /><br />\r\n";
264
- }
265
- echo __('Send Emails for Password Protected Posts', 'subscribe2') . ': ';
266
- echo "<label><input type=\"radio\" name=\"password\" value=\"yes\"" . checked($this->subscribe2_options['password'], 'yes', false) . " /> ";
267
- echo __('Yes', 'subscribe2') . "</label>&nbsp;&nbsp;";
268
- echo "<label><input type=\"radio\" name=\"password\" value=\"no\"" . checked($this->subscribe2_options['password'], 'no', false) . " /> ";
269
- echo __('No', 'subscribe2') . "</label><br /><br />\r\n";
270
- echo __('Send Emails for Private Posts', 'subscribe2') . ': ';
271
- echo "<label><input type=\"radio\" name=\"private\" value=\"yes\"" . checked($this->subscribe2_options['private'], 'yes', false) . " /> ";
272
- echo __('Yes', 'subscribe2') . "</label>&nbsp;&nbsp;";
273
- echo "<label><input type=\"radio\" name=\"private\" value=\"no\"" . checked($this->subscribe2_options['private'], 'no', false) . " /> ";
274
- echo __('No', 'subscribe2') . "</label><br /><br />\r\n";
275
- echo __('Include Sticky Posts at the top of all Digest Notifications', 'subscribe2') . ': ';
276
- echo "<label><input type=\"radio\" name=\"stickies\" value=\"yes\"" . checked($this->subscribe2_options['stickies'], 'yes', false) . " /> ";
277
- echo __('Yes', 'subscribe2') . "</label>&nbsp;&nbsp;";
278
- echo "<label><input type=\"radio\" name=\"stickies\" value=\"no\"" . checked($this->subscribe2_options['stickies'], 'no', false) . " /> ";
279
- echo __('No', 'subscribe2') . "</label><br /><br />\r\n";
280
- echo __('Send Email From', 'subscribe2') . ': ';
281
- echo "<label>\r\n";
282
- $this->admin_dropdown(true);
283
- echo "</label><br /><br />\r\n";
284
- if ( function_exists('wp_schedule_event') ) {
285
- echo __('Send Emails', 'subscribe2') . ": <br /><br />\r\n";
286
- $this->display_digest_choices();
287
- echo __('For digest notifications, date order for posts is', 'subscribe2') . ": \r\n";
288
- echo "<label><input type=\"radio\" name=\"cron_order\" value=\"desc\"" . checked($this->subscribe2_options['cron_order'], 'desc', false) . " /> ";
289
- echo __('Descending', 'subscribe2') . "</label>&nbsp;&nbsp;";
290
- echo "<label><input type=\"radio\" name=\"cron_order\" value=\"asc\"" . checked($this->subscribe2_options['cron_order'], 'asc', false) . " /> ";
291
- echo __('Ascending', 'subscribe2') . "</label><br /><br />\r\n";
292
- }
293
- echo __('Add Tracking Parameters to the Permalink', 'subscribe2') . ": ";
294
- echo "<input type=\"text\" name=\"tracking\" value=\"" . stripslashes($this->subscribe2_options['tracking']) . "\" size=\"50\" /> ";
295
- echo "<br />" . __('eg. utm_source=subscribe2&amp;utm_medium=email&amp;utm_campaign=postnotify&amp;utm_id={ID}', 'subscribe2') . "<br /><br />\r\n";
296
- echo "</div>\r\n";
297
-
298
- // email templates
299
- echo "<div class=\"s2_admin\" id=\"s2_templates\">\r\n";
300
- echo "<h2>" . __('Email Templates', 'subscribe2') . "</h2>\r\n";
301
- echo "<br />";
302
- echo "<table style=\"width: 100%; border-collapse: separate; border-spacing: 5px; *border-collapse: expression('separate', cellSpacing = '5px');\" class=\"editform\">\r\n";
303
- echo "<tr><td style=\"vertical-align: top; height: 350px; min-height: 350px;\">";
304
- echo __('New Post email (must not be empty)', 'subscribe2') . ":<br />\r\n";
305
- echo __('Subject Line', 'subscribe2') . ": ";
306
- echo "<input type=\"text\" name=\"notification_subject\" value=\"" . stripslashes($this->subscribe2_options['notification_subject']) . "\" size=\"30\" />";
307
- echo "<br />\r\n";
308
- echo "<textarea rows=\"9\" cols=\"60\" name=\"mailtext\">" . stripslashes($this->subscribe2_options['mailtext']) . "</textarea>\r\n";
309
- echo "</td><td style=\"vertical-align: top;\" rowspan=\"3\">";
310
- echo "<p class=\"submit\"><input type=\"submit\" class=\"button-secondary\" name=\"preview\" value=\"" . __('Send Email Preview', 'subscribe2') . "\" /></p>\r\n";
311
- echo "<h3>" . __('Message substitutions', 'subscribe2') . "</h3>\r\n";
312
- echo "<dl>";
313
- echo "<dt><b><em style=\"color: red\">" . __('IF THE FOLLOWING KEYWORDS ARE ALSO IN YOUR POST THEY WILL BE SUBSTITUTED' ,'subscribe2') . "</em></b></dt><dd></dd>\r\n";
314
- echo "<dt><b>{BLOGNAME}</b></dt><dd>" . get_option('blogname') . "</dd>\r\n";
315
- echo "<dt><b>{BLOGLINK}</b></dt><dd>" . get_option('home') . "</dd>\r\n";
316
- echo "<dt><b>{TITLE}</b></dt><dd>" . __("the post's title<br />(<i>for per-post emails only</i>)", 'subscribe2') . "</dd>\r\n";
317
- echo "<dt><b>{POST}</b></dt><dd>" . __("the excerpt or the entire post<br />(<i>based on the subscriber's preferences</i>)", 'subscribe2') . "</dd>\r\n";
318
- echo "<dt><b>{POSTTIME}</b></dt><dd>" . __("the excerpt of the post and the time it was posted<br />(<i>for digest emails only</i>)", 'subscribe2') . "</dd>\r\n";
319
- echo "<dt><b>{TABLE}</b></dt><dd>" . __("a list of post titles<br />(<i>for digest emails only</i>)", 'subscribe2') . "</dd>\r\n";
320
- echo "<dt><b>{TABLELINKS}</b></dt><dd>" . __("a list of post titles followed by links to the atricles<br />(<i>for digest emails only</i>)", 'subscribe2') . "</dd>\r\n";
321
- echo "<dt><b>{PERMALINK}</b></dt><dd>" . __("the post's permalink<br />(<i>for per-post emails only</i>)", 'subscribe2') . "</dd>\r\n";
322
- echo "<dt><b>{TINYLINK}</b></dt><dd>" . __("the post's permalink after conversion by TinyURL<br />(<i>for per-post emails only</i>)", 'subscribe2') . "</dd>\r\n";
323
- echo "<dt><b>{DATE}</b></dt><dd>" . __("the date the post was made<br />(<i>for per-post emails only</i>)", "subscribe2") . "</dd>\r\n";
324
- echo "<dt><b>{TIME}</b></dt><dd>" . __("the time the post was made<br />(<i>for per-post emails only</i>)", "subscribe2") . "</dd>\r\n";
325
- echo "<dt><b>{MYNAME}</b></dt><dd>" . __("the admin or post author's name", 'subscribe2') . "</dd>\r\n";
326
- echo "<dt><b>{EMAIL}</b></dt><dd>" . __("the admin or post author's email", 'subscribe2') . "</dd>\r\n";
327
- echo "<dt><b>{AUTHORNAME}</b></dt><dd>" . __("the post author's name", 'subscribe2') . "</dd>\r\n";
328
- echo "<dt><b>{LINK}</b></dt><dd>" . __("the generated link to confirm a request<br />(<i>only used in the confirmation email template</i>)", 'subscribe2') . "</dd>\r\n";
329
- echo "<dt><b>{ACTION}</b></dt><dd>" . __("Action performed by LINK in confirmation email<br />(<i>only used in the confirmation email template</i>)", 'subscribe2') . "</dd>\r\n";
330
- echo "<dt><b>{CATS}</b></dt><dd>" . __("the post's assigned categories", 'subscribe2') . "</dd>\r\n";
331
- echo "<dt><b>{TAGS}</b></dt><dd>" . __("the post's assigned Tags", 'subscribe2') . "</dd>\r\n";
332
- echo "<dt><b>{COUNT}</b></dt><dd>" . __("the number of posts included in the digest email<br />(<i>for digest emails only</i>)", 'subscribe2') . "</dd>\r\n";
333
- echo "</dl></td></tr><tr><td style=\"vertical-align: top; height: 350px; min-height: 350px;\">";
334
- echo __('Subscribe / Unsubscribe confirmation email', 'subscribe2') . ":<br />\r\n";
335
- echo __('Subject Line', 'subscribe2') . ": ";
336
- echo "<input type=\"text\" name=\"confirm_subject\" value=\"" . stripslashes($this->subscribe2_options['confirm_subject']) . "\" size=\"30\" /><br />\r\n";
337
- echo "<textarea rows=\"9\" cols=\"60\" name=\"confirm_email\">" . stripslashes($this->subscribe2_options['confirm_email']) . "</textarea>\r\n";
338
- echo "</td></tr><tr><td style=\"vertical-align: top; height: 350px; min-height: 350px;\">";
339
- echo __('Reminder email to Unconfirmed Subscribers', 'subscribe2') . ":<br />\r\n";
340
- echo __('Subject Line', 'subscribe2') . ": ";
341
- echo "<input type=\"text\" name=\"remind_subject\" value=\"" . stripslashes($this->subscribe2_options['remind_subject']) . "\" size=\"30\" /><br />\r\n";
342
- echo "<textarea rows=\"9\" cols=\"60\" name=\"remind_email\">" . stripslashes($this->subscribe2_options['remind_email']) . "</textarea><br /><br />\r\n";
343
- echo "</td></tr></table><br />\r\n";
344
- echo "</div>\r\n";
345
-
346
- // compulsory categories
347
- echo "<div class=\"s2_admin\" id=\"s2_compulsory_categories\">\r\n";
348
- echo "<h2>" . __('Complusory Categories', 'subscribe2') . "</h2>\r\n";
349
- echo "<p>";
350
- echo "<strong><em style=\"color: red\">" . __('Compulsory categories will be checked by default for Registered Subscribers', 'subscribe2') . "</em></strong><br />\r\n";
351
- echo "</p>";
352
- $this->display_category_form(array(), 1, explode(',', $this->subscribe2_options['compulsory']), 'compulsory');
353
- echo "</div>\r\n";
354
-
355
- // excluded categories
356
- echo "<div class=\"s2_admin\" id=\"s2_excluded_categories\">\r\n";
357
- echo "<h2>" . __('Excluded Categories', 'subscribe2') . "</h2>\r\n";
358
- echo "<p>";
359
- echo "<strong><em style=\"color: red\">" . __('Posts assigned to any Excluded Category do not generate notifications and are not included in digest notifications', 'subscribe2') . "</em></strong><br />\r\n";
360
- echo "</p>";
361
- $this->display_category_form(explode(',', $this->subscribe2_options['exclude']));
362
- echo "<p style=\"text-align: center;\"><label><input type=\"checkbox\" name=\"reg_override\" value=\"1\"" . checked($this->subscribe2_options['reg_override'], '1', false) . " /> ";
363
- echo __('Allow registered users to subscribe to excluded categories?', 'subscribe2') . "</label></p><br />\r\n";
364
- echo "</div>\r\n";
365
-
366
- // excluded post formats
367
- $formats = get_theme_support('post-formats');
368
- if ( $formats !== false ) {
369
- // excluded formats
370
- echo "<div class=\"s2_admin\" id=\"s2_excluded_formats\">\r\n";
371
- echo "<h2>" . __('Excluded Formats', 'subscribe2') . "</h2>\r\n";
372
- echo "<p>";
373
- echo "<strong><em style=\"color: red\">" . __('Posts assigned to any Excluded Format do not generate notifications and are not included in digest notifications', 'subscribe2') . "</em></strong><br />\r\n";
374
- echo "</p>";
375
- $this->display_format_form($formats, explode(',', $this->subscribe2_options['exclude_formats']));
376
- echo "</div>\r\n";
377
- }
378
-
379
- // Appearance options
380
- echo "<div class=\"s2_admin\" id=\"s2_appearance_settings\">\r\n";
381
- echo "<h2>" . __('Appearance', 'subscribe2') . "</h2>\r\n";
382
- echo "<p>";
383
-
384
- // WordPress page ID where subscribe2 token is used
385
- echo __('Set default Subscribe2 page as ID', 'subscribe2') . ': ';
386
- echo "<select name=\"page\">\r\n";
387
- $this->pages_dropdown($this->subscribe2_options['s2page']);
388
- echo "</select>\r\n";
389
-
390
- // Number of subscribers per page
391
- echo "<br /><br />" . __('Set the number of Subscribers displayed per page', 'subscribe2') . ': ';
392
- echo "<span id=\"s2entries_1\"><span id=\"s2entries\" style=\"background-color: #FFFBCC\">" . $this->subscribe2_options['entries'] . "</span> ";
393
- echo "<a href=\"#\" onclick=\"s2_show('entries'); return false;\">" . __('Edit', 'subscribe2') . "</a></span>\n";
394
- echo "<span id=\"s2entries_2\">\r\n";
395
- echo "<input type=\"text\" name=\"entries\" value=\"" . $this->subscribe2_options['entries'] . "\" size=\"3\" />\r\n";
396
- echo "<a href=\"#\" onclick=\"s2_update('entries'); return false;\">". __('Update', 'subscribe2') . "</a>\n";
397
- echo "<a href=\"#\" onclick=\"s2_revert('entries'); return false;\">". __('Revert', 'subscribe2') . "</a></span>\n";
398
-
399
- // show link to WordPress page in meta
400
- echo "<br /><br /><label><input type=\"checkbox\" name=\"show_meta\" value=\"1\"" . checked($this->subscribe2_options['show_meta'], '1', false) . " /> ";
401
- echo __('Show a link to your subscription page in "meta"?', 'subscribe2') . "</label><br /><br />\r\n";
402
 
403
- // show QuickTag button
404
- echo "<label><input type=\"checkbox\" name=\"show_button\" value=\"1\"" . checked($this->subscribe2_options['show_button'], '1', false) . " /> ";
405
- echo __('Show the Subscribe2 button on the Write toolbar?', 'subscribe2') . "</label><br /><br />\r\n";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
406
 
407
- // enable AJAX style form
408
- echo "<label><input type=\"checkbox\" name=\"ajax\" value=\"1\"" . checked($this->subscribe2_options['ajax'], '1', false) . " /> ";
409
- echo __('Enable AJAX style subscription form?', 'subscribe2') . "</label><br /><br />\r\n";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
410
 
411
- // show Widget
412
- echo "<label><input type=\"checkbox\" name=\"widget\" value=\"1\"" . checked($this->subscribe2_options['widget'], '1', false) . " /> ";
413
- echo __('Enable Subscribe2 Widget?', 'subscribe2') . "</label><br /><br />\r\n";
414
 
415
- // show Counter Widget
416
- echo "<label><input type=\"checkbox\" name=\"counterwidget\" value=\"1\"" . checked($this->subscribe2_options['counterwidget'], '1', false) . " /> ";
417
- echo __('Enable Subscribe2 Counter Widget?', 'subscribe2') . "</label><br /><br />\r\n";
418
 
419
- // s2_meta checked by default
420
- echo "<label><input type =\"checkbox\" name=\"s2meta_default\" value=\"1\"" . checked($this->subscribe2_options['s2meta_default'], '1', false) . " /> ";
421
- echo __('Disable email notifications is checked by default on authoring pages?', 'subscribe2') . "</label>\r\n";
422
- echo "</p>";
423
- echo "</div>\r\n";
424
 
425
- //Auto Subscription for new registrations
426
- echo "<div class=\"s2_admin\" id=\"s2_autosubscribe_settings\">\r\n";
427
- echo "<h2>" . __('Auto Subscribe', 'subscribe2') . "</h2>\r\n";
428
- echo "<p>";
429
- echo __('Subscribe new users registering with your blog', 'subscribe2') . ":<br />\r\n";
430
- echo "<label><input type=\"radio\" name=\"autosub\" value=\"yes\"" . checked($this->subscribe2_options['autosub'], 'yes', false) . " /> ";
431
- echo __('Automatically', 'subscribe2') . "</label>&nbsp;&nbsp;";
432
- echo "<label><input type=\"radio\" name=\"autosub\" value=\"wpreg\"" . checked($this->subscribe2_options['autosub'], 'wpreg', false) . " /> ";
433
- echo __('Display option on Registration Form', 'subscribe2') . "</label>&nbsp;&nbsp;";
434
- echo "<label><input type=\"radio\" name=\"autosub\" value=\"no\"" . checked($this->subscribe2_options['autosub'], 'no', false) . " /> ";
435
- echo __('No', 'subscribe2') . "</label><br /><br />\r\n";
436
- echo __('Auto-subscribe includes any excluded categories', 'subscribe2') . ":<br />\r\n";
437
- echo "<label><input type=\"radio\" name=\"newreg_override\" value=\"yes\"" . checked($this->subscribe2_options['newreg_override'], 'yes', false) . " /> ";
438
- echo __('Yes', 'subscribe2') . "</label>&nbsp;&nbsp;";
439
- echo "<label><input type=\"radio\" name=\"newreg_override\" value=\"no\"" . checked($this->subscribe2_options['newreg_override'], 'no', false) . " /> ";
440
- echo __('No', 'subscribe2') . "</label><br /><br />\r\n";
441
- echo __('Registration Form option is checked by default', 'subscribe2') . ":<br />\r\n";
442
- echo "<label><input type=\"radio\" name=\"wpregdef\" value=\"yes\"" . checked($this->subscribe2_options['wpregdef'], 'yes', false) . " /> ";
443
- echo __('Yes', 'subscribe2') . "</label>&nbsp;&nbsp;";
444
- echo "<label><input type=\"radio\" name=\"wpregdef\" value=\"no\"" . checked($this->subscribe2_options['wpregdef'], 'no', false) . " /> ";
445
- echo __('No', 'subscribe2') . "</label><br /><br />\r\n";
446
- echo __('Auto-subscribe users to receive email as', 'subscribe2') . ": <br />\r\n";
447
- echo "<label><input type=\"radio\" name=\"autoformat\" value=\"html\"" . checked($this->subscribe2_options['autoformat'], 'html', false) . " /> ";
448
- echo __('HTML - Full', 'subscribe2') ."</label>&nbsp;&nbsp;";
449
- echo "<label><input type=\"radio\" name=\"autoformat\" value=\"html_excerpt\"" . checked($this->subscribe2_options['autoformat'], 'html_excerpt', false) . " /> ";
450
- echo __('HTML - Excerpt', 'subscribe2') ."</label>&nbsp;&nbsp;";
451
- echo "<label><input type=\"radio\" name=\"autoformat\" value=\"post\"" . checked($this->subscribe2_options['autoformat'], 'post', false) . " /> ";
452
- echo __('Plain Text - Full', 'subscribe2') . "</label>&nbsp;&nbsp;";
453
- echo "<label><input type=\"radio\" name=\"autoformat\" value=\"excerpt\"" . checked($this->subscribe2_options['autoformat'], 'excerpt', false) . " /> ";
454
- echo __('Plain Text - Excerpt', 'subscribe2') . "</label><br /><br />";
455
- echo __('Registered Users have the option to auto-subscribe to new categories', 'subscribe2') . ": <br />\r\n";
456
- echo "<label><input type=\"radio\" name=\"show_autosub\" value=\"yes\"" . checked($this->subscribe2_options['show_autosub'], 'yes', false) . " /> ";
457
- echo __('Yes', 'subscribe2') . "</label>&nbsp;&nbsp;";
458
- echo "<label><input type=\"radio\" name=\"show_autosub\" value=\"no\"" . checked($this->subscribe2_options['show_autosub'], 'no', false) . " /> ";
459
- echo __('No', 'subscribe2') . "</label>&nbsp;&nbsp;";
460
- echo "<label><input type=\"radio\" name=\"show_autosub\" value=\"exclude\"" . checked($this->subscribe2_options['show_autosub'], 'exclude', false) . " /> ";
461
- echo __('New categories are immediately excluded', 'subscribe2') . "</label><br /><br />";
462
- echo __('Option for Registered Users to auto-subscribe to new categories is checked by default', 'subscribe2') . ": <br />\r\n";
463
- echo "<label><input type=\"radio\" name=\"autosub_def\" value=\"yes\"" . checked($this->subscribe2_options['autosub_def'], 'yes', false) . " /> ";
464
- echo __('Yes', 'subscribe2') . "</label>&nbsp;&nbsp;";
465
- echo "<label><input type=\"radio\" name=\"autosub_def\" value=\"no\"" . checked($this->subscribe2_options['autosub_def'], 'no', false) . " /> ";
466
- echo __('No', 'subscribe2') . "</label><br /><br />";
467
- echo __('Display checkbox to allow subscriptions from the comment form', 'subscribe2') . ": <br />\r\n";
468
- echo "<label><input type=\"radio\" name=\"comment_subs\" value=\"before\"" . checked($this->subscribe2_options['comment_subs'], 'before', false) . " /> ";
469
- echo __('Before the Comment Submit button', 'subscribe2') . "</label>&nbsp;&nbsp;";
470
- echo "<label><input type=\"radio\" name=\"comment_subs\" value=\"after\"" . checked($this->subscribe2_options['comment_subs'], 'after', false) . " /> ";
471
- echo __('After the Comment Submit button', 'subscribe2') . "</label>&nbsp;&nbsp;";
472
- echo "<label><input type=\"radio\" name=\"comment_subs\" value=\"no\"" . checked($this->subscribe2_options['comment_subs'], 'no', false) . " /> ";
473
- echo __('No', 'subscribe2') . "</label><br /><br />";
474
- echo __('Comment form checkbox is checked by default', 'subscrib2') . ": <br />\r\n";
475
- echo "<label><input type=\"radio\" name=\"comment_def\" value=\"yes\"" . checked($this->subscribe2_options['comment_def'], 'yes', false) . " /> ";
476
- echo __('Yes', 'subscribe2') . "</label>&nbsp;&nbsp;";
477
- echo "<label><input type=\"radio\" name=\"comment_def\" value=\"no\"" . checked($this->subscribe2_options['comment_def'], 'no', false) . " /> ";
478
- echo __('No', 'subscribe2') . "</label><br /><br />\r\n";
479
- echo __('Show one-click subscription on profile page', 'subscribe2') . ":<br />\r\n";
480
- echo "<label><input type=\"radio\" name=\"one_click_profile\" value=\"yes\"" . checked($this->subscribe2_options['one_click_profile'], 'yes', false) . " /> ";
481
- echo __('Yes', 'subscribe2') . "</label>&nbsp;&nbsp;";
482
- echo "<label><input type=\"radio\" name=\"one_click_profile\" value=\"no\"" . checked($this->subscribe2_options['one_click_profile'], 'no', false) . " /> ";
483
- echo __('No', 'subscribe2') . "</label>\r\n";
484
- echo "</p></div>\r\n";
485
 
486
- //barred domains
487
- echo "<div class=\"s2_admin\" id=\"s2_barred_domains\">\r\n";
488
- echo "<h2>" . __('Barred Domains', 'subscribe2') . "</h2>\r\n";
489
- echo "<p>";
490
- echo __('Enter domains to bar from public subscriptions: <br /> (Use a new line for each entry and omit the "@" symbol, for example email.com)', 'subscribe2');
491
- echo "<br />\r\n<textarea style=\"width: 98%;\" rows=\"4\" cols=\"60\" name=\"barred\">" . esc_textarea($this->subscribe2_options['barred']) . "</textarea>";
492
- echo "</p>";
493
- echo "</div>\r\n";
 
 
 
 
 
 
 
494
 
 
495
  // submit
496
  echo "<p class=\"submit\" style=\"text-align: center\"><input type=\"submit\" class=\"button-primary\" name=\"submit\" value=\"" . __('Submit', 'subscribe2') . "\" /></p>";
497
 
498
- // reset
499
- echo "<h2>" . __('Reset Default', 'subscribe2') . "</h2>\r\n";
500
- echo "<p>" . __('Use this to reset all options to their defaults. This <strong><em>will not</em></strong> modify your list of subscribers.', 'subscribe2') . "</p>\r\n";
501
- echo "<p class=\"submit\" style=\"text-align: center\">";
502
- echo "<input type=\"submit\" id=\"deletepost\" name=\"reset\" value=\"" . __('RESET', 'subscribe2') .
503
- "\" />";
504
- echo "</p></form></div>\r\n";
 
 
505
 
506
  include(ABSPATH . 'wp-admin/admin-footer.php');
507
  // just to be sure
3
  exit();
4
  }
5
 
6
+ global $s2nonce, $wpdb, $wp_version, $current_tab;
7
 
8
  // was anything POSTed?
9
  if ( isset( $_POST['s2_admin']) ) {
30
  echo "<div id=\"message\" class=\"updated fade\"><p><strong>" . __('Attempt made to resend the Digest Notification email', 'subscribe2') . "</strong></p></div>";
31
  }
32
  } elseif ( isset($_POST['submit']) ) {
33
+ foreach ($_POST as $key => $value) {
34
+ if ( in_array($key, array('bcclimit', 's2page', 'entries')) ) {
35
+ // numerical inputs fixed for old option names
36
+ if ( is_numeric($_POST[$key]) && $_POST[$key] >= 0 ) {
37
+ $this->subscribe2_options[$key] = (int)$_POST[$key];
38
+ }
39
+ } elseif ( in_array($key, array('show_meta', 'show_button', 'ajax', 'widget', 'counterwidget', 's2meta_default', 'reg_override')) ) {
40
+ // check box entries
41
+ ( isset($_POST[$key]) && $_POST[$key] == '1' ) ? $newvalue = '1' : $newvalue = '0';
42
+ $this->subscribe2_options[$key] = $newvalue;
43
+ } elseif ( $key === 'appearance_users_tab' ) {
44
+ $options = array('show_meta', 'show_button', 'ajax', 'widget', 'counterwidget', 's2meta_default');
45
+ foreach ( $options as $option ) {
46
+ if ( !isset($_POST[$option]) ) {
47
+ $this->subscribe2_options[$option] = '';
48
+ }
49
+ }
50
+ } elseif ( in_array($key, array('notification_subject', 'mailtext', 'confirm_subject', 'confirm_email', 'remind_subject', 'remind_email')) && !empty($_POST[$key]) ) {
51
+ // email subject and body templates
52
+ $this->subscribe2_options[$key] = $_POST[$key];
53
+ } elseif ( in_array($key, array('compulsory', 'exclude', 'format')) ) {
54
+ sort($_POST[$key]);
55
+ $newvalue = implode(',', $_POST[$key]);
56
+
57
+ if ($key === 'format') {
58
+ $this->subscribe2_options['exclude_formats'] = $newvalue;
59
+ } else {
60
+ $this->subscribe2_options[$key] = $newvalue;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61
  }
62
+ } elseif ( $key === 'registered_users_tab' ) {
63
+ $options = array('compulsory', 'exclude', 'format', 'reg_override');
64
+ foreach ( $options as $option ) {
65
+ if ( !isset($_POST[$option]) ) {
66
+ if ($option === 'format') {
67
+ $this->subscribe2_options['exclude_formats'] = '';
68
+ } else {
69
+ $this->subscribe2_options[$option] = '';
70
+ }
71
+ }
72
+ }
73
+ } elseif ( $key === 'email_freq' ) {
74
+ // send per-post or digest emails
75
+ $email_freq = $_POST['email_freq'];
76
+ $scheduled_time = wp_next_scheduled('s2_digest_cron');
77
+ if ( $email_freq != $this->subscribe2_options['email_freq'] || $_POST['hour'] != date('H', wp_next_scheduled('s2_digest_cron')) ) {
78
+ $this->subscribe2_options['email_freq'] = $email_freq;
79
+ wp_clear_scheduled_hook('s2_digest_cron');
80
+ $scheds = (array)wp_get_schedules();
81
+ $interval = ( isset($scheds[$email_freq]['interval']) ) ? (int)$scheds[$email_freq]['interval'] : 0;
82
+ if ( $interval == 0 ) {
83
+ // if we are on per-post emails remove last_cron entry
84
+ unset($this->subscribe2_options['last_s2cron']);
85
+ unset($this->subscribe2_options['previous_s2cron']);
86
+ } else {
87
+ // if we are using digest schedule the event and prime last_cron as now
88
+ $time = time() + $interval;
89
+ $timestamp = mktime($_POST['hour'], 0, 0, date('m', $time), date('d', $time), date('Y', $time));
90
+ while ($timestamp < time()) {
91
+ // if we are trying to set the time in the past increment it forward
92
+ // by the interval period until it is in the future
93
+ $timestamp += $interval;
94
+ }
95
+ wp_schedule_event($timestamp, $email_freq, 's2_digest_cron');
96
+ if ( !isset($this->subscribe2_options['last_s2cron']) ) {
97
+ $this->subscribe2_options['last_s2cron'] = current_time('mysql');
98
+ }
99
+ }
100
+ }
101
+ } else {
102
+ if ( isset($this->subscribe2_options[$key]) ) {
103
+ $this->subscribe2_options[$key] = $_POST[$key];
104
  }
105
  }
106
  }
107
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
108
  echo "<div id=\"message\" class=\"updated fade\"><p><strong>$this->options_saved</strong></p></div>";
109
  update_option('subscribe2_options', $this->subscribe2_options);
110
  }
129
  echo "<div id=\"sender_message\" class=\"error\"><p class=\"s2_error\"><strong>" . __('You appear to be sending notifications from an email address from a different domain name to your blog, this may result in failed emails', 'subscribe2') . "</strong></p></div>";
130
  }
131
 
132
+ // detect or define which tab we are in
133
+ $current_tab = isset( $_GET['tab'] ) ? $_GET['tab'] : 'email';
134
+
135
  // show our form
136
  echo "<div class=\"wrap\">";
137
  echo "<div id=\"icon-options-general\" class=\"icon32\"></div>";
138
+ $tabs = array('email' => __('Email Settings', 'subscribe2'),
139
+ 'templates' => __('Templates', 'subscribe2'),
140
+ 'registered' => __('Registered Users', 'subscribe2'),
141
+ 'appearance' => __('Appearance', 'subscribe2'),
142
+ 'misc' => __('Miscellaneous', 'subscribe2'));
143
+ echo "<h2 class=\"nav-tab-wrapper\">";
144
+ foreach ( $tabs as $tab_key => $tab_caption ) {
145
+ $active = ($current_tab == $tab_key) ? "nav-tab-active" : "";
146
+ echo "<a class=\"nav-tab " . $active . "\" href=\"?page=s2_settings&amp;tab=" . $tab_key . "\">" . $tab_caption . "</a>";
147
+ }
148
+ echo "</h2>";
149
+
150
  echo "<form method=\"post\">\r\n";
151
  if ( function_exists('wp_nonce_field') ) {
152
  wp_nonce_field('subscribe2-options_subscribers' . $s2nonce);
153
  }
154
  echo "<input type=\"hidden\" name=\"s2_admin\" value=\"options\" />\r\n";
155
+ echo "<input type=\"hidden\" id=\"jsbcclimit\" value=\"" . $this->subscribe2_options['bcclimit'] . "\" />";
 
156
  echo "<input type=\"hidden\" id=\"jsentries\" value=\"" . $this->subscribe2_options['entries'] . "\" />";
157
 
158
+ switch ($current_tab) {
159
+ case 'email':
160
+ // settings for outgoing emails
161
+ echo "<div class=\"s2_admin\" id=\"s2_notification_settings\">\r\n";
162
+ echo "<p>\r\n";
163
+ echo __('Restrict the number of recipients per email to (0 for unlimited)', 'subscribe2') . ': ';
164
+ echo "<span id=\"s2bcclimit_1\"><span id=\"s2bcclimit\" style=\"background-color: #FFFBCC\">" . $this->subscribe2_options['bcclimit'] . "</span> ";
165
+ echo "<a href=\"#\" onclick=\"s2_show('bcclimit'); return false;\">" . __('Edit', 'subscribe2') . "</a></span>\n";
166
+ echo "<span id=\"s2bcclimit_2\">\r\n";
167
+ echo "<input type=\"text\" name=\"bcclimit\" value=\"" . $this->subscribe2_options['bcclimit'] . "\" size=\"3\" />\r\n";
168
+ echo "<a href=\"#\" onclick=\"s2_update('bcclimit'); return false;\">". __('Update', 'subscribe2') . "</a>\n";
169
+ echo "<a href=\"#\" onclick=\"s2_revert('bcclimit'); return false;\">". __('Revert', 'subscribe2') . "</a></span>\n";
170
+
171
+ echo "<br /><br />" . __('Send Admins notifications for new', 'subscribe2') . ': ';
172
+ echo "<label><input type=\"radio\" name=\"admin_email\" value=\"subs\"" . checked($this->subscribe2_options['admin_email'], 'subs', false) . " />\r\n";
173
+ echo __('Subscriptions', 'subscribe2') . "</label>&nbsp;&nbsp;";
174
+ echo "<label><input type=\"radio\" name=\"admin_email\" value=\"unsubs\"" . checked($this->subscribe2_options['admin_email'], 'unsubs', false) . " />\r\n";
175
+ echo __('Unsubscriptions', 'subscribe2') . "</label>&nbsp;&nbsp;";
176
+ echo "<label><input type=\"radio\" name=\"admin_email\" value=\"both\"" . checked($this->subscribe2_options['admin_email'], 'both', false) . " />\r\n";
177
+ echo __('Both', 'subscribe2') . "</label>&nbsp;&nbsp;";
178
+ echo "<label><input type=\"radio\" name=\"admin_email\" value=\"none\"" . checked($this->subscribe2_options['admin_email'], 'none', false) . " />\r\n";
179
+ echo __('Neither', 'subscribe2') . "</label><br /><br />\r\n";
180
+
181
+ echo __('Include theme CSS stylesheet in HTML notifications', 'subscribe2') . ': ';
182
+ echo "<label><input type=\"radio\" name=\"stylesheet\" value=\"yes\"" . checked($this->subscribe2_options['stylesheet'], 'yes', false) . " /> ";
183
+ echo __('Yes', 'subscribe2') . "</label>&nbsp;&nbsp;";
184
+ echo "<label><input type=\"radio\" name=\"stylesheet\" value=\"no\"" . checked($this->subscribe2_options['stylesheet'], 'no', false) . " /> ";
185
+ echo __('No', 'subscribe2') . "</label><br /><br />\r\n";
186
+
187
+ echo __('Send Emails for Pages', 'subscribe2') . ': ';
188
+ echo "<label><input type=\"radio\" name=\"pages\" value=\"yes\"" . checked($this->subscribe2_options['pages'], 'yes', false) . " /> ";
189
+ echo __('Yes', 'subscribe2') . "</label>&nbsp;&nbsp;";
190
+ echo "<label><input type=\"radio\" name=\"pages\" value=\"no\"" . checked($this->subscribe2_options['pages'], 'no', false) . " /> ";
191
+ echo __('No', 'subscribe2') . "</label><br /><br />\r\n";
192
+ $s2_post_types = apply_filters('s2_post_types', NULL);
193
+ if ( !empty($s2_post_types) ) {
194
+ $types = '';
195
+ echo __('Subscribe2 will send email notifications for the following custom post types', 'subscribe2') . ': <strong>';
196
+ foreach ($s2_post_types as $type) {
197
+ ('' == $types) ? $types = ucwords($type) : $types .= ", " . ucwords($type);
198
+ }
199
+ echo $types . "</strong><br /><br />\r\n";
200
+ }
201
+ echo __('Send Emails for Password Protected Posts', 'subscribe2') . ': ';
202
+ echo "<label><input type=\"radio\" name=\"password\" value=\"yes\"" . checked($this->subscribe2_options['password'], 'yes', false) . " /> ";
203
+ echo __('Yes', 'subscribe2') . "</label>&nbsp;&nbsp;";
204
+ echo "<label><input type=\"radio\" name=\"password\" value=\"no\"" . checked($this->subscribe2_options['password'], 'no', false) . " /> ";
205
+ echo __('No', 'subscribe2') . "</label><br /><br />\r\n";
206
+ echo __('Send Emails for Private Posts', 'subscribe2') . ': ';
207
+ echo "<label><input type=\"radio\" name=\"private\" value=\"yes\"" . checked($this->subscribe2_options['private'], 'yes', false) . " /> ";
208
+ echo __('Yes', 'subscribe2') . "</label>&nbsp;&nbsp;";
209
+ echo "<label><input type=\"radio\" name=\"private\" value=\"no\"" . checked($this->subscribe2_options['private'], 'no', false) . " /> ";
210
+ echo __('No', 'subscribe2') . "</label><br /><br />\r\n";
211
+ echo __('Include Sticky Posts at the top of all Digest Notifications', 'subscribe2') . ': ';
212
+ echo "<label><input type=\"radio\" name=\"stickies\" value=\"yes\"" . checked($this->subscribe2_options['stickies'], 'yes', false) . " /> ";
213
+ echo __('Yes', 'subscribe2') . "</label>&nbsp;&nbsp;";
214
+ echo "<label><input type=\"radio\" name=\"stickies\" value=\"no\"" . checked($this->subscribe2_options['stickies'], 'no', false) . " /> ";
215
+ echo __('No', 'subscribe2') . "</label><br /><br />\r\n";
216
+ echo __('Send Email From', 'subscribe2') . ': ';
217
+ echo "<label>\r\n";
218
+ $this->admin_dropdown(true);
219
+ echo "</label><br /><br />\r\n";
220
+ if ( function_exists('wp_schedule_event') ) {
221
+ echo __('Send Emails', 'subscribe2') . ": <br /><br />\r\n";
222
+ $this->display_digest_choices();
223
+ echo __('For digest notifications, date order for posts is', 'subscribe2') . ": \r\n";
224
+ echo "<label><input type=\"radio\" name=\"cron_order\" value=\"desc\"" . checked($this->subscribe2_options['cron_order'], 'desc', false) . " /> ";
225
+ echo __('Descending', 'subscribe2') . "</label>&nbsp;&nbsp;";
226
+ echo "<label><input type=\"radio\" name=\"cron_order\" value=\"asc\"" . checked($this->subscribe2_options['cron_order'], 'asc', false) . " /> ";
227
+ echo __('Ascending', 'subscribe2') . "</label><br /><br />\r\n";
228
+ }
229
+ echo __('Add Tracking Parameters to the Permalink', 'subscribe2') . ": ";
230
+ echo "<input type=\"text\" name=\"tracking\" value=\"" . stripslashes($this->subscribe2_options['tracking']) . "\" size=\"50\" /> ";
231
+ echo "<br />" . __('eg. utm_source=subscribe2&amp;utm_medium=email&amp;utm_campaign=postnotify&amp;utm_id={ID}', 'subscribe2') . "\r\n";
232
+ echo "</p>\r\n";
233
+ echo "</div>\r\n";
234
+ break;
235
+
236
+ case 'templates':
237
+ // email templates
238
+ echo "<div class=\"s2_admin\" id=\"s2_templates\">\r\n";
239
+ echo "<p>\r\n";
240
+ echo "<table style=\"width: 100%; border-collapse: separate; border-spacing: 5px; *border-collapse: expression('separate', cellSpacing = '5px');\" class=\"editform\">\r\n";
241
+ echo "<tr><td style=\"vertical-align: top; height: 350px; min-height: 350px;\">";
242
+ echo __('New Post email (must not be empty)', 'subscribe2') . ":<br />\r\n";
243
+ echo __('Subject Line', 'subscribe2') . ": ";
244
+ echo "<input type=\"text\" name=\"notification_subject\" value=\"" . stripslashes($this->subscribe2_options['notification_subject']) . "\" size=\"30\" />";
245
+ echo "<br />\r\n";
246
+ echo "<textarea rows=\"9\" cols=\"60\" name=\"mailtext\">" . stripslashes($this->subscribe2_options['mailtext']) . "</textarea>\r\n";
247
+ echo "</td><td style=\"vertical-align: top;\" rowspan=\"3\">";
248
+ echo "<p class=\"submit\"><input type=\"submit\" class=\"button-secondary\" name=\"preview\" value=\"" . __('Send Email Preview', 'subscribe2') . "\" /></p>\r\n";
249
+ echo "<h3>" . __('Message substitutions', 'subscribe2') . "</h3>\r\n";
250
+ echo "<dl>";
251
+ echo "<dt><b><em style=\"color: red\">" . __('IF THE FOLLOWING KEYWORDS ARE ALSO IN YOUR POST THEY WILL BE SUBSTITUTED' ,'subscribe2') . "</em></b></dt><dd></dd>\r\n";
252
+ echo "<dt><b>{BLOGNAME}</b></dt><dd>" . get_option('blogname') . "</dd>\r\n";
253
+ echo "<dt><b>{BLOGLINK}</b></dt><dd>" . get_option('home') . "</dd>\r\n";
254
+ echo "<dt><b>{TITLE}</b></dt><dd>" . __("the post's title<br />(<i>for per-post emails only</i>)", 'subscribe2') . "</dd>\r\n";
255
+ echo "<dt><b>{POST}</b></dt><dd>" . __("the excerpt or the entire post<br />(<i>based on the subscriber's preferences</i>)", 'subscribe2') . "</dd>\r\n";
256
+ echo "<dt><b>{POSTTIME}</b></dt><dd>" . __("the excerpt of the post and the time it was posted<br />(<i>for digest emails only</i>)", 'subscribe2') . "</dd>\r\n";
257
+ echo "<dt><b>{TABLE}</b></dt><dd>" . __("a list of post titles<br />(<i>for digest emails only</i>)", 'subscribe2') . "</dd>\r\n";
258
+ echo "<dt><b>{TABLELINKS}</b></dt><dd>" . __("a list of post titles followed by links to the atricles<br />(<i>for digest emails only</i>)", 'subscribe2') . "</dd>\r\n";
259
+ echo "<dt><b>{PERMALINK}</b></dt><dd>" . __("the post's permalink<br />(<i>for per-post emails only</i>)", 'subscribe2') . "</dd>\r\n";
260
+ echo "<dt><b>{TINYLINK}</b></dt><dd>" . __("the post's permalink after conversion by TinyURL", 'subscribe2') . "</dd>\r\n";
261
+ echo "<dt><b>{DATE}</b></dt><dd>" . __("the date the post was made<br />(<i>for per-post emails only</i>)", "subscribe2") . "</dd>\r\n";
262
+ echo "<dt><b>{TIME}</b></dt><dd>" . __("the time the post was made<br />(<i>for per-post emails only</i>)", "subscribe2") . "</dd>\r\n";
263
+ echo "<dt><b>{MYNAME}</b></dt><dd>" . __("the admin or post author's name", 'subscribe2') . "</dd>\r\n";
264
+ echo "<dt><b>{EMAIL}</b></dt><dd>" . __("the admin or post author's email", 'subscribe2') . "</dd>\r\n";
265
+ echo "<dt><b>{AUTHORNAME}</b></dt><dd>" . __("the post author's name", 'subscribe2') . "</dd>\r\n";
266
+ echo "<dt><b>{LINK}</b></dt><dd>" . __("the generated link to confirm a request<br />(<i>only used in the confirmation email template</i>)", 'subscribe2') . "</dd>\r\n";
267
+ echo "<dt><b>{ACTION}</b></dt><dd>" . __("Action performed by LINK in confirmation email<br />(<i>only used in the confirmation email template</i>)", 'subscribe2') . "</dd>\r\n";
268
+ echo "<dt><b>{CATS}</b></dt><dd>" . __("the post's assigned categories", 'subscribe2') . "</dd>\r\n";
269
+ echo "<dt><b>{TAGS}</b></dt><dd>" . __("the post's assigned Tags", 'subscribe2') . "</dd>\r\n";
270
+ echo "<dt><b>{COUNT}</b></dt><dd>" . __("the number of posts included in the digest email<br />(<i>for digest emails only</i>)", 'subscribe2') . "</dd>\r\n";
271
+ echo "</dl></td></tr><tr><td style=\"vertical-align: top; height: 350px; min-height: 350px;\">";
272
+ echo __('Subscribe / Unsubscribe confirmation email', 'subscribe2') . ":<br />\r\n";
273
+ echo __('Subject Line', 'subscribe2') . ": ";
274
+ echo "<input type=\"text\" name=\"confirm_subject\" value=\"" . stripslashes($this->subscribe2_options['confirm_subject']) . "\" size=\"30\" /><br />\r\n";
275
+ echo "<textarea rows=\"9\" cols=\"60\" name=\"confirm_email\">" . stripslashes($this->subscribe2_options['confirm_email']) . "</textarea>\r\n";
276
+ echo "</td></tr><tr><td style=\"vertical-align: top; height: 350px; min-height: 350px;\">";
277
+ echo __('Reminder email to Unconfirmed Subscribers', 'subscribe2') . ":<br />\r\n";
278
+ echo __('Subject Line', 'subscribe2') . ": ";
279
+ echo "<input type=\"text\" name=\"remind_subject\" value=\"" . stripslashes($this->subscribe2_options['remind_subject']) . "\" size=\"30\" /><br />\r\n";
280
+ echo "<textarea rows=\"9\" cols=\"60\" name=\"remind_email\">" . stripslashes($this->subscribe2_options['remind_email']) . "</textarea><br /><br />\r\n";
281
+ echo "</td></tr></table>\r\n";
282
+ echo "</div>\r\n";
283
+ break;
284
+
285
+ case 'registered':
286
+ // compulsory categories
287
+ echo "<div class=\"s2_admin\" id=\"s2_compulsory_categories\">\r\n";
288
+ echo "<input type=\"hidden\" name=\"registered_users_tab\" value=\"options\" />\r\n";
289
+ echo "<h3>" . __('Compulsory Categories', 'subscribe2') . "</h3>\r\n";
290
+ echo "<p>\r\n";
291
+ echo "<strong><em style=\"color: red\">" . __('Compulsory categories will be checked by default for Registered Subscribers', 'subscribe2') . "</em></strong><br />\r\n";
292
+ echo "</p>";
293
+ $this->display_category_form(explode(',', $this->subscribe2_options['compulsory']), 1, array(), 'compulsory');
294
+ echo "</div>\r\n";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
295
 
296
+ // excluded categories
297
+ echo "<div class=\"s2_admin\" id=\"s2_excluded_categories\">\r\n";
298
+ echo "<h3>" . __('Excluded Categories', 'subscribe2') . "</h3>\r\n";
299
+ echo "<p>";
300
+ echo "<strong><em style=\"color: red\">" . __('Posts assigned to any Excluded Category do not generate notifications and are not included in digest notifications', 'subscribe2') . "</em></strong><br />\r\n";
301
+ echo "</p>";
302
+ $this->display_category_form(explode(',', $this->subscribe2_options['exclude']), 1, array(), 'exclude');
303
+ echo "<p style=\"text-align: center;\"><label><input type=\"checkbox\" name=\"reg_override\" value=\"1\"" . checked($this->subscribe2_options['reg_override'], '1', false) . " /> ";
304
+ echo __('Allow registered users to subscribe to excluded categories?', 'subscribe2') . "</label></p>\r\n";
305
+ echo "</div>\r\n";
306
+
307
+ // excluded post formats
308
+ $formats = get_theme_support('post-formats');
309
+ if ( $formats !== false ) {
310
+ // excluded formats
311
+ echo "<div class=\"s2_admin\" id=\"s2_excluded_formats\">\r\n";
312
+ echo "<h3>" . __('Excluded Formats', 'subscribe2') . "</h3>\r\n";
313
+ echo "<p>";
314
+ echo "<strong><em style=\"color: red\">" . __('Posts assigned to any Excluded Format do not generate notifications and are not included in digest notifications', 'subscribe2') . "</em></strong><br />\r\n";
315
+ echo "</p>";
316
+ $this->display_format_form($formats, explode(',', $this->subscribe2_options['exclude_formats']));
317
+ echo "</div>\r\n";
318
+ }
319
 
320
+ //Auto Subscription for new registrations
321
+ echo "<div class=\"s2_admin\" id=\"s2_autosubscribe_settings\">\r\n";
322
+ echo "<h3>" . __('Auto-Subscribe', 'subscribe2') . "</h3>\r\n";
323
+ echo "<p>\r\n";
324
+ echo __('Subscribe new users registering with your blog', 'subscribe2') . ":<br />\r\n";
325
+ echo "<label><input type=\"radio\" name=\"autosub\" value=\"yes\"" . checked($this->subscribe2_options['autosub'], 'yes', false) . " /> ";
326
+ echo __('Automatically', 'subscribe2') . "</label>&nbsp;&nbsp;";
327
+ echo "<label><input type=\"radio\" name=\"autosub\" value=\"wpreg\"" . checked($this->subscribe2_options['autosub'], 'wpreg', false) . " /> ";
328
+ echo __('Display option on Registration Form', 'subscribe2') . "</label>&nbsp;&nbsp;";
329
+ echo "<label><input type=\"radio\" name=\"autosub\" value=\"no\"" . checked($this->subscribe2_options['autosub'], 'no', false) . " /> ";
330
+ echo __('No', 'subscribe2') . "</label><br /><br />\r\n";
331
+ echo __('Auto-subscribe includes any excluded categories', 'subscribe2') . ":<br />\r\n";
332
+ echo "<label><input type=\"radio\" name=\"newreg_override\" value=\"yes\"" . checked($this->subscribe2_options['newreg_override'], 'yes', false) . " /> ";
333
+ echo __('Yes', 'subscribe2') . "</label>&nbsp;&nbsp;";
334
+ echo "<label><input type=\"radio\" name=\"newreg_override\" value=\"no\"" . checked($this->subscribe2_options['newreg_override'], 'no', false) . " /> ";
335
+ echo __('No', 'subscribe2') . "</label><br /><br />\r\n";
336
+ echo __('Registration Form option is checked by default', 'subscribe2') . ":<br />\r\n";
337
+ echo "<label><input type=\"radio\" name=\"wpregdef\" value=\"yes\"" . checked($this->subscribe2_options['wpregdef'], 'yes', false) . " /> ";
338
+ echo __('Yes', 'subscribe2') . "</label>&nbsp;&nbsp;";
339
+ echo "<label><input type=\"radio\" name=\"wpregdef\" value=\"no\"" . checked($this->subscribe2_options['wpregdef'], 'no', false) . " /> ";
340
+ echo __('No', 'subscribe2') . "</label><br /><br />\r\n";
341
+ echo __('Auto-subscribe users to receive email as', 'subscribe2') . ": <br />\r\n";
342
+ echo "<label><input type=\"radio\" name=\"autoformat\" value=\"html\"" . checked($this->subscribe2_options['autoformat'], 'html', false) . " /> ";
343
+ echo __('HTML - Full', 'subscribe2') ."</label>&nbsp;&nbsp;";
344
+ echo "<label><input type=\"radio\" name=\"autoformat\" value=\"html_excerpt\"" . checked($this->subscribe2_options['autoformat'], 'html_excerpt', false) . " /> ";
345
+ echo __('HTML - Excerpt', 'subscribe2') ."</label>&nbsp;&nbsp;";
346
+ echo "<label><input type=\"radio\" name=\"autoformat\" value=\"post\"" . checked($this->subscribe2_options['autoformat'], 'post', false) . " /> ";
347
+ echo __('Plain Text - Full', 'subscribe2') . "</label>&nbsp;&nbsp;";
348
+ echo "<label><input type=\"radio\" name=\"autoformat\" value=\"excerpt\"" . checked($this->subscribe2_options['autoformat'], 'excerpt', false) . " /> ";
349
+ echo __('Plain Text - Excerpt', 'subscribe2') . "</label><br /><br />";
350
+ echo __('Registered Users have the option to auto-subscribe to new categories', 'subscribe2') . ": <br />\r\n";
351
+ echo "<label><input type=\"radio\" name=\"show_autosub\" value=\"yes\"" . checked($this->subscribe2_options['show_autosub'], 'yes', false) . " /> ";
352
+ echo __('Yes', 'subscribe2') . "</label>&nbsp;&nbsp;";
353
+ echo "<label><input type=\"radio\" name=\"show_autosub\" value=\"no\"" . checked($this->subscribe2_options['show_autosub'], 'no', false) . " /> ";
354
+ echo __('No', 'subscribe2') . "</label>&nbsp;&nbsp;";
355
+ echo "<label><input type=\"radio\" name=\"show_autosub\" value=\"exclude\"" . checked($this->subscribe2_options['show_autosub'], 'exclude', false) . " /> ";
356
+ echo __('New categories are immediately excluded', 'subscribe2') . "</label><br /><br />";
357
+ echo __('Option for Registered Users to auto-subscribe to new categories is checked by default', 'subscribe2') . ": <br />\r\n";
358
+ echo "<label><input type=\"radio\" name=\"autosub_def\" value=\"yes\"" . checked($this->subscribe2_options['autosub_def'], 'yes', false) . " /> ";
359
+ echo __('Yes', 'subscribe2') . "</label>&nbsp;&nbsp;";
360
+ echo "<label><input type=\"radio\" name=\"autosub_def\" value=\"no\"" . checked($this->subscribe2_options['autosub_def'], 'no', false) . " /> ";
361
+ echo __('No', 'subscribe2') . "</label><br /><br />";
362
+ echo __('Display checkbox to allow subscriptions from the comment form', 'subscribe2') . ": <br />\r\n";
363
+ echo "<label><input type=\"radio\" name=\"comment_subs\" value=\"before\"" . checked($this->subscribe2_options['comment_subs'], 'before', false) . " /> ";
364
+ echo __('Before the Comment Submit button', 'subscribe2') . "</label>&nbsp;&nbsp;";
365
+ echo "<label><input type=\"radio\" name=\"comment_subs\" value=\"after\"" . checked($this->subscribe2_options['comment_subs'], 'after', false) . " /> ";
366
+ echo __('After the Comment Submit button', 'subscribe2') . "</label>&nbsp;&nbsp;";
367
+ echo "<label><input type=\"radio\" name=\"comment_subs\" value=\"no\"" . checked($this->subscribe2_options['comment_subs'], 'no', false) . " /> ";
368
+ echo __('No', 'subscribe2') . "</label><br /><br />";
369
+ echo __('Comment form checkbox is checked by default', 'subscribe2') . ": <br />\r\n";
370
+ echo "<label><input type=\"radio\" name=\"comment_def\" value=\"yes\"" . checked($this->subscribe2_options['comment_def'], 'yes', false) . " /> ";
371
+ echo __('Yes', 'subscribe2') . "</label>&nbsp;&nbsp;";
372
+ echo "<label><input type=\"radio\" name=\"comment_def\" value=\"no\"" . checked($this->subscribe2_options['comment_def'], 'no', false) . " /> ";
373
+ echo __('No', 'subscribe2') . "</label><br /><br />\r\n";
374
+ echo __('Show one-click subscription on profile page', 'subscribe2') . ":<br />\r\n";
375
+ echo "<label><input type=\"radio\" name=\"one_click_profile\" value=\"yes\"" . checked($this->subscribe2_options['one_click_profile'], 'yes', false) . " /> ";
376
+ echo __('Yes', 'subscribe2') . "</label>&nbsp;&nbsp;";
377
+ echo "<label><input type=\"radio\" name=\"one_click_profile\" value=\"no\"" . checked($this->subscribe2_options['one_click_profile'], 'no', false) . " /> ";
378
+ echo __('No', 'subscribe2') . "</label>\r\n";
379
+ echo "</p></div>\r\n";
380
+ break;
381
+
382
+ case 'appearance':
383
+ // Appearance options
384
+ echo "<div class=\"s2_admin\" id=\"s2_appearance_settings\">\r\n";
385
+ echo "<input type=\"hidden\" name=\"appearance_users_tab\" value=\"options\" />\r\n";
386
+ echo "<p>\r\n";
387
+
388
+ // WordPress page ID where subscribe2 token is used
389
+ echo __('Set default Subscribe2 page as ID', 'subscribe2') . ': ';
390
+ echo "<select name=\"s2page\">\r\n";
391
+ $this->pages_dropdown($this->subscribe2_options['s2page']);
392
+ echo "</select>\r\n";
393
+
394
+ // Number of subscribers per page
395
+ echo "<br /><br />" . __('Set the number of Subscribers displayed per page', 'subscribe2') . ': ';
396
+ echo "<span id=\"s2entries_1\"><span id=\"s2entries\" style=\"background-color: #FFFBCC\">" . $this->subscribe2_options['entries'] . "</span> ";
397
+ echo "<a href=\"#\" onclick=\"s2_show('entries'); return false;\">" . __('Edit', 'subscribe2') . "</a></span>\n";
398
+ echo "<span id=\"s2entries_2\">\r\n";
399
+ echo "<input type=\"text\" name=\"entries\" value=\"" . $this->subscribe2_options['entries'] . "\" size=\"3\" />\r\n";
400
+ echo "<a href=\"#\" onclick=\"s2_update('entries'); return false;\">". __('Update', 'subscribe2') . "</a>\n";
401
+ echo "<a href=\"#\" onclick=\"s2_revert('entries'); return false;\">". __('Revert', 'subscribe2') . "</a></span>\n";
402
+
403
+ // show link to WordPress page in meta
404
+ echo "<br /><br /><label><input type=\"checkbox\" name=\"show_meta\" value=\"1\"" . checked($this->subscribe2_options['show_meta'], '1', false) . " /> ";
405
+ echo __('Show a link to your subscription page in "meta"?', 'subscribe2') . "</label><br /><br />\r\n";
406
+
407
+ // show QuickTag button
408
+ echo "<label><input type=\"checkbox\" name=\"show_button\" value=\"1\"" . checked($this->subscribe2_options['show_button'], '1', false) . " /> ";
409
+ echo __('Show the Subscribe2 button on the Write toolbar?', 'subscribe2') . "</label><br /><br />\r\n";
410
 
411
+ // enable AJAX style form
412
+ echo "<label><input type=\"checkbox\" name=\"ajax\" value=\"1\"" . checked($this->subscribe2_options['ajax'], '1', false) . " /> ";
413
+ echo __('Enable AJAX style subscription form?', 'subscribe2') . "</label><br /><br />\r\n";
414
 
415
+ // show Widget
416
+ echo "<label><input type=\"checkbox\" name=\"widget\" value=\"1\"" . checked($this->subscribe2_options['widget'], '1', false) . " /> ";
417
+ echo __('Enable Subscribe2 Widget?', 'subscribe2') . "</label><br /><br />\r\n";
418
 
419
+ // show Counter Widget
420
+ echo "<label><input type=\"checkbox\" name=\"counterwidget\" value=\"1\"" . checked($this->subscribe2_options['counterwidget'], '1', false) . " /> ";
421
+ echo __('Enable Subscribe2 Counter Widget?', 'subscribe2') . "</label><br /><br />\r\n";
 
 
422
 
423
+ // s2_meta checked by default
424
+ echo "<label><input type =\"checkbox\" name=\"s2meta_default\" value=\"1\"" . checked($this->subscribe2_options['s2meta_default'], '1', false) . " /> ";
425
+ echo __('Disable email notifications is checked by default on authoring pages?', 'subscribe2') . "</label>\r\n";
426
+ echo "</p>";
427
+ echo "</div>\r\n";
428
+ break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
429
 
430
+ case 'misc':
431
+ //barred domains
432
+ echo "<div class=\"s2_admin\" id=\"s2_barred_domains\">\r\n";
433
+ echo "<h3>" . __('Barred Domains', 'subscribe2') . "</h3>\r\n";
434
+ echo "<p>\r\n";
435
+ echo __('Enter domains to bar from public subscriptions: <br /> (Use a new line for each entry and omit the "@" symbol, for example email.com)', 'subscribe2');
436
+ echo "<br />\r\n<textarea style=\"width: 98%;\" rows=\"4\" cols=\"60\" name=\"barred\">" . esc_textarea($this->subscribe2_options['barred']) . "</textarea>";
437
+ echo "</p>";
438
+ echo "<h3>" . __('Links', 'subscribe2') . "</h3>\r\n";
439
+ echo "<a href=\"http://wordpress.org/extend/plugins/subscribe2/\">" . __('Plugin Site', 'subscribe2') . "</a><br />";
440
+ echo "<a href=\"http://wordpress.org/support/plugin/subscribe2\">" . __('Plugin Forum', 'subscribe2') . "</a><br />";
441
+ echo "<a href=\"http://subscribe2.wordpress.com/\">" . __('Plugin Blog', 'subscribe2') . "</a><br />";
442
+ echo "<a href=\"https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=2387904\">" . __('Make a donation via PayPal', 'subscribe2') . "</a>";
443
+ echo "</div>\r\n";
444
+ break;
445
 
446
+ }
447
  // submit
448
  echo "<p class=\"submit\" style=\"text-align: center\"><input type=\"submit\" class=\"button-primary\" name=\"submit\" value=\"" . __('Submit', 'subscribe2') . "\" /></p>";
449
 
450
+ if ($current_tab === 'misc') {
451
+ // reset
452
+ echo "<h3>" . __('Reset to Default Settings', 'subscribe2') . "</h3>\r\n";
453
+ echo "<p>" . __('Use this to reset all options to their defaults. This <strong><em>will not</em></strong> modify your list of subscribers.', 'subscribe2') . "</p>\r\n";
454
+ echo "<p class=\"submit\" style=\"text-align: center\">";
455
+ echo "<input type=\"submit\" id=\"deletepost\" name=\"reset\" value=\"" . __('RESET', 'subscribe2') .
456
+ "\" /></p>";
457
+ }
458
+ echo "</form></div>\r\n";
459
 
460
  include(ABSPATH . 'wp-admin/admin-footer.php');
461
  // just to be sure
admin/subscribers.php CHANGED
@@ -3,19 +3,15 @@ if ( !function_exists('add_action') ) {
3
  exit();
4
  }
5
 
6
- global $wpdb, $s2nonce;
7
-
8
- //Get Registered Subscribers for bulk management
9
- $registered = $this->get_registered();
10
- $all_users = $this->get_all_registered();
11
 
12
  // was anything POSTed ?
13
  if ( isset($_POST['s2_admin']) ) {
14
- check_admin_referer('subscribe2-manage_subscribers' . $s2nonce);
15
  if ( !empty($_POST['addresses']) ) {
16
  $sub_error = '';
17
  $unsub_error = '';
18
- foreach ( preg_split ("|[\s,]+|", $_POST['addresses']) as $email ) {
19
  $email = $this->sanitize_email($email);
20
  if ( is_email($email) && $_POST['subscribe'] ) {
21
  if ( $this->is_public($email) !== false ) {
@@ -41,35 +37,18 @@ if ( isset($_POST['s2_admin']) ) {
41
  }
42
  echo $message;
43
  $_POST['what'] = 'confirmed';
44
- } elseif ( isset($_POST['process']) ) {
45
- if ( isset($_POST['delete']) ) {
46
- foreach ( $_POST['delete'] as $address ) {
47
- $this->delete($address);
48
- }
49
- echo "<div id=\"message\" class=\"updated fade\"><p><strong>" . __('Address(es) deleted!', 'subscribe2') . "</strong></p></div>";
50
  }
51
- if ( isset($_POST['confirm']) ) {
52
- foreach ( $_POST['confirm'] as $address ) {
53
- $this->toggle($this->sanitize_email($address));
54
- }
55
- $message = "<div id=\"message\" class=\"updated fade\"><p><strong>" . __('Status changed!', 'subscribe2') . "</strong></p></div>";
56
- }
57
- if ( isset($_POST['unconfirm']) ) {
58
- foreach ( $_POST['unconfirm'] as $address ) {
59
- $this->toggle($this->sanitize_email($address));
60
- }
61
- $message = "<div id=\"message\" class=\"updated fade\"><p><strong>" . __('Status changed!', 'subscribe2') . "</strong></p></div>";
62
- }
63
- echo $message;
64
- } elseif ( !empty($_POST['searchterm']) ) {
65
- $confirmed = $this->get_public();
66
- $unconfirmed = $this->get_public(0);
67
- $subscribers = array_merge((array)$confirmed, (array)$unconfirmed, (array)$all_users);
68
- foreach ( $subscribers as $subscriber ) {
69
- if ( is_numeric(stripos($subscriber, $_POST['searchterm'])) ) {
70
- $result[] = $subscriber;
71
- }
72
  }
 
73
  } elseif ( isset($_POST['remind']) ) {
74
  $this->remind($_POST['reminderemails']);
75
  echo "<div id=\"message\" class=\"updated fade\"><p><strong>" . __('Reminder Email(s) Sent!', 'subscribe2') . "</strong></p></div>";
@@ -88,150 +67,130 @@ if ( isset($_POST['s2_admin']) ) {
88
  }
89
  }
90
 
91
- //Get Public Subscribers once for filter
92
- $confirmed = $this->get_public();
93
- $unconfirmed = $this->get_public(0);
94
- // safety check for our arrays
95
- if ( '' == $confirmed ) { $confirmed = array(); }
96
- if ( '' == $unconfirmed ) { $unconfirmed = array(); }
97
- if ( '' == $registered ) { $registered = array(); }
98
- if ( '' == $all_users ) { $all_users = array(); }
99
-
100
- $reminderform = false;
101
- $urlpath = str_replace("\\", "/", S2PATH);
102
- $urlpath = trailingslashit(get_option('siteurl')) . substr($urlpath,strpos($urlpath, "wp-content/"));
103
- if ( isset($_GET['s2page']) ) {
104
- $page = (int) $_GET['s2page'];
105
  } else {
106
- $page = 1;
 
 
 
 
 
107
  }
108
 
109
- if ( isset($_POST['what']) ) {
110
- $page = 1;
111
- if ( 'all' == $_POST['what'] ) {
112
- $what = 'all';
113
- $subscribers = array_merge((array)$confirmed, (array)$unconfirmed, (array)$all_users);
114
- } elseif ( 'public' == $_POST['what'] ) {
115
  $what = 'public';
116
  $subscribers = array_merge((array)$confirmed, (array)$unconfirmed);
117
- } elseif ( 'confirmed' == $_POST['what'] ) {
118
  $what = 'confirmed';
119
  $subscribers = $confirmed;
120
- } elseif ( 'unconfirmed' == $_POST['what'] ) {
121
  $what = 'unconfirmed';
122
  $subscribers = $unconfirmed;
123
  if ( !empty($subscribers) ) {
124
  $reminderemails = implode(",", $subscribers);
125
  $reminderform = true;
126
  }
127
- } elseif ( is_numeric($_POST['what']) ) {
128
- $what = intval($_POST['what']);
129
  $subscribers = $this->get_registered("cats=$what");
130
- } elseif ( 'registered' == $_POST['what'] ) {
131
  $what = 'registered';
132
  $subscribers = $registered;
133
- } elseif ( 'all_users' == $_POST['what'] ) {
134
  $what = 'all_users';
135
  $subscribers = $all_users;
136
  }
137
- } elseif ( isset($_GET['what']) ) {
138
- if ( 'all' == $_GET['what'] ) {
139
- $what = 'all';
140
- $subscribers = array_merge((array)$confirmed, (array)$unconfirmed, (array)$all_users);
141
- } elseif ( 'public' == $_GET['what'] ) {
142
  $what = 'public';
143
  $subscribers = array_merge((array)$confirmed, (array)$unconfirmed);
144
- } elseif ( 'confirmed' == $_GET['what'] ) {
145
- $what = 'confirmed';
146
- $subscribers = $confirmed;
147
- } elseif ( 'unconfirmed' == $_GET['what'] ) {
148
- $what = 'unconfirmed';
149
- $subscribers = $unconfirmed;
150
- if ( !empty($subscribers) ) {
151
- $reminderemails = implode(",", $subscribers);
152
- $reminderform = true;
153
- }
154
- } elseif ( is_numeric($_GET['what']) ) {
155
- $what = intval($_GET['what']);
156
- $subscribers = $this->get_registered("cats=$what");
157
- } elseif ( 'registered' == $_GET['what'] ) {
158
- $what = 'registered';
159
- $subscribers = $registered;
160
- } elseif ( 'all_users' == $_GET['what'] ) {
161
  $what = 'all_users';
162
  $subscribers = $all_users;
163
  }
164
- } else {
165
- $what = 'all';
166
- $subscribers = array_merge((array)$confirmed, (array)$unconfirmed, (array)$all_users);
167
- }
168
- if ( !empty($_POST['searchterm']) ) {
169
- $subscribers = &$result;
170
- $what = 'public';
171
  }
172
 
173
- if ( !empty($subscribers) ) {
174
- natcasesort($subscribers);
175
- // Displays a page number strip - adapted from code in Akismet
176
- $args['what'] = $what;
177
- $total_subscribers = count($subscribers);
178
- $total_pages = ceil($total_subscribers / $this->subscribe2_options['entries']);
179
- $strip = '';
180
- if ( $page > 1 ) {
181
- $args['s2page'] = $page - 1;
182
- $strip .= '<a class="prev" href="' . esc_url(add_query_arg($args)) . '">&laquo; '. __('Previous Page', 'subscribe2') .'</a>' . "\n";
183
- }
184
- if ( $total_pages > 1 ) {
185
- for ( $page_num = 1; $page_num <= $total_pages; $page_num++ ) {
186
- if ( $page == $page_num ) {
187
- $strip .= "<strong>Page " . $page_num . "</strong>\n";
188
- } else {
189
- if ( $page_num < 3 || ( $page_num >= $page - 2 && $page_num <= $page + 2 ) || $page_num > $total_pages - 2 ) {
190
- $args['s2page'] = $page_num;
191
- $strip .= "<a class=\"page-numbers\" href=\"" . esc_url(add_query_arg($args)) . "\">" . $page_num . "</a>\n";
192
- $trunc = true;
193
- } elseif ( $trunc == true ) {
194
- $strip .= "...\n";
195
- $trunc = false;
196
- }
197
- }
198
  }
199
  }
200
- if ( ( $page ) * $this->subscribe2_options['entries'] < $total_subscribers ) {
201
- $args['s2page'] = $page + 1;
202
- $strip .= "<a class=\"next\" href=\"" . esc_url(add_query_arg($args)) . "\">". __('Next Page', 'subscribe2') . " &raquo;</a>\n";
203
- }
 
204
  }
 
 
 
205
 
206
  // show our form
207
  echo "<div class=\"wrap\">";
208
  echo "<div id=\"icon-tools\" class=\"icon32\"></div>";
209
- echo "<h2>" . __('Manage Subscribers', 'subscribe2') . "</h2>\r\n";
210
- echo "<form method=\"post\">\r\n";
211
- if ( function_exists('wp_nonce_field') ) {
212
- wp_nonce_field('subscribe2-manage_subscribers' . $s2nonce);
 
213
  }
214
- echo "<div class=\"s2_admin\" id=\"s2_add_subscribers\">\r\n";
215
- echo "<h2>" . __('Add/Remove Subscribers', 'subscribe2') . "</h2>\r\n";
216
- echo "<p>" . __('Enter addresses, one per line or comma-separated', 'subscribe2') . "<br />\r\n";
217
- echo "<textarea rows=\"2\" cols=\"80\" name=\"addresses\"></textarea></p>\r\n";
218
  echo "<input type=\"hidden\" name=\"s2_admin\" />\r\n";
219
- echo "<p class=\"submit\" style=\"border-top: none;\"><input type=\"submit\" class=\"button-primary\" name=\"subscribe\" value=\"" . __('Subscribe', 'subscribe2') . "\" />";
220
- echo "&nbsp;<input type=\"submit\" class=\"button-primary\" name=\"unsubscribe\" value=\"" . __('Unsubscribe', 'subscribe2') . "\" /></p>\r\n";
221
- echo "</div>\r\n";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
222
 
223
- // subscriber lists
224
- echo "<div class=\"s2_admin\" id=\"s2_current_subscribers\">\r\n";
225
- echo "<h2>" . __('Current Subscribers', 'subscribe2') . "</h2>\r\n";
226
- echo "<br />";
227
- $this->display_subscriber_dropdown($what, __('Filter', 'subscribe2'));
228
- echo "<br /><br />";
229
  // show the selected subscribers
230
- $alternate = 'alternate';
231
- echo "<table style=\"width: 100%; border-collapse: separate; border-spacing: 0px; *border-collapse: expression('separate', cellSpacing = '0px');\" class=\"widefat\" >";
232
- $searchterm = ( isset($_POST['searchterm']) ) ? stripslashes(esc_html($_POST['searchterm'])) : '';
233
- echo "<tr class=\"alternate\"><td colspan=\"3\"><input type=\"text\" name=\"searchterm\" value=\"" . $searchterm . "\" /></td>\r\n";
234
- echo "<td><input type=\"submit\" class=\"button-secondary\" name=\"search\" value=\"" . __('Search Subscribers', 'subscribe2') . "\" /></td>\r\n";
235
  if ( $reminderform ) {
236
  echo "<td style=\"width: 25%; text-align: right;\"><input type=\"hidden\" name=\"reminderemails\" value=\"" . $reminderemails . "\" />\r\n";
237
  echo "<input type=\"submit\" class=\"button-secondary\" name=\"remind\" value=\"" . __('Send Reminder Email', 'subscribe2') . "\" /></td>\r\n";
@@ -245,76 +204,15 @@ if ( !empty($subscribers) ) {
245
  } else {
246
  echo "<td style=\"width: 25%;\"></td>";
247
  }
248
- echo "</tr>";
249
 
250
- if ( !empty($subscribers) ) {
251
- echo "<tr><td colspan=\"3\" style=\"text-align: center;\"><input type=\"submit\" class=\"button-secondary\" name=\"process\" value=\"" . __('Process', 'subscribe2') . "\" /></td>\r\n";
252
- echo "<td style=\"text-align: right;\" colspan=\"3\">" . $strip . "</td></tr>\r\n";
253
- }
254
- if ( !empty($subscribers) ) {
255
- if ( is_int($this->subscribe2_options['entries']) ) {
256
- $subscriber_chunks = array_chunk($subscribers, $this->subscribe2_options['entries']);
257
- } else {
258
- $subscriber_chunks = array_chunk($subscribers, 25);
259
- }
260
- $chunk = $page - 1;
261
- $subscribers = $subscriber_chunks[$chunk];
262
- echo "<tr class=\"alternate\" style=\"height:1.5em;\">\r\n";
263
- echo "<td style=\"width: 4%; text-align: center;\">";
264
- echo "<img src=\"" . $urlpath . "include/accept.png\" alt=\"&lt;\" title=\"" . __('Confirm this email address', 'subscribe2') . "\" /></td>\r\n";
265
- echo "<td style=\"width: 4%; text-align: center;\">";
266
- echo "<img src=\"" . $urlpath . "include/exclamation.png\" alt=\"&gt;\" title=\"" . __('Unconfirm this email address', 'subscribe2') . "\" /></td>\r\n";
267
- echo "<td style=\"width: 4%; text-align: center;\">";
268
- echo "<img src=\"" . $urlpath . "include/cross.png\" alt=\"X\" title=\"" . __('Delete this email address', 'subscribe2') . "\" /></td><td colspan=\"3\"></td></tr>\r\n";
269
- echo "<tr class=\"\"><td style=\"text-align: center;\"><input type=\"checkbox\" name=\"checkall\" value=\"confirm_checkall\" /></td>\r\n";
270
- echo "<td style=\"text-align: center;\"><input type=\"checkbox\" name=\"checkall\" value=\"unconfirm_checkall\" /></td>\r\n";
271
- echo "<td style=\"text-align: center;\"><input type=\"checkbox\" name=\"checkall\" value=\"delete_checkall\" /></td>\r\n";
272
- echo "<td colspan =\"3\" style=\"text-align: left;\"><strong>" . __('Select / Unselect All', 'subscribe2') . "</strong></td></tr>\r\n";
273
-
274
- foreach ( $subscribers as $subscriber ) {
275
- echo "<tr class=\"$alternate\" style=\"height:1.5em;\">";
276
- echo "<td style=\"text-align: center;\">\r\n";
277
- if ( in_array($subscriber, $confirmed) ) {
278
- echo "</td><td style=\"text-align: center;\">\r\n";
279
- echo "<input class=\"unconfirm_checkall\" title=\"" . __('Unconfirm this email address', 'subscribe2') . "\" type=\"checkbox\" name=\"unconfirm[]\" value=\"" . $subscriber . "\" /></td>\r\n";
280
- echo "<td style=\"text-align: center;\">\r\n";
281
- echo "<input class=\"delete_checkall\" title=\"" . __('Delete this email address', 'subscribe2') . "\" type=\"checkbox\" name=\"delete[]\" value=\"" . $subscriber . "\" />\r\n";
282
- echo "</td>\r\n";
283
- echo "<td colspan=\"3\"><span style=\"color:#006600\">&#x221A;&nbsp;&nbsp;</span><abbr title=\"" . $this->signup_ip($subscriber) . "\"><a href=\"mailto:" . $subscriber . "\">" . $subscriber . "</a></abbr>\r\n";
284
- echo "(<span style=\"color:#006600\">" . $this->signup_date($subscriber) . "</span>)\r\n";
285
- } elseif ( in_array($subscriber, $unconfirmed) ) {
286
- echo "<input class=\"confirm_checkall\" title=\"" . __('Confirm this email address', 'subscribe2') . "\" type=\"checkbox\" name=\"confirm[]\" value=\"" . $subscriber . "\" /></td>\r\n";
287
- echo "<td style=\"text-align: center;\"></td>\r\n";
288
- echo "<td style=\"text-align: center;\">\r\n";
289
- echo "<input class=\"delete_checkall\" title=\"" . __('Delete this email address', 'subscribe2') . "\" type=\"checkbox\" name=\"delete[]\" value=\"" . $subscriber . "\" />\r\n";
290
- echo "</td>\r\n";
291
- echo "<td colspan=\"3\"><span style=\"color:#FF0000\">&nbsp;!&nbsp;&nbsp;&nbsp;</span><abbr title=\"" . $this->signup_ip($subscriber) . "\"><a href=\"mailto:" . $subscriber . "\">" . $subscriber . "</a></abbr>\r\n";
292
- echo "(<span style=\"color:#FF0000\">" . $this->signup_date($subscriber) . "</span>)\r\n";
293
- } elseif ( in_array($subscriber, $all_users) ) {
294
- $user_info = get_user_by('email', $subscriber);
295
- echo "</td><td style=\"text-align: center;\"></td><td style=\"text-align: center;\"></td>\r\n";
296
- echo "<td colspan=\"3\"><span style=\"color:#006600\">&reg;&nbsp;&nbsp;</span><abbr title=\"" . $user_info->user_login . "\"><a href=\"mailto:" . $subscriber . "\">" . $subscriber . "</a></abbr>\r\n";
297
- echo "(<a href=\"" . get_option('siteurl') . "/wp-admin/admin.php?page=s2&amp;email=" . urlencode($subscriber) . "\">" . __('edit', 'subscribe2') . "</a>)\r\n";
298
- }
299
- echo "</td></tr>\r\n";
300
- ('alternate' == $alternate) ? $alternate = '' : $alternate = 'alternate';
301
- }
302
- } else {
303
- if ( $_POST['searchterm'] ) {
304
- echo "<tr><td colspan=\"6\" style=\"text-align: center;\"><b>" . __('No matching subscribers found', 'subscribe2') . "</b></td></tr>\r\n";
305
- } else {
306
- echo "<tr><td colspan=\"6\" style=\"text-align: center;\"><b>" . __('NONE', 'subscribe2') . "</b></td></tr>\r\n";
307
- }
308
- }
309
- if ( !empty($subscribers) ) {
310
- echo "<tr class=\"$alternate\"><td colspan=\"3\" style=\"text-align: center;\"><input type=\"submit\" class=\"button-secondary\" name=\"process\" value=\"" . __('Process', 'subscribe2') . "\" /></td>\r\n";
311
- echo "<td colspan=\"3\" style=\"text-align: right;\">" . $strip . "</td></tr>\r\n";
312
- }
313
- echo "</table>\r\n";
314
  echo "</div>\r\n";
315
 
316
  // show bulk managment form if filtered in some Registered Users
317
- if ( in_array($what, array('registered', 'all_users')) || is_numeric($what) ) {
318
  echo "<div class=\"s2_admin\" id=\"s2_bulk_manage\">\r\n";
319
  echo "<h2>" . __('Bulk Management', 'subscribe2') . "</h2>\r\n";
320
  if ( $this->subscribe2_options['email_freq'] == 'never' ) {
@@ -348,4 +246,141 @@ echo "</form></div>\r\n";
348
  include(ABSPATH . 'wp-admin/admin-footer.php');
349
  // just to be sure
350
  die;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
351
  ?>
3
  exit();
4
  }
5
 
6
+ global $wpdb, $subscribers, $what, $current_tab;
 
 
 
 
7
 
8
  // was anything POSTed ?
9
  if ( isset($_POST['s2_admin']) ) {
10
+ check_admin_referer('bulk-subscribers');
11
  if ( !empty($_POST['addresses']) ) {
12
  $sub_error = '';
13
  $unsub_error = '';
14
+ foreach ( preg_split("|[\s,]+|", $_POST['addresses']) as $email ) {
15
  $email = $this->sanitize_email($email);
16
  if ( is_email($email) && $_POST['subscribe'] ) {
17
  if ( $this->is_public($email) !== false ) {
37
  }
38
  echo $message;
39
  $_POST['what'] = 'confirmed';
40
+ } elseif ( $_POST['action'] === 'delete' || $_POST['action2'] === 'delete' ) {
41
+ foreach ( $_POST['subscriber'] as $address ) {
42
+ $this->delete($address);
 
 
 
43
  }
44
+ echo "<div id=\"message\" class=\"updated fade\"><p><strong>" . __('Address(es) deleted!', 'subscribe2') . "</strong></p></div>";
45
+ } elseif ( $_POST['action'] === 'toggle' || $_POST['action2'] === 'toggle' ) {
46
+ global $current_user;
47
+ $this->ip = $current_user->user_login;
48
+ foreach ( $_POST['subscriber'] as $address ) {
49
+ $this->toggle($address);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
  }
51
+ echo "<div id=\"message\" class=\"updated fade\"><p><strong>" . __('Status changed!', 'subscribe2') . "</strong></p></div>";
52
  } elseif ( isset($_POST['remind']) ) {
53
  $this->remind($_POST['reminderemails']);
54
  echo "<div id=\"message\" class=\"updated fade\"><p><strong>" . __('Reminder Email(s) Sent!', 'subscribe2') . "</strong></p></div>";
67
  }
68
  }
69
 
70
+ // detect or define which tab we are in
71
+ $current_tab = isset( $_GET['tab'] ) ? $_GET['tab'] : 'public';
72
+ if ( $current_tab == 'registered' ) {
73
+ // Get Registered Subscribers
74
+ $registered = $this->get_registered();
75
+ $all_users = $this->get_all_registered();
76
+ // safety check for our arrays
77
+ if ( '' == $registered ) { $registered = array(); }
78
+ if ( '' == $all_users ) { $all_users = array(); }
 
 
 
 
 
79
  } else {
80
+ //Get Public Subscribers
81
+ $confirmed = $this->get_public();
82
+ $unconfirmed = $this->get_public(0);
83
+ // safety check for our arrays
84
+ if ( '' == $confirmed ) { $confirmed = array(); }
85
+ if ( '' == $unconfirmed ) { $unconfirmed = array(); }
86
  }
87
 
88
+ $reminderform = false;
89
+ if ( isset($_REQUEST['what']) ) {
90
+ if ( 'public' == $_REQUEST['what'] ) {
 
 
 
91
  $what = 'public';
92
  $subscribers = array_merge((array)$confirmed, (array)$unconfirmed);
93
+ } elseif ( 'confirmed' == $_REQUEST['what'] ) {
94
  $what = 'confirmed';
95
  $subscribers = $confirmed;
96
+ } elseif ( 'unconfirmed' == $_REQUEST['what'] ) {
97
  $what = 'unconfirmed';
98
  $subscribers = $unconfirmed;
99
  if ( !empty($subscribers) ) {
100
  $reminderemails = implode(",", $subscribers);
101
  $reminderform = true;
102
  }
103
+ } elseif ( is_numeric($_REQUEST['what']) ) {
104
+ $what = intval($_REQUEST['what']);
105
  $subscribers = $this->get_registered("cats=$what");
106
+ } elseif ( 'registered' == $_REQUEST['what'] ) {
107
  $what = 'registered';
108
  $subscribers = $registered;
109
+ } elseif ( 'all_users' == $_REQUEST['what'] ) {
110
  $what = 'all_users';
111
  $subscribers = $all_users;
112
  }
113
+ } else {
114
+ if ( $current_tab === 'public' ) {
 
 
 
115
  $what = 'public';
116
  $subscribers = array_merge((array)$confirmed, (array)$unconfirmed);
117
+ } else {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
118
  $what = 'all_users';
119
  $subscribers = $all_users;
120
  }
 
 
 
 
 
 
 
121
  }
122
 
123
+ if ( !empty($_POST['s']) ) {
124
+ foreach ( $subscribers as $subscriber ) {
125
+ if ( is_numeric(stripos($subscriber, $_POST['s'])) ) {
126
+ $result[] = $subscriber;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
127
  }
128
  }
129
+ $subscribers = $result;
130
+ }
131
+
132
+ if ( !class_exists('WP_List_Table') ){
133
+ require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
134
  }
135
+ // Instantiate and prepare our table data - this also runs the bulk actions
136
+ $S2ListTable = new Subscribe2_List_Table();
137
+ $S2ListTable->prepare_items();
138
 
139
  // show our form
140
  echo "<div class=\"wrap\">";
141
  echo "<div id=\"icon-tools\" class=\"icon32\"></div>";
142
+ $tabs = array('public' => 'Public Subscribers', 'registered' => 'Registered Subscribers');
143
+ echo "<h2 class=\"nav-tab-wrapper\">";
144
+ foreach ( $tabs as $tab_key => $tab_caption ) {
145
+ $active = ($current_tab == $tab_key) ? "nav-tab-active" : "";
146
+ echo "<a class=\"nav-tab " . $active . "\" href=\"?page=s2_tools&amp;tab=" . $tab_key . "\">" . $tab_caption . "</a>";
147
  }
148
+ echo "</h2>";
149
+ echo "<form method=\"post\">\r\n";
 
 
150
  echo "<input type=\"hidden\" name=\"s2_admin\" />\r\n";
151
+ switch ($current_tab) {
152
+ case 'public':
153
+ echo "<div class=\"s2_admin\" id=\"s2_add_subscribers\">\r\n";
154
+ echo "<h2>" . __('Add/Remove Subscribers', 'subscribe2') . "</h2>\r\n";
155
+ echo "<p>" . __('Enter addresses, one per line or comma-separated', 'subscribe2') . "<br />\r\n";
156
+ echo "<textarea rows=\"2\" cols=\"80\" name=\"addresses\"></textarea></p>\r\n";
157
+ echo "<input type=\"hidden\" name=\"s2_admin\" />\r\n";
158
+ echo "<p class=\"submit\" style=\"border-top: none;\"><input type=\"submit\" class=\"button-primary\" name=\"subscribe\" value=\"" . __('Subscribe', 'subscribe2') . "\" />";
159
+ echo "&nbsp;<input type=\"submit\" class=\"button-primary\" name=\"unsubscribe\" value=\"" . __('Unsubscribe', 'subscribe2') . "\" /></p>\r\n";
160
+ echo "</div>\r\n";
161
+
162
+ // subscriber lists
163
+ echo "<div class=\"s2_admin\" id=\"s2_current_subscribers\">\r\n";
164
+ echo "<h2>" . __('Current Subscribers', 'subscribe2') . "</h2>\r\n";
165
+ echo "<br />";
166
+ $cats = $this->all_cats();
167
+ $cat_ids = array();
168
+ foreach ( $cats as $cat) {
169
+ $cat_ids[] = $cat->term_id;
170
+ }
171
+ $exclude = array_merge(array('all', 'all_users', 'registered'), $cat_ids);
172
+ break;
173
+
174
+ case 'registered':
175
+ echo "<div class=\"s2_admin\" id=\"s2_add_subscribers\">\r\n";
176
+ echo "<h2>" . __('Add/Remove Subscribers', 'subscribe2') . "</h2>\r\n";
177
+ echo "<p class=\"submit\" style=\"border-top: none;\"><input type=\"submit\" class=\"button-primary\" name=\"add_user\" value=\"" . __('Add Registered User', 'subscribe2') . "\" formaction=\"" . admin_url() . "user-new.php\" /></p>\r\n";
178
+
179
+ echo "</div>\r\n";
180
+
181
+ // subscriber lists
182
+ echo "<div class=\"s2_admin\" id=\"s2_current_subscribers\">\r\n";
183
+ echo "<h2>" . __('Current Subscribers', 'subscribe2') . "</h2>\r\n";
184
+ echo "<br />";
185
+ $exclude = array('all', 'public', 'confirmed', 'unconfirmed');
186
+ break;
187
+ }
188
 
 
 
 
 
 
 
189
  // show the selected subscribers
190
+ echo "<table style=\"width: 100%; border-collapse: separate; border-spacing: 0px; *border-collapse: expression('separate', cellSpacing = '0px');\"><tr>";
191
+ echo "<td style=\"width: 50%; text-align: left;\">";
192
+ $this->display_subscriber_dropdown($what, __('Filter', 'subscribe2'), $exclude);
193
+ echo "</td>\r\n";
 
194
  if ( $reminderform ) {
195
  echo "<td style=\"width: 25%; text-align: right;\"><input type=\"hidden\" name=\"reminderemails\" value=\"" . $reminderemails . "\" />\r\n";
196
  echo "<input type=\"submit\" class=\"button-secondary\" name=\"remind\" value=\"" . __('Send Reminder Email', 'subscribe2') . "\" /></td>\r\n";
204
  } else {
205
  echo "<td style=\"width: 25%;\"></td>";
206
  }
207
+ echo "</tr></table>";
208
 
209
+ // output our subscriber table
210
+ $S2ListTable->search_box(__('Search', 'subscribe2'), 'search_id');
211
+ $S2ListTable->display();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
212
  echo "</div>\r\n";
213
 
214
  // show bulk managment form if filtered in some Registered Users
215
+ if ( $current_tab === 'registered' ) {
216
  echo "<div class=\"s2_admin\" id=\"s2_bulk_manage\">\r\n";
217
  echo "<h2>" . __('Bulk Management', 'subscribe2') . "</h2>\r\n";
218
  if ( $this->subscribe2_options['email_freq'] == 'never' ) {
246
  include(ABSPATH . 'wp-admin/admin-footer.php');
247
  // just to be sure
248
  die;
249
+
250
+ class Subscribe2_List_Table extends WP_List_Table {
251
+ function __construct(){
252
+ global $status, $page;
253
+
254
+ parent::__construct( array(
255
+ 'singular' => 'subscriber',
256
+ 'plural' => 'subscribers',
257
+ 'ajax' => false
258
+ ) );
259
+ }
260
+
261
+ function column_default($item, $column_name){
262
+ global $current_tab;
263
+ if ( $current_tab == 'registered' ) {
264
+ switch($column_name){
265
+ case 'email':
266
+ return $item[$column_name];
267
+ default:
268
+ return print_r($item,true);
269
+ }
270
+ } else {
271
+ switch($column_name){
272
+ case 'email':
273
+ case 'date':
274
+ return $item[$column_name];
275
+ default:
276
+ return print_r($item,true);
277
+ }
278
+ }
279
+ }
280
+
281
+ function column_email($item){
282
+ global $current_tab;
283
+ if ( $current_tab == 'registered' ) {
284
+ $actions = array('edit' => sprintf('<a href="?page=%s&amp;email=%s">Edit</a>', 's2', $item['email']));
285
+ return sprintf('%1$s %2$s', $item['email'], $this->row_actions($actions));
286
+ } else {
287
+ global $mysubscribe2;
288
+ if ( '0' === $mysubscribe2->is_public($item['email']) ) {
289
+ return sprintf('<span style="color:#FF0000">%1$s</span>', $item['email']);
290
+ } else {
291
+ return sprintf('%1$s', $item['email']);
292
+ }
293
+ }
294
+ }
295
+
296
+ function column_cb($item){
297
+ return sprintf('<input type="checkbox" name="%1$s[]" value="%2$s" />', $this->_args['singular'], $item['email']);
298
+ }
299
+
300
+ function get_columns(){
301
+ global $current_tab;
302
+ if ( $current_tab == 'registered' ) {
303
+ $columns = array('email' => 'Email');
304
+ } else {
305
+ $columns = array(
306
+ 'cb' => '<input type="checkbox" />',
307
+ 'email' => 'Email',
308
+ 'date' => 'Date'
309
+ );
310
+ }
311
+ return $columns;
312
+ }
313
+
314
+ function get_sortable_columns() {
315
+ global $current_tab;
316
+ if ( $current_tab == 'registered' ) {
317
+ $sortable_columns = array('email' => array('email', true));
318
+ } else {
319
+ $sortable_columns = array(
320
+ 'email' => array('email', true),
321
+ 'date' => array('date', false)
322
+ );
323
+ }
324
+ return $sortable_columns;
325
+ }
326
+
327
+ function get_bulk_actions() {
328
+ global $current_tab;
329
+ if ( $current_tab == 'registered' ) {
330
+ return array();
331
+ } else {
332
+ $actions = array(
333
+ 'delete' => __('Delete', 'subscribe2'),
334
+ 'toggle' => __('Toggle', 'subscribe2')
335
+ );
336
+ return $actions;
337
+ }
338
+ }
339
+
340
+ function prepare_items() {
341
+
342
+ global $mysubscribe2;
343
+ if ( is_int($mysubscribe2->subscribe2_options['entries']) ) {
344
+ $per_page = $mysubscribe2->subscribe2_options['entries'];
345
+ } else {
346
+ $per_page = 25;
347
+ }
348
+
349
+ $columns = $this->get_columns();
350
+ $hidden = array();
351
+ $sortable = $this->get_sortable_columns();
352
+ $this->_column_headers = array($columns, $hidden, $sortable);
353
+
354
+ global $mysubscribe2, $subscribers, $current_tab;
355
+ $data = array();
356
+ if ( $current_tab == 'public' ) {
357
+ foreach($subscribers as $email) {
358
+ $data[] = array('email' => $email, 'date' => $mysubscribe2->signup_date($email));
359
+ }
360
+ } else {
361
+ foreach($subscribers as $email) {
362
+ $data[] = array('email' => $email);
363
+ }
364
+ }
365
+
366
+ function usort_reorder($a,$b){
367
+ $orderby = (!empty($_REQUEST['orderby'])) ? $_REQUEST['orderby'] : 'email';
368
+ $order = (!empty($_REQUEST['order'])) ? $_REQUEST['order'] : 'asc';
369
+ $result = strcmp($a[$orderby], $b[$orderby]);
370
+ return ($order==='asc') ? $result : -$result;
371
+ }
372
+ usort($data, 'usort_reorder');
373
+
374
+ $current_page = $this->get_pagenum();
375
+ $total_items = count($data);
376
+ $data = array_slice($data,(($current_page-1)*$per_page),$per_page);
377
+ $this->items = $data;
378
+
379
+ $this->set_pagination_args( array(
380
+ 'total_items' => $total_items,
381
+ 'per_page' => $per_page,
382
+ 'total_pages' => ceil($total_items/$per_page)
383
+ ) );
384
+ }
385
+ }
386
  ?>
classes/class-s2-admin.php CHANGED
@@ -5,7 +5,7 @@ class s2_admin extends s2class {
5
  Hook the menu
6
  */
7
  function admin_menu() {
8
- add_menu_page (__('Subscribe2', 'subscribe2'), __('Subscribe2', 'subscribe2'), apply_filters('s2_capability', "read", 'user'), 's2', NULL, S2URL . 'include/email_edit.png');
9
 
10
  $s2user = add_submenu_page('s2', __('Your Subscriptions', 'subscribe2'), __('Your Subscriptions', 'subscribe2'), apply_filters('s2_capability', "read", 'user'), 's2', array(&$this, 'user_menu'), S2URL . 'include/email_edit.png');
11
  add_action("admin_print_scripts-$s2user", array(&$this, 'checkbox_form_js'));
@@ -45,7 +45,7 @@ class s2_admin extends s2class {
45
  } // end user_admin_css()
46
 
47
  function option_form_js() {
48
- wp_register_script('s2_edit', S2URL . 'include/s2_edit' . $this->script_debug . '.js', array('jquery'), '1.0');
49
  wp_enqueue_script('s2_edit');
50
  } // end option_form_js()
51
 
@@ -230,16 +230,21 @@ class s2_admin extends s2class {
230
  echo " /> <abbr title=\"" . $cat->slug . "\">" . $catName . "</abbr></label><br />\r\n";
231
  } else {
232
  echo "<label><input class=\"checkall_" . $name . "\" type=\"checkbox\" name=\"" . $name . "[]\" value=\"" . $cat->term_id . "\"";
233
- if ( in_array($cat->term_id, $selected) && !in_array($cat->term_id, $compulsory) ) {
234
  echo " checked=\"checked\"";
235
  }
236
- if ( in_array($cat->term_id, $compulsory) ) {
237
  echo " checked=\"checked\" DISABLED";
238
  }
239
  echo " /> <abbr title=\"" . $cat->slug . "\">" . $catName . "</abbr></label><br />\r\n";
240
  }
241
  $i++;
242
  }
 
 
 
 
 
243
  echo "</td></tr>\r\n";
244
  echo "</table>\r\n";
245
  } // end display_category_form()
5
  Hook the menu
6
  */
7
  function admin_menu() {
8
+ add_menu_page(__('Subscribe2', 'subscribe2'), __('Subscribe2', 'subscribe2'), apply_filters('s2_capability', "read", 'user'), 's2', NULL, S2URL . 'include/email_edit.png');
9
 
10
  $s2user = add_submenu_page('s2', __('Your Subscriptions', 'subscribe2'), __('Your Subscriptions', 'subscribe2'), apply_filters('s2_capability', "read", 'user'), 's2', array(&$this, 'user_menu'), S2URL . 'include/email_edit.png');
11
  add_action("admin_print_scripts-$s2user", array(&$this, 'checkbox_form_js'));
45
  } // end user_admin_css()
46
 
47
  function option_form_js() {
48
+ wp_register_script('s2_edit', S2URL . 'include/s2_edit' . $this->script_debug . '.js', array('jquery'), '1.1');
49
  wp_enqueue_script('s2_edit');
50
  } // end option_form_js()
51
 
230
  echo " /> <abbr title=\"" . $cat->slug . "\">" . $catName . "</abbr></label><br />\r\n";
231
  } else {
232
  echo "<label><input class=\"checkall_" . $name . "\" type=\"checkbox\" name=\"" . $name . "[]\" value=\"" . $cat->term_id . "\"";
233
+ if ( in_array($cat->term_id, $selected) || in_array($cat->term_id, $compulsory) ) {
234
  echo " checked=\"checked\"";
235
  }
236
+ if ( in_array($cat->term_id, $compulsory) && $name === 'category' ) {
237
  echo " checked=\"checked\" DISABLED";
238
  }
239
  echo " /> <abbr title=\"" . $cat->slug . "\">" . $catName . "</abbr></label><br />\r\n";
240
  }
241
  $i++;
242
  }
243
+ if ( !empty($compulsory) ) {
244
+ foreach ($compulsory as $cat) {
245
+ echo "<input type=\"hidden\" name=\"" . $name . "[]\" value=\"" . $cat . "\">\r\n";
246
+ }
247
+ }
248
  echo "</td></tr>\r\n";
249
  echo "</table>\r\n";
250
  } // end display_category_form()
classes/class-s2-core.php CHANGED
@@ -1,6 +1,15 @@
1
  <?php
2
  class s2class {
3
  // variables and constructor are declared at the end
 
 
 
 
 
 
 
 
 
4
  /**
5
  Load all our strings
6
  */
@@ -11,8 +20,9 @@ class s2class {
11
 
12
  $this->profile = "<p class=\"s2_message\">" . __('You may manage your subscription options from your', 'subscribe2') . " <a href=\"" . get_option('siteurl') . "/wp-admin/admin.php?page=s2\">" . __('profile', 'subscribe2') . "</a>.</p>";
13
  if ( $this->s2_mu === true ) {
14
- global $blog_id, $user_ID;
15
- if ( !is_blog_user($blog_id) ) {
 
16
  // if we are on multisite and the user is not a member of this blog change the link
17
  $this->profile = "<p class=\"s2_message\"><a href=\"" . get_option('siteurl') . "/wp-admin/?s2mu_subscribe=" . $blog_id . "\">" . __('Subscribe', 'subscribe2') . "</a> " . __('to email notifications when this blog posts new content', 'subscribe2') . ".</p>";
18
  }
@@ -92,6 +102,9 @@ class s2class {
92
  maybe_add_column($this->public, 'date', "ALTER TABLE $this->public ADD date DATE DEFAULT '$date' NOT NULL AFTER active");
93
  maybe_add_column($this->public, 'ip', "ALTER TABLE $this->public ADD ip char(64) DEFAULT 'admin' NOT NULL AFTER date");
94
  maybe_add_column($this->public, 'time', "ALTER TABLE $this->public ADD time TIME DEFAULT '00:00:00' NOT NULL AFTER date");
 
 
 
95
 
96
  // let's take the time to check process registered users
97
  // existing public subscribers are subscribed to all categories
@@ -219,8 +232,7 @@ class s2class {
219
  }
220
 
221
  // update postmeta field to a protected name, from version 8.5
222
- $sql = $wpdb->prepare( "UPDATE $wpdb->postmeta SET meta_key = '_s2mail' WHERE meta_key = 's2mail'");
223
- $wpdb->query($sql);
224
 
225
  return;
226
  } // end upgrade()
@@ -251,7 +263,7 @@ class s2class {
251
  $string = str_replace("{PERMALINK}", $link, $string);
252
  if ( strstr($string, "{TINYLINK}") ) {
253
  $tinylink = file_get_contents('http://tinyurl.com/api-create.php?url=' . urlencode($this->get_tracking_link($this->permalink)));
254
- if ( $tinylink !== 'Error' || $tinylink != false ) {
255
  $tlink = "<a href=\"" . $tinylink . "\">" . $tinylink . "</a>";
256
  $string = str_replace("{TINYLINK}", $tlink, $string);
257
  } else {
@@ -292,7 +304,7 @@ class s2class {
292
  }
293
 
294
  // Replace any escaped html symbols in subject then apply filter
295
- $subject = html_entity_decode($subject, ENT_QUOTES);
296
  $subject = apply_filters('s2_email_subject', $subject);
297
 
298
  // Construct BCC headers for sending or send individual emails
@@ -511,7 +523,7 @@ class s2class {
511
  $public = $this->get_public();
512
  }
513
  if ( $post->post_type == 'page' ) {
514
- $post_cats_string = get_all_category_ids();
515
  } else {
516
  $post_cats_string = implode(',', $post_cats);
517
  }
@@ -531,8 +543,8 @@ class s2class {
531
  // passing them in function calls a little later
532
  $this->post_title = "<a href=\"" . get_permalink($post->ID) . "\">" . html_entity_decode($post->post_title, ENT_QUOTES) . "</a>";
533
  $this->permalink = get_permalink($post->ID);
534
- $this->post_date = get_the_time(get_option('date_format'));
535
- $this->post_time = get_the_time();
536
 
537
  $author = get_userdata($post->post_author);
538
  $this->authorname = html_entity_decode(apply_filters('the_author', $author->display_name), ENT_QUOTES);
@@ -827,9 +839,9 @@ class s2class {
827
  if ( false === $status ) { return false; }
828
 
829
  if ( '0' == $status ) {
830
- $wpdb->get_results($wpdb->prepare("UPDATE $this->public SET active='1' WHERE CAST(email as binary)=%s", $email));
831
  } else {
832
- $wpdb->get_results($wpdb->prepare("UPDATE $this->public SET active='0' WHERE CAST(email as binary)=%s", $email));
833
  }
834
  } // end toggle()
835
 
@@ -973,11 +985,6 @@ class s2class {
973
  function get_registered($args = '') {
974
  global $wpdb;
975
 
976
- $format = '';
977
- $cats = '';
978
- $authors = '';
979
- $subscribers = array();
980
-
981
  parse_str($args, $r);
982
  if ( !isset($r['format']) )
983
  $r['format'] = 'all';
@@ -1539,10 +1546,20 @@ class s2class {
1539
  $message_post .= "\r\n";
1540
  $message_posttime .= "\r\n";
1541
 
1542
- $tablelinks .= "\r\n" . $this->get_tracking_link(get_permalink($post->ID)) . "\r\n";
1543
- $message_post .= $this->get_tracking_link(get_permalink($post->ID)) . "\r\n";
1544
  $message_posttime .= __('Posted on', 'subscribe2') . ": " . mysql2date($datetime, $post->post_date) . "\r\n";
1545
- $message_posttime .= $this->get_tracking_link(get_permalink($post->ID)) . "\r\n";
 
 
 
 
 
 
 
 
 
 
 
 
1546
  if ( strstr($mailtext, "{CATS}") ) {
1547
  $post_cat_names = implode(', ', wp_get_object_terms($post->ID, $s2_taxonomies, array('fields' => 'names')));
1548
  $message_post .= __('Posted in', 'subscribe2') . ": " . $post_cat_names . "\r\n";
@@ -1654,8 +1671,6 @@ class s2class {
1654
  $tmp = explode('-', $wp_version, 2);
1655
  $this->wp_release = $tmp[0];
1656
 
1657
- load_plugin_textdomain('subscribe2', false, S2DIR);
1658
-
1659
  // Is this WordPressMU or not?
1660
  if ( isset($wpmu_version) || strpos($wp_version, 'wordpress-mu') ) {
1661
  $this->s2_mu = true;
@@ -1666,7 +1681,7 @@ class s2class {
1666
 
1667
  // add action to handle WPMU subscriptions and unsubscriptions
1668
  if ( $this->s2_mu === true ) {
1669
- require_once(S2PATH . "classes/class-s2_multisite.php");
1670
  global $s2class_multisite;
1671
  $s2class_multisite = new s2_multisite;
1672
  if ( isset($_GET['s2mu_subscribe']) || isset($_GET['s2mu_unsubscribe']) ) {
@@ -1674,7 +1689,8 @@ class s2class {
1674
  }
1675
  }
1676
 
1677
- // load our strings
 
1678
  add_action('init', array(&$this, 'load_strings'));
1679
 
1680
  // do we need to install anything?
@@ -1798,7 +1814,7 @@ class s2class {
1798
  // add actions for ajax form if enabled
1799
  if ( '1' == $this->subscribe2_options['ajax'] ) {
1800
  add_action('wp_enqueue_scripts', array(&$this, 'add_ajax'));
1801
- add_action('wp_head', array(&$this, 'add_s2_ajax'));
1802
  }
1803
  }
1804
  } // end s2init()
1
  <?php
2
  class s2class {
3
  // variables and constructor are declared at the end
4
+ /**
5
+ Load translations
6
+ */
7
+ function load_translations() {
8
+ load_plugin_textdomain('subscribe2', false, S2DIR);
9
+ load_plugin_textdomain('subscribe2', false, S2DIR . "languages/");
10
+ load_plugin_textdomain('subscribe2', false, WP_LANG_DIR . "/");
11
+ } // end load_translations()
12
+
13
  /**
14
  Load all our strings
15
  */
20
 
21
  $this->profile = "<p class=\"s2_message\">" . __('You may manage your subscription options from your', 'subscribe2') . " <a href=\"" . get_option('siteurl') . "/wp-admin/admin.php?page=s2\">" . __('profile', 'subscribe2') . "</a>.</p>";
22
  if ( $this->s2_mu === true ) {
23
+ global $blog_id;
24
+ $user_ID = get_current_user_id();
25
+ if ( !is_user_member_of_blog($user_ID, $blog_id) ) {
26
  // if we are on multisite and the user is not a member of this blog change the link
27
  $this->profile = "<p class=\"s2_message\"><a href=\"" . get_option('siteurl') . "/wp-admin/?s2mu_subscribe=" . $blog_id . "\">" . __('Subscribe', 'subscribe2') . "</a> " . __('to email notifications when this blog posts new content', 'subscribe2') . ".</p>";
28
  }
102
  maybe_add_column($this->public, 'date', "ALTER TABLE $this->public ADD date DATE DEFAULT '$date' NOT NULL AFTER active");
103
  maybe_add_column($this->public, 'ip', "ALTER TABLE $this->public ADD ip char(64) DEFAULT 'admin' NOT NULL AFTER date");
104
  maybe_add_column($this->public, 'time', "ALTER TABLE $this->public ADD time TIME DEFAULT '00:00:00' NOT NULL AFTER date");
105
+ maybe_add_column($this->public, 'conf_date', "ALTER TABLE $this->public ADD conf_date DATE AFTER ip");
106
+ maybe_add_column($this->public, 'conf_time', "ALTER TABLE $this->public ADD conf_time TIME AFTER conf_date");
107
+ maybe_add_column($this->public, 'conf_ip', "ALTER TABLE $this->public ADD conf_ip char(64) AFTER conf_time");
108
 
109
  // let's take the time to check process registered users
110
  // existing public subscribers are subscribed to all categories
232
  }
233
 
234
  // update postmeta field to a protected name, from version 8.5
235
+ $wpdb->query( "UPDATE $wpdb->postmeta SET meta_key = '_s2mail' WHERE meta_key = 's2mail'" );
 
236
 
237
  return;
238
  } // end upgrade()
263
  $string = str_replace("{PERMALINK}", $link, $string);
264
  if ( strstr($string, "{TINYLINK}") ) {
265
  $tinylink = file_get_contents('http://tinyurl.com/api-create.php?url=' . urlencode($this->get_tracking_link($this->permalink)));
266
+ if ( $tinylink !== 'Error' && $tinylink != false ) {
267
  $tlink = "<a href=\"" . $tinylink . "\">" . $tinylink . "</a>";
268
  $string = str_replace("{TINYLINK}", $tlink, $string);
269
  } else {
304
  }
305
 
306
  // Replace any escaped html symbols in subject then apply filter
307
+ $subject = strip_tags(html_entity_decode($subject, ENT_QUOTES));
308
  $subject = apply_filters('s2_email_subject', $subject);
309
 
310
  // Construct BCC headers for sending or send individual emails
523
  $public = $this->get_public();
524
  }
525
  if ( $post->post_type == 'page' ) {
526
+ $post_cats_string = implode(',', get_all_category_ids());
527
  } else {
528
  $post_cats_string = implode(',', $post_cats);
529
  }
543
  // passing them in function calls a little later
544
  $this->post_title = "<a href=\"" . get_permalink($post->ID) . "\">" . html_entity_decode($post->post_title, ENT_QUOTES) . "</a>";
545
  $this->permalink = get_permalink($post->ID);
546
+ $this->post_date = get_the_time(get_option('date_format'), $post);
547
+ $this->post_time = get_the_time('', $post);
548
 
549
  $author = get_userdata($post->post_author);
550
  $this->authorname = html_entity_decode(apply_filters('the_author', $author->display_name), ENT_QUOTES);
839
  if ( false === $status ) { return false; }
840
 
841
  if ( '0' == $status ) {
842
+ $wpdb->get_results($wpdb->prepare("UPDATE $this->public SET active='1', conf_date=CURDATE(), conf_time=CURTIME(), conf_ip=%s WHERE CAST(email as binary)=%s", $this->ip, $email));
843
  } else {
844
+ $wpdb->get_results($wpdb->prepare("UPDATE $this->public SET active='0', conf_date=CURDATE(), conf_time=CURTIME(), conf_ip=%s WHERE CAST(email as binary)=%s", $this->ip, $email));
845
  }
846
  } // end toggle()
847
 
985
  function get_registered($args = '') {
986
  global $wpdb;
987
 
 
 
 
 
 
988
  parse_str($args, $r);
989
  if ( !isset($r['format']) )
990
  $r['format'] = 'all';
1546
  $message_post .= "\r\n";
1547
  $message_posttime .= "\r\n";
1548
 
 
 
1549
  $message_posttime .= __('Posted on', 'subscribe2') . ": " . mysql2date($datetime, $post->post_date) . "\r\n";
1550
+ if ( strstr($mailtext, "{TINYLINK}") ) {
1551
+ $tinylink = file_get_contents('http://tinyurl.com/api-create.php?url=' . urlencode($this->get_tracking_link(get_permalink($post->ID))));
1552
+ if ( $tinylink !== 'Error' && $tinylink !== false ) {
1553
+ $tablelinks .= "\r\n" . $tinylink . "\r\n";
1554
+ $message_post .= $tinylink . "\r\n";
1555
+ $message_posttime .= $tinylink . "\r\n";
1556
+ } else {
1557
+ $tablelinks .= "\r\n" . $this->get_tracking_link(get_permalink($post->ID)) . "\r\n";
1558
+ $message_post .= $this->get_tracking_link(get_permalink($post->ID)) . "\r\n";
1559
+ $message_posttime .= $this->get_tracking_link(get_permalink($post->ID)) . "\r\n";
1560
+ }
1561
+ }
1562
+
1563
  if ( strstr($mailtext, "{CATS}") ) {
1564
  $post_cat_names = implode(', ', wp_get_object_terms($post->ID, $s2_taxonomies, array('fields' => 'names')));
1565
  $message_post .= __('Posted in', 'subscribe2') . ": " . $post_cat_names . "\r\n";
1671
  $tmp = explode('-', $wp_version, 2);
1672
  $this->wp_release = $tmp[0];
1673
 
 
 
1674
  // Is this WordPressMU or not?
1675
  if ( isset($wpmu_version) || strpos($wp_version, 'wordpress-mu') ) {
1676
  $this->s2_mu = true;
1681
 
1682
  // add action to handle WPMU subscriptions and unsubscriptions
1683
  if ( $this->s2_mu === true ) {
1684
+ require_once(S2PATH . "classes/class-s2-multisite.php");
1685
  global $s2class_multisite;
1686
  $s2class_multisite = new s2_multisite;
1687
  if ( isset($_GET['s2mu_subscribe']) || isset($_GET['s2mu_unsubscribe']) ) {
1689
  }
1690
  }
1691
 
1692
+ // load our translations and strings
1693
+ add_action('init', array(&$this, 'load_translations'), 5);
1694
  add_action('init', array(&$this, 'load_strings'));
1695
 
1696
  // do we need to install anything?
1814
  // add actions for ajax form if enabled
1815
  if ( '1' == $this->subscribe2_options['ajax'] ) {
1816
  add_action('wp_enqueue_scripts', array(&$this, 'add_ajax'));
1817
+ add_action('wp_footer', array(&$this, 'add_s2_ajax'));
1818
  }
1819
  }
1820
  } // end s2init()
classes/class-s2-frontend.php CHANGED
@@ -6,7 +6,7 @@ class s2_frontend extends s2class {
6
  */
7
  function shortcode($atts) {
8
  extract(shortcode_atts(array(
9
- 'hide' => '',
10
  'id' => '',
11
  'url' => '',
12
  'nojs' => 'false',
@@ -16,7 +16,8 @@ class s2_frontend extends s2class {
16
 
17
  // if link is true return a link to the page with the ajax class
18
  if ( $link !== '' && !is_user_logged_in() ) {
19
- $this->s2form = "<a href=\"" . get_permalink($this->subscribe2_options['s2page']) . "\" class=\"s2popup\">" . $link . "</a>\r\n";
 
20
  return $this->s2form;
21
  }
22
 
@@ -57,7 +58,7 @@ class s2_frontend extends s2class {
57
  if ( $nojs == 'true' ) {
58
  $this->form = "<form method=\"post\" action=\"" . $url . "\"><input type=\"hidden\" name=\"ip\" value=\"" . $_SERVER['REMOTE_ADDR'] . "\" /><p><label for=\"s2email\">" . __('Your email:', 'subscribe2') . "</label><br /><input type=\"text\" name=\"email\" id=\"s2email\" value=\"" . $value . "\" size=\"" . $size . "\" /></p><p>" . $this->input_form_action . "</p></form>";
59
  } else {
60
- $this->form = "<form method=\"post\" action=\"" . $url . "\"><input type=\"hidden\" name=\"ip\" value=\"" . $_SERVER['REMOTE_ADDR'] . "\" /><p><label for=\"s2email\">" . __('Your email:', 'subscribe2') . "</label><br /><input type=\"text\" name=\"email\" id=\"s2email\" value=\"" . $value . "\" size=\"" . $size . "\" onfocus=\"if (this.value == '" . __('Enter email address...', 'subscribe2') . "') {this.value = '';}\" onblur=\"if (this.value == '') {this.value = '" . __('Enter email address...', 'subscribe2') . "';}\" /></p><p>" . $this->input_form_action . "</p></form>\r\n";
61
  }
62
  $this->s2form = $this->form;
63
 
@@ -267,7 +268,7 @@ class s2_frontend extends s2class {
267
  function add_ajax() {
268
  // enqueue the jQuery script we need and let WordPress handle the dependencies
269
  wp_enqueue_script('jquery-ui-dialog');
270
- wp_register_style('jquery-ui-style', apply_filters('s2_jqueryui_css', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/ui-darkness/jquery-ui.css'));
271
  wp_enqueue_style('jquery-ui-style');
272
  } // end add_ajax()
273
 
@@ -278,12 +279,18 @@ class s2_frontend extends s2class {
278
  echo "<script type=\"text/javascript\">\r\n";
279
  echo "//<![CDATA[\r\n";
280
  echo "jQuery(document).ready(function() {\r\n";
281
- echo " var dialog = jQuery('<div></div>')\r\n";
282
- echo " .html('" . do_shortcode('[subscribe2 nojs="true"]') . "')\r\n";
 
 
 
 
 
 
283
  if ( $this->s2form != $this->form && !is_user_logged_in() ) {
284
- echo " .dialog({modal: true, zIndex: 10000, title: '" . __('Subscribe to this blog', 'subscribe2') . "'});\r\n";
285
  } else {
286
- echo " .dialog({autoOpen: false, modal: true, zIndex: 10000, title: '" . __('Subscribe to this blog', 'subscribe2') . "'});\r\n";
287
  }
288
  echo " jQuery('a.s2popup').click(function(){\r\n";
289
  echo " dialog.dialog('open');\r\n";
6
  */
7
  function shortcode($atts) {
8
  extract(shortcode_atts(array(
9
+ 'hide' => strtolower(''),
10
  'id' => '',
11
  'url' => '',
12
  'nojs' => 'false',
16
 
17
  // if link is true return a link to the page with the ajax class
18
  if ( $link !== '' && !is_user_logged_in() ) {
19
+ $hide_id = ($hide === '') ? "": " id=\"" . $hide . "\"";
20
+ $this->s2form = "<a href=\"" . get_permalink($this->subscribe2_options['s2page']) . "\" class=\"s2popup\"" . $hide_id . ">" . $link . "</a>\r\n";
21
  return $this->s2form;
22
  }
23
 
58
  if ( $nojs == 'true' ) {
59
  $this->form = "<form method=\"post\" action=\"" . $url . "\"><input type=\"hidden\" name=\"ip\" value=\"" . $_SERVER['REMOTE_ADDR'] . "\" /><p><label for=\"s2email\">" . __('Your email:', 'subscribe2') . "</label><br /><input type=\"text\" name=\"email\" id=\"s2email\" value=\"" . $value . "\" size=\"" . $size . "\" /></p><p>" . $this->input_form_action . "</p></form>";
60
  } else {
61
+ $this->form = "<form method=\"post\" action=\"" . $url . "\"><input type=\"hidden\" name=\"ip\" value=\"" . $_SERVER['REMOTE_ADDR'] . "\" /><p><label for=\"s2email\">" . __('Your email:', 'subscribe2') . "</label><br /><input type=\"text\" name=\"email\" id=\"s2email\" value=\"" . $value . "\" size=\"" . $size . "\" onfocus=\"if (this.value == '" . $value . "') {this.value = '';}\" onblur=\"if (this.value == '') {this.value = '" . $value . "';}\" /></p><p>" . $this->input_form_action . "</p></form>\r\n";
62
  }
63
  $this->s2form = $this->form;
64
 
268
  function add_ajax() {
269
  // enqueue the jQuery script we need and let WordPress handle the dependencies
270
  wp_enqueue_script('jquery-ui-dialog');
271
+ wp_register_style('jquery-ui-style', apply_filters('s2_jqueryui_css', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.23/themes/ui-darkness/jquery-ui.css'));
272
  wp_enqueue_style('jquery-ui-style');
273
  } // end add_ajax()
274
 
279
  echo "<script type=\"text/javascript\">\r\n";
280
  echo "//<![CDATA[\r\n";
281
  echo "jQuery(document).ready(function() {\r\n";
282
+ echo " var dialog = jQuery('<div></div>');\r\n";
283
+ echo " if (jQuery('a.s2popup').attr('id') === 'unsubscribe') {\r\n";
284
+ echo " dialog.html('" . do_shortcode('[subscribe2 nojs="true" hide="unsubscribe"]') . "');\r\n";
285
+ echo " } else if (jQuery('a.s2popup').attr('id') === 'subscribe') {\r\n";
286
+ echo " dialog.html('" . do_shortcode('[subscribe2 nojs="true" hide="subscribe"]') . "');\r\n";
287
+ echo " } else {\r\n";
288
+ echo " dialog.html('" . do_shortcode('[subscribe2 nojs="true"]') . "');\r\n";
289
+ echo " }\r\n";
290
  if ( $this->s2form != $this->form && !is_user_logged_in() ) {
291
+ echo " dialog.dialog({modal: true, zIndex: 10000, title: '" . __('Subscribe to this blog', 'subscribe2') . "'});\r\n";
292
  } else {
293
+ echo " dialog.dialog({autoOpen: false, modal: true, zIndex: 10000, title: '" . __('Subscribe to this blog', 'subscribe2') . "'});\r\n";
294
  }
295
  echo " jQuery('a.s2popup').click(function(){\r\n";
296
  echo " dialog.dialog('open');\r\n";
classes/{class-s2_multisite.php → class-s2-multisite.php} RENAMED
@@ -15,7 +15,7 @@ class s2_multisite {
15
  $user_ID = get_current_user_id();
16
 
17
  // if user is not a user of the current blog
18
- if ( !is_blog_user($sub_id) ) {
19
  // add user to current blog as subscriber
20
  add_user_to_blog($sub_id, $user_ID, 'subscriber');
21
  // add an action hook for external manipulation of blog and user data
15
  $user_ID = get_current_user_id();
16
 
17
  // if user is not a user of the current blog
18
+ if ( !is_user_member_of_blog($user_ID, $sub_id) ) {
19
  // add user to current blog as subscriber
20
  add_user_to_blog($sub_id, $user_ID, 'subscriber');
21
  // add an action hook for external manipulation of blog and user data
include/accept.png DELETED
Binary file
include/cross.png DELETED
Binary file
include/exclamation.png DELETED
Binary file
include/options.php CHANGED
@@ -38,7 +38,7 @@ if (!isset($this->subscribe2_options['one_click_profile'])) {
38
  $this->subscribe2_options['one_click_profile'] = "no";
39
  } // option for displaying 'one-click' option on profile page
40
 
41
- if(!isset($this->subscribe2_options['bcclimit'])) {
42
  $this->subscribe2_options['bcclimit'] = 1;
43
  } // option for default bcc limit on email notifications
44
 
@@ -50,7 +50,7 @@ if (!isset($this->subscribe2_options['tracking'])) {
50
  $this->subscribe2_options['tracking'] = "";
51
  } // option for tracking
52
 
53
- if(!isset($this->subscribe2_options['s2page'])) {
54
  $this->subscribe2_options['s2page'] = 0;
55
  } // option for default WordPress page for Subscribe2 to use
56
 
@@ -98,7 +98,7 @@ if (!isset($this->subscribe2_options['reg_override'])) {
98
  $this->subscribe2_options['reg_override'] = "1";
99
  } // option for excluded categories to be overriden for registered users
100
 
101
- if(!isset($this->subscribe2_options['show_meta'])) {
102
  $this->subscribe2_options['show_meta'] = "0";
103
  } // option to display link to subscribe2 page from 'meta'
104
 
@@ -118,7 +118,7 @@ if (!isset($this->subscribe2_options['counterwidget'])) {
118
  $this->subscribe2_options['counterwidget'] = "0";
119
  } // option to enable Subscribe2 Counter Widget
120
 
121
- if(!isset($this->subscribe2_options['s2meta_default'])) {
122
  $this->subscribe2_options['s2meta_default'] = "0";
123
  } // option for Subscribe2 over ride postmeta to be checked by default
124
 
38
  $this->subscribe2_options['one_click_profile'] = "no";
39
  } // option for displaying 'one-click' option on profile page
40
 
41
+ if (!isset($this->subscribe2_options['bcclimit'])) {
42
  $this->subscribe2_options['bcclimit'] = 1;
43
  } // option for default bcc limit on email notifications
44
 
50
  $this->subscribe2_options['tracking'] = "";
51
  } // option for tracking
52
 
53
+ if (!isset($this->subscribe2_options['s2page'])) {
54
  $this->subscribe2_options['s2page'] = 0;
55
  } // option for default WordPress page for Subscribe2 to use
56
 
98
  $this->subscribe2_options['reg_override'] = "1";
99
  } // option for excluded categories to be overriden for registered users
100
 
101
+ if (!isset($this->subscribe2_options['show_meta'])) {
102
  $this->subscribe2_options['show_meta'] = "0";
103
  } // option to display link to subscribe2 page from 'meta'
104
 
118
  $this->subscribe2_options['counterwidget'] = "0";
119
  } // option to enable Subscribe2 Counter Widget
120
 
121
+ if (!isset($this->subscribe2_options['s2meta_default'])) {
122
  $this->subscribe2_options['s2meta_default'] = "0";
123
  } // option for Subscribe2 over ride postmeta to be checked by default
124
 
include/s2_edit.js CHANGED
@@ -1,8 +1,8 @@
1
  // Version 1.0 - original version
 
2
  jQuery(document).ready(function () {
3
  // hide our span before page loads
4
- jQuery('#s2bcc_2').hide();
5
- jQuery('#s2page_2').hide();
6
  jQuery('#s2entries_2').hide();
7
  });
8
 
1
  // Version 1.0 - original version
2
+ // Version 1.1 - updated for Subscribe2 8.6
3
  jQuery(document).ready(function () {
4
  // hide our span before page loads
5
+ jQuery('#s2bcclimit_2').hide();
 
6
  jQuery('#s2entries_2').hide();
7
  });
8
 
include/s2_edit.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(document).ready(function(){jQuery('#s2bcc_2').hide();jQuery('#s2page_2').hide();jQuery('#s2entries_2').hide()});function s2_show(id){jQuery('#s2'+id+'_2').show();jQuery('#s2'+id+'_1').hide();return false}function s2_hide(id){jQuery('#s2'+id+'_1').show();jQuery('#s2'+id+'_2').hide();return false}function s2_update(id){var input=jQuery('input[name="'+id+'"]').val();jQuery('input[name="'+id+'"]').val(input);jQuery('#s2'+id).html(input);s2_hide(id)}function s2_revert(id){var option=jQuery('#js'+id).val();jQuery('input[name="'+id+'"]').val(option);jQuery('#s2'+id).html(option);s2_hide(id)}
1
+ jQuery(document).ready(function(){jQuery('#s2bcclimit_2').hide();jQuery('#s2entries_2').hide()});function s2_show(id){jQuery('#s2'+id+'_2').show();jQuery('#s2'+id+'_1').hide();return false}function s2_hide(id){jQuery('#s2'+id+'_1').show();jQuery('#s2'+id+'_2').hide();return false}function s2_update(id){var input=jQuery('input[name="'+id+'"]').val();jQuery('input[name="'+id+'"]').val(input);jQuery('#s2'+id).html(input);s2_hide(id)}function s2_revert(id){var option=jQuery('#js'+id).val();jQuery('input[name="'+id+'"]').val(option);jQuery('#s2'+id).html(option);s2_hide(id)}
include/s2_user_admin.css CHANGED
@@ -1,18 +1,18 @@
1
- ul.s2_blogs {
2
  float: left;
3
  width: 99%;
4
  }
5
 
6
  ul.s2_blogs li {
7
- background-color: #E3E3E3;
8
- border: 1px solid #E0E0E0;
9
  display: block;
10
  float: left;
11
  margin: 3px;
12
  padding: 0.5em;
13
- position: relative;
14
- white-space: nowrap;
15
  width: 47%;
 
 
 
16
  }
17
 
18
  ul.s2_blogs li: hover {
@@ -35,10 +35,10 @@ ul.s2_blogs li .buttons {
35
  ul.s2_blogs li .buttons a {
36
  display: block;
37
  float: left;
 
38
  padding: .1em .5em;
39
  background-color: #666;
40
  color: white;
41
- margin: 0 0 0 1em;
42
  }
43
 
44
  ul.s2_blogs li .buttons a:hover {
@@ -47,21 +47,21 @@ ul.s2_blogs li .buttons a:hover {
47
  }
48
 
49
  ul.s2_blogs div.additional_info {
50
- display: none;
51
- width: 75%;
52
- padding: .5em 1em;
53
  position: absolute;
54
- left: -2px;
55
  bottom: 2.4em;
56
- margin-bottom: 2px;
57
  z-index: 9;
58
- background-color: #666;
59
- color: #fff;
 
 
60
  border: 1px solid white;
61
  border-bottom: medium none;
62
- font-style: italic;
 
 
63
  -moz-border-radius-topright: .5em;
64
- -moz-border-radius-topleft: .5em;
65
  }
66
 
67
  ul.s2_blogs li:hover div.additional_info {
1
+ ul.s2_blogs {
2
  float: left;
3
  width: 99%;
4
  }
5
 
6
  ul.s2_blogs li {
7
+ position: relative;
 
8
  display: block;
9
  float: left;
10
  margin: 3px;
11
  padding: 0.5em;
 
 
12
  width: 47%;
13
+ border: 1px solid #E0E0E0;
14
+ background-color: #E3E3E3;
15
+ white-space: nowrap;
16
  }
17
 
18
  ul.s2_blogs li: hover {
35
  ul.s2_blogs li .buttons a {
36
  display: block;
37
  float: left;
38
+ margin: 0 0 0 1em;
39
  padding: .1em .5em;
40
  background-color: #666;
41
  color: white;
 
42
  }
43
 
44
  ul.s2_blogs li .buttons a:hover {
47
  }
48
 
49
  ul.s2_blogs div.additional_info {
 
 
 
50
  position: absolute;
 
51
  bottom: 2.4em;
52
+ left: -2px;
53
  z-index: 9;
54
+ display: none;
55
+ margin-bottom: 2px;
56
+ padding: .5em 1em;
57
+ width: 75%;
58
  border: 1px solid white;
59
  border-bottom: medium none;
60
+ background-color: #666;
61
+ color: #fff;
62
+ font-style: italic;
63
  -moz-border-radius-topright: .5em;
64
+ -moz-border-radius-topleft: .5em;
65
  }
66
 
67
  ul.s2_blogs li:hover div.additional_info {
include/widget.php CHANGED
@@ -102,7 +102,7 @@ class S2_Form_widget extends WP_Widget {
102
  echo "<p><label for=\"" . $this->get_field_name('size') . "\">" . __('Text Box Size', 'subscribe2') . ":\r\n";
103
  echo "<input class=\"widefat\" id=\"" . $this->get_field_id('size') . "\" name=\"" . $this->get_field_name('size') . "\" type=\"text\" value=\"" . $size . "\" /></label></label></p>\r\n";
104
  echo "<p><label for=\"" . $this->get_field_name('hidebutton') . "\">" . __('Display options', 'subscribe2') . ":<br />\r\n";
105
- echo "<input name=\"" . $this->get_field_name('hidebutton') . "\" type=\"radio\" value=\"none\"". checked('none', $hidebutton, false) . "/>" . __('Show complete form', 'subscribe2') . "<br /><input name=\"" . $this->get_field_name('hidebutton') . "\" type=\"radio\" value=\"subscribe\"". checked('subscribe', $hidebutton, false) . "/>" . __('Hide Subscribe button', 'subscribe2') . "<br /><input name=\"" . $this->get_field_name('hidebutton') . "\" type=\"radio\" value=\"unsubscribe\"". checked('unsubscribe', $hidebutton, false) . "/>" . __('Hide Unsubscribe button', 'subscribe2');
106
  if ( '1' == $mysubscribe2->subscribe2_options['ajax'] ) {
107
  echo "<br /><input name=\"" . $this->get_field_name('hidebutton') . "\" type=\"radio\" value=\"link\"". checked('link', $hidebutton, false) . "/>" . __('Show as link', 'subscribe2');
108
  }
102
  echo "<p><label for=\"" . $this->get_field_name('size') . "\">" . __('Text Box Size', 'subscribe2') . ":\r\n";
103
  echo "<input class=\"widefat\" id=\"" . $this->get_field_id('size') . "\" name=\"" . $this->get_field_name('size') . "\" type=\"text\" value=\"" . $size . "\" /></label></label></p>\r\n";
104
  echo "<p><label for=\"" . $this->get_field_name('hidebutton') . "\">" . __('Display options', 'subscribe2') . ":<br />\r\n";
105
+ echo "<input name=\"" . $this->get_field_name('hidebutton') . "\" type=\"radio\" value=\"none\"". checked('none', $hidebutton, false) . "/> " . __('Show complete form', 'subscribe2') . "<br /><input name=\"" . $this->get_field_name('hidebutton') . "\" type=\"radio\" value=\"subscribe\"". checked('subscribe', $hidebutton, false) . "/> " . __('Hide Subscribe button', 'subscribe2') . "<br /><input name=\"" . $this->get_field_name('hidebutton') . "\" type=\"radio\" value=\"unsubscribe\"". checked('unsubscribe', $hidebutton, false) . "/> " . __('Hide Unsubscribe button', 'subscribe2');
106
  if ( '1' == $mysubscribe2->subscribe2_options['ajax'] ) {
107
  echo "<br /><input name=\"" . $this->get_field_name('hidebutton') . "\" type=\"radio\" value=\"link\"". checked('link', $hidebutton, false) . "/>" . __('Show as link', 'subscribe2');
108
  }
screenshot-1.png DELETED
Binary file
screenshot-2.png DELETED
Binary file
screenshot-3.png DELETED
Binary file
screenshot-4.png DELETED
Binary file
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: 8.5
7
  Author: Matthew Robinson
8
  Author URI: http://subscribe2.wordpress.com
9
  Licence: GPL3
@@ -43,7 +43,7 @@ if ( version_compare($GLOBALS['wp_version'], '3.1', '<') || !function_exists( 'a
43
 
44
  // our version number. Don't touch this or any line below
45
  // unless you know exactly what you are doing
46
- define( 'S2VERSION', '8.5' );
47
  define( 'S2PATH', trailingslashit(dirname(__FILE__)) );
48
  define( 'S2DIR', trailingslashit(dirname(plugin_basename(__FILE__))) );
49
  define( 'S2URL', plugin_dir_url(dirname(__FILE__)) . S2DIR );
3
  Plugin Name: Subscribe2
4
  Plugin URI: http://subscribe2.wordpress.com
5
  Description: Notifies an email list when new entries are posted.
6
+ Version: 8.6
7
  Author: Matthew Robinson
8
  Author URI: http://subscribe2.wordpress.com
9
  Licence: GPL3
43
 
44
  // our version number. Don't touch this or any line below
45
  // unless you know exactly what you are doing
46
+ define( 'S2VERSION', '8.6' );
47
  define( 'S2PATH', trailingslashit(dirname(__FILE__)) );
48
  define( 'S2DIR', trailingslashit(dirname(plugin_basename(__FILE__))) );
49
  define( 'S2URL', plugin_dir_url(dirname(__FILE__)) . S2DIR );
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: 2012-09-10 20:44+0100\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"
@@ -63,601 +63,585 @@ msgstr ""
63
  msgid "Attempt made to resend the Digest Notification email"
64
  msgstr ""
65
 
66
- #: admin/settings.php:206
67
  msgid ""
68
  "You appear to be sending notifications from an email address from a "
69
  "different domain name to your blog, this may result in failed emails"
70
  msgstr ""
71
 
72
- #: admin/settings.php:212
73
- msgid "Subscribe2 Settings"
74
  msgstr ""
75
 
76
- #: admin/settings.php:213
77
- msgid "Plugin Blog"
78
  msgstr ""
79
 
80
- #: admin/settings.php:214
81
- msgid "Make a donation via PayPal"
82
  msgstr ""
83
 
84
- #: admin/settings.php:226 admin/your_subscriptions.php:96
85
- msgid "Notification Settings"
86
  msgstr ""
87
 
88
- #: admin/settings.php:227
 
 
 
 
89
  msgid "Restrict the number of recipients per email to (0 for unlimited)"
90
  msgstr ""
91
 
92
- #: admin/settings.php:229 admin/settings.php:393
93
  msgid "Edit"
94
  msgstr ""
95
 
96
- #: admin/settings.php:232 admin/settings.php:396
97
  msgid "Update"
98
  msgstr ""
99
 
100
- #: admin/settings.php:233 admin/settings.php:397
101
  msgid "Revert"
102
  msgstr ""
103
 
104
- #: admin/settings.php:235
105
  msgid "Send Admins notifications for new"
106
  msgstr ""
107
 
108
- #: admin/settings.php:237
109
  msgid "Subscriptions"
110
  msgstr ""
111
 
112
- #: admin/settings.php:239
113
  msgid "Unsubscriptions"
114
  msgstr ""
115
 
116
- #: admin/settings.php:241
117
  msgid "Both"
118
  msgstr ""
119
 
120
- #: admin/settings.php:243
121
  msgid "Neither"
122
  msgstr ""
123
 
124
- #: admin/settings.php:245
125
  msgid "Include theme CSS stylesheet in HTML notifications"
126
  msgstr ""
127
 
128
- #: admin/settings.php:247 admin/settings.php:253 admin/settings.php:267
129
- #: admin/settings.php:272 admin/settings.php:277 admin/settings.php:438
130
- #: admin/settings.php:443 admin/settings.php:457 admin/settings.php:464
131
- #: admin/settings.php:476 admin/settings.php:481 admin/subscribers.php:339
132
  #: admin/your_subscriptions.php:121 admin/your_subscriptions.php:161
133
  msgid "Yes"
134
  msgstr ""
135
 
136
- #: admin/settings.php:249 admin/settings.php:255 admin/settings.php:269
137
- #: admin/settings.php:274 admin/settings.php:279 admin/settings.php:435
138
- #: admin/settings.php:440 admin/settings.php:445 admin/settings.php:459
139
- #: admin/settings.php:466 admin/settings.php:473 admin/settings.php:478
140
- #: admin/settings.php:483 admin/subscribers.php:341
141
  #: admin/your_subscriptions.php:123 admin/your_subscriptions.php:165
142
  msgid "No"
143
  msgstr ""
144
 
145
- #: admin/settings.php:251
146
  msgid "Send Emails for Pages"
147
  msgstr ""
148
 
149
- #: admin/settings.php:259
150
  msgid ""
151
  "Subscribe2 will send email notifications for the following custom post types"
152
  msgstr ""
153
 
154
- #: admin/settings.php:265
155
  msgid "Send Emails for Password Protected Posts"
156
  msgstr ""
157
 
158
- #: admin/settings.php:270
159
  msgid "Send Emails for Private Posts"
160
  msgstr ""
161
 
162
- #: admin/settings.php:275
163
  msgid "Include Sticky Posts at the top of all Digest Notifications"
164
  msgstr ""
165
 
166
- #: admin/settings.php:280
167
  msgid "Send Email From"
168
  msgstr ""
169
 
170
- #: admin/settings.php:285
171
  msgid "Send Emails"
172
  msgstr ""
173
 
174
- #: admin/settings.php:287
175
  msgid "For digest notifications, date order for posts is"
176
  msgstr ""
177
 
178
- #: admin/settings.php:289
179
  msgid "Descending"
180
  msgstr ""
181
 
182
- #: admin/settings.php:291
183
  msgid "Ascending"
184
  msgstr ""
185
 
186
- #: admin/settings.php:293
187
  msgid "Add Tracking Parameters to the Permalink"
188
  msgstr ""
189
 
190
- #: admin/settings.php:295
191
  msgid ""
192
  "eg. utm_source=subscribe2&amp;utm_medium=email&amp;"
193
  "utm_campaign=postnotify&amp;utm_id={ID}"
194
  msgstr ""
195
 
196
- #: admin/settings.php:300
197
- msgid "Email Templates"
198
- msgstr ""
199
-
200
- #: admin/settings.php:304
201
  msgid "New Post email (must not be empty)"
202
  msgstr ""
203
 
204
- #: admin/settings.php:305 admin/settings.php:335 admin/settings.php:340
205
  msgid "Subject Line"
206
  msgstr ""
207
 
208
- #: admin/settings.php:310
209
  msgid "Send Email Preview"
210
  msgstr ""
211
 
212
- #: admin/settings.php:311
213
  msgid "Message substitutions"
214
  msgstr ""
215
 
216
- #: admin/settings.php:313
217
  msgid ""
218
  "IF THE FOLLOWING KEYWORDS ARE ALSO IN YOUR POST THEY WILL BE SUBSTITUTED"
219
  msgstr ""
220
 
221
- #: admin/settings.php:316
222
  msgid "the post's title<br />(<i>for per-post emails only</i>)"
223
  msgstr ""
224
 
225
- #: admin/settings.php:317
226
  msgid ""
227
  "the excerpt or the entire post<br />(<i>based on the subscriber's "
228
  "preferences</i>)"
229
  msgstr ""
230
 
231
- #: admin/settings.php:318
232
  msgid ""
233
  "the excerpt of the post and the time it was posted<br />(<i>for digest "
234
  "emails only</i>)"
235
  msgstr ""
236
 
237
- #: admin/settings.php:319
238
  msgid "a list of post titles<br />(<i>for digest emails only</i>)"
239
  msgstr ""
240
 
241
- #: admin/settings.php:320
242
  msgid ""
243
  "a list of post titles followed by links to the atricles<br />(<i>for digest "
244
  "emails only</i>)"
245
  msgstr ""
246
 
247
- #: admin/settings.php:321
248
  msgid "the post's permalink<br />(<i>for per-post emails only</i>)"
249
  msgstr ""
250
 
251
- #: admin/settings.php:322
252
- msgid ""
253
- "the post's permalink after conversion by TinyURL<br />(<i>for per-post "
254
- "emails only</i>)"
255
  msgstr ""
256
 
257
- #: admin/settings.php:323
258
  msgid "the date the post was made<br />(<i>for per-post emails only</i>)"
259
  msgstr ""
260
 
261
- #: admin/settings.php:324
262
  msgid "the time the post was made<br />(<i>for per-post emails only</i>)"
263
  msgstr ""
264
 
265
- #: admin/settings.php:325
266
  msgid "the admin or post author's name"
267
  msgstr ""
268
 
269
- #: admin/settings.php:326
270
  msgid "the admin or post author's email"
271
  msgstr ""
272
 
273
- #: admin/settings.php:327
274
  msgid "the post author's name"
275
  msgstr ""
276
 
277
- #: admin/settings.php:328
278
  msgid ""
279
  "the generated link to confirm a request<br />(<i>only used in the "
280
  "confirmation email template</i>)"
281
  msgstr ""
282
 
283
- #: admin/settings.php:329
284
  msgid ""
285
  "Action performed by LINK in confirmation email<br />(<i>only used in the "
286
  "confirmation email template</i>)"
287
  msgstr ""
288
 
289
- #: admin/settings.php:330
290
  msgid "the post's assigned categories"
291
  msgstr ""
292
 
293
- #: admin/settings.php:331
294
  msgid "the post's assigned Tags"
295
  msgstr ""
296
 
297
- #: admin/settings.php:332
298
  msgid ""
299
  "the number of posts included in the digest email<br />(<i>for digest emails "
300
  "only</i>)"
301
  msgstr ""
302
 
303
- #: admin/settings.php:334
304
  msgid "Subscribe / Unsubscribe confirmation email"
305
  msgstr ""
306
 
307
- #: admin/settings.php:339
308
  msgid "Reminder email to Unconfirmed Subscribers"
309
  msgstr ""
310
 
311
- #: admin/settings.php:348
312
- msgid "Complusory Categories"
313
  msgstr ""
314
 
315
- #: admin/settings.php:350
316
  msgid ""
317
  "Compulsory categories will be checked by default for Registered Subscribers"
318
  msgstr ""
319
 
320
- #: admin/settings.php:357
321
  msgid "Excluded Categories"
322
  msgstr ""
323
 
324
- #: admin/settings.php:359
325
  msgid ""
326
  "Posts assigned to any Excluded Category do not generate notifications and "
327
  "are not included in digest notifications"
328
  msgstr ""
329
 
330
- #: admin/settings.php:363
331
  msgid "Allow registered users to subscribe to excluded categories?"
332
  msgstr ""
333
 
334
- #: admin/settings.php:371
335
  msgid "Excluded Formats"
336
  msgstr ""
337
 
338
- #: admin/settings.php:373
339
  msgid ""
340
  "Posts assigned to any Excluded Format do not generate notifications and are "
341
  "not included in digest notifications"
342
  msgstr ""
343
 
344
- #: admin/settings.php:381
345
- msgid "Appearance"
346
- msgstr ""
347
-
348
- #: admin/settings.php:385
349
- msgid "Set default Subscribe2 page as ID"
350
- msgstr ""
351
-
352
- #: admin/settings.php:391
353
- msgid "Set the number of Subscribers displayed per page"
354
- msgstr ""
355
-
356
- #: admin/settings.php:401
357
- msgid "Show a link to your subscription page in \"meta\"?"
358
- msgstr ""
359
-
360
- #: admin/settings.php:405
361
- msgid "Show the Subscribe2 button on the Write toolbar?"
362
- msgstr ""
363
-
364
- #: admin/settings.php:409
365
- msgid "Enable AJAX style subscription form?"
366
- msgstr ""
367
-
368
- #: admin/settings.php:413
369
- msgid "Enable Subscribe2 Widget?"
370
- msgstr ""
371
-
372
- #: admin/settings.php:417
373
- msgid "Enable Subscribe2 Counter Widget?"
374
- msgstr ""
375
-
376
- #: admin/settings.php:421
377
- msgid "Disable email notifications is checked by default on authoring pages?"
378
- msgstr ""
379
-
380
- #: admin/settings.php:427
381
- msgid "Auto Subscribe"
382
  msgstr ""
383
 
384
- #: admin/settings.php:429
385
  msgid "Subscribe new users registering with your blog"
386
  msgstr ""
387
 
388
- #: admin/settings.php:431
389
  msgid "Automatically"
390
  msgstr ""
391
 
392
- #: admin/settings.php:433
393
  msgid "Display option on Registration Form"
394
  msgstr ""
395
 
396
- #: admin/settings.php:436
397
  msgid "Auto-subscribe includes any excluded categories"
398
  msgstr ""
399
 
400
- #: admin/settings.php:441
401
  msgid "Registration Form option is checked by default"
402
  msgstr ""
403
 
404
- #: admin/settings.php:446
405
  msgid "Auto-subscribe users to receive email as"
406
  msgstr ""
407
 
408
- #: admin/settings.php:448 admin/subscribers.php:329
409
  #: admin/your_subscriptions.php:110
410
  msgid "HTML - Full"
411
  msgstr ""
412
 
413
- #: admin/settings.php:450 admin/subscribers.php:330
414
  #: admin/your_subscriptions.php:112
415
  msgid "HTML - Excerpt"
416
  msgstr ""
417
 
418
- #: admin/settings.php:452 admin/subscribers.php:331
419
  #: admin/your_subscriptions.php:114
420
  msgid "Plain Text - Full"
421
  msgstr ""
422
 
423
- #: admin/settings.php:454 admin/subscribers.php:332
424
  #: admin/your_subscriptions.php:116
425
  msgid "Plain Text - Excerpt"
426
  msgstr ""
427
 
428
- #: admin/settings.php:455
429
  msgid "Registered Users have the option to auto-subscribe to new categories"
430
  msgstr ""
431
 
432
- #: admin/settings.php:461
433
  msgid "New categories are immediately excluded"
434
  msgstr ""
435
 
436
- #: admin/settings.php:462
437
  msgid ""
438
  "Option for Registered Users to auto-subscribe to new categories is checked "
439
  "by default"
440
  msgstr ""
441
 
442
- #: admin/settings.php:467
443
  msgid "Display checkbox to allow subscriptions from the comment form"
444
  msgstr ""
445
 
446
- #: admin/settings.php:469
447
  msgid "Before the Comment Submit button"
448
  msgstr ""
449
 
450
- #: admin/settings.php:471
451
  msgid "After the Comment Submit button"
452
  msgstr ""
453
 
454
- #: admin/settings.php:474
455
  msgid "Comment form checkbox is checked by default"
456
  msgstr ""
457
 
458
- #: admin/settings.php:479
459
  msgid "Show one-click subscription on profile page"
460
  msgstr ""
461
 
462
- #: admin/settings.php:488
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
463
  msgid "Barred Domains"
464
  msgstr ""
465
 
466
- #: admin/settings.php:490
467
  msgid ""
468
  "Enter domains to bar from public subscriptions: <br /> (Use a new line for "
469
  "each entry and omit the \"@\" symbol, for example email.com)"
470
  msgstr ""
471
 
472
- #: admin/settings.php:496
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
473
  msgid "Submit"
474
  msgstr ""
475
 
476
- #: admin/settings.php:499
477
- msgid "Reset Default"
478
  msgstr ""
479
 
480
- #: admin/settings.php:500
481
  msgid ""
482
  "Use this to reset all options to their defaults. This <strong><em>will not</"
483
  "em></strong> modify your list of subscribers."
484
  msgstr ""
485
 
486
- #: admin/settings.php:502
487
  msgid "RESET"
488
  msgstr ""
489
 
490
- #: admin/subscribers.php:26
491
  msgid "Address(es) subscribed!"
492
  msgstr ""
493
 
494
- #: admin/subscribers.php:33
495
  msgid "Address(es) unsubscribed!"
496
  msgstr ""
497
 
498
- #: admin/subscribers.php:37
499
  msgid "Some emails were not processed, the following were already subscribed"
500
  msgstr ""
501
 
502
- #: admin/subscribers.php:40
503
  msgid "Some emails were not processed, the following were not in the database"
504
  msgstr ""
505
 
506
- #: admin/subscribers.php:49
507
  msgid "Address(es) deleted!"
508
  msgstr ""
509
 
510
- #: admin/subscribers.php:55 admin/subscribers.php:61
511
  msgid "Status changed!"
512
  msgstr ""
513
 
514
- #: admin/subscribers.php:75
515
  msgid "Reminder Email(s) Sent!"
516
  msgstr ""
517
 
518
- #: admin/subscribers.php:78
519
  msgid "Registered Users Subscribed!"
520
  msgstr ""
521
 
522
- #: admin/subscribers.php:81
523
  msgid "Registered Users Unsubscribed!"
524
  msgstr ""
525
 
526
- #: admin/subscribers.php:84
527
  msgid "Format updated for Selected Registered Users!"
528
  msgstr ""
529
 
530
- #: admin/subscribers.php:87
531
  msgid "Digest Subscription updated for Selected Registered Users!"
532
  msgstr ""
533
 
534
- #: admin/subscribers.php:182
535
- msgid "Previous Page"
536
- msgstr ""
537
-
538
- #: admin/subscribers.php:202
539
- msgid "Next Page"
540
- msgstr ""
541
-
542
- #: admin/subscribers.php:209
543
- msgid "Manage Subscribers"
544
- msgstr ""
545
-
546
- #: admin/subscribers.php:215
547
  msgid "Add/Remove Subscribers"
548
  msgstr ""
549
 
550
- #: admin/subscribers.php:216
551
  msgid "Enter addresses, one per line or comma-separated"
552
  msgstr ""
553
 
554
- #: admin/subscribers.php:219 admin/subscribers.php:324
555
- #: admin/your_subscriptions.php:259 classes/class-s2-core.php:17
556
- #: classes/class-s2-frontend.php:25
557
  msgid "Subscribe"
558
  msgstr ""
559
 
560
- #: admin/subscribers.php:220 admin/subscribers.php:325
561
- #: admin/your_subscriptions.php:238 classes/class-s2-frontend.php:24
562
  msgid "Unsubscribe"
563
  msgstr ""
564
 
565
- #: admin/subscribers.php:225
566
  msgid "Current Subscribers"
567
  msgstr ""
568
 
569
- #: admin/subscribers.php:227
570
- msgid "Filter"
571
  msgstr ""
572
 
573
- #: admin/subscribers.php:234
574
- msgid "Search Subscribers"
575
  msgstr ""
576
 
577
- #: admin/subscribers.php:237
578
  msgid "Send Reminder Email"
579
  msgstr ""
580
 
581
- #: admin/subscribers.php:244
582
  msgid "Save Emails to CSV File"
583
  msgstr ""
584
 
585
- #: admin/subscribers.php:251 admin/subscribers.php:310
586
- msgid "Process"
587
- msgstr ""
588
-
589
- #: admin/subscribers.php:264 admin/subscribers.php:286
590
- msgid "Confirm this email address"
591
  msgstr ""
592
 
593
- #: admin/subscribers.php:266 admin/subscribers.php:279
594
- msgid "Unconfirm this email address"
595
- msgstr ""
596
-
597
- #: admin/subscribers.php:268 admin/subscribers.php:281
598
- #: admin/subscribers.php:289
599
- msgid "Delete this email address"
600
- msgstr ""
601
-
602
- #: admin/subscribers.php:272 classes/class-s2-admin.php:204
603
- #: classes/class-s2-admin.php:256 classes/class-s2-admin.php:296
604
- msgid "Select / Unselect All"
605
- msgstr ""
606
-
607
- #: admin/subscribers.php:297
608
- msgid "edit"
609
- msgstr ""
610
-
611
- #: admin/subscribers.php:304
612
- msgid "No matching subscribers found"
613
- msgstr ""
614
-
615
- #: admin/subscribers.php:306
616
- msgid "NONE"
617
- msgstr ""
618
-
619
- #: admin/subscribers.php:319
620
  msgid "Bulk Management"
621
  msgstr ""
622
 
623
- #: admin/subscribers.php:321 admin/subscribers.php:335
624
  msgid ""
625
  "Preferences for Registered Users selected in the filter above can be changed "
626
  "using this section."
627
  msgstr ""
628
 
629
- #: admin/subscribers.php:322 admin/subscribers.php:336
630
  msgid "Consider User Privacy as changes cannot be undone"
631
  msgstr ""
632
 
633
- #: admin/subscribers.php:323
634
  msgid "Action to perform"
635
  msgstr ""
636
 
637
- #: admin/subscribers.php:327
638
  msgid "Bulk Update Categories"
639
  msgstr ""
640
 
641
- #: admin/subscribers.php:328
642
  msgid "Send email as"
643
  msgstr ""
644
 
645
- #: admin/subscribers.php:333
646
  msgid "Bulk Update Format"
647
  msgstr ""
648
 
649
- #: admin/subscribers.php:337
650
  msgid "Subscribe Selected Users to recieve a periodic digest notification"
651
  msgstr ""
652
 
653
- #: admin/subscribers.php:342
654
  msgid "Bulk Update Digest Subscription"
655
  msgstr ""
656
 
 
 
 
 
 
 
 
 
657
  #: admin/your_subscriptions.php:90
658
  msgid "Subscription preferences updated."
659
  msgstr ""
660
 
 
 
 
 
661
  #: admin/your_subscriptions.php:99
662
  msgid "Editing Subscribe2 preferences for user"
663
  msgstr ""
@@ -759,286 +743,291 @@ msgid ""
759
  "Check here to disable sending of an email notification for this post/page"
760
  msgstr ""
761
 
762
- #: classes/class-s2-admin.php:348
 
 
 
 
 
763
  msgid "All Users and Subscribers"
764
  msgstr ""
765
 
766
- #: classes/class-s2-admin.php:349
767
  msgid "Public Subscribers"
768
  msgstr ""
769
 
770
- #: classes/class-s2-admin.php:350
771
  msgid "Confirmed"
772
  msgstr ""
773
 
774
- #: classes/class-s2-admin.php:351
775
  msgid "Unconfirmed"
776
  msgstr ""
777
 
778
- #: classes/class-s2-admin.php:352
779
  msgid "All Registered Users"
780
  msgstr ""
781
 
782
- #: classes/class-s2-admin.php:353
783
  msgid "Registered Subscribers"
784
  msgstr ""
785
 
786
- #: classes/class-s2-admin.php:439
787
  msgid "Post Author"
788
  msgstr ""
789
 
790
- #: classes/class-s2-admin.php:463
791
  msgid ""
792
  "The WordPress cron functions may be disabled on this server. Digest "
793
  "notifications may not work."
794
  msgstr ""
795
 
796
- #: classes/class-s2-admin.php:468
797
  msgid "For each Post"
798
  msgstr ""
799
 
800
- #: classes/class-s2-admin.php:482
801
  msgid "Send Digest Notification at UTC"
802
  msgstr ""
803
 
804
- #: classes/class-s2-admin.php:493
805
  msgid ""
806
  "Chosen time will be scheduled to a future date in relation to the current "
807
  "UTC time"
808
  msgstr ""
809
 
810
- #: classes/class-s2-admin.php:496
811
  msgid "Current UTC time is"
812
  msgstr ""
813
 
814
- #: classes/class-s2-admin.php:498
815
  msgid "Current blog time is"
816
  msgstr ""
817
 
818
- #: classes/class-s2-admin.php:500
819
  msgid "Next email notification will be sent when your blog time is after"
820
  msgstr ""
821
 
822
- #: classes/class-s2-admin.php:503
823
  msgid "Attempt to resend the last Digest Notification email"
824
  msgstr ""
825
 
826
- #: classes/class-s2-admin.php:504
827
  msgid "Resend Digest"
828
  msgstr ""
829
 
830
- #: classes/class-s2-admin.php:727
831
  msgid "Email subscription"
832
  msgstr ""
833
 
834
- #: classes/class-s2-admin.php:729
835
  msgid "Subscribe / Unsubscribe"
836
  msgstr ""
837
 
838
- #: classes/class-s2-admin.php:730
839
  msgid "Receive notifications"
840
  msgstr ""
841
 
842
- #: classes/class-s2-admin.php:731
843
  msgid ""
844
  "Check if you want to receive email notification when new posts are published"
845
  msgstr ""
846
 
847
- #: classes/class-s2-core.php:10
848
  msgid "To manage your subscription options please"
849
  msgstr ""
850
 
851
- #: classes/class-s2-core.php:10
852
  msgid "login"
853
  msgstr ""
854
 
855
- #: classes/class-s2-core.php:12
856
  msgid "You may manage your subscription options from your"
857
  msgstr ""
858
 
859
- #: classes/class-s2-core.php:12
860
  msgid "profile"
861
  msgstr ""
862
 
863
- #: classes/class-s2-core.php:17
864
  msgid "to email notifications when this blog posts new content"
865
  msgstr ""
866
 
867
- #: classes/class-s2-core.php:21
868
  msgid "A confirmation message is on its way!"
869
  msgstr ""
870
 
871
- #: classes/class-s2-core.php:23
872
  msgid "That email address is already subscribed."
873
  msgstr ""
874
 
875
- #: classes/class-s2-core.php:25
876
  msgid "That email address is not subscribed."
877
  msgstr ""
878
 
879
- #: classes/class-s2-core.php:27
880
  msgid "Sorry, but that does not look like an email address to me."
881
  msgstr ""
882
 
883
- #: classes/class-s2-core.php:29
884
  msgid ""
885
  "Sorry, email addresses at that domain are currently barred due to spam, "
886
  "please use an alternative email address."
887
  msgstr ""
888
 
889
- #: classes/class-s2-core.php:31
890
  msgid ""
891
  "Sorry, there seems to be an error on the server. Please try again later."
892
  msgstr ""
893
 
894
- #: classes/class-s2-core.php:33
895
  msgid "You must to create a WordPress page for this plugin to work correctly."
896
  msgstr ""
897
 
898
- #: classes/class-s2-core.php:35
899
  msgid "Message sent!"
900
  msgstr ""
901
 
902
- #: classes/class-s2-core.php:37
903
  msgid ""
904
  "Message failed! Check your settings and check with your hosting provider"
905
  msgstr ""
906
 
907
- #: classes/class-s2-core.php:40
908
  msgid "No such email address is registered."
909
  msgstr ""
910
 
911
- #: classes/class-s2-core.php:42
912
  msgid "You have successfully subscribed!"
913
  msgstr ""
914
 
915
- #: classes/class-s2-core.php:44
916
  msgid "You have successfully unsubscribed."
917
  msgstr ""
918
 
919
- #: classes/class-s2-core.php:46
920
  msgid "subscribe"
921
  msgstr ""
922
 
923
- #: classes/class-s2-core.php:48
924
  msgid "unsubscribe"
925
  msgstr ""
926
 
927
- #: classes/class-s2-core.php:51
928
  msgid "Options saved!"
929
  msgstr ""
930
 
931
- #: classes/class-s2-core.php:52
932
  msgid "Options reset!"
933
  msgstr ""
934
 
935
- #: classes/class-s2-core.php:643
936
  msgid "Plain Text Excerpt Preview"
937
  msgstr ""
938
 
939
- #: classes/class-s2-core.php:645
940
  msgid "Plain Text Full Preview"
941
  msgstr ""
942
 
943
- #: classes/class-s2-core.php:647
944
  msgid "HTML Excerpt Preview"
945
  msgstr ""
946
 
947
- #: classes/class-s2-core.php:649
948
  msgid "HTML Full Preview"
949
  msgstr ""
950
 
951
- #: classes/class-s2-core.php:1235
952
  msgid "Registered User"
953
  msgstr ""
954
 
955
- #: classes/class-s2-core.php:1240
956
  msgid "Confirmed Public Subscriber"
957
  msgstr ""
958
 
959
- #: classes/class-s2-core.php:1242
960
  msgid "Unconfirmed Public Subscriber"
961
  msgstr ""
962
 
963
- #: classes/class-s2-core.php:1279
964
  msgid "Check here to Subscribe to email notifications for new posts"
965
  msgstr ""
966
 
967
- #: classes/class-s2-core.php:1285
968
  msgid ""
969
  "By registering with this blog you are also agreeing to receive email "
970
  "notifications for new posts but you can unsubscribe at anytime"
971
  msgstr ""
972
 
973
- #: classes/class-s2-core.php:1311
974
  msgid "Check here to Subscribe to notifications for new posts"
975
  msgstr ""
976
 
977
- #: classes/class-s2-core.php:1401
978
  msgid "Weekly"
979
  msgstr ""
980
 
981
- #: classes/class-s2-core.php:1535 classes/class-s2-core.php:1536
982
  msgid "Author"
983
  msgstr ""
984
 
985
- #: classes/class-s2-core.php:1544
986
  msgid "Posted on"
987
  msgstr ""
988
 
989
- #: classes/class-s2-core.php:1548 classes/class-s2-core.php:1549
990
  msgid "Posted in"
991
  msgstr ""
992
 
993
- #: classes/class-s2-core.php:1554 classes/class-s2-core.php:1555
994
  msgid "Tagged as"
995
  msgstr ""
996
 
997
- #: classes/class-s2-core.php:1621
998
  msgid "Digest Email"
999
  msgstr ""
1000
 
1001
- #: classes/class-s2-core.php:1631
1002
  msgid "Digest Preview"
1003
  msgstr ""
1004
 
1005
- #: classes/class-s2-frontend.php:53 classes/class-s2-frontend.php:60
1006
  msgid "Enter email address..."
1007
  msgstr ""
1008
 
1009
- #: classes/class-s2-frontend.php:58 classes/class-s2-frontend.php:60
1010
  msgid "Your email:"
1011
  msgstr ""
1012
 
1013
- #: classes/class-s2-frontend.php:168
1014
  msgid "Subscription Confirmation"
1015
  msgstr ""
1016
 
1017
- #: classes/class-s2-frontend.php:170
1018
  msgid "Unsubscription Confirmation"
1019
  msgstr ""
1020
 
1021
- #: classes/class-s2-frontend.php:209
1022
  msgid "New Subscription"
1023
  msgstr ""
1024
 
1025
- #: classes/class-s2-frontend.php:211
1026
  msgid "subscribed to email notifications!"
1027
  msgstr ""
1028
 
1029
- #: classes/class-s2-frontend.php:232
1030
  msgid "New Unsubscription"
1031
  msgstr ""
1032
 
1033
- #: classes/class-s2-frontend.php:234
1034
  msgid "unsubscribed from email notifications!"
1035
  msgstr ""
1036
 
1037
- #: classes/class-s2-frontend.php:260
1038
  msgid "[Un]Subscribe to Posts"
1039
  msgstr ""
1040
 
1041
- #: classes/class-s2-frontend.php:284 classes/class-s2-frontend.php:286
1042
  msgid "Subscribe to this blog"
1043
  msgstr ""
1044
 
8
  msgstr ""
9
  "Project-Id-Version: PACKAGE VERSION\n"
10
  "Report-Msgid-Bugs-To: \n"
11
+ "POT-Creation-Date: 2012-12-13 19:53+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"
63
  msgid "Attempt made to resend the Digest Notification email"
64
  msgstr ""
65
 
66
+ #: admin/settings.php:129
67
  msgid ""
68
  "You appear to be sending notifications from an email address from a "
69
  "different domain name to your blog, this may result in failed emails"
70
  msgstr ""
71
 
72
+ #: admin/settings.php:138
73
+ msgid "Email Settings"
74
  msgstr ""
75
 
76
+ #: admin/settings.php:139
77
+ msgid "Templates"
78
  msgstr ""
79
 
80
+ #: admin/settings.php:140
81
+ msgid "Registered Users"
82
  msgstr ""
83
 
84
+ #: admin/settings.php:141
85
+ msgid "Appearance"
86
  msgstr ""
87
 
88
+ #: admin/settings.php:142
89
+ msgid "Miscellaneous"
90
+ msgstr ""
91
+
92
+ #: admin/settings.php:163
93
  msgid "Restrict the number of recipients per email to (0 for unlimited)"
94
  msgstr ""
95
 
96
+ #: admin/settings.php:165 admin/settings.php:397
97
  msgid "Edit"
98
  msgstr ""
99
 
100
+ #: admin/settings.php:168 admin/settings.php:400
101
  msgid "Update"
102
  msgstr ""
103
 
104
+ #: admin/settings.php:169 admin/settings.php:401
105
  msgid "Revert"
106
  msgstr ""
107
 
108
+ #: admin/settings.php:171
109
  msgid "Send Admins notifications for new"
110
  msgstr ""
111
 
112
+ #: admin/settings.php:173
113
  msgid "Subscriptions"
114
  msgstr ""
115
 
116
+ #: admin/settings.php:175
117
  msgid "Unsubscriptions"
118
  msgstr ""
119
 
120
+ #: admin/settings.php:177
121
  msgid "Both"
122
  msgstr ""
123
 
124
+ #: admin/settings.php:179
125
  msgid "Neither"
126
  msgstr ""
127
 
128
+ #: admin/settings.php:181
129
  msgid "Include theme CSS stylesheet in HTML notifications"
130
  msgstr ""
131
 
132
+ #: admin/settings.php:183 admin/settings.php:189 admin/settings.php:203
133
+ #: admin/settings.php:208 admin/settings.php:213 admin/settings.php:333
134
+ #: admin/settings.php:338 admin/settings.php:352 admin/settings.php:359
135
+ #: admin/settings.php:371 admin/settings.php:376 admin/subscribers.php:237
136
  #: admin/your_subscriptions.php:121 admin/your_subscriptions.php:161
137
  msgid "Yes"
138
  msgstr ""
139
 
140
+ #: admin/settings.php:185 admin/settings.php:191 admin/settings.php:205
141
+ #: admin/settings.php:210 admin/settings.php:215 admin/settings.php:330
142
+ #: admin/settings.php:335 admin/settings.php:340 admin/settings.php:354
143
+ #: admin/settings.php:361 admin/settings.php:368 admin/settings.php:373
144
+ #: admin/settings.php:378 admin/subscribers.php:239
145
  #: admin/your_subscriptions.php:123 admin/your_subscriptions.php:165
146
  msgid "No"
147
  msgstr ""
148
 
149
+ #: admin/settings.php:187
150
  msgid "Send Emails for Pages"
151
  msgstr ""
152
 
153
+ #: admin/settings.php:195
154
  msgid ""
155
  "Subscribe2 will send email notifications for the following custom post types"
156
  msgstr ""
157
 
158
+ #: admin/settings.php:201
159
  msgid "Send Emails for Password Protected Posts"
160
  msgstr ""
161
 
162
+ #: admin/settings.php:206
163
  msgid "Send Emails for Private Posts"
164
  msgstr ""
165
 
166
+ #: admin/settings.php:211
167
  msgid "Include Sticky Posts at the top of all Digest Notifications"
168
  msgstr ""
169
 
170
+ #: admin/settings.php:216
171
  msgid "Send Email From"
172
  msgstr ""
173
 
174
+ #: admin/settings.php:221
175
  msgid "Send Emails"
176
  msgstr ""
177
 
178
+ #: admin/settings.php:223
179
  msgid "For digest notifications, date order for posts is"
180
  msgstr ""
181
 
182
+ #: admin/settings.php:225
183
  msgid "Descending"
184
  msgstr ""
185
 
186
+ #: admin/settings.php:227
187
  msgid "Ascending"
188
  msgstr ""
189
 
190
+ #: admin/settings.php:229
191
  msgid "Add Tracking Parameters to the Permalink"
192
  msgstr ""
193
 
194
+ #: admin/settings.php:231
195
  msgid ""
196
  "eg. utm_source=subscribe2&amp;utm_medium=email&amp;"
197
  "utm_campaign=postnotify&amp;utm_id={ID}"
198
  msgstr ""
199
 
200
+ #: admin/settings.php:242
 
 
 
 
201
  msgid "New Post email (must not be empty)"
202
  msgstr ""
203
 
204
+ #: admin/settings.php:243 admin/settings.php:273 admin/settings.php:278
205
  msgid "Subject Line"
206
  msgstr ""
207
 
208
+ #: admin/settings.php:248
209
  msgid "Send Email Preview"
210
  msgstr ""
211
 
212
+ #: admin/settings.php:249
213
  msgid "Message substitutions"
214
  msgstr ""
215
 
216
+ #: admin/settings.php:251
217
  msgid ""
218
  "IF THE FOLLOWING KEYWORDS ARE ALSO IN YOUR POST THEY WILL BE SUBSTITUTED"
219
  msgstr ""
220
 
221
+ #: admin/settings.php:254
222
  msgid "the post's title<br />(<i>for per-post emails only</i>)"
223
  msgstr ""
224
 
225
+ #: admin/settings.php:255
226
  msgid ""
227
  "the excerpt or the entire post<br />(<i>based on the subscriber's "
228
  "preferences</i>)"
229
  msgstr ""
230
 
231
+ #: admin/settings.php:256
232
  msgid ""
233
  "the excerpt of the post and the time it was posted<br />(<i>for digest "
234
  "emails only</i>)"
235
  msgstr ""
236
 
237
+ #: admin/settings.php:257
238
  msgid "a list of post titles<br />(<i>for digest emails only</i>)"
239
  msgstr ""
240
 
241
+ #: admin/settings.php:258
242
  msgid ""
243
  "a list of post titles followed by links to the atricles<br />(<i>for digest "
244
  "emails only</i>)"
245
  msgstr ""
246
 
247
+ #: admin/settings.php:259
248
  msgid "the post's permalink<br />(<i>for per-post emails only</i>)"
249
  msgstr ""
250
 
251
+ #: admin/settings.php:260
252
+ msgid "the post's permalink after conversion by TinyURL"
 
 
253
  msgstr ""
254
 
255
+ #: admin/settings.php:261
256
  msgid "the date the post was made<br />(<i>for per-post emails only</i>)"
257
  msgstr ""
258
 
259
+ #: admin/settings.php:262
260
  msgid "the time the post was made<br />(<i>for per-post emails only</i>)"
261
  msgstr ""
262
 
263
+ #: admin/settings.php:263
264
  msgid "the admin or post author's name"
265
  msgstr ""
266
 
267
+ #: admin/settings.php:264
268
  msgid "the admin or post author's email"
269
  msgstr ""
270
 
271
+ #: admin/settings.php:265
272
  msgid "the post author's name"
273
  msgstr ""
274
 
275
+ #: admin/settings.php:266
276
  msgid ""
277
  "the generated link to confirm a request<br />(<i>only used in the "
278
  "confirmation email template</i>)"
279
  msgstr ""
280
 
281
+ #: admin/settings.php:267
282
  msgid ""
283
  "Action performed by LINK in confirmation email<br />(<i>only used in the "
284
  "confirmation email template</i>)"
285
  msgstr ""
286
 
287
+ #: admin/settings.php:268
288
  msgid "the post's assigned categories"
289
  msgstr ""
290
 
291
+ #: admin/settings.php:269
292
  msgid "the post's assigned Tags"
293
  msgstr ""
294
 
295
+ #: admin/settings.php:270
296
  msgid ""
297
  "the number of posts included in the digest email<br />(<i>for digest emails "
298
  "only</i>)"
299
  msgstr ""
300
 
301
+ #: admin/settings.php:272
302
  msgid "Subscribe / Unsubscribe confirmation email"
303
  msgstr ""
304
 
305
+ #: admin/settings.php:277
306
  msgid "Reminder email to Unconfirmed Subscribers"
307
  msgstr ""
308
 
309
+ #: admin/settings.php:289
310
+ msgid "Compulsory Categories"
311
  msgstr ""
312
 
313
+ #: admin/settings.php:291
314
  msgid ""
315
  "Compulsory categories will be checked by default for Registered Subscribers"
316
  msgstr ""
317
 
318
+ #: admin/settings.php:298
319
  msgid "Excluded Categories"
320
  msgstr ""
321
 
322
+ #: admin/settings.php:300
323
  msgid ""
324
  "Posts assigned to any Excluded Category do not generate notifications and "
325
  "are not included in digest notifications"
326
  msgstr ""
327
 
328
+ #: admin/settings.php:304
329
  msgid "Allow registered users to subscribe to excluded categories?"
330
  msgstr ""
331
 
332
+ #: admin/settings.php:312
333
  msgid "Excluded Formats"
334
  msgstr ""
335
 
336
+ #: admin/settings.php:314
337
  msgid ""
338
  "Posts assigned to any Excluded Format do not generate notifications and are "
339
  "not included in digest notifications"
340
  msgstr ""
341
 
342
+ #: admin/settings.php:322
343
+ msgid "Auto-Subscribe"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
344
  msgstr ""
345
 
346
+ #: admin/settings.php:324
347
  msgid "Subscribe new users registering with your blog"
348
  msgstr ""
349
 
350
+ #: admin/settings.php:326
351
  msgid "Automatically"
352
  msgstr ""
353
 
354
+ #: admin/settings.php:328
355
  msgid "Display option on Registration Form"
356
  msgstr ""
357
 
358
+ #: admin/settings.php:331
359
  msgid "Auto-subscribe includes any excluded categories"
360
  msgstr ""
361
 
362
+ #: admin/settings.php:336
363
  msgid "Registration Form option is checked by default"
364
  msgstr ""
365
 
366
+ #: admin/settings.php:341
367
  msgid "Auto-subscribe users to receive email as"
368
  msgstr ""
369
 
370
+ #: admin/settings.php:343 admin/subscribers.php:227
371
  #: admin/your_subscriptions.php:110
372
  msgid "HTML - Full"
373
  msgstr ""
374
 
375
+ #: admin/settings.php:345 admin/subscribers.php:228
376
  #: admin/your_subscriptions.php:112
377
  msgid "HTML - Excerpt"
378
  msgstr ""
379
 
380
+ #: admin/settings.php:347 admin/subscribers.php:229
381
  #: admin/your_subscriptions.php:114
382
  msgid "Plain Text - Full"
383
  msgstr ""
384
 
385
+ #: admin/settings.php:349 admin/subscribers.php:230
386
  #: admin/your_subscriptions.php:116
387
  msgid "Plain Text - Excerpt"
388
  msgstr ""
389
 
390
+ #: admin/settings.php:350
391
  msgid "Registered Users have the option to auto-subscribe to new categories"
392
  msgstr ""
393
 
394
+ #: admin/settings.php:356
395
  msgid "New categories are immediately excluded"
396
  msgstr ""
397
 
398
+ #: admin/settings.php:357
399
  msgid ""
400
  "Option for Registered Users to auto-subscribe to new categories is checked "
401
  "by default"
402
  msgstr ""
403
 
404
+ #: admin/settings.php:362
405
  msgid "Display checkbox to allow subscriptions from the comment form"
406
  msgstr ""
407
 
408
+ #: admin/settings.php:364
409
  msgid "Before the Comment Submit button"
410
  msgstr ""
411
 
412
+ #: admin/settings.php:366
413
  msgid "After the Comment Submit button"
414
  msgstr ""
415
 
416
+ #: admin/settings.php:369
417
  msgid "Comment form checkbox is checked by default"
418
  msgstr ""
419
 
420
+ #: admin/settings.php:374
421
  msgid "Show one-click subscription on profile page"
422
  msgstr ""
423
 
424
+ #: admin/settings.php:389
425
+ msgid "Set default Subscribe2 page as ID"
426
+ msgstr ""
427
+
428
+ #: admin/settings.php:395
429
+ msgid "Set the number of Subscribers displayed per page"
430
+ msgstr ""
431
+
432
+ #: admin/settings.php:405
433
+ msgid "Show a link to your subscription page in \"meta\"?"
434
+ msgstr ""
435
+
436
+ #: admin/settings.php:409
437
+ msgid "Show the Subscribe2 button on the Write toolbar?"
438
+ msgstr ""
439
+
440
+ #: admin/settings.php:413
441
+ msgid "Enable AJAX style subscription form?"
442
+ msgstr ""
443
+
444
+ #: admin/settings.php:417
445
+ msgid "Enable Subscribe2 Widget?"
446
+ msgstr ""
447
+
448
+ #: admin/settings.php:421
449
+ msgid "Enable Subscribe2 Counter Widget?"
450
+ msgstr ""
451
+
452
+ #: admin/settings.php:425
453
+ msgid "Disable email notifications is checked by default on authoring pages?"
454
+ msgstr ""
455
+
456
+ #: admin/settings.php:433
457
  msgid "Barred Domains"
458
  msgstr ""
459
 
460
+ #: admin/settings.php:435
461
  msgid ""
462
  "Enter domains to bar from public subscriptions: <br /> (Use a new line for "
463
  "each entry and omit the \"@\" symbol, for example email.com)"
464
  msgstr ""
465
 
466
+ #: admin/settings.php:438
467
+ msgid "Links"
468
+ msgstr ""
469
+
470
+ #: admin/settings.php:439
471
+ msgid "Plugin Site"
472
+ msgstr ""
473
+
474
+ #: admin/settings.php:440
475
+ msgid "Plugin Forum"
476
+ msgstr ""
477
+
478
+ #: admin/settings.php:441
479
+ msgid "Plugin Blog"
480
+ msgstr ""
481
+
482
+ #: admin/settings.php:442
483
+ msgid "Make a donation via PayPal"
484
+ msgstr ""
485
+
486
+ #: admin/settings.php:448
487
  msgid "Submit"
488
  msgstr ""
489
 
490
+ #: admin/settings.php:452
491
+ msgid "Reset to Default Settings"
492
  msgstr ""
493
 
494
+ #: admin/settings.php:453
495
  msgid ""
496
  "Use this to reset all options to their defaults. This <strong><em>will not</"
497
  "em></strong> modify your list of subscribers."
498
  msgstr ""
499
 
500
+ #: admin/settings.php:455
501
  msgid "RESET"
502
  msgstr ""
503
 
504
+ #: admin/subscribers.php:22
505
  msgid "Address(es) subscribed!"
506
  msgstr ""
507
 
508
+ #: admin/subscribers.php:29
509
  msgid "Address(es) unsubscribed!"
510
  msgstr ""
511
 
512
+ #: admin/subscribers.php:33
513
  msgid "Some emails were not processed, the following were already subscribed"
514
  msgstr ""
515
 
516
+ #: admin/subscribers.php:36
517
  msgid "Some emails were not processed, the following were not in the database"
518
  msgstr ""
519
 
520
+ #: admin/subscribers.php:44
521
  msgid "Address(es) deleted!"
522
  msgstr ""
523
 
524
+ #: admin/subscribers.php:51
525
  msgid "Status changed!"
526
  msgstr ""
527
 
528
+ #: admin/subscribers.php:54
529
  msgid "Reminder Email(s) Sent!"
530
  msgstr ""
531
 
532
+ #: admin/subscribers.php:57
533
  msgid "Registered Users Subscribed!"
534
  msgstr ""
535
 
536
+ #: admin/subscribers.php:60
537
  msgid "Registered Users Unsubscribed!"
538
  msgstr ""
539
 
540
+ #: admin/subscribers.php:63
541
  msgid "Format updated for Selected Registered Users!"
542
  msgstr ""
543
 
544
+ #: admin/subscribers.php:66
545
  msgid "Digest Subscription updated for Selected Registered Users!"
546
  msgstr ""
547
 
548
+ #: admin/subscribers.php:154 admin/subscribers.php:176
 
 
 
 
 
 
 
 
 
 
 
 
549
  msgid "Add/Remove Subscribers"
550
  msgstr ""
551
 
552
+ #: admin/subscribers.php:155
553
  msgid "Enter addresses, one per line or comma-separated"
554
  msgstr ""
555
 
556
+ #: admin/subscribers.php:158 admin/subscribers.php:222
557
+ #: admin/your_subscriptions.php:259 classes/class-s2-core.php:27
558
+ #: classes/class-s2-frontend.php:26
559
  msgid "Subscribe"
560
  msgstr ""
561
 
562
+ #: admin/subscribers.php:159 admin/subscribers.php:223
563
+ #: admin/your_subscriptions.php:238 classes/class-s2-frontend.php:25
564
  msgid "Unsubscribe"
565
  msgstr ""
566
 
567
+ #: admin/subscribers.php:164 admin/subscribers.php:183
568
  msgid "Current Subscribers"
569
  msgstr ""
570
 
571
+ #: admin/subscribers.php:177
572
+ msgid "Add Registered User"
573
  msgstr ""
574
 
575
+ #: admin/subscribers.php:192
576
+ msgid "Filter"
577
  msgstr ""
578
 
579
+ #: admin/subscribers.php:196
580
  msgid "Send Reminder Email"
581
  msgstr ""
582
 
583
+ #: admin/subscribers.php:203
584
  msgid "Save Emails to CSV File"
585
  msgstr ""
586
 
587
+ #: admin/subscribers.php:210
588
+ msgid "Search"
 
 
 
 
589
  msgstr ""
590
 
591
+ #: admin/subscribers.php:217
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
592
  msgid "Bulk Management"
593
  msgstr ""
594
 
595
+ #: admin/subscribers.php:219 admin/subscribers.php:233
596
  msgid ""
597
  "Preferences for Registered Users selected in the filter above can be changed "
598
  "using this section."
599
  msgstr ""
600
 
601
+ #: admin/subscribers.php:220 admin/subscribers.php:234
602
  msgid "Consider User Privacy as changes cannot be undone"
603
  msgstr ""
604
 
605
+ #: admin/subscribers.php:221
606
  msgid "Action to perform"
607
  msgstr ""
608
 
609
+ #: admin/subscribers.php:225
610
  msgid "Bulk Update Categories"
611
  msgstr ""
612
 
613
+ #: admin/subscribers.php:226
614
  msgid "Send email as"
615
  msgstr ""
616
 
617
+ #: admin/subscribers.php:231
618
  msgid "Bulk Update Format"
619
  msgstr ""
620
 
621
+ #: admin/subscribers.php:235
622
  msgid "Subscribe Selected Users to recieve a periodic digest notification"
623
  msgstr ""
624
 
625
+ #: admin/subscribers.php:240
626
  msgid "Bulk Update Digest Subscription"
627
  msgstr ""
628
 
629
+ #: admin/subscribers.php:333
630
+ msgid "Delete"
631
+ msgstr ""
632
+
633
+ #: admin/subscribers.php:334
634
+ msgid "Toggle"
635
+ msgstr ""
636
+
637
  #: admin/your_subscriptions.php:90
638
  msgid "Subscription preferences updated."
639
  msgstr ""
640
 
641
+ #: admin/your_subscriptions.php:96
642
+ msgid "Notification Settings"
643
+ msgstr ""
644
+
645
  #: admin/your_subscriptions.php:99
646
  msgid "Editing Subscribe2 preferences for user"
647
  msgstr ""
743
  "Check here to disable sending of an email notification for this post/page"
744
  msgstr ""
745
 
746
+ #: classes/class-s2-admin.php:204 classes/class-s2-admin.php:261
747
+ #: classes/class-s2-admin.php:301
748
+ msgid "Select / Unselect All"
749
+ msgstr ""
750
+
751
+ #: classes/class-s2-admin.php:353
752
  msgid "All Users and Subscribers"
753
  msgstr ""
754
 
755
+ #: classes/class-s2-admin.php:354
756
  msgid "Public Subscribers"
757
  msgstr ""
758
 
759
+ #: classes/class-s2-admin.php:355
760
  msgid "Confirmed"
761
  msgstr ""
762
 
763
+ #: classes/class-s2-admin.php:356
764
  msgid "Unconfirmed"
765
  msgstr ""
766
 
767
+ #: classes/class-s2-admin.php:357
768
  msgid "All Registered Users"
769
  msgstr ""
770
 
771
+ #: classes/class-s2-admin.php:358
772
  msgid "Registered Subscribers"
773
  msgstr ""
774
 
775
+ #: classes/class-s2-admin.php:444
776
  msgid "Post Author"
777
  msgstr ""
778
 
779
+ #: classes/class-s2-admin.php:468
780
  msgid ""
781
  "The WordPress cron functions may be disabled on this server. Digest "
782
  "notifications may not work."
783
  msgstr ""
784
 
785
+ #: classes/class-s2-admin.php:473
786
  msgid "For each Post"
787
  msgstr ""
788
 
789
+ #: classes/class-s2-admin.php:487
790
  msgid "Send Digest Notification at UTC"
791
  msgstr ""
792
 
793
+ #: classes/class-s2-admin.php:498
794
  msgid ""
795
  "Chosen time will be scheduled to a future date in relation to the current "
796
  "UTC time"
797
  msgstr ""
798
 
799
+ #: classes/class-s2-admin.php:501
800
  msgid "Current UTC time is"
801
  msgstr ""
802
 
803
+ #: classes/class-s2-admin.php:503
804
  msgid "Current blog time is"
805
  msgstr ""
806
 
807
+ #: classes/class-s2-admin.php:505
808
  msgid "Next email notification will be sent when your blog time is after"
809
  msgstr ""
810
 
811
+ #: classes/class-s2-admin.php:508
812
  msgid "Attempt to resend the last Digest Notification email"
813
  msgstr ""
814
 
815
+ #: classes/class-s2-admin.php:509
816
  msgid "Resend Digest"
817
  msgstr ""
818
 
819
+ #: classes/class-s2-admin.php:732
820
  msgid "Email subscription"
821
  msgstr ""
822
 
823
+ #: classes/class-s2-admin.php:734
824
  msgid "Subscribe / Unsubscribe"
825
  msgstr ""
826
 
827
+ #: classes/class-s2-admin.php:735
828
  msgid "Receive notifications"
829
  msgstr ""
830
 
831
+ #: classes/class-s2-admin.php:736
832
  msgid ""
833
  "Check if you want to receive email notification when new posts are published"
834
  msgstr ""
835
 
836
+ #: classes/class-s2-core.php:19
837
  msgid "To manage your subscription options please"
838
  msgstr ""
839
 
840
+ #: classes/class-s2-core.php:19
841
  msgid "login"
842
  msgstr ""
843
 
844
+ #: classes/class-s2-core.php:21
845
  msgid "You may manage your subscription options from your"
846
  msgstr ""
847
 
848
+ #: classes/class-s2-core.php:21
849
  msgid "profile"
850
  msgstr ""
851
 
852
+ #: classes/class-s2-core.php:27
853
  msgid "to email notifications when this blog posts new content"
854
  msgstr ""
855
 
856
+ #: classes/class-s2-core.php:31
857
  msgid "A confirmation message is on its way!"
858
  msgstr ""
859
 
860
+ #: classes/class-s2-core.php:33
861
  msgid "That email address is already subscribed."
862
  msgstr ""
863
 
864
+ #: classes/class-s2-core.php:35
865
  msgid "That email address is not subscribed."
866
  msgstr ""
867
 
868
+ #: classes/class-s2-core.php:37
869
  msgid "Sorry, but that does not look like an email address to me."
870
  msgstr ""
871
 
872
+ #: classes/class-s2-core.php:39
873
  msgid ""
874
  "Sorry, email addresses at that domain are currently barred due to spam, "
875
  "please use an alternative email address."
876
  msgstr ""
877
 
878
+ #: classes/class-s2-core.php:41
879
  msgid ""
880
  "Sorry, there seems to be an error on the server. Please try again later."
881
  msgstr ""
882
 
883
+ #: classes/class-s2-core.php:43
884
  msgid "You must to create a WordPress page for this plugin to work correctly."
885
  msgstr ""
886
 
887
+ #: classes/class-s2-core.php:45
888
  msgid "Message sent!"
889
  msgstr ""
890
 
891
+ #: classes/class-s2-core.php:47
892
  msgid ""
893
  "Message failed! Check your settings and check with your hosting provider"
894
  msgstr ""
895
 
896
+ #: classes/class-s2-core.php:50
897
  msgid "No such email address is registered."
898
  msgstr ""
899
 
900
+ #: classes/class-s2-core.php:52
901
  msgid "You have successfully subscribed!"
902
  msgstr ""
903
 
904
+ #: classes/class-s2-core.php:54
905
  msgid "You have successfully unsubscribed."
906
  msgstr ""
907
 
908
+ #: classes/class-s2-core.php:56
909
  msgid "subscribe"
910
  msgstr ""
911
 
912
+ #: classes/class-s2-core.php:58
913
  msgid "unsubscribe"
914
  msgstr ""
915
 
916
+ #: classes/class-s2-core.php:61
917
  msgid "Options saved!"
918
  msgstr ""
919
 
920
+ #: classes/class-s2-core.php:62
921
  msgid "Options reset!"
922
  msgstr ""
923
 
924
+ #: classes/class-s2-core.php:655
925
  msgid "Plain Text Excerpt Preview"
926
  msgstr ""
927
 
928
+ #: classes/class-s2-core.php:657
929
  msgid "Plain Text Full Preview"
930
  msgstr ""
931
 
932
+ #: classes/class-s2-core.php:659
933
  msgid "HTML Excerpt Preview"
934
  msgstr ""
935
 
936
+ #: classes/class-s2-core.php:661
937
  msgid "HTML Full Preview"
938
  msgstr ""
939
 
940
+ #: classes/class-s2-core.php:1242
941
  msgid "Registered User"
942
  msgstr ""
943
 
944
+ #: classes/class-s2-core.php:1247
945
  msgid "Confirmed Public Subscriber"
946
  msgstr ""
947
 
948
+ #: classes/class-s2-core.php:1249
949
  msgid "Unconfirmed Public Subscriber"
950
  msgstr ""
951
 
952
+ #: classes/class-s2-core.php:1286
953
  msgid "Check here to Subscribe to email notifications for new posts"
954
  msgstr ""
955
 
956
+ #: classes/class-s2-core.php:1292
957
  msgid ""
958
  "By registering with this blog you are also agreeing to receive email "
959
  "notifications for new posts but you can unsubscribe at anytime"
960
  msgstr ""
961
 
962
+ #: classes/class-s2-core.php:1318
963
  msgid "Check here to Subscribe to notifications for new posts"
964
  msgstr ""
965
 
966
+ #: classes/class-s2-core.php:1408
967
  msgid "Weekly"
968
  msgstr ""
969
 
970
+ #: classes/class-s2-core.php:1542 classes/class-s2-core.php:1543
971
  msgid "Author"
972
  msgstr ""
973
 
974
+ #: classes/class-s2-core.php:1549
975
  msgid "Posted on"
976
  msgstr ""
977
 
978
+ #: classes/class-s2-core.php:1565 classes/class-s2-core.php:1566
979
  msgid "Posted in"
980
  msgstr ""
981
 
982
+ #: classes/class-s2-core.php:1571 classes/class-s2-core.php:1572
983
  msgid "Tagged as"
984
  msgstr ""
985
 
986
+ #: classes/class-s2-core.php:1638
987
  msgid "Digest Email"
988
  msgstr ""
989
 
990
+ #: classes/class-s2-core.php:1648
991
  msgid "Digest Preview"
992
  msgstr ""
993
 
994
+ #: classes/class-s2-frontend.php:54
995
  msgid "Enter email address..."
996
  msgstr ""
997
 
998
+ #: classes/class-s2-frontend.php:59 classes/class-s2-frontend.php:61
999
  msgid "Your email:"
1000
  msgstr ""
1001
 
1002
+ #: classes/class-s2-frontend.php:169
1003
  msgid "Subscription Confirmation"
1004
  msgstr ""
1005
 
1006
+ #: classes/class-s2-frontend.php:171
1007
  msgid "Unsubscription Confirmation"
1008
  msgstr ""
1009
 
1010
+ #: classes/class-s2-frontend.php:210
1011
  msgid "New Subscription"
1012
  msgstr ""
1013
 
1014
+ #: classes/class-s2-frontend.php:212
1015
  msgid "subscribed to email notifications!"
1016
  msgstr ""
1017
 
1018
+ #: classes/class-s2-frontend.php:233
1019
  msgid "New Unsubscription"
1020
  msgstr ""
1021
 
1022
+ #: classes/class-s2-frontend.php:235
1023
  msgid "unsubscribed from email notifications!"
1024
  msgstr ""
1025
 
1026
+ #: classes/class-s2-frontend.php:261
1027
  msgid "[Un]Subscribe to Posts"
1028
  msgstr ""
1029
 
1030
+ #: classes/class-s2-frontend.php:291 classes/class-s2-frontend.php:293
1031
  msgid "Subscribe to this blog"
1032
  msgstr ""
1033
 
uninstall.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- if( !defined('ABSPATH') && !defined('WP_UNINSTALL_PLUGIN') ) {
3
  // Make sure not to call this file directly
4
  exit();
5
  } else {
1
  <?php
2
+ if ( !defined('ABSPATH') && !defined('WP_UNINSTALL_PLUGIN') ) {
3
  // Make sure not to call this file directly
4
  exit();
5
  } else {