Better Notifications for WordPress - Version 1.3.5

Version Description

  • 9th October 2015 =
  • Fixed: A large bug that was causing issues with Password URL shortcodes in the 'New User Registration - For User' and 'Password Reset - For User' notifications.
  • Fixed: An issue where the 'disabled wpautop' checkbox was appearing on transactional emails.
  • Fixed: Some labels in the 'All Notifications' screen weren't formatted correctly.
  • Fixed: Translations weren't referenced correctly. Auto-translation will be done by WordPress.org automatically at some point in the future.
Download this release

Release Info

Developer voltronik
Plugin Icon 128x128 Better Notifications for WordPress
Version 1.3.5
Comparing to
See all releases

Code changes from version 1.3.3 to 1.3.5

README.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: voltronik
3
  Tags: notifications, email, mail, alerts, roles, user, users, admin, HTML, plain, wp_mail, shortcode, customize, post, page, updated, pending review, scheduled, category, tag, term, custom post type, comment, akismet, trackback, pingback, lost password, welcome, new user, bulk, notice, trigger, CC, BCC, from, author
4
  Requires at least: 3.5
5
- Tested up to: 4.3
6
- Stable tag: 1.3.3
7
  License: GPLv2 or later
8
 
9
  Send customisable emails to your users for different WordPress notifications.
@@ -14,10 +14,12 @@ Send customisable emails to your users for different WordPress notifications.
14
 
15
  Better Notifications for WordPress allows you to generate custom email notifications and send them to user roles (including custom roles) or individual users for all kinds of things happening on your WordPress website. Emails are sent out via your WordPress website (using `wp_mail`) but can be sent via SMTP using an appropriate 3rd party plugin should you wish.
16
 
 
 
17
  = For example: =
18
  You want a user with the editor role (or all users using the Editor role) to be alerted via email when a new post is published and you'd like to customise it to include your branding along with the author's display name and post time - with this plugin, that's easy.
19
 
