Version Description
Download this release
Release Info
Developer | MattyRob |
Plugin | Subscribe2 |
Version | 9.0 |
Comparing to | |
See all releases |
Code changes from version 8.9.1 to 9.0
- ChangeLog.txt +35 -0
- ReadMe.txt +55 -41
- admin/send_email.php +52 -7
- admin/settings.php +29 -6
- admin/subscribers.php +40 -13
- classes/class-s2-admin.php +206 -37
- classes/class-s2-core.php +67 -96
- classes/class-s2-frontend.php +61 -14
- classes/class-s2-list-table.php +249 -230
- classes/class-s2-upgrade.php +341 -341
- include/counterwidget.php +1 -1
- include/options.php +1 -1
- include/s2_button.js +2 -2
- include/s2_button.min.js +1 -1
- include/s2_button2.js +0 -2
- include/s2_button2.min.js +0 -1
- include/s2_checkbox.js +5 -22
- include/s2_checkbox.min.js +1 -1
- include/s2_colorpicker.js +21 -40
- include/s2_colorpicker.min.js +1 -1
- include/s2_date_time.js +6 -0
- include/s2_date_time.min.js +1 -0
- include/s2_edit.js +22 -1
- include/s2_edit.min.js +1 -1
- include/s2_user_admin.css +68 -68
- include/widget.php +12 -3
- subscribe2.php +6 -5
- subscribe2.pot +486 -283
- uninstall.php +49 -49
ChangeLog.txt
CHANGED
@@ -1,3 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
= Version 8.9.1 by Matthew Robinson =
|
2 |
|
3 |
* Check for the existence of the mb_encode_mimeheader function before use as it's optional in PHP builds - thanks to derekmacewen
|
@@ -13,6 +47,7 @@
|
|
13 |
* Fix internationalisation of subscribers list table - thanks to Milan Dinić
|
14 |
* Use mb_encode_mimeheader on email sender name - thanks to xl32
|
15 |
* Trim email addresses before sanitising them - thanks to byarts
|
|
|
16 |
|
17 |
= Version 8.8 by Matthew Robinson =
|
18 |
|
1 |
+
= Version 9.0 by Matthew Robinson =
|
2 |
+
|
3 |
+
* Added capability to send emails with attachments from Send Email page
|
4 |
+
* Added feature that removes unconfirmed public subscribers after 28 days (time frame can be altered with a filter)
|
5 |
+
* Added ability to bulk delete Registered Users/Subscribers
|
6 |
+
* Use {IMAGE} tag in HTML excerpt emails and digests only, images would be stripped in plain text and included anyway in full content HTML - applies to Subscribe2 HTML only
|
7 |
+
* Added help tabs on the plugins admin pages
|
8 |
+
* Improved the comparison of barred domains to subscribing email addresses - thanks to SashainSydney
|
9 |
+
* Added Text Domain to the plugin header to allow information on plugin page to translate - thanks to qwertysimo
|
10 |
+
* Applied a fix to ensure translation of all strings - thanks to qwertysimo
|
11 |
+
* Improved some strings to use sprintf() - thanks to Tom Adams (tomdxw)
|
12 |
+
* Use jQuery.noConflict(); when AJAX is enabled
|
13 |
+
* Removed excess span tag from the Counter Widget - thanks to dimagsv
|
14 |
+
* Allow filtering of admin email address for the emails sent when users confirm a subscription or unsubscription - suggested by 3cstudio
|
15 |
+
* Fixed default email notification subject text - thanks to Steve C @ 3Cstudio
|
16 |
+
* Fixed ability to have translation files in WP_LANG folder
|
17 |
+
* Fixed an issue with pagination of search results - thanks to sijpie
|
18 |
+
* Fixed 'Add Registered User' button in Subscribe2->Subscribers, Registered Tab - thanks to qwik3r
|
19 |
+
* Improved pages dropdown to an ordered and hierarchical display - thanks to xavierlh1
|
20 |
+
* Improved control over digest email scheduling - proposed by Jason Lemahieu
|
21 |
+
* Fixed Subscriber Dropdown counts for Compulsory categories
|
22 |
+
* Added a link to Tranlation files to the plugin page and the miscellaneous tab of the Subscribe2->Settings page - props eyephone21
|
23 |
+
* Added {KEYWORD} checking in the template to warn users of disallowed keywords - proposed by Jason Lemahieu
|
24 |
+
* Fixed some notices in the Send Email page - thanks to Bryan Hadaway (bhadaway)
|
25 |
+
* Added anti-spam measures to the sign up form - thanks to Bryan Hadaway (bhadaway)
|
26 |
+
* Update query_filter() function to hook into the 'request' filter instead of the deprecated 'query_filter'
|
27 |
+
* Added a default 'Select a page' option to the page dropdown to highlight the need to have a published page select
|
28 |
+
* Added filters to the subscription and unsubscription confirmation messages to allow personalisation - see FAQs for example functions
|
29 |
+
* Remove Simple Facebook Connect action during subscription and unsubscription confirmation to ensure user messages are displayed
|
30 |
+
* Improved white space stripping in the plaintext full content email
|
31 |
+
* Fixed a PHP notice on the Subscribe2->Subscribers page - thanks to emile.swain
|
32 |
+
* Fixes the non-working 'check all' boxes in WordPress 3.6 and above
|
33 |
+
* NOTE Version 9.0 needs WordPress 3.3 or above
|
34 |
+
|
35 |
= Version 8.9.1 by Matthew Robinson =
|
36 |
|
37 |
* Check for the existence of the mb_encode_mimeheader function before use as it's optional in PHP builds - thanks to derekmacewen
|
47 |
* Fix internationalisation of subscribers list table - thanks to Milan Dinić
|
48 |
* Use mb_encode_mimeheader on email sender name - thanks to xl32
|
49 |
* Trim email addresses before sanitising them - thanks to byarts
|
50 |
+
* Optimised the upgrade() function for large sites
|
51 |
|
52 |
= Version 8.8 by Matthew Robinson =
|
53 |
|
ReadMe.txt
CHANGED
@@ -1,16 +1,15 @@
|
|
1 |
=== Subscribe2 ===
|
2 |
-
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.
|
6 |
-
Tested up to: 3.
|
7 |
-
Stable tag:
|
8 |
License: GPL3
|
9 |
|
10 |
Sends a list of subscribers an email notification when new posts are published to your blog
|
11 |
|
12 |
== Description ==
|
13 |
-
|
14 |
Subscribe2 provides a comprehensive subscription management and email notification system for WordPress blogs that sends email notifications to a list of subscribers when you publish new content to your blog.
|
15 |
|
16 |
Email Notifications can be sent on a per-post basis or periodically in a Digest email. Additionally, certain categories can be excluded from inclusion in the notification and posts can be excluded on an individual basis by setting a custom field.
|
@@ -27,7 +26,6 @@ The format of the email can also be customised for per-post notifications, Subsc
|
|
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 |
-
|
31 |
AUTOMATIC INSTALLATION
|
32 |
|
33 |
1. Log in to your WordPress blog and visit Plugins->Add New.
|
@@ -53,9 +51,7 @@ This token will automatically be replaced by dynamic subscription information an
|
|
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 |
|
55 |
== Frequently Asked Questions ==
|
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? =
|
@@ -65,12 +61,15 @@ Next you could search in the [WordPress forums](http://wordpress.org/support/),
|
|
65 |
|
66 |
If you can't find an answer then post a new topic at the [WordPress forums](http://wordpress.org/support/) or make a [donation](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2387904) to get my attention!
|
67 |
|
68 |
-
= Where can I get
|
|
|
69 |
|
70 |
-
|
71 |
|
72 |
-
=
|
|
|
73 |
|
|
|
74 |
Subscribe2 sends an email at the very moment the post is published. Since Subscribe2 sends live mail with no un-do, it's important to use the Preview function in WordPress to make sure the post has been edited to perfection *before* moving it from Draft to Published mode.
|
75 |
|
76 |
Mail is sent when a post is published - it will not be re-sent if you Update the post later. If you need to send a mailing a second time (e.g. during testing), switch the post to Draft mode, then re-publish it.
|
@@ -78,7 +77,6 @@ Mail is sent when a post is published - it will not be re-sent if you Update the
|
|
78 |
You can also manually send emails to groups of your subscribers using the Send Email page that the plugin creates in the WordPress administration area.
|
79 |
|
80 |
= Where can I find the HTML and CSS templates? =
|
81 |
-
|
82 |
While the template field in Settings | Subscribe2 does not display HTML by default, feel free to add HTML to it as needed. You can insert references to static images for use as banners, wrap sections of the template in divs or other elements, or do whatever you like.
|
83 |
|
84 |
There is no need to include HTML header data or body tags - just focus on the HTML content, in conjunction with the template tags documented on the settings page.
|
@@ -107,15 +105,13 @@ Batches will occur for each group of message as described above. A site like th
|
|
107 |
**Restrictions on the number of messages sent**. In order to combat spam many hosts are now implementing time based limitations. This means you are only allowed to send a certain number of messages per unit time, 500 per hour for example. Subscribe2 does not have a work around for this inbuilt but see the next question.
|
108 |
|
109 |
= My host has a limit of X emails per hour / day, can I limit the way Subscribe2 sends emails? =
|
110 |
-
|
111 |
This is the second most common question I get asked (the first being about emails not being sent which quote often ends up here anyway!). This is more commonly called 'throttling' or 'choking'. PHP is a scripting language and while it is technically possible to throttle emails using script it is not very efficient. It is much better in terms of speed and server overhead (CPU cycles and RAM) to throttle using a server side application.
|
112 |
|
113 |
In the first instance you should try to solve the problem by speaking to your hosting provider about changing the restrictions, move to a less restricting hosting package or change hosting providers.
|
114 |
|
115 |
-
If the above has not put you off then I spent some time writing a Mail Queue script for Subscribe2 that adds the mails to a database table and sends then in periodic batches. It is available, at a price, [here](http://
|
116 |
|
117 |
= My Digest emails fail to send, why? =
|
118 |
-
|
119 |
If you have already worked through all of the above email trouble shooting tips, and you are still not seeing your periodic digest emails send there may be an issue with the WordPress pseudo-cron functions on your server.
|
120 |
|
121 |
The pseudo-cron is WordPress is named after the cron jobs on servers. These are tasks that are run periodically to automate certain functions. In WordPress these tasks include checking for core and plugin updates, publishing scheduled posts and in the case of Subscribe2 sending the digest email. so, if the psuedo-cron is not working the email won't send.
|
@@ -123,7 +119,6 @@ The pseudo-cron is WordPress is named after the cron jobs on servers. These are
|
|
123 |
some reasons why your pseudo-cron may not be working are explained [here](http://wordpress.org/support/topic/296236#post-1175405). You can also try overcoming these by calling the wp-cron.php file directly and there are even [instructions](http://www.satollo.net/how-to-make-the-wordpress-cron-work) about how to set up a server cron job to do this periodically to restore WordPress pseudo-cron to a working state.
|
124 |
|
125 |
= I'd like to send the Digest email but on a different interval to the ones listed. Is this possible? =
|
126 |
-
|
127 |
Yes, this is possible, it just requires a little bit of code. Subscribe2 uses the intervals that are currently defined in WordPress (and by any plugins that create additional intervals), so all you need to do is add to the available intervals. Use code like this and simply change the interval time (in seconds) and description.
|
128 |
|
129 |
`function add_my_new_sched($sched) {
|
@@ -133,7 +128,6 @@ Yes, this is possible, it just requires a little bit of code. Subscribe2 uses th
|
|
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() {
|
@@ -149,21 +143,17 @@ Yes, this is possible, it just requires a little bit of code. Subscribe2 introdu
|
|
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 |
|
155 |
= Why do I need to create a WordPress Page =
|
156 |
-
|
157 |
Subscribe2 uses a filter system to display dynamic output to your readers. The token may result in the display of the subscription form, a subscription message, confirmation that an email has been sent, a prompt to log in. This information needs a static location for the output of the filter and a WordPress page is the ideal place for this to happen.
|
158 |
|
159 |
If you decide to use Subscribe2 only using the widget you must still have at least one WordPress page on your site for Subscribe2 to work correctly.
|
160 |
|
161 |
= Why is my admin address getting emails from Subscribe2? =
|
162 |
-
|
163 |
This plugin sends emails to your subscribers using the BCC (Blind Carbon Copy) header in email messages. Each email is sent TO: the admin address. There may be emails for a plain text excerpt notification, plain text full text and HTML format emails and additionally if the number of recipients per email has been set due to hosting restrictions duplicate copies of these emails will be sent to the admin address.
|
164 |
|
165 |
= I can't find my subscribers / the options / something else =
|
166 |
-
|
167 |
Subscribe2 creates four (4) new admin menus in the back end of WordPress. These are all under the top level menu header **Subscribe2**.
|
168 |
|
169 |
* Your Subscriptions : Allows the currently logged in user to manage their own subscriptions
|
@@ -174,7 +164,6 @@ Subscribe2 creates four (4) new admin menus in the back end of WordPress. These
|
|
174 |
**Note:** In versions of the plugin prior to version 7.0 the menus are under the WordPress system at Posts -> Mail Subscribers, Tools -> Subscribers, Users -> Subscriptions and Settings -> Subscribe2.
|
175 |
|
176 |
= I'm confused, what are all the different types of subscriber? =
|
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.
|
@@ -184,15 +173,12 @@ Registered Users have registered with your WordPress blog (provided you have ena
|
|
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 |
-
|
188 |
The simple answer is yes you can but this is not supported so you need to figure out any problems that are caused by doing this on your own. Read <a href="http://subscribe2.wordpress.com/2006/09/19/sidebar-without-a-widget/">here</a> for the basic approach.
|
189 |
|
190 |
= I'd like to be able to collect more information from users when they subscribe, can I? =
|
191 |
-
|
192 |
Get them to register with your blog rather than using the Subscribe2 form. Additional fields would require much more intensive form processing, checking and entry into the database and since you won't then be able to easily use this information to personalise emails there really isn't any point in collecting this data.
|
193 |
|
194 |
= How do I use the Subscribe2 shortcode? =
|
195 |
-
|
196 |
In version 6.1 of Subscribe2 the new standard WordPress shortcode [subscribe2] was introduced. By default, it behaves same as old Subscribe2 token, `<--subscribe2-->`, which means that it will show the same Subscribe2 output in your chosen page in WordPress or in the Widget.
|
197 |
|
198 |
But it also has advanced options, which are related to form. The default form contains two buttons for subscribing and unsubscribing. You may, for example, only want form that handles unsubscribing, so the shortcode accepts a **hide** parameter to hide one of the buttons.
|
@@ -208,21 +194,26 @@ There are many scenarios in which to use new options, but here is an example:
|
|
208 |
* In the Subscribe2 email template for new post, add text "You can unsubscribe on a following page:" which is followed with link to "Unsubscribe" page
|
209 |
|
210 |
= I can't find or insert the Subscribe2 token or shortcode, help! =
|
211 |
-
|
212 |
If, for some reason the Subscribe2 button does not appear in your browser window try refreshing your browser and cache (Shift and Reload in Firefox). If this still fails then insert the token manually. In the Rich Text Editor (TinyMCE) make sure you switch to the "code" view and type in [subscribe2] or <!--subscribe2-->.
|
213 |
|
214 |
= My digest email didn't send, how can I resend it? =
|
|
|
215 |
|
216 |
-
In
|
217 |
-
|
218 |
-
If you opt for the latter way look in the options table for the subscribe2_options settings (it's an array) and you'll need to change the 'last_s2cron' value to a timestamp for last week. Then force the cron event to run again with [WP-Crontrol](http://wordpress.org/extend/plugins/wp-crontrol/).
|
219 |
|
220 |
= I would really like Registered users to have the Subscription page themed like my site, is this possible? =
|
|
|
221 |
|
222 |
-
|
|
|
223 |
|
224 |
-
|
|
|
|
|
|
|
|
|
225 |
|
|
|
226 |
In a plugin file for your site or perhaps functions.php in your theme add the following code where 'my_post_type' is change to the name of your custom post type.
|
227 |
|
228 |
`function my_post_types($types) {
|
@@ -232,7 +223,6 @@ In a plugin file for your site or perhaps functions.php in your theme add the fo
|
|
232 |
add_filter('s2_post_types', 'my_post_types');`
|
233 |
|
234 |
= How can I make use of the support for Custom Taxonomies =
|
235 |
-
|
236 |
In a plugin file for your site or perhaps functions.php in your theme add the following code where 'my_
|
237 |
taxonomy_type' is change to the name of your custom taxonomy type.
|
238 |
|
@@ -242,8 +232,22 @@ taxonomy_type' is change to the name of your custom taxonomy type.
|
|
242 |
}
|
243 |
add_filter('s2_taxonomies', 'my_taxonomy_types');`
|
244 |
|
245 |
-
=
|
|
|
246 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
247 |
The first thing you will need to do is visit the options page and enable the AJAX setting where it says "Enable AJAX style subscription form?", this will load the necessary javascript onto your WordPress site.
|
248 |
|
249 |
Next you need to decide if you want the link to be on a WordPress page or in your Sidebar with the Widget.
|
@@ -266,7 +270,6 @@ Well, you need to write a little code and provide a link to the Google API or Mi
|
|
266 |
add_filter('s2_jqueryui_css', 'custom_ajax_css');`
|
267 |
|
268 |
= I want to change the kinds of users who can access the Subscribe2 menus. Is that possible? =
|
269 |
-
|
270 |
Yes, it is possible with a little bit for code either in a custom plugin or your functions.php file in your theme. You use the add_filter() command that is part of WordPress to change the [capability](http://codex.wordpress.org/Roles_and_Capabilities#Capabilities) that allows access to each of the Subscribe2 menus.
|
271 |
|
272 |
`function s2_admin_changes( $capability, $menu ) {
|
@@ -288,8 +291,25 @@ Yes, it is possible with a little bit for code either in a custom plugin or your
|
|
288 |
|
289 |
add_filter('s2_capability', 's2_admin_changes', 10, 2);`
|
290 |
|
291 |
-
= I want to change the
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
292 |
|
|
|
293 |
You can change the email subject with the 's2_email_subject' filter. Something like this:
|
294 |
|
295 |
`function s2_subject_changes($subject) {
|
@@ -299,15 +319,12 @@ You can change the email subject with the 's2_email_subject' filter. Something l
|
|
299 |
add_filter('s2_email_subject', 's2_subject_changes');`
|
300 |
|
301 |
= Can I suggest you add X as a feature =
|
302 |
-
|
303 |
I'm open to suggestions but since the software is written by me for use on my site and then shared for free because others may find it useful as it comes don't expect your suggestion to be implemented unless I'll find it useful.
|
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 |
-
|
311 |
WordPress 3.1 and up requires Subscribe2 from the 7.x or 8.x stable branch. The most recent version is hosted via [Wordpress.org](http://wordpress.org/extend/plugins/subscribe2/).
|
312 |
|
313 |
WordPress 2.8 and up requires Subscribe2 from the 6.x stable branch. The most recent version is [6.5](http://downloads.wordpress.org/plugin/subscribe2.6.5.zip).
|
@@ -324,16 +341,13 @@ This is usually caused by one of two things. Firstly, it is possible that the fo
|
|
324 |
Secondly, make sure that the token ([subscribe2] or <!--subscribe2-->) is correctly entered in your page with a blank line above and below. The easiest way to do this is to deactivate the plugin, visit your WordPress page and view the source. The token should be contained in the source code of the page. If it is not there you either have not correctly entered the token or you have another plugin that is stripping the token from the page code.
|
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 |
See [ChangeLog.txt](http://plugins.svn.wordpress.org/subscribe2/trunk/ChangeLog.txt)
|
336 |
|
337 |
== Upgrade Notice ==
|
338 |
-
|
339 |
See Version History
|
1 |
=== Subscribe2 ===
|
2 |
+
Contributors: MattyRob, Skippy, RavanH, bhadaway
|
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.3
|
6 |
+
Tested up to: 3.6.1
|
7 |
+
Stable tag: 9.0
|
8 |
License: GPL3
|
9 |
|
10 |
Sends a list of subscribers an email notification when new posts are published to your blog
|
11 |
|
12 |
== Description ==
|
|
|
13 |
Subscribe2 provides a comprehensive subscription management and email notification system for WordPress blogs that sends email notifications to a list of subscribers when you publish new content to your blog.
|
14 |
|
15 |
Email Notifications can be sent on a per-post basis or periodically in a Digest email. Additionally, certain categories can be excluded from inclusion in the notification and posts can be excluded on an individual basis by setting a custom field.
|
26 |
If you want to send full content HTML emails to Public Subscribers too then upgrade to [Subscribe2 HTML](http://semperplugins.com/plugins/subscribe2-html/).
|
27 |
|
28 |
== Installation ==
|
|
|
29 |
AUTOMATIC INSTALLATION
|
30 |
|
31 |
1. Log in to your WordPress blog and visit Plugins->Add New.
|
51 |
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.
|
52 |
|
53 |
== Frequently Asked Questions ==
|
|
|
54 |
= I want HTML email to be the default email type =
|
|
|
55 |
You need to pay for the [Subscribe2 HTML version](http://semperplugins.com/plugins/subscribe2-html/).
|
56 |
|
57 |
= Where can I get help? =
|
61 |
|
62 |
If you can't find an answer then post a new topic at the [WordPress forums](http://wordpress.org/support/) or make a [donation](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2387904) to get my attention!
|
63 |
|
64 |
+
= Where can I get translation files for Subscribe2, and what do I do with them? =
|
65 |
+
All of the translation files I have been given are available at [http://plugins.trac.wordpress.org/browser/subscribe2/i18n/](http://plugins.trac.wordpress.org/browser/subscribe2/i18n/).
|
66 |
|
67 |
+
You need to download the *.mo file and place it on your server either in a folder called languages/ in the wp-content/plugins/subscribe2/ folder or you can place it in the subscribe2/ folder.
|
68 |
|
69 |
+
= What if there isn't a translation file for my language? =
|
70 |
+
If your language isn't list then you will need to make your own translation by use the *.pot file the is distributed with every release of the code. [This](http://codex.wordpress.org/Translating_WordPress) WordPress Codex page gives more background on how you make translation files.
|
71 |
|
72 |
+
= Sending post notifications or email with Subscribe2 =
|
73 |
Subscribe2 sends an email at the very moment the post is published. Since Subscribe2 sends live mail with no un-do, it's important to use the Preview function in WordPress to make sure the post has been edited to perfection *before* moving it from Draft to Published mode.
|
74 |
|
75 |
Mail is sent when a post is published - it will not be re-sent if you Update the post later. If you need to send a mailing a second time (e.g. during testing), switch the post to Draft mode, then re-publish it.
|
77 |
You can also manually send emails to groups of your subscribers using the Send Email page that the plugin creates in the WordPress administration area.
|
78 |
|
79 |
= Where can I find the HTML and CSS templates? =
|
|
|
80 |
While the template field in Settings | Subscribe2 does not display HTML by default, feel free to add HTML to it as needed. You can insert references to static images for use as banners, wrap sections of the template in divs or other elements, or do whatever you like.
|
81 |
|
82 |
There is no need to include HTML header data or body tags - just focus on the HTML content, in conjunction with the template tags documented on the settings page.
|
105 |
**Restrictions on the number of messages sent**. In order to combat spam many hosts are now implementing time based limitations. This means you are only allowed to send a certain number of messages per unit time, 500 per hour for example. Subscribe2 does not have a work around for this inbuilt but see the next question.
|
106 |
|
107 |
= My host has a limit of X emails per hour / day, can I limit the way Subscribe2 sends emails? =
|
|
|
108 |
This is the second most common question I get asked (the first being about emails not being sent which quote often ends up here anyway!). This is more commonly called 'throttling' or 'choking'. PHP is a scripting language and while it is technically possible to throttle emails using script it is not very efficient. It is much better in terms of speed and server overhead (CPU cycles and RAM) to throttle using a server side application.
|
109 |
|
110 |
In the first instance you should try to solve the problem by speaking to your hosting provider about changing the restrictions, move to a less restricting hosting package or change hosting providers.
|
111 |
|
112 |
+
If the above has not put you off then I spent some time writing a Mail Queue script for Subscribe2 that adds the mails to a database table and sends then in periodic batches. It is available, at a price, [here](http://semperplugins.com/plugins/wordpress-mail-queue-wpmq/).
|
113 |
|
114 |
= My Digest emails fail to send, why? =
|
|
|
115 |
If you have already worked through all of the above email trouble shooting tips, and you are still not seeing your periodic digest emails send there may be an issue with the WordPress pseudo-cron functions on your server.
|
116 |
|
117 |
The pseudo-cron is WordPress is named after the cron jobs on servers. These are tasks that are run periodically to automate certain functions. In WordPress these tasks include checking for core and plugin updates, publishing scheduled posts and in the case of Subscribe2 sending the digest email. so, if the psuedo-cron is not working the email won't send.
|
119 |
some reasons why your pseudo-cron may not be working are explained [here](http://wordpress.org/support/topic/296236#post-1175405). You can also try overcoming these by calling the wp-cron.php file directly and there are even [instructions](http://www.satollo.net/how-to-make-the-wordpress-cron-work) about how to set up a server cron job to do this periodically to restore WordPress pseudo-cron to a working state.
|
120 |
|
121 |
= I'd like to send the Digest email but on a different interval to the ones listed. Is this possible? =
|
|
|
122 |
Yes, this is possible, it just requires a little bit of code. Subscribe2 uses the intervals that are currently defined in WordPress (and by any plugins that create additional intervals), so all you need to do is add to the available intervals. Use code like this and simply change the interval time (in seconds) and description.
|
123 |
|
124 |
`function add_my_new_sched($sched) {
|
128 |
add_filter('cron_schedules', 'add_my_new_sched');`
|
129 |
|
130 |
= 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? =
|
|
|
131 |
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.
|
132 |
|
133 |
`function my_s2_image_size() {
|
143 |
add_filter('s2_image_size', 'my_s2_image_size');`
|
144 |
|
145 |
= When I click on Send Preview in Susbcribe2->Settings I get 4 emails, why =
|
|
|
146 |
Subscribe2 supports 4 potential email formats for Susbcribers so you will get a preview for each of the different possibilities.
|
147 |
|
148 |
= Why do I need to create a WordPress Page =
|
|
|
149 |
Subscribe2 uses a filter system to display dynamic output to your readers. The token may result in the display of the subscription form, a subscription message, confirmation that an email has been sent, a prompt to log in. This information needs a static location for the output of the filter and a WordPress page is the ideal place for this to happen.
|
150 |
|
151 |
If you decide to use Subscribe2 only using the widget you must still have at least one WordPress page on your site for Subscribe2 to work correctly.
|
152 |
|
153 |
= Why is my admin address getting emails from Subscribe2? =
|
|
|
154 |
This plugin sends emails to your subscribers using the BCC (Blind Carbon Copy) header in email messages. Each email is sent TO: the admin address. There may be emails for a plain text excerpt notification, plain text full text and HTML format emails and additionally if the number of recipients per email has been set due to hosting restrictions duplicate copies of these emails will be sent to the admin address.
|
155 |
|
156 |
= I can't find my subscribers / the options / something else =
|
|
|
157 |
Subscribe2 creates four (4) new admin menus in the back end of WordPress. These are all under the top level menu header **Subscribe2**.
|
158 |
|
159 |
* Your Subscriptions : Allows the currently logged in user to manage their own subscriptions
|
164 |
**Note:** In versions of the plugin prior to version 7.0 the menus are under the WordPress system at Posts -> Mail Subscribers, Tools -> Subscribers, Users -> Subscriptions and Settings -> Subscribe2.
|
165 |
|
166 |
= I'm confused, what are all the different types of subscriber? =
|
|
|
167 |
There are basically only 2 types of subscriber. Public Subscribers and Registered Subscribers.
|
168 |
|
169 |
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.
|
173 |
**Note** You can send HTML emails to Public Subscribers with the paid [Subscribe2 HTML version](http://semperplugins.com/plugins/subscribe2-html/) of the plugin.
|
174 |
|
175 |
= Can I put the form elsewhere? (header, footer, sidebar without the widget) =
|
|
|
176 |
The simple answer is yes you can but this is not supported so you need to figure out any problems that are caused by doing this on your own. Read <a href="http://subscribe2.wordpress.com/2006/09/19/sidebar-without-a-widget/">here</a> for the basic approach.
|
177 |
|
178 |
= I'd like to be able to collect more information from users when they subscribe, can I? =
|
|
|
179 |
Get them to register with your blog rather than using the Subscribe2 form. Additional fields would require much more intensive form processing, checking and entry into the database and since you won't then be able to easily use this information to personalise emails there really isn't any point in collecting this data.
|
180 |
|
181 |
= How do I use the Subscribe2 shortcode? =
|
|
|
182 |
In version 6.1 of Subscribe2 the new standard WordPress shortcode [subscribe2] was introduced. By default, it behaves same as old Subscribe2 token, `<--subscribe2-->`, which means that it will show the same Subscribe2 output in your chosen page in WordPress or in the Widget.
|
183 |
|
184 |
But it also has advanced options, which are related to form. The default form contains two buttons for subscribing and unsubscribing. You may, for example, only want form that handles unsubscribing, so the shortcode accepts a **hide** parameter to hide one of the buttons.
|
194 |
* In the Subscribe2 email template for new post, add text "You can unsubscribe on a following page:" which is followed with link to "Unsubscribe" page
|
195 |
|
196 |
= I can't find or insert the Subscribe2 token or shortcode, help! =
|
|
|
197 |
If, for some reason the Subscribe2 button does not appear in your browser window try refreshing your browser and cache (Shift and Reload in Firefox). If this still fails then insert the token manually. In the Rich Text Editor (TinyMCE) make sure you switch to the "code" view and type in [subscribe2] or <!--subscribe2-->.
|
198 |
|
199 |
= My digest email didn't send, how can I resend it? =
|
200 |
+
If for some reason you wish to resend the last digest email you should find a Resend Digest button on the Subscribe2->Settings page under the Email Settings tab. If the button is not there then you are either in per-post mode or there isn't a previous digest to re-send.
|
201 |
|
202 |
+
In per post mode, to resend edit the post you want to re-send and change the status to draft and save, then publish the post again.
|
|
|
|
|
203 |
|
204 |
= I would really like Registered users to have the Subscription page themed like my site, is this possible? =
|
205 |
+
Yes, it is. There is a small extension to Subscribe2 that delivers exactly this functionality. It is available from [Theme Tailors](http://stiofan.themetailors.com/store/products/tt-subscribe2-front-end-plugin/) for just $5.
|
206 |
|
207 |
+
= I'd like to change the length of the excerpt included in the email notification. Can I do that? =
|
208 |
+
Yes, you can. There is a filter in Subscribe2 that allow you to change from the default of approximately 55 words. An example of the filter code you need would look like this:
|
209 |
|
210 |
+
`function my_excerpt() {
|
211 |
+
// return whatever number of words you want the excerpt length to be
|
212 |
+
return 30;
|
213 |
+
}
|
214 |
+
add_filter('s2_excerpt_length', 'my_excerpt');`
|
215 |
|
216 |
+
= How do I make use of the support for Custom Post Types =
|
217 |
In a plugin file for your site or perhaps functions.php in your theme add the following code where 'my_post_type' is change to the name of your custom post type.
|
218 |
|
219 |
`function my_post_types($types) {
|
223 |
add_filter('s2_post_types', 'my_post_types');`
|
224 |
|
225 |
= How can I make use of the support for Custom Taxonomies =
|
|
|
226 |
In a plugin file for your site or perhaps functions.php in your theme add the following code where 'my_
|
227 |
taxonomy_type' is change to the name of your custom taxonomy type.
|
228 |
|
232 |
}
|
233 |
add_filter('s2_taxonomies', 'my_taxonomy_types');`
|
234 |
|
235 |
+
= I want to personalise the message displayed when someone subscribes or unsubscribes, how do I do that? =
|
236 |
+
There is a filter for both of these in Subscribe2 from version 9.0 and upwards. To use it you need to create a little filter code plugin, an example is below:
|
237 |
|
238 |
+
`function subscribe_change($message) {
|
239 |
+
$message .= "<p>A warm welcome to our blog. We hope you enjoy our emails.</p>";
|
240 |
+
return $message;
|
241 |
+
}
|
242 |
+
add_filter('s2_subscribe_confirmed', 'subscribe_change');
|
243 |
+
|
244 |
+
function unsubscribe_change($message) {
|
245 |
+
$message .= "<p>We're sorry to see you leave, come back anytime.</p>";
|
246 |
+
return $message;
|
247 |
+
}
|
248 |
+
add_filter('s2_unsubscribe_confirmed', 'unsubscribe_change');`
|
249 |
+
|
250 |
+
= How do I make use of the new option to AJAXify the form? =
|
251 |
The first thing you will need to do is visit the options page and enable the AJAX setting where it says "Enable AJAX style subscription form?", this will load the necessary javascript onto your WordPress site.
|
252 |
|
253 |
Next you need to decide if you want the link to be on a WordPress page or in your Sidebar with the Widget.
|
270 |
add_filter('s2_jqueryui_css', 'custom_ajax_css');`
|
271 |
|
272 |
= I want to change the kinds of users who can access the Subscribe2 menus. Is that possible? =
|
|
|
273 |
Yes, it is possible with a little bit for code either in a custom plugin or your functions.php file in your theme. You use the add_filter() command that is part of WordPress to change the [capability](http://codex.wordpress.org/Roles_and_Capabilities#Capabilities) that allows access to each of the Subscribe2 menus.
|
274 |
|
275 |
`function s2_admin_changes( $capability, $menu ) {
|
291 |
|
292 |
add_filter('s2_capability', 's2_admin_changes', 10, 2);`
|
293 |
|
294 |
+
= I want to change the Administrator users that get notifications of new subscriptions and unsubscriptions, how do I do that? =
|
295 |
+
In Subscribe2->Settings you can turn off email notifications to Administrator level users when a Public Subscriber joins or leaves but what if you still want an email but to different people? Subscribe2 has a filter that allows you to add and remove users immediately before sending like this:
|
296 |
+
|
297 |
+
`function my_admin_filter($recipients = array(), $email) {
|
298 |
+
// $recipients is an array of admin email addresses
|
299 |
+
// $email will be 'subscribe' or 'unsubscribe'
|
300 |
+
if ($email == 'subscribe') {
|
301 |
+
foreach ($recipients as $key => $email) {
|
302 |
+
if ( $email == 'admin@mysite.com') {
|
303 |
+
unset($recipients[$key]);
|
304 |
+
}
|
305 |
+
}
|
306 |
+
$recipients[] = 'different.user@mysite.com';
|
307 |
+
}
|
308 |
+
return $recipients;
|
309 |
+
}
|
310 |
+
add_filter('s2_admin_email', 'my_admin_filter', 10, 2);`
|
311 |
|
312 |
+
= I want to change the email subject, how do I do that? =
|
313 |
You can change the email subject with the 's2_email_subject' filter. Something like this:
|
314 |
|
315 |
`function s2_subject_changes($subject) {
|
319 |
add_filter('s2_email_subject', 's2_subject_changes');`
|
320 |
|
321 |
= Can I suggest you add X as a feature =
|
|
|
322 |
I'm open to suggestions but since the software is written by me for use on my site and then shared for free because others may find it useful as it comes don't expect your suggestion to be implemented unless I'll find it useful.
|
323 |
|
324 |
= I'd like to be able to send my subscribers notifications in HTML =
|
|
|
325 |
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/).
|
326 |
|
327 |
= Which version should I be using, I'm on WordPress x.x.x? =
|
|
|
328 |
WordPress 3.1 and up requires Subscribe2 from the 7.x or 8.x stable branch. The most recent version is hosted via [Wordpress.org](http://wordpress.org/extend/plugins/subscribe2/).
|
329 |
|
330 |
WordPress 2.8 and up requires Subscribe2 from the 6.x stable branch. The most recent version is [6.5](http://downloads.wordpress.org/plugin/subscribe2.6.5.zip).
|
341 |
Secondly, make sure that the token ([subscribe2] or <!--subscribe2-->) is correctly entered in your page with a blank line above and below. The easiest way to do this is to deactivate the plugin, visit your WordPress page and view the source. The token should be contained in the source code of the page. If it is not there you either have not correctly entered the token or you have another plugin that is stripping the token from the page code.
|
342 |
|
343 |
== Screenshots ==
|
|
|
344 |
1. The Subscribe2->Mail Subscribers admin page generated by the plugin.
|
345 |
2. The Subscribe2->Subscribers admin page generated by the plugin.
|
346 |
3. The Subscribe2->Subscriptions admin page generated by the plugin.
|
347 |
4. The Subscribe2->Subscribe2 admin page generated by the plugin.
|
348 |
|
349 |
== Changelog ==
|
|
|
350 |
See [ChangeLog.txt](http://plugins.svn.wordpress.org/subscribe2/trunk/ChangeLog.txt)
|
351 |
|
352 |
== Upgrade Notice ==
|
|
|
353 |
See Version History
|
admin/send_email.php
CHANGED
@@ -40,18 +40,51 @@ if ( isset($_POST['s2_admin']) && 'mail' == $_POST['s2_admin'] ) {
|
|
40 |
global $user_email;
|
41 |
$recipients[] = $user_email;
|
42 |
}
|
43 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
if ( $status ) {
|
45 |
if ( isset($_POST['preview']) ) {
|
46 |
$message = "<p class=\"s2_message\">" . __('Preview message sent!', 'subscribe2') . "</p>";
|
47 |
} else {
|
48 |
$message = $this->mail_sent;
|
49 |
}
|
50 |
-
} elseif ( empty($body) ) {
|
51 |
-
$message = __('Your email was empty', 'subscribe2');
|
52 |
} else {
|
53 |
global $phpmailer;
|
54 |
-
$message = $this->mail_failed . $phpmailer->ErrorInfo;
|
55 |
}
|
56 |
echo "<div id=\"message\" class=\"updated\"><strong><p>" . $message . "</p></strong></div>\r\n";
|
57 |
}
|
@@ -60,7 +93,7 @@ if ( isset($_POST['s2_admin']) && 'mail' == $_POST['s2_admin'] ) {
|
|
60 |
echo "<div class=\"wrap\">";
|
61 |
echo "<div id=\"icon-edit\" class=\"icon32\"></div>";
|
62 |
echo "<h2>" . __('Send an email to subscribers', 'subscribe2') . "</h2>\r\n";
|
63 |
-
echo "<form method=\"post\">\r\n";
|
64 |
if ( function_exists('wp_nonce_field') ) {
|
65 |
wp_nonce_field('subscribe2-write_subscribers' . $s2nonce);
|
66 |
}
|
@@ -74,15 +107,27 @@ if ( !isset($_POST['content']) ) {
|
|
74 |
}
|
75 |
echo "<p>" . __('Subject', 'subscribe2') . ": <input type=\"text\" size=\"69\" name=\"subject\" value=\"" . $subject . "\" /> <br /><br />";
|
76 |
echo "<textarea rows=\"12\" cols=\"75\" name=\"content\">" . $body . "</textarea>";
|
|
|
|
|
77 |
echo "<br /><br />\r\n";
|
78 |
echo __('Recipients:', 'subscribe2') . " ";
|
79 |
$this->display_subscriber_dropdown('registered', false);
|
80 |
echo "<input type=\"hidden\" name=\"s2_admin\" value=\"mail\" />";
|
81 |
-
echo "</p>";
|
82 |
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>";
|
83 |
echo "</form></div>\r\n";
|
84 |
echo "<div style=\"clear: both;\"><p> </p></div>";
|
85 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
include(ABSPATH . 'wp-admin/admin-footer.php');
|
87 |
// just to be sure
|
88 |
die;
|
40 |
global $user_email;
|
41 |
$recipients[] = $user_email;
|
42 |
}
|
43 |
+
|
44 |
+
$uploads = array();
|
45 |
+
foreach ($_FILES['file']['name'] as $key => $value) {
|
46 |
+
if ( $_FILES['file']['error'][$key] === 0 ) {
|
47 |
+
$file = array(
|
48 |
+
'name' => $_FILES['file']['name'][$key],
|
49 |
+
'type' => $_FILES['file']['type'][$key],
|
50 |
+
'tmp_name' => $_FILES['file']['tmp_name'][$key],
|
51 |
+
'error' => $_FILES['file']['error'][$key],
|
52 |
+
'size' => $_FILES['file']['size'][$key]
|
53 |
+
);
|
54 |
+
$uploads[] = wp_handle_upload($file, array('test_form' => false));
|
55 |
+
}
|
56 |
+
}
|
57 |
+
$attachments = array();
|
58 |
+
if ( !empty($uploads) ) {
|
59 |
+
foreach ( $uploads as $upload ) {
|
60 |
+
if ( !isset($upload['error']) ) {
|
61 |
+
$attachments[] = $upload['file'];
|
62 |
+
} else {
|
63 |
+
$upload_error = $upload['error'];
|
64 |
+
}
|
65 |
+
}
|
66 |
+
}
|
67 |
+
|
68 |
+
if ( empty($body) ) {
|
69 |
+
$error_message = __('Your email was empty', 'subscribe2');
|
70 |
+
$status = false;
|
71 |
+
} elseif ( isset($upload_error) ) {
|
72 |
+
$error_message = $upload_error;
|
73 |
+
$status = false;
|
74 |
+
} else {
|
75 |
+
$status = $this->mail($recipients, $subject, $body, 'text', $attachments);
|
76 |
+
$error_message = __('Check your settings and check with your hosting provider', 'subscribe2');
|
77 |
+
}
|
78 |
+
|
79 |
if ( $status ) {
|
80 |
if ( isset($_POST['preview']) ) {
|
81 |
$message = "<p class=\"s2_message\">" . __('Preview message sent!', 'subscribe2') . "</p>";
|
82 |
} else {
|
83 |
$message = $this->mail_sent;
|
84 |
}
|
|
|
|
|
85 |
} else {
|
86 |
global $phpmailer;
|
87 |
+
$message = $this->mail_failed . $error_message . $phpmailer->ErrorInfo;
|
88 |
}
|
89 |
echo "<div id=\"message\" class=\"updated\"><strong><p>" . $message . "</p></strong></div>\r\n";
|
90 |
}
|
93 |
echo "<div class=\"wrap\">";
|
94 |
echo "<div id=\"icon-edit\" class=\"icon32\"></div>";
|
95 |
echo "<h2>" . __('Send an email to subscribers', 'subscribe2') . "</h2>\r\n";
|
96 |
+
echo "<form method=\"post\" enctype=\"multipart/form-data\">\r\n";
|
97 |
if ( function_exists('wp_nonce_field') ) {
|
98 |
wp_nonce_field('subscribe2-write_subscribers' . $s2nonce);
|
99 |
}
|
107 |
}
|
108 |
echo "<p>" . __('Subject', 'subscribe2') . ": <input type=\"text\" size=\"69\" name=\"subject\" value=\"" . $subject . "\" /> <br /><br />";
|
109 |
echo "<textarea rows=\"12\" cols=\"75\" name=\"content\">" . $body . "</textarea>";
|
110 |
+
echo "<br /><div id=\"upload_files\"><input type=\"file\" name=\"file[]\"></div>\r\n";
|
111 |
+
echo "<input type=\"button\" class=\"button-secondary\" name=\"addmore\" value=\"" . __('Add More Files', 'subscribe2') . "\" onClick=\"add_file_upload();\" />\r\n";
|
112 |
echo "<br /><br />\r\n";
|
113 |
echo __('Recipients:', 'subscribe2') . " ";
|
114 |
$this->display_subscriber_dropdown('registered', false);
|
115 |
echo "<input type=\"hidden\" name=\"s2_admin\" value=\"mail\" />";
|
|
|
116 |
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>";
|
117 |
echo "</form></div>\r\n";
|
118 |
echo "<div style=\"clear: both;\"><p> </p></div>";
|
119 |
+
?>
|
120 |
+
<script type="text/javascript">
|
121 |
+
//<![CDATA[
|
122 |
+
function add_file_upload() {
|
123 |
+
var div = document.getElementById('upload_files');
|
124 |
+
var field = div.getElementsByTagName('input')[0];
|
125 |
+
div.appendChild(document.createElement("br"));
|
126 |
+
div.appendChild(field.cloneNode(false));
|
127 |
+
}
|
128 |
+
//]]>
|
129 |
+
</script>
|
130 |
+
<?php
|
131 |
include(ABSPATH . 'wp-admin/admin-footer.php');
|
132 |
// just to be sure
|
133 |
die;
|
admin/settings.php
CHANGED
@@ -74,7 +74,10 @@ if ( isset( $_POST['s2_admin']) ) {
|
|
74 |
// send per-post or digest emails
|
75 |
$email_freq = $_POST['email_freq'];
|
76 |
$scheduled_time = wp_next_scheduled('s2_digest_cron');
|
77 |
-
|
|
|
|
|
|
|
78 |
$this->subscribe2_options['email_freq'] = $email_freq;
|
79 |
wp_clear_scheduled_hook('s2_digest_cron');
|
80 |
$scheds = (array)wp_get_schedules();
|
@@ -86,7 +89,11 @@ if ( isset( $_POST['s2_admin']) ) {
|
|
86 |
} else {
|
87 |
// if we are using digest schedule the event and prime last_cron as now
|
88 |
$time = time() + $interval;
|
89 |
-
$
|
|
|
|
|
|
|
|
|
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
|
@@ -117,6 +124,21 @@ if ( empty($id) ) {
|
|
117 |
echo "<div id=\"page_message\" class=\"error\"><p class=\"s2_error\"><strong>$this->no_page</strong></p></div>";
|
118 |
}
|
119 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
// send error message if sender email address is off-domain
|
121 |
if ( $this->subscribe2_options['sender'] == 'blogname' ) {
|
122 |
$sender = get_bloginfo('admin_email');
|
@@ -160,7 +182,7 @@ switch ($current_tab) {
|
|
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";
|
@@ -220,11 +242,11 @@ switch ($current_tab) {
|
|
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> ";
|
226 |
echo "<label><input type=\"radio\" name=\"cron_order\" value=\"asc\"" . checked($this->subscribe2_options['cron_order'], 'asc', false) . " /> ";
|
227 |
-
echo __('Ascending', 'subscribe2') . "</label
|
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\" /> ";
|
@@ -255,7 +277,7 @@ switch ($current_tab) {
|
|
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
|
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";
|
@@ -437,6 +459,7 @@ switch ($current_tab) {
|
|
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&hosted_button_id=2387904\">" . __('Make a donation via PayPal', 'subscribe2') . "</a>";
|
74 |
// send per-post or digest emails
|
75 |
$email_freq = $_POST['email_freq'];
|
76 |
$scheduled_time = wp_next_scheduled('s2_digest_cron');
|
77 |
+
$timestamp_offset = get_option('gmt_offset') * 60 * 60;
|
78 |
+
$crondate = (isset($_POST['crondate'])) ? $_POST['crondate'] : 0;
|
79 |
+
$crontime = (isset($_POST['crondate'])) ? $_POST['crontime'] : 0;
|
80 |
+
if ( $email_freq != $this->subscribe2_options['email_freq'] || $crondate != date_i18n(get_option('date_format'), $scheduled_time + $timestamp_offset) || $crontime != date('G', $scheduled_time + $timestamp_offset) ) {
|
81 |
$this->subscribe2_options['email_freq'] = $email_freq;
|
82 |
wp_clear_scheduled_hook('s2_digest_cron');
|
83 |
$scheds = (array)wp_get_schedules();
|
89 |
} else {
|
90 |
// if we are using digest schedule the event and prime last_cron as now
|
91 |
$time = time() + $interval;
|
92 |
+
$srttimestamp = strtotime($crondate) + ($crontime * 60 * 60);
|
93 |
+
if ( $srttimestamp === false || $srttimestamp === 0 ) {
|
94 |
+
$srttimestamp == time();
|
95 |
+
}
|
96 |
+
$timestamp = $srttimestamp - $timestamp_offset;
|
97 |
while ($timestamp < time()) {
|
98 |
// if we are trying to set the time in the past increment it forward
|
99 |
// by the interval period until it is in the future
|
124 |
echo "<div id=\"page_message\" class=\"error\"><p class=\"s2_error\"><strong>$this->no_page</strong></p></div>";
|
125 |
}
|
126 |
|
127 |
+
if ( $this->subscribe2_options['email_freq'] != 'never' ) {
|
128 |
+
$disallowed_keywords = array('{TITLE}', '{PERMALINK}', '{DATE}', '{TIME}', '{LINK}', '{ACTION}');
|
129 |
+
} else {
|
130 |
+
$disallowed_keywords = array('{POSTTIME}', '{TABLE}', '{TABLELINKS}', '{COUNT}', '{LINK}', '{ACTION}');
|
131 |
+
}
|
132 |
+
$disallowed = false;
|
133 |
+
foreach ( $disallowed_keywords as $disallowed_keyword ) {
|
134 |
+
if ( strstr($this->subscribe2_options['mailtext'], $disallowed_keyword) !== false ) {
|
135 |
+
$disallowed[] = $disallowed_keyword;
|
136 |
+
}
|
137 |
+
}
|
138 |
+
if ( $disallowed !== false ) {
|
139 |
+
echo "<div id=\"keyword_message\" class=\"error\"><p class=\"s2_error\"><strong>$this->disallowed_keywords</strong><br>" . implode($disallowed, ', ') . "</p></div>";
|
140 |
+
}
|
141 |
+
|
142 |
// send error message if sender email address is off-domain
|
143 |
if ( $this->subscribe2_options['sender'] == 'blogname' ) {
|
144 |
$sender = get_bloginfo('admin_email');
|
182 |
// settings for outgoing emails
|
183 |
echo "<div class=\"s2_admin\" id=\"s2_notification_settings\">\r\n";
|
184 |
echo "<p>\r\n";
|
185 |
+
echo __('Restrict the number of <strong>recipients per email</strong> to (0 for unlimited)', 'subscribe2') . ': ';
|
186 |
echo "<span id=\"s2bcclimit_1\"><span id=\"s2bcclimit\" style=\"background-color: #FFFBCC\">" . $this->subscribe2_options['bcclimit'] . "</span> ";
|
187 |
echo "<a href=\"#\" onclick=\"s2_show('bcclimit'); return false;\">" . __('Edit', 'subscribe2') . "</a></span>\n";
|
188 |
echo "<span id=\"s2bcclimit_2\">\r\n";
|
242 |
if ( function_exists('wp_schedule_event') ) {
|
243 |
echo __('Send Emails', 'subscribe2') . ": <br /><br />\r\n";
|
244 |
$this->display_digest_choices();
|
245 |
+
echo "<p>" . __('For digest notifications, date order for posts is', 'subscribe2') . ": \r\n";
|
246 |
echo "<label><input type=\"radio\" name=\"cron_order\" value=\"desc\"" . checked($this->subscribe2_options['cron_order'], 'desc', false) . " /> ";
|
247 |
echo __('Descending', 'subscribe2') . "</label> ";
|
248 |
echo "<label><input type=\"radio\" name=\"cron_order\" value=\"asc\"" . checked($this->subscribe2_options['cron_order'], 'asc', false) . " /> ";
|
249 |
+
echo __('Ascending', 'subscribe2') . "</label></p>\r\n";
|
250 |
}
|
251 |
echo __('Add Tracking Parameters to the Permalink', 'subscribe2') . ": ";
|
252 |
echo "<input type=\"text\" name=\"tracking\" value=\"" . stripslashes($this->subscribe2_options['tracking']) . "\" size=\"50\" /> ";
|
277 |
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";
|
278 |
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";
|
279 |
echo "<dt><b>{TABLE}</b></dt><dd>" . __("a list of post titles<br />(<i>for digest emails only</i>)", 'subscribe2') . "</dd>\r\n";
|
280 |
+
echo "<dt><b>{TABLELINKS}</b></dt><dd>" . __("a list of post titles followed by links to the articles<br />(<i>for digest emails only</i>)", 'subscribe2') . "</dd>\r\n";
|
281 |
echo "<dt><b>{PERMALINK}</b></dt><dd>" . __("the post's permalink<br />(<i>for per-post emails only</i>)", 'subscribe2') . "</dd>\r\n";
|
282 |
echo "<dt><b>{TINYLINK}</b></dt><dd>" . __("the post's permalink after conversion by TinyURL", 'subscribe2') . "</dd>\r\n";
|
283 |
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";
|
459 |
echo "</p>";
|
460 |
echo "<h3>" . __('Links', 'subscribe2') . "</h3>\r\n";
|
461 |
echo "<a href=\"http://wordpress.org/extend/plugins/subscribe2/\">" . __('Plugin Site', 'subscribe2') . "</a><br />";
|
462 |
+
echo "<a href='http://plugins.trac.wordpress.org/browser/subscribe2/i18n/'>" . __('Translation Files', 'subscribe2') . "</a><br />";
|
463 |
echo "<a href=\"http://wordpress.org/support/plugin/subscribe2\">" . __('Plugin Forum', 'subscribe2') . "</a><br />";
|
464 |
echo "<a href=\"http://subscribe2.wordpress.com/\">" . __('Plugin Blog', 'subscribe2') . "</a><br />";
|
465 |
echo "<a href=\"https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2387904\">" . __('Make a donation via PayPal', 'subscribe2') . "</a>";
|
admin/subscribers.php
CHANGED
@@ -5,6 +5,9 @@ if ( !function_exists('add_action') ) {
|
|
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');
|
@@ -37,12 +40,29 @@ if ( isset($_POST['s2_admin']) ) {
|
|
37 |
}
|
38 |
echo $message;
|
39 |
$_POST['what'] = 'confirmed';
|
40 |
-
} elseif ( $_POST['action'] === 'delete' || $_POST['action2'] === 'delete' ) {
|
41 |
-
|
42 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
}
|
44 |
-
|
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 ) {
|
@@ -67,8 +87,6 @@ if ( isset($_POST['s2_admin']) ) {
|
|
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();
|
@@ -120,13 +138,22 @@ if ( isset($_REQUEST['what']) ) {
|
|
120 |
}
|
121 |
}
|
122 |
|
123 |
-
if ( !empty($
|
124 |
-
|
125 |
-
|
126 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
127 |
}
|
|
|
128 |
}
|
129 |
-
$subscribers = $result;
|
130 |
}
|
131 |
|
132 |
if ( !class_exists('WP_List_Table') ) {
|
@@ -178,7 +205,7 @@ switch ($current_tab) {
|
|
178 |
case 'registered':
|
179 |
echo "<div class=\"s2_admin\" id=\"s2_add_subscribers\">\r\n";
|
180 |
echo "<h2>" . __('Add/Remove Subscribers', 'subscribe2') . "</h2>\r\n";
|
181 |
-
echo "<p class=\"submit\" style=\"border-top: none;\"><
|
182 |
|
183 |
echo "</div>\r\n";
|
184 |
|
5 |
|
6 |
global $wpdb, $subscribers, $what, $current_tab;
|
7 |
|
8 |
+
// detect or define which tab we are in
|
9 |
+
$current_tab = isset( $_GET['tab'] ) ? esc_attr($_GET['tab']) : 'public';
|
10 |
+
|
11 |
// was anything POSTed ?
|
12 |
if ( isset($_POST['s2_admin']) ) {
|
13 |
check_admin_referer('bulk-subscribers');
|
40 |
}
|
41 |
echo $message;
|
42 |
$_POST['what'] = 'confirmed';
|
43 |
+
} elseif ( (isset($_POST['action']) && $_POST['action'] === 'delete') || (isset($_POST['action2']) && $_POST['action2'] === 'delete') ) {
|
44 |
+
if ( $current_tab === 'public' ) {
|
45 |
+
foreach ( $_POST['subscriber'] as $address ) {
|
46 |
+
$this->delete($address);
|
47 |
+
}
|
48 |
+
echo "<div id=\"message\" class=\"updated fade\"><p><strong>" . __('Address(es) deleted!', 'subscribe2') . "</strong></p></div>";
|
49 |
+
} elseif ( $current_tab === 'registered' ) {
|
50 |
+
global $current_user;
|
51 |
+
$users_deleted_error = '';
|
52 |
+
$users_deleted = '';
|
53 |
+
foreach ( $_POST['subscriber'] as $address ) {
|
54 |
+
$user = get_user_by('email', $address);
|
55 |
+
if ( !current_user_can('delete_user', $user->ID) || $user->ID == $current_user->ID ) {
|
56 |
+
$users_deleted_error = __('Delete failed! You cannot delete some or all of these users', 'subscribe2') . "<br />";
|
57 |
+
continue;
|
58 |
+
} else {
|
59 |
+
$users_deleted = __('User(s) deleted! Any posts made by these users were assigned to you', 'subscribe2');
|
60 |
+
//wp_delete_user($user->$id, $current_user->ID);
|
61 |
+
}
|
62 |
+
}
|
63 |
+
echo "<div id=\"message\" class=\"updated fade\"><p><strong>" . $users_deleted_error . $users_deleted . "</strong></p></div>";
|
64 |
}
|
65 |
+
} elseif ( (isset($_POST['action']) && $_POST['action'] === 'toggle') || (isset($_POST['action2']) && $_POST['action2'] === 'toggle') ) {
|
|
|
66 |
global $current_user;
|
67 |
$this->ip = $current_user->user_login;
|
68 |
foreach ( $_POST['subscriber'] as $address ) {
|
87 |
}
|
88 |
}
|
89 |
|
|
|
|
|
90 |
if ( $current_tab == 'registered' ) {
|
91 |
// Get Registered Subscribers
|
92 |
$registered = $this->get_registered();
|
138 |
}
|
139 |
}
|
140 |
|
141 |
+
if ( !empty($_REQUEST['s']) ) {
|
142 |
+
if ( !empty($_POST['s']) ) {
|
143 |
+
foreach ( $subscribers as $subscriber ) {
|
144 |
+
if ( is_numeric(stripos($subscriber, $_POST['s'])) ) {
|
145 |
+
$result[] = $subscriber;
|
146 |
+
}
|
147 |
+
}
|
148 |
+
$subscribers = $result;
|
149 |
+
} else {
|
150 |
+
foreach ( $subscribers as $subscriber ) {
|
151 |
+
if ( is_numeric(stripos($subscriber, $_REQUEST['s'])) ) {
|
152 |
+
$result[] = $subscriber;
|
153 |
+
}
|
154 |
}
|
155 |
+
$subscribers = $result;
|
156 |
}
|
|
|
157 |
}
|
158 |
|
159 |
if ( !class_exists('WP_List_Table') ) {
|
205 |
case 'registered':
|
206 |
echo "<div class=\"s2_admin\" id=\"s2_add_subscribers\">\r\n";
|
207 |
echo "<h2>" . __('Add/Remove Subscribers', 'subscribe2') . "</h2>\r\n";
|
208 |
+
echo "<p class=\"submit\" style=\"border-top: none;\"><a class=\"button-primary\" href=\"" . admin_url() . "user-new.php\">" . __('Add Registered User', 'subscribe2') . "</a></p>\r\n";
|
209 |
|
210 |
echo "</div>\r\n";
|
211 |
|
classes/class-s2-admin.php
CHANGED
@@ -10,20 +10,120 @@ class s2_admin extends s2class {
|
|
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'));
|
12 |
add_action("admin_print_styles-$s2user", array(&$this, 'user_admin_css'));
|
|
|
13 |
|
14 |
$s2subscribers = add_submenu_page('s2', __('Subscribers', 'subscribe2'), __('Subscribers', 'subscribe2'), apply_filters('s2_capability', "manage_options", 'manage'), 's2_tools', array(&$this, 'subscribers_menu'));
|
15 |
add_action("admin_print_scripts-$s2subscribers", array(&$this, 'checkbox_form_js'));
|
|
|
16 |
|
17 |
$s2settings = add_submenu_page('s2', __('Settings', 'subscribe2'), __('Settings', 'subscribe2'), apply_filters('s2_capability', "manage_options", 'settings'), 's2_settings', array(&$this, 'settings_menu'));
|
18 |
add_action("admin_print_scripts-$s2settings", array(&$this, 'checkbox_form_js'));
|
19 |
add_action("admin_print_scripts-$s2settings", array(&$this, 'option_form_js'));
|
20 |
add_filter('plugin_row_meta', array(&$this, 'plugin_links'), 10, 2);
|
|
|
21 |
|
22 |
-
add_submenu_page('s2', __('Send Email', 'subscribe2'), __('Send Email', 'subscribe2'), apply_filters('s2_capability', "publish_posts", 'send'), 's2_posts', array(&$this, 'write_menu'));
|
|
|
23 |
|
24 |
$s2nonce = wp_hash('subscribe2');
|
25 |
} // end admin_menu()
|
26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
/**
|
28 |
Hook for Admin Drop Down Icons
|
29 |
*/
|
@@ -35,7 +135,7 @@ class s2_admin extends s2class {
|
|
35 |
Insert Javascript and CSS into admin_header
|
36 |
*/
|
37 |
function checkbox_form_js() {
|
38 |
-
wp_register_script('s2_checkbox', S2URL . 'include/s2_checkbox' . $this->script_debug . '.js', array('jquery'), '1.
|
39 |
wp_enqueue_script('s2_checkbox');
|
40 |
} //end checkbox_form_js()
|
41 |
|
@@ -47,6 +147,10 @@ class s2_admin extends s2class {
|
|
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 |
|
52 |
/**
|
@@ -55,6 +159,7 @@ class s2_admin extends s2class {
|
|
55 |
function plugin_links($links, $file) {
|
56 |
if ( $file == S2DIR.'subscribe2.php' ) {
|
57 |
$links[] = "<a href='admin.php?page=s2_settings'>" . __('Settings', 'subscribe2') . "</a>";
|
|
|
58 |
$links[] = "<a href='https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2387904'><b>" . __('Donate', 'subscribe2') . "</b></a>";
|
59 |
}
|
60 |
return $links;
|
@@ -102,12 +207,7 @@ class s2_admin extends s2class {
|
|
102 |
add_filter('mce_external_plugins', array(&$this, 'mce3_plugin'));
|
103 |
add_filter('mce_buttons', array(&$this, 'mce3_button'));
|
104 |
} else {
|
105 |
-
|
106 |
-
wp_enqueue_script('subscribe2_button', S2URL . 'include/s2_button' . $this->script_debug . '.js', array('quicktags'), '1.0' );
|
107 |
-
} else {
|
108 |
-
// use QTags.addButton for WordPress 3.3 and greater
|
109 |
-
wp_enqueue_script('subscribe2_button', S2URL . 'include/s2_button2' . $this->script_debug . '.js', array('quicktags'), '2.0' );
|
110 |
-
}
|
111 |
}
|
112 |
} // end button_init()
|
113 |
|
@@ -134,7 +234,7 @@ class s2_admin extends s2class {
|
|
134 |
if ( stripos($_SERVER['REQUEST_URI'], 'widgets.php' ) !== false ) {
|
135 |
wp_enqueue_style('farbtastic');
|
136 |
wp_enqueue_script('farbtastic');
|
137 |
-
wp_register_script('s2_colorpicker', S2URL . 'include/s2_colorpicker' . $this->script_debug . '.js', array('farbtastic'), '1.
|
138 |
wp_enqueue_script('s2_colorpicker');
|
139 |
}
|
140 |
} // end widget_s2_counter_css_and_js()
|
@@ -183,6 +283,42 @@ class s2_admin extends s2class {
|
|
183 |
} // end s2_meta_box_handler()
|
184 |
|
185 |
/* ===== WordPress menu helper functions ===== */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
186 |
/**
|
187 |
Display a table of categories with checkboxes
|
188 |
Optionally pre-select those categories specified
|
@@ -375,20 +511,29 @@ class s2_admin extends s2class {
|
|
375 |
$count['all_users'] = $wpdb->get_var("SELECT COUNT(ID) FROM $wpdb->users");
|
376 |
}
|
377 |
if ( $this->s2_mu ) {
|
378 |
-
$count['registered'] = $wpdb->get_var($wpdb->prepare("SELECT COUNT(meta_key) FROM $wpdb->usermeta WHERE meta_key='" . $wpdb->prefix . "capabilities' AND meta_key=%s", $this->get_usermeta_keyname('s2_subscribed')));
|
379 |
} else {
|
380 |
-
$count['registered'] = $wpdb->get_var($wpdb->prepare("SELECT COUNT(meta_key) FROM $wpdb->usermeta WHERE meta_key=%s", $this->get_usermeta_keyname('s2_subscribed')));
|
381 |
}
|
382 |
$count['all'] = ($count['confirmed'] + $count['unconfirmed'] + $count['all_users']);
|
383 |
// get subscribers to individual categories but only if we are using per-post notifications
|
384 |
if ( $this->subscribe2_options['email_freq'] == 'never' ) {
|
|
|
385 |
if ( $this->s2_mu ) {
|
386 |
foreach ( $all_cats as $cat ) {
|
387 |
-
|
|
|
|
|
|
|
|
|
388 |
}
|
389 |
} else {
|
390 |
foreach ( $all_cats as $cat ) {
|
391 |
-
|
|
|
|
|
|
|
|
|
392 |
}
|
393 |
}
|
394 |
}
|
@@ -484,26 +629,34 @@ class s2_admin extends s2class {
|
|
484 |
echo "<label><input type=\"radio\" name=\"email_freq\" value=\"" . $key . "\"" . checked($this->subscribe2_options['email_freq'], $key, false) . " />";
|
485 |
echo " " . $value['display'] . "</label><br />\r\n";
|
486 |
}
|
487 |
-
echo "<br />" . __('Send Digest Notification at UTC', 'subscribe2') . ": \r\n";
|
488 |
-
$hours = array('12am', '1am', '2am', '3am', '4am', '5am', '6am', '7am', '8am', '9am', '10am', '11am', '12pm', '1pm', '2pm', '3pm', '4pm', '5pm', '6pm', '7pm', '8pm', '9pm', '10pm', '11pm');
|
489 |
-
echo "<select name=\"hour\">\r\n";
|
490 |
-
foreach ( $hours as $key => $value ) {
|
491 |
-
echo "<option value=\"" . $key . "\"";
|
492 |
-
if ( !empty($scheduled_time) && $key == date('H', $scheduled_time) ) {
|
493 |
-
echo " selected=\"selected\"";
|
494 |
-
}
|
495 |
-
echo ">" . $value . "</option>\r\n";
|
496 |
-
}
|
497 |
-
echo "</select>\r\n";
|
498 |
-
echo "<strong><em style=\"color: red\">" . __('Chosen time will be scheduled to a future date in relation to the current UTC time', 'subscribe2') . "</em></strong>\r\n";
|
499 |
if ( $scheduled_time ) {
|
500 |
-
$
|
|
|
501 |
echo "<p>" . __('Current UTC time is', 'subscribe2') . ": \r\n";
|
502 |
-
echo "<strong>" . date_i18n($
|
503 |
echo "<p>" . __('Current blog time is', 'subscribe2') . ": \r\n";
|
504 |
-
echo "<strong>" . date_i18n($
|
505 |
echo "<p>" . __('Next email notification will be sent when your blog time is after', 'subscribe2') . ": \r\n";
|
506 |
-
echo "<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
507 |
if ( !empty($this->subscribe2_options['previous_s2cron']) ) {
|
508 |
echo "<p>" . __('Attempt to resend the last Digest Notification email', 'subscribe2') . ": ";
|
509 |
echo "<input type=\"submit\" class=\"button-secondary\" name=\"resend\" value=\"" . __('Resend Digest', 'subscribe2') . "\" /></p>\r\n";
|
@@ -517,19 +670,23 @@ class s2_admin extends s2class {
|
|
517 |
Create and display a dropdown list of pages
|
518 |
*/
|
519 |
function pages_dropdown($s2page) {
|
520 |
-
|
521 |
-
$sql = "SELECT ID, post_title FROM $wpdb->posts WHERE post_type='page' AND post_status='publish'";
|
522 |
-
$pages = $wpdb->get_results($sql);
|
523 |
-
|
524 |
if ( empty($pages) ) { return; }
|
525 |
|
526 |
-
$option = '';
|
527 |
foreach ( $pages as $page ) {
|
528 |
$option .= "<option value=\"" . $page->ID . "\"";
|
529 |
if ( $page->ID == $s2page ) {
|
530 |
$option .= " selected=\"selected\"";
|
531 |
}
|
532 |
-
$option .= ">"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
533 |
}
|
534 |
|
535 |
echo $option;
|
@@ -665,9 +822,21 @@ class s2_admin extends s2class {
|
|
665 |
*/
|
666 |
function new_category($new_category='') {
|
667 |
if ( 'no' == $this->subscribe2_options['show_autosub'] ) { return; }
|
668 |
-
|
669 |
-
if ( $this->subscribe2_options['email_freq'] != 'never' ) { return; }
|
670 |
global $wpdb;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
671 |
|
672 |
if ( 'yes' == $this->subscribe2_options['show_autosub'] ) {
|
673 |
if ( $this->s2_mu ) {
|
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'));
|
12 |
add_action("admin_print_styles-$s2user", array(&$this, 'user_admin_css'));
|
13 |
+
add_action('load-' . $s2user, array(&$this, 'user_help'));
|
14 |
|
15 |
$s2subscribers = add_submenu_page('s2', __('Subscribers', 'subscribe2'), __('Subscribers', 'subscribe2'), apply_filters('s2_capability', "manage_options", 'manage'), 's2_tools', array(&$this, 'subscribers_menu'));
|
16 |
add_action("admin_print_scripts-$s2subscribers", array(&$this, 'checkbox_form_js'));
|
17 |
+
add_action('load-' . $s2subscribers, array(&$this, 'subscribers_help'));
|
18 |
|
19 |
$s2settings = add_submenu_page('s2', __('Settings', 'subscribe2'), __('Settings', 'subscribe2'), apply_filters('s2_capability', "manage_options", 'settings'), 's2_settings', array(&$this, 'settings_menu'));
|
20 |
add_action("admin_print_scripts-$s2settings", array(&$this, 'checkbox_form_js'));
|
21 |
add_action("admin_print_scripts-$s2settings", array(&$this, 'option_form_js'));
|
22 |
add_filter('plugin_row_meta', array(&$this, 'plugin_links'), 10, 2);
|
23 |
+
add_action('load-' . $s2settings, array(&$this, 'settings_help'));
|
24 |
|
25 |
+
$s2mail = add_submenu_page('s2', __('Send Email', 'subscribe2'), __('Send Email', 'subscribe2'), apply_filters('s2_capability', "publish_posts", 'send'), 's2_posts', array(&$this, 'write_menu'));
|
26 |
+
add_action('load-' . $s2mail, array(&$this, 'mail_help'));
|
27 |
|
28 |
$s2nonce = wp_hash('subscribe2');
|
29 |
} // end admin_menu()
|
30 |
|
31 |
+
/**
|
32 |
+
Contextual Help
|
33 |
+
*/
|
34 |
+
function user_help() {
|
35 |
+
$screen = get_current_screen();
|
36 |
+
if ( $this->subscribe2_options['email_freq'] != 'never' ) {
|
37 |
+
$screen->add_help_tab(array(
|
38 |
+
'id' => 's2-user-help1',
|
39 |
+
'title' => __('Overview', 'subscribe2'),
|
40 |
+
'content' => '<p>' . __('From this page you can opt in or out of receiving a periodical digest style email of blog posts.', 'subscribe2') . '</p>'
|
41 |
+
));
|
42 |
+
} else {
|
43 |
+
$screen->add_help_tab(array(
|
44 |
+
'id' => 's2-user-help1',
|
45 |
+
'title' => __('Overview', 'subscribe2'),
|
46 |
+
'content' => '<p>' . __('From this page you can control your subscription preferences. Choose the email format you wish to receive, which categories you would like to receive notification for and depending on the site settings which authors you would like to read.', 'subscribe2') . '</p>'
|
47 |
+
));
|
48 |
+
}
|
49 |
+
} // end user_help()
|
50 |
+
|
51 |
+
function subscribers_help() {
|
52 |
+
$screen = get_current_screen();
|
53 |
+
$screen->add_help_tab(array(
|
54 |
+
'id' => 's2-subscribers-help1',
|
55 |
+
'title' => __('Overview', 'subscribe2'),
|
56 |
+
'content' => '<p>' . __('From this page you can manage your subscribers.', 'subscribe2') . '</p>'
|
57 |
+
));
|
58 |
+
$screen->add_help_tab(array(
|
59 |
+
'id' => 's2-subscribers-help2',
|
60 |
+
'title' => __('Public Subscribers', 'subscribe2'),
|
61 |
+
'content' => '<p>' . __('Public Subscribers are subscribers who have used the plugin form and only provided their email address.', 'subscribe2') . '</p><p>'. __('On this page public subscribers can be viewed, searched, deleted and also toggled between Confirmed and Unconfirmed status.', 'subscribe2') . '</p>'
|
62 |
+
));
|
63 |
+
$screen->add_help_tab(array(
|
64 |
+
'id' => 's2-subscribers-help3',
|
65 |
+
'title' => __('Registered Subscribers', 'subscribe2'),
|
66 |
+
'content' => '<p>' . __('Registered Subscribers are subscribers who have registered in WordPress and have a username and password.', 'subscribe2') .
|
67 |
+
'</p><p>'. __('Registered Subscribers have greater personal control over their subscription. They can change the format of the email and also select which categories and authors they want to receive notifications about.', 'subscribe2') .
|
68 |
+
'</p><p>'. __('On this page registered subscribers can be viewed and searched. User accounts can be deleted from here with any posts created by those users being assigned to the currently logged in user. Bulk changes can be applied to all user settings changing their subscription email format and categories.', 'subscribe2') . '</p>'
|
69 |
+
));
|
70 |
+
} // end subscribers_help()
|
71 |
+
|
72 |
+
function settings_help() {
|
73 |
+
$screen = get_current_screen();
|
74 |
+
$screen->add_help_tab(array(
|
75 |
+
'id' => 's2-settings-help1',
|
76 |
+
'title' => __('Overview', 'subscribe2'),
|
77 |
+
'content' => '<p>' . __('From this page you can adjust the Settings for Subscribe2.', 'subscribe2') . '</p>'
|
78 |
+
));
|
79 |
+
$screen->add_help_tab(array(
|
80 |
+
'id' => 's2-settings-help2',
|
81 |
+
'title' => __('Email Settings', 'subscribe2'),
|
82 |
+
'content' => '<p>' . __('This section allows you to specify settings that apply to the emails generated by the site.', 'subscribe2') .
|
83 |
+
'</p><p>'. __('Emails can be sent to individual subscribers by setting the number of recipients per email to 1. A setting greater than one will group recipients together and make use of the BCC emails header. A setting of 0 sends a single email with all subscribers in one large BCC group. A setting of 1 looks less like spam email to filters but takes longer to process.', 'subscribe2').
|
84 |
+
'</p><p>'. __('This section is also where the sender of the email on this page is chosen. You can choose Post Author or your Blogname but it is recommended to create a user account with an email address that really exists and shares the same domain name as your site (the bit after the @ should be the same as your sites web address) and then use this account.', 'subscribe2') .
|
85 |
+
'</p><p>'. __('This page also configures the frequency of emails. This can be at the time new posts are made (per post) or periodically with an excerpt of each post made (digest). Additionally the post types (pages, private, password protected) can also be configured here.', 'subscribe2') . '</p>'
|
86 |
+
));
|
87 |
+
$screen->add_help_tab(array(
|
88 |
+
'id' => 's2-settings-help3',
|
89 |
+
'title' => __('Templates', 'subscribe2'),
|
90 |
+
'content' => '<p>' . __('This section allows you to customise the content of your notification emails.', 'subscribe2') .
|
91 |
+
'</p><p>'. __('There are special {KEYWORDS} that are used by Subscribe2 to place content into the final email. The template also accept regular text and HTML as desired in the final emaisl.', 'subscribe2') .
|
92 |
+
'</p><p>'. __('The {KEYWORDS} are listed on the right of the templates, note that some are for per post emails only and some are for digest emails only. Make sure the correct keywords are used based upon the Email Settings.', 'subscribe2') . '</p>'
|
93 |
+
));
|
94 |
+
$screen->add_help_tab(array(
|
95 |
+
'id' => 's2-settings-help4',
|
96 |
+
'title' => __('Registered Users', 'subscribe2'),
|
97 |
+
'content' => '<p>' . __('This section allows settings that apply to Registered Subscribers to be configured.', 'subscribe2') .
|
98 |
+
'</p><p>'. __('Categories can be made compulsory so emails are always sent for posts in these categories. They can also be excludes so that emails are not generated. Excluded categories take precedence over Compulsory categories.', 'subscribe2') .
|
99 |
+
'</p><p>'. __('A set of default settings for new users can also be specified using the Auto Subscribe section. Settings specified here will be applied to any newly created user accounts while Subscribe2 is activated.', 'subscribe2') . '</p>'
|
100 |
+
));
|
101 |
+
$screen->add_help_tab(array(
|
102 |
+
'id' => 's2-settings-help5',
|
103 |
+
'title' => __('Appearance', 'subscribe2'),
|
104 |
+
'content' => '<p>' . __('This section allows you to enable several aspect of the plugin such as Widgets and editor buttons.', 'subscribe2') .
|
105 |
+
'</p><p>'. __('AJAX mode can be enabled that is intended to work with the shortcode link parameter so that a dialog opens in the centre of the browser rather then using the regular form.', 'subscribe2') .
|
106 |
+
'</p><p>'. __('The email over ride check box can be set to be automatically checked for every new post and page from here to, this may be useful if you will only want to send very occasional notifications for specific posts. You can then uncheck this box just before you publish your content.', 'subscribe2') . '</p>'
|
107 |
+
));
|
108 |
+
$screen->add_help_tab(array(
|
109 |
+
'id' => 's2-settings-help6',
|
110 |
+
'title' => __('Miscellaneous', 'subscribe2'),
|
111 |
+
'content' => '<p>' . __('This section contains a place to bar specified domains from becoming Public Subscribers and links to help and support pages.', 'subscribe2') .
|
112 |
+
'</p><p>'. __('In the paid Subscribe2 HTML version there is also a place here to enter a license code so that updates can be accessed automatically.', 'subscribe2') .
|
113 |
+
'</p>'
|
114 |
+
));
|
115 |
+
} // end settings_help()
|
116 |
+
|
117 |
+
function mail_help() {
|
118 |
+
$screen = get_current_screen();
|
119 |
+
$screen->add_help_tab(array(
|
120 |
+
'id' => 's2-send-mail-help1',
|
121 |
+
'title' => __('Overview', 'subscribe2'),
|
122 |
+
'content' => '<p>' . __('From this page you can send emails to the recipients in the group selected in the drop down.', 'subscribe2') .
|
123 |
+
'</p><p>' . __('<strong>Preview</strong> will send a preview of the email to the currently logged in user. <strong>Send</strong> will send the email to the recipient list.', 'subscribe2') . '</p>'
|
124 |
+
));
|
125 |
+
} // end send_email_help()
|
126 |
+
|
127 |
/**
|
128 |
Hook for Admin Drop Down Icons
|
129 |
*/
|
135 |
Insert Javascript and CSS into admin_header
|
136 |
*/
|
137 |
function checkbox_form_js() {
|
138 |
+
wp_register_script('s2_checkbox', S2URL . 'include/s2_checkbox' . $this->script_debug . '.js', array('jquery'), '1.3');
|
139 |
wp_enqueue_script('s2_checkbox');
|
140 |
} //end checkbox_form_js()
|
141 |
|
147 |
function option_form_js() {
|
148 |
wp_register_script('s2_edit', S2URL . 'include/s2_edit' . $this->script_debug . '.js', array('jquery'), '1.1');
|
149 |
wp_enqueue_script('s2_edit');
|
150 |
+
wp_enqueue_script('jquery-ui-datepicker');
|
151 |
+
wp_enqueue_style('jquery-style', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/themes/smoothness/jquery-ui.css');
|
152 |
+
wp_register_script('s2_date_time', S2URL . 'include/s2_date_time' . $this->script_debug . '.js', array('jquery-ui-datepicker'), '1.0');
|
153 |
+
wp_enqueue_script('s2_date_time');
|
154 |
} // end option_form_js()
|
155 |
|
156 |
/**
|
159 |
function plugin_links($links, $file) {
|
160 |
if ( $file == S2DIR.'subscribe2.php' ) {
|
161 |
$links[] = "<a href='admin.php?page=s2_settings'>" . __('Settings', 'subscribe2') . "</a>";
|
162 |
+
$links[] = "<a href='http://plugins.trac.wordpress.org/browser/subscribe2/i18n/'>" . __('Translation Files', 'subscribe2') . "</a>";
|
163 |
$links[] = "<a href='https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2387904'><b>" . __('Donate', 'subscribe2') . "</b></a>";
|
164 |
}
|
165 |
return $links;
|
207 |
add_filter('mce_external_plugins', array(&$this, 'mce3_plugin'));
|
208 |
add_filter('mce_buttons', array(&$this, 'mce3_button'));
|
209 |
} else {
|
210 |
+
wp_enqueue_script('subscribe2_button', S2URL . 'include/s2_button' . $this->script_debug . '.js', array('quicktags'), '2.0' );
|
|
|
|
|
|
|
|
|
|
|
211 |
}
|
212 |
} // end button_init()
|
213 |
|
234 |
if ( stripos($_SERVER['REQUEST_URI'], 'widgets.php' ) !== false ) {
|
235 |
wp_enqueue_style('farbtastic');
|
236 |
wp_enqueue_script('farbtastic');
|
237 |
+
wp_register_script('s2_colorpicker', S2URL . 'include/s2_colorpicker' . $this->script_debug . '.js', array('farbtastic'), '1.1'); //my js
|
238 |
wp_enqueue_script('s2_colorpicker');
|
239 |
}
|
240 |
} // end widget_s2_counter_css_and_js()
|
283 |
} // end s2_meta_box_handler()
|
284 |
|
285 |
/* ===== WordPress menu helper functions ===== */
|
286 |
+
/**
|
287 |
+
Collects the signup date for all public subscribers
|
288 |
+
*/
|
289 |
+
function signup_date($email = '') {
|
290 |
+
if ( '' == $email ) { return false; }
|
291 |
+
|
292 |
+
global $wpdb;
|
293 |
+
if ( !empty($this->signup_dates) ) {
|
294 |
+
return $this->signup_dates[$email];
|
295 |
+
} else {
|
296 |
+
$results = $wpdb->get_results("SELECT email, date FROM $this->public", ARRAY_N);
|
297 |
+
foreach ( $results as $result ) {
|
298 |
+
$this->signup_dates[$result[0]] = $result[1];
|
299 |
+
}
|
300 |
+
return $this->signup_dates[$email];
|
301 |
+
}
|
302 |
+
} // end signup_date()
|
303 |
+
|
304 |
+
/**
|
305 |
+
Collects the ip address for all public subscribers
|
306 |
+
*/
|
307 |
+
function signup_ip($email = '') {
|
308 |
+
if ( '' == $email ) {return false; }
|
309 |
+
|
310 |
+
global $wpdb;
|
311 |
+
if ( !empty($this->signup_ips) ) {
|
312 |
+
return $this->signup_ips[$email];
|
313 |
+
} else {
|
314 |
+
$results = $wpdb->get_results("SELECT email, ip FROM $this->public", ARRAY_N);
|
315 |
+
foreach ( $results as $result ) {
|
316 |
+
$this->signup_ips[$result[0]] = $result[1];
|
317 |
+
}
|
318 |
+
return $this->signup_ips[$email];
|
319 |
+
}
|
320 |
+
} // end signup_ip()
|
321 |
+
|
322 |
/**
|
323 |
Display a table of categories with checkboxes
|
324 |
Optionally pre-select those categories specified
|
511 |
$count['all_users'] = $wpdb->get_var("SELECT COUNT(ID) FROM $wpdb->users");
|
512 |
}
|
513 |
if ( $this->s2_mu ) {
|
514 |
+
$count['registered'] = $wpdb->get_var($wpdb->prepare("SELECT COUNT(b.meta_key) FROM $wpdb->usermeta AS a INNER JOIN $wpdb->usermeta AS b ON a.user_id = b.user_id WHERE a.meta_key='" . $wpdb->prefix . "capabilities' AND b.meta_key=%s AND b.meta_value <> ''", $this->get_usermeta_keyname('s2_subscribed')));
|
515 |
} else {
|
516 |
+
$count['registered'] = $wpdb->get_var($wpdb->prepare("SELECT COUNT(meta_key) FROM $wpdb->usermeta WHERE meta_key=%s AND meta_value <> ''", $this->get_usermeta_keyname('s2_subscribed')));
|
517 |
}
|
518 |
$count['all'] = ($count['confirmed'] + $count['unconfirmed'] + $count['all_users']);
|
519 |
// get subscribers to individual categories but only if we are using per-post notifications
|
520 |
if ( $this->subscribe2_options['email_freq'] == 'never' ) {
|
521 |
+
$compulsory = explode(',', $this->subscribe2_options['compulsory']);
|
522 |
if ( $this->s2_mu ) {
|
523 |
foreach ( $all_cats as $cat ) {
|
524 |
+
if ( in_array($cat->term_id, $compulsory) ) {
|
525 |
+
$count[$cat->name] = $count['all_users'];
|
526 |
+
} else {
|
527 |
+
$count[$cat->name] = $wpdb->get_var($wpdb->prepare("SELECT COUNT(a.meta_key) FROM $wpdb->usermeta AS a INNER JOIN $wpdb->usermeta AS b ON a.user_id = b.user_id WHERE a.meta_key='" . $wpdb->prefix . "capabilities' AND b.meta_key=%s", $this->get_usermeta_keyname('s2_cat') . $cat->term_id));
|
528 |
+
}
|
529 |
}
|
530 |
} else {
|
531 |
foreach ( $all_cats as $cat ) {
|
532 |
+
if ( in_array($cat->term_id, $compulsory) ) {
|
533 |
+
$count[$cat->name] = $count['all_users'];
|
534 |
+
} else {
|
535 |
+
$count[$cat->name] = $wpdb->get_var($wpdb->prepare("SELECT COUNT(meta_value) FROM $wpdb->usermeta WHERE meta_key=%s", $this->get_usermeta_keyname('s2_cat') . $cat->term_id));
|
536 |
+
}
|
537 |
}
|
538 |
}
|
539 |
}
|
629 |
echo "<label><input type=\"radio\" name=\"email_freq\" value=\"" . $key . "\"" . checked($this->subscribe2_options['email_freq'], $key, false) . " />";
|
630 |
echo " " . $value['display'] . "</label><br />\r\n";
|
631 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
632 |
if ( $scheduled_time ) {
|
633 |
+
$date_format = get_option('date_format');
|
634 |
+
$time_format = get_option('time_format');
|
635 |
echo "<p>" . __('Current UTC time is', 'subscribe2') . ": \r\n";
|
636 |
+
echo "<strong>" . date_i18n($date_format . " @ " . $time_format, false, 'gmt') . "</strong></p>\r\n";
|
637 |
echo "<p>" . __('Current blog time is', 'subscribe2') . ": \r\n";
|
638 |
+
echo "<strong>" . date_i18n($date_format . " @ " . $time_format) . "</strong></p>\r\n";
|
639 |
echo "<p>" . __('Next email notification will be sent when your blog time is after', 'subscribe2') . ": \r\n";
|
640 |
+
echo "<input type=\"hidden\" id=\"jscrondate\" value=\"" . date_i18n($date_format, $scheduled_time + $offset) . "\" />";
|
641 |
+
echo "<input type=\"hidden\" id=\"jscrontime\" value=\"" . date_i18n($time_format, $scheduled_time + $offset) . "\" />";
|
642 |
+
echo "<span id=\"s2cron_1\"><span id=\"s2crondate\" style=\"background-color: #FFFBCC\">" . date_i18n($date_format, $scheduled_time + $offset) . "</span>";
|
643 |
+
echo " @ <span id=\"s2crontime\" style=\"background-color: #FFFBCC\">" . date_i18n($time_format, $scheduled_time + $offset) . "</span> ";
|
644 |
+
echo "<a href=\"#\" onclick=\"s2_show('cron'); return false;\">" . __('Edit', 'subscribe2') . "</a></span>\n";
|
645 |
+
echo "<span id=\"s2cron_2\">\r\n";
|
646 |
+
echo "<input id=\"s2datepicker\" name=\"crondate\" value=\"" . date_i18n($date_format, $scheduled_time + $offset) . "\">\r\n";
|
647 |
+
$hours = array('12:00 am', '1:00 am', '2:00 am', '3:00 am', '4:00 am', '5:00 am', '6:00 am', '7:00 am', '8:00 am', '9:00 am', '10:00 am', '11:00 am', '12:00 pm', '1:00 pm', '2:00 pm', '3:00 pm', '4:00 pm', '5:00 pm', '6:00 pm', '7:00 pm', '8:00 pm', '9:00 pm', '10:00 pm', '11:00 pm');
|
648 |
+
$current_hour = intval(date_i18n('G', $scheduled_time + $offset));
|
649 |
+
echo "<select name=\"crontime\">\r\n";
|
650 |
+
foreach ( $hours as $key => $value ) {
|
651 |
+
echo "<option value=\"" . $key . "\"";
|
652 |
+
if ( !empty($scheduled_time) && $key === $current_hour ) {
|
653 |
+
echo " selected=\"selected\"";
|
654 |
+
}
|
655 |
+
echo ">" . $value . "</option>\r\n";
|
656 |
+
}
|
657 |
+
echo "</select>\r\n";
|
658 |
+
echo "<a href=\"#\" onclick=\"s2_cron_update('cron'); return false;\">". __('Update', 'subscribe2') . "</a>\n";
|
659 |
+
echo "<a href=\"#\" onclick=\"s2_cron_revert('cron'); return false;\">". __('Revert', 'subscribe2') . "</a></span>\n";
|
660 |
if ( !empty($this->subscribe2_options['previous_s2cron']) ) {
|
661 |
echo "<p>" . __('Attempt to resend the last Digest Notification email', 'subscribe2') . ": ";
|
662 |
echo "<input type=\"submit\" class=\"button-secondary\" name=\"resend\" value=\"" . __('Resend Digest', 'subscribe2') . "\" /></p>\r\n";
|
670 |
Create and display a dropdown list of pages
|
671 |
*/
|
672 |
function pages_dropdown($s2page) {
|
673 |
+
$pages = get_pages();
|
|
|
|
|
|
|
674 |
if ( empty($pages) ) { return; }
|
675 |
|
676 |
+
$option = "<option value=\"0\">" . __('Select a page', 'subscribe2') . "</option>\r\n";
|
677 |
foreach ( $pages as $page ) {
|
678 |
$option .= "<option value=\"" . $page->ID . "\"";
|
679 |
if ( $page->ID == $s2page ) {
|
680 |
$option .= " selected=\"selected\"";
|
681 |
}
|
682 |
+
$option .= ">";
|
683 |
+
$parents = array_reverse( get_ancestors($page->ID, 'page') );
|
684 |
+
if ( $parents ) {
|
685 |
+
foreach ( $parents as $parent ) {
|
686 |
+
$option .= get_the_title($parent) . ' » ';
|
687 |
+
}
|
688 |
+
}
|
689 |
+
$option .= $page->post_title . "</option>\r\n";
|
690 |
}
|
691 |
|
692 |
echo $option;
|
822 |
*/
|
823 |
function new_category($new_category='') {
|
824 |
if ( 'no' == $this->subscribe2_options['show_autosub'] ) { return; }
|
825 |
+
|
|
|
826 |
global $wpdb;
|
827 |
+
if ( $this->subscribe2_options['email_freq'] != 'never' ) {
|
828 |
+
// if we are doing digests add new categories to users who are currently opted in
|
829 |
+
$sql = $wpdb->prepare("SELECT DISTINCT user_id FROM $wpdb->usermeta WHERE meta_key=%s AND meta_value<>''", $this->get_usermeta_keyname('s2_subscribed'));
|
830 |
+
$user_IDs = $wpdb->get_col($sql);
|
831 |
+
foreach ( $user_IDs as $user_ID ) {
|
832 |
+
$old_cats = get_user_meta($user_ID, $this->get_usermeta_keyname('s2_subscribed'), true);
|
833 |
+
$old_cats = explode(',', $old_cats);
|
834 |
+
$newcats = array_merge($old_cats, (array)$new_category);
|
835 |
+
update_user_meta($user_ID, $this->get_usermeta_keyname('s2_cat') . $new_category, $new_category);
|
836 |
+
update_user_meta($user_ID, $this->get_usermeta_keyname('s2_subscribed'), implode(',', $newcats));
|
837 |
+
}
|
838 |
+
return;
|
839 |
+
}
|
840 |
|
841 |
if ( 'yes' == $this->subscribe2_options['show_autosub'] ) {
|
842 |
if ( $this->s2_mu ) {
|
classes/class-s2-core.php
CHANGED
@@ -7,7 +7,8 @@ class s2class {
|
|
7 |
function load_translations() {
|
8 |
load_plugin_textdomain('subscribe2', false, S2DIR);
|
9 |
load_plugin_textdomain('subscribe2', false, S2DIR . "languages/");
|
10 |
-
|
|
|
11 |
} // end load_translations()
|
12 |
|
13 |
/**
|
@@ -16,15 +17,15 @@ class s2class {
|
|
16 |
function load_strings() {
|
17 |
// adjust the output of Subscribe2 here
|
18 |
|
19 |
-
$this->please_log_in = "<p class=\"s2_message\">" . __('To manage your subscription options please
|
20 |
|
21 |
-
$this->profile = "<p class=\"s2_message\">" . __('You may manage your subscription options from your
|
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\"
|
28 |
}
|
29 |
}
|
30 |
|
@@ -42,9 +43,11 @@ class s2class {
|
|
42 |
|
43 |
$this->no_page = __('You must to create a WordPress page for this plugin to work correctly.', 'subscribe2');
|
44 |
|
|
|
|
|
45 |
$this->mail_sent = "<p class=\"s2_message\">" . __('Message sent!', 'subscribe2') . "</p>";
|
46 |
|
47 |
-
$this->mail_failed = "<p class=\"s2_error\">" . __('Message failed!
|
48 |
|
49 |
// confirmation messages
|
50 |
$this->no_such_email = "<p class=\"s2_error\">" . __('No such email address is registered.', 'subscribe2') . "</p>";
|
@@ -232,7 +235,7 @@ class s2class {
|
|
232 |
/**
|
233 |
Delivers email to recipients in HTML or plaintext
|
234 |
*/
|
235 |
-
function mail($recipients = array(), $subject = '', $message = '', $type = 'text') {
|
236 |
if ( empty($recipients) || '' == $message ) { return; }
|
237 |
|
238 |
// Replace any escaped html symbols in subject then apply filter
|
@@ -240,14 +243,14 @@ class s2class {
|
|
240 |
$subject = apply_filters('s2_email_subject', $subject);
|
241 |
|
242 |
if ( 'html' == $type ) {
|
243 |
-
$headers = $this->headers('html');
|
244 |
if ( 'yes' == $this->subscribe2_options['stylesheet'] ) {
|
245 |
$mailtext = apply_filters('s2_html_email', "<html><head><title>" . $subject . "</title><link rel=\"stylesheet\" href=\"" . get_stylesheet_uri() . "\" type=\"text/css\" media=\"screen\" /></head><body>" . $message . "</body></html>", $subject, $message);
|
246 |
} else {
|
247 |
$mailtext = apply_filters('s2_html_email', "<html><head><title>" . $subject . "</title></head><body>" . $message . "</body></html>", $subject, $message);
|
248 |
}
|
249 |
} else {
|
250 |
-
$headers = $this->headers();
|
251 |
$message = preg_replace('|&[^a][^m][^p].{0,3};|', '', $message);
|
252 |
$message = preg_replace('|&|', '&', $message);
|
253 |
$message = wordwrap(strip_tags($message), $this->word_wrap, "\n");
|
@@ -265,9 +268,9 @@ class s2class {
|
|
265 |
if ( !is_email($recipient) || empty($recipient) ) { continue; }
|
266 |
// Use the mail queue provided we are not sending a preview
|
267 |
if ( function_exists('wpmq_mail') && !$this->preview_email ) {
|
268 |
-
@wp_mail($recipient, $subject, $mailtext, $headers,
|
269 |
} else {
|
270 |
-
@wp_mail($recipient, $subject, $mailtext, $headers);
|
271 |
}
|
272 |
}
|
273 |
return true;
|
@@ -316,10 +319,10 @@ class s2class {
|
|
316 |
if ( isset($batch) && !empty($batch) ) {
|
317 |
foreach ( $batch as $bcc ) {
|
318 |
$newheaders = $headers . "$bcc\n";
|
319 |
-
$status = @wp_mail($this->myemail, $subject, $mailtext, $newheaders);
|
320 |
}
|
321 |
} else {
|
322 |
-
$status = @wp_mail($this->myemail, $subject, $mailtext, $headers);
|
323 |
}
|
324 |
return $status;
|
325 |
} // end mail()
|
@@ -327,7 +330,7 @@ class s2class {
|
|
327 |
/**
|
328 |
Construct standard set of email headers
|
329 |
*/
|
330 |
-
function headers($type = 'text') {
|
331 |
if ( empty($this->myname) || empty($this->myemail) ) {
|
332 |
if ( $this->subscribe2_options['sender'] == 'blogname' ) {
|
333 |
$this->myname = html_entity_decode(get_option('blogname'), ENT_QUOTES);
|
@@ -360,10 +363,10 @@ class s2class {
|
|
360 |
}
|
361 |
$header['Return-path'] = "<" . $this->myemail . ">";
|
362 |
$header['Precedence'] = "list\nList-Id: " . html_entity_decode(get_option('blogname'), ENT_QUOTES) . "";
|
363 |
-
if ( $type == 'html' ) {
|
364 |
// To send HTML mail, the Content-Type header must be set
|
365 |
$header['Content-Type'] = get_option('html_type') . "; charset=\"". get_option('blog_charset') . "\"";
|
366 |
-
}
|
367 |
$header['Content-Type'] = "text/plain; charset=\"". get_option('blog_charset') . "\"";
|
368 |
}
|
369 |
|
@@ -539,6 +542,7 @@ class s2class {
|
|
539 |
$plaintext = preg_replace('|<s[^>]*>(.*)<\/s>|Ui','', $plaintext);
|
540 |
$plaintext = preg_replace('|<strike[^>]*>(.*)<\/strike>|Ui','', $plaintext);
|
541 |
$plaintext = preg_replace('|<del[^>]*>(.*)<\/del>|Ui','', $plaintext);
|
|
|
542 |
|
543 |
$gallid = '[gallery id="' . $post->ID . '"';
|
544 |
$content = str_replace('[gallery', $gallid, $post->post_content);
|
@@ -601,8 +605,8 @@ class s2class {
|
|
601 |
$plaintext = preg_replace('|[ ]+|', ' ', $plaintext);
|
602 |
|
603 |
// prepare mail body texts
|
604 |
-
$
|
605 |
-
$
|
606 |
$html_body = str_replace("\r\n", "<br />\r\n", $mailtext);
|
607 |
$html_body = str_replace("{POST}", $content, $html_body);
|
608 |
$html_excerpt_body = str_replace("\r\n", "<br />\r\n", $mailtext);
|
@@ -611,40 +615,38 @@ class s2class {
|
|
611 |
if ( $preview != '' ) {
|
612 |
$this->myemail = $preview;
|
613 |
$this->myname = __('Plain Text Excerpt Preview', 'subscribe2');
|
614 |
-
$this->mail(array($preview), $subject, $
|
615 |
$this->myname = __('Plain Text Full Preview', 'subscribe2');
|
616 |
-
$this->mail(array($preview), $subject, $
|
617 |
$this->myname = __('HTML Excerpt Preview', 'subscribe2');
|
618 |
$this->mail(array($preview), $subject, $html_excerpt_body, 'html');
|
619 |
$this->myname = __('HTML Full Preview', 'subscribe2');
|
620 |
$this->mail(array($preview), $subject, $html_body, 'html');
|
621 |
} else {
|
|
|
622 |
// first we send plaintext summary emails
|
623 |
-
$
|
624 |
-
if ( empty($registered) ) {
|
625 |
-
$recipients = (array)$public;
|
626 |
-
} elseif ( empty($public) ) {
|
627 |
-
$recipients = (array)$registered;
|
628 |
-
} else {
|
629 |
-
$recipients = array_merge((array)$public, (array)$registered);
|
630 |
-
}
|
631 |
$recipients = apply_filters('s2_send_plain_excerpt_suscribers', $recipients, $post->ID);
|
632 |
-
$this->mail($recipients, $subject, $
|
633 |
|
634 |
// next we send plaintext full content emails
|
635 |
$recipients = $this->get_registered("cats=$post_cats_string&format=post&author=$post->post_author");
|
636 |
$recipients = apply_filters('s2_send_plain_fullcontent_suscribers', $recipients, $post->ID);
|
637 |
-
$this->mail($recipients, $subject, $
|
638 |
|
639 |
// next we send html excerpt content emails
|
640 |
$recipients = $this->get_registered("cats=$post_cats_string&format=html_excerpt&author=$post->post_author");
|
641 |
$recipients = apply_filters('s2_send_html_excerpt_suscribers', $recipients, $post->ID);
|
642 |
$this->mail($recipients, $subject, $html_excerpt_body, 'html');
|
643 |
|
644 |
-
//
|
645 |
$recipients = $this->get_registered("cats=$post_cats_string&format=html&author=$post->post_author");
|
646 |
$recipients = apply_filters('s2_send_html_fullcontent_suscribers', $recipients, $post->ID);
|
647 |
$this->mail($recipients, $subject, $html_body, 'html');
|
|
|
|
|
|
|
|
|
648 |
}
|
649 |
} // end publish()
|
650 |
|
@@ -817,21 +819,6 @@ class s2class {
|
|
817 |
}
|
818 |
} //end remind()
|
819 |
|
820 |
-
/**
|
821 |
-
Check email is not from a barred domain
|
822 |
-
*/
|
823 |
-
function is_barred($email = '') {
|
824 |
-
$barred_option = $this->subscribe2_options['barred'];
|
825 |
-
list($user, $domain) = explode('@', $email, 2);
|
826 |
-
$bar_check = stristr($barred_option, $domain);
|
827 |
-
|
828 |
-
if ( !empty($bar_check) ) {
|
829 |
-
return true;
|
830 |
-
} else {
|
831 |
-
return false;
|
832 |
-
}
|
833 |
-
} // end is_barred()
|
834 |
-
|
835 |
/**
|
836 |
Is the supplied email address a public subscriber?
|
837 |
*/
|
@@ -849,42 +836,6 @@ class s2class {
|
|
849 |
}
|
850 |
} // end is_public()
|
851 |
|
852 |
-
/**
|
853 |
-
Collects the signup date for all public subscribers
|
854 |
-
*/
|
855 |
-
function signup_date($email = '') {
|
856 |
-
if ( '' == $email ) { return false; }
|
857 |
-
|
858 |
-
global $wpdb;
|
859 |
-
if ( !empty($this->signup_dates) ) {
|
860 |
-
return $this->signup_dates[$email];
|
861 |
-
} else {
|
862 |
-
$results = $wpdb->get_results("SELECT email, date FROM $this->public", ARRAY_N);
|
863 |
-
foreach ( $results as $result ) {
|
864 |
-
$this->signup_dates[$result[0]] = $result[1];
|
865 |
-
}
|
866 |
-
return $this->signup_dates[$email];
|
867 |
-
}
|
868 |
-
} // end signup_date()
|
869 |
-
|
870 |
-
/**
|
871 |
-
Collects the ip address for all public subscribers
|
872 |
-
*/
|
873 |
-
function signup_ip($email = '') {
|
874 |
-
if ( '' == $email ) {return false; }
|
875 |
-
|
876 |
-
global $wpdb;
|
877 |
-
if ( !empty($this->signup_ips) ) {
|
878 |
-
return $this->signup_ips[$email];
|
879 |
-
} else {
|
880 |
-
$results = $wpdb->get_results("SELECT email, ip FROM $this->public", ARRAY_N);
|
881 |
-
foreach ( $results as $result ) {
|
882 |
-
$this->signup_ips[$result[0]] = $result[1];
|
883 |
-
}
|
884 |
-
return $this->signup_ips[$email];
|
885 |
-
}
|
886 |
-
} // end signup_ip()
|
887 |
-
|
888 |
/* ===== Registered User and Subscriber functions ===== */
|
889 |
/**
|
890 |
Is the supplied email address a registered user of the blog?
|
@@ -1004,9 +955,9 @@ class s2class {
|
|
1004 |
}
|
1005 |
|
1006 |
if ( $this->s2_mu ) {
|
1007 |
-
$sql = "SELECT a.user_id FROM $wpdb->usermeta AS a " . $JOIN . "WHERE a.meta_key='" . $wpdb->prefix . "capabilities'" . $AND;
|
1008 |
} else {
|
1009 |
-
$sql = $wpdb->prepare("SELECT a.user_id FROM $wpdb->usermeta AS a " . $JOIN . "WHERE a.meta_key=%s" . $AND, $this->get_usermeta_keyname('s2_subscribed'));
|
1010 |
}
|
1011 |
$result = $wpdb->get_col($sql);
|
1012 |
if ( $result ) {
|
@@ -1389,7 +1340,7 @@ class s2class {
|
|
1389 |
} // end add_weekly_sched()
|
1390 |
|
1391 |
/**
|
1392 |
-
Send a
|
1393 |
*/
|
1394 |
function subscribe2_cron($preview = '', $resend = '') {
|
1395 |
if ( defined('DOING_S2_CRON') && DOING_S2_CRON ) { return; }
|
@@ -1637,6 +1588,22 @@ class s2class {
|
|
1637 |
}
|
1638 |
} // end subscribe2_cron()
|
1639 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1640 |
/* ===== Our constructor ===== */
|
1641 |
/**
|
1642 |
Subscribe2 constructor
|
@@ -1670,9 +1637,8 @@ class s2class {
|
|
1670 |
}
|
1671 |
}
|
1672 |
|
1673 |
-
// load our translations
|
1674 |
-
add_action('
|
1675 |
-
add_action('init', array(&$this, 'load_strings'));
|
1676 |
|
1677 |
// do we need to install anything?
|
1678 |
$this->public = $wpdb->prefix . "subscribe2";
|
@@ -1727,8 +1693,16 @@ class s2class {
|
|
1727 |
add_action('widgets_init', array(&$this, 'counter_widget'));
|
1728 |
}
|
1729 |
|
|
|
|
|
|
|
|
|
|
|
1730 |
// Add actions specific to admin or frontend
|
1731 |
if ( is_admin() ) {
|
|
|
|
|
|
|
1732 |
//add menu, authoring and category admin actions
|
1733 |
add_action('admin_menu', array(&$this, 'admin_menu'));
|
1734 |
add_action('admin_menu', array(&$this, 's2_meta_init'));
|
@@ -1774,11 +1748,14 @@ class s2class {
|
|
1774 |
exit(0);
|
1775 |
}
|
1776 |
} else {
|
|
|
|
|
|
|
1777 |
if ( isset($_GET['s2']) ) {
|
1778 |
// someone is confirming a request
|
1779 |
if ( defined('DOING_S2_CONFIRM') && DOING_S2_CONFIRM ) { return; }
|
1780 |
define( 'DOING_S2_CONFIRM', true );
|
1781 |
-
add_filter('
|
1782 |
add_filter('the_title', array(&$this, 'title_filter'));
|
1783 |
add_filter('the_content', array(&$this, 'confirm'));
|
1784 |
}
|
@@ -1800,14 +1777,6 @@ class s2class {
|
|
1800 |
}
|
1801 |
} // end s2init()
|
1802 |
|
1803 |
-
/**
|
1804 |
-
PHP4 Constructor
|
1805 |
-
Can be erased when support for WordPress 3.1 is dropped
|
1806 |
-
*/
|
1807 |
-
function s2class() {
|
1808 |
-
$this->__construct();
|
1809 |
-
} // end s2class()
|
1810 |
-
|
1811 |
/**
|
1812 |
PHP5 Constructor
|
1813 |
Allows dynamic variable setting
|
@@ -1816,6 +1785,7 @@ class s2class {
|
|
1816 |
$this->word_wrap = apply_filters('s2_word_wrap', 80);
|
1817 |
$this->excerpt_length = apply_filters('s2_excerpt_length', 55);
|
1818 |
$this->site_switching = apply_filters('s2_allow_site_switching', false);
|
|
|
1819 |
} // end __construct()
|
1820 |
|
1821 |
/* ===== our variables ===== */
|
@@ -1849,6 +1819,7 @@ class s2class {
|
|
1849 |
var $word_wrap;
|
1850 |
var $excerpt_length;
|
1851 |
var $site_switching;
|
|
|
1852 |
|
1853 |
// some messages
|
1854 |
var $please_log_in = '';
|
7 |
function load_translations() {
|
8 |
load_plugin_textdomain('subscribe2', false, S2DIR);
|
9 |
load_plugin_textdomain('subscribe2', false, S2DIR . "languages/");
|
10 |
+
$mofile = WP_LANG_DIR . '/subscribe2-' . apply_filters('plugin_locale', get_locale(), 'subscribe2') . '.mo';
|
11 |
+
load_textdomain('subscribe2', $mofile);
|
12 |
} // end load_translations()
|
13 |
|
14 |
/**
|
17 |
function load_strings() {
|
18 |
// adjust the output of Subscribe2 here
|
19 |
|
20 |
+
$this->please_log_in = "<p class=\"s2_message\">" . sprintf(__('To manage your subscription options please <a href="%1$s">login.</a>', 'subscribe2'), get_option('siteurl') . '/wp-login.php') . "</p>";
|
21 |
|
22 |
+
$this->profile = "<p class=\"s2_message\">" . sprintf(__('You may manage your subscription options from your <a href="%1$s">profile</a>', 'subscribe2'), get_option('siteurl') . "/wp-admin/admin.php?page=s2") . "</p>";
|
23 |
if ( $this->s2_mu === true ) {
|
24 |
global $blog_id;
|
25 |
$user_ID = get_current_user_id();
|
26 |
if ( !is_user_member_of_blog($user_ID, $blog_id) ) {
|
27 |
// if we are on multisite and the user is not a member of this blog change the link
|
28 |
+
$this->profile = "<p class=\"s2_message\">" . sprintf(__('<a href="%1$s">Subscribe</a> to email notifications when this blog posts new content.', 'subscribe2'), get_option('siteurl') . "/wp-admin/?s2mu_subscribe=" . $blog_id) . "</p>";
|
29 |
}
|
30 |
}
|
31 |
|
43 |
|
44 |
$this->no_page = __('You must to create a WordPress page for this plugin to work correctly.', 'subscribe2');
|
45 |
|
46 |
+
$this->disallowed_keywords = __('Your chosen email type (per-post or digest) does not support the following keywords:', 'subscribe2');
|
47 |
+
|
48 |
$this->mail_sent = "<p class=\"s2_message\">" . __('Message sent!', 'subscribe2') . "</p>";
|
49 |
|
50 |
+
$this->mail_failed = "<p class=\"s2_error\">" . __('Message failed!', 'subscribe2') . "</p>";
|
51 |
|
52 |
// confirmation messages
|
53 |
$this->no_such_email = "<p class=\"s2_error\">" . __('No such email address is registered.', 'subscribe2') . "</p>";
|
235 |
/**
|
236 |
Delivers email to recipients in HTML or plaintext
|
237 |
*/
|
238 |
+
function mail($recipients = array(), $subject = '', $message = '', $type = 'text', $attachments = array()) {
|
239 |
if ( empty($recipients) || '' == $message ) { return; }
|
240 |
|
241 |
// Replace any escaped html symbols in subject then apply filter
|
243 |
$subject = apply_filters('s2_email_subject', $subject);
|
244 |
|
245 |
if ( 'html' == $type ) {
|
246 |
+
$headers = $this->headers('html', $attachments);
|
247 |
if ( 'yes' == $this->subscribe2_options['stylesheet'] ) {
|
248 |
$mailtext = apply_filters('s2_html_email', "<html><head><title>" . $subject . "</title><link rel=\"stylesheet\" href=\"" . get_stylesheet_uri() . "\" type=\"text/css\" media=\"screen\" /></head><body>" . $message . "</body></html>", $subject, $message);
|
249 |
} else {
|
250 |
$mailtext = apply_filters('s2_html_email', "<html><head><title>" . $subject . "</title></head><body>" . $message . "</body></html>", $subject, $message);
|
251 |
}
|
252 |
} else {
|
253 |
+
$headers = $this->headers('text', $attachments);
|
254 |
$message = preg_replace('|&[^a][^m][^p].{0,3};|', '', $message);
|
255 |
$message = preg_replace('|&|', '&', $message);
|
256 |
$message = wordwrap(strip_tags($message), $this->word_wrap, "\n");
|
268 |
if ( !is_email($recipient) || empty($recipient) ) { continue; }
|
269 |
// Use the mail queue provided we are not sending a preview
|
270 |
if ( function_exists('wpmq_mail') && !$this->preview_email ) {
|
271 |
+
@wp_mail($recipient, $subject, $mailtext, $headers, $attachments, 0);
|
272 |
} else {
|
273 |
+
@wp_mail($recipient, $subject, $mailtext, $headers, $attachments);
|
274 |
}
|
275 |
}
|
276 |
return true;
|
319 |
if ( isset($batch) && !empty($batch) ) {
|
320 |
foreach ( $batch as $bcc ) {
|
321 |
$newheaders = $headers . "$bcc\n";
|
322 |
+
$status = @wp_mail($this->myemail, $subject, $mailtext, $newheaders, $attachments);
|
323 |
}
|
324 |
} else {
|
325 |
+
$status = @wp_mail($this->myemail, $subject, $mailtext, $headers, $attachments);
|
326 |
}
|
327 |
return $status;
|
328 |
} // end mail()
|
330 |
/**
|
331 |
Construct standard set of email headers
|
332 |
*/
|
333 |
+
function headers($type = 'text', $attachments = array()) {
|
334 |
if ( empty($this->myname) || empty($this->myemail) ) {
|
335 |
if ( $this->subscribe2_options['sender'] == 'blogname' ) {
|
336 |
$this->myname = html_entity_decode(get_option('blogname'), ENT_QUOTES);
|
363 |
}
|
364 |
$header['Return-path'] = "<" . $this->myemail . ">";
|
365 |
$header['Precedence'] = "list\nList-Id: " . html_entity_decode(get_option('blogname'), ENT_QUOTES) . "";
|
366 |
+
if ( empty($attachments) && $type == 'html' ) {
|
367 |
// To send HTML mail, the Content-Type header must be set
|
368 |
$header['Content-Type'] = get_option('html_type') . "; charset=\"". get_option('blog_charset') . "\"";
|
369 |
+
} elseif ( empty($attachments) && $type == 'text' ) {
|
370 |
$header['Content-Type'] = "text/plain; charset=\"". get_option('blog_charset') . "\"";
|
371 |
}
|
372 |
|
542 |
$plaintext = preg_replace('|<s[^>]*>(.*)<\/s>|Ui','', $plaintext);
|
543 |
$plaintext = preg_replace('|<strike[^>]*>(.*)<\/strike>|Ui','', $plaintext);
|
544 |
$plaintext = preg_replace('|<del[^>]*>(.*)<\/del>|Ui','', $plaintext);
|
545 |
+
$plaintext = trim(strip_tags($plaintext));
|
546 |
|
547 |
$gallid = '[gallery id="' . $post->ID . '"';
|
548 |
$content = str_replace('[gallery', $gallid, $post->post_content);
|
605 |
$plaintext = preg_replace('|[ ]+|', ' ', $plaintext);
|
606 |
|
607 |
// prepare mail body texts
|
608 |
+
$plain_excerpt_body = str_replace("{POST}", $excerpt, $mailtext);
|
609 |
+
$plain_body = str_replace("{POST}", $plaintext, $mailtext);
|
610 |
$html_body = str_replace("\r\n", "<br />\r\n", $mailtext);
|
611 |
$html_body = str_replace("{POST}", $content, $html_body);
|
612 |
$html_excerpt_body = str_replace("\r\n", "<br />\r\n", $mailtext);
|
615 |
if ( $preview != '' ) {
|
616 |
$this->myemail = $preview;
|
617 |
$this->myname = __('Plain Text Excerpt Preview', 'subscribe2');
|
618 |
+
$this->mail(array($preview), $subject, $plain_excerpt_body);
|
619 |
$this->myname = __('Plain Text Full Preview', 'subscribe2');
|
620 |
+
$this->mail(array($preview), $subject, $plain_body);
|
621 |
$this->myname = __('HTML Excerpt Preview', 'subscribe2');
|
622 |
$this->mail(array($preview), $subject, $html_excerpt_body, 'html');
|
623 |
$this->myname = __('HTML Full Preview', 'subscribe2');
|
624 |
$this->mail(array($preview), $subject, $html_body, 'html');
|
625 |
} else {
|
626 |
+
// Registered Subscribers first
|
627 |
// first we send plaintext summary emails
|
628 |
+
$recipients = $this->get_registered("cats=$post_cats_string&format=excerpt&author=$post->post_author");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
629 |
$recipients = apply_filters('s2_send_plain_excerpt_suscribers', $recipients, $post->ID);
|
630 |
+
$this->mail($recipients, $subject, $plain_excerpt_body);
|
631 |
|
632 |
// next we send plaintext full content emails
|
633 |
$recipients = $this->get_registered("cats=$post_cats_string&format=post&author=$post->post_author");
|
634 |
$recipients = apply_filters('s2_send_plain_fullcontent_suscribers', $recipients, $post->ID);
|
635 |
+
$this->mail($recipients, $subject, $plain_body);
|
636 |
|
637 |
// next we send html excerpt content emails
|
638 |
$recipients = $this->get_registered("cats=$post_cats_string&format=html_excerpt&author=$post->post_author");
|
639 |
$recipients = apply_filters('s2_send_html_excerpt_suscribers', $recipients, $post->ID);
|
640 |
$this->mail($recipients, $subject, $html_excerpt_body, 'html');
|
641 |
|
642 |
+
// next we send html full content emails
|
643 |
$recipients = $this->get_registered("cats=$post_cats_string&format=html&author=$post->post_author");
|
644 |
$recipients = apply_filters('s2_send_html_fullcontent_suscribers', $recipients, $post->ID);
|
645 |
$this->mail($recipients, $subject, $html_body, 'html');
|
646 |
+
|
647 |
+
// and finally we send to Public Subscribers
|
648 |
+
$recipients = apply_filters('s2_send_public_suscribers', $public, $post->ID);
|
649 |
+
$this->mail($recipients, $subject, $plain_excerpt_body, 'text');
|
650 |
}
|
651 |
} // end publish()
|
652 |
|
819 |
}
|
820 |
} //end remind()
|
821 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
822 |
/**
|
823 |
Is the supplied email address a public subscriber?
|
824 |
*/
|
836 |
}
|
837 |
} // end is_public()
|
838 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
839 |
/* ===== Registered User and Subscriber functions ===== */
|
840 |
/**
|
841 |
Is the supplied email address a registered user of the blog?
|
955 |
}
|
956 |
|
957 |
if ( $this->s2_mu ) {
|
958 |
+
$sql = $wpdb->prepare("SELECT a.user_id FROM $wpdb->usermeta AS a INNER JOIN $wpdb->usermeta AS e ON a.user_id = e.user_id " . $JOIN . "WHERE a.meta_key='" . $wpdb->prefix . "capabilities' AND e.meta_key=%s AND e.meta_value <> ''" . $AND, $this->get_usermeta_keyname('s2_subscribed'));
|
959 |
} else {
|
960 |
+
$sql = $wpdb->prepare("SELECT a.user_id FROM $wpdb->usermeta AS a " . $JOIN . "WHERE a.meta_key=%s AND a.meta_value <> ''" . $AND, $this->get_usermeta_keyname('s2_subscribed'));
|
961 |
}
|
962 |
$result = $wpdb->get_col($sql);
|
963 |
if ( $result ) {
|
1340 |
} // end add_weekly_sched()
|
1341 |
|
1342 |
/**
|
1343 |
+
Send a digest of recent new posts
|
1344 |
*/
|
1345 |
function subscribe2_cron($preview = '', $resend = '') {
|
1346 |
if ( defined('DOING_S2_CRON') && DOING_S2_CRON ) { return; }
|
1588 |
}
|
1589 |
} // end subscribe2_cron()
|
1590 |
|
1591 |
+
function s2cleaner_task() {
|
1592 |
+
$unconfirmed = $this->get_public('0');
|
1593 |
+
if ( empty($unconfirmed) ) { return; }
|
1594 |
+
global $wpdb;
|
1595 |
+
$sql = "SELECT email FROM $this->public WHERE active='0' AND date < DATE_SUB(CURDATE(), INTERVAL " . $this->clean_interval . " DAY)";
|
1596 |
+
$old_unconfirmed = $wpdb->get_col( $sql );
|
1597 |
+
if ( empty($old_unconfirmed) ) {
|
1598 |
+
return;
|
1599 |
+
} else {
|
1600 |
+
foreach ($old_unconfirmed as $email) {
|
1601 |
+
$this->delete($email);
|
1602 |
+
}
|
1603 |
+
}
|
1604 |
+
return;
|
1605 |
+
} // end s2cleaner_task()
|
1606 |
+
|
1607 |
/* ===== Our constructor ===== */
|
1608 |
/**
|
1609 |
Subscribe2 constructor
|
1637 |
}
|
1638 |
}
|
1639 |
|
1640 |
+
// load our translations
|
1641 |
+
add_action('plugins_loaded', array(&$this, 'load_translations'));
|
|
|
1642 |
|
1643 |
// do we need to install anything?
|
1644 |
$this->public = $wpdb->prefix . "subscribe2";
|
1693 |
add_action('widgets_init', array(&$this, 'counter_widget'));
|
1694 |
}
|
1695 |
|
1696 |
+
// add action to 'clean' unconfirmed Public Subscribers
|
1697 |
+
if ( $this->clean_interval > 0 ) {
|
1698 |
+
add_action('wp_scheduled_delete', array(&$this, 's2cleaner_task'));
|
1699 |
+
}
|
1700 |
+
|
1701 |
// Add actions specific to admin or frontend
|
1702 |
if ( is_admin() ) {
|
1703 |
+
// load strings
|
1704 |
+
add_action('init', array(&$this, 'load_strings'));
|
1705 |
+
|
1706 |
//add menu, authoring and category admin actions
|
1707 |
add_action('admin_menu', array(&$this, 'admin_menu'));
|
1708 |
add_action('admin_menu', array(&$this, 's2_meta_init'));
|
1748 |
exit(0);
|
1749 |
}
|
1750 |
} else {
|
1751 |
+
// load strings later on frontend for polylang plugin compatibility
|
1752 |
+
add_action('wp', array(&$this, 'load_strings'));
|
1753 |
+
|
1754 |
if ( isset($_GET['s2']) ) {
|
1755 |
// someone is confirming a request
|
1756 |
if ( defined('DOING_S2_CONFIRM') && DOING_S2_CONFIRM ) { return; }
|
1757 |
define( 'DOING_S2_CONFIRM', true );
|
1758 |
+
add_filter('request', array(&$this, 'query_filter'));
|
1759 |
add_filter('the_title', array(&$this, 'title_filter'));
|
1760 |
add_filter('the_content', array(&$this, 'confirm'));
|
1761 |
}
|
1777 |
}
|
1778 |
} // end s2init()
|
1779 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1780 |
/**
|
1781 |
PHP5 Constructor
|
1782 |
Allows dynamic variable setting
|
1785 |
$this->word_wrap = apply_filters('s2_word_wrap', 80);
|
1786 |
$this->excerpt_length = apply_filters('s2_excerpt_length', 55);
|
1787 |
$this->site_switching = apply_filters('s2_allow_site_switching', false);
|
1788 |
+
$this->clean_interval = apply_filters('s2_clean_interval', 28);
|
1789 |
} // end __construct()
|
1790 |
|
1791 |
/* ===== our variables ===== */
|
1819 |
var $word_wrap;
|
1820 |
var $excerpt_length;
|
1821 |
var $site_switching;
|
1822 |
+
var $clean_interval;
|
1823 |
|
1824 |
// some messages
|
1825 |
var $please_log_in = '';
|
classes/class-s2-frontend.php
CHANGED
@@ -10,8 +10,10 @@ class s2_frontend extends s2class {
|
|
10 |
'id' => '',
|
11 |
'url' => '',
|
12 |
'nojs' => 'false',
|
|
|
13 |
'link' => '',
|
14 |
-
'size' => 20
|
|
|
15 |
), $atts));
|
16 |
|
17 |
// if link is true return a link to the page with the ajax class
|
@@ -56,11 +58,26 @@ class s2_frontend extends s2class {
|
|
56 |
$value = __('Enter email address...', 'subscribe2');
|
57 |
}
|
58 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
// build default form
|
60 |
if ( $nojs == 'true' ) {
|
61 |
-
$this->form = "<form method=\"post\"" . $action . "><input type=\"hidden\" name=\"ip\" value=\"" . $_SERVER['REMOTE_ADDR'] . "\"
|
62 |
} else {
|
63 |
-
$this->form = "<form method=\"post\"" . $action . "><input type=\"hidden\" name=\"ip\" value=\"" . $_SERVER['REMOTE_ADDR'] . "\"
|
64 |
}
|
65 |
$this->s2form = $this->form;
|
66 |
|
@@ -70,6 +87,11 @@ class s2_frontend extends s2class {
|
|
70 |
$this->s2form = $this->profile;
|
71 |
}
|
72 |
if ( isset($_POST['subscribe']) || isset($_POST['unsubscribe']) ) {
|
|
|
|
|
|
|
|
|
|
|
73 |
global $wpdb, $user_email;
|
74 |
$this->email = $this->sanitize_email($_POST['email']);
|
75 |
if ( !is_email($this->email) ) {
|
@@ -147,14 +169,20 @@ class s2_frontend extends s2class {
|
|
147 |
|
148 |
global $wpdb;
|
149 |
|
|
|
|
|
|
|
|
|
|
|
|
|
150 |
if ( 0 != $this->subscribe2_options['s2page'] ) {
|
151 |
-
return
|
152 |
} else {
|
153 |
$id = $wpdb->get_var("SELECT ID FROM $wpdb->posts WHERE post_type='page' AND post_status='publish' LIMIT 1");
|
154 |
if ( $id ) {
|
155 |
-
return
|
156 |
} else {
|
157 |
-
return
|
158 |
}
|
159 |
}
|
160 |
} // end query_filter()
|
@@ -203,7 +231,7 @@ class s2_frontend extends s2class {
|
|
203 |
|
204 |
if ( '1' == $action ) {
|
205 |
// make this subscription active
|
206 |
-
$this->message = $this->added;
|
207 |
if ( '1' != $current ) {
|
208 |
$this->ip = $_SERVER['REMOTE_ADDR'];
|
209 |
$this->toggle($this->email);
|
@@ -217,6 +245,7 @@ class s2_frontend extends s2class {
|
|
217 |
foreach ($wp_user_query as $user) {
|
218 |
$recipients[] = $user->user_email;
|
219 |
}
|
|
|
220 |
$headers = $this->headers();
|
221 |
// send individual emails so we don't reveal admin emails to each other
|
222 |
foreach ( $recipients as $recipient ) {
|
@@ -227,7 +256,7 @@ class s2_frontend extends s2class {
|
|
227 |
$this->filtered = 1;
|
228 |
} elseif ( '0' == $action ) {
|
229 |
// remove this subscriber
|
230 |
-
$this->message = $this->deleted;
|
231 |
if ( '0' != $current ) {
|
232 |
$this->delete($this->email);
|
233 |
if ( $this->subscribe2_options['admin_email'] == 'unsubs' || $this->subscribe2_options['admin_email'] == 'both' ) {
|
@@ -240,6 +269,7 @@ class s2_frontend extends s2class {
|
|
240 |
foreach ($wp_user_query as $user) {
|
241 |
$recipients[] = $user->user_email;
|
242 |
}
|
|
|
243 |
$headers = $this->headers();
|
244 |
// send individual emails so we don't reveal admin emails to each other
|
245 |
foreach ( $recipients as $recipient ) {
|
@@ -270,7 +300,7 @@ class s2_frontend extends s2class {
|
|
270 |
function add_ajax() {
|
271 |
// enqueue the jQuery script we need and let WordPress handle the dependencies
|
272 |
wp_enqueue_script('jquery-ui-dialog');
|
273 |
-
wp_register_style('jquery-ui-style', apply_filters('s2_jqueryui_css', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.
|
274 |
wp_enqueue_style('jquery-ui-style');
|
275 |
} // end add_ajax()
|
276 |
|
@@ -280,11 +310,12 @@ class s2_frontend extends s2class {
|
|
280 |
function add_s2_ajax() {
|
281 |
echo "<script type=\"text/javascript\">\r\n";
|
282 |
echo "//<![CDATA[\r\n";
|
283 |
-
echo "jQuery
|
284 |
-
echo "
|
285 |
-
echo "
|
|
|
286 |
echo " dialog.html('" . do_shortcode('[subscribe2 nojs="true" hide="unsubscribe"]') . "');\r\n";
|
287 |
-
echo " } else if (
|
288 |
echo " dialog.html('" . do_shortcode('[subscribe2 nojs="true" hide="subscribe"]') . "');\r\n";
|
289 |
echo " } else {\r\n";
|
290 |
echo " dialog.html('" . do_shortcode('[subscribe2 nojs="true"]') . "');\r\n";
|
@@ -294,7 +325,7 @@ class s2_frontend extends s2class {
|
|
294 |
} else {
|
295 |
echo " dialog.dialog({autoOpen: false, modal: true, zIndex: 10000, title: '" . __('Subscribe to this blog', 'subscribe2') . "'});\r\n";
|
296 |
}
|
297 |
-
echo "
|
298 |
echo " dialog.dialog('open');\r\n";
|
299 |
echo " return false;\r\n";
|
300 |
echo " });\r\n";
|
@@ -302,5 +333,21 @@ class s2_frontend extends s2class {
|
|
302 |
echo "//]]>\r\n";
|
303 |
echo "</script>\r\n";
|
304 |
} // end add_s2_ajax()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
305 |
}
|
306 |
?>
|
10 |
'id' => '',
|
11 |
'url' => '',
|
12 |
'nojs' => 'false',
|
13 |
+
'noantispam' => 'false',
|
14 |
'link' => '',
|
15 |
+
'size' => 20,
|
16 |
+
'wrap' => 'true'
|
17 |
), $atts));
|
18 |
|
19 |
// if link is true return a link to the page with the ajax class
|
58 |
$value = __('Enter email address...', 'subscribe2');
|
59 |
}
|
60 |
|
61 |
+
// if wrap is true add paragraph html tags
|
62 |
+
$wrap_text = '';
|
63 |
+
if ( $wrap == 'true' ) {
|
64 |
+
$wrap_text = '</p><p>';
|
65 |
+
}
|
66 |
+
|
67 |
+
// deploy some anti-spam measures
|
68 |
+
$antispam_text = '';
|
69 |
+
if ( $noantispam != 'true' ) {
|
70 |
+
$antispam_text = "<span style=\"display:none !important\">";
|
71 |
+
$antispam_text .= "<label for=\"name\">Leave Blank:</label><input type=\"text\" id=\"name\" name=\"name\" />";
|
72 |
+
$antispam_text .= "<label for=\"uri\">Don't Change:</label><input type=\"text\" id=\"uri\" name=\"uri\" value=\"http://\" />";
|
73 |
+
$antispam_text .= "</span>";
|
74 |
+
}
|
75 |
+
|
76 |
// build default form
|
77 |
if ( $nojs == 'true' ) {
|
78 |
+
$this->form = "<form method=\"post\"" . $action . "><input type=\"hidden\" name=\"ip\" value=\"" . $_SERVER['REMOTE_ADDR'] . "\" />" . $antispam_text . "<p><label for=\"s2email\">" . __('Your email:', 'subscribe2') . "</label><br /><input type=\"text\" name=\"email\" id=\"s2email\" value=\"" . $value . "\" size=\"" . $size . "\" />" . $wrap_text . $this->input_form_action . "</p></form>";
|
79 |
} else {
|
80 |
+
$this->form = "<form method=\"post\"" . $action . "><input type=\"hidden\" name=\"ip\" value=\"" . $_SERVER['REMOTE_ADDR'] . "\" />" . $antispam_text . "<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 . "';}\" />" . $wrap_text . $this->input_form_action . "</p></form>\r\n";
|
81 |
}
|
82 |
$this->s2form = $this->form;
|
83 |
|
87 |
$this->s2form = $this->profile;
|
88 |
}
|
89 |
if ( isset($_POST['subscribe']) || isset($_POST['unsubscribe']) ) {
|
90 |
+
// anti spam sign up measure
|
91 |
+
if ( $_POST['name'] != '' || $_POST['uri'] != 'http://' ) {
|
92 |
+
// looks like some invisible-to-user fields were changed; falsely report success
|
93 |
+
return $this->confirmation_sent;
|
94 |
+
}
|
95 |
global $wpdb, $user_email;
|
96 |
$this->email = $this->sanitize_email($_POST['email']);
|
97 |
if ( !is_email($this->email) ) {
|
169 |
|
170 |
global $wpdb;
|
171 |
|
172 |
+
// brute force Simple Facebook Connect to bypass compatiblity issues
|
173 |
+
$priority = has_filter('wp_head', 'sfc_base_meta');
|
174 |
+
if ( $priority !== false ) {
|
175 |
+
remove_action('wp_head', 'sfc_base_meta', $priority);
|
176 |
+
}
|
177 |
+
|
178 |
if ( 0 != $this->subscribe2_options['s2page'] ) {
|
179 |
+
return array('page_id' => $this->subscribe2_options['s2page']);
|
180 |
} else {
|
181 |
$id = $wpdb->get_var("SELECT ID FROM $wpdb->posts WHERE post_type='page' AND post_status='publish' LIMIT 1");
|
182 |
if ( $id ) {
|
183 |
+
return array('page_id' => $id);
|
184 |
} else {
|
185 |
+
return array('showposts' => 1);
|
186 |
}
|
187 |
}
|
188 |
} // end query_filter()
|
231 |
|
232 |
if ( '1' == $action ) {
|
233 |
// make this subscription active
|
234 |
+
$this->message = apply_filters('s2_subscribe_confirmed', $this->added);
|
235 |
if ( '1' != $current ) {
|
236 |
$this->ip = $_SERVER['REMOTE_ADDR'];
|
237 |
$this->toggle($this->email);
|
245 |
foreach ($wp_user_query as $user) {
|
246 |
$recipients[] = $user->user_email;
|
247 |
}
|
248 |
+
$recipients = apply_filters('s2_admin_email', $recipients, 'subscribe');
|
249 |
$headers = $this->headers();
|
250 |
// send individual emails so we don't reveal admin emails to each other
|
251 |
foreach ( $recipients as $recipient ) {
|
256 |
$this->filtered = 1;
|
257 |
} elseif ( '0' == $action ) {
|
258 |
// remove this subscriber
|
259 |
+
$this->message = apply_filters('s2_unsubscribe_confirmed', $this->deleted);
|
260 |
if ( '0' != $current ) {
|
261 |
$this->delete($this->email);
|
262 |
if ( $this->subscribe2_options['admin_email'] == 'unsubs' || $this->subscribe2_options['admin_email'] == 'both' ) {
|
269 |
foreach ($wp_user_query as $user) {
|
270 |
$recipients[] = $user->user_email;
|
271 |
}
|
272 |
+
$recipients = apply_filters('s2_admin_email', $recipients, 'unsubscribe');
|
273 |
$headers = $this->headers();
|
274 |
// send individual emails so we don't reveal admin emails to each other
|
275 |
foreach ( $recipients as $recipient ) {
|
300 |
function add_ajax() {
|
301 |
// enqueue the jQuery script we need and let WordPress handle the dependencies
|
302 |
wp_enqueue_script('jquery-ui-dialog');
|
303 |
+
wp_register_style('jquery-ui-style', apply_filters('s2_jqueryui_css', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/themes/ui-darkness/jquery-ui.css'));
|
304 |
wp_enqueue_style('jquery-ui-style');
|
305 |
} // end add_ajax()
|
306 |
|
310 |
function add_s2_ajax() {
|
311 |
echo "<script type=\"text/javascript\">\r\n";
|
312 |
echo "//<![CDATA[\r\n";
|
313 |
+
echo "var s2jQuery = jQuery.noConflict();\r\n";
|
314 |
+
echo "s2jQuery(document).ready(function() {\r\n";
|
315 |
+
echo " var dialog = s2jQuery('<div></div>');\r\n";
|
316 |
+
echo " if (s2jQuery('a.s2popup').attr('id') === 'unsubscribe') {\r\n";
|
317 |
echo " dialog.html('" . do_shortcode('[subscribe2 nojs="true" hide="unsubscribe"]') . "');\r\n";
|
318 |
+
echo " } else if (s2jQuery('a.s2popup').attr('id') === 'subscribe') {\r\n";
|
319 |
echo " dialog.html('" . do_shortcode('[subscribe2 nojs="true" hide="subscribe"]') . "');\r\n";
|
320 |
echo " } else {\r\n";
|
321 |
echo " dialog.html('" . do_shortcode('[subscribe2 nojs="true"]') . "');\r\n";
|
325 |
} else {
|
326 |
echo " dialog.dialog({autoOpen: false, modal: true, zIndex: 10000, title: '" . __('Subscribe to this blog', 'subscribe2') . "'});\r\n";
|
327 |
}
|
328 |
+
echo " s2jQuery('a.s2popup').click(function(){\r\n";
|
329 |
echo " dialog.dialog('open');\r\n";
|
330 |
echo " return false;\r\n";
|
331 |
echo " });\r\n";
|
333 |
echo "//]]>\r\n";
|
334 |
echo "</script>\r\n";
|
335 |
} // end add_s2_ajax()
|
336 |
+
|
337 |
+
/**
|
338 |
+
Check email is not from a barred domain
|
339 |
+
*/
|
340 |
+
function is_barred($email = '') {
|
341 |
+
if ( '' == $email ) { return false; }
|
342 |
+
|
343 |
+
$bar_check = false;
|
344 |
+
list($user, $domain) = explode('@', $email, 2);
|
345 |
+
foreach ( preg_split("|[\s,]+|", $this->subscribe2_options['barred']) as $barred_domain ) {
|
346 |
+
if ( strtolower($domain) === strtolower(trim($barred_domain)) ) {
|
347 |
+
$bar_check = true;
|
348 |
+
}
|
349 |
+
}
|
350 |
+
return $bar_check;
|
351 |
+
} // end is_barred()
|
352 |
}
|
353 |
?>
|
classes/class-s2-list-table.php
CHANGED
@@ -1,231 +1,250 @@
|
|
1 |
-
<?php
|
2 |
-
class Subscribe2_List_Table extends WP_List_Table {
|
3 |
-
function __construct() {
|
4 |
-
global $status, $page;
|
5 |
-
|
6 |
-
parent::__construct( array(
|
7 |
-
'singular' => 'subscriber',
|
8 |
-
'plural' => 'subscribers',
|
9 |
-
'ajax' => false
|
10 |
-
) );
|
11 |
-
}
|
12 |
-
|
13 |
-
function column_default($item, $column_name) {
|
14 |
-
global $current_tab;
|
15 |
-
if ( $current_tab == 'registered' ) {
|
16 |
-
switch($column_name) {
|
17 |
-
case 'email':
|
18 |
-
return $item[$column_name];
|
19 |
-
default:
|
20 |
-
return print_r($item,true);
|
21 |
-
}
|
22 |
-
} else {
|
23 |
-
switch($column_name) {
|
24 |
-
case 'email':
|
25 |
-
case 'date':
|
26 |
-
return $item[$column_name];
|
27 |
-
default:
|
28 |
-
return print_r($item,true);
|
29 |
-
}
|
30 |
-
}
|
31 |
-
}
|
32 |
-
|
33 |
-
function column_email($item) {
|
34 |
-
global $current_tab;
|
35 |
-
if ( $current_tab == 'registered' ) {
|
36 |
-
$actions = array('edit' => sprintf('<a href="?page=%s&email=%s">%s</a>', 's2', $item['email'], __('Edit', 'subscribe2')));
|
37 |
-
return sprintf('%1$s %2$s', $item['email'], $this->row_actions($actions));
|
38 |
-
} else {
|
39 |
-
global $mysubscribe2;
|
40 |
-
if ( '0' === $mysubscribe2->is_public($item['email']) ) {
|
41 |
-
return sprintf('<span style="color:#FF0000">%1$s</span>', $item['email']);
|
42 |
-
} else {
|
43 |
-
return sprintf('
|
44 |
-
}
|
45 |
-
}
|
46 |
-
}
|
47 |
-
|
48 |
-
function column_cb($item) {
|
49 |
-
return sprintf('<input type="checkbox" name="%1$s[]" value="%2$s" />', $this->_args['singular'], $item['email']);
|
50 |
-
}
|
51 |
-
|
52 |
-
function get_columns() {
|
53 |
-
global $current_tab;
|
54 |
-
if ( $current_tab == 'registered' ) {
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
}
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
$
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
'
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
'
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
if (
|
143 |
-
$
|
144 |
-
|
145 |
-
$
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
)
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
$page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>",
|
155 |
-
'
|
156 |
-
esc_attr__('Go to the
|
157 |
-
esc_url( add_query_arg( 'paged',
|
158 |
-
'&
|
159 |
-
);
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
$
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
$
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
'
|
228 |
-
|
229 |
-
|
230 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
231 |
?>
|
1 |
+
<?php
|
2 |
+
class Subscribe2_List_Table extends WP_List_Table {
|
3 |
+
function __construct() {
|
4 |
+
global $status, $page;
|
5 |
+
|
6 |
+
parent::__construct( array(
|
7 |
+
'singular' => 'subscriber',
|
8 |
+
'plural' => 'subscribers',
|
9 |
+
'ajax' => false
|
10 |
+
) );
|
11 |
+
}
|
12 |
+
|
13 |
+
function column_default($item, $column_name) {
|
14 |
+
global $current_tab;
|
15 |
+
if ( $current_tab == 'registered' ) {
|
16 |
+
switch($column_name) {
|
17 |
+
case 'email':
|
18 |
+
return $item[$column_name];
|
19 |
+
default:
|
20 |
+
return print_r($item,true);
|
21 |
+
}
|
22 |
+
} else {
|
23 |
+
switch($column_name) {
|
24 |
+
case 'email':
|
25 |
+
case 'date':
|
26 |
+
return $item[$column_name];
|
27 |
+
default:
|
28 |
+
return print_r($item,true);
|
29 |
+
}
|
30 |
+
}
|
31 |
+
}
|
32 |
+
|
33 |
+
function column_email($item) {
|
34 |
+
global $current_tab;
|
35 |
+
if ( $current_tab == 'registered' ) {
|
36 |
+
$actions = array('edit' => sprintf('<a href="?page=%s&email=%s">%s</a>', 's2', $item['email'], __('Edit', 'subscribe2')));
|
37 |
+
return sprintf('%1$s %2$s', $item['email'], $this->row_actions($actions));
|
38 |
+
} else {
|
39 |
+
global $mysubscribe2;
|
40 |
+
if ( '0' === $mysubscribe2->is_public($item['email']) ) {
|
41 |
+
return sprintf('<span style="color:#FF0000"><abbr title="' . $mysubscribe2->signup_ip($item['email']) . '">%1$s</abbr></span>', $item['email']);
|
42 |
+
} else {
|
43 |
+
return sprintf('<abbr title="' . $mysubscribe2->signup_ip($item['email']) . '">%1$s</abbr>', $item['email']);
|
44 |
+
}
|
45 |
+
}
|
46 |
+
}
|
47 |
+
|
48 |
+
function column_cb($item) {
|
49 |
+
return sprintf('<input type="checkbox" name="%1$s[]" value="%2$s" />', $this->_args['singular'], $item['email']);
|
50 |
+
}
|
51 |
+
|
52 |
+
function get_columns() {
|
53 |
+
global $current_tab;
|
54 |
+
if ( $current_tab == 'registered' ) {
|
55 |
+
if (is_multisite()) {
|
56 |
+
$columns = array(
|
57 |
+
'email' => _x('Email', 'column name', 'subscribe2')
|
58 |
+
);
|
59 |
+
} else {
|
60 |
+
$columns = array(
|
61 |
+
'cb' => '<input type="checkbox" />',
|
62 |
+
'email' => _x('Email', 'column name', 'subscribe2')
|
63 |
+
);
|
64 |
+
}
|
65 |
+
} else {
|
66 |
+
$columns = array(
|
67 |
+
'cb' => '<input type="checkbox" />',
|
68 |
+
'email' => _x('Email', 'column name', 'subscribe2'),
|
69 |
+
'date' => _x('Date', 'column name', 'subscribe2')
|
70 |
+
);
|
71 |
+
}
|
72 |
+
return $columns;
|
73 |
+
}
|
74 |
+
|
75 |
+
function get_sortable_columns() {
|
76 |
+
global $current_tab;
|
77 |
+
if ( $current_tab == 'registered' ) {
|
78 |
+
$sortable_columns = array('email' => array('email', true));
|
79 |
+
} else {
|
80 |
+
$sortable_columns = array(
|
81 |
+
'email' => array('email', true),
|
82 |
+
'date' => array('date', false)
|
83 |
+
);
|
84 |
+
}
|
85 |
+
return $sortable_columns;
|
86 |
+
}
|
87 |
+
|
88 |
+
function get_bulk_actions() {
|
89 |
+
global $current_tab;
|
90 |
+
if ( $current_tab == 'registered' ) {
|
91 |
+
if (is_multisite()) {
|
92 |
+
return array();
|
93 |
+
} else {
|
94 |
+
return array(
|
95 |
+
'delete' => __('Delete', 'subscribe2')
|
96 |
+
);
|
97 |
+
}
|
98 |
+
} else {
|
99 |
+
$actions = array(
|
100 |
+
'delete' => __('Delete', 'subscribe2'),
|
101 |
+
'toggle' => __('Toggle', 'subscribe2')
|
102 |
+
);
|
103 |
+
return $actions;
|
104 |
+
}
|
105 |
+
}
|
106 |
+
|
107 |
+
function pagination( $which ) {
|
108 |
+
if ( empty( $this->_pagination_args ) )
|
109 |
+
return;
|
110 |
+
|
111 |
+
extract( $this->_pagination_args, EXTR_SKIP );
|
112 |
+
|
113 |
+
$output = '<span class="displaying-num">' . sprintf( _n( '1 item', '%s items', $total_items, 'subscribe2' ), number_format_i18n( $total_items ) ) . '</span>';
|
114 |
+
|
115 |
+
if ( isset($_POST['what']) ) {
|
116 |
+
$current = 1;
|
117 |
+
} else {
|
118 |
+
$current = $this->get_pagenum();
|
119 |
+
}
|
120 |
+
|
121 |
+
if ( version_compare($GLOBALS['wp_version'], '3.5', '<') ) {
|
122 |
+
$current_url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
|
123 |
+
} else {
|
124 |
+
$current_url = set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
|
125 |
+
}
|
126 |
+
|
127 |
+
$current_url = remove_query_arg( array('hotkeys_highlight_last', 'hotkeys_highlight_first'), $current_url );
|
128 |
+
|
129 |
+
if ( isset($what) ) {
|
130 |
+
$current_url = add_query_arg( array('what' => $what), $current_url );
|
131 |
+
} elseif ( isset($_REQUEST['what']) ) {
|
132 |
+
$current_url = add_query_arg( array('what' => $_REQUEST['what']), $current_url );
|
133 |
+
}
|
134 |
+
|
135 |
+
if ( isset($_POST['s']) ) {
|
136 |
+
$current_url = add_query_arg( array('s' => $_POST['s']), $current_url );
|
137 |
+
}
|
138 |
+
|
139 |
+
$page_links = array();
|
140 |
+
|
141 |
+
$disable_first = $disable_last = '';
|
142 |
+
if ( $current == 1 )
|
143 |
+
$disable_first = ' disabled';
|
144 |
+
if ( $current == $total_pages )
|
145 |
+
$disable_last = ' disabled';
|
146 |
+
|
147 |
+
$page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>",
|
148 |
+
'first-page' . $disable_first,
|
149 |
+
esc_attr__('Go to the first page', 'subscribe2'),
|
150 |
+
esc_url( remove_query_arg( 'paged', $current_url ) ),
|
151 |
+
'«'
|
152 |
+
);
|
153 |
+
|
154 |
+
$page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>",
|
155 |
+
'prev-page' . $disable_first,
|
156 |
+
esc_attr__('Go to the previous page', 'subscribe2'),
|
157 |
+
esc_url( add_query_arg( 'paged', max( 1, $current-1 ), $current_url ) ),
|
158 |
+
'‹'
|
159 |
+
);
|
160 |
+
|
161 |
+
if ( 'bottom' == $which )
|
162 |
+
$html_current_page = $current;
|
163 |
+
else
|
164 |
+
$html_current_page = sprintf( "<input class='current-page' title='%s' type='text' name='paged' value='%s' size='%d' />",
|
165 |
+
esc_attr__('Current page', 'subscribe2'),
|
166 |
+
$current,
|
167 |
+
strlen( $total_pages )
|
168 |
+
);
|
169 |
+
|
170 |
+
$html_total_pages = sprintf( "<span class='total-pages'>%s</span>", number_format_i18n( $total_pages ) );
|
171 |
+
$page_links[] = '<span class="paging-input">' . sprintf( _x('%1$s of %2$s', 'paging', 'subscribe2'), $html_current_page, $html_total_pages ) . '</span>';
|
172 |
+
|
173 |
+
$page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>",
|
174 |
+
'next-page' . $disable_last,
|
175 |
+
esc_attr__('Go to the next page', 'subscribe2'),
|
176 |
+
esc_url( add_query_arg( 'paged', min( $total_pages, $current+1 ), $current_url ) ),
|
177 |
+
'›'
|
178 |
+
);
|
179 |
+
|
180 |
+
$page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>",
|
181 |
+
'last-page' . $disable_last,
|
182 |
+
esc_attr__('Go to the last page', 'subscribe2'),
|
183 |
+
esc_url( add_query_arg( 'paged', $total_pages, $current_url ) ),
|
184 |
+
'»'
|
185 |
+
);
|
186 |
+
|
187 |
+
$pagination_links_class = 'pagination-links';
|
188 |
+
if ( ! empty( $infinite_scroll ) )
|
189 |
+
$pagination_links_class = ' hide-if-js';
|
190 |
+
$output .= "\n<span class='$pagination_links_class'>" . join( "\n", $page_links ) . '</span>';
|
191 |
+
|
192 |
+
if ( $total_pages )
|
193 |
+
$page_class = $total_pages < 2 ? ' one-page' : '';
|
194 |
+
else
|
195 |
+
$page_class = ' no-pages';
|
196 |
+
|
197 |
+
$this->_pagination = "<div class='tablenav-pages{$page_class}'>$output</div>";
|
198 |
+
|
199 |
+
echo $this->_pagination;
|
200 |
+
}
|
201 |
+
|
202 |
+
function prepare_items() {
|
203 |
+
global $mysubscribe2, $subscribers, $current_tab;
|
204 |
+
if ( is_int($mysubscribe2->subscribe2_options['entries']) ) {
|
205 |
+
$per_page = $mysubscribe2->subscribe2_options['entries'];
|
206 |
+
} else {
|
207 |
+
$per_page = 25;
|
208 |
+
}
|
209 |
+
|
210 |
+
$columns = $this->get_columns();
|
211 |
+
$hidden = array();
|
212 |
+
$sortable = $this->get_sortable_columns();
|
213 |
+
$this->_column_headers = array($columns, $hidden, $sortable);
|
214 |
+
|
215 |
+
$data = array();
|
216 |
+
if ( $current_tab == 'public' ) {
|
217 |
+
foreach((array)$subscribers as $email) {
|
218 |
+
$data[] = array('email' => $email, 'date' => $mysubscribe2->signup_date($email));
|
219 |
+
}
|
220 |
+
} else {
|
221 |
+
foreach((array)$subscribers as $email) {
|
222 |
+
$data[] = array('email' => $email);
|
223 |
+
}
|
224 |
+
}
|
225 |
+
|
226 |
+
function usort_reorder($a,$b) {
|
227 |
+
$orderby = (!empty($_REQUEST['orderby'])) ? $_REQUEST['orderby'] : 'email';
|
228 |
+
$order = (!empty($_REQUEST['order'])) ? $_REQUEST['order'] : 'asc';
|
229 |
+
$result = strcasecmp($a[$orderby], $b[$orderby]);
|
230 |
+
return ($order==='asc') ? $result : -$result;
|
231 |
+
}
|
232 |
+
usort($data, 'usort_reorder');
|
233 |
+
|
234 |
+
if ( isset($_POST['what']) ) {
|
235 |
+
$current_page = 1;
|
236 |
+
} else {
|
237 |
+
$current_page = $this->get_pagenum();
|
238 |
+
}
|
239 |
+
$total_items = count($data);
|
240 |
+
$data = array_slice($data,(($current_page-1)*$per_page),$per_page);
|
241 |
+
$this->items = $data;
|
242 |
+
|
243 |
+
$this->set_pagination_args( array(
|
244 |
+
'total_items' => $total_items,
|
245 |
+
'per_page' => $per_page,
|
246 |
+
'total_pages' => ceil($total_items/$per_page)
|
247 |
+
) );
|
248 |
+
}
|
249 |
+
}
|
250 |
?>
|
classes/class-s2-upgrade.php
CHANGED
@@ -1,342 +1,342 @@
|
|
1 |
-
<?php
|
2 |
-
class s2class_upgrade {
|
3 |
-
function upgrade_core() {
|
4 |
-
// let's take the time to double check data for registered users
|
5 |
-
global $mysubscribe2;
|
6 |
-
if ( version_compare($mysubscribe2->wp_release, '3.5', '<') ) {
|
7 |
-
global $wpdb;
|
8 |
-
$users = $wpdb->get_col($wpdb->prepare("SELECT ID from $wpdb->users WHERE ID NOT IN (SELECT user_id FROM $wpdb->usermeta WHERE meta_key=%s)", $mysubscribe2->get_usermeta_keyname('s2_format')));
|
9 |
-
if ( !empty($users) ) {
|
10 |
-
foreach ($users as $user_ID) {
|
11 |
-
$mysubscribe2->register($user_ID);
|
12 |
-
}
|
13 |
-
}
|
14 |
-
} else {
|
15 |
-
$args = array(
|
16 |
-
'meta_query' => array(
|
17 |
-
array('key' => $mysubscribe2->get_usermeta_keyname('s2_format'), 'compare' => 'NOT EXISTS')
|
18 |
-
)
|
19 |
-
);
|
20 |
-
|
21 |
-
$user_query = new WP_User_Query( $args );
|
22 |
-
$users = $user_query->get_results();
|
23 |
-
if ( !empty($users) ) {
|
24 |
-
foreach ($users as $user) {
|
25 |
-
$mysubscribe2->register($user->ID);
|
26 |
-
}
|
27 |
-
}
|
28 |
-
}
|
29 |
-
} // end upgrade_core()
|
30 |
-
|
31 |
-
function upgrade23() {
|
32 |
-
global $mysubscribe2, $wpdb;
|
33 |
-
|
34 |
-
// include upgrade-functions for maybe_add_column;
|
35 |
-
if ( !function_exists('maybe_add_column') ) {
|
36 |
-
require_once(ABSPATH . 'wp-admin/install-helper.php');
|
37 |
-
}
|
38 |
-
$date = date('Y-m-d');
|
39 |
-
maybe_add_column($mysubscribe2->public, 'date', "ALTER TABLE $mysubscribe2->public ADD date DATE DEFAULT '$date' NOT NULL AFTER active");
|
40 |
-
|
41 |
-
// update the options table to serialized format
|
42 |
-
$old_options = $wpdb->get_col("SELECT option_name from $wpdb->options where option_name LIKE 's2%' AND option_name != 's2_future_posts'");
|
43 |
-
|
44 |
-
if ( !empty($old_options) ) {
|
45 |
-
foreach ( $old_options as $option ) {
|
46 |
-
$value = get_option($option);
|
47 |
-
$option_array = substr($option, 3);
|
48 |
-
$mysubscribe2->subscribe2_options[$option_array] = $value;
|
49 |
-
delete_option($option);
|
50 |
-
}
|
51 |
-
}
|
52 |
-
} // end upgrade23()
|
53 |
-
|
54 |
-
function upgrade51() {
|
55 |
-
global $mysubscribe2;
|
56 |
-
|
57 |
-
// include upgrade-functions for maybe_add_column;
|
58 |
-
if ( !function_exists('maybe_add_column') ) {
|
59 |
-
require_once(ABSPATH . 'wp-admin/install-helper.php');
|
60 |
-
}
|
61 |
-
maybe_add_column($mysubscribe2->public, 'ip', "ALTER TABLE $mysubscribe2->public ADD ip char(64) DEFAULT 'admin' NOT NULL AFTER date");
|
62 |
-
} // end upgrade51()
|
63 |
-
|
64 |
-
function upgrade56(){
|
65 |
-
global $mysubscribe2;
|
66 |
-
// correct autoformat to upgrade from pre 5.6
|
67 |
-
if ( $mysubscribe2->subscribe2_options['autoformat'] == 'text' ) {
|
68 |
-
$mysubscribe2->subscribe2_options['autoformat'] = 'excerpt';
|
69 |
-
}
|
70 |
-
if ( $mysubscribe2->subscribe2_options['autoformat'] == 'full' ) {
|
71 |
-
$mysubscribe2->subscribe2_options['autoformat'] = 'post';
|
72 |
-
}
|
73 |
-
} // end upgrade56()
|
74 |
-
|
75 |
-
function upgrade59() {
|
76 |
-
global $mysubscribe2, $wpdb;
|
77 |
-
// ensure existing public subscriber emails are all sanitized
|
78 |
-
$confirmed = $mysubscribe2->get_public();
|
79 |
-
$unconfirmed = $mysubscribe2->get_public(0);
|
80 |
-
$public_subscribers = array_merge((array)$confirmed, (array)$unconfirmed);
|
81 |
-
|
82 |
-
foreach ( $public_subscribers as $email ) {
|
83 |
-
$new_email = $mysubscribe2->sanitize_email($email);
|
84 |
-
if ( $email !== $new_email ) {
|
85 |
-
$wpdb->get_results($wpdb->prepare("UPDATE $mysubscribe2->public SET email=%s WHERE CAST(email as binary)=%s", $new_email, $email));
|
86 |
-
}
|
87 |
-
}
|
88 |
-
} // end upgrade59()
|
89 |
-
|
90 |
-
function upgrade64() {
|
91 |
-
global $mysubscribe2;
|
92 |
-
// change old CAPITALISED keywords to those in {PARENTHESES}; since version 6.4
|
93 |
-
$keywords = array('BLOGNAME', 'BLOGLINK', 'TITLE', 'POST', 'POSTTIME', 'TABLE', 'TABLELINKS', 'PERMALINK', 'TINYLINK', 'DATE', 'TIME', 'MYNAME', 'EMAIL', 'AUTHORNAME', 'LINK', 'CATS', 'TAGS', 'COUNT', 'ACTION');
|
94 |
-
$keyword = implode('|', $keywords);
|
95 |
-
$regex = '/(?<!\{)\b('.$keyword.')\b(?!\{)/xm';
|
96 |
-
$replace = '{\1}';
|
97 |
-
$mysubscribe2->subscribe2_options['mailtext'] = preg_replace($regex, $replace, $mysubscribe2->subscribe2_options['mailtext']);
|
98 |
-
$mysubscribe2->subscribe2_options['notification_subject'] = preg_replace($regex, $replace, $mysubscribe2->subscribe2_options['notification_subject']);
|
99 |
-
$mysubscribe2->subscribe2_options['confirm_email'] = preg_replace($regex, $replace, $mysubscribe2->subscribe2_options['confirm_email']);
|
100 |
-
$mysubscribe2->subscribe2_options['confirm_subject'] = preg_replace($regex, $replace, $mysubscribe2->subscribe2_options['confirm_subject']);
|
101 |
-
$mysubscribe2->subscribe2_options['remind_email'] = preg_replace($regex, $replace, $mysubscribe2->subscribe2_options['remind_email']);
|
102 |
-
$mysubscribe2->subscribe2_options['remind_subject'] = preg_replace($regex, $replace, $mysubscribe2->subscribe2_options['remind_subject']);
|
103 |
-
|
104 |
-
if ( version_compare($mysubscribe2->wp_release, '3.5', '<') ) {
|
105 |
-
$users = $mysubscribe2->get_all_registered('ID');
|
106 |
-
foreach ( $users as $user_ID ) {
|
107 |
-
$check_format = get_user_meta($user_ID, $mysubscribe2->get_usermeta_keyname('s2_format'), true);
|
108 |
-
// if user is already registered update format remove 's2_excerpt' field and update 's2_format'
|
109 |
-
if ( 'html' == $check_format ) {
|
110 |
-
delete_user_meta($user_ID, 's2_excerpt');
|
111 |
-
} elseif ( 'text' == $check_format ) {
|
112 |
-
update_user_meta($user_ID, $mysubscribe2->get_usermeta_keyname('s2_format'), get_user_meta($user_ID, 's2_excerpt'));
|
113 |
-
delete_user_meta($user_ID, 's2_excerpt');
|
114 |
-
}
|
115 |
-
$subscribed = get_user_meta($user_ID, $mysubscribe2->get_usermeta_keyname('s2_subscribed'), true);
|
116 |
-
if ( strstr($subscribed, '-1') ) {
|
117 |
-
// make sure we remove '-1' from any settings
|
118 |
-
$old_cats = explode(',', $subscribed);
|
119 |
-
$pos = array_search('-1', $old_cats);
|
120 |
-
unset($old_cats[$pos]);
|
121 |
-
$cats = implode(',', $old_cats);
|
122 |
-
update_user_meta($user_ID, $mysubscribe2->get_usermeta_keyname('s2_subscribed'), $cats);
|
123 |
-
}
|
124 |
-
}
|
125 |
-
} else {
|
126 |
-
$args = array(
|
127 |
-
'relation' => 'AND',
|
128 |
-
'meta_query' => array(
|
129 |
-
array('key' => $mysubscribe2->get_usermeta_keyname('s2_format'),
|
130 |
-
'value' => 'html')
|
131 |
-
),
|
132 |
-
'meta_query' => array(
|
133 |
-
array('key' => 's2_excerpt',
|
134 |
-
'compare' => 'EXISTS')
|
135 |
-
)
|
136 |
-
);
|
137 |
-
|
138 |
-
$user_query = new WP_User_Query( $args );
|
139 |
-
$users = $user_query->get_results();
|
140 |
-
if ( !empty($users) ) {
|
141 |
-
foreach ($users as $user) {
|
142 |
-
delete_user_meta($user->ID, 's2_excerpt');
|
143 |
-
}
|
144 |
-
}
|
145 |
-
|
146 |
-
$args = array(
|
147 |
-
'relation' => 'AND',
|
148 |
-
'meta_query' => array(
|
149 |
-
array('key' => $mysubscribe2->get_usermeta_keyname('s2_format'),
|
150 |
-
'value' => 'text')
|
151 |
-
),
|
152 |
-
'meta_query' => array(
|
153 |
-
array('key' => 's2_excerpt',
|
154 |
-
'compare' => 'EXISTS')
|
155 |
-
)
|
156 |
-
);
|
157 |
-
|
158 |
-
$user_query = new WP_User_Query( $args );
|
159 |
-
$users = $user_query->get_results();
|
160 |
-
if ( !empty($users) ) {
|
161 |
-
foreach ($users as $user) {
|
162 |
-
update_user_meta($user->ID, $mysubscribe2->get_usermeta_keyname('s2_format'), get_user_meta($user->ID, 's2_excerpt'));
|
163 |
-
delete_user_meta($user->ID, 's2_excerpt');
|
164 |
-
}
|
165 |
-
}
|
166 |
-
|
167 |
-
$args = array(
|
168 |
-
'meta_query' => array(
|
169 |
-
array('key' => $mysubscribe2->get_usermeta_keyname('s2_subscribed'),
|
170 |
-
'value' => '-1',
|
171 |
-
'compare' => 'LIKE')
|
172 |
-
)
|
173 |
-
);
|
174 |
-
|
175 |
-
$user_query = new WP_User_Query( $args );
|
176 |
-
$users = $user_query->get_results();
|
177 |
-
if ( !empty($users) ) {
|
178 |
-
foreach ($users as $user) {
|
179 |
-
$subscribed = get_user_meta($user->ID, $mysubscribe2->get_usermeta_keyname('s2_subscribed'), true);
|
180 |
-
$old_cats = explode(',', $subscribed);
|
181 |
-
$pos = array_search('-1', $old_cats);
|
182 |
-
unset($old_cats[$pos]);
|
183 |
-
$cats = implode(',', $old_cats);
|
184 |
-
update_user_meta($user->ID, $mysubscribe2->get_usermeta_keyname('s2_subscribed'), $cats);
|
185 |
-
}
|
186 |
-
}
|
187 |
-
}
|
188 |
-
|
189 |
-
// upgrade old wpmu user meta data to new
|
190 |
-
if ( $mysubscribe2->s2_mu === true ) {
|
191 |
-
global $s2class_multisite, $wpdb;
|
192 |
-
$s2class_multisite->namechange_subscribe2_widget();
|
193 |
-
// loop through all users
|
194 |
-
foreach ( $users as $user_ID ) {
|
195 |
-
// get categories which the user is subscribed to (old ones)
|
196 |
-
$categories = get_user_meta($user_ID, 's2_subscribed', true);
|
197 |
-
$categories = explode(',', $categories);
|
198 |
-
$format = get_user_meta($user_ID, 's2_format', true);
|
199 |
-
$autosub = get_user_meta($user_ID, 's2_autosub', true);
|
200 |
-
|
201 |
-
// load blogs of user (only if we need them)
|
202 |
-
$blogs = array();
|
203 |
-
if ( count($categories) > 0 && !in_array('-1', $categories) ) {
|
204 |
-
$blogs = get_blogs_of_user($user_ID, true);
|
205 |
-
}
|
206 |
-
|
207 |
-
foreach ( $blogs as $blog ) {
|
208 |
-
switch_to_blog($blog->userblog_id);
|
209 |
-
|
210 |
-
$blog_categories = (array)$wpdb->get_col("SELECT term_id FROM $wpdb->term_taxonomy WHERE taxonomy = 'category'");
|
211 |
-
$subscribed_categories = array_intersect($categories, $blog_categories);
|
212 |
-
if ( !empty($subscribed_categories) ) {
|
213 |
-
foreach ( $subscribed_categories as $subscribed_category ) {
|
214 |
-
update_user_meta($user_ID, $mysubscribe2->get_usermeta_keyname('s2_cat') . $subscribed_category, $subscribed_category);
|
215 |
-
}
|
216 |
-
update_user_meta($user_ID, $mysubscribe2->get_usermeta_keyname('s2_subscribed'), implode(',', $subscribed_categories));
|
217 |
-
}
|
218 |
-
if ( !empty($format) ) {
|
219 |
-
update_user_meta($user_ID, $mysubscribe2->get_usermeta_keyname('s2_format'), $format);
|
220 |
-
}
|
221 |
-
if ( !empty($autosub) ) {
|
222 |
-
update_user_meta($user_ID, $mysubscribe2->get_usermeta_keyname('s2_autosub'), $autosub);
|
223 |
-
}
|
224 |
-
restore_current_blog();
|
225 |
-
}
|
226 |
-
|
227 |
-
// delete old user meta keys
|
228 |
-
delete_user_meta($user_ID, 's2_subscribed');
|
229 |
-
delete_user_meta($user_ID, 's2_format');
|
230 |
-
delete_user_meta($user_ID, 's2_autosub');
|
231 |
-
foreach ( $categories as $cat ) {
|
232 |
-
delete_user_meta($user_ID, 's2_cat' . $cat);
|
233 |
-
}
|
234 |
-
}
|
235 |
-
}
|
236 |
-
} // end upgrade64()
|
237 |
-
|
238 |
-
function upgrade70() {
|
239 |
-
global $mysubscribe2;
|
240 |
-
if ( version_compare($mysubscribe2->wp_release, '3.5', '<') ) {
|
241 |
-
$users = $mysubscribe2->get_all_registered('ID');
|
242 |
-
foreach ( $users as $user_ID ) {
|
243 |
-
$check_authors = get_user_meta($user_ID, $mysubscribe2->get_usermeta_keyname('s2_authors'), true);
|
244 |
-
if ( empty($check_authors) ) {
|
245 |
-
update_user_meta($user_ID, $mysubscribe2->get_usermeta_keyname('s2_authors'), '');
|
246 |
-
}
|
247 |
-
}
|
248 |
-
} else {
|
249 |
-
$args = array(
|
250 |
-
'meta_query' => array(
|
251 |
-
array('key' => $mysubscribe2->get_usermeta_keyname('s2_authors'), 'compare' => 'NOT EXISTS')
|
252 |
-
)
|
253 |
-
);
|
254 |
-
|
255 |
-
$user_query = new WP_User_Query( $args );
|
256 |
-
$users = $user_query->get_results();
|
257 |
-
if ( !empty($users) ) {
|
258 |
-
foreach ($users as $user) {
|
259 |
-
update_user_meta($user->ID, $mysubscribe2->get_usermeta_keyname('s2_authors'), '');
|
260 |
-
}
|
261 |
-
}
|
262 |
-
}
|
263 |
-
} // end upgrade70()
|
264 |
-
|
265 |
-
function upgrade85() {
|
266 |
-
global $mysubscribe2, $wpdb;
|
267 |
-
|
268 |
-
// include upgrade-functions for maybe_add_column;
|
269 |
-
if ( !function_exists('maybe_add_column') ) {
|
270 |
-
require_once(ABSPATH . 'wp-admin/install-helper.php');
|
271 |
-
}
|
272 |
-
maybe_add_column($mysubscribe2->public, 'time', "ALTER TABLE $mysubscribe2->public ADD time TIME DEFAULT '00:00:00' NOT NULL AFTER date");
|
273 |
-
|
274 |
-
// update postmeta field to a protected name, from version 8.5
|
275 |
-
$wpdb->query( "UPDATE $wpdb->postmeta SET meta_key = '_s2mail' WHERE meta_key = 's2mail'" );
|
276 |
-
} // end upgrade85()
|
277 |
-
|
278 |
-
function upgrade86() {
|
279 |
-
global $mysubscribe2, $wpdb;
|
280 |
-
|
281 |
-
// include upgrade-functions for maybe_add_column;
|
282 |
-
if ( !function_exists('maybe_add_column') ) {
|
283 |
-
require_once(ABSPATH . 'wp-admin/install-helper.php');
|
284 |
-
}
|
285 |
-
maybe_add_column($mysubscribe2->public, 'conf_date', "ALTER TABLE $mysubscribe2->public ADD conf_date DATE AFTER ip");
|
286 |
-
maybe_add_column($mysubscribe2->public, 'conf_time', "ALTER TABLE $mysubscribe2->public ADD conf_time TIME AFTER conf_date");
|
287 |
-
maybe_add_column($mysubscribe2->public, 'conf_ip', "ALTER TABLE $mysubscribe2->public ADD conf_ip char(64) AFTER conf_time");
|
288 |
-
|
289 |
-
// remove unnecessary table data
|
290 |
-
$wpdb->query( "DELETE FROM $wpdb->usermeta WHERE meta_key = 's2_cat'" );
|
291 |
-
|
292 |
-
$sql = "SELECT ID FROM $wpdb->users INNER JOIN $wpdb->usermeta ON ( $wpdb->users.ID = $wpdb->usermeta.user_id) WHERE ( $wpdb->usermeta.meta_key = '" . $mysubscribe2->get_usermeta_keyname('s2_subscribed') . "' AND $wpdb->usermeta.meta_value LIKE ',%' )";
|
293 |
-
$users = $wpdb->get_results($sql);
|
294 |
-
foreach ( $users as $user ) {
|
295 |
-
// make sure we remove leading ',' from this setting
|
296 |
-
$subscribed = get_user_meta($user->ID, $mysubscribe2->get_usermeta_keyname('s2_subscribed'), true);
|
297 |
-
$old_cats = explode(',', $subscribed);
|
298 |
-
unset($old_cats[0]);
|
299 |
-
$cats = implode(',', $old_cats);
|
300 |
-
update_user_meta($user->ID, $mysubscribe2->get_usermeta_keyname('s2_subscribed'), $cats);
|
301 |
-
}
|
302 |
-
} // end upgrade86()
|
303 |
-
|
304 |
-
function upgrade88() {
|
305 |
-
// to ensure compulsory category collects all users we need there to be s2_subscribed meta-keys for all users
|
306 |
-
global $mysubscribe2;
|
307 |
-
|
308 |
-
if ( version_compare($mysubscribe2->wp_release, '3.5', '<') ) {
|
309 |
-
$all_registered = $mysubscribe2->get_all_registered('ID');
|
310 |
-
if ( !empty($all_registered) ) {
|
311 |
-
foreach ( $all_registered as $user_ID ) {
|
312 |
-
$check_subscribed = get_user_meta($user_ID, $mysubscribe2->get_usermeta_keyname('s2_subscribed'), true);
|
313 |
-
if ( empty($check_subscribed) ) {
|
314 |
-
update_user_meta($user_ID, $mysubscribe2->get_usermeta_keyname('s2_subscribed'), '');
|
315 |
-
}
|
316 |
-
}
|
317 |
-
}
|
318 |
-
} else {
|
319 |
-
$args = array(
|
320 |
-
'meta_query' => array(
|
321 |
-
array('key' => $mysubscribe2->get_usermeta_keyname('s2_subscribed'), 'compare' => 'NOT EXISTS')
|
322 |
-
)
|
323 |
-
);
|
324 |
-
|
325 |
-
$user_query = new WP_User_Query( $args );
|
326 |
-
$users = $user_query->get_results();
|
327 |
-
if ( !empty($users) ) {
|
328 |
-
foreach ($users as $user) {
|
329 |
-
update_user_meta($user->ID, $mysubscribe2->get_usermeta_keyname('s2_subscribed'), '');
|
330 |
-
}
|
331 |
-
}
|
332 |
-
}
|
333 |
-
|
334 |
-
// check the time column again as the upgrade86() function contained a bug
|
335 |
-
// include upgrade-functions for maybe_add_column;
|
336 |
-
if ( !function_exists('maybe_add_column') ) {
|
337 |
-
require_once(ABSPATH . 'wp-admin/install-helper.php');
|
338 |
-
}
|
339 |
-
maybe_add_column($mysubscribe2->public, 'time', "ALTER TABLE $mysubscribe2->public ADD time TIME DEFAULT '00:00:00' NOT NULL AFTER date");
|
340 |
-
} // end upgrade88()
|
341 |
-
}
|
342 |
?>
|
1 |
+
<?php
|
2 |
+
class s2class_upgrade {
|
3 |
+
function upgrade_core() {
|
4 |
+
// let's take the time to double check data for registered users
|
5 |
+
global $mysubscribe2;
|
6 |
+
if ( version_compare($mysubscribe2->wp_release, '3.5', '<') ) {
|
7 |
+
global $wpdb;
|
8 |
+
$users = $wpdb->get_col($wpdb->prepare("SELECT ID from $wpdb->users WHERE ID NOT IN (SELECT user_id FROM $wpdb->usermeta WHERE meta_key=%s)", $mysubscribe2->get_usermeta_keyname('s2_format')));
|
9 |
+
if ( !empty($users) ) {
|
10 |
+
foreach ($users as $user_ID) {
|
11 |
+
$mysubscribe2->register($user_ID);
|
12 |
+
}
|
13 |
+
}
|
14 |
+
} else {
|
15 |
+
$args = array(
|
16 |
+
'meta_query' => array(
|
17 |
+
array('key' => $mysubscribe2->get_usermeta_keyname('s2_format'), 'compare' => 'NOT EXISTS')
|
18 |
+
)
|
19 |
+
);
|
20 |
+
|
21 |
+
$user_query = new WP_User_Query( $args );
|
22 |
+
$users = $user_query->get_results();
|
23 |
+
if ( !empty($users) ) {
|
24 |
+
foreach ($users as $user) {
|
25 |
+
$mysubscribe2->register($user->ID);
|
26 |
+
}
|
27 |
+
}
|
28 |
+
}
|
29 |
+
} // end upgrade_core()
|
30 |
+
|
31 |
+
function upgrade23() {
|
32 |
+
global $mysubscribe2, $wpdb;
|
33 |
+
|
34 |
+
// include upgrade-functions for maybe_add_column;
|
35 |
+
if ( !function_exists('maybe_add_column') ) {
|
36 |
+
require_once(ABSPATH . 'wp-admin/install-helper.php');
|
37 |
+
}
|
38 |
+
$date = date('Y-m-d');
|
39 |
+
maybe_add_column($mysubscribe2->public, 'date', "ALTER TABLE $mysubscribe2->public ADD date DATE DEFAULT '$date' NOT NULL AFTER active");
|
40 |
+
|
41 |
+
// update the options table to serialized format
|
42 |
+
$old_options = $wpdb->get_col("SELECT option_name from $wpdb->options where option_name LIKE 's2%' AND option_name != 's2_future_posts'");
|
43 |
+
|
44 |
+
if ( !empty($old_options) ) {
|
45 |
+
foreach ( $old_options as $option ) {
|
46 |
+
$value = get_option($option);
|
47 |
+
$option_array = substr($option, 3);
|
48 |
+
$mysubscribe2->subscribe2_options[$option_array] = $value;
|
49 |
+
delete_option($option);
|
50 |
+
}
|
51 |
+
}
|
52 |
+
} // end upgrade23()
|
53 |
+
|
54 |
+
function upgrade51() {
|
55 |
+
global $mysubscribe2;
|
56 |
+
|
57 |
+
// include upgrade-functions for maybe_add_column;
|
58 |
+
if ( !function_exists('maybe_add_column') ) {
|
59 |
+
require_once(ABSPATH . 'wp-admin/install-helper.php');
|
60 |
+
}
|
61 |
+
maybe_add_column($mysubscribe2->public, 'ip', "ALTER TABLE $mysubscribe2->public ADD ip char(64) DEFAULT 'admin' NOT NULL AFTER date");
|
62 |
+
} // end upgrade51()
|
63 |
+
|
64 |
+
function upgrade56(){
|
65 |
+
global $mysubscribe2;
|
66 |
+
// correct autoformat to upgrade from pre 5.6
|
67 |
+
if ( $mysubscribe2->subscribe2_options['autoformat'] == 'text' ) {
|
68 |
+
$mysubscribe2->subscribe2_options['autoformat'] = 'excerpt';
|
69 |
+
}
|
70 |
+
if ( $mysubscribe2->subscribe2_options['autoformat'] == 'full' ) {
|
71 |
+
$mysubscribe2->subscribe2_options['autoformat'] = 'post';
|
72 |
+
}
|
73 |
+
} // end upgrade56()
|
74 |
+
|
75 |
+
function upgrade59() {
|
76 |
+
global $mysubscribe2, $wpdb;
|
77 |
+
// ensure existing public subscriber emails are all sanitized
|
78 |
+
$confirmed = $mysubscribe2->get_public();
|
79 |
+
$unconfirmed = $mysubscribe2->get_public(0);
|
80 |
+
$public_subscribers = array_merge((array)$confirmed, (array)$unconfirmed);
|
81 |
+
|
82 |
+
foreach ( $public_subscribers as $email ) {
|
83 |
+
$new_email = $mysubscribe2->sanitize_email($email);
|
84 |
+
if ( $email !== $new_email ) {
|
85 |
+
$wpdb->get_results($wpdb->prepare("UPDATE $mysubscribe2->public SET email=%s WHERE CAST(email as binary)=%s", $new_email, $email));
|
86 |
+
}
|
87 |
+
}
|
88 |
+
} // end upgrade59()
|
89 |
+
|
90 |
+
function upgrade64() {
|
91 |
+
global $mysubscribe2;
|
92 |
+
// change old CAPITALISED keywords to those in {PARENTHESES}; since version 6.4
|
93 |
+
$keywords = array('BLOGNAME', 'BLOGLINK', 'TITLE', 'POST', 'POSTTIME', 'TABLE', 'TABLELINKS', 'PERMALINK', 'TINYLINK', 'DATE', 'TIME', 'MYNAME', 'EMAIL', 'AUTHORNAME', 'LINK', 'CATS', 'TAGS', 'COUNT', 'ACTION');
|
94 |
+
$keyword = implode('|', $keywords);
|
95 |
+
$regex = '/(?<!\{)\b('.$keyword.')\b(?!\{)/xm';
|
96 |
+
$replace = '{\1}';
|
97 |
+
$mysubscribe2->subscribe2_options['mailtext'] = preg_replace($regex, $replace, $mysubscribe2->subscribe2_options['mailtext']);
|
98 |
+
$mysubscribe2->subscribe2_options['notification_subject'] = preg_replace($regex, $replace, $mysubscribe2->subscribe2_options['notification_subject']);
|
99 |
+
$mysubscribe2->subscribe2_options['confirm_email'] = preg_replace($regex, $replace, $mysubscribe2->subscribe2_options['confirm_email']);
|
100 |
+
$mysubscribe2->subscribe2_options['confirm_subject'] = preg_replace($regex, $replace, $mysubscribe2->subscribe2_options['confirm_subject']);
|
101 |
+
$mysubscribe2->subscribe2_options['remind_email'] = preg_replace($regex, $replace, $mysubscribe2->subscribe2_options['remind_email']);
|
102 |
+
$mysubscribe2->subscribe2_options['remind_subject'] = preg_replace($regex, $replace, $mysubscribe2->subscribe2_options['remind_subject']);
|
103 |
+
|
104 |
+
if ( version_compare($mysubscribe2->wp_release, '3.5', '<') ) {
|
105 |
+
$users = $mysubscribe2->get_all_registered('ID');
|
106 |
+
foreach ( $users as $user_ID ) {
|
107 |
+
$check_format = get_user_meta($user_ID, $mysubscribe2->get_usermeta_keyname('s2_format'), true);
|
108 |
+
// if user is already registered update format remove 's2_excerpt' field and update 's2_format'
|
109 |
+
if ( 'html' == $check_format ) {
|
110 |
+
delete_user_meta($user_ID, 's2_excerpt');
|
111 |
+
} elseif ( 'text' == $check_format ) {
|
112 |
+
update_user_meta($user_ID, $mysubscribe2->get_usermeta_keyname('s2_format'), get_user_meta($user_ID, 's2_excerpt'));
|
113 |
+
delete_user_meta($user_ID, 's2_excerpt');
|
114 |
+
}
|
115 |
+
$subscribed = get_user_meta($user_ID, $mysubscribe2->get_usermeta_keyname('s2_subscribed'), true);
|
116 |
+
if ( strstr($subscribed, '-1') ) {
|
117 |
+
// make sure we remove '-1' from any settings
|
118 |
+
$old_cats = explode(',', $subscribed);
|
119 |
+
$pos = array_search('-1', $old_cats);
|
120 |
+
unset($old_cats[$pos]);
|
121 |
+
$cats = implode(',', $old_cats);
|
122 |
+
update_user_meta($user_ID, $mysubscribe2->get_usermeta_keyname('s2_subscribed'), $cats);
|
123 |
+
}
|
124 |
+
}
|
125 |
+
} else {
|
126 |
+
$args = array(
|
127 |
+
'relation' => 'AND',
|
128 |
+
'meta_query' => array(
|
129 |
+
array('key' => $mysubscribe2->get_usermeta_keyname('s2_format'),
|
130 |
+
'value' => 'html')
|
131 |
+
),
|
132 |
+
'meta_query' => array(
|
133 |
+
array('key' => 's2_excerpt',
|
134 |
+
'compare' => 'EXISTS')
|
135 |
+
)
|
136 |
+
);
|
137 |
+
|
138 |
+
$user_query = new WP_User_Query( $args );
|
139 |
+
$users = $user_query->get_results();
|
140 |
+
if ( !empty($users) ) {
|
141 |
+
foreach ($users as $user) {
|
142 |
+
delete_user_meta($user->ID, 's2_excerpt');
|
143 |
+
}
|
144 |
+
}
|
145 |
+
|
146 |
+
$args = array(
|
147 |
+
'relation' => 'AND',
|
148 |
+
'meta_query' => array(
|
149 |
+
array('key' => $mysubscribe2->get_usermeta_keyname('s2_format'),
|
150 |
+
'value' => 'text')
|
151 |
+
),
|
152 |
+
'meta_query' => array(
|
153 |
+
array('key' => 's2_excerpt',
|
154 |
+
'compare' => 'EXISTS')
|
155 |
+
)
|
156 |
+
);
|
157 |
+
|
158 |
+
$user_query = new WP_User_Query( $args );
|
159 |
+
$users = $user_query->get_results();
|
160 |
+
if ( !empty($users) ) {
|
161 |
+
foreach ($users as $user) {
|
162 |
+
update_user_meta($user->ID, $mysubscribe2->get_usermeta_keyname('s2_format'), get_user_meta($user->ID, 's2_excerpt'));
|
163 |
+
delete_user_meta($user->ID, 's2_excerpt');
|
164 |
+
}
|
165 |
+
}
|
166 |
+
|
167 |
+
$args = array(
|
168 |
+
'meta_query' => array(
|
169 |
+
array('key' => $mysubscribe2->get_usermeta_keyname('s2_subscribed'),
|
170 |
+
'value' => '-1',
|
171 |
+
'compare' => 'LIKE')
|
172 |
+
)
|
173 |
+
);
|
174 |
+
|
175 |
+
$user_query = new WP_User_Query( $args );
|
176 |
+
$users = $user_query->get_results();
|
177 |
+
if ( !empty($users) ) {
|
178 |
+
foreach ($users as $user) {
|
179 |
+
$subscribed = get_user_meta($user->ID, $mysubscribe2->get_usermeta_keyname('s2_subscribed'), true);
|
180 |
+
$old_cats = explode(',', $subscribed);
|
181 |
+
$pos = array_search('-1', $old_cats);
|
182 |
+
unset($old_cats[$pos]);
|
183 |
+
$cats = implode(',', $old_cats);
|
184 |
+
update_user_meta($user->ID, $mysubscribe2->get_usermeta_keyname('s2_subscribed'), $cats);
|
185 |
+
}
|
186 |
+
}
|
187 |
+
}
|
188 |
+
|
189 |
+
// upgrade old wpmu user meta data to new
|
190 |
+
if ( $mysubscribe2->s2_mu === true ) {
|
191 |
+
global $s2class_multisite, $wpdb;
|
192 |
+
$s2class_multisite->namechange_subscribe2_widget();
|
193 |
+
// loop through all users
|
194 |
+
foreach ( $users as $user_ID ) {
|
195 |
+
// get categories which the user is subscribed to (old ones)
|
196 |
+
$categories = get_user_meta($user_ID, 's2_subscribed', true);
|
197 |
+
$categories = explode(',', $categories);
|
198 |
+
$format = get_user_meta($user_ID, 's2_format', true);
|
199 |
+
$autosub = get_user_meta($user_ID, 's2_autosub', true);
|
200 |
+
|
201 |
+
// load blogs of user (only if we need them)
|
202 |
+
$blogs = array();
|
203 |
+
if ( count($categories) > 0 && !in_array('-1', $categories) ) {
|
204 |
+
$blogs = get_blogs_of_user($user_ID, true);
|
205 |
+
}
|
206 |
+
|
207 |
+
foreach ( $blogs as $blog ) {
|
208 |
+
switch_to_blog($blog->userblog_id);
|
209 |
+
|
210 |
+
$blog_categories = (array)$wpdb->get_col("SELECT term_id FROM $wpdb->term_taxonomy WHERE taxonomy = 'category'");
|
211 |
+
$subscribed_categories = array_intersect($categories, $blog_categories);
|
212 |
+
if ( !empty($subscribed_categories) ) {
|
213 |
+
foreach ( $subscribed_categories as $subscribed_category ) {
|
214 |
+
update_user_meta($user_ID, $mysubscribe2->get_usermeta_keyname('s2_cat') . $subscribed_category, $subscribed_category);
|
215 |
+
}
|
216 |
+
update_user_meta($user_ID, $mysubscribe2->get_usermeta_keyname('s2_subscribed'), implode(',', $subscribed_categories));
|
217 |
+
}
|
218 |
+
if ( !empty($format) ) {
|
219 |
+
update_user_meta($user_ID, $mysubscribe2->get_usermeta_keyname('s2_format'), $format);
|
220 |
+
}
|
221 |
+
if ( !empty($autosub) ) {
|
222 |
+
update_user_meta($user_ID, $mysubscribe2->get_usermeta_keyname('s2_autosub'), $autosub);
|
223 |
+
}
|
224 |
+
restore_current_blog();
|
225 |
+
}
|
226 |
+
|
227 |
+
// delete old user meta keys
|
228 |
+
delete_user_meta($user_ID, 's2_subscribed');
|
229 |
+
delete_user_meta($user_ID, 's2_format');
|
230 |
+
delete_user_meta($user_ID, 's2_autosub');
|
231 |
+
foreach ( $categories as $cat ) {
|
232 |
+
delete_user_meta($user_ID, 's2_cat' . $cat);
|
233 |
+
}
|
234 |
+
}
|
235 |
+
}
|
236 |
+
} // end upgrade64()
|
237 |
+
|
238 |
+
function upgrade70() {
|
239 |
+
global $mysubscribe2;
|
240 |
+
if ( version_compare($mysubscribe2->wp_release, '3.5', '<') ) {
|
241 |
+
$users = $mysubscribe2->get_all_registered('ID');
|
242 |
+
foreach ( $users as $user_ID ) {
|
243 |
+
$check_authors = get_user_meta($user_ID, $mysubscribe2->get_usermeta_keyname('s2_authors'), true);
|
244 |
+
if ( empty($check_authors) ) {
|
245 |
+
update_user_meta($user_ID, $mysubscribe2->get_usermeta_keyname('s2_authors'), '');
|
246 |
+
}
|
247 |
+
}
|
248 |
+
} else {
|
249 |
+
$args = array(
|
250 |
+
'meta_query' => array(
|
251 |
+
array('key' => $mysubscribe2->get_usermeta_keyname('s2_authors'), 'compare' => 'NOT EXISTS')
|
252 |
+
)
|
253 |
+
);
|
254 |
+
|
255 |
+
$user_query = new WP_User_Query( $args );
|
256 |
+
$users = $user_query->get_results();
|
257 |
+
if ( !empty($users) ) {
|
258 |
+
foreach ($users as $user) {
|
259 |
+
update_user_meta($user->ID, $mysubscribe2->get_usermeta_keyname('s2_authors'), '');
|
260 |
+
}
|
261 |
+
}
|
262 |
+
}
|
263 |
+
} // end upgrade70()
|
264 |
+
|
265 |
+
function upgrade85() {
|
266 |
+
global $mysubscribe2, $wpdb;
|
267 |
+
|
268 |
+
// include upgrade-functions for maybe_add_column;
|
269 |
+
if ( !function_exists('maybe_add_column') ) {
|
270 |
+
require_once(ABSPATH . 'wp-admin/install-helper.php');
|
271 |
+
}
|
272 |
+
maybe_add_column($mysubscribe2->public, 'time', "ALTER TABLE $mysubscribe2->public ADD time TIME DEFAULT '00:00:00' NOT NULL AFTER date");
|
273 |
+
|
274 |
+
// update postmeta field to a protected name, from version 8.5
|
275 |
+
$wpdb->query( "UPDATE $wpdb->postmeta SET meta_key = '_s2mail' WHERE meta_key = 's2mail'" );
|
276 |
+
} // end upgrade85()
|
277 |
+
|
278 |
+
function upgrade86() {
|
279 |
+
global $mysubscribe2, $wpdb;
|
280 |
+
|
281 |
+
// include upgrade-functions for maybe_add_column;
|
282 |
+
if ( !function_exists('maybe_add_column') ) {
|
283 |
+
require_once(ABSPATH . 'wp-admin/install-helper.php');
|
284 |
+
}
|
285 |
+
maybe_add_column($mysubscribe2->public, 'conf_date', "ALTER TABLE $mysubscribe2->public ADD conf_date DATE AFTER ip");
|
286 |
+
maybe_add_column($mysubscribe2->public, 'conf_time', "ALTER TABLE $mysubscribe2->public ADD conf_time TIME AFTER conf_date");
|
287 |
+
maybe_add_column($mysubscribe2->public, 'conf_ip', "ALTER TABLE $mysubscribe2->public ADD conf_ip char(64) AFTER conf_time");
|
288 |
+
|
289 |
+
// remove unnecessary table data
|
290 |
+
$wpdb->query( "DELETE FROM $wpdb->usermeta WHERE meta_key = 's2_cat'" );
|
291 |
+
|
292 |
+
$sql = "SELECT ID FROM $wpdb->users INNER JOIN $wpdb->usermeta ON ( $wpdb->users.ID = $wpdb->usermeta.user_id) WHERE ( $wpdb->usermeta.meta_key = '" . $mysubscribe2->get_usermeta_keyname('s2_subscribed') . "' AND $wpdb->usermeta.meta_value LIKE ',%' )";
|
293 |
+
$users = $wpdb->get_results($sql);
|
294 |
+
foreach ( $users as $user ) {
|
295 |
+
// make sure we remove leading ',' from this setting
|
296 |
+
$subscribed = get_user_meta($user->ID, $mysubscribe2->get_usermeta_keyname('s2_subscribed'), true);
|
297 |
+
$old_cats = explode(',', $subscribed);
|
298 |
+
unset($old_cats[0]);
|
299 |
+
$cats = implode(',', $old_cats);
|
300 |
+
update_user_meta($user->ID, $mysubscribe2->get_usermeta_keyname('s2_subscribed'), $cats);
|
301 |
+
}
|
302 |
+
} // end upgrade86()
|
303 |
+
|
304 |
+
function upgrade88() {
|
305 |
+
// to ensure compulsory category collects all users we need there to be s2_subscribed meta-keys for all users
|
306 |
+
global $mysubscribe2;
|
307 |
+
|
308 |
+
if ( version_compare($mysubscribe2->wp_release, '3.5', '<') ) {
|
309 |
+
$all_registered = $mysubscribe2->get_all_registered('ID');
|
310 |
+
if ( !empty($all_registered) ) {
|
311 |
+
foreach ( $all_registered as $user_ID ) {
|
312 |
+
$check_subscribed = get_user_meta($user_ID, $mysubscribe2->get_usermeta_keyname('s2_subscribed'), true);
|
313 |
+
if ( empty($check_subscribed) ) {
|
314 |
+
update_user_meta($user_ID, $mysubscribe2->get_usermeta_keyname('s2_subscribed'), '');
|
315 |
+
}
|
316 |
+
}
|
317 |
+
}
|
318 |
+
} else {
|
319 |
+
$args = array(
|
320 |
+
'meta_query' => array(
|
321 |
+
array('key' => $mysubscribe2->get_usermeta_keyname('s2_subscribed'), 'compare' => 'NOT EXISTS')
|
322 |
+
)
|
323 |
+
);
|
324 |
+
|
325 |
+
$user_query = new WP_User_Query( $args );
|
326 |
+
$users = $user_query->get_results();
|
327 |
+
if ( !empty($users) ) {
|
328 |
+
foreach ($users as $user) {
|
329 |
+
update_user_meta($user->ID, $mysubscribe2->get_usermeta_keyname('s2_subscribed'), '');
|
330 |
+
}
|
331 |
+
}
|
332 |
+
}
|
333 |
+
|
334 |
+
// check the time column again as the upgrade86() function contained a bug
|
335 |
+
// include upgrade-functions for maybe_add_column;
|
336 |
+
if ( !function_exists('maybe_add_column') ) {
|
337 |
+
require_once(ABSPATH . 'wp-admin/install-helper.php');
|
338 |
+
}
|
339 |
+
maybe_add_column($mysubscribe2->public, 'time', "ALTER TABLE $mysubscribe2->public ADD time TIME DEFAULT '00:00:00' NOT NULL AFTER date");
|
340 |
+
} // end upgrade88()
|
341 |
+
}
|
342 |
?>
|
include/counterwidget.php
CHANGED
@@ -30,7 +30,7 @@ class S2_Counter_widget extends WP_Widget {
|
|
30 |
$count = (count($registered) + count($confirmed));
|
31 |
echo "<ul><div style=\"text-align:center; background-color:" . $s2w_bg . "; color:" . $s2w_fg . "; width:" . $s2w_width . "px; height:" . $s2w_height . "px; font:" . $s2w_font . "pt Verdana, Arial, Helvetica, sans-serif; vertical-align:middle; padding:3px; border:1px solid #444;\">";
|
32 |
echo $count;
|
33 |
-
echo "</
|
34 |
echo $after_widget;
|
35 |
}
|
36 |
|
30 |
$count = (count($registered) + count($confirmed));
|
31 |
echo "<ul><div style=\"text-align:center; background-color:" . $s2w_bg . "; color:" . $s2w_fg . "; width:" . $s2w_width . "px; height:" . $s2w_height . "px; font:" . $s2w_font . "pt Verdana, Arial, Helvetica, sans-serif; vertical-align:middle; padding:3px; border:1px solid #444;\">";
|
32 |
echo $count;
|
33 |
+
echo "</div></ul>";
|
34 |
echo $after_widget;
|
35 |
}
|
36 |
|
include/options.php
CHANGED
@@ -139,7 +139,7 @@ if (!isset($this->subscribe2_options['mailtext'])) {
|
|
139 |
} // Default notification email text
|
140 |
|
141 |
if (!isset($this->subscribe2_options['notification_subject'])) {
|
142 |
-
$this->subscribe2_options['notification_subject'] = "[{BLOGNAME}] TITLE";
|
143 |
} // Default notification email subject
|
144 |
|
145 |
if (!isset($this->subscribe2_options['confirm_email'])) {
|
139 |
} // Default notification email text
|
140 |
|
141 |
if (!isset($this->subscribe2_options['notification_subject'])) {
|
142 |
+
$this->subscribe2_options['notification_subject'] = "[{BLOGNAME}] {TITLE}";
|
143 |
} // Default notification email subject
|
144 |
|
145 |
if (!isset($this->subscribe2_options['confirm_email'])) {
|
include/s2_button.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
// version
|
2 |
-
|
1 |
+
// version 2.0 - original version for WordPress versions 3.3 and greater
|
2 |
+
QTags.addButton('Subscribe2', 'Subscribe2', '[subscribe2]');
|
include/s2_button.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
|
1 |
+
QTags.addButton('Subscribe2','Subscribe2','[subscribe2]');
|
include/s2_button2.js
DELETED
@@ -1,2 +0,0 @@
|
|
1 |
-
// version 2.0 - original version for WordPress versions 3.3 and greater
|
2 |
-
QTags.addButton('Subscribe2', 'Subscribe2', '[subscribe2]');
|
|
|
|
include/s2_button2.min.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
QTags.addButton('Subscribe2','Subscribe2','[subscribe2]');
|
|
include/s2_checkbox.js
CHANGED
@@ -1,19 +1,14 @@
|
|
1 |
// version 1.0 - original version
|
2 |
// version 1.1 - Updated with function fixes and for WordPress 3.2 / jQuery 1.6
|
3 |
// version 1.2 - Update to work when DISABLED is specified for changes in version 8.5
|
|
|
4 |
jQuery(document).ready(function () {
|
5 |
// function to check or uncheck all when 'checkall' box it toggled
|
6 |
jQuery('input[name="checkall"]').click(function () {
|
7 |
var checked_status = this.checked;
|
8 |
jQuery('input[class="' + this.value + '"]').each(function () {
|
9 |
-
if (jQuery().
|
10 |
-
|
11 |
-
this.checked = checked_status;
|
12 |
-
}
|
13 |
-
} else {
|
14 |
-
if (jQuery(this).attr('disabled') === false) {
|
15 |
-
this.checked = checked_status;
|
16 |
-
}
|
17 |
}
|
18 |
});
|
19 |
});
|
@@ -26,13 +21,7 @@ jQuery(document).ready(function () {
|
|
26 |
} else {
|
27 |
checked_status = false;
|
28 |
}
|
29 |
-
|
30 |
-
// following can be simplified when WordPress 3.2 is minimum requirement
|
31 |
-
if (jQuery().jquery >= '1.6') {
|
32 |
-
jQuery('input[value="' + this.className + '"]').prop('checked', checked_status);
|
33 |
-
} else {
|
34 |
-
jQuery('input[value="' + this.className + '"]').attr('checked', checked_status);
|
35 |
-
}
|
36 |
});
|
37 |
});
|
38 |
// function to check or uncheck 'checkall' box when page is loaded
|
@@ -43,12 +32,6 @@ jQuery(document).ready(function () {
|
|
43 |
} else {
|
44 |
checked_status = false;
|
45 |
}
|
46 |
-
|
47 |
-
// following can be simplified when WordPress 3.2 is minimum requirement
|
48 |
-
if (jQuery().jquery >= '1.6') {
|
49 |
-
jQuery('input[value="' + this.className + '"]').prop('checked', checked_status);
|
50 |
-
} else {
|
51 |
-
jQuery('input[value="' + this.className + '"]').attr('checked', checked_status);
|
52 |
-
}
|
53 |
});
|
54 |
});
|
1 |
// version 1.0 - original version
|
2 |
// version 1.1 - Updated with function fixes and for WordPress 3.2 / jQuery 1.6
|
3 |
// version 1.2 - Update to work when DISABLED is specified for changes in version 8.5
|
4 |
+
// version 1.3 - Update for Subscribe2 9.0 to remove unecessary code now WordPress 3.3 is minimum requirement
|
5 |
jQuery(document).ready(function () {
|
6 |
// function to check or uncheck all when 'checkall' box it toggled
|
7 |
jQuery('input[name="checkall"]').click(function () {
|
8 |
var checked_status = this.checked;
|
9 |
jQuery('input[class="' + this.value + '"]').each(function () {
|
10 |
+
if (jQuery(this).prop('disabled') === false) {
|
11 |
+
this.checked = checked_status;
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
}
|
13 |
});
|
14 |
});
|
21 |
} else {
|
22 |
checked_status = false;
|
23 |
}
|
24 |
+
jQuery('input[value="' + this.className + '"]').prop('checked', checked_status);
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
});
|
26 |
});
|
27 |
// function to check or uncheck 'checkall' box when page is loaded
|
32 |
} else {
|
33 |
checked_status = false;
|
34 |
}
|
35 |
+
jQuery('input[value="' + this.className + '"]').prop('checked', checked_status);
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
});
|
37 |
});
|
include/s2_checkbox.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(document).ready(function(){jQuery('input[name="checkall"]').click(function(){var checked_status=this.checked;jQuery('input[class="'+this.value+'"]').each(function(){if(jQuery(
|
1 |
+
jQuery(document).ready(function(){jQuery('input[name="checkall"]').click(function(){var checked_status=this.checked;jQuery('input[class="'+this.value+'"]').each(function(){if(jQuery(this).prop('disabled')===false){this.checked=checked_status}})});jQuery('input[class^="checkall"]').click(function(){var checked_status=true;jQuery('input[class="'+this.className+'"]').each(function(){if((this.checked===true)&&(checked_status===true)){checked_status=true}else{checked_status=false}jQuery('input[value="'+this.className+'"]').prop('checked',checked_status)})});var checked_status=true;jQuery('input[class^="checkall"]').each(function(){if((this.checked===true)&&(checked_status===true)){checked_status=true}else{checked_status=false}jQuery('input[value="'+this.className+'"]').prop('checked',checked_status)})});
|
include/s2_colorpicker.js
CHANGED
@@ -1,46 +1,27 @@
|
|
1 |
// version 1.0 - original version
|
|
|
2 |
jQuery(document).ready(function () {
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
}
|
15 |
-
});
|
16 |
-
jQuery.farbtastic('#' + picker).linkTo(this);
|
17 |
-
jQuery('#' + picker).slideDown();
|
18 |
}
|
19 |
});
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
jQuery(
|
27 |
-
var picker,
|
28 |
-
field = jQuery(this).attr('id').substr(0, 20);
|
29 |
-
jQuery('.s2_colorpicker').each(function () {
|
30 |
-
if (jQuery(this).attr('id').search(field) !== -1) {
|
31 |
-
picker = jQuery(this).attr('id');
|
32 |
-
return false; // stop looping
|
33 |
-
}
|
34 |
-
});
|
35 |
-
jQuery(this).on('focusin', function (event) {
|
36 |
-
jQuery('.s2_colorpicker').hide();
|
37 |
-
jQuery.farbtastic('#' + picker).linkTo(this);
|
38 |
-
jQuery('#' + picker).slideDown();
|
39 |
-
});
|
40 |
-
jQuery(this).on('focusout', function (event) {
|
41 |
-
jQuery('#' + picker).slideUp();
|
42 |
-
});
|
43 |
-
jQuery(this).trigger('focus'); // retrigger focus event for plugin to work
|
44 |
});
|
45 |
-
|
|
|
46 |
});
|
1 |
// version 1.0 - original version
|
2 |
+
// version 1.1 - Update for Subscribe2 9.0 to remove unecessary code now WordPress 3.3 is minimum requirement
|
3 |
jQuery(document).ready(function () {
|
4 |
+
jQuery(document).on('focus', '.colorpickerField', function () {
|
5 |
+
if (jQuery(this).is('.s2_initialised') || this.id.search('__i__') !== -1) {
|
6 |
+
return; // exit early, already initialized or not activated
|
7 |
+
}
|
8 |
+
jQuery(this).addClass('s2_initialised');
|
9 |
+
var picker,
|
10 |
+
field = jQuery(this).attr('id').substr(0, 20);
|
11 |
+
jQuery('.s2_colorpicker').each(function () {
|
12 |
+
if (jQuery(this).attr('id').search(field) !== -1) {
|
13 |
+
picker = jQuery(this).attr('id');
|
14 |
+
return false; // stop looping
|
|
|
|
|
|
|
|
|
15 |
}
|
16 |
});
|
17 |
+
jQuery(this).on('focusin', function (event) {
|
18 |
+
jQuery('.s2_colorpicker').hide();
|
19 |
+
jQuery.farbtastic('#' + picker).linkTo(this);
|
20 |
+
jQuery('#' + picker).slideDown();
|
21 |
+
});
|
22 |
+
jQuery(this).on('focusout', function (event) {
|
23 |
+
jQuery('#' + picker).slideUp();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
});
|
25 |
+
jQuery(this).trigger('focus');
|
26 |
+
});
|
27 |
});
|
include/s2_colorpicker.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(document).ready(function(){
|
1 |
+
jQuery(document).ready(function(){jQuery(document).on('focus','.colorpickerField',function(){if(jQuery(this).is('.s2_initialised')||this.id.search('__i__')!==-1){return}jQuery(this).addClass('s2_initialised');var picker,field=jQuery(this).attr('id').substr(0,20);jQuery('.s2_colorpicker').each(function(){if(jQuery(this).attr('id').search(field)!==-1){picker=jQuery(this).attr('id');return false}});jQuery(this).on('focusin',function(event){jQuery('.s2_colorpicker').hide();jQuery.farbtastic('#'+picker).linkTo(this);jQuery('#'+picker).slideDown()});jQuery(this).on('focusout',function(event){jQuery('#'+picker).slideUp()});jQuery(this).trigger('focus')})});
|
include/s2_date_time.js
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Version 1.0 - original version
|
2 |
+
jQuery(document).ready(function() {
|
3 |
+
jQuery('#s2datepicker').datepicker({
|
4 |
+
dateFormat : 'MM d, yy'
|
5 |
+
});
|
6 |
+
});
|
include/s2_date_time.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
jQuery(document).ready(function(){jQuery('#s2datepicker').datepicker({dateFormat:'MM d, yy'})});
|
include/s2_edit.js
CHANGED
@@ -1,9 +1,11 @@
|
|
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 |
|
9 |
//show span on clicking the edit link
|
@@ -22,7 +24,6 @@ function s2_hide(id) {
|
|
22 |
|
23 |
function s2_update(id) {
|
24 |
var input = jQuery('input[name="' + id + '"]').val();
|
25 |
-
jQuery('input[name="' + id + '"]').val(input);
|
26 |
jQuery('#s2' + id).html(input);
|
27 |
s2_hide(id);
|
28 |
}
|
@@ -32,4 +33,24 @@ function s2_revert(id) {
|
|
32 |
jQuery('input[name="' + id + '"]').val(option);
|
33 |
jQuery('#s2' + id).html(option);
|
34 |
s2_hide(id);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
}
|
1 |
// Version 1.0 - original version
|
2 |
// Version 1.1 - updated for Subscribe2 8.6
|
3 |
+
// Version 1.2 - updated for Subscribe2 9.0
|
4 |
jQuery(document).ready(function () {
|
5 |
// hide our span before page loads
|
6 |
jQuery('#s2bcclimit_2').hide();
|
7 |
jQuery('#s2entries_2').hide();
|
8 |
+
jQuery('#s2cron_2').hide();
|
9 |
});
|
10 |
|
11 |
//show span on clicking the edit link
|
24 |
|
25 |
function s2_update(id) {
|
26 |
var input = jQuery('input[name="' + id + '"]').val();
|
|
|
27 |
jQuery('#s2' + id).html(input);
|
28 |
s2_hide(id);
|
29 |
}
|
33 |
jQuery('input[name="' + id + '"]').val(option);
|
34 |
jQuery('#s2' + id).html(option);
|
35 |
s2_hide(id);
|
36 |
+
}
|
37 |
+
|
38 |
+
function s2_cron_update(id) {
|
39 |
+
var date = jQuery('input[name="' + id + 'date"]').val();
|
40 |
+
jQuery('#s2' + id + 'date').html(date);
|
41 |
+
var time = jQuery('select[name="' + id + 'time"] option:selected').html();
|
42 |
+
jQuery('#s2' + id + 'time').html(time);
|
43 |
+
s2_hide(id);
|
44 |
+
}
|
45 |
+
|
46 |
+
function s2_cron_revert(id) {
|
47 |
+
var date = jQuery('#js' + id + 'date').val();
|
48 |
+
jQuery('input[name="' + id + 'date"]').val(date);
|
49 |
+
jQuery('#s2' + id + 'date').html(date);
|
50 |
+
var time = jQuery('#js' + id + 'time').val();
|
51 |
+
jQuery('[name='+ id + 'time] option').filter(function() {
|
52 |
+
return (this.text == time);
|
53 |
+
}).prop('selected', true).parent().focus();
|
54 |
+
jQuery('#s2' + id + 'time').html(time);
|
55 |
+
s2_hide(id);
|
56 |
}
|
include/s2_edit.min.js
CHANGED
@@ -1 +1 @@
|
|
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(
|
1 |
+
jQuery(document).ready(function(){jQuery('#s2bcclimit_2').hide();jQuery('#s2entries_2').hide();jQuery('#s2cron_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('#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)}function s2_cron_update(id){var date=jQuery('input[name="'+id+'date"]').val();jQuery('#s2'+id+'date').html(date);var time=jQuery('select[name="'+id+'time"] option:selected').html();jQuery('#s2'+id+'time').html(time);s2_hide(id)}function s2_cron_revert(id){var date=jQuery('#js'+id+'date').val();jQuery('input[name="'+id+'date"]').val(date);jQuery('#s2'+id+'date').html(date);var time=jQuery('#js'+id+'time').val();jQuery('[name='+id+'time] option').filter(function(){return(this.text==time)}).prop('selected',true).parent().focus();jQuery('#s2'+id+'time').html(time);s2_hide(id)}
|
include/s2_user_admin.css
CHANGED
@@ -1,69 +1,69 @@
|
|
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 {
|
19 |
-
border-color: #666;
|
20 |
-
}
|
21 |
-
|
22 |
-
ul.s2_blogs li .name {
|
23 |
-
display: block;
|
24 |
-
float: left;
|
25 |
-
}
|
26 |
-
|
27 |
-
ul.s2_blogs li .buttons {
|
28 |
-
display: block;
|
29 |
-
float: right;
|
30 |
-
margin-left: -6px;
|
31 |
-
white-space: nowrap;
|
32 |
-
font-size: .8em;
|
33 |
-
}
|
34 |
-
|
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 {
|
45 |
-
background-color: whitesmoke;
|
46 |
-
color: #666;
|
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 {
|
68 |
-
display: block;
|
69 |
}
|
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 {
|
19 |
+
border-color: #666;
|
20 |
+
}
|
21 |
+
|
22 |
+
ul.s2_blogs li .name {
|
23 |
+
display: block;
|
24 |
+
float: left;
|
25 |
+
}
|
26 |
+
|
27 |
+
ul.s2_blogs li .buttons {
|
28 |
+
display: block;
|
29 |
+
float: right;
|
30 |
+
margin-left: -6px;
|
31 |
+
white-space: nowrap;
|
32 |
+
font-size: .8em;
|
33 |
+
}
|
34 |
+
|
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 {
|
45 |
+
background-color: whitesmoke;
|
46 |
+
color: #666;
|
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 {
|
68 |
+
display: block;
|
69 |
}
|
include/widget.php
CHANGED
@@ -22,6 +22,7 @@ class S2_Form_widget extends WP_Widget {
|
|
22 |
$hidebutton = empty($instance['hidebutton']) ? 'none' : $instance['hidebutton'];
|
23 |
$postto = empty($instance['postto']) ? '' : $instance['postto'];
|
24 |
$js = empty($instance['js']) ? '' : $instance['js'];
|
|
|
25 |
$hide = '';
|
26 |
if ( $hidebutton == 'subscribe' || $hidebutton == 'unsubscribe' ) {
|
27 |
$hide = " hide=\"" . $hidebutton . "\"";
|
@@ -37,7 +38,10 @@ class S2_Form_widget extends WP_Widget {
|
|
37 |
if ( $js ) {
|
38 |
$nojs = " nojs=\"true\"";
|
39 |
}
|
40 |
-
|
|
|
|
|
|
|
41 |
echo $before_widget;
|
42 |
echo $before_title . $title . $after_title;
|
43 |
echo "<div class=\"" . $div . "\">";
|
@@ -66,6 +70,7 @@ class S2_Form_widget extends WP_Widget {
|
|
66 |
$instance['hidebutton'] = strip_tags(stripslashes($new_instance['hidebutton']));
|
67 |
$instance['postto'] = stripslashes($new_instance['postto']);
|
68 |
$instance['js'] = stripslashes($new_instance['js']);
|
|
|
69 |
|
70 |
return $instance;
|
71 |
}
|
@@ -77,9 +82,9 @@ class S2_Form_widget extends WP_Widget {
|
|
77 |
// set some defaults, getting any old options first
|
78 |
$options = get_option('widget_subscribe2widget');
|
79 |
if ( $options === false ) {
|
80 |
-
$defaults = array('title' => 'Subscribe2', 'div' => 'search', 'widgetprecontent' => '', 'widgetpostcontent' => '', 'size' => 20, 'hidebutton' => 'none', 'postto' => '', 'js' => '');
|
81 |
} else {
|
82 |
-
$defaults = array('title' => $options['title'], 'div' => $options['div'], 'widgetprecontent' => $options['widgetprecontent'], 'widgetpostcontent' => $options['widgetpostcontent'], 'size' => $options['size'], 'hidebutton' => $options['hidebutton'], 'postto' => $options['postto'], 'js' => $options['js']);
|
83 |
delete_option('widget_subscribe2widget');
|
84 |
}
|
85 |
// code to obtain old settings too
|
@@ -93,6 +98,7 @@ class S2_Form_widget extends WP_Widget {
|
|
93 |
$hidebutton = htmlspecialchars($instance['hidebutton'], ENT_QUOTES);
|
94 |
$postto = htmlspecialchars($instance['postto'], ENT_QUOTES);
|
95 |
$js = htmlspecialchars($instance['js'], ENT_QUOTES);
|
|
|
96 |
|
97 |
global $wpdb, $mysubscribe2;
|
98 |
$sql = "SELECT ID, post_title FROM $wpdb->posts WHERE post_type='page' AND post_status='publish'";
|
@@ -130,6 +136,9 @@ class S2_Form_widget extends WP_Widget {
|
|
130 |
echo "<p><label for=\"" . $this->get_field_id('js') . "\">" . __('Disable JavaScript', 'subscribe2') . ":\r\n";
|
131 |
echo "<input id=\"" . $this->get_field_id('js') . "\" name =\"" . $this->get_field_name('js') . "\" value=\"true\" type=\"checkbox\"" . checked('true', $js, false) . "/>";
|
132 |
echo "</label></p>\r\n";
|
|
|
|
|
|
|
133 |
echo "</div>\r\n";
|
134 |
}
|
135 |
} // End S2_Form_widget class
|
22 |
$hidebutton = empty($instance['hidebutton']) ? 'none' : $instance['hidebutton'];
|
23 |
$postto = empty($instance['postto']) ? '' : $instance['postto'];
|
24 |
$js = empty($instance['js']) ? '' : $instance['js'];
|
25 |
+
$noantispam = empty($instance['noantispam']) ? '' : $instance['noantispam'];
|
26 |
$hide = '';
|
27 |
if ( $hidebutton == 'subscribe' || $hidebutton == 'unsubscribe' ) {
|
28 |
$hide = " hide=\"" . $hidebutton . "\"";
|
38 |
if ( $js ) {
|
39 |
$nojs = " nojs=\"true\"";
|
40 |
}
|
41 |
+
if ( $noantispam ) {
|
42 |
+
$noantispam = " noantispam=\"true\"";
|
43 |
+
}
|
44 |
+
$shortcode = "[subscribe2" . $hide . $postid . $size . $nojs . $noantispam . "]";
|
45 |
echo $before_widget;
|
46 |
echo $before_title . $title . $after_title;
|
47 |
echo "<div class=\"" . $div . "\">";
|
70 |
$instance['hidebutton'] = strip_tags(stripslashes($new_instance['hidebutton']));
|
71 |
$instance['postto'] = stripslashes($new_instance['postto']);
|
72 |
$instance['js'] = stripslashes($new_instance['js']);
|
73 |
+
$instance['noantispam'] = stripslashes($new_instance['noantispam']);
|
74 |
|
75 |
return $instance;
|
76 |
}
|
82 |
// set some defaults, getting any old options first
|
83 |
$options = get_option('widget_subscribe2widget');
|
84 |
if ( $options === false ) {
|
85 |
+
$defaults = array('title' => 'Subscribe2', 'div' => 'search', 'widgetprecontent' => '', 'widgetpostcontent' => '', 'size' => 20, 'hidebutton' => 'none', 'postto' => '', 'js' => '', 'noantispam' => '');
|
86 |
} else {
|
87 |
+
$defaults = array('title' => $options['title'], 'div' => $options['div'], 'widgetprecontent' => $options['widgetprecontent'], 'widgetpostcontent' => $options['widgetpostcontent'], 'size' => $options['size'], 'hidebutton' => $options['hidebutton'], 'postto' => $options['postto'], 'js' => $options['js'], 'noantispam' => $options['noantispam']);
|
88 |
delete_option('widget_subscribe2widget');
|
89 |
}
|
90 |
// code to obtain old settings too
|
98 |
$hidebutton = htmlspecialchars($instance['hidebutton'], ENT_QUOTES);
|
99 |
$postto = htmlspecialchars($instance['postto'], ENT_QUOTES);
|
100 |
$js = htmlspecialchars($instance['js'], ENT_QUOTES);
|
101 |
+
$noantispam = htmlspecialchars($instance['noantispam'], ENT_QUOTES);
|
102 |
|
103 |
global $wpdb, $mysubscribe2;
|
104 |
$sql = "SELECT ID, post_title FROM $wpdb->posts WHERE post_type='page' AND post_status='publish'";
|
136 |
echo "<p><label for=\"" . $this->get_field_id('js') . "\">" . __('Disable JavaScript', 'subscribe2') . ":\r\n";
|
137 |
echo "<input id=\"" . $this->get_field_id('js') . "\" name =\"" . $this->get_field_name('js') . "\" value=\"true\" type=\"checkbox\"" . checked('true', $js, false) . "/>";
|
138 |
echo "</label></p>\r\n";
|
139 |
+
echo "<p><label for=\"" . $this->get_field_id('noantispam') . "\">" . __('Disable Anti-spam measures', 'subscribe2') . ":\r\n";
|
140 |
+
echo "<input id=\"" . $this->get_field_id('noantispam') . "\" name =\"" . $this->get_field_name('noantispam') . "\" value=\"true\" type=\"checkbox\"" . checked('true', $noantispam, false) . "/>";
|
141 |
+
echo "</label></p>\r\n";
|
142 |
echo "</div>\r\n";
|
143 |
}
|
144 |
} // End S2_Form_widget class
|
subscribe2.php
CHANGED
@@ -3,11 +3,12 @@
|
|
3 |
Plugin Name: Subscribe2
|
4 |
Plugin URI: http://subscribe2.wordpress.com
|
5 |
Description: Notifies an email list when new entries are posted.
|
6 |
-
Version:
|
7 |
Author: Matthew Robinson
|
8 |
Author URI: http://subscribe2.wordpress.com
|
9 |
Licence: GPL3
|
10 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2387904
|
|
|
11 |
*/
|
12 |
|
13 |
/*
|
@@ -31,12 +32,12 @@ You should have received a copy of the GNU General Public License
|
|
31 |
along with Subscribe2. If not, see <http://www.gnu.org/licenses/>.
|
32 |
*/
|
33 |
|
34 |
-
if ( version_compare($GLOBALS['wp_version'], '3.
|
35 |
if ( !function_exists( 'add_action' ) ) {
|
36 |
$exit_msg = __("I'm just a plugin, please don't call me directly", 'subscribe2');
|
37 |
} else {
|
38 |
-
// Subscribe2 needs WordPress 3.
|
39 |
-
$exit_msg = sprintf(__('This version of Subscribe2 requires WordPress 3.
|
40 |
}
|
41 |
exit($exit_msg);
|
42 |
}
|
@@ -54,7 +55,7 @@ if ( is_plugin_active_for_network(plugin_basename(__FILE__)) ) {
|
|
54 |
|
55 |
// our version number. Don't touch this or any line below
|
56 |
// unless you know exactly what you are doing
|
57 |
-
define( 'S2VERSION', '
|
58 |
define( 'S2PATH', trailingslashit(dirname(__FILE__)) );
|
59 |
define( 'S2DIR', trailingslashit(dirname(plugin_basename(__FILE__))) );
|
60 |
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: 9.0
|
7 |
Author: Matthew Robinson
|
8 |
Author URI: http://subscribe2.wordpress.com
|
9 |
Licence: GPL3
|
10 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2387904
|
11 |
+
Text Domain: subscribe2
|
12 |
*/
|
13 |
|
14 |
/*
|
32 |
along with Subscribe2. If not, see <http://www.gnu.org/licenses/>.
|
33 |
*/
|
34 |
|
35 |
+
if ( version_compare($GLOBALS['wp_version'], '3.3', '<') || !function_exists( 'add_action' ) ) {
|
36 |
if ( !function_exists( 'add_action' ) ) {
|
37 |
$exit_msg = __("I'm just a plugin, please don't call me directly", 'subscribe2');
|
38 |
} else {
|
39 |
+
// Subscribe2 needs WordPress 3.3 or above, exit if not on a compatible version
|
40 |
+
$exit_msg = sprintf(__('This version of Subscribe2 requires WordPress 3.3 or greater. Please update %1$s or use an older version of %2$s.', 'subscribe2'), '<a href="http://codex.wordpress.org/Updating_WordPress">Wordpress</a>', '<a href="http://wordpress.org/extend/plugins/subscribe2/download/">Subscribe2</a>');
|
41 |
}
|
42 |
exit($exit_msg);
|
43 |
}
|
55 |
|
56 |
// our version number. Don't touch this or any line below
|
57 |
// unless you know exactly what you are doing
|
58 |
+
define( 'S2VERSION', '9.0' );
|
59 |
define( 'S2PATH', trailingslashit(dirname(__FILE__)) );
|
60 |
define( 'S2DIR', trailingslashit(dirname(plugin_basename(__FILE__))) );
|
61 |
define( 'S2URL', plugin_dir_url(dirname(__FILE__)) . S2DIR );
|
subscribe2.pot
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
# This file is distributed under the same license as the Subscribe2 package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: Subscribe2
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/Subscribe2\n"
|
7 |
-
"POT-Creation-Date: 2013-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -12,35 +12,43 @@ msgstr ""
|
|
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
|
15 |
-
#: admin/send_email.php:
|
16 |
-
msgid "
|
17 |
msgstr ""
|
18 |
|
19 |
-
#: admin/send_email.php:
|
20 |
-
msgid "
|
|
|
|
|
|
|
|
|
21 |
msgstr ""
|
22 |
|
23 |
-
#: admin/send_email.php:
|
24 |
msgid "Send an email to subscribers"
|
25 |
msgstr ""
|
26 |
|
27 |
-
#: admin/send_email.php:
|
28 |
msgid "A message from"
|
29 |
msgstr ""
|
30 |
|
31 |
-
#: admin/send_email.php:
|
32 |
msgid "Subject"
|
33 |
msgstr ""
|
34 |
|
35 |
-
#: admin/send_email.php:
|
|
|
|
|
|
|
|
|
36 |
msgid "Recipients:"
|
37 |
msgstr ""
|
38 |
|
39 |
-
#: admin/send_email.php:
|
40 |
msgid "Preview"
|
41 |
msgstr ""
|
42 |
|
43 |
-
#: admin/send_email.php:
|
44 |
msgid "Send"
|
45 |
msgstr ""
|
46 |
|
@@ -58,575 +66,592 @@ msgstr ""
|
|
58 |
msgid "Attempt made to resend the Digest Notification email"
|
59 |
msgstr ""
|
60 |
|
61 |
-
#: admin/settings.php:
|
62 |
msgid ""
|
63 |
"You appear to be sending notifications from an email address from a "
|
64 |
"different domain name to your blog, this may result in failed emails"
|
65 |
msgstr ""
|
66 |
|
67 |
-
#: admin/settings.php:
|
68 |
msgid "Email Settings"
|
69 |
msgstr ""
|
70 |
|
71 |
-
#: admin/settings.php:
|
72 |
msgid "Templates"
|
73 |
msgstr ""
|
74 |
|
75 |
-
#: admin/settings.php:
|
76 |
msgid "Registered Users"
|
77 |
msgstr ""
|
78 |
|
79 |
-
#: admin/settings.php:
|
80 |
msgid "Appearance"
|
81 |
msgstr ""
|
82 |
|
83 |
-
#: admin/settings.php:
|
84 |
msgid "Miscellaneous"
|
85 |
msgstr ""
|
86 |
|
87 |
-
#: admin/settings.php:
|
88 |
-
msgid "
|
|
|
|
|
89 |
msgstr ""
|
90 |
|
91 |
-
#: admin/settings.php:
|
92 |
-
#: classes/class-s2-list-table.php:36
|
93 |
msgid "Edit"
|
94 |
msgstr ""
|
95 |
|
96 |
-
#: admin/settings.php:
|
|
|
97 |
msgid "Update"
|
98 |
msgstr ""
|
99 |
|
100 |
-
#: admin/settings.php:
|
|
|
101 |
msgid "Revert"
|
102 |
msgstr ""
|
103 |
|
104 |
-
#: admin/settings.php:
|
105 |
msgid "Send Admins notifications for new"
|
106 |
msgstr ""
|
107 |
|
108 |
-
#: admin/settings.php:
|
109 |
msgid "Subscriptions"
|
110 |
msgstr ""
|
111 |
|
112 |
-
#: admin/settings.php:
|
113 |
msgid "Unsubscriptions"
|
114 |
msgstr ""
|
115 |
|
116 |
-
#: admin/settings.php:
|
117 |
msgid "Both"
|
118 |
msgstr ""
|
119 |
|
120 |
-
#: admin/settings.php:
|
121 |
msgid "Neither"
|
122 |
msgstr ""
|
123 |
|
124 |
-
#: admin/settings.php:
|
125 |
msgid "Include theme CSS stylesheet in HTML notifications"
|
126 |
msgstr ""
|
127 |
|
128 |
-
#: admin/settings.php:
|
129 |
-
#: admin/settings.php:
|
130 |
-
#: admin/settings.php:
|
131 |
-
#: admin/settings.php:
|
132 |
#: admin/your_subscriptions.php:121 admin/your_subscriptions.php:162
|
133 |
msgid "Yes"
|
134 |
msgstr ""
|
135 |
|
136 |
-
#: admin/settings.php:
|
137 |
-
#: admin/settings.php:
|
138 |
-
#: admin/settings.php:
|
139 |
-
#: admin/settings.php:
|
140 |
-
#: admin/settings.php:
|
141 |
#: admin/your_subscriptions.php:123 admin/your_subscriptions.php:166
|
142 |
msgid "No"
|
143 |
msgstr ""
|
144 |
|
145 |
-
#: admin/settings.php:
|
146 |
msgid "Send Emails for Pages"
|
147 |
msgstr ""
|
148 |
|
149 |
-
#: admin/settings.php:
|
150 |
msgid ""
|
151 |
"Subscribe2 will send email notifications for the following custom post types"
|
152 |
msgstr ""
|
153 |
|
154 |
-
#: admin/settings.php:
|
155 |
msgid "Send Emails for Password Protected Posts"
|
156 |
msgstr ""
|
157 |
|
158 |
-
#: admin/settings.php:
|
159 |
msgid "Send Emails for Private Posts"
|
160 |
msgstr ""
|
161 |
|
162 |
-
#: admin/settings.php:
|
163 |
msgid "Include Sticky Posts at the top of all Digest Notifications"
|
164 |
msgstr ""
|
165 |
|
166 |
-
#: admin/settings.php:
|
167 |
msgid "Send Email From"
|
168 |
msgstr ""
|
169 |
|
170 |
-
#: admin/settings.php:
|
171 |
msgid "Send Emails"
|
172 |
msgstr ""
|
173 |
|
174 |
-
#: admin/settings.php:
|
175 |
msgid "For digest notifications, date order for posts is"
|
176 |
msgstr ""
|
177 |
|
178 |
-
#: admin/settings.php:
|
179 |
msgid "Descending"
|
180 |
msgstr ""
|
181 |
|
182 |
-
#: admin/settings.php:
|
183 |
msgid "Ascending"
|
184 |
msgstr ""
|
185 |
|
186 |
-
#: admin/settings.php:
|
187 |
msgid "Add Tracking Parameters to the Permalink"
|
188 |
msgstr ""
|
189 |
|
190 |
-
#: admin/settings.php:
|
191 |
msgid ""
|
192 |
"eg. utm_source=subscribe2&utm_medium=email&"
|
193 |
"utm_campaign=postnotify&utm_id={ID}&utm_title={TITLE}"
|
194 |
msgstr ""
|
195 |
|
196 |
-
#: admin/settings.php:
|
197 |
msgid "New Post email (must not be empty)"
|
198 |
msgstr ""
|
199 |
|
200 |
-
#: admin/settings.php:
|
201 |
msgid "Subject Line"
|
202 |
msgstr ""
|
203 |
|
204 |
-
#: admin/settings.php:
|
205 |
msgid "Send Email Preview"
|
206 |
msgstr ""
|
207 |
|
208 |
-
#: admin/settings.php:
|
209 |
msgid "Message substitutions"
|
210 |
msgstr ""
|
211 |
|
212 |
-
#: admin/settings.php:
|
213 |
msgid ""
|
214 |
"IF THE FOLLOWING KEYWORDS ARE ALSO IN YOUR POST THEY WILL BE SUBSTITUTED"
|
215 |
msgstr ""
|
216 |
|
217 |
-
#: admin/settings.php:
|
218 |
msgid "the post's title<br />(<i>for per-post emails only</i>)"
|
219 |
msgstr ""
|
220 |
|
221 |
-
#: admin/settings.php:
|
222 |
msgid ""
|
223 |
"the excerpt or the entire post<br />(<i>based on the subscriber's "
|
224 |
"preferences</i>)"
|
225 |
msgstr ""
|
226 |
|
227 |
-
#: admin/settings.php:
|
228 |
msgid ""
|
229 |
"the excerpt of the post and the time it was posted<br />(<i>for digest "
|
230 |
"emails only</i>)"
|
231 |
msgstr ""
|
232 |
|
233 |
-
#: admin/settings.php:
|
234 |
msgid "a list of post titles<br />(<i>for digest emails only</i>)"
|
235 |
msgstr ""
|
236 |
|
237 |
-
#: admin/settings.php:
|
238 |
msgid ""
|
239 |
-
"a list of post titles followed by links to the
|
240 |
"emails only</i>)"
|
241 |
msgstr ""
|
242 |
|
243 |
-
#: admin/settings.php:
|
244 |
msgid "the post's permalink<br />(<i>for per-post emails only</i>)"
|
245 |
msgstr ""
|
246 |
|
247 |
-
#: admin/settings.php:
|
248 |
msgid "the post's permalink after conversion by TinyURL"
|
249 |
msgstr ""
|
250 |
|
251 |
-
#: admin/settings.php:
|
252 |
msgid "the date the post was made<br />(<i>for per-post emails only</i>)"
|
253 |
msgstr ""
|
254 |
|
255 |
-
#: admin/settings.php:
|
256 |
msgid "the time the post was made<br />(<i>for per-post emails only</i>)"
|
257 |
msgstr ""
|
258 |
|
259 |
-
#: admin/settings.php:
|
260 |
msgid "the admin or post author's name"
|
261 |
msgstr ""
|
262 |
|
263 |
-
#: admin/settings.php:
|
264 |
msgid "the admin or post author's email"
|
265 |
msgstr ""
|
266 |
|
267 |
-
#: admin/settings.php:
|
268 |
msgid "the post author's name"
|
269 |
msgstr ""
|
270 |
|
271 |
-
#: admin/settings.php:
|
272 |
msgid ""
|
273 |
"the generated link to confirm a request<br />(<i>only used in the "
|
274 |
"confirmation email template</i>)"
|
275 |
msgstr ""
|
276 |
|
277 |
-
#: admin/settings.php:
|
278 |
msgid ""
|
279 |
"Action performed by LINK in confirmation email<br />(<i>only used in the "
|
280 |
"confirmation email template</i>)"
|
281 |
msgstr ""
|
282 |
|
283 |
-
#: admin/settings.php:
|
284 |
msgid "the post's assigned categories"
|
285 |
msgstr ""
|
286 |
|
287 |
-
#: admin/settings.php:
|
288 |
msgid "the post's assigned Tags"
|
289 |
msgstr ""
|
290 |
|
291 |
-
#: admin/settings.php:
|
292 |
msgid ""
|
293 |
"the number of posts included in the digest email<br />(<i>for digest emails "
|
294 |
"only</i>)"
|
295 |
msgstr ""
|
296 |
|
297 |
-
#: admin/settings.php:
|
298 |
msgid "Subscribe / Unsubscribe confirmation email"
|
299 |
msgstr ""
|
300 |
|
301 |
-
#: admin/settings.php:
|
302 |
msgid "Reminder email to Unconfirmed Subscribers"
|
303 |
msgstr ""
|
304 |
|
305 |
-
#: admin/settings.php:
|
306 |
msgid "Compulsory Categories"
|
307 |
msgstr ""
|
308 |
|
309 |
-
#: admin/settings.php:
|
310 |
msgid ""
|
311 |
"Compulsory categories will be checked by default for Registered Subscribers"
|
312 |
msgstr ""
|
313 |
|
314 |
-
#: admin/settings.php:
|
315 |
msgid "Excluded Categories"
|
316 |
msgstr ""
|
317 |
|
318 |
-
#: admin/settings.php:
|
319 |
msgid ""
|
320 |
"Posts assigned to any Excluded Category do not generate notifications and "
|
321 |
"are not included in digest notifications"
|
322 |
msgstr ""
|
323 |
|
324 |
-
#: admin/settings.php:
|
325 |
msgid "Allow registered users to subscribe to excluded categories?"
|
326 |
msgstr ""
|
327 |
|
328 |
-
#: admin/settings.php:
|
329 |
msgid "Excluded Formats"
|
330 |
msgstr ""
|
331 |
|
332 |
-
#: admin/settings.php:
|
333 |
msgid ""
|
334 |
"Posts assigned to any Excluded Format do not generate notifications and are "
|
335 |
"not included in digest notifications"
|
336 |
msgstr ""
|
337 |
|
338 |
-
#: admin/settings.php:
|
339 |
msgid "Auto-Subscribe"
|
340 |
msgstr ""
|
341 |
|
342 |
-
#: admin/settings.php:
|
343 |
msgid "Subscribe new users registering with your blog"
|
344 |
msgstr ""
|
345 |
|
346 |
-
#: admin/settings.php:
|
347 |
msgid "Automatically"
|
348 |
msgstr ""
|
349 |
|
350 |
-
#: admin/settings.php:
|
351 |
msgid "Display option on Registration Form"
|
352 |
msgstr ""
|
353 |
|
354 |
-
#: admin/settings.php:
|
355 |
msgid "Auto-subscribe includes any excluded categories"
|
356 |
msgstr ""
|
357 |
|
358 |
-
#: admin/settings.php:
|
359 |
msgid "Registration Form option is checked by default"
|
360 |
msgstr ""
|
361 |
|
362 |
-
#: admin/settings.php:
|
363 |
msgid "Auto-subscribe users to receive email as"
|
364 |
msgstr ""
|
365 |
|
366 |
-
#: admin/settings.php:
|
367 |
#: admin/your_subscriptions.php:110
|
368 |
msgid "HTML - Full"
|
369 |
msgstr ""
|
370 |
|
371 |
-
#: admin/settings.php:
|
372 |
#: admin/your_subscriptions.php:112
|
373 |
msgid "HTML - Excerpt"
|
374 |
msgstr ""
|
375 |
|
376 |
-
#: admin/settings.php:
|
377 |
#: admin/your_subscriptions.php:114
|
378 |
msgid "Plain Text - Full"
|
379 |
msgstr ""
|
380 |
|
381 |
-
#: admin/settings.php:
|
382 |
#: admin/your_subscriptions.php:116
|
383 |
msgid "Plain Text - Excerpt"
|
384 |
msgstr ""
|
385 |
|
386 |
-
#: admin/settings.php:
|
387 |
msgid "Registered Users have the option to auto-subscribe to new categories"
|
388 |
msgstr ""
|
389 |
|
390 |
-
#: admin/settings.php:
|
391 |
msgid "New categories are immediately excluded"
|
392 |
msgstr ""
|
393 |
|
394 |
-
#: admin/settings.php:
|
395 |
msgid ""
|
396 |
"Option for Registered Users to auto-subscribe to new categories is checked "
|
397 |
"by default"
|
398 |
msgstr ""
|
399 |
|
400 |
-
#: admin/settings.php:
|
401 |
msgid "Display checkbox to allow subscriptions from the comment form"
|
402 |
msgstr ""
|
403 |
|
404 |
-
#: admin/settings.php:
|
405 |
msgid "Before the Comment Submit button"
|
406 |
msgstr ""
|
407 |
|
408 |
-
#: admin/settings.php:
|
409 |
msgid "After the Comment Submit button"
|
410 |
msgstr ""
|
411 |
|
412 |
-
#: admin/settings.php:
|
413 |
msgid "Comment form checkbox is checked by default"
|
414 |
msgstr ""
|
415 |
|
416 |
-
#: admin/settings.php:
|
417 |
msgid "Show one-click subscription on profile page"
|
418 |
msgstr ""
|
419 |
|
420 |
-
#: admin/settings.php:
|
421 |
msgid "Set default Subscribe2 page as"
|
422 |
msgstr ""
|
423 |
|
424 |
-
#: admin/settings.php:
|
425 |
msgid "Set the number of Subscribers displayed per page"
|
426 |
msgstr ""
|
427 |
|
428 |
-
#: admin/settings.php:
|
429 |
msgid "Show a link to your subscription page in \"meta\"?"
|
430 |
msgstr ""
|
431 |
|
432 |
-
#: admin/settings.php:
|
433 |
msgid "Show the Subscribe2 button on the Write toolbar?"
|
434 |
msgstr ""
|
435 |
|
436 |
-
#: admin/settings.php:
|
437 |
msgid "Enable AJAX style subscription form?"
|
438 |
msgstr ""
|
439 |
|
440 |
-
#: admin/settings.php:
|
441 |
msgid "Enable Subscribe2 Widget?"
|
442 |
msgstr ""
|
443 |
|
444 |
-
#: admin/settings.php:
|
445 |
msgid "Enable Subscribe2 Counter Widget?"
|
446 |
msgstr ""
|
447 |
|
448 |
-
#: admin/settings.php:
|
449 |
msgid "Disable email notifications is checked by default on authoring pages?"
|
450 |
msgstr ""
|
451 |
|
452 |
-
#: admin/settings.php:
|
453 |
msgid "Barred Domains"
|
454 |
msgstr ""
|
455 |
|
456 |
-
#: admin/settings.php:
|
457 |
msgid ""
|
458 |
"Enter domains to bar from public subscriptions: <br /> (Use a new line for "
|
459 |
"each entry and omit the \"@\" symbol, for example email.com)"
|
460 |
msgstr ""
|
461 |
|
462 |
-
#: admin/settings.php:
|
463 |
msgid "Links"
|
464 |
msgstr ""
|
465 |
|
466 |
-
#: admin/settings.php:
|
467 |
msgid "Plugin Site"
|
468 |
msgstr ""
|
469 |
|
470 |
-
#: admin/settings.php:
|
|
|
|
|
|
|
|
|
471 |
msgid "Plugin Forum"
|
472 |
msgstr ""
|
473 |
|
474 |
-
#: admin/settings.php:
|
475 |
msgid "Plugin Blog"
|
476 |
msgstr ""
|
477 |
|
478 |
-
#: admin/settings.php:
|
479 |
msgid "Make a donation via PayPal"
|
480 |
msgstr ""
|
481 |
|
482 |
-
#: admin/settings.php:
|
483 |
msgid "Submit"
|
484 |
msgstr ""
|
485 |
|
486 |
-
#: admin/settings.php:
|
487 |
msgid "Reset to Default Settings"
|
488 |
msgstr ""
|
489 |
|
490 |
-
#: admin/settings.php:
|
491 |
msgid ""
|
492 |
"Use this to reset all options to their defaults. This <strong><em>will not</"
|
493 |
"em></strong> modify your list of subscribers."
|
494 |
msgstr ""
|
495 |
|
496 |
-
#: admin/settings.php:
|
497 |
msgid "RESET"
|
498 |
msgstr ""
|
499 |
|
500 |
-
#: admin/subscribers.php:
|
501 |
msgid "Address(es) subscribed!"
|
502 |
msgstr ""
|
503 |
|
504 |
-
#: admin/subscribers.php:
|
505 |
msgid "Address(es) unsubscribed!"
|
506 |
msgstr ""
|
507 |
|
508 |
-
#: admin/subscribers.php:
|
509 |
msgid "Some emails were not processed, the following were already subscribed"
|
510 |
msgstr ""
|
511 |
|
512 |
-
#: admin/subscribers.php:
|
513 |
msgid "Some emails were not processed, the following were not in the database"
|
514 |
msgstr ""
|
515 |
|
516 |
-
#: admin/subscribers.php:
|
517 |
msgid "Address(es) deleted!"
|
518 |
msgstr ""
|
519 |
|
520 |
-
#: admin/subscribers.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
521 |
msgid "Status changed!"
|
522 |
msgstr ""
|
523 |
|
524 |
-
#: admin/subscribers.php:
|
525 |
msgid "Reminder Email(s) Sent!"
|
526 |
msgstr ""
|
527 |
|
528 |
-
#: admin/subscribers.php:
|
529 |
msgid "Registered Users Subscribed!"
|
530 |
msgstr ""
|
531 |
|
532 |
-
#: admin/subscribers.php:
|
533 |
msgid "Registered Users Unsubscribed!"
|
534 |
msgstr ""
|
535 |
|
536 |
-
#: admin/subscribers.php:
|
537 |
msgid "Format updated for Selected Registered Users!"
|
538 |
msgstr ""
|
539 |
|
540 |
-
#: admin/subscribers.php:
|
541 |
msgid "Digest Subscription updated for Selected Registered Users!"
|
542 |
msgstr ""
|
543 |
|
544 |
-
#: admin/subscribers.php:
|
|
|
545 |
msgid "Public Subscribers"
|
546 |
msgstr ""
|
547 |
|
548 |
-
#: admin/subscribers.php:
|
|
|
549 |
msgid "Registered Subscribers"
|
550 |
msgstr ""
|
551 |
|
552 |
-
#: admin/subscribers.php:
|
553 |
msgid "Add/Remove Subscribers"
|
554 |
msgstr ""
|
555 |
|
556 |
-
#: admin/subscribers.php:
|
557 |
msgid "Enter addresses, one per line or comma-separated"
|
558 |
msgstr ""
|
559 |
|
560 |
-
#: admin/subscribers.php:
|
561 |
-
#: admin/your_subscriptions.php:260 classes/class-s2-
|
562 |
-
#: classes/class-s2-frontend.php:26
|
563 |
msgid "Subscribe"
|
564 |
msgstr ""
|
565 |
|
566 |
-
#: admin/subscribers.php:
|
567 |
-
#: admin/your_subscriptions.php:239 classes/class-s2-frontend.php:
|
568 |
msgid "Unsubscribe"
|
569 |
msgstr ""
|
570 |
|
571 |
-
#: admin/subscribers.php:
|
572 |
msgid "Current Subscribers"
|
573 |
msgstr ""
|
574 |
|
575 |
-
#: admin/subscribers.php:
|
576 |
msgid "Add Registered User"
|
577 |
msgstr ""
|
578 |
|
579 |
-
#: admin/subscribers.php:
|
580 |
msgid "Filter"
|
581 |
msgstr ""
|
582 |
|
583 |
-
#: admin/subscribers.php:
|
584 |
msgid "Send Reminder Email"
|
585 |
msgstr ""
|
586 |
|
587 |
-
#: admin/subscribers.php:
|
588 |
msgid "Save Emails to CSV File"
|
589 |
msgstr ""
|
590 |
|
591 |
-
#: admin/subscribers.php:
|
592 |
msgid "Search"
|
593 |
msgstr ""
|
594 |
|
595 |
-
#: admin/subscribers.php:
|
596 |
msgid "Bulk Management"
|
597 |
msgstr ""
|
598 |
|
599 |
-
#: admin/subscribers.php:
|
600 |
msgid ""
|
601 |
"Preferences for Registered Users selected in the filter above can be changed "
|
602 |
"using this section."
|
603 |
msgstr ""
|
604 |
|
605 |
-
#: admin/subscribers.php:
|
606 |
msgid "Consider User Privacy as changes cannot be undone"
|
607 |
msgstr ""
|
608 |
|
609 |
-
#: admin/subscribers.php:
|
610 |
msgid "Action to perform"
|
611 |
msgstr ""
|
612 |
|
613 |
-
#: admin/subscribers.php:
|
614 |
msgid "Bulk Update Categories"
|
615 |
msgstr ""
|
616 |
|
617 |
-
#: admin/subscribers.php:
|
618 |
msgid "Send email as"
|
619 |
msgstr ""
|
620 |
|
621 |
-
#: admin/subscribers.php:
|
622 |
msgid "Bulk Update Format"
|
623 |
msgstr ""
|
624 |
|
625 |
-
#: admin/subscribers.php:
|
626 |
msgid "Subscribe Selected Users to recieve a periodic digest notification"
|
627 |
msgstr ""
|
628 |
|
629 |
-
#: admin/subscribers.php:
|
630 |
msgid "Bulk Update Digest Subscription"
|
631 |
msgstr ""
|
632 |
|
@@ -706,7 +731,7 @@ msgstr ""
|
|
706 |
msgid "Subscribe to new blogs"
|
707 |
msgstr ""
|
708 |
|
709 |
-
#. #-#-#-#-# Subscribe2.pot (Subscribe2
|
710 |
#. Plugin Name of the plugin/theme
|
711 |
#: classes/class-s2-admin.php:8 include/widget.php:17
|
712 |
msgid "Subscribe2"
|
@@ -716,357 +741,531 @@ msgstr ""
|
|
716 |
msgid "Your Subscriptions"
|
717 |
msgstr ""
|
718 |
|
719 |
-
#: classes/class-s2-admin.php:
|
720 |
msgid "Subscribers"
|
721 |
msgstr ""
|
722 |
|
723 |
-
#: classes/class-s2-admin.php:
|
724 |
msgid "Settings"
|
725 |
msgstr ""
|
726 |
|
727 |
-
#: classes/class-s2-admin.php:
|
728 |
msgid "Send Email"
|
729 |
msgstr ""
|
730 |
|
731 |
-
#: classes/class-s2-admin.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
732 |
msgid "Donate"
|
733 |
msgstr ""
|
734 |
|
735 |
-
#: classes/class-s2-admin.php:
|
736 |
msgid "Subscribe2 Notification Override"
|
737 |
msgstr ""
|
738 |
|
739 |
-
#: classes/class-s2-admin.php:
|
740 |
msgid ""
|
741 |
"Check here to disable sending of an email notification for this post/page"
|
742 |
msgstr ""
|
743 |
|
744 |
-
#: classes/class-s2-admin.php:
|
745 |
-
#: classes/class-s2-admin.php:
|
746 |
msgid "Select / Unselect All"
|
747 |
msgstr ""
|
748 |
|
749 |
-
#: classes/class-s2-admin.php:
|
750 |
msgid "All Users and Subscribers"
|
751 |
msgstr ""
|
752 |
|
753 |
-
#: classes/class-s2-admin.php:
|
754 |
msgid "Confirmed"
|
755 |
msgstr ""
|
756 |
|
757 |
-
#: classes/class-s2-admin.php:
|
758 |
msgid "Unconfirmed"
|
759 |
msgstr ""
|
760 |
|
761 |
-
#: classes/class-s2-admin.php:
|
762 |
msgid "All Registered Users"
|
763 |
msgstr ""
|
764 |
|
765 |
-
#: classes/class-s2-admin.php:
|
766 |
msgid "Post Author"
|
767 |
msgstr ""
|
768 |
|
769 |
-
#: classes/class-s2-admin.php:
|
770 |
msgid ""
|
771 |
"The WordPress cron functions may be disabled on this server. Digest "
|
772 |
"notifications may not work."
|
773 |
msgstr ""
|
774 |
|
775 |
-
#: classes/class-s2-admin.php:
|
776 |
msgid "For each Post"
|
777 |
msgstr ""
|
778 |
|
779 |
-
#: classes/class-s2-admin.php:
|
780 |
-
msgid "Send Digest Notification at UTC"
|
781 |
-
msgstr ""
|
782 |
-
|
783 |
-
#: classes/class-s2-admin.php:498
|
784 |
-
msgid ""
|
785 |
-
"Chosen time will be scheduled to a future date in relation to the current "
|
786 |
-
"UTC time"
|
787 |
-
msgstr ""
|
788 |
-
|
789 |
-
#: classes/class-s2-admin.php:501
|
790 |
msgid "Current UTC time is"
|
791 |
msgstr ""
|
792 |
|
793 |
-
#: classes/class-s2-admin.php:
|
794 |
msgid "Current blog time is"
|
795 |
msgstr ""
|
796 |
|
797 |
-
#: classes/class-s2-admin.php:
|
798 |
msgid "Next email notification will be sent when your blog time is after"
|
799 |
msgstr ""
|
800 |
|
801 |
-
#: classes/class-s2-admin.php:
|
802 |
msgid "Attempt to resend the last Digest Notification email"
|
803 |
msgstr ""
|
804 |
|
805 |
-
#: classes/class-s2-admin.php:
|
806 |
msgid "Resend Digest"
|
807 |
msgstr ""
|
808 |
|
809 |
-
#: classes/class-s2-admin.php:
|
|
|
|
|
|
|
|
|
810 |
msgid "Email subscription"
|
811 |
msgstr ""
|
812 |
|
813 |
-
#: classes/class-s2-admin.php:
|
814 |
msgid "Subscribe / Unsubscribe"
|
815 |
msgstr ""
|
816 |
|
817 |
-
#: classes/class-s2-admin.php:
|
818 |
msgid "Receive notifications"
|
819 |
msgstr ""
|
820 |
|
821 |
-
#: classes/class-s2-admin.php:
|
822 |
msgid ""
|
823 |
"Check if you want to receive email notification when new posts are published"
|
824 |
msgstr ""
|
825 |
|
826 |
-
#: classes/class-s2-core.php:
|
827 |
-
msgid "To manage your subscription options please"
|
828 |
-
msgstr ""
|
829 |
-
|
830 |
-
#: classes/class-s2-core.php:19
|
831 |
-
msgid "login"
|
832 |
msgstr ""
|
833 |
|
834 |
-
#: classes/class-s2-core.php:
|
835 |
-
msgid "
|
836 |
-
|
837 |
-
|
838 |
-
#: classes/class-s2-core.php:21
|
839 |
-
msgid "profile"
|
840 |
msgstr ""
|
841 |
|
842 |
-
#: classes/class-s2-core.php:
|
843 |
-
msgid "
|
|
|
|
|
844 |
msgstr ""
|
845 |
|
846 |
-
#: classes/class-s2-core.php:
|
847 |
msgid "A confirmation message is on its way!"
|
848 |
msgstr ""
|
849 |
|
850 |
-
#: classes/class-s2-core.php:
|
851 |
msgid "That email address is already subscribed."
|
852 |
msgstr ""
|
853 |
|
854 |
-
#: classes/class-s2-core.php:
|
855 |
msgid "That email address is not subscribed."
|
856 |
msgstr ""
|
857 |
|
858 |
-
#: classes/class-s2-core.php:
|
859 |
msgid "Sorry, but that does not look like an email address to me."
|
860 |
msgstr ""
|
861 |
|
862 |
-
#: classes/class-s2-core.php:
|
863 |
msgid ""
|
864 |
"Sorry, email addresses at that domain are currently barred due to spam, "
|
865 |
"please use an alternative email address."
|
866 |
msgstr ""
|
867 |
|
868 |
-
#: classes/class-s2-core.php:
|
869 |
msgid ""
|
870 |
"Sorry, there seems to be an error on the server. Please try again later."
|
871 |
msgstr ""
|
872 |
|
873 |
-
#: classes/class-s2-core.php:
|
874 |
msgid "You must to create a WordPress page for this plugin to work correctly."
|
875 |
msgstr ""
|
876 |
|
877 |
-
#: classes/class-s2-core.php:
|
878 |
-
msgid "
|
|
|
|
|
879 |
msgstr ""
|
880 |
|
881 |
-
#: classes/class-s2-core.php:
|
882 |
-
msgid ""
|
883 |
-
"Message failed! Check your settings and check with your hosting provider"
|
884 |
msgstr ""
|
885 |
|
886 |
#: classes/class-s2-core.php:50
|
|
|
|
|
|
|
|
|
887 |
msgid "No such email address is registered."
|
888 |
msgstr ""
|
889 |
|
890 |
-
#: classes/class-s2-core.php:
|
891 |
msgid "You have successfully subscribed!"
|
892 |
msgstr ""
|
893 |
|
894 |
-
#: classes/class-s2-core.php:
|
895 |
msgid "You have successfully unsubscribed."
|
896 |
msgstr ""
|
897 |
|
898 |
-
#: classes/class-s2-core.php:
|
899 |
msgid "subscribe"
|
900 |
msgstr ""
|
901 |
|
902 |
-
#: classes/class-s2-core.php:
|
903 |
msgid "unsubscribe"
|
904 |
msgstr ""
|
905 |
|
906 |
-
#: classes/class-s2-core.php:
|
907 |
msgid "Options saved!"
|
908 |
msgstr ""
|
909 |
|
910 |
-
#: classes/class-s2-core.php:
|
911 |
msgid "Options reset!"
|
912 |
msgstr ""
|
913 |
|
914 |
-
#: classes/class-s2-core.php:
|
915 |
msgid "Plain Text Excerpt Preview"
|
916 |
msgstr ""
|
917 |
|
918 |
-
#: classes/class-s2-core.php:
|
919 |
msgid "Plain Text Full Preview"
|
920 |
msgstr ""
|
921 |
|
922 |
-
#: classes/class-s2-core.php:
|
923 |
msgid "HTML Excerpt Preview"
|
924 |
msgstr ""
|
925 |
|
926 |
-
#: classes/class-s2-core.php:
|
927 |
msgid "HTML Full Preview"
|
928 |
msgstr ""
|
929 |
|
930 |
-
#: classes/class-s2-core.php:
|
931 |
msgid "Registered User"
|
932 |
msgstr ""
|
933 |
|
934 |
-
#: classes/class-s2-core.php:
|
935 |
msgid "Confirmed Public Subscriber"
|
936 |
msgstr ""
|
937 |
|
938 |
-
#: classes/class-s2-core.php:
|
939 |
msgid "Unconfirmed Public Subscriber"
|
940 |
msgstr ""
|
941 |
|
942 |
-
#: classes/class-s2-core.php:
|
943 |
msgid "Check here to Subscribe to email notifications for new posts"
|
944 |
msgstr ""
|
945 |
|
946 |
-
#: classes/class-s2-core.php:
|
947 |
msgid ""
|
948 |
"By registering with this blog you are also agreeing to receive email "
|
949 |
"notifications for new posts but you can unsubscribe at anytime"
|
950 |
msgstr ""
|
951 |
|
952 |
-
#: classes/class-s2-core.php:
|
953 |
msgid "Check here to Subscribe to notifications for new posts"
|
954 |
msgstr ""
|
955 |
|
956 |
-
#: classes/class-s2-core.php:
|
957 |
msgid "Weekly"
|
958 |
msgstr ""
|
959 |
|
960 |
-
#: classes/class-s2-core.php:
|
961 |
msgid "Author"
|
962 |
msgstr ""
|
963 |
|
964 |
-
#: classes/class-s2-core.php:
|
965 |
msgid "Posted on"
|
966 |
msgstr ""
|
967 |
|
968 |
-
#: classes/class-s2-core.php:
|
969 |
msgid "Posted in"
|
970 |
msgstr ""
|
971 |
|
972 |
-
#: classes/class-s2-core.php:
|
973 |
msgid "Tagged as"
|
974 |
msgstr ""
|
975 |
|
976 |
-
#: classes/class-s2-core.php:
|
977 |
msgid "Digest Email"
|
978 |
msgstr ""
|
979 |
|
980 |
-
#: classes/class-s2-core.php:
|
981 |
msgid "Digest Preview"
|
982 |
msgstr ""
|
983 |
|
984 |
-
#: classes/class-s2-frontend.php:
|
985 |
msgid "Enter email address..."
|
986 |
msgstr ""
|
987 |
|
988 |
-
#: classes/class-s2-frontend.php:
|
989 |
msgid "Your email:"
|
990 |
msgstr ""
|
991 |
|
992 |
-
#: classes/class-s2-frontend.php:
|
993 |
msgid "Subscription Confirmation"
|
994 |
msgstr ""
|
995 |
|
996 |
-
#: classes/class-s2-frontend.php:
|
997 |
msgid "Unsubscription Confirmation"
|
998 |
msgstr ""
|
999 |
|
1000 |
-
#: classes/class-s2-frontend.php:
|
1001 |
msgid "New Subscription"
|
1002 |
msgstr ""
|
1003 |
|
1004 |
-
#: classes/class-s2-frontend.php:
|
1005 |
msgid "subscribed to email notifications!"
|
1006 |
msgstr ""
|
1007 |
|
1008 |
-
#: classes/class-s2-frontend.php:
|
1009 |
msgid "New Unsubscription"
|
1010 |
msgstr ""
|
1011 |
|
1012 |
-
#: classes/class-s2-frontend.php:
|
1013 |
msgid "unsubscribed from email notifications!"
|
1014 |
msgstr ""
|
1015 |
|
1016 |
-
#: classes/class-s2-frontend.php:
|
1017 |
msgid "[Un]Subscribe to Posts"
|
1018 |
msgstr ""
|
1019 |
|
1020 |
-
#: classes/class-s2-frontend.php:
|
1021 |
msgid "Subscribe to this blog"
|
1022 |
msgstr ""
|
1023 |
|
1024 |
-
#: classes/class-s2-list-table.php:
|
|
|
1025 |
msgctxt "column name"
|
1026 |
msgid "Email"
|
1027 |
msgstr ""
|
1028 |
|
1029 |
-
#: classes/class-s2-list-table.php:
|
1030 |
msgctxt "column name"
|
1031 |
msgid "Date"
|
1032 |
msgstr ""
|
1033 |
|
1034 |
-
#: classes/class-s2-list-table.php:
|
1035 |
msgid "Delete"
|
1036 |
msgstr ""
|
1037 |
|
1038 |
-
#: classes/class-s2-list-table.php:
|
1039 |
msgid "Toggle"
|
1040 |
msgstr ""
|
1041 |
|
1042 |
-
#: classes/class-s2-list-table.php:
|
1043 |
msgid "1 item"
|
1044 |
msgid_plural "%s items"
|
1045 |
msgstr[0] ""
|
1046 |
msgstr[1] ""
|
1047 |
|
1048 |
-
#: classes/class-s2-list-table.php:
|
1049 |
msgid "Go to the first page"
|
1050 |
msgstr ""
|
1051 |
|
1052 |
-
#: classes/class-s2-list-table.php:
|
1053 |
msgid "Go to the previous page"
|
1054 |
msgstr ""
|
1055 |
|
1056 |
-
#: classes/class-s2-list-table.php:
|
1057 |
msgid "Current page"
|
1058 |
msgstr ""
|
1059 |
|
1060 |
-
#: classes/class-s2-list-table.php:
|
1061 |
msgctxt "paging"
|
1062 |
msgid "%1$s of %2$s"
|
1063 |
msgstr ""
|
1064 |
|
1065 |
-
#: classes/class-s2-list-table.php:
|
1066 |
msgid "Go to the next page"
|
1067 |
msgstr ""
|
1068 |
|
1069 |
-
#: classes/class-s2-list-table.php:
|
1070 |
msgid "Go to the last page"
|
1071 |
msgstr ""
|
1072 |
|
@@ -1171,89 +1370,93 @@ msgstr ""
|
|
1171 |
msgid "Subscribe2 Widget"
|
1172 |
msgstr ""
|
1173 |
|
1174 |
-
#: include/widget.php:
|
1175 |
msgid "(Un)Subscribe to Posts"
|
1176 |
msgstr ""
|
1177 |
|
1178 |
-
#: include/widget.php:
|
1179 |
msgid "Title"
|
1180 |
msgstr ""
|
1181 |
|
1182 |
-
#: include/widget.php:
|
1183 |
msgid "Div class name"
|
1184 |
msgstr ""
|
1185 |
|
1186 |
-
#: include/widget.php:
|
1187 |
msgid "Pre-Content"
|
1188 |
msgstr ""
|
1189 |
|
1190 |
-
#: include/widget.php:
|
1191 |
msgid "Post-Content"
|
1192 |
msgstr ""
|
1193 |
|
1194 |
-
#: include/widget.php:
|
1195 |
msgid "Text Box Size"
|
1196 |
msgstr ""
|
1197 |
|
1198 |
-
#: include/widget.php:
|
1199 |
msgid "Display options"
|
1200 |
msgstr ""
|
1201 |
|
1202 |
-
#: include/widget.php:
|
1203 |
msgid "Show complete form"
|
1204 |
msgstr ""
|
1205 |
|
1206 |
-
#: include/widget.php:
|
1207 |
msgid "Hide Subscribe button"
|
1208 |
msgstr ""
|
1209 |
|
1210 |
-
#: include/widget.php:
|
1211 |
msgid "Hide Unsubscribe button"
|
1212 |
msgstr ""
|
1213 |
|
1214 |
-
#: include/widget.php:
|
1215 |
msgid "Show as link"
|
1216 |
msgstr ""
|
1217 |
|
1218 |
-
#: include/widget.php:
|
1219 |
msgid "Post form content to page"
|
1220 |
msgstr ""
|
1221 |
|
1222 |
-
#: include/widget.php:
|
1223 |
msgid "Use Subscribe2 Default"
|
1224 |
msgstr ""
|
1225 |
|
1226 |
-
#: include/widget.php:
|
1227 |
msgid "Use Home Page"
|
1228 |
msgstr ""
|
1229 |
|
1230 |
-
#: include/widget.php:
|
1231 |
msgid "Use Referring Page"
|
1232 |
msgstr ""
|
1233 |
|
1234 |
-
#: include/widget.php:
|
1235 |
msgid "Disable JavaScript"
|
1236 |
msgstr ""
|
1237 |
|
1238 |
-
#:
|
|
|
|
|
|
|
|
|
1239 |
msgid "I'm just a plugin, please don't call me directly"
|
1240 |
msgstr ""
|
1241 |
|
1242 |
-
#: subscribe2.php:
|
1243 |
msgid ""
|
1244 |
-
"This version of Subscribe2 requires WordPress 3.
|
1245 |
"%1$s or use an older version of %2$s."
|
1246 |
msgstr ""
|
1247 |
|
1248 |
-
#: subscribe2.php:
|
1249 |
msgid ""
|
1250 |
"Subscribe2 cannot be activated as a network plugin. Please activate it at on "
|
1251 |
"a site level"
|
1252 |
msgstr ""
|
1253 |
|
1254 |
-
#. #-#-#-#-# Subscribe2.pot (Subscribe2
|
1255 |
#. Plugin URI of the plugin/theme
|
1256 |
-
#. #-#-#-#-# Subscribe2.pot (Subscribe2
|
1257 |
#. Author URI of the plugin/theme
|
1258 |
msgid "http://subscribe2.wordpress.com"
|
1259 |
msgstr ""
|
2 |
# This file is distributed under the same license as the Subscribe2 package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Subscribe2 9.0\n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/Subscribe2\n"
|
7 |
+
"POT-Creation-Date: 2013-09-25 20:38:47+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
|
15 |
+
#: admin/send_email.php:69
|
16 |
+
msgid "Your email was empty"
|
17 |
msgstr ""
|
18 |
|
19 |
+
#: admin/send_email.php:76
|
20 |
+
msgid "Check your settings and check with your hosting provider"
|
21 |
+
msgstr ""
|
22 |
+
|
23 |
+
#: admin/send_email.php:81
|
24 |
+
msgid "Preview message sent!"
|
25 |
msgstr ""
|
26 |
|
27 |
+
#: admin/send_email.php:95
|
28 |
msgid "Send an email to subscribers"
|
29 |
msgstr ""
|
30 |
|
31 |
+
#: admin/send_email.php:103
|
32 |
msgid "A message from"
|
33 |
msgstr ""
|
34 |
|
35 |
+
#: admin/send_email.php:108
|
36 |
msgid "Subject"
|
37 |
msgstr ""
|
38 |
|
39 |
+
#: admin/send_email.php:111
|
40 |
+
msgid "Add More Files"
|
41 |
+
msgstr ""
|
42 |
+
|
43 |
+
#: admin/send_email.php:113
|
44 |
msgid "Recipients:"
|
45 |
msgstr ""
|
46 |
|
47 |
+
#: admin/send_email.php:116
|
48 |
msgid "Preview"
|
49 |
msgstr ""
|
50 |
|
51 |
+
#: admin/send_email.php:116
|
52 |
msgid "Send"
|
53 |
msgstr ""
|
54 |
|
66 |
msgid "Attempt made to resend the Digest Notification email"
|
67 |
msgstr ""
|
68 |
|
69 |
+
#: admin/settings.php:151
|
70 |
msgid ""
|
71 |
"You appear to be sending notifications from an email address from a "
|
72 |
"different domain name to your blog, this may result in failed emails"
|
73 |
msgstr ""
|
74 |
|
75 |
+
#: admin/settings.php:160 classes/class-s2-admin.php:81
|
76 |
msgid "Email Settings"
|
77 |
msgstr ""
|
78 |
|
79 |
+
#: admin/settings.php:161 classes/class-s2-admin.php:89
|
80 |
msgid "Templates"
|
81 |
msgstr ""
|
82 |
|
83 |
+
#: admin/settings.php:162 classes/class-s2-admin.php:96
|
84 |
msgid "Registered Users"
|
85 |
msgstr ""
|
86 |
|
87 |
+
#: admin/settings.php:163 classes/class-s2-admin.php:103
|
88 |
msgid "Appearance"
|
89 |
msgstr ""
|
90 |
|
91 |
+
#: admin/settings.php:164 classes/class-s2-admin.php:110
|
92 |
msgid "Miscellaneous"
|
93 |
msgstr ""
|
94 |
|
95 |
+
#: admin/settings.php:185
|
96 |
+
msgid ""
|
97 |
+
"Restrict the number of <strong>recipients per email</strong> to (0 for "
|
98 |
+
"unlimited)"
|
99 |
msgstr ""
|
100 |
|
101 |
+
#: admin/settings.php:187 admin/settings.php:419
|
102 |
+
#: classes/class-s2-admin.php:644 classes/class-s2-list-table.php:36
|
103 |
msgid "Edit"
|
104 |
msgstr ""
|
105 |
|
106 |
+
#: admin/settings.php:190 admin/settings.php:422
|
107 |
+
#: classes/class-s2-admin.php:658
|
108 |
msgid "Update"
|
109 |
msgstr ""
|
110 |
|
111 |
+
#: admin/settings.php:191 admin/settings.php:423
|
112 |
+
#: classes/class-s2-admin.php:659
|
113 |
msgid "Revert"
|
114 |
msgstr ""
|
115 |
|
116 |
+
#: admin/settings.php:193
|
117 |
msgid "Send Admins notifications for new"
|
118 |
msgstr ""
|
119 |
|
120 |
+
#: admin/settings.php:195
|
121 |
msgid "Subscriptions"
|
122 |
msgstr ""
|
123 |
|
124 |
+
#: admin/settings.php:197
|
125 |
msgid "Unsubscriptions"
|
126 |
msgstr ""
|
127 |
|
128 |
+
#: admin/settings.php:199
|
129 |
msgid "Both"
|
130 |
msgstr ""
|
131 |
|
132 |
+
#: admin/settings.php:201
|
133 |
msgid "Neither"
|
134 |
msgstr ""
|
135 |
|
136 |
+
#: admin/settings.php:203
|
137 |
msgid "Include theme CSS stylesheet in HTML notifications"
|
138 |
msgstr ""
|
139 |
|
140 |
+
#: admin/settings.php:205 admin/settings.php:211 admin/settings.php:225
|
141 |
+
#: admin/settings.php:230 admin/settings.php:235 admin/settings.php:355
|
142 |
+
#: admin/settings.php:360 admin/settings.php:374 admin/settings.php:381
|
143 |
+
#: admin/settings.php:393 admin/settings.php:398 admin/subscribers.php:268
|
144 |
#: admin/your_subscriptions.php:121 admin/your_subscriptions.php:162
|
145 |
msgid "Yes"
|
146 |
msgstr ""
|
147 |
|
148 |
+
#: admin/settings.php:207 admin/settings.php:213 admin/settings.php:227
|
149 |
+
#: admin/settings.php:232 admin/settings.php:237 admin/settings.php:352
|
150 |
+
#: admin/settings.php:357 admin/settings.php:362 admin/settings.php:376
|
151 |
+
#: admin/settings.php:383 admin/settings.php:390 admin/settings.php:395
|
152 |
+
#: admin/settings.php:400 admin/subscribers.php:270
|
153 |
#: admin/your_subscriptions.php:123 admin/your_subscriptions.php:166
|
154 |
msgid "No"
|
155 |
msgstr ""
|
156 |
|
157 |
+
#: admin/settings.php:209
|
158 |
msgid "Send Emails for Pages"
|
159 |
msgstr ""
|
160 |
|
161 |
+
#: admin/settings.php:217
|
162 |
msgid ""
|
163 |
"Subscribe2 will send email notifications for the following custom post types"
|
164 |
msgstr ""
|
165 |
|
166 |
+
#: admin/settings.php:223
|
167 |
msgid "Send Emails for Password Protected Posts"
|
168 |
msgstr ""
|
169 |
|
170 |
+
#: admin/settings.php:228
|
171 |
msgid "Send Emails for Private Posts"
|
172 |
msgstr ""
|
173 |
|
174 |
+
#: admin/settings.php:233
|
175 |
msgid "Include Sticky Posts at the top of all Digest Notifications"
|
176 |
msgstr ""
|
177 |
|
178 |
+
#: admin/settings.php:238
|
179 |
msgid "Send Email From"
|
180 |
msgstr ""
|
181 |
|
182 |
+
#: admin/settings.php:243
|
183 |
msgid "Send Emails"
|
184 |
msgstr ""
|
185 |
|
186 |
+
#: admin/settings.php:245
|
187 |
msgid "For digest notifications, date order for posts is"
|
188 |
msgstr ""
|
189 |
|
190 |
+
#: admin/settings.php:247
|
191 |
msgid "Descending"
|
192 |
msgstr ""
|
193 |
|
194 |
+
#: admin/settings.php:249
|
195 |
msgid "Ascending"
|
196 |
msgstr ""
|
197 |
|
198 |
+
#: admin/settings.php:251
|
199 |
msgid "Add Tracking Parameters to the Permalink"
|
200 |
msgstr ""
|
201 |
|
202 |
+
#: admin/settings.php:253
|
203 |
msgid ""
|
204 |
"eg. utm_source=subscribe2&utm_medium=email&"
|
205 |
"utm_campaign=postnotify&utm_id={ID}&utm_title={TITLE}"
|
206 |
msgstr ""
|
207 |
|
208 |
+
#: admin/settings.php:264
|
209 |
msgid "New Post email (must not be empty)"
|
210 |
msgstr ""
|
211 |
|
212 |
+
#: admin/settings.php:265 admin/settings.php:295 admin/settings.php:300
|
213 |
msgid "Subject Line"
|
214 |
msgstr ""
|
215 |
|
216 |
+
#: admin/settings.php:270
|
217 |
msgid "Send Email Preview"
|
218 |
msgstr ""
|
219 |
|
220 |
+
#: admin/settings.php:271
|
221 |
msgid "Message substitutions"
|
222 |
msgstr ""
|
223 |
|
224 |
+
#: admin/settings.php:273
|
225 |
msgid ""
|
226 |
"IF THE FOLLOWING KEYWORDS ARE ALSO IN YOUR POST THEY WILL BE SUBSTITUTED"
|
227 |
msgstr ""
|
228 |
|
229 |
+
#: admin/settings.php:276
|
230 |
msgid "the post's title<br />(<i>for per-post emails only</i>)"
|
231 |
msgstr ""
|
232 |
|
233 |
+
#: admin/settings.php:277
|
234 |
msgid ""
|
235 |
"the excerpt or the entire post<br />(<i>based on the subscriber's "
|
236 |
"preferences</i>)"
|
237 |
msgstr ""
|
238 |
|
239 |
+
#: admin/settings.php:278
|
240 |
msgid ""
|
241 |
"the excerpt of the post and the time it was posted<br />(<i>for digest "
|
242 |
"emails only</i>)"
|
243 |
msgstr ""
|
244 |
|
245 |
+
#: admin/settings.php:279
|
246 |
msgid "a list of post titles<br />(<i>for digest emails only</i>)"
|
247 |
msgstr ""
|
248 |
|
249 |
+
#: admin/settings.php:280
|
250 |
msgid ""
|
251 |
+
"a list of post titles followed by links to the articles<br />(<i>for digest "
|
252 |
"emails only</i>)"
|
253 |
msgstr ""
|
254 |
|
255 |
+
#: admin/settings.php:281
|
256 |
msgid "the post's permalink<br />(<i>for per-post emails only</i>)"
|
257 |
msgstr ""
|
258 |
|
259 |
+
#: admin/settings.php:282
|
260 |
msgid "the post's permalink after conversion by TinyURL"
|
261 |
msgstr ""
|
262 |
|
263 |
+
#: admin/settings.php:283
|
264 |
msgid "the date the post was made<br />(<i>for per-post emails only</i>)"
|
265 |
msgstr ""
|
266 |
|
267 |
+
#: admin/settings.php:284
|
268 |
msgid "the time the post was made<br />(<i>for per-post emails only</i>)"
|
269 |
msgstr ""
|
270 |
|
271 |
+
#: admin/settings.php:285
|
272 |
msgid "the admin or post author's name"
|
273 |
msgstr ""
|
274 |
|
275 |
+
#: admin/settings.php:286
|
276 |
msgid "the admin or post author's email"
|
277 |
msgstr ""
|
278 |
|
279 |
+
#: admin/settings.php:287
|
280 |
msgid "the post author's name"
|
281 |
msgstr ""
|
282 |
|
283 |
+
#: admin/settings.php:288
|
284 |
msgid ""
|
285 |
"the generated link to confirm a request<br />(<i>only used in the "
|
286 |
"confirmation email template</i>)"
|
287 |
msgstr ""
|
288 |
|
289 |
+
#: admin/settings.php:289
|
290 |
msgid ""
|
291 |
"Action performed by LINK in confirmation email<br />(<i>only used in the "
|
292 |
"confirmation email template</i>)"
|
293 |
msgstr ""
|
294 |
|
295 |
+
#: admin/settings.php:290
|
296 |
msgid "the post's assigned categories"
|
297 |
msgstr ""
|
298 |
|
299 |
+
#: admin/settings.php:291
|
300 |
msgid "the post's assigned Tags"
|
301 |
msgstr ""
|
302 |
|
303 |
+
#: admin/settings.php:292
|
304 |
msgid ""
|
305 |
"the number of posts included in the digest email<br />(<i>for digest emails "
|
306 |
"only</i>)"
|
307 |
msgstr ""
|
308 |
|
309 |
+
#: admin/settings.php:294
|
310 |
msgid "Subscribe / Unsubscribe confirmation email"
|
311 |
msgstr ""
|
312 |
|
313 |
+
#: admin/settings.php:299
|
314 |
msgid "Reminder email to Unconfirmed Subscribers"
|
315 |
msgstr ""
|
316 |
|
317 |
+
#: admin/settings.php:311
|
318 |
msgid "Compulsory Categories"
|
319 |
msgstr ""
|
320 |
|
321 |
+
#: admin/settings.php:313
|
322 |
msgid ""
|
323 |
"Compulsory categories will be checked by default for Registered Subscribers"
|
324 |
msgstr ""
|
325 |
|
326 |
+
#: admin/settings.php:320
|
327 |
msgid "Excluded Categories"
|
328 |
msgstr ""
|
329 |
|
330 |
+
#: admin/settings.php:322
|
331 |
msgid ""
|
332 |
"Posts assigned to any Excluded Category do not generate notifications and "
|
333 |
"are not included in digest notifications"
|
334 |
msgstr ""
|
335 |
|
336 |
+
#: admin/settings.php:326
|
337 |
msgid "Allow registered users to subscribe to excluded categories?"
|
338 |
msgstr ""
|
339 |
|
340 |
+
#: admin/settings.php:334
|
341 |
msgid "Excluded Formats"
|
342 |
msgstr ""
|
343 |
|
344 |
+
#: admin/settings.php:336
|
345 |
msgid ""
|
346 |
"Posts assigned to any Excluded Format do not generate notifications and are "
|
347 |
"not included in digest notifications"
|
348 |
msgstr ""
|
349 |
|
350 |
+
#: admin/settings.php:344
|
351 |
msgid "Auto-Subscribe"
|
352 |
msgstr ""
|
353 |
|
354 |
+
#: admin/settings.php:346
|
355 |
msgid "Subscribe new users registering with your blog"
|
356 |
msgstr ""
|
357 |
|
358 |
+
#: admin/settings.php:348
|
359 |
msgid "Automatically"
|
360 |
msgstr ""
|
361 |
|
362 |
+
#: admin/settings.php:350
|
363 |
msgid "Display option on Registration Form"
|
364 |
msgstr ""
|
365 |
|
366 |
+
#: admin/settings.php:353
|
367 |
msgid "Auto-subscribe includes any excluded categories"
|
368 |
msgstr ""
|
369 |
|
370 |
+
#: admin/settings.php:358
|
371 |
msgid "Registration Form option is checked by default"
|
372 |
msgstr ""
|
373 |
|
374 |
+
#: admin/settings.php:363
|
375 |
msgid "Auto-subscribe users to receive email as"
|
376 |
msgstr ""
|
377 |
|
378 |
+
#: admin/settings.php:365 admin/subscribers.php:258
|
379 |
#: admin/your_subscriptions.php:110
|
380 |
msgid "HTML - Full"
|
381 |
msgstr ""
|
382 |
|
383 |
+
#: admin/settings.php:367 admin/subscribers.php:259
|
384 |
#: admin/your_subscriptions.php:112
|
385 |
msgid "HTML - Excerpt"
|
386 |
msgstr ""
|
387 |
|
388 |
+
#: admin/settings.php:369 admin/subscribers.php:260
|
389 |
#: admin/your_subscriptions.php:114
|
390 |
msgid "Plain Text - Full"
|
391 |
msgstr ""
|
392 |
|
393 |
+
#: admin/settings.php:371 admin/subscribers.php:261
|
394 |
#: admin/your_subscriptions.php:116
|
395 |
msgid "Plain Text - Excerpt"
|
396 |
msgstr ""
|
397 |
|
398 |
+
#: admin/settings.php:372
|
399 |
msgid "Registered Users have the option to auto-subscribe to new categories"
|
400 |
msgstr ""
|
401 |
|
402 |
+
#: admin/settings.php:378
|
403 |
msgid "New categories are immediately excluded"
|
404 |
msgstr ""
|
405 |
|
406 |
+
#: admin/settings.php:379
|
407 |
msgid ""
|
408 |
"Option for Registered Users to auto-subscribe to new categories is checked "
|
409 |
"by default"
|
410 |
msgstr ""
|
411 |
|
412 |
+
#: admin/settings.php:384
|
413 |
msgid "Display checkbox to allow subscriptions from the comment form"
|
414 |
msgstr ""
|
415 |
|
416 |
+
#: admin/settings.php:386
|
417 |
msgid "Before the Comment Submit button"
|
418 |
msgstr ""
|
419 |
|
420 |
+
#: admin/settings.php:388
|
421 |
msgid "After the Comment Submit button"
|
422 |
msgstr ""
|
423 |
|
424 |
+
#: admin/settings.php:391
|
425 |
msgid "Comment form checkbox is checked by default"
|
426 |
msgstr ""
|
427 |
|
428 |
+
#: admin/settings.php:396
|
429 |
msgid "Show one-click subscription on profile page"
|
430 |
msgstr ""
|
431 |
|
432 |
+
#: admin/settings.php:411
|
433 |
msgid "Set default Subscribe2 page as"
|
434 |
msgstr ""
|
435 |
|
436 |
+
#: admin/settings.php:417
|
437 |
msgid "Set the number of Subscribers displayed per page"
|
438 |
msgstr ""
|
439 |
|
440 |
+
#: admin/settings.php:427
|
441 |
msgid "Show a link to your subscription page in \"meta\"?"
|
442 |
msgstr ""
|
443 |
|
444 |
+
#: admin/settings.php:431
|
445 |
msgid "Show the Subscribe2 button on the Write toolbar?"
|
446 |
msgstr ""
|
447 |
|
448 |
+
#: admin/settings.php:435
|
449 |
msgid "Enable AJAX style subscription form?"
|
450 |
msgstr ""
|
451 |
|
452 |
+
#: admin/settings.php:439
|
453 |
msgid "Enable Subscribe2 Widget?"
|
454 |
msgstr ""
|
455 |
|
456 |
+
#: admin/settings.php:443
|
457 |
msgid "Enable Subscribe2 Counter Widget?"
|
458 |
msgstr ""
|
459 |
|
460 |
+
#: admin/settings.php:447
|
461 |
msgid "Disable email notifications is checked by default on authoring pages?"
|
462 |
msgstr ""
|
463 |
|
464 |
+
#: admin/settings.php:455
|
465 |
msgid "Barred Domains"
|
466 |
msgstr ""
|
467 |
|
468 |
+
#: admin/settings.php:457
|
469 |
msgid ""
|
470 |
"Enter domains to bar from public subscriptions: <br /> (Use a new line for "
|
471 |
"each entry and omit the \"@\" symbol, for example email.com)"
|
472 |
msgstr ""
|
473 |
|
474 |
+
#: admin/settings.php:460
|
475 |
msgid "Links"
|
476 |
msgstr ""
|
477 |
|
478 |
+
#: admin/settings.php:461
|
479 |
msgid "Plugin Site"
|
480 |
msgstr ""
|
481 |
|
482 |
+
#: admin/settings.php:462 classes/class-s2-admin.php:162
|
483 |
+
msgid "Translation Files"
|
484 |
+
msgstr ""
|
485 |
+
|
486 |
+
#: admin/settings.php:463
|
487 |
msgid "Plugin Forum"
|
488 |
msgstr ""
|
489 |
|
490 |
+
#: admin/settings.php:464
|
491 |
msgid "Plugin Blog"
|
492 |
msgstr ""
|
493 |
|
494 |
+
#: admin/settings.php:465
|
495 |
msgid "Make a donation via PayPal"
|
496 |
msgstr ""
|
497 |
|
498 |
+
#: admin/settings.php:471
|
499 |
msgid "Submit"
|
500 |
msgstr ""
|
501 |
|
502 |
+
#: admin/settings.php:475
|
503 |
msgid "Reset to Default Settings"
|
504 |
msgstr ""
|
505 |
|
506 |
+
#: admin/settings.php:476
|
507 |
msgid ""
|
508 |
"Use this to reset all options to their defaults. This <strong><em>will not</"
|
509 |
"em></strong> modify your list of subscribers."
|
510 |
msgstr ""
|
511 |
|
512 |
+
#: admin/settings.php:478
|
513 |
msgid "RESET"
|
514 |
msgstr ""
|
515 |
|
516 |
+
#: admin/subscribers.php:25
|
517 |
msgid "Address(es) subscribed!"
|
518 |
msgstr ""
|
519 |
|
520 |
+
#: admin/subscribers.php:32
|
521 |
msgid "Address(es) unsubscribed!"
|
522 |
msgstr ""
|
523 |
|
524 |
+
#: admin/subscribers.php:36
|
525 |
msgid "Some emails were not processed, the following were already subscribed"
|
526 |
msgstr ""
|
527 |
|
528 |
+
#: admin/subscribers.php:39
|
529 |
msgid "Some emails were not processed, the following were not in the database"
|
530 |
msgstr ""
|
531 |
|
532 |
+
#: admin/subscribers.php:48
|
533 |
msgid "Address(es) deleted!"
|
534 |
msgstr ""
|
535 |
|
536 |
+
#: admin/subscribers.php:56
|
537 |
+
msgid "Delete failed! You cannot delete some or all of these users"
|
538 |
+
msgstr ""
|
539 |
+
|
540 |
+
#: admin/subscribers.php:59
|
541 |
+
msgid "User(s) deleted! Any posts made by these users were assigned to you"
|
542 |
+
msgstr ""
|
543 |
+
|
544 |
+
#: admin/subscribers.php:71
|
545 |
msgid "Status changed!"
|
546 |
msgstr ""
|
547 |
|
548 |
+
#: admin/subscribers.php:74
|
549 |
msgid "Reminder Email(s) Sent!"
|
550 |
msgstr ""
|
551 |
|
552 |
+
#: admin/subscribers.php:77
|
553 |
msgid "Registered Users Subscribed!"
|
554 |
msgstr ""
|
555 |
|
556 |
+
#: admin/subscribers.php:80
|
557 |
msgid "Registered Users Unsubscribed!"
|
558 |
msgstr ""
|
559 |
|
560 |
+
#: admin/subscribers.php:83
|
561 |
msgid "Format updated for Selected Registered Users!"
|
562 |
msgstr ""
|
563 |
|
564 |
+
#: admin/subscribers.php:86
|
565 |
msgid "Digest Subscription updated for Selected Registered Users!"
|
566 |
msgstr ""
|
567 |
|
568 |
+
#: admin/subscribers.php:173 classes/class-s2-admin.php:60
|
569 |
+
#: classes/class-s2-admin.php:490
|
570 |
msgid "Public Subscribers"
|
571 |
msgstr ""
|
572 |
|
573 |
+
#: admin/subscribers.php:173 classes/class-s2-admin.php:65
|
574 |
+
#: classes/class-s2-admin.php:494
|
575 |
msgid "Registered Subscribers"
|
576 |
msgstr ""
|
577 |
|
578 |
+
#: admin/subscribers.php:185 admin/subscribers.php:207
|
579 |
msgid "Add/Remove Subscribers"
|
580 |
msgstr ""
|
581 |
|
582 |
+
#: admin/subscribers.php:186
|
583 |
msgid "Enter addresses, one per line or comma-separated"
|
584 |
msgstr ""
|
585 |
|
586 |
+
#: admin/subscribers.php:189 admin/subscribers.php:253
|
587 |
+
#: admin/your_subscriptions.php:260 classes/class-s2-frontend.php:28
|
|
|
588 |
msgid "Subscribe"
|
589 |
msgstr ""
|
590 |
|
591 |
+
#: admin/subscribers.php:190 admin/subscribers.php:254
|
592 |
+
#: admin/your_subscriptions.php:239 classes/class-s2-frontend.php:27
|
593 |
msgid "Unsubscribe"
|
594 |
msgstr ""
|
595 |
|
596 |
+
#: admin/subscribers.php:195 admin/subscribers.php:214
|
597 |
msgid "Current Subscribers"
|
598 |
msgstr ""
|
599 |
|
600 |
+
#: admin/subscribers.php:208
|
601 |
msgid "Add Registered User"
|
602 |
msgstr ""
|
603 |
|
604 |
+
#: admin/subscribers.php:223
|
605 |
msgid "Filter"
|
606 |
msgstr ""
|
607 |
|
608 |
+
#: admin/subscribers.php:227
|
609 |
msgid "Send Reminder Email"
|
610 |
msgstr ""
|
611 |
|
612 |
+
#: admin/subscribers.php:234
|
613 |
msgid "Save Emails to CSV File"
|
614 |
msgstr ""
|
615 |
|
616 |
+
#: admin/subscribers.php:241
|
617 |
msgid "Search"
|
618 |
msgstr ""
|
619 |
|
620 |
+
#: admin/subscribers.php:248
|
621 |
msgid "Bulk Management"
|
622 |
msgstr ""
|
623 |
|
624 |
+
#: admin/subscribers.php:250 admin/subscribers.php:264
|
625 |
msgid ""
|
626 |
"Preferences for Registered Users selected in the filter above can be changed "
|
627 |
"using this section."
|
628 |
msgstr ""
|
629 |
|
630 |
+
#: admin/subscribers.php:251 admin/subscribers.php:265
|
631 |
msgid "Consider User Privacy as changes cannot be undone"
|
632 |
msgstr ""
|
633 |
|
634 |
+
#: admin/subscribers.php:252
|
635 |
msgid "Action to perform"
|
636 |
msgstr ""
|
637 |
|
638 |
+
#: admin/subscribers.php:256
|
639 |
msgid "Bulk Update Categories"
|
640 |
msgstr ""
|
641 |
|
642 |
+
#: admin/subscribers.php:257
|
643 |
msgid "Send email as"
|
644 |
msgstr ""
|
645 |
|
646 |
+
#: admin/subscribers.php:262
|
647 |
msgid "Bulk Update Format"
|
648 |
msgstr ""
|
649 |
|
650 |
+
#: admin/subscribers.php:266
|
651 |
msgid "Subscribe Selected Users to recieve a periodic digest notification"
|
652 |
msgstr ""
|
653 |
|
654 |
+
#: admin/subscribers.php:271
|
655 |
msgid "Bulk Update Digest Subscription"
|
656 |
msgstr ""
|
657 |
|
731 |
msgid "Subscribe to new blogs"
|
732 |
msgstr ""
|
733 |
|
734 |
+
#. #-#-#-#-# Subscribe2.pot (Subscribe2 9.0) #-#-#-#-#
|
735 |
#. Plugin Name of the plugin/theme
|
736 |
#: classes/class-s2-admin.php:8 include/widget.php:17
|
737 |
msgid "Subscribe2"
|
741 |
msgid "Your Subscriptions"
|
742 |
msgstr ""
|
743 |
|
744 |
+
#: classes/class-s2-admin.php:15
|
745 |
msgid "Subscribers"
|
746 |
msgstr ""
|
747 |
|
748 |
+
#: classes/class-s2-admin.php:19 classes/class-s2-admin.php:161
|
749 |
msgid "Settings"
|
750 |
msgstr ""
|
751 |
|
752 |
+
#: classes/class-s2-admin.php:25
|
753 |
msgid "Send Email"
|
754 |
msgstr ""
|
755 |
|
756 |
+
#: classes/class-s2-admin.php:39 classes/class-s2-admin.php:45
|
757 |
+
#: classes/class-s2-admin.php:55 classes/class-s2-admin.php:76
|
758 |
+
#: classes/class-s2-admin.php:121
|
759 |
+
msgid "Overview"
|
760 |
+
msgstr ""
|
761 |
+
|
762 |
+
#: classes/class-s2-admin.php:40
|
763 |
+
msgid ""
|
764 |
+
"From this page you can opt in or out of receiving a periodical digest style "
|
765 |
+
"email of blog posts."
|
766 |
+
msgstr ""
|
767 |
+
|
768 |
+
#: classes/class-s2-admin.php:46
|
769 |
+
msgid ""
|
770 |
+
"From this page you can control your subscription preferences. Choose the "
|
771 |
+
"email format you wish to receive, which categories you would like to receive "
|
772 |
+
"notification for and depending on the site settings which authors you would "
|
773 |
+
"like to read."
|
774 |
+
msgstr ""
|
775 |
+
|
776 |
+
#: classes/class-s2-admin.php:56
|
777 |
+
msgid "From this page you can manage your subscribers."
|
778 |
+
msgstr ""
|
779 |
+
|
780 |
+
#: classes/class-s2-admin.php:61
|
781 |
+
msgid ""
|
782 |
+
"Public Subscribers are subscribers who have used the plugin form and only "
|
783 |
+
"provided their email address."
|
784 |
+
msgstr ""
|
785 |
+
|
786 |
+
#: classes/class-s2-admin.php:61
|
787 |
+
msgid ""
|
788 |
+
"On this page public subscribers can be viewed, searched, deleted and also "
|
789 |
+
"toggled between Confirmed and Unconfirmed status."
|
790 |
+
msgstr ""
|
791 |
+
|
792 |
+
#: classes/class-s2-admin.php:66
|
793 |
+
msgid ""
|
794 |
+
"Registered Subscribers are subscribers who have registered in WordPress and "
|
795 |
+
"have a username and password."
|
796 |
+
msgstr ""
|
797 |
+
|
798 |
+
#: classes/class-s2-admin.php:67
|
799 |
+
msgid ""
|
800 |
+
"Registered Subscribers have greater personal control over their "
|
801 |
+
"subscription. They can change the format of the email and also select which "
|
802 |
+
"categories and authors they want to receive notifications about."
|
803 |
+
msgstr ""
|
804 |
+
|
805 |
+
#: classes/class-s2-admin.php:68
|
806 |
+
msgid ""
|
807 |
+
"On this page registered subscribers can be viewed and searched. User "
|
808 |
+
"accounts can be deleted from here with any posts created by those users "
|
809 |
+
"being assigned to the currently logged in user. Bulk changes can be applied "
|
810 |
+
"to all user settings changing their subscription email format and categories."
|
811 |
+
msgstr ""
|
812 |
+
|
813 |
+
#: classes/class-s2-admin.php:77
|
814 |
+
msgid "From this page you can adjust the Settings for Subscribe2."
|
815 |
+
msgstr ""
|
816 |
+
|
817 |
+
#: classes/class-s2-admin.php:82
|
818 |
+
msgid ""
|
819 |
+
"This section allows you to specify settings that apply to the emails "
|
820 |
+
"generated by the site."
|
821 |
+
msgstr ""
|
822 |
+
|
823 |
+
#: classes/class-s2-admin.php:83
|
824 |
+
msgid ""
|
825 |
+
"Emails can be sent to individual subscribers by setting the number of "
|
826 |
+
"recipients per email to 1. A setting greater than one will group recipients "
|
827 |
+
"together and make use of the BCC emails header. A setting of 0 sends a "
|
828 |
+
"single email with all subscribers in one large BCC group. A setting of 1 "
|
829 |
+
"looks less like spam email to filters but takes longer to process."
|
830 |
+
msgstr ""
|
831 |
+
|
832 |
+
#: classes/class-s2-admin.php:84
|
833 |
+
msgid ""
|
834 |
+
"This section is also where the sender of the email on this page is chosen. "
|
835 |
+
"You can choose Post Author or your Blogname but it is recommended to create "
|
836 |
+
"a user account with an email address that really exists and shares the same "
|
837 |
+
"domain name as your site (the bit after the @ should be the same as your "
|
838 |
+
"sites web address) and then use this account."
|
839 |
+
msgstr ""
|
840 |
+
|
841 |
+
#: classes/class-s2-admin.php:85
|
842 |
+
msgid ""
|
843 |
+
"This page also configures the frequency of emails. This can be at the time "
|
844 |
+
"new posts are made (per post) or periodically with an excerpt of each post "
|
845 |
+
"made (digest). Additionally the post types (pages, private, password "
|
846 |
+
"protected) can also be configured here."
|
847 |
+
msgstr ""
|
848 |
+
|
849 |
+
#: classes/class-s2-admin.php:90
|
850 |
+
msgid ""
|
851 |
+
"This section allows you to customise the content of your notification emails."
|
852 |
+
msgstr ""
|
853 |
+
|
854 |
+
#: classes/class-s2-admin.php:91
|
855 |
+
msgid ""
|
856 |
+
"There are special {KEYWORDS} that are used by Subscribe2 to place content "
|
857 |
+
"into the final email. The template also accept regular text and HTML as "
|
858 |
+
"desired in the final emaisl."
|
859 |
+
msgstr ""
|
860 |
+
|
861 |
+
#: classes/class-s2-admin.php:92
|
862 |
+
msgid ""
|
863 |
+
"The {KEYWORDS} are listed on the right of the templates, note that some are "
|
864 |
+
"for per post emails only and some are for digest emails only. Make sure the "
|
865 |
+
"correct keywords are used based upon the Email Settings."
|
866 |
+
msgstr ""
|
867 |
+
|
868 |
+
#: classes/class-s2-admin.php:97
|
869 |
+
msgid ""
|
870 |
+
"This section allows settings that apply to Registered Subscribers to be "
|
871 |
+
"configured."
|
872 |
+
msgstr ""
|
873 |
+
|
874 |
+
#: classes/class-s2-admin.php:98
|
875 |
+
msgid ""
|
876 |
+
"Categories can be made compulsory so emails are always sent for posts in "
|
877 |
+
"these categories. They can also be excludes so that emails are not "
|
878 |
+
"generated. Excluded categories take precedence over Compulsory categories."
|
879 |
+
msgstr ""
|
880 |
+
|
881 |
+
#: classes/class-s2-admin.php:99
|
882 |
+
msgid ""
|
883 |
+
"A set of default settings for new users can also be specified using the Auto "
|
884 |
+
"Subscribe section. Settings specified here will be applied to any newly "
|
885 |
+
"created user accounts while Subscribe2 is activated."
|
886 |
+
msgstr ""
|
887 |
+
|
888 |
+
#: classes/class-s2-admin.php:104
|
889 |
+
msgid ""
|
890 |
+
"This section allows you to enable several aspect of the plugin such as "
|
891 |
+
"Widgets and editor buttons."
|
892 |
+
msgstr ""
|
893 |
+
|
894 |
+
#: classes/class-s2-admin.php:105
|
895 |
+
msgid ""
|
896 |
+
"AJAX mode can be enabled that is intended to work with the shortcode link "
|
897 |
+
"parameter so that a dialog opens in the centre of the browser rather then "
|
898 |
+
"using the regular form."
|
899 |
+
msgstr ""
|
900 |
+
|
901 |
+
#: classes/class-s2-admin.php:106
|
902 |
+
msgid ""
|
903 |
+
"The email over ride check box can be set to be automatically checked for "
|
904 |
+
"every new post and page from here to, this may be useful if you will only "
|
905 |
+
"want to send very occasional notifications for specific posts. You can then "
|
906 |
+
"uncheck this box just before you publish your content."
|
907 |
+
msgstr ""
|
908 |
+
|
909 |
+
#: classes/class-s2-admin.php:111
|
910 |
+
msgid ""
|
911 |
+
"This section contains a place to bar specified domains from becoming Public "
|
912 |
+
"Subscribers and links to help and support pages."
|
913 |
+
msgstr ""
|
914 |
+
|
915 |
+
#: classes/class-s2-admin.php:112
|
916 |
+
msgid ""
|
917 |
+
"In the paid Subscribe2 HTML version there is also a place here to enter a "
|
918 |
+
"license code so that updates can be accessed automatically."
|
919 |
+
msgstr ""
|
920 |
+
|
921 |
+
#: classes/class-s2-admin.php:122
|
922 |
+
msgid ""
|
923 |
+
"From this page you can send emails to the recipients in the group selected "
|
924 |
+
"in the drop down."
|
925 |
+
msgstr ""
|
926 |
+
|
927 |
+
#: classes/class-s2-admin.php:123
|
928 |
+
msgid ""
|
929 |
+
"<strong>Preview</strong> will send a preview of the email to the currently "
|
930 |
+
"logged in user. <strong>Send</strong> will send the email to the recipient "
|
931 |
+
"list."
|
932 |
+
msgstr ""
|
933 |
+
|
934 |
+
#: classes/class-s2-admin.php:163
|
935 |
msgid "Donate"
|
936 |
msgstr ""
|
937 |
|
938 |
+
#: classes/class-s2-admin.php:247 classes/class-s2-admin.php:248
|
939 |
msgid "Subscribe2 Notification Override"
|
940 |
msgstr ""
|
941 |
|
942 |
+
#: classes/class-s2-admin.php:258
|
943 |
msgid ""
|
944 |
"Check here to disable sending of an email notification for this post/page"
|
945 |
msgstr ""
|
946 |
|
947 |
+
#: classes/class-s2-admin.php:340 classes/class-s2-admin.php:397
|
948 |
+
#: classes/class-s2-admin.php:437
|
949 |
msgid "Select / Unselect All"
|
950 |
msgstr ""
|
951 |
|
952 |
+
#: classes/class-s2-admin.php:489
|
953 |
msgid "All Users and Subscribers"
|
954 |
msgstr ""
|
955 |
|
956 |
+
#: classes/class-s2-admin.php:491
|
957 |
msgid "Confirmed"
|
958 |
msgstr ""
|
959 |
|
960 |
+
#: classes/class-s2-admin.php:492
|
961 |
msgid "Unconfirmed"
|
962 |
msgstr ""
|
963 |
|
964 |
+
#: classes/class-s2-admin.php:493
|
965 |
msgid "All Registered Users"
|
966 |
msgstr ""
|
967 |
|
968 |
+
#: classes/class-s2-admin.php:589
|
969 |
msgid "Post Author"
|
970 |
msgstr ""
|
971 |
|
972 |
+
#: classes/class-s2-admin.php:613
|
973 |
msgid ""
|
974 |
"The WordPress cron functions may be disabled on this server. Digest "
|
975 |
"notifications may not work."
|
976 |
msgstr ""
|
977 |
|
978 |
+
#: classes/class-s2-admin.php:618
|
979 |
msgid "For each Post"
|
980 |
msgstr ""
|
981 |
|
982 |
+
#: classes/class-s2-admin.php:635
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
983 |
msgid "Current UTC time is"
|
984 |
msgstr ""
|
985 |
|
986 |
+
#: classes/class-s2-admin.php:637
|
987 |
msgid "Current blog time is"
|
988 |
msgstr ""
|
989 |
|
990 |
+
#: classes/class-s2-admin.php:639
|
991 |
msgid "Next email notification will be sent when your blog time is after"
|
992 |
msgstr ""
|
993 |
|
994 |
+
#: classes/class-s2-admin.php:661
|
995 |
msgid "Attempt to resend the last Digest Notification email"
|
996 |
msgstr ""
|
997 |
|
998 |
+
#: classes/class-s2-admin.php:662
|
999 |
msgid "Resend Digest"
|
1000 |
msgstr ""
|
1001 |
|
1002 |
+
#: classes/class-s2-admin.php:676
|
1003 |
+
msgid "Select a page"
|
1004 |
+
msgstr ""
|
1005 |
+
|
1006 |
+
#: classes/class-s2-admin.php:901
|
1007 |
msgid "Email subscription"
|
1008 |
msgstr ""
|
1009 |
|
1010 |
+
#: classes/class-s2-admin.php:903
|
1011 |
msgid "Subscribe / Unsubscribe"
|
1012 |
msgstr ""
|
1013 |
|
1014 |
+
#: classes/class-s2-admin.php:904
|
1015 |
msgid "Receive notifications"
|
1016 |
msgstr ""
|
1017 |
|
1018 |
+
#: classes/class-s2-admin.php:905
|
1019 |
msgid ""
|
1020 |
"Check if you want to receive email notification when new posts are published"
|
1021 |
msgstr ""
|
1022 |
|
1023 |
+
#: classes/class-s2-core.php:20
|
1024 |
+
msgid "To manage your subscription options please <a href=\"%1$s\">login.</a>"
|
|
|
|
|
|
|
|
|
1025 |
msgstr ""
|
1026 |
|
1027 |
+
#: classes/class-s2-core.php:22
|
1028 |
+
msgid ""
|
1029 |
+
"You may manage your subscription options from your <a href=\"%1$s\">profile</"
|
1030 |
+
"a>"
|
|
|
|
|
1031 |
msgstr ""
|
1032 |
|
1033 |
+
#: classes/class-s2-core.php:28
|
1034 |
+
msgid ""
|
1035 |
+
"<a href=\"%1$s\">Subscribe</a> to email notifications when this blog posts "
|
1036 |
+
"new content."
|
1037 |
msgstr ""
|
1038 |
|
1039 |
+
#: classes/class-s2-core.php:32
|
1040 |
msgid "A confirmation message is on its way!"
|
1041 |
msgstr ""
|
1042 |
|
1043 |
+
#: classes/class-s2-core.php:34
|
1044 |
msgid "That email address is already subscribed."
|
1045 |
msgstr ""
|
1046 |
|
1047 |
+
#: classes/class-s2-core.php:36
|
1048 |
msgid "That email address is not subscribed."
|
1049 |
msgstr ""
|
1050 |
|
1051 |
+
#: classes/class-s2-core.php:38
|
1052 |
msgid "Sorry, but that does not look like an email address to me."
|
1053 |
msgstr ""
|
1054 |
|
1055 |
+
#: classes/class-s2-core.php:40
|
1056 |
msgid ""
|
1057 |
"Sorry, email addresses at that domain are currently barred due to spam, "
|
1058 |
"please use an alternative email address."
|
1059 |
msgstr ""
|
1060 |
|
1061 |
+
#: classes/class-s2-core.php:42
|
1062 |
msgid ""
|
1063 |
"Sorry, there seems to be an error on the server. Please try again later."
|
1064 |
msgstr ""
|
1065 |
|
1066 |
+
#: classes/class-s2-core.php:44
|
1067 |
msgid "You must to create a WordPress page for this plugin to work correctly."
|
1068 |
msgstr ""
|
1069 |
|
1070 |
+
#: classes/class-s2-core.php:46
|
1071 |
+
msgid ""
|
1072 |
+
"Your chosen email type (per-post or digest) does not support the following "
|
1073 |
+
"keywords:"
|
1074 |
msgstr ""
|
1075 |
|
1076 |
+
#: classes/class-s2-core.php:48
|
1077 |
+
msgid "Message sent!"
|
|
|
1078 |
msgstr ""
|
1079 |
|
1080 |
#: classes/class-s2-core.php:50
|
1081 |
+
msgid "Message failed!"
|
1082 |
+
msgstr ""
|
1083 |
+
|
1084 |
+
#: classes/class-s2-core.php:53
|
1085 |
msgid "No such email address is registered."
|
1086 |
msgstr ""
|
1087 |
|
1088 |
+
#: classes/class-s2-core.php:55
|
1089 |
msgid "You have successfully subscribed!"
|
1090 |
msgstr ""
|
1091 |
|
1092 |
+
#: classes/class-s2-core.php:57
|
1093 |
msgid "You have successfully unsubscribed."
|
1094 |
msgstr ""
|
1095 |
|
1096 |
+
#: classes/class-s2-core.php:59
|
1097 |
msgid "subscribe"
|
1098 |
msgstr ""
|
1099 |
|
1100 |
+
#: classes/class-s2-core.php:61
|
1101 |
msgid "unsubscribe"
|
1102 |
msgstr ""
|
1103 |
|
1104 |
+
#: classes/class-s2-core.php:64
|
1105 |
msgid "Options saved!"
|
1106 |
msgstr ""
|
1107 |
|
1108 |
+
#: classes/class-s2-core.php:65
|
1109 |
msgid "Options reset!"
|
1110 |
msgstr ""
|
1111 |
|
1112 |
+
#: classes/class-s2-core.php:617
|
1113 |
msgid "Plain Text Excerpt Preview"
|
1114 |
msgstr ""
|
1115 |
|
1116 |
+
#: classes/class-s2-core.php:619
|
1117 |
msgid "Plain Text Full Preview"
|
1118 |
msgstr ""
|
1119 |
|
1120 |
+
#: classes/class-s2-core.php:621
|
1121 |
msgid "HTML Excerpt Preview"
|
1122 |
msgstr ""
|
1123 |
|
1124 |
+
#: classes/class-s2-core.php:623
|
1125 |
msgid "HTML Full Preview"
|
1126 |
msgstr ""
|
1127 |
|
1128 |
+
#: classes/class-s2-core.php:1172
|
1129 |
msgid "Registered User"
|
1130 |
msgstr ""
|
1131 |
|
1132 |
+
#: classes/class-s2-core.php:1177
|
1133 |
msgid "Confirmed Public Subscriber"
|
1134 |
msgstr ""
|
1135 |
|
1136 |
+
#: classes/class-s2-core.php:1179
|
1137 |
msgid "Unconfirmed Public Subscriber"
|
1138 |
msgstr ""
|
1139 |
|
1140 |
+
#: classes/class-s2-core.php:1216
|
1141 |
msgid "Check here to Subscribe to email notifications for new posts"
|
1142 |
msgstr ""
|
1143 |
|
1144 |
+
#: classes/class-s2-core.php:1222
|
1145 |
msgid ""
|
1146 |
"By registering with this blog you are also agreeing to receive email "
|
1147 |
"notifications for new posts but you can unsubscribe at anytime"
|
1148 |
msgstr ""
|
1149 |
|
1150 |
+
#: classes/class-s2-core.php:1248
|
1151 |
msgid "Check here to Subscribe to notifications for new posts"
|
1152 |
msgstr ""
|
1153 |
|
1154 |
+
#: classes/class-s2-core.php:1338
|
1155 |
msgid "Weekly"
|
1156 |
msgstr ""
|
1157 |
|
1158 |
+
#: classes/class-s2-core.php:1472 classes/class-s2-core.php:1473
|
1159 |
msgid "Author"
|
1160 |
msgstr ""
|
1161 |
|
1162 |
+
#: classes/class-s2-core.php:1479
|
1163 |
msgid "Posted on"
|
1164 |
msgstr ""
|
1165 |
|
1166 |
+
#: classes/class-s2-core.php:1497 classes/class-s2-core.php:1498
|
1167 |
msgid "Posted in"
|
1168 |
msgstr ""
|
1169 |
|
1170 |
+
#: classes/class-s2-core.php:1503 classes/class-s2-core.php:1504
|
1171 |
msgid "Tagged as"
|
1172 |
msgstr ""
|
1173 |
|
1174 |
+
#: classes/class-s2-core.php:1570
|
1175 |
msgid "Digest Email"
|
1176 |
msgstr ""
|
1177 |
|
1178 |
+
#: classes/class-s2-core.php:1580
|
1179 |
msgid "Digest Preview"
|
1180 |
msgstr ""
|
1181 |
|
1182 |
+
#: classes/class-s2-frontend.php:58
|
1183 |
msgid "Enter email address..."
|
1184 |
msgstr ""
|
1185 |
|
1186 |
+
#: classes/class-s2-frontend.php:78 classes/class-s2-frontend.php:80
|
1187 |
msgid "Your email:"
|
1188 |
msgstr ""
|
1189 |
|
1190 |
+
#: classes/class-s2-frontend.php:199
|
1191 |
msgid "Subscription Confirmation"
|
1192 |
msgstr ""
|
1193 |
|
1194 |
+
#: classes/class-s2-frontend.php:201
|
1195 |
msgid "Unsubscription Confirmation"
|
1196 |
msgstr ""
|
1197 |
|
1198 |
+
#: classes/class-s2-frontend.php:240
|
1199 |
msgid "New Subscription"
|
1200 |
msgstr ""
|
1201 |
|
1202 |
+
#: classes/class-s2-frontend.php:242
|
1203 |
msgid "subscribed to email notifications!"
|
1204 |
msgstr ""
|
1205 |
|
1206 |
+
#: classes/class-s2-frontend.php:264
|
1207 |
msgid "New Unsubscription"
|
1208 |
msgstr ""
|
1209 |
|
1210 |
+
#: classes/class-s2-frontend.php:266
|
1211 |
msgid "unsubscribed from email notifications!"
|
1212 |
msgstr ""
|
1213 |
|
1214 |
+
#: classes/class-s2-frontend.php:293
|
1215 |
msgid "[Un]Subscribe to Posts"
|
1216 |
msgstr ""
|
1217 |
|
1218 |
+
#: classes/class-s2-frontend.php:324 classes/class-s2-frontend.php:326
|
1219 |
msgid "Subscribe to this blog"
|
1220 |
msgstr ""
|
1221 |
|
1222 |
+
#: classes/class-s2-list-table.php:57 classes/class-s2-list-table.php:62
|
1223 |
+
#: classes/class-s2-list-table.php:68
|
1224 |
msgctxt "column name"
|
1225 |
msgid "Email"
|
1226 |
msgstr ""
|
1227 |
|
1228 |
+
#: classes/class-s2-list-table.php:69
|
1229 |
msgctxt "column name"
|
1230 |
msgid "Date"
|
1231 |
msgstr ""
|
1232 |
|
1233 |
+
#: classes/class-s2-list-table.php:95 classes/class-s2-list-table.php:100
|
1234 |
msgid "Delete"
|
1235 |
msgstr ""
|
1236 |
|
1237 |
+
#: classes/class-s2-list-table.php:101
|
1238 |
msgid "Toggle"
|
1239 |
msgstr ""
|
1240 |
|
1241 |
+
#: classes/class-s2-list-table.php:113
|
1242 |
msgid "1 item"
|
1243 |
msgid_plural "%s items"
|
1244 |
msgstr[0] ""
|
1245 |
msgstr[1] ""
|
1246 |
|
1247 |
+
#: classes/class-s2-list-table.php:149
|
1248 |
msgid "Go to the first page"
|
1249 |
msgstr ""
|
1250 |
|
1251 |
+
#: classes/class-s2-list-table.php:156
|
1252 |
msgid "Go to the previous page"
|
1253 |
msgstr ""
|
1254 |
|
1255 |
+
#: classes/class-s2-list-table.php:165
|
1256 |
msgid "Current page"
|
1257 |
msgstr ""
|
1258 |
|
1259 |
+
#: classes/class-s2-list-table.php:171
|
1260 |
msgctxt "paging"
|
1261 |
msgid "%1$s of %2$s"
|
1262 |
msgstr ""
|
1263 |
|
1264 |
+
#: classes/class-s2-list-table.php:175
|
1265 |
msgid "Go to the next page"
|
1266 |
msgstr ""
|
1267 |
|
1268 |
+
#: classes/class-s2-list-table.php:182
|
1269 |
msgid "Go to the last page"
|
1270 |
msgstr ""
|
1271 |
|
1370 |
msgid "Subscribe2 Widget"
|
1371 |
msgstr ""
|
1372 |
|
1373 |
+
#: include/widget.php:30
|
1374 |
msgid "(Un)Subscribe to Posts"
|
1375 |
msgstr ""
|
1376 |
|
1377 |
+
#: include/widget.php:107
|
1378 |
msgid "Title"
|
1379 |
msgstr ""
|
1380 |
|
1381 |
+
#: include/widget.php:109
|
1382 |
msgid "Div class name"
|
1383 |
msgstr ""
|
1384 |
|
1385 |
+
#: include/widget.php:111
|
1386 |
msgid "Pre-Content"
|
1387 |
msgstr ""
|
1388 |
|
1389 |
+
#: include/widget.php:113
|
1390 |
msgid "Post-Content"
|
1391 |
msgstr ""
|
1392 |
|
1393 |
+
#: include/widget.php:115
|
1394 |
msgid "Text Box Size"
|
1395 |
msgstr ""
|
1396 |
|
1397 |
+
#: include/widget.php:117
|
1398 |
msgid "Display options"
|
1399 |
msgstr ""
|
1400 |
|
1401 |
+
#: include/widget.php:118
|
1402 |
msgid "Show complete form"
|
1403 |
msgstr ""
|
1404 |
|
1405 |
+
#: include/widget.php:119
|
1406 |
msgid "Hide Subscribe button"
|
1407 |
msgstr ""
|
1408 |
|
1409 |
+
#: include/widget.php:120
|
1410 |
msgid "Hide Unsubscribe button"
|
1411 |
msgstr ""
|
1412 |
|
1413 |
+
#: include/widget.php:122
|
1414 |
msgid "Show as link"
|
1415 |
msgstr ""
|
1416 |
|
1417 |
+
#: include/widget.php:125
|
1418 |
msgid "Post form content to page"
|
1419 |
msgstr ""
|
1420 |
|
1421 |
+
#: include/widget.php:127
|
1422 |
msgid "Use Subscribe2 Default"
|
1423 |
msgstr ""
|
1424 |
|
1425 |
+
#: include/widget.php:130
|
1426 |
msgid "Use Home Page"
|
1427 |
msgstr ""
|
1428 |
|
1429 |
+
#: include/widget.php:133
|
1430 |
msgid "Use Referring Page"
|
1431 |
msgstr ""
|
1432 |
|
1433 |
+
#: include/widget.php:136
|
1434 |
msgid "Disable JavaScript"
|
1435 |
msgstr ""
|
1436 |
|
1437 |
+
#: include/widget.php:139
|
1438 |
+
msgid "Disable Anti-spam measures"
|
1439 |
+
msgstr ""
|
1440 |
+
|
1441 |
+
#: subscribe2.php:37
|
1442 |
msgid "I'm just a plugin, please don't call me directly"
|
1443 |
msgstr ""
|
1444 |
|
1445 |
+
#: subscribe2.php:40
|
1446 |
msgid ""
|
1447 |
+
"This version of Subscribe2 requires WordPress 3.3 or greater. Please update "
|
1448 |
"%1$s or use an older version of %2$s."
|
1449 |
msgstr ""
|
1450 |
|
1451 |
+
#: subscribe2.php:52
|
1452 |
msgid ""
|
1453 |
"Subscribe2 cannot be activated as a network plugin. Please activate it at on "
|
1454 |
"a site level"
|
1455 |
msgstr ""
|
1456 |
|
1457 |
+
#. #-#-#-#-# Subscribe2.pot (Subscribe2 9.0) #-#-#-#-#
|
1458 |
#. Plugin URI of the plugin/theme
|
1459 |
+
#. #-#-#-#-# Subscribe2.pot (Subscribe2 9.0) #-#-#-#-#
|
1460 |
#. Author URI of the plugin/theme
|
1461 |
msgid "http://subscribe2.wordpress.com"
|
1462 |
msgstr ""
|
uninstall.php
CHANGED
@@ -1,50 +1,50 @@
|
|
1 |
-
<?php
|
2 |
-
if ( !defined('ABSPATH') && !defined('WP_UNINSTALL_PLUGIN') ) {
|
3 |
-
// Make sure not to call this file directly
|
4 |
-
exit();
|
5 |
-
} else {
|
6 |
-
// Is this WordPressMU or not?
|
7 |
-
if ( isset($wpmu_version) || strpos($wp_version, 'wordpress-mu') ) {
|
8 |
-
$s2_mu = true;
|
9 |
-
}
|
10 |
-
if ( function_exists('is_multisite') && is_multisite() ) {
|
11 |
-
$s2_mu = true;
|
12 |
-
}
|
13 |
-
|
14 |
-
if ( $s2_mu ) {
|
15 |
-
global $wpdb;
|
16 |
-
$blogs = $wpdb->get_col("SELECT blog_id FROM {$wpdb->blogs}");
|
17 |
-
foreach ( $blogs as $blog ) {
|
18 |
-
switch_to_blog($blog);
|
19 |
-
s2_uninstall();
|
20 |
-
restore_current_blog();
|
21 |
-
}
|
22 |
-
} else {
|
23 |
-
s2_uninstall();
|
24 |
-
}
|
25 |
-
}
|
26 |
-
function s2_uninstall() {
|
27 |
-
global $wpdb;
|
28 |
-
// get name of subscribe2 table
|
29 |
-
$public = $wpdb->prefix . "subscribe2";
|
30 |
-
// delete entry from wp_options table
|
31 |
-
delete_option('subscribe2_options');
|
32 |
-
// delete legacy entry from wp-options table
|
33 |
-
delete_option('s2_future_posts');
|
34 |
-
// remove and scheduled events
|
35 |
-
wp_clear_scheduled_hook('s2_digest_cron');
|
36 |
-
// delete usermeta data for registered users
|
37 |
-
// use LIKE and % wildcard as meta_key names are prepended on WPMU
|
38 |
-
// and s2_cat is appended with category ID integer
|
39 |
-
$wpdb->query("DELETE from $wpdb->usermeta WHERE meta_key LIKE '%s2_cat%'");
|
40 |
-
$wpdb->query("DELETE from $wpdb->usermeta WHERE meta_key LIKE '%s2_subscribed'");
|
41 |
-
$wpdb->query("DELETE from $wpdb->usermeta WHERE meta_key LIKE '%s2_format'");
|
42 |
-
$wpdb->query("DELETE from $wpdb->usermeta WHERE meta_key LIKE '%s2_autosub'");
|
43 |
-
// delete any postmeta data that supressed notifications
|
44 |
-
$wpdb->query("DELETE from $wpdb->postmeta WHERE meta_key = 's2mail'");
|
45 |
-
|
46 |
-
// drop the subscribe2 table
|
47 |
-
$sql = "DROP TABLE IF EXISTS `" . $public . "`";
|
48 |
-
$wpdb->query($sql);
|
49 |
-
} // end s2_uninstall()
|
50 |
?>
|
1 |
+
<?php
|
2 |
+
if ( !defined('ABSPATH') && !defined('WP_UNINSTALL_PLUGIN') ) {
|
3 |
+
// Make sure not to call this file directly
|
4 |
+
exit();
|
5 |
+
} else {
|
6 |
+
// Is this WordPressMU or not?
|
7 |
+
if ( isset($wpmu_version) || strpos($wp_version, 'wordpress-mu') ) {
|
8 |
+
$s2_mu = true;
|
9 |
+
}
|
10 |
+
if ( function_exists('is_multisite') && is_multisite() ) {
|
11 |
+
$s2_mu = true;
|
12 |
+
}
|
13 |
+
|
14 |
+
if ( $s2_mu ) {
|
15 |
+
global $wpdb;
|
16 |
+
$blogs = $wpdb->get_col("SELECT blog_id FROM {$wpdb->blogs}");
|
17 |
+
foreach ( $blogs as $blog ) {
|
18 |
+
switch_to_blog($blog);
|
19 |
+
s2_uninstall();
|
20 |
+
restore_current_blog();
|
21 |
+
}
|
22 |
+
} else {
|
23 |
+
s2_uninstall();
|
24 |
+
}
|
25 |
+
}
|
26 |
+
function s2_uninstall() {
|
27 |
+
global $wpdb;
|
28 |
+
// get name of subscribe2 table
|
29 |
+
$public = $wpdb->prefix . "subscribe2";
|
30 |
+
// delete entry from wp_options table
|
31 |
+
delete_option('subscribe2_options');
|
32 |
+
// delete legacy entry from wp-options table
|
33 |
+
delete_option('s2_future_posts');
|
34 |
+
// remove and scheduled events
|
35 |
+
wp_clear_scheduled_hook('s2_digest_cron');
|
36 |
+
// delete usermeta data for registered users
|
37 |
+
// use LIKE and % wildcard as meta_key names are prepended on WPMU
|
38 |
+
// and s2_cat is appended with category ID integer
|
39 |
+
$wpdb->query("DELETE from $wpdb->usermeta WHERE meta_key LIKE '%s2_cat%'");
|
40 |
+
$wpdb->query("DELETE from $wpdb->usermeta WHERE meta_key LIKE '%s2_subscribed'");
|
41 |
+
$wpdb->query("DELETE from $wpdb->usermeta WHERE meta_key LIKE '%s2_format'");
|
42 |
+
$wpdb->query("DELETE from $wpdb->usermeta WHERE meta_key LIKE '%s2_autosub'");
|
43 |
+
// delete any postmeta data that supressed notifications
|
44 |
+
$wpdb->query("DELETE from $wpdb->postmeta WHERE meta_key = 's2mail'");
|
45 |
+
|
46 |
+
// drop the subscribe2 table
|
47 |
+
$sql = "DROP TABLE IF EXISTS `" . $public . "`";
|
48 |
+
$wpdb->query($sql);
|
49 |
+
} // end s2_uninstall()
|
50 |
?>
|