20
- > A long and handy list of shortcodes you can use is available [here](http://www.voltronik.co.uk/wordpress-plugins/better-notifications-for-wordpress/ "Shortcodes for use in Better Notifications for WordPress").
21
 
22
  Notifications that are currently available to use are:
23
 
@@ -78,7 +80,7 @@ Don't think the plugin is worthy of 5 stars? Let me know on the forum and I'll d
78
  2. Activate the plugin through the 'Plugins' menu in WordPress.
79
  3. Use the settings in the new 'Notifications' Menu item in the sidebar to configure the plugin.
80
  4. (Optional) Install a plugin to use SMTP instead of `wp_mail()`.
81
- 5. Test by creating a notification with some [shortcodes](http://www.voltronik.co.uk/wordpress-plugins/better-notifications-for-wordpress/ "Shortcodes for use in Better Notifications for WordPress").
82
 
83
 
84
 
@@ -90,7 +92,7 @@ Shortcodes are little blocks of content inserted by WordPress, contained in squa
90
 
91
  Shortcodes can be used in the 'Subject' and 'Message Body' of your notifications, except for a select few (due to a restriction in WordPress).
92
 
93
- > A long and handy list of shortcodes you can use is available [here](http://www.voltronik.co.uk/wordpress-plugins/better-notifications-for-wordpress/ "Shortcodes for use in Better Notifications for WordPress").
94
 
95
  = What are some scenarios this plugin could be used for? =
96
 
@@ -119,9 +121,11 @@ This will very much depend on what notifications you're using the plugin for. Ou
119
 
120
  = Notifications aren't coming through! =
121
 
122
- Check your settings to make sure all is as it should be, then check your SPAM folder and/or filter at your host. Gmail and certain hosts can mark messages from new websites (or IP addresses) as SPAM so it's worth checking and possibly creating a filter to ensure this doesn't happen in the future.
 
 
123
 
124
- Many hosts place a limit on the number of emails that can be sent out within an hour so this may also cause some delay in emails arriving.
125
 
126
  = Some of my shortcodes aren't working! =
127
 
@@ -165,7 +169,27 @@ It might do but this is untested.
165
 
166
  == Changelog ==
167
 
168
- = 1.3.3 =
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
169
  * New: You can now send a notification to the Post Author only, where a notification supports it.
170
  * New: There is now an option in the Settings screen to globally set WordPress to send emails in either HTML or Plain Text. Please read the [FAQ](https://wordpress.org/plugins/bnfw/faq/) for more information about this as there is a small caveat.
171
  * New: Support for WordPress 4.3.
@@ -177,14 +201,14 @@ It might do but this is untested.
177
  * Fixed: Some output was being showed when WP_DEBUG was enabled.
178
  * Fixed: Removed the 'slug' field when enabled from Screen Options.
179
 
180
- = 1.3.2 =
181
  * Fixed: Replaced a deprecated function which might cause a warning to show when `WP_DEBUG` was enabled.
182
 
183
- = 1.3.1 =
184
  * Fixed: The P2 theme wasn't triggering new post or comment notifications.
185
  * Fixed: Sometimes the shortcode help link at the bottom of the notification editor wouldn't link to the help page properly.
186
 
187
- = 1.3 =
188
  * New: Option to disable notifications going to the user that triggered them.
189
  * New: Comment Reply Notification. This is a transactional notification that will only trigger when replying to the original comment (i.e. Up to 2-levels deep).
190
  * New: New Shortcode: Update Author. Use `[post_update_author]` in any Post or Page notifications to see which user updated the post.
@@ -196,7 +220,7 @@ It might do but this is untested.
196
  * Fixed: Notifications weren't getting triggered when using the P2 theme (please see the [FAQ](https://wordpress.org/plugins/bnfw/faq/) for more information about this).
197
  * Fixed: Additional Email fields were being shown for transactional notifications that couldn't use them.
198
 
199
- = 1.2 =
200
  * New: WYSIWYG Editor for notifications!
201
  * New: From Name, From Email, CC and BCC options are now available to use for each notification!
202
  * New: 'Send Me a Test Email' button. Save your notification first and then send yourself a test email! This will only go to you and not to any of the other users selected in the notification. Shortcodes will not be expanded but will be shown in place.
@@ -208,21 +232,21 @@ It might do but this is untested.
208
  * Fixed: Added a space after lists of tags, categories, and terms.
209
  * Thank you again for all of your support, feedback, and awesome reviews. You people make WordPress great!
210
 
211
- = 1.1.5.3 =
212
  * Compatibility with WordPress 4.2.
213
 
214
- = 1.1.5.2 =
215
  * Fixed: Custom Post Type Pending Posts not being sent.
216
  * Fixed: Post excerpt not outputting anything.
217
  * Removed: `[closedpostboxes_page], [rich_editing], and [admin_color]` as was a bit defunct and causing issues.
218
  * Changed: `[post_author]` now outputs the display name instead of the author ID.
219
  * Improved: Clarity of custom post type and taxonomy labels.
220
 
221
- = 1.1.5.1 =
222
  * Fix for Custom Post Type notifications not populating shortcodes.
223
  * Fix for Custom Taxonomy terms not sending out notification emails.
224
 
225
- = 1.1.5 =
226
  * New Shortcode: [permalink].
227
  * New Notifications: 'Scheduled Posts' and 'Scheduled Pages'.
228
  * New Shortcodes for the above Notifications: [post_scheduled_date] and [post_scheduled_date_gmt].
@@ -232,7 +256,7 @@ It might do but this is untested.
232
  * New Notification: 'New Page - Comment'.
233
  * Fixed: A few bugs reported via the forums and some others that i've found - thanks everyone!
234
 
235
- = 1.1 =
236
  * Lots of cool new stuff and more to come soon!
237
  * Transactional notifications (notifications intended only for the end user) have been added as a new group in the notifications select box.
238
  * New Notification: Post Pending Review (for all post types).
@@ -246,17 +270,17 @@ It might do but this is untested.
246
  * Removed: Some WordPress Multisite shortcodes that didn't work properly. Proper support for Multisite will come later.
247
  * If you liked this plugin, please leave a review. If you didn't or have a problem, please send me a message in the Support Forum.
248
 
249
- = 1.0.2 =
250
  * Bug fix for `[ID]` shortcode not outputting anything.
251
  * Bug fix for `[post_category]` showing as empty.
252
  * Added tags shortcode for use in certain notifications using `[post_tag]`.
253
 
254
- = 1.0.1 =
255
  * Bug fix for notifications not being sent to custom user roles or individual users of custom roles.
256
  * Added a 'Notification Type' column to the notifications screen.
257
  * Renamed 'User Roles' column in notifications screen to 'User Roles/Users'.
258
 
259
- = 1.0 =
260
  * First major release - we're no longer in beta!
261
  * Total overhaul. The plugin has been completely re-written.
262
  * Auto-importer: Your old notifications will be imported when updating the plugin.
@@ -266,13 +290,13 @@ It might do but this is untested.
266
  * Fully translatable.
267
  * Loads of bugfixes and improvements.
268
 
269
- = 0.2.1 beta =
270
  * Minor Bugfixes
271
 
272
- = 0.2 beta =
273
  * Added an option to suppress SPAM comment notifications.
274
 
275
- = 0.1 beta =
276
  * Initial version of the plugin.
277
  * Settings page for configuring notification types for roles.
278
  * Email Templates page for customising emails using HTML and shortcodes.
2
  Contributors: voltronik
3
  Tags: notifications, email, mail, alerts, roles, user, users, admin, HTML, plain, wp_mail, shortcode, customize, post, page, updated, pending review, scheduled, category, tag, term, custom post type, comment, akismet, trackback, pingback, lost password, welcome, new user, bulk, notice, trigger, CC, BCC, from, author
4
  Requires at least: 3.5
5
+ Tested up to: 4.3.1
6
+ Stable tag: 1.3.5
7
  License: GPLv2 or later
8
 
9
  Send customisable emails to your users for different WordPress notifications.
14
 
15
  Better Notifications for WordPress allows you to generate custom email notifications and send them to user roles (including custom roles) or individual users for all kinds of things happening on your WordPress website. Emails are sent out via your WordPress website (using `wp_mail`) but can be sent via SMTP using an appropriate 3rd party plugin should you wish.
16
 
17
+ https://www.youtube.com/watch?v=MxPUyRZPJ1Q
18
+
19
  = For example: =
20
  You want a user with the editor role (or all users using the Editor role) to be alerted via email when a new post is published and you'd like to customise it to include your branding along with the author's display name and post time - with this plugin, that's easy.
21
 
22
+ > A long and handy list of shortcodes you can use is available [here](https://betternotificationsforwp.com/shortcodes/ "Shortcodes for use in Better Notifications for WordPress").
23
 
24
  Notifications that are currently available to use are:
25
 
80
  2. Activate the plugin through the 'Plugins' menu in WordPress.
81
  3. Use the settings in the new 'Notifications' Menu item in the sidebar to configure the plugin.
82
  4. (Optional) Install a plugin to use SMTP instead of `wp_mail()`.
83
+ 5. Test by creating a notification with some [shortcodes](https://betternotificationsforwp.com/shortcodes/ "Shortcodes for use in Better Notifications for WordPress").
84
 
85
 
86
 
92
 
93
  Shortcodes can be used in the 'Subject' and 'Message Body' of your notifications, except for a select few (due to a restriction in WordPress).
94
 
95
+ > A long and handy list of shortcodes you can use is available [here](https://betternotificationsforwp.com/shortcodes/ "Shortcodes for use in Better Notifications for WordPress").
96
 
97
  = What are some scenarios this plugin could be used for? =
98
 
121
 
122
  = Notifications aren't coming through! =
123
 
124
+ A [very handy answer](http://stackoverflow.com/questions/371/how-do-you-make-sure-email-you-send-programmatically-is-not-automatically-marked) on StackExchange explains what you might need to do to make sure that emails don't make it through to your users SPAM / Junk folders. It's worth going through this and completing as much as you can.
125
+
126
+ After this, check your Notification settings to make sure all is as it should be, then check your SPAM folder and/or filter at your host. Gmail and certain hosts can mark messages from new websites (or IP addresses) as SPAM so it's worth checking and possibly creating a filter to ensure this doesn't happen in the future.
127
 
128
+ Many hosts place a limit on the number of emails that can be sent out within an hour so this may also cause some delay in emails arriving. Please check with your host to find out what this limit is.
129
 
130
  = Some of my shortcodes aren't working! =
131
 
169
 
170
  == Changelog ==
171
 
172
+ = 1.3.5 - 9th October 2015 =
173
+ * Fixed: A large bug that was causing issues with Password URL shortcodes in the 'New User Registration - For User' and 'Password Reset - For User' notifications.
174
+ * Fixed: An issue where the 'disabled wpautop' checkbox was appearing on transactional emails.
175
+ * Fixed: Some labels in the 'All Notifications' screen weren't formatted correctly.
176
+ * Fixed: Translations weren't referenced correctly. Auto-translation will be [done by WordPress.org automatically](https://make.wordpress.org/plugins/2015/09/01/plugin-translations-on-wordpress-org/) at some point in the future.
177
+
178
+ = 1.3.4 - 2nd October 2015 =
179
+ * New: Choose automatic or manual paragraph / line breaks in the WYSIWYG editor. This fixes an issue where they were inserted automatically when they weren't desired. The checkbox for this is below the WYSIWYG editor.
180
+ * New: You can now add images to your notifications using the 'Add Media' button above the WYSIWYG editor.
181
+ * New: Portuguese Brazil translation for v1.3.3 (props Glayton Caixeta).
182
+ * New: BNFW now has it's own [website](https://betternotificationsforwp.com/)!
183
+ * New: Buttons have been added linking to the Documentation and Shortcode Help sections of the website next to the WYSIWYG editor.
184
+ * New: Support for premium add-ons, coming very soon! More info and sign-up for updates [here](https://wordpress.org/support/topic/add-ons-are-coming-sign-up-for-updates).
185
+ * New: Added a video overview of BNFW showing it's features and functionality to the main plugin page and website.
186
+ * Fixed: The 'New User Registration - For User' now works again after WordPress 4.3 broke it.
187
+ * Fixed: HTML using quotes was being escaped in emails.
188
+ * Fixed: The 'Settings' sidebar menu item wasn't highlighting properly.
189
+ * I also added all previous release dates to this changelog.
190
+ * If you liked this plugin, please feel free to leave an honest [review](https://wordpress.org/support/view/plugin-reviews/bnfw?filter=5#postform). If you didn't or have a problem, please send me a message in the [Support Forum](https://wordpress.org/support/plugin/bnfw).
191
+
192
+ = 1.3.3 - 22nd August 2015 =
193
  * New: You can now send a notification to the Post Author only, where a notification supports it.
194
  * New: There is now an option in the Settings screen to globally set WordPress to send emails in either HTML or Plain Text. Please read the [FAQ](https://wordpress.org/plugins/bnfw/faq/) for more information about this as there is a small caveat.
195
  * New: Support for WordPress 4.3.
201
  * Fixed: Some output was being showed when WP_DEBUG was enabled.
202
  * Fixed: Removed the 'slug' field when enabled from Screen Options.
203
 
204
+ = 1.3.2 - 20th July 2015 =
205
  * Fixed: Replaced a deprecated function which might cause a warning to show when `WP_DEBUG` was enabled.
206
 
207
+ = 1.3.1 - 18th July 2015 =
208
  * Fixed: The P2 theme wasn't triggering new post or comment notifications.
209
  * Fixed: Sometimes the shortcode help link at the bottom of the notification editor wouldn't link to the help page properly.
210
 
211
+ = 1.3 - 2nd July 2015 =
212
  * New: Option to disable notifications going to the user that triggered them.
213
  * New: Comment Reply Notification. This is a transactional notification that will only trigger when replying to the original comment (i.e. Up to 2-levels deep).
214
  * New: New Shortcode: Update Author. Use `[post_update_author]` in any Post or Page notifications to see which user updated the post.
220
  * Fixed: Notifications weren't getting triggered when using the P2 theme (please see the [FAQ](https://wordpress.org/plugins/bnfw/faq/) for more information about this).
221
  * Fixed: Additional Email fields were being shown for transactional notifications that couldn't use them.
222
 
223
+ = 1.2 - 19th May 2015 =
224
  * New: WYSIWYG Editor for notifications!
225
  * New: From Name, From Email, CC and BCC options are now available to use for each notification!
226
  * New: 'Send Me a Test Email' button. Save your notification first and then send yourself a test email! This will only go to you and not to any of the other users selected in the notification. Shortcodes will not be expanded but will be shown in place.
232
  * Fixed: Added a space after lists of tags, categories, and terms.
233
  * Thank you again for all of your support, feedback, and awesome reviews. You people make WordPress great!
234
 
235
+ = 1.1.5.3 - 21st April 2015 =
236
  * Compatibility with WordPress 4.2.
237
 
238
+ = 1.1.5.2 - 15th April 2015 =
239
  * Fixed: Custom Post Type Pending Posts not being sent.
240
  * Fixed: Post excerpt not outputting anything.
241
  * Removed: `[closedpostboxes_page], [rich_editing], and [admin_color]` as was a bit defunct and causing issues.
242
  * Changed: `[post_author]` now outputs the display name instead of the author ID.
243
  * Improved: Clarity of custom post type and taxonomy labels.
244
 
245
+ = 1.1.5.1 - 13th April 2015 =
246
  * Fix for Custom Post Type notifications not populating shortcodes.
247
  * Fix for Custom Taxonomy terms not sending out notification emails.
248
 
249
+ = 1.1.5 - 10th April 2015 =
250
  * New Shortcode: [permalink].
251
  * New Notifications: 'Scheduled Posts' and 'Scheduled Pages'.
252
  * New Shortcodes for the above Notifications: [post_scheduled_date] and [post_scheduled_date_gmt].
256
  * New Notification: 'New Page - Comment'.
257
  * Fixed: A few bugs reported via the forums and some others that i've found - thanks everyone!
258
 
259
+ = 1.1 - 16th March 2015 =
260
  * Lots of cool new stuff and more to come soon!
261
  * Transactional notifications (notifications intended only for the end user) have been added as a new group in the notifications select box.
262
  * New Notification: Post Pending Review (for all post types).
270
  * Removed: Some WordPress Multisite shortcodes that didn't work properly. Proper support for Multisite will come later.
271
  * If you liked this plugin, please leave a review. If you didn't or have a problem, please send me a message in the Support Forum.
272
 
273
+ = 1.0.2 - 17th January 2015 =
274
  * Bug fix for `[ID]` shortcode not outputting anything.
275
  * Bug fix for `[post_category]` showing as empty.
276
  * Added tags shortcode for use in certain notifications using `[post_tag]`.
277
 
278
+ = 1.0.1 - 21th December 2014 =
279
  * Bug fix for notifications not being sent to custom user roles or individual users of custom roles.
280
  * Added a 'Notification Type' column to the notifications screen.
281
  * Renamed 'User Roles' column in notifications screen to 'User Roles/Users'.
282
 
283
+ = 1.0 - 17th December 2014 =
284
  * First major release - we're no longer in beta!
285
  * Total overhaul. The plugin has been completely re-written.
286
  * Auto-importer: Your old notifications will be imported when updating the plugin.
290
  * Fully translatable.
291
  * Loads of bugfixes and improvements.
292
 
293
+ = 0.2.1 beta - 4th June 2013 =
294
  * Minor Bugfixes
295
 
296
+ = 0.2 beta - 8th April 2013 =
297
  * Added an option to suppress SPAM comment notifications.
298
 
299
+ = 0.1 beta - 25th March 2013 =
300
  * Initial version of the plugin.
301
  * Settings page for configuring notification types for roles.
302
  * Email Templates page for customising emails using HTML and shortcodes.
assets/css/bnfw.css CHANGED
@@ -6,3 +6,14 @@
6
  background: #FFFFE1;
7
  padding: 15px;
8
  }
 
 
 
 
 
 
 
 
 
 
 
6
  background: #FFFFE1;
7
  padding: 15px;
8
  }
9
+
10
+
11
+ /* Fix 'jump' when hovering over 'x' in select2 box */
12
+ ul.select2-choices li.select2-search-choice a {
13
+ -webkit-transition-property: none;
14
+ transition-property: none;
15
+ -webkit-transition-duration: 0s;
16
+ transition-duration: 0s;
17
+ -webkit-transition-timing-function: initial;
18
+ transition-timing-function: initial;
19
+ }
assets/images/select2.png CHANGED
Binary file
assets/images/select2@2x.png CHANGED
Binary file
assets/js/bnfw.js CHANGED
@@ -22,16 +22,16 @@ jQuery(document).ready(function($) {
22
  toggle_fields();
23
 
24
  if ( 'user-password' === $('#notification').val() || 'new-user' === $('#notification').val() || 'welcome-email' === $('#notification').val() || 'reply-comment' === $('#notification').val() ) {
25
- $('#toggle-fields, #email, #cc, #bcc, #users, #email-formatting, #current-user, #post-author').hide();
26
  $('#user-password-msg').show();
27
  } else if ( 'new-comment' === $('#notification').val() || 'new-trackback' === $('#notification').val() || 'new-pingback' === $('#notification').val() || 'admin-password' === $('#notification').val() || 'admin-user' === $('#notification').val() ) {
28
- $('#toggle-fields, #users, #email-formatting, #current-user').show();
29
  $('#only-post-author').prop( 'checked', false );
30
  $('#post-author').hide();
31
  toggle_fields();
32
  $('#user-password-msg').hide();
33
  } else {
34
- $('#toggle-fields, #users, #email-formatting, #current-user, #post-author').show();
35
  toggle_fields();
36
  toggle_users();
37
  $('#user-password-msg').hide();
@@ -42,15 +42,15 @@ jQuery(document).ready(function($) {
42
  $('#notification').on('change', function() {
43
  var $this = $(this);
44
  if ( 'user-password' === $this.val() || 'new-user' === $this.val() || 'welcome-email' === $this.val() || 'reply-comment' === $this.val() ) {
45
- $('#toggle-fields, #email, #cc, #bcc, #users, #email-formatting, #current-user, #post-author').hide();
46
  $('#user-password-msg').show();
47
  } else if ( 'new-comment' === $('#notification').val() || 'new-trackback' === $('#notification').val() || 'new-pingback' === $('#notification').val() || 'admin-password' === $('#notification').val() || 'admin-user' === $('#notification').val() ) {
48
  $('#post-author').hide();
49
- $('#toggle-fields, #users, #email-formatting, #current-user').show();
50
  $('#user-password-msg').hide();
51
  toggle_fields();
52
  } else {
53
- $('#toggle-fields, #users, #email-formatting, #current-user, #post-author').show();
54
  $('#user-password-msg').hide();
55
  toggle_fields();
56
  }
@@ -111,6 +111,6 @@ jQuery(document).ready(function($) {
111
  break;
112
  }
113
 
114
- $(this).attr( 'href', 'http://www.voltronik.co.uk/wordpress-plugins/better-notifications-for-wordpress-shortcodes/?notification=' + notification_slug );
115
  });
116
  });
22
  toggle_fields();
23
 
24
  if ( 'user-password' === $('#notification').val() || 'new-user' === $('#notification').val() || 'welcome-email' === $('#notification').val() || 'reply-comment' === $('#notification').val() ) {
25
+ $('#toggle-fields, #email, #cc, #bcc, #users, #email-formatting, #disable-autop, #current-user, #post-author').hide();
26
  $('#user-password-msg').show();
27
  } else if ( 'new-comment' === $('#notification').val() || 'new-trackback' === $('#notification').val() || 'new-pingback' === $('#notification').val() || 'admin-password' === $('#notification').val() || 'admin-user' === $('#notification').val() ) {
28
+ $('#toggle-fields, #users, #email-formatting, #disable-autop, #current-user').show();
29
  $('#only-post-author').prop( 'checked', false );
30
  $('#post-author').hide();
31
  toggle_fields();
32
  $('#user-password-msg').hide();
33
  } else {
34
+ $('#toggle-fields, #users, #email-formatting, #disable-autop, #current-user, #post-author').show();
35
  toggle_fields();
36
  toggle_users();
37
  $('#user-password-msg').hide();
42
  $('#notification').on('change', function() {
43
  var $this = $(this);
44
  if ( 'user-password' === $this.val() || 'new-user' === $this.val() || 'welcome-email' === $this.val() || 'reply-comment' === $this.val() ) {
45
+ $('#toggle-fields, #email, #cc, #bcc, #users, #email-formatting, #disable-autop, #current-user, #post-author').hide();
46
  $('#user-password-msg').show();
47
  } else if ( 'new-comment' === $('#notification').val() || 'new-trackback' === $('#notification').val() || 'new-pingback' === $('#notification').val() || 'admin-password' === $('#notification').val() || 'admin-user' === $('#notification').val() ) {
48
  $('#post-author').hide();
49
+ $('#toggle-fields, #users, #email-formatting, #disable-autop, #current-user').show();
50
  $('#user-password-msg').hide();
51
  toggle_fields();
52
  } else {
53
+ $('#toggle-fields, #users, #email-formatting, #disable-autop, #current-user, #post-author').show();
54
  $('#user-password-msg').hide();
55
  toggle_fields();
56
  }
111
  break;
112
  }
113
 
114
+ $(this).attr( 'href', 'https://betternotificationsforwp.com/shortcodes/?notification=' + notification_slug );
115
  });
116
  });
bnfw.php CHANGED
@@ -3,18 +3,18 @@
3
  * Plugin Name: Better Notifications for WordPress
4
  * Plugin URI: http://wordpress.org/plugins/bnfw/
5
  * Description: Send customisable emails to your users for different WordPress notifications.
6
- * Version: 1.3.3
7
  * Author: Voltronik
8
- * Author URI: http://www.voltronik.co.uk/
9
  * Author Email: plugins@voltronik.co.uk
10
  * License: GPLv2 or later
11
  * License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
  * Text Domain: bnfw
13
- * Domain Path: languages/
14
  */
15
 
16
  /**
17
- * Copyright © 2014 Voltronik (plugins@voltronik.co.uk)
18
  * This program is free software; you can redistribute it and/or modify
19
  * it under the terms of the GNU General Public License, version 2, as
20
  * published by the Free Software Foundation.
@@ -154,7 +154,7 @@ class BNFW {
154
  public function plugin_action_links( $links, $file ) {
155
  $plugin_file = 'bnfw/bnfw.php';
156
  if ( $file == $plugin_file ) {
157
- $settings_link = '<a href="' . admin_url( 'admin.php?page=bnfw-settings' ) . '">' . 'Settings' . '</a>';
158
  array_unshift( $links, $settings_link );
159
  }
160
  return $links;
3
  * Plugin Name: Better Notifications for WordPress
4
  * Plugin URI: http://wordpress.org/plugins/bnfw/
5
  * Description: Send customisable emails to your users for different WordPress notifications.
6
+ * Version: 1.3.5
7
  * Author: Voltronik
8
+ * Author URI: https://betternotificationsforwp.com/
9
  * Author Email: plugins@voltronik.co.uk
10
  * License: GPLv2 or later
11
  * License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
  * Text Domain: bnfw
13
+ * Domain Path: /languages
14
  */
15
 
16
  /**
17
+ * Copyright © 2015 Voltronik (plugins@voltronik.co.uk)
18
  * This program is free software; you can redistribute it and/or modify
19
  * it under the terms of the GNU General Public License, version 2, as
20
  * published by the Free Software Foundation.
154
  public function plugin_action_links( $links, $file ) {
155
  $plugin_file = 'bnfw/bnfw.php';
156
  if ( $file == $plugin_file ) {
157
+ $settings_link = '<a href="' . admin_url( 'edit.php?post_type=bnfw_notification&page=bnfw-settings' ) . '">' . 'Settings' . '</a>';
158
  array_unshift( $links, $settings_link );
159
  }
160
  return $links;
includes/admin/bnfw-settings.php CHANGED
@@ -20,6 +20,8 @@ function bnfw_admin_menu() {
20
  }
21
  // Add the Admin pages to the WordPress menu
22
  add_action( 'admin_menu', 'bnfw_admin_menu' );
 
 
23
 
24
  /* ------------------------------------------------------------------------ *
25
  * Menu Pages
@@ -36,19 +38,63 @@ function bnfw_settings_page() {
36
  <h2><?php _e( 'BNFW Settings', 'bnfw' ); ?></h2>
37
 
38
  <form method="post" action="options.php" class="bnfw-form">
39
- <?php
40
- settings_errors();
41
- settings_fields( 'bnfw-settings' );
42
- do_settings_sections( 'bnfw-settings' );
43
 
44
- submit_button( 'Save Settings' );
45
- ?>
46
  </form>
47
  </div>
48
 
49
  <?php echo ob_get_clean();
50
  }
51
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
  /* ------------------------------------------------------------------------ *
53
  * Settings Page - Setting Registration
54
  * ------------------------------------------------------------------------ */
20
  }
21
  // Add the Admin pages to the WordPress menu
22
  add_action( 'admin_menu', 'bnfw_admin_menu' );
23
+ add_action( 'admin_menu', 'bnfw_menu_item_links' );
24
+ add_action( 'admin_head', 'bnfw_menu_item_link_targets' );
25
 
26
  /* ------------------------------------------------------------------------ *
27
  * Menu Pages
38
  <h2><?php _e( 'BNFW Settings', 'bnfw' ); ?></h2>
39
 
40
  <form method="post" action="options.php" class="bnfw-form">
41
+ <?php
42
+ settings_errors();
43
+ settings_fields( 'bnfw-settings' );
44
+ do_settings_sections( 'bnfw-settings' );
45
 
46
+ submit_button( 'Save Settings' );
47
+ ?>
48
  </form>
49
  </div>
50
 
51
  <?php echo ob_get_clean();
52
  }
53
 
54
+ /**
55
+ * External Menu Item Links
56
+ */
57
+
58
+ function bnfw_menu_item_links() {
59
+ global $submenu;
60
+
61
+ // Documentation Link
62
+ $submenu['edit.php?post_type=bnfw_notification'][400] = array(
63
+ '<div id="bnfw-menu-item-documentation">Documentation</div>',
64
+ 'manage_options',
65
+ 'https://betternotificationsforwp.com/documentation/?utm_source=WP%20Admin%20Submenu%20Item%20-%20"Documentation"&utm_medium=referral&utm_campaign=' . home_url()
66
+ );
67
+
68
+ // Add-ons Link
69
+ $submenu['edit.php?post_type=bnfw_notification'][500] = array(
70
+ '<div id="bnfw-menu-item-addons" style="color: #ff6f59;">Add-ons</div>',
71
+ 'manage_options',
72
+ 'https://betternotificationsforwp.com/store/?utm_source=WP%20Admin%20Submenu%20Item%20-%20"Add-on"&utm_medium=referral&utm_campaign=' . home_url()
73
+ );
74
+ }
75
+
76
+ function bnfw_menu_item_link_targets() { ?>
77
+
78
+ <!-- Documentation Link -->
79
+ <script type="text/javascript">
80
+ jQuery(document).ready(function($) {
81
+ $('#bnfw-menu-item-documentation').parent().attr('target', '_blank');
82
+ });
83
+ </script>
84
+
85
+ <!-- Add-ons Link -->
86
+ <script type="text/javascript">
87
+ jQuery(document).ready(function($) {
88
+ $('#bnfw-menu-item-addons').parent().attr('target', '_blank');
89
+ $('#bnfw-menu-item-addons').hover(function() {
90
+ $(this).css('color', '#ffaa9d');
91
+ }, function() {
92
+ $(this).css('color', '#ff6f59');
93
+ });
94
+ });
95
+ </script>
96
+ <?php }
97
+
98
  /* ------------------------------------------------------------------------ *
99
  * Settings Page - Setting Registration
100
  * ------------------------------------------------------------------------ */
includes/admin/class-bnfw-notification.php CHANGED
@@ -31,7 +31,7 @@ class BNFW_Notification {
31
  add_action( sprintf( 'manage_%s_posts_custom_column', self::POST_TYPE ), array( $this, 'custom_column_row' ), 10, 2 );
32
 
33
  // Enqueue scripts/styles and disables autosave for this post type.
34
- add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
35
  }
36
 
37
  /**
@@ -177,6 +177,7 @@ class BNFW_Notification {
177
  <option value="future-post" <?php selected( 'future-post', $setting['notification'] );?>><?php _e( 'Post Scheduled', 'bnfw' );?></option>
178
  <option value="newterm-category" <?php selected( 'newterm-category', $setting['notification'] );?>><?php _e( 'New Category', 'bnfw' ); ?></option>
179
  <option value="newterm-post_tag" <?php selected( 'newterm-post_tag', $setting['notification'] );?>><?php _e( 'New Tag', 'bnfw' ); ?></option>
 
180
  </optgroup>
181
  <optgroup label="Page">
182
  <option value="new-page" <?php selected( 'new-page', $setting['notification'] );?>><?php _e( 'New Page Published', 'bnfw' );?></option>
@@ -184,6 +185,7 @@ class BNFW_Notification {
184
  <option value="pending-page" <?php selected( 'pending-page', $setting['notification'] );?>><?php _e( 'Page Pending Review', 'bnfw' );?></option>
185
  <option value="future-page" <?php selected( 'future-page', $setting['notification'] );?>><?php _e( 'Page Scheduled', 'bnfw' );?></option>
186
  <option value="comment-page" <?php selected( 'comment-page', $setting['notification'] );?>><?php _e( 'Page - New Comment', 'bnfw' );?></option>
 
187
  </optgroup>
188
  <?php
189
  $types = get_post_types( array(
@@ -203,15 +205,16 @@ class BNFW_Notification {
203
  <option value="pending-<?php echo $type; ?>" <?php selected( 'pending-' . $type, $setting['notification'] );?>><?php echo "'$label' ", __( 'Pending Review', 'bnfw' ); ?></option>
204
  <option value="future-<?php echo $type; ?>" <?php selected( 'future-' . $type, $setting['notification'] );?>><?php echo "'$label' ", __( 'Scheduled', 'bnfw' ); ?></option>
205
  <option value="comment-<?php echo $type; ?>" <?php selected( 'comment-' . $type, $setting['notification'] );?>><?php echo "'$label' ", __( 'New Comment', 'bnfw' ); ?></option>
 
206
  </optgroup>
207
  <?php
208
  }
209
  }
210
 
211
  $taxs = get_taxonomies( array(
212
- 'public' => true,
213
- '_builtin' => false,
214
- ), 'objects'
215
  );
216
 
217
  if ( count( $taxs > 0 ) ) {
@@ -233,6 +236,8 @@ class BNFW_Notification {
233
  </td>
234
  </tr>
235
 
 
 
236
  <tr valign="top" id="user-password-msg">
237
  <td>&nbsp;</td>
238
  <td>
@@ -265,7 +270,7 @@ class BNFW_Notification {
265
  </th>
266
  <td>
267
  <input type="checkbox" id="show-fields" name="show-fields" value="true" <?php checked( $setting['show-fields'], 'true', true ); ?>>
268
- <label for="show-fields"><?php esc_html_e( 'Show additional email fields', 'bnfw' ); ?></label>
269
  </td>
270
  </tr>
271
 
@@ -346,12 +351,31 @@ class BNFW_Notification {
346
  <tr valign="top">
347
  <th scope="row">
348
  <?php _e( 'Message Body', 'bnfw' ); ?>
 
 
 
 
 
 
 
 
 
 
 
 
349
  </th>
350
  <td>
351
- <?php wp_editor( $setting['message'], 'notification_message', array( 'media_buttons' => false ) ); ?>
352
- <p><a id="shortcode-help" href="" target="_blank"><?php _e( 'Looking for help with shortcodes? Click here to see which ones you can use with the selected notification.', 'bnfw' ); ?></a></p>
 
 
 
 
 
 
353
  </td>
354
  </tr>
 
355
  </tbody>
356
  </table>
357
  <?php
@@ -362,7 +386,7 @@ class BNFW_Notification {
362
  *
363
  * @since 1.2
364
  */
365
- private function render_users_dropdown( $selected_users ) {
366
  global $wp_roles;
367
  ?>
368
  <optgroup label="User Roles">
@@ -388,21 +412,32 @@ class BNFW_Notification {
388
  }
389
 
390
  /**
391
- * Enqueue scripts.
392
  *
393
  * @since 1.0
394
  */
395
- public function enqueue_scripts() {
396
  if ( self::POST_TYPE === get_post_type() ) {
397
- wp_dequeue_script( 'autosave' );
398
-
399
- wp_enqueue_style( 'select2', '//cdnjs.cloudflare.com/ajax/libs/select2/3.5.2/select2.min.css', array(), '3.5.2' );
400
- wp_enqueue_script( 'select2', '//cdnjs.cloudflare.com/ajax/libs/select2/3.5.2/select2.min.js', array( 'jquery' ), '3.5.2', true );
401
- wp_enqueue_script( 'bnfw', plugins_url( '../assets/js/bnfw.js', dirname( __FILE__ ) ), array( 'jquery' ), '0.1', true );
402
- wp_enqueue_style( 'bnfw', plugins_url( '../assets/css/bnfw.css', dirname( __FILE__ ) ), array( 'dashicons' ), '0.1' );
403
  }
404
  }
405
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
406
  /**
407
  * Save the meta box's post metadata.
408
  *
@@ -439,6 +474,7 @@ class BNFW_Notification {
439
  'disabled' => isset( $_POST['disabled'] ) ? sanitize_text_field( $_POST['disabled'] ) : 'false',
440
  'email-formatting' => isset( $_POST['email-formatting'] ) ? sanitize_text_field( $_POST['email-formatting'] ) : 'html',
441
  'disable-current-user' => isset( $_POST['disable-current-user'] ) ? sanitize_text_field( $_POST['disable-current-user'] ) : 'false',
 
442
  'only-post-author' => isset( $_POST['only-post-author'] ) ? sanitize_text_field( $_POST['only-post-author'] ) : 'false',
443
  'users' => array(),
444
  );
@@ -457,6 +493,8 @@ class BNFW_Notification {
457
  $setting['show-fields'] = 'false';
458
  }
459
 
 
 
460
  $this->save_settings( $post_id, $setting );
461
 
462
  if ( isset( $_POST['send-test-email'] ) ) {
@@ -529,10 +567,13 @@ class BNFW_Notification {
529
  'message' => '',
530
  'show-fields' => 'false',
531
  'disable-current-user' => 'false',
 
532
  'only-post-author' => 'false',
533
  'disabled' => 'false',
534
  );
535
 
 
 
536
  foreach ( $default as $key => $default_value ) {
537
  $value = get_post_meta( $post_id, self::META_KEY_PREFIX . $key, true );
538
  if ( ! empty( $value ) ) {
@@ -592,7 +633,10 @@ class BNFW_Notification {
592
  <?php
593
  $setting = $this->read_settings( $post->ID );
594
  ?>
595
- <input type="checkbox" name="disabled" value="true" <?php checked( $setting['disabled'], 'true', true ); ?>><?php _e( 'Disable Notification', 'bnfw' ); ?>
 
 
 
596
  <br>
597
  <br>
598
 
@@ -761,51 +805,52 @@ class BNFW_Notification {
761
  * @return unknown
762
  */
763
  private function get_notifications_name( $slug ) {
 
764
  switch ( $slug ) {
765
  case 'new-comment':
766
- return __( 'New Comment', 'bnfw' );
767
  break;
768
  case 'new-trackback':
769
- return __( 'New Trackback', 'bnfw' );
770
  break;
771
  case 'new-pingback':
772
- return __( 'New Pingback', 'bnfw' );
773
  break;
774
  case 'reply-comment':
775
- return __( 'Comment Reply', 'bnfw' );
776
  break;
777
  case 'user-password':
778
- return __( 'Lost Password - For User', 'bnfw' );
779
  break;
780
  case 'admin-password':
781
- return __( 'Lost Password - For Admin', 'bnfw' );
782
  break;
783
  case 'new-user':
784
- return __( 'User Registration - For User', 'bnfw' );
785
  break;
786
  case 'welcome-email':
787
- return __( 'New User - Welcome email', 'bnfw' );
788
  break;
789
  case 'admin-user':
790
- return __( 'User Registration - For Admin', 'bnfw' );
791
  break;
792
  case 'new-post':
793
- return __( 'New Post Published', 'bnfw' );
794
  break;
795
  case 'update-post':
796
- return __( 'Post Updated', 'bnfw' );
797
  break;
798
  case 'pending-post':
799
- return __( 'Post Pending Review', 'bnfw' );
800
  break;
801
  case 'future-post':
802
- return __( 'Post Scheduled', 'bnfw' );
803
  break;
804
  case 'newterm-category':
805
- return __( 'New Category', 'bnfw' );
806
  break;
807
  case 'newterm-post_tag':
808
- return __( 'New Tag', 'bnfw' );
809
  break;
810
  default:
811
  $splited = explode( '-', $slug );
@@ -818,26 +863,31 @@ class BNFW_Notification {
818
 
819
  switch ( $splited[0] ) {
820
  case 'new':
821
- return __( 'New ', 'bnfw' ) . $label;
822
  break;
823
  case 'update':
824
- return __( 'Updated ', 'bnfw' ) . $label;
825
  break;
826
  case 'pending':
827
- return $label . __( ' Pending Review', 'bnfw' );
828
  break;
829
  case 'future':
830
- return $label . __( ' Scheduled', 'bnfw' );
831
  break;
832
  case 'comment':
833
- return $label . __( ' Comment', 'bnfw' );
834
  break;
835
  case 'newterm':
836
- return __( 'New term in ', 'bnfw' ) . $splited[1];
 
837
  break;
838
  }
839
  break;
840
  }
 
 
 
 
841
  }
842
 
843
  /**
@@ -864,8 +914,8 @@ class BNFW_Notification {
864
  *
865
  * @since 1.2
866
  */
867
- private function starts_with( $haystack, $needle ) {
868
  // search backwards starting from haystack length characters from the end
869
- return $needle === '' || strrpos( $haystack, $needle, -strlen( $haystack ) ) !== false;
870
  }
871
  }
31
  add_action( sprintf( 'manage_%s_posts_custom_column', self::POST_TYPE ), array( $this, 'custom_column_row' ), 10, 2 );
32
 
33
  // Enqueue scripts/styles and disables autosave for this post type.
34
+ add_action( 'admin_enqueue_scripts', array( $this, 'is_assets_needed' ) );
35
  }
36
 
37
  /**
177
  <option value="future-post" <?php selected( 'future-post', $setting['notification'] );?>><?php _e( 'Post Scheduled', 'bnfw' );?></option>
178
  <option value="newterm-category" <?php selected( 'newterm-category', $setting['notification'] );?>><?php _e( 'New Category', 'bnfw' ); ?></option>
179
  <option value="newterm-post_tag" <?php selected( 'newterm-post_tag', $setting['notification'] );?>><?php _e( 'New Tag', 'bnfw' ); ?></option>
180
+ <?php do_action( 'bnfw_after_notification_options', 'post', 'Post', $setting ); ?>
181
  </optgroup>
182
  <optgroup label="Page">
183
  <option value="new-page" <?php selected( 'new-page', $setting['notification'] );?>><?php _e( 'New Page Published', 'bnfw' );?></option>
185
  <option value="pending-page" <?php selected( 'pending-page', $setting['notification'] );?>><?php _e( 'Page Pending Review', 'bnfw' );?></option>
186
  <option value="future-page" <?php selected( 'future-page', $setting['notification'] );?>><?php _e( 'Page Scheduled', 'bnfw' );?></option>
187
  <option value="comment-page" <?php selected( 'comment-page', $setting['notification'] );?>><?php _e( 'Page - New Comment', 'bnfw' );?></option>
188
+ <?php do_action( 'bnfw_after_notification_options', 'page', 'Page', $setting ); ?>
189
  </optgroup>
190
  <?php
191
  $types = get_post_types( array(
205
  <option value="pending-<?php echo $type; ?>" <?php selected( 'pending-' . $type, $setting['notification'] );?>><?php echo "'$label' ", __( 'Pending Review', 'bnfw' ); ?></option>
206
  <option value="future-<?php echo $type; ?>" <?php selected( 'future-' . $type, $setting['notification'] );?>><?php echo "'$label' ", __( 'Scheduled', 'bnfw' ); ?></option>
207
  <option value="comment-<?php echo $type; ?>" <?php selected( 'comment-' . $type, $setting['notification'] );?>><?php echo "'$label' ", __( 'New Comment', 'bnfw' ); ?></option>
208
+ <?php do_action( 'bnfw_after_notification_options', $type, $label, $setting ); ?>
209
  </optgroup>
210
  <?php
211
  }
212
  }
213
 
214
  $taxs = get_taxonomies( array(
215
+ 'public' => true,
216
+ '_builtin' => false,
217
+ ), 'objects'
218
  );
219
 
220
  if ( count( $taxs > 0 ) ) {
236
  </td>
237
  </tr>
238
 
239
+ <?php do_action( 'bnfw_after_notification_dropdown', $setting ); ?>
240
+
241
  <tr valign="top" id="user-password-msg">
242
  <td>&nbsp;</td>
243
  <td>
270
  </th>
271
  <td>
272
  <input type="checkbox" id="show-fields" name="show-fields" value="true" <?php checked( $setting['show-fields'], 'true', true ); ?>>
273
+ <label for="show-fields"><?php esc_html_e( 'Set "From" Name & Email, CC, BCC', 'bnfw' ); ?></label>
274
  </td>
275
  </tr>
276
 
351
  <tr valign="top">
352
  <th scope="row">
353
  <?php _e( 'Message Body', 'bnfw' ); ?>
354
+ <div class="wp-ui-text-highlight">
355
+ <p>
356
+ <br />
357
+ <span class="dashicons dashicons-editor-help"></span> <?php _e( 'Need some help?', 'bnfw' ); ?>
358
+ </p>
359
+ <p>
360
+ <a href="https://betternotificationsforwp.com/documentation/" target="_blank" class="button-secondary"><?php _e( 'Documentation', 'bnfw' ); ?></a>
361
+ </p>
362
+ <p>
363
+ <a href="" target="_blank" id="shortcode-help" class="button-secondary"><?php _e( 'Shortcode Help', 'bnfw' ); ?></a>
364
+ </p>
365
+ </div>
366
  </th>
367
  <td>
368
+ <?php wp_editor( $setting['message'], 'notification_message', array( 'media_buttons' => true ) ); ?>
369
+ <p> &nbsp; </p>
370
+ <div id="disable-autop">
371
+ <label>
372
+ <input type="checkbox" name="disable-autop" value="true" <?php checked( 'true', $setting['disable-autop'] ); ?>>
373
+ <?php _e( 'Stop additional paragraph and line break HTML from being inserted into my notifications', 'bnfw' ); ?>
374
+ </label>
375
+ </div>
376
  </td>
377
  </tr>
378
+
379
  </tbody>
380
  </table>
381
  <?php
386
  *
387
  * @since 1.2
388
  */
389
+ public function render_users_dropdown( $selected_users ) {
390
  global $wp_roles;
391
  ?>
392
  <optgroup label="User Roles">
412
  }
413
 
414
  /**
415
+ * Should we enqueue assets?
416
  *
417
  * @since 1.0
418
  */
419
+ public function is_assets_needed() {
420
  if ( self::POST_TYPE === get_post_type() ) {
421
+ $this->enqueue_assets();
422
+ do_action( 'bnfw_after_enqueue_scripts' );
 
 
 
 
423
  }
424
  }
425
 
426
+ /**
427
+ * Enqueue assets.
428
+ *
429
+ * @since 1.4
430
+ */
431
+ public function enqueue_assets() {
432
+ wp_dequeue_script( 'autosave' );
433
+
434
+ wp_enqueue_style( 'select2', '//cdnjs.cloudflare.com/ajax/libs/select2/3.5.2/select2.min.css', array(), '3.5.2' );
435
+ wp_enqueue_script( 'select2', '//cdnjs.cloudflare.com/ajax/libs/select2/3.5.2/select2.min.js', array( 'jquery' ), '3.5.2', true );
436
+
437
+ wp_enqueue_script( 'bnfw', plugins_url( '../assets/js/bnfw.js', dirname( __FILE__ ) ), array( 'jquery' ), '0.1', true );
438
+ wp_enqueue_style( 'bnfw', plugins_url( '../assets/css/bnfw.css', dirname( __FILE__ ) ), array( 'dashicons' ), '0.1' );
439
+ }
440
+
441
  /**
442
  * Save the meta box's post metadata.
443
  *
474
  'disabled' => isset( $_POST['disabled'] ) ? sanitize_text_field( $_POST['disabled'] ) : 'false',
475
  'email-formatting' => isset( $_POST['email-formatting'] ) ? sanitize_text_field( $_POST['email-formatting'] ) : 'html',
476
  'disable-current-user' => isset( $_POST['disable-current-user'] ) ? sanitize_text_field( $_POST['disable-current-user'] ) : 'false',
477
+ 'disable-autop' => isset( $_POST['disable-autop'] ) ? sanitize_text_field( $_POST['disable-autop'] ) : 'false',
478
  'only-post-author' => isset( $_POST['only-post-author'] ) ? sanitize_text_field( $_POST['only-post-author'] ) : 'false',
479
  'users' => array(),
480
  );
493
  $setting['show-fields'] = 'false';
494
  }
495
 
496
+ $setting = apply_filters( 'bnfw_notification_setting', $setting );
497
+
498
  $this->save_settings( $post_id, $setting );
499
 
500
  if ( isset( $_POST['send-test-email'] ) ) {
567
  'message' => '',
568
  'show-fields' => 'false',
569
  'disable-current-user' => 'false',
570
+ 'disable-autop' => 'false',
571
  'only-post-author' => 'false',
572
  'disabled' => 'false',
573
  );
574
 
575
+ $default = apply_filters( 'bnfw_notification_setting_fields', $default );
576
+
577
  foreach ( $default as $key => $default_value ) {
578
  $value = get_post_meta( $post_id, self::META_KEY_PREFIX . $key, true );
579
  if ( ! empty( $value ) ) {
633
  <?php
634
  $setting = $this->read_settings( $post->ID );
635
  ?>
636
+ <label>
637
+ <input type="checkbox" name="disabled" value="true" <?php checked( $setting['disabled'], 'true', true ); ?>><?php _e( 'Disable Notification', 'bnfw' ); ?>
638
+ </label>
639
+
640
  <br>
641
  <br>
642
 
805
  * @return unknown
806
  */
807
  private function get_notifications_name( $slug ) {
808
+ $name = '';
809
  switch ( $slug ) {
810
  case 'new-comment':
811
+ $name = __( 'New Comment', 'bnfw' );
812
  break;
813
  case 'new-trackback':
814
+ $name = __( 'New Trackback', 'bnfw' );
815
  break;
816
  case 'new-pingback':
817
+ $name = __( 'New Pingback', 'bnfw' );
818
  break;
819
  case 'reply-comment':
820
+ $name = __( 'Comment Reply', 'bnfw' );
821
  break;
822
  case 'user-password':
823
+ $name = __( 'Lost Password - For User', 'bnfw' );
824
  break;
825
  case 'admin-password':
826
+ $name = __( 'Lost Password - For Admin', 'bnfw' );
827
  break;
828
  case 'new-user':
829
+ $name = __( 'User Registration - For User', 'bnfw' );
830
  break;
831
  case 'welcome-email':
832
+ $name = __( 'New User - Welcome Email', 'bnfw' );
833
  break;
834
  case 'admin-user':
835
+ $name = __( 'User Registration - For Admin', 'bnfw' );
836
  break;
837
  case 'new-post':
838
+ $name = __( 'New Post Published', 'bnfw' );
839
  break;
840
  case 'update-post':
841
+ $name = __( 'Post Updated', 'bnfw' );
842
  break;
843
  case 'pending-post':
844
+ $name = __( 'Post Pending Review', 'bnfw' );
845
  break;
846
  case 'future-post':
847
+ $name = __( 'Post Scheduled', 'bnfw' );
848
  break;
849
  case 'newterm-category':
850
+ $name = __( 'New Category', 'bnfw' );
851
  break;
852
  case 'newterm-post_tag':
853
+ $name = __( 'New Tag', 'bnfw' );
854
  break;
855
  default:
856
  $splited = explode( '-', $slug );
863
 
864
  switch ( $splited[0] ) {
865
  case 'new':
866
+ $name = __( 'New ', 'bnfw' ) . $label;
867
  break;
868
  case 'update':
869
+ $name = __( 'Updated ', 'bnfw' ) . $label;
870
  break;
871
  case 'pending':
872
+ $name = $label . __( ' Pending Review', 'bnfw' );
873
  break;
874
  case 'future':
875
+ $name = $label . __( ' Scheduled', 'bnfw' );
876
  break;
877
  case 'comment':
878
+ $name = $label . __( ' Comment', 'bnfw' );
879
  break;
880
  case 'newterm':
881
+ $tax = get_taxonomy( $splited[1] );
882
+ $name = __( 'New Term in ', 'bnfw' ) . $tax->labels->name;
883
  break;
884
  }
885
  break;
886
  }
887
+
888
+ $name = apply_filters( 'bnfw_notification_name', $name, $slug );
889
+
890
+ return $name;
891
  }
892
 
893
  /**
914
  *
915
  * @since 1.2
916
  */
917
+ public function starts_with( $haystack, $needle ) {
918
  // search backwards starting from haystack length characters from the end
919
+ return '' === $needle || strrpos( $haystack, $needle, -strlen( $haystack ) ) !== false;
920
  }
921
  }
includes/engine/class-bnfw-engine.php CHANGED
@@ -14,7 +14,11 @@ class BNFW_Engine {
14
  */
15
  public function send_test_email( $setting ) {
16
  $subject = $setting['subject'];
17
- $message = '<p><strong>This is a test email. All shortcodes below will show in place but not be replaced with content.</strong></p>' . $setting['message'];
 
 
 
 
18
 
19
  $current_user = wp_get_current_user();
20
  $email = $current_user->user_email;
@@ -24,7 +28,7 @@ class BNFW_Engine {
24
  $headers[] = 'Content-type: text/html';
25
  }
26
 
27
- wp_mail( $email, stripslashes( $subject ), wpautop( $message ), $headers );
28
  }
29
 
30
  /**
@@ -40,6 +44,10 @@ class BNFW_Engine {
40
  $emails = $this->get_emails( $setting, $id );
41
  $headers = $this->get_headers( $emails );
42
 
 
 
 
 
43
  if ( 'html' == $setting['email-formatting'] ) {
44
  $headers[] = 'Content-type: text/html';
45
  } else {
@@ -48,7 +56,7 @@ class BNFW_Engine {
48
 
49
  if ( is_array( $emails['to'] ) ) {
50
  foreach ( $emails['to'] as $email ) {
51
- wp_mail( $email, stripslashes( $subject ), wpautop( $message ), $headers );
52
  }
53
  }
54
  }
@@ -76,12 +84,16 @@ class BNFW_Engine {
76
  $subject = str_replace( '[login_url]', wp_login_url() , $subject );
77
  $message = str_replace( '[login_url]', wp_login_url(), $message );
78
 
 
 
 
 
79
  $headers = array();
80
  if ( 'html' == $setting['email-formatting'] ) {
81
  $headers[] = 'Content-type: text/html';
82
  }
83
 
84
- wp_mail( $user->user_email, stripslashes( $subject ), wpautop( $message ), $headers );
85
  }
86
 
87
  /**
@@ -103,7 +115,11 @@ class BNFW_Engine {
103
  $headers[] = 'Content-type: text/html';
104
  }
105
 
106
- wp_mail( $parent_comment->comment_author_email, stripslashes( $subject ), wpautop( $message ), $headers );
 
 
 
 
107
  }
108
 
109
  /**
@@ -184,6 +200,7 @@ class BNFW_Engine {
184
  break;
185
  }
186
 
 
187
  return $message;
188
  }
189
 
@@ -191,11 +208,11 @@ class BNFW_Engine {
191
  * Handle post shortcodes.
192
  *
193
  * @since 1.0
194
- * @param unknown $message
195
- * @param unknown $post_id
196
- * @return unknown
197
  */
198
- private function post_shortcodes( $message, $post_id ) {
199
  $post = get_post( $post_id );
200
 
201
  $post_content = apply_filters( 'the_content', $post->post_content );
@@ -244,7 +261,7 @@ class BNFW_Engine {
244
 
245
  if ( $last_id = get_post_meta( $post->ID, '_edit_last', true ) ) {
246
  if ( $post->post_author != $last_id ) {
247
- $last_user_info = get_userdata($last_id);
248
  } else {
249
  $last_user_info = $user_info;
250
  }
@@ -252,6 +269,7 @@ class BNFW_Engine {
252
  $message = str_replace( '[post_update_author]', $last_user_info->display_name, $message );
253
  }
254
 
 
255
  return $message;
256
  }
257
 
@@ -365,9 +383,13 @@ class BNFW_Engine {
365
  $emails['to'] = array( $author->user_email );
366
  }
367
  } else {
 
 
368
  if ( ! empty( $setting['users'] ) ) {
369
- $emails['to'] = $this->get_emails_from_users( $setting['users'], $exclude );
370
  }
 
 
371
  }
372
 
373
  if ( 'true' == $setting['show-fields'] ) {
@@ -396,7 +418,7 @@ class BNFW_Engine {
396
  * @param array $users Users Array
397
  * @param int $exclude User id to exclude
398
  */
399
- private function get_emails_from_users( $users, $exclude = null ) {
400
  $email_list = array();
401
  $user_ids = array();
402
  $user_roles = array();
14
  */
15
  public function send_test_email( $setting ) {
16
  $subject = $setting['subject'];
17
+ $message = '<p><strong>This is a test email. All shortcodes below will show in place but not be replaced with content.</strong></p>' . stripslashes( $setting['message'] );
18
+
19
+ if ( 'true' != $setting['disable-autop'] && 'html' == $setting['email-formatting'] ) {
20
+ $message = wpautop( $message );
21
+ }
22
 
23
  $current_user = wp_get_current_user();
24
  $email = $current_user->user_email;
28
  $headers[] = 'Content-type: text/html';
29
  }
30
 
31
+ wp_mail( $email, stripslashes( $subject ), $message, $headers );
32
  }
33
 
34
  /**
44
  $emails = $this->get_emails( $setting, $id );
45
  $headers = $this->get_headers( $emails );
46
 
47
+ if ( 'true' != $setting['disable-autop'] && 'html' == $setting['email-formatting'] ) {
48
+ $message = wpautop( $message );
49
+ }
50
+
51
  if ( 'html' == $setting['email-formatting'] ) {
52
  $headers[] = 'Content-type: text/html';
53
  } else {
56
 
57
  if ( is_array( $emails['to'] ) ) {
58
  foreach ( $emails['to'] as $email ) {
59
+ wp_mail( $email, stripslashes( $subject ), $message, $headers );
60
  }
61
  }
62
  }
84
  $subject = str_replace( '[login_url]', wp_login_url() , $subject );
85
  $message = str_replace( '[login_url]', wp_login_url(), $message );
86
 
87
+ if ( 'true' != $setting['disable-autop'] && 'html' == $setting['email-formatting'] ) {
88
+ $message = wpautop( $message );
89
+ }
90
+
91
  $headers = array();
92
  if ( 'html' == $setting['email-formatting'] ) {
93
  $headers[] = 'Content-type: text/html';
94
  }
95
 
96
+ wp_mail( $user->user_email, stripslashes( $subject ), $message, $headers );
97
  }
98
 
99
  /**
115
  $headers[] = 'Content-type: text/html';
116
  }
117
 
118
+ if ( 'true' != $setting['disable-autop'] && 'html' == $setting['email-formatting'] ) {
119
+ $message = wpautop( $message );
120
+ }
121
+
122
+ wp_mail( $parent_comment->comment_author_email, stripslashes( $subject ), $message, $headers );
123
  }
124
 
125
  /**
200
  break;
201
  }
202
 
203
+ $message = apply_filters( 'bnfw_shortcodes', $message, $notification, $id, $this );
204
  return $message;
205
  }
206
 
208
  * Handle post shortcodes.
209
  *
210
  * @since 1.0
211
+ * @param string $message
212
+ * @param int $post_id
213
+ * @return string
214
  */
215
+ public function post_shortcodes( $message, $post_id ) {
216
  $post = get_post( $post_id );
217
 
218
  $post_content = apply_filters( 'the_content', $post->post_content );
261
 
262
  if ( $last_id = get_post_meta( $post->ID, '_edit_last', true ) ) {
263
  if ( $post->post_author != $last_id ) {
264
+ $last_user_info = get_userdata( $last_id );
265
  } else {
266
  $last_user_info = $user_info;
267
  }
269
  $message = str_replace( '[post_update_author]', $last_user_info->display_name, $message );
270
  }
271
 
272
+ $message = apply_filters( 'bnfw_shortcodes_post', $message, $post_id );
273
  return $message;
274
  }
275
 
383
  $emails['to'] = array( $author->user_email );
384
  }
385
  } else {
386
+ $to_emails = array();
387
+
388
  if ( ! empty( $setting['users'] ) ) {
389
+ $to_emails = $this->get_emails_from_users( $setting['users'], $exclude );
390
  }
391
+
392
+ $emails['to'] = apply_filters( 'bnfw_to_emails', $to_emails, $setting, $id );
393
  }
394
 
395
  if ( 'true' == $setting['show-fields'] ) {
418
  * @param array $users Users Array
419
  * @param int $exclude User id to exclude
420
  */
421
+ public function get_emails_from_users( $users, $exclude = null ) {
422
  $email_list = array();
423
  $user_ids = array();
424
  $user_roles = array();
includes/overrides.php CHANGED
@@ -9,13 +9,15 @@
9
  *
10
  * A new user registration notification is also sent to admin email.
11
  *
12
- * @param int $user_id User ID.
13
- * @param string $notify (optional) Optional. Whether admin and user should be notified ('both') or
14
- * only the admin ('admin' or empty).
 
 
15
  */
16
  if ( ! function_exists( 'wp_new_user_notification' ) ) {
17
- function wp_new_user_notification( $user_id, $notify = '' ) {
18
- global $wp_version;
19
 
20
  $bnfw = BNFW::factory();
21
  $user = get_userdata( $user_id );
@@ -24,6 +26,14 @@ if ( ! function_exists( 'wp_new_user_notification' ) ) {
24
  // for WordPress 4.3 and above
25
  global $wpdb;
26
 
 
 
 
 
 
 
 
 
27
  // The blogname option is escaped with esc_html on the way into the database in sanitize_option
28
  // we want to reverse this for the plain text arena of emails.
29
  $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
@@ -72,7 +82,7 @@ if ( ! function_exists( 'wp_new_user_notification' ) ) {
72
  } else {
73
 
74
  // for WordPress below 4.3
75
- $plaintext_pass = $notify;
76
 
77
  // The blogname option is escaped with esc_html on the way into the database in sanitize_option
78
  // we want to reverse this for the plain text arena of emails.
9
  *
10
  * A new user registration notification is also sent to admin email.
11
  *
12
+ * @param int $user_id User ID.
13
+ * @param null $deprecated Not used (argument deprecated).
14
+ * @param string $notify Optional. Type of notification that should happen. Accepts 'admin' or an empty
15
+ * string (admin only), or 'both' (admin and user). The empty string value was kept
16
+ * for backward-compatibility purposes with the renamed parameter. Default empty.
17
  */
18
  if ( ! function_exists( 'wp_new_user_notification' ) ) {
19
+ function wp_new_user_notification( $user_id, $deprecated = null, $notify = '' ) {
20
+ global $wp_version, $wp_hasher;;
21
 
22
  $bnfw = BNFW::factory();
23
  $user = get_userdata( $user_id );
26
  // for WordPress 4.3 and above
27
  global $wpdb;
28
 
29
+ if ( version_compare( $wp_version, '4.3', '=' ) ) {
30
+ $notify = $deprecated;
31
+ } else {
32
+ if ( $deprecated !== null ) {
33
+ _deprecated_argument( __FUNCTION__, '4.3.1' );
34
+ }
35
+ }
36
+
37
  // The blogname option is escaped with esc_html on the way into the database in sanitize_option
38
  // we want to reverse this for the plain text arena of emails.
39
  $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
82
  } else {
83
 
84
  // for WordPress below 4.3
85
+ $plaintext_pass = $deprecated;
86
 
87
  // The blogname option is escaped with esc_html on the way into the database in sanitize_option
88
  // we want to reverse this for the plain text arena of emails.
languages/bnfw-pt_BR.mo ADDED
Binary file
languages/bnfw-pt_BR.po ADDED
@@ -0,0 +1,405 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2015 Better Notifications for WordPress
2
+ # This file is distributed under the same license as the Better Notifications for WordPress package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: Better Notifications for WordPress 1.3.3\n"
6
+ "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/bnfw\n"
7
+ "POT-Creation-Date: 2015-08-24 17:09-0300\n"
8
+ "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=UTF-8\n"
10
+ "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2015-08-28 16:52-0300\n"
12
+ "Last-Translator: Glayton Caixeta <contato@caixeta.com>\n"
13
+ "Language-Team: \n"
14
+ "X-Generator: Poedit 1.8.2\n"
15
+ "Plural-Forms: nplurals=2; plural=(n > 1);\n"
16
+ "Language: pt_BR\n"
17
+
18
+ #: includes/admin/bnfw-settings.php:14 includes/admin/class-bnfw-notification.php:120
19
+ msgid "Notification Settings"
20
+ msgstr "Configurações de notificações"
21
+
22
+ #: includes/admin/bnfw-settings.php:15
23
+ msgid "Settings"
24
+ msgstr "Configurações"
25
+
26
+ #: includes/admin/bnfw-settings.php:36
27
+ msgid "BNFW Settings"
28
+ msgstr "Configurações do BNFW"
29
+
30
+ #: includes/admin/bnfw-settings.php:77
31
+ msgid "Suppress SPAM comment notification"
32
+ msgstr "Esconder comentário e notificação de SPAM"
33
+
34
+ #: includes/admin/bnfw-settings.php:82
35
+ msgid "Don't send notifications for comments marked as SPAM by Akismet"
36
+ msgstr "Não enviar notificações e comentários marcados como SPAM pelo Akismet"
37
+
38
+ #: includes/admin/bnfw-settings.php:95
39
+ msgid "Default Email Format"
40
+ msgstr "Formato padrão de email"
41
+
42
+ #: includes/admin/bnfw-settings.php:100
43
+ msgid ""
44
+ "This will apply to all emails sent out via WordPress, even those from other plugins. For more "
45
+ "details, please see the <a href=\"https://wordpress.org/plugins/bnfw/faq/\" target=\"_blank"
46
+ "\">FAQ</a>."
47
+ msgstr ""
48
+ "Isso se aplica a todos os emails enviados através do WordPress, aplica-se a todos os outros "
49
+ "plugins. Para mais detalhes, consulte o <a href=\"https://wordpress.org/plugins/bnfw/faq/\" "
50
+ "target=\"_blank\">FAQ</a>."
51
+
52
+ #: includes/admin/bnfw-settings.php:143 includes/admin/class-bnfw-notification.php:252
53
+ msgid "HTML Formatting"
54
+ msgstr "Formatação HTML"
55
+
56
+ #: includes/admin/bnfw-settings.php:147 includes/admin/class-bnfw-notification.php:257
57
+ msgid "Plain Text"
58
+ msgstr "Texto simples"
59
+
60
+ #: includes/admin/class-bnfw-notification.php:45 includes/admin/class-bnfw-notification.php:48
61
+ #: includes/admin/class-bnfw-notification.php:49
62
+ msgid "Notifications"
63
+ msgstr "Notificações"
64
+
65
+ #: includes/admin/class-bnfw-notification.php:46
66
+ msgid "Notification"
67
+ msgstr "Notificação"
68
+
69
+ #: includes/admin/class-bnfw-notification.php:47
70
+ msgid "Add New"
71
+ msgstr "Adicionar nova"
72
+
73
+ #: includes/admin/class-bnfw-notification.php:50
74
+ msgid "Add New Notification"
75
+ msgstr "Adicionar nova notificação"
76
+
77
+ #: includes/admin/class-bnfw-notification.php:51
78
+ msgid "Edit Notification"
79
+ msgstr "Editar notificação"
80
+
81
+ #: includes/admin/class-bnfw-notification.php:52
82
+ msgid "New Notification"
83
+ msgstr "Nova notificação"
84
+
85
+ #: includes/admin/class-bnfw-notification.php:53
86
+ msgid "View Notification"
87
+ msgstr "Ver notificação"
88
+
89
+ #: includes/admin/class-bnfw-notification.php:54
90
+ msgid "Search Notifications"
91
+ msgstr "Pesquisar notificação"
92
+
93
+ #: includes/admin/class-bnfw-notification.php:55
94
+ msgid "No Notifications found"
95
+ msgstr "Nenhuma notificação"
96
+
97
+ #: includes/admin/class-bnfw-notification.php:56
98
+ msgid "No Notifications found in trash"
99
+ msgstr "Nenhuma notificação na lixeira"
100
+
101
+ #: includes/admin/class-bnfw-notification.php:57
102
+ msgid "All Notifications"
103
+ msgstr "Todas notificações"
104
+
105
+ #: includes/admin/class-bnfw-notification.php:128
106
+ msgid "Save Notification"
107
+ msgstr "Salvar notificação"
108
+
109
+ #: includes/admin/class-bnfw-notification.php:156
110
+ msgid "Notification For"
111
+ msgstr "Notificação para"
112
+
113
+ #: includes/admin/class-bnfw-notification.php:161
114
+ msgid "New Comment / Awaiting Moderation"
115
+ msgstr "Novo comentário / Aguarda moderação"
116
+
117
+ #: includes/admin/class-bnfw-notification.php:162 includes/admin/class-bnfw-notification.php:769
118
+ msgid "New Trackback"
119
+ msgstr "Novo Trackback"
120
+
121
+ #: includes/admin/class-bnfw-notification.php:163 includes/admin/class-bnfw-notification.php:772
122
+ msgid "New Pingback"
123
+ msgstr "Novo Pingback"
124
+
125
+ #: includes/admin/class-bnfw-notification.php:164 includes/admin/class-bnfw-notification.php:781
126
+ msgid "Lost Password - For Admin"
127
+ msgstr "Esqueceu a senha - Para administração"
128
+
129
+ #: includes/admin/class-bnfw-notification.php:165
130
+ msgid "New User Registration - For Admin"
131
+ msgstr "Novo registro de usuário - Para administração"
132
+
133
+ #: includes/admin/class-bnfw-notification.php:168 includes/admin/class-bnfw-notification.php:778
134
+ msgid "Lost Password - For User"
135
+ msgstr "Esqueceu a senha - Por usuário"
136
+
137
+ #: includes/admin/class-bnfw-notification.php:169
138
+ msgid "New User Registration - For User"
139
+ msgstr "Novo Registro de Usuário - Por Usuário"
140
+
141
+ #: includes/admin/class-bnfw-notification.php:170
142
+ msgid "New User - Welcome Email"
143
+ msgstr "Novo Usuário - Email de boas vindas"
144
+
145
+ #: includes/admin/class-bnfw-notification.php:171 includes/admin/class-bnfw-notification.php:775
146
+ msgid "Comment Reply"
147
+ msgstr "Responder comentário"
148
+
149
+ #: includes/admin/class-bnfw-notification.php:174 includes/admin/class-bnfw-notification.php:793
150
+ msgid "New Post Published"
151
+ msgstr "Novo post publicado"
152
+
153
+ #: includes/admin/class-bnfw-notification.php:175 includes/admin/class-bnfw-notification.php:796
154
+ msgid "Post Updated"
155
+ msgstr "Post atualizado"
156
+
157
+ #: includes/admin/class-bnfw-notification.php:176 includes/admin/class-bnfw-notification.php:799
158
+ msgid "Post Pending Review"
159
+ msgstr "Post pendente para revisão"
160
+
161
+ #: includes/admin/class-bnfw-notification.php:177 includes/admin/class-bnfw-notification.php:802
162
+ msgid "Post Scheduled"
163
+ msgstr "Programar post"
164
+
165
+ #: includes/admin/class-bnfw-notification.php:178 includes/admin/class-bnfw-notification.php:805
166
+ msgid "New Category"
167
+ msgstr "Nova categoria"
168
+
169
+ #: includes/admin/class-bnfw-notification.php:179 includes/admin/class-bnfw-notification.php:808
170
+ msgid "New Tag"
171
+ msgstr "Nova tag"
172
+
173
+ #: includes/admin/class-bnfw-notification.php:182
174
+ msgid "New Page Published"
175
+ msgstr "Nova página publicada"
176
+
177
+ #: includes/admin/class-bnfw-notification.php:183
178
+ msgid "Page Updated"
179
+ msgstr "Página atualizada"
180
+
181
+ #: includes/admin/class-bnfw-notification.php:184
182
+ msgid "Page Pending Review"
183
+ msgstr "Página aguardando revisão"
184
+
185
+ #: includes/admin/class-bnfw-notification.php:185
186
+ msgid "Page Scheduled"
187
+ msgstr "Programar página"
188
+
189
+ #: includes/admin/class-bnfw-notification.php:186
190
+ msgid "Page - New Comment"
191
+ msgstr "Página - Novo Comentário"
192
+
193
+ #: includes/admin/class-bnfw-notification.php:200
194
+ msgid "Custom Post Type"
195
+ msgstr "Tipo de post customizado"
196
+
197
+ #: includes/admin/class-bnfw-notification.php:201 includes/admin/class-bnfw-notification.php:821
198
+ msgid "New "
199
+ msgstr "Novo"
200
+
201
+ #: includes/admin/class-bnfw-notification.php:202
202
+ msgid "Update "
203
+ msgstr "Atualizar"
204
+
205
+ #: includes/admin/class-bnfw-notification.php:203
206
+ msgid "Pending Review"
207
+ msgstr "Revisão pendente"
208
+
209
+ #: includes/admin/class-bnfw-notification.php:204
210
+ msgid "Scheduled"
211
+ msgstr "Programado"
212
+
213
+ #: includes/admin/class-bnfw-notification.php:205 includes/admin/class-bnfw-notification.php:766
214
+ msgid "New Comment"
215
+ msgstr "Novo comentário"
216
+
217
+ #: includes/admin/class-bnfw-notification.php:219
218
+ msgid "Custom Taxonomy"
219
+ msgstr "Taxonomia customizada"
220
+
221
+ #: includes/admin/class-bnfw-notification.php:224
222
+ msgid "New"
223
+ msgstr "Novo"
224
+
225
+ #: includes/admin/class-bnfw-notification.php:240
226
+ msgid "This notification doesn't support additional email fields or shortcodes in the subject line."
227
+ msgstr ""
228
+ "Esta notificação não suporta campos de email adicionais ou códigos de acesso na linha de assunto."
229
+
230
+ #: includes/admin/class-bnfw-notification.php:247
231
+ msgid "Email Formatting"
232
+ msgstr "Formatar email"
233
+
234
+ #: includes/admin/class-bnfw-notification.php:264 includes/tmp.php:3
235
+ msgid "Additional Email Fields"
236
+ msgstr "Campos adicionais do email"
237
+
238
+ #: includes/admin/class-bnfw-notification.php:268 includes/tmp.php:7
239
+ msgid "Show additional email fields"
240
+ msgstr "Mostrar campos adicionais do email"
241
+
242
+ #: includes/admin/class-bnfw-notification.php:274 includes/tmp.php:13
243
+ msgid "From Name and Email"
244
+ msgstr "Nome do remetente do email"
245
+
246
+ #: includes/admin/class-bnfw-notification.php:284 includes/tmp.php:23
247
+ msgid "CC"
248
+ msgstr "CC"
249
+
250
+ #: includes/admin/class-bnfw-notification.php:296 includes/tmp.php:34
251
+ msgid "BCC"
252
+ msgstr "CCO"
253
+
254
+ #: includes/admin/class-bnfw-notification.php:311
255
+ msgid "Send this notification to the Post Author only"
256
+ msgstr "Enviar esta notificação com post único do autor"
257
+
258
+ #: includes/admin/class-bnfw-notification.php:318
259
+ msgid "Send To"
260
+ msgstr "Enviar para"
261
+
262
+ #: includes/admin/class-bnfw-notification.php:332
263
+ msgid "Disable this Notification for the User that triggered it"
264
+ msgstr "Desativar essa notificação para o usuário que desencadeou"
265
+
266
+ #: includes/admin/class-bnfw-notification.php:339 includes/admin/class-bnfw-notification.php:692
267
+ msgid "Subject"
268
+ msgstr "Assunto"
269
+
270
+ #: includes/admin/class-bnfw-notification.php:348
271
+ msgid "Message Body"
272
+ msgstr "Corpo da mensagem"
273
+
274
+ #: includes/admin/class-bnfw-notification.php:352
275
+ msgid ""
276
+ "Looking for help with shortcodes? Click here to see which ones you can use with the selected "
277
+ "notification."
278
+ msgstr ""
279
+ "Precisando de ajuda com códigos de acesso? Clique aqui para ver qual deles você pode usar com a "
280
+ "notificação selecionada."
281
+
282
+ #: includes/admin/class-bnfw-notification.php:490
283
+ msgid "Test Notification Sent."
284
+ msgstr "Teste de envio da notificação."
285
+
286
+ #: includes/admin/class-bnfw-notification.php:567
287
+ msgid "Notification saved."
288
+ msgstr "Notificação salva."
289
+
290
+ #: includes/admin/class-bnfw-notification.php:585 includes/admin/class-bnfw-notification.php:621
291
+ #: includes/admin/class-bnfw-notification.php:622
292
+ msgid "Save"
293
+ msgstr "Salvar"
294
+
295
+ #: includes/admin/class-bnfw-notification.php:595
296
+ msgid "Disable Notification"
297
+ msgstr "Desabilitar notificação"
298
+
299
+ #: includes/admin/class-bnfw-notification.php:601
300
+ msgid "Send Me a Test Email"
301
+ msgstr "Envie-me um email de teste"
302
+
303
+ #: includes/admin/class-bnfw-notification.php:611
304
+ msgid "Delete Permanently"
305
+ msgstr "Excluir permanente"
306
+
307
+ #: includes/admin/class-bnfw-notification.php:613
308
+ msgid "Move to Trash"
309
+ msgstr "Enviar para lixeira"
310
+
311
+ #: includes/admin/class-bnfw-notification.php:690
312
+ msgid "Notification Type"
313
+ msgstr "Tipo de notificação"
314
+
315
+ #: includes/admin/class-bnfw-notification.php:691
316
+ msgid "Enabled?"
317
+ msgstr "Ativado?"
318
+
319
+ #: includes/admin/class-bnfw-notification.php:693
320
+ msgid "User Roles / Users"
321
+ msgstr "Funções de usuário / Usuários"
322
+
323
+ #: includes/admin/class-bnfw-notification.php:784
324
+ msgid "User Registration - For User"
325
+ msgstr "Registro do usuário - Por usuário"
326
+
327
+ #: includes/admin/class-bnfw-notification.php:787
328
+ msgid "New User - Welcome email"
329
+ msgstr "Novo usuário - Email de boas vindas"
330
+
331
+ #: includes/admin/class-bnfw-notification.php:790
332
+ msgid "User Registration - For Admin"
333
+ msgstr "Registro de usuário - Para administração"
334
+
335
+ #: includes/admin/class-bnfw-notification.php:824
336
+ msgid "Updated "
337
+ msgstr "Atualizar"
338
+
339
+ #: includes/admin/class-bnfw-notification.php:827
340
+ msgid " Pending Review"
341
+ msgstr "Revisão pendente"
342
+
343
+ #: includes/admin/class-bnfw-notification.php:830
344
+ msgid " Scheduled"
345
+ msgstr "Programado"
346
+
347
+ #: includes/admin/class-bnfw-notification.php:833
348
+ msgid " Comment"
349
+ msgstr "Comentário"
350
+
351
+ #: includes/admin/class-bnfw-notification.php:836
352
+ msgid "New term in "
353
+ msgstr "Novo prazo"
354
+
355
+ #: includes/import.php:60
356
+ msgid " for "
357
+ msgstr "para"
358
+
359
+ #: includes/import.php:60
360
+ msgid " (Auto Imported)"
361
+ msgstr "(Importado automático)"
362
+
363
+ #: includes/overrides.php:25
364
+ msgid "New user registration on your site %s:"
365
+ msgstr "Novo registro de usuário em seu site %s:"
366
+
367
+ #: includes/overrides.php:26 includes/overrides.php:42
368
+ msgid "Username: %s"
369
+ msgstr "Usuário: %s"
370
+
371
+ #: includes/overrides.php:27
372
+ msgid "E-mail: %s"
373
+ msgstr "Email: %s"
374
+
375
+ #: includes/overrides.php:29
376
+ msgid "[%s] New User Registration"
377
+ msgstr "[%s] Novo Registro de Usuário"
378
+
379
+ #: includes/overrides.php:43
380
+ msgid "Password: %s"
381
+ msgstr "Senha: %s"
382
+
383
+ #: includes/overrides.php:46
384
+ msgid "[%s] Your username and password"
385
+ msgstr "[%s] O seu nome de usuário e senha"
386
+
387
+ #. Plugin Name of the plugin/theme
388
+ msgid "Better Notifications for WordPress"
389
+ msgstr "Melhores notificações para WordPress"
390
+
391
+ #. Plugin URI of the plugin/theme
392
+ msgid "http://wordpress.org/plugins/bnfw/"
393
+ msgstr "http://wordpress.org/plugins/bnfw/"
394
+
395
+ #. Description of the plugin/theme
396
+ msgid "Send customisable HTML emails to your users for different WordPress notifications."
397
+ msgstr "Enviar emails HTML com notificações personalizáveis para usuários diferentes do WordPress."
398
+
399
+ #. Author of the plugin/theme
400
+ msgid "Voltronik"
401
+ msgstr "Voltronik"
402
+
403
+ #. Author URI of the plugin/theme
404
+ msgid "http://www.voltronik.co.uk/"
405
+ msgstr "http://www.voltronik.co.uk/"