Better Notifications for WordPress - Version 1.3

Version Description

  • New: Option to disable notifications going to the user that triggered them.
  • 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).
  • New: New Shortcode: Update Author. Use [post_update_author] in any Post or Page notifications to see which user updated the post.
  • New: Choose between sending the notification as plain text or HTML.
  • New: A basic implementation of shortcode help has been added into the plugin. Click the link below the message body editor to see which shortcodes can be used for the currently selected notification.
  • Improved: The 'New User Registration' (For Admin & User) and 'Welcome Email' notifications now allow you to use all of the 'User' shortcodes.
  • Fixed: Formatting in emails sent from other plugins were being effected by BNFW.
  • Fixed: Notifications for Categories, Terms and Tags weren't getting triggered.
  • Fixed: Notifications weren't getting triggered when using the P2 theme (please see the FAQ for more information about this).
  • Fixed: Additional Email fields were being shown for transactional notifications that couldn't use them.
Download this release

Release Info

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

Code changes from version 1.2 to 1.3

README.txt CHANGED
@@ -3,7 +3,7 @@ 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
4
  Requires at least: 3.5
5
  Tested up to: 4.2.2
6
- Stable tag: 1.2
7
  License: GPLv2 or later
8
 
9
  Send customisable HTML emails to your users for different WordPress notifications.
@@ -112,7 +112,9 @@ It's not designed to send out newsletters. There is no send-this-out-on-this-dat
112
 
113
  This will very much depend on what notifications you're using the plugin for. Out-of-the-box, this plugin works very well but there are a few tweaks that you will need to ensure 100% compatibility. All the below points refer to this plugin:
114
 
115
- * If you want to use the new comment notifications in BNFW, you need to switch off 'Email me whenever anyone posts a comment' and 'A comment is held for moderation' under Settings > Discussion. It's ok if you don't do this but you might receive WordPress's own email notifications along with the ones you configure using BNFW too. It also goes without saying that you need to enable comments for your posts if you want the email notifications to come through.
 
 
116
 
117
  = Configured emails aren't coming through! =
118
 
@@ -132,6 +134,10 @@ Check that you've saved your notification first, then try again. It may take a s
132
 
133
  This is most likely because it's `public` setting is set to `false`. Try changing this and see if it shows up in the list. If the custom post type has been created by a plugin and is set to private (such as [TablePress](https://wordpress.org/plugins/tablepress/ "TablePress")), you'll need to get in touch with the plugin author to see if they'll consider changing it to public instead so that BNFW can send out notifications for it.
134
 
 
 
 
 
135
  = Can I translate this plugin? =
136
 
137
  Yes, of course! The plugin is completely translation-friendly and if you send me your .po file, i'll make sure to include it in the plugin and credit you on this page.
@@ -154,6 +160,18 @@ It might do but this is untested.
154
 
155
  == Changelog ==
156
 
 
 
 
 
 
 
 
 
 
 
 
 
157
  = 1.2 =
158
  * New: WYSIWYG Editor for notifications!
159
  * New: From Name, From Email, CC and BCC options are now available to use for each notification!
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
4
  Requires at least: 3.5
5
  Tested up to: 4.2.2
6
+ Stable tag: 1.3
7
  License: GPLv2 or later
8
 
9
  Send customisable HTML emails to your users for different WordPress notifications.
112
 
113
  This will very much depend on what notifications you're using the plugin for. Out-of-the-box, this plugin works very well but there are a few tweaks that you will need to ensure 100% compatibility. All the below points refer to this plugin:
114
 
115
+ * If you want to use the new comment notifications in BNFW, you need to un-tick 'Email me whenever anyone posts a comment' and 'A comment is held for moderation' under Settings > Discussion. It's ok if you don't do this but you might receive WordPress's own email notifications along with the ones you've configure using BNFW. It also goes without saying that you need to enable comments for your posts if you want the email notifications to come through.
116
+
117
+ * If you want to use the 'Comment Reply' transactional email, you need to ensure that comments are only set-up to be 2-levels deep. You can do this by going to Settings > Discussion and changing the option 'Enable threaded (nested) comments 'X' levels deep' to '2'. Please also ensure this option is ticked.
118
 
119
  = Configured emails aren't coming through! =
120
 
134
 
135
  This is most likely because it's `public` setting is set to `false`. Try changing this and see if it shows up in the list. If the custom post type has been created by a plugin and is set to private (such as [TablePress](https://wordpress.org/plugins/tablepress/ "TablePress")), you'll need to get in touch with the plugin author to see if they'll consider changing it to public instead so that BNFW can send out notifications for it.
136
 
137
+ = I'm using the P2 theme and my notifications are coming through twice =
138
+
139
+ In order to fix a problem with P2 not triggering notifications at all, if you post from the WordPress Admin, it will trigger two notifications: one for the standard settings and one for the additional P2 settings. I recommend posting from the front-end only if you're using P2 in order to trigger just a single notification.
140
+
141
  = Can I translate this plugin? =
142
 
143
  Yes, of course! The plugin is completely translation-friendly and if you send me your .po file, i'll make sure to include it in the plugin and credit you on this page.
160
 
161
  == Changelog ==
162
 
163
+ = 1.3 =
164
+ * New: Option to disable notifications going to the user that triggered them.
165
+ * 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).
166
+ * New: New Shortcode: Update Author. Use `[post_update_author]` in any Post or Page notifications to see which user updated the post.
167
+ * New: Choose between sending the notification as plain text or HTML.
168
+ * New: A basic implementation of shortcode help has been added into the plugin. Click the link below the message body editor to see which shortcodes can be used for the currently selected notification.
169
+ * Improved: The 'New User Registration' (For Admin & User) and 'Welcome Email' notifications now allow you to use all of the 'User' shortcodes.
170
+ * Fixed: Formatting in emails sent from other plugins were being effected by BNFW.
171
+ * Fixed: Notifications for Categories, Terms and Tags weren't getting triggered.
172
+ * 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).
173
+ * Fixed: Additional Email fields were being shown for transactional notifications that couldn't use them.
174
+
175
  = 1.2 =
176
  * New: WYSIWYG Editor for notifications!
177
  * New: From Name, From Email, CC and BCC options are now available to use for each notification!
assets/js/bnfw.js CHANGED
@@ -12,22 +12,22 @@ jQuery(document).ready(function($) {
12
  $(".select2").select2();
13
  toggle_fields();
14
 
15
- if ( 'user-password' == $('#notification').val() || 'new-user' == $('#notification').val() || 'welcome-email' == $('#notification') ) {
16
- $('#toggle-fields, #email, #cc, #bcc, #users').hide();
17
  $('#user-password-msg').show();
18
  } else {
19
- $('#toggle-fields, #users').show();
20
  toggle_fields();
21
  $('#user-password-msg').hide();
22
  }
23
 
24
  $('#notification').on('change', function() {
25
  var $this = $(this);
26
- if ( 'user-password' === $this.val() || 'new-user' === $this.val() || 'welcome-email' == $this.val() ) {
27
- $('#toggle-fields, #email, #cc, #bcc, #users').hide();
28
  $('#user-password-msg').show();
29
  } else {
30
- $('#toggle-fields, #users').show();
31
  $('#user-password-msg').hide();
32
  toggle_fields();
33
  }
@@ -41,4 +41,10 @@ jQuery(document).ready(function($) {
41
  $( '#test-email' ).click(function() {
42
  $( '#send-test-email' ).val( 'true' );
43
  });
 
 
 
 
 
 
44
  });
12
  $(".select2").select2();
13
  toggle_fields();
14
 
15
+ if ( 'user-password' === $('#notification').val() || 'new-user' === $('#notification').val() || 'welcome-email' === $('#notification').val() || 'reply-comment' === $('#notification').val() ) {
16
+ $('#toggle-fields, #email, #cc, #bcc, #users, #email-formatting, #current-user').hide();
17
  $('#user-password-msg').show();
18
  } else {
19
+ $('#toggle-fields, #users, #email-formatting, #current-user').show();
20
  toggle_fields();
21
  $('#user-password-msg').hide();
22
  }
23
 
24
  $('#notification').on('change', function() {
25
  var $this = $(this);
26
+ if ( 'user-password' === $this.val() || 'new-user' === $this.val() || 'welcome-email' === $this.val() || 'reply-comment' === $this.val() ) {
27
+ $('#toggle-fields, #email, #cc, #bcc, #users, #email-formatting, #current-user').hide();
28
  $('#user-password-msg').show();
29
  } else {
30
+ $('#toggle-fields, #users, #email-formatting, #current-user').show();
31
  $('#user-password-msg').hide();
32
  toggle_fields();
33
  }
41
  $( '#test-email' ).click(function() {
42
  $( '#send-test-email' ).val( 'true' );
43
  });
44
+
45
+ $( '#shortcode-help' ).on( 'click', function() {
46
+ var notification = $( '#notification' ).val();
47
+
48
+ $(this).attr( 'href', 'http://www.voltronik.co.uk/wordpress-plugins/better-notifications-for-wordpress-shortcodes/?notification=' + notification );
49
+ });
50
  });
bnfw.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Better Notifications for WordPress
4
  * Plugin URI: http://wordpress.org/plugins/bnfw/
5
  * Description: Send customisable HTML emails to your users for different WordPress notifications.
6
- * Version: 1.2
7
  * Author: Voltronik
8
  * Author URI: http://www.voltronik.co.uk/
9
  * Author Email: plugins@voltronik.co.uk
@@ -93,6 +93,11 @@ class BNFW {
93
  public function hooks() {
94
  register_activation_hook( __FILE__ , array( $this, 'activate' ) );
95
 
 
 
 
 
 
96
  add_action( 'draft_to_publish' , array( $this, 'publish_post' ) );
97
  add_action( 'publish_to_publish' , array( $this, 'update_post' ) );
98
  add_action( 'init' , array( $this, 'custom_post_type_hooks' ), 100 );
@@ -108,7 +113,6 @@ class BNFW {
108
  add_action( 'lostpassword_post' , array( $this, 'on_lost_password' ) );
109
  add_filter( 'retrieve_password_title' , array( $this, 'change_password_email_title' ) );
110
  add_filter( 'retrieve_password_message' , array( $this, 'change_password_email_message' ), 10, 4 );
111
- add_filter( 'wp_mail_content_type' , array( $this, 'change_email_content_type' ) );
112
 
113
  add_filter( 'plugin_action_links' , array( $this, 'plugin_action_links' ), 10, 4 );
114
  }
@@ -241,6 +245,19 @@ class BNFW {
241
  $notification_type = 'comment-' . $post->post_type;
242
  }
243
  $this->send_notification( $notification_type, $comment_id );
 
 
 
 
 
 
 
 
 
 
 
 
 
244
  }
245
  }
246
 
@@ -317,15 +334,6 @@ class BNFW {
317
  return $message;
318
  }
319
 
320
- /**
321
- * Change the email content type to HTML.
322
- *
323
- * @since 1.2
324
- */
325
- public function change_email_content_type() {
326
- return 'text/html';
327
- }
328
-
329
  /**
330
  * Send notification for new uses.
331
  *
3
  * Plugin Name: Better Notifications for WordPress
4
  * Plugin URI: http://wordpress.org/plugins/bnfw/
5
  * Description: Send customisable HTML emails to your users for different WordPress notifications.
6
+ * Version: 1.3
7
  * Author: Voltronik
8
  * Author URI: http://www.voltronik.co.uk/
9
  * Author Email: plugins@voltronik.co.uk
93
  public function hooks() {
94
  register_activation_hook( __FILE__ , array( $this, 'activate' ) );
95
 
96
+ // P2 theme directly inserts the post into db
97
+ if ( class_exists( 'P2' ) ) {
98
+ add_action( 'wp_insert_post' , array( $this, 'publish_post' ) );
99
+ }
100
+
101
  add_action( 'draft_to_publish' , array( $this, 'publish_post' ) );
102
  add_action( 'publish_to_publish' , array( $this, 'update_post' ) );
103
  add_action( 'init' , array( $this, 'custom_post_type_hooks' ), 100 );
113
  add_action( 'lostpassword_post' , array( $this, 'on_lost_password' ) );
114
  add_filter( 'retrieve_password_title' , array( $this, 'change_password_email_title' ) );
115
  add_filter( 'retrieve_password_message' , array( $this, 'change_password_email_message' ), 10, 4 );
 
116
 
117
  add_filter( 'plugin_action_links' , array( $this, 'plugin_action_links' ), 10, 4 );
118
  }
245
  $notification_type = 'comment-' . $post->post_type;
246
  }
247
  $this->send_notification( $notification_type, $comment_id );
248
+
249
+ // comment reply notification.
250
+ if ( $the_comment->comment_parent > 0 ) {
251
+ $notifications = $this->notifier->get_notifications( 'reply-comment' );
252
+ if ( count( $notifications ) > 0 ) {
253
+ $parent = get_comment( $the_comment->comment_parent );
254
+ if ( $parent->comment_author_email != $the_comment->comment_author_email ) {
255
+ foreach ( $notifications as $notification ) {
256
+ $this->engine->send_comment_reply_email( $this->notifier->read_settings( $notification->ID ), $the_comment, $parent );
257
+ }
258
+ }
259
+ }
260
+ }
261
  }
262
  }
263
 
334
  return $message;
335
  }
336
 
 
 
 
 
 
 
 
 
 
337
  /**
338
  * Send notification for new uses.
339
  *
includes/admin/class-bnfw-notification.php CHANGED
@@ -9,6 +9,7 @@ class BNFW_Notification {
9
 
10
  const POST_TYPE = 'bnfw_notification';
11
  const META_KEY_PREFIX = 'bnfw_';
 
12
 
13
  /**
14
  *
@@ -19,6 +20,7 @@ class BNFW_Notification {
19
  add_action( 'do_meta_boxes', array( $this, 'remove_meta_boxes' ) );
20
  add_action( 'add_meta_boxes_' . self::POST_TYPE, array( $this, 'add_meta_boxes' ) );
21
  add_action( 'save_post', array( $this, 'save_meta_data' ) );
 
22
  add_filter( 'post_updated_messages', array( $this, 'post_updated_messages' ) );
23
 
24
  // Custom row actions.
@@ -165,14 +167,15 @@ class BNFW_Notification {
165
  <option value="user-password" <?php selected( 'user-password', $setting['notification'] );?>><?php _e( 'Lost Password - For User', 'bnfw' );?></option>
166
  <option value="new-user" <?php selected( 'new-user', $setting['notification'] );?>><?php _e( 'New User Registration - For User', 'bnfw' );?></option>
167
  <option value="welcome-email" <?php selected( 'welcome-email', $setting['notification'] );?>><?php _e( 'New User - Welcome Email', 'bnfw' );?></option>
 
168
  </optgroup>
169
  <optgroup label="Posts">
170
  <option value="new-post" <?php selected( 'new-post', $setting['notification'] );?>><?php _e( 'New Post Published', 'bnfw' );?></option>
171
  <option value="update-post" <?php selected( 'update-post', $setting['notification'] );?>><?php _e( 'Post Updated', 'bnfw' );?></option>
172
  <option value="pending-post" <?php selected( 'pending-post', $setting['notification'] );?>><?php _e( 'Post Pending Review', 'bnfw' );?></option>
173
  <option value="future-post" <?php selected( 'future-post', $setting['notification'] );?>><?php _e( 'Post Scheduled', 'bnfw' );?></option>
174
- <option value="new-category" <?php selected( 'new-category', $setting['notification'] );?>><?php _e( 'New Category', 'bnfw' ); ?></option>
175
- <option value="new-post_tag" <?php selected( 'new-post_tag', $setting['notification'] );?>><?php _e( 'New Tag', 'bnfw' ); ?></option>
176
  </optgroup>
177
  <optgroup label="Page">
178
  <option value="new-page" <?php selected( 'new-page', $setting['notification'] );?>><?php _e( 'New Page Published', 'bnfw' );?></option>
@@ -238,6 +241,23 @@ class BNFW_Notification {
238
  </td>
239
  </tr>
240
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
241
  <tr valign="top" id="toggle-fields">
242
  <th>
243
  <?php esc_attr_e( 'Additional Email Fields', 'bnfw' ); ?>
@@ -293,6 +313,16 @@ class BNFW_Notification {
293
  </td>
294
  </tr>
295
 
 
 
 
 
 
 
 
 
 
 
296
  <tr valign="top">
297
  <th scope="row">
298
  <?php _e( 'Subject', 'bnfw' ); ?>
@@ -308,6 +338,7 @@ class BNFW_Notification {
308
  </th>
309
  <td>
310
  <?php wp_editor( $setting['message'], 'notification_message', array( 'media_buttons' => false ) ); ?>
 
311
  </td>
312
  </tr>
313
  </tbody>
@@ -367,7 +398,6 @@ class BNFW_Notification {
367
  * @param int $post_id The ID of the post being saved.
368
  */
369
  public function save_meta_data( $post_id ) {
370
-
371
  if ( self::POST_TYPE !== get_post_type( $post_id ) ) {
372
  return;
373
  }
@@ -391,13 +421,19 @@ class BNFW_Notification {
391
  }
392
 
393
  $setting = array(
394
- 'notification' => $_POST['notification'],
395
- 'subject' => sanitize_text_field( $_POST['subject'] ),
396
- 'message' => $_POST['notification_message'],
397
- 'disabled' => isset( $_POST['disabled'] ) ? sanitize_text_field( $_POST['disabled'] ) : 'false',
398
- 'users' => $_POST['users'],
 
 
399
  );
400
 
 
 
 
 
401
  if ( isset( $_POST['show-fields'] ) && 'true' == $_POST['show-fields'] ) {
402
  $setting['show-fields'] = 'true';
403
  $setting['from-name'] = sanitize_text_field( $_POST['from-name'] );
@@ -413,10 +449,38 @@ class BNFW_Notification {
413
  if ( isset( $_POST['send-test-email'] ) ) {
414
  if ( 'true' == $_POST['send-test-email'] ) {
415
  BNFW::factory()->engine->send_test_email( $setting );
 
416
  }
417
  }
418
  }
419
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
420
  /**
421
  * Save settings in post meta.
422
  *
@@ -441,16 +505,18 @@ class BNFW_Notification {
441
  public function read_settings( $post_id ) {
442
  $setting = array();
443
  $default = array(
444
- 'notification' => '',
445
- 'from-name' => '',
446
- 'from-email' => '',
447
- 'cc' => array(),
448
- 'bcc' => array(),
449
- 'users' => array(),
450
- 'subject' => '',
451
- 'message' => '',
452
- 'show-fields' => 'false',
453
- 'disabled' => 'false',
 
 
454
  );
455
 
456
  foreach ( $default as $key => $default_value ) {
@@ -691,6 +757,9 @@ class BNFW_Notification {
691
  case 'new-pingback':
692
  return __( 'New Pingback', 'bnfw' );
693
  break;
 
 
 
694
  case 'user-password':
695
  return __( 'Lost Password - For User', 'bnfw' );
696
  break;
@@ -718,10 +787,10 @@ class BNFW_Notification {
718
  case 'future-post':
719
  return __( 'Post Scheduled', 'bnfw' );
720
  break;
721
- case 'new-category':
722
  return __( 'New Category', 'bnfw' );
723
  break;
724
- case 'new-post_tag':
725
  return __( 'New Tag', 'bnfw' );
726
  break;
727
  default:
9
 
10
  const POST_TYPE = 'bnfw_notification';
11
  const META_KEY_PREFIX = 'bnfw_';
12
+ const TEST_MAIL_ARG = 'test-mail';
13
 
14
  /**
15
  *
20
  add_action( 'do_meta_boxes', array( $this, 'remove_meta_boxes' ) );
21
  add_action( 'add_meta_boxes_' . self::POST_TYPE, array( $this, 'add_meta_boxes' ) );
22
  add_action( 'save_post', array( $this, 'save_meta_data' ) );
23
+ add_action( 'edit_form_top', array( $this, 'admin_notices' ) );
24
  add_filter( 'post_updated_messages', array( $this, 'post_updated_messages' ) );
25
 
26
  // Custom row actions.
167
  <option value="user-password" <?php selected( 'user-password', $setting['notification'] );?>><?php _e( 'Lost Password - For User', 'bnfw' );?></option>
168
  <option value="new-user" <?php selected( 'new-user', $setting['notification'] );?>><?php _e( 'New User Registration - For User', 'bnfw' );?></option>
169
  <option value="welcome-email" <?php selected( 'welcome-email', $setting['notification'] );?>><?php _e( 'New User - Welcome Email', 'bnfw' );?></option>
170
+ <option value="reply-comment" <?php selected( 'reply-comment', $setting['notification'] );?>><?php _e( 'Comment Reply', 'bnfw' );?></option>
171
  </optgroup>
172
  <optgroup label="Posts">
173
  <option value="new-post" <?php selected( 'new-post', $setting['notification'] );?>><?php _e( 'New Post Published', 'bnfw' );?></option>
174
  <option value="update-post" <?php selected( 'update-post', $setting['notification'] );?>><?php _e( 'Post Updated', 'bnfw' );?></option>
175
  <option value="pending-post" <?php selected( 'pending-post', $setting['notification'] );?>><?php _e( 'Post Pending Review', 'bnfw' );?></option>
176
  <option value="future-post" <?php selected( 'future-post', $setting['notification'] );?>><?php _e( 'Post Scheduled', 'bnfw' );?></option>
177
+ <option value="newterm-category" <?php selected( 'newterm-category', $setting['notification'] );?>><?php _e( 'New Category', 'bnfw' ); ?></option>
178
+ <option value="newterm-post_tag" <?php selected( 'newterm-post_tag', $setting['notification'] );?>><?php _e( 'New Tag', 'bnfw' ); ?></option>
179
  </optgroup>
180
  <optgroup label="Page">
181
  <option value="new-page" <?php selected( 'new-page', $setting['notification'] );?>><?php _e( 'New Page Published', 'bnfw' );?></option>
241
  </td>
242
  </tr>
243
 
244
+ <tr valign="top" id="email-formatting">
245
+ <th>
246
+ <?php esc_attr_e( 'Email formatting', 'bnfw' ); ?>
247
+ </th>
248
+ <td>
249
+ <label style="margin-right: 20px;">
250
+ <input type="radio" name="email-formatting" value="html" <?php checked( 'html', $setting['email-formatting'] ); ?>>
251
+ <?php esc_html_e( 'HTML Formatting', 'bnfw' ); ?>
252
+ </label>
253
+
254
+ <label>
255
+ <input type="radio" name="email-formatting" value="text" <?php checked( 'text', $setting['email-formatting'] ); ?>>
256
+ <?php esc_html_e( 'Plain text', 'bnfw' ); ?>
257
+ </label>
258
+ </td>
259
+ </tr>
260
+
261
  <tr valign="top" id="toggle-fields">
262
  <th>
263
  <?php esc_attr_e( 'Additional Email Fields', 'bnfw' ); ?>
313
  </td>
314
  </tr>
315
 
316
+ <tr valign="top" id="current-user">
317
+ <th> </th>
318
+ <td>
319
+ <label>
320
+ <input type="checkbox" name="disable-current-user" value="true" <?php checked( 'true', $setting['disable-current-user'] ); ?>>
321
+ <?php _e( 'Disable Notification for the User that triggered it', 'bnfw' ); ?>
322
+ </label>
323
+ </td>
324
+ </tr>
325
+
326
  <tr valign="top">
327
  <th scope="row">
328
  <?php _e( 'Subject', 'bnfw' ); ?>
338
  </th>
339
  <td>
340
  <?php wp_editor( $setting['message'], 'notification_message', array( 'media_buttons' => false ) ); ?>
341
+ <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>
342
  </td>
343
  </tr>
344
  </tbody>
398
  * @param int $post_id The ID of the post being saved.
399
  */
400
  public function save_meta_data( $post_id ) {
 
401
  if ( self::POST_TYPE !== get_post_type( $post_id ) ) {
402
  return;
403
  }
421
  }
422
 
423
  $setting = array(
424
+ 'notification' => $_POST['notification'],
425
+ 'subject' => sanitize_text_field( $_POST['subject'] ),
426
+ 'message' => $_POST['notification_message'],
427
+ 'disabled' => isset( $_POST['disabled'] ) ? sanitize_text_field( $_POST['disabled'] ) : 'false',
428
+ 'email-formatting' => isset( $_POST['email-formatting'] ) ? sanitize_text_field( $_POST['email-formatting'] ) : 'html',
429
+ 'disable-current-user' => isset( $_POST['disable-current-user'] ) ? sanitize_text_field( $_POST['disable-current-user'] ) : 'false',
430
+ 'users' => array(),
431
  );
432
 
433
+ if ( isset( $_POST['users'] ) ) {
434
+ $setting['users'] = $_POST['users'];
435
+ }
436
+
437
  if ( isset( $_POST['show-fields'] ) && 'true' == $_POST['show-fields'] ) {
438
  $setting['show-fields'] = 'true';
439
  $setting['from-name'] = sanitize_text_field( $_POST['from-name'] );
449
  if ( isset( $_POST['send-test-email'] ) ) {
450
  if ( 'true' == $_POST['send-test-email'] ) {
451
  BNFW::factory()->engine->send_test_email( $setting );
452
+ add_filter( 'redirect_post_location', array( $this, 'test_mail_sent' ) );
453
  }
454
  }
455
  }
456
 
457
+ /**
458
+ * Add a query parameter to url if test email was sent.
459
+ *
460
+ * @since 1.3
461
+ */
462
+ public function test_mail_sent( $loc ) {
463
+ return add_query_arg( self::TEST_MAIL_ARG, 1, $loc );
464
+ }
465
+
466
+ /**
467
+ * Add a notification if a test email was sent.
468
+ *
469
+ * @since 1.3
470
+ */
471
+ public function admin_notices() {
472
+ if ( isset( $_GET[self::TEST_MAIL_ARG ] ) ) {
473
+ $screen = get_current_screen();
474
+ if ( in_array( $screen->post_type, array( self::POST_TYPE ) ) ) {
475
+ ?>
476
+ <div class="updated below-h2">
477
+ <p><?php echo __( 'Test Notification Sent.', 'bnfw' ); ?></p>
478
+ </div>
479
+ <?php
480
+ }
481
+ }
482
+ }
483
+
484
  /**
485
  * Save settings in post meta.
486
  *
505
  public function read_settings( $post_id ) {
506
  $setting = array();
507
  $default = array(
508
+ 'notification' => '',
509
+ 'from-name' => '',
510
+ 'from-email' => '',
511
+ 'cc' => array(),
512
+ 'bcc' => array(),
513
+ 'users' => array(),
514
+ 'subject' => '',
515
+ 'email-formatting' => 'html',
516
+ 'message' => '',
517
+ 'show-fields' => 'false',
518
+ 'disable-current-user' => 'false',
519
+ 'disabled' => 'false',
520
  );
521
 
522
  foreach ( $default as $key => $default_value ) {
757
  case 'new-pingback':
758
  return __( 'New Pingback', 'bnfw' );
759
  break;
760
+ case 'reply-comment':
761
+ return __( 'Comment Reply', 'bnfw' );
762
+ break;
763
  case 'user-password':
764
  return __( 'Lost Password - For User', 'bnfw' );
765
  break;
787
  case 'future-post':
788
  return __( 'Post Scheduled', 'bnfw' );
789
  break;
790
+ case 'newterm-category':
791
  return __( 'New Category', 'bnfw' );
792
  break;
793
+ case 'newterm-post_tag':
794
  return __( 'New Tag', 'bnfw' );
795
  break;
796
  default:
includes/engine/class-bnfw-engine.php CHANGED
@@ -20,7 +20,9 @@ class BNFW_Engine {
20
  $email = $current_user->user_email;
21
 
22
  $headers = array();
23
- $headers[] = 'Content-type: text/html';
 
 
24
 
25
  wp_mail( $email, stripslashes( $subject ), wpautop( $message ), $headers );
26
  }
@@ -37,7 +39,10 @@ class BNFW_Engine {
37
  $message = $this->handle_shortcodes( $setting['message'], $setting['notification'], $id );
38
  $emails = $this->get_emails( $setting );
39
  $headers = $this->get_headers( $emails );
40
- $headers[] = 'Content-type: text/html';
 
 
 
41
 
42
  foreach ( $emails['to'] as $email ) {
43
  wp_mail( $email, stripslashes( $subject ), wpautop( $message ), $headers );
@@ -64,11 +69,36 @@ class BNFW_Engine {
64
  $subject = str_replace( '[login_url]', wp_login_url() , $subject );
65
  $message = str_replace( '[login_url]', wp_login_url(), $message );
66
 
67
- $headers = array( 'Content-type: text/html' );
 
 
 
68
 
69
  wp_mail( $user->user_email, stripslashes( $subject ), wpautop( $message ), $headers );
70
  }
71
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
  /**
73
  * Handle shortcode for password reset email message.
74
  *
@@ -97,6 +127,7 @@ class BNFW_Engine {
97
  case 'new-comment':
98
  case 'new-trackback':
99
  case 'new-pingback':
 
100
  // handle new comments, trackbacks and pingbacks
101
  $message = $this->comment_shortcodes( $message, $id );
102
  $comment = get_comment( $id );
@@ -107,6 +138,7 @@ class BNFW_Engine {
107
  case 'user-password':
108
  case 'admin-user':
109
  case 'welcome-email':
 
110
  // handle users (lost password and new user registration)
111
  $message = $this->user_shortcodes( $message, $id );
112
  break;
@@ -203,6 +235,16 @@ class BNFW_Engine {
203
  $user_info = get_userdata( $post->post_author );
204
  $message = str_replace( '[post_author]', $user_info->display_name, $message );
205
 
 
 
 
 
 
 
 
 
 
 
206
  return $message;
207
  }
208
 
@@ -249,7 +291,10 @@ class BNFW_Engine {
249
  private function user_shortcodes( $message, $user_id ) {
250
  $user_info = get_userdata( $user_id );
251
 
 
252
  $message = str_replace( '[ID]', $user_info->ID, $message );
 
 
253
  $message = str_replace( '[user_login]', $user_info->user_login, $message );
254
  $message = str_replace( '[user_nicename]', $user_info->user_nicename, $message );
255
  $message = str_replace( '[user_email]', $user_info->user_email, $message );
@@ -291,14 +336,23 @@ class BNFW_Engine {
291
  * Get the list of emails from the notification settings.
292
  *
293
  * @since 1.0
294
- * @param unknown $setting
295
- * @return unknown
296
  */
297
  private function get_emails( $setting ) {
 
 
298
  $emails = array();
299
 
 
 
 
 
 
 
 
300
  if ( ! empty( $setting['users'] ) ) {
301
- $emails['to'] = $this->get_emails_from_users( $setting['users'] );
302
  }
303
 
304
  if ( 'true' == $setting['show-fields'] ) {
@@ -309,11 +363,11 @@ class BNFW_Engine {
309
  }
310
 
311
  if ( ! empty( $setting['cc'] ) ) {
312
- $emails['cc'] = $this->get_emails_from_users( $setting['cc'] );
313
  }
314
 
315
  if ( ! empty( $setting['bcc'] ) ) {
316
- $emails['bcc'] = $this->get_emails_from_users( $setting['bcc'] );
317
  }
318
  }
319
 
@@ -324,8 +378,10 @@ class BNFW_Engine {
324
  * Get emails from users.
325
  *
326
  * @since 1.2
 
 
327
  */
328
- private function get_emails_from_users( $users ) {
329
  $email_list = array();
330
  $user_ids = array();
331
  $user_roles = array();
@@ -338,8 +394,12 @@ class BNFW_Engine {
338
  }
339
  }
340
 
 
 
 
341
  $emails_from_user_ids = $this->get_emails_from_id( $user_ids );
342
- $emails_from_user_roles = $this->get_emails_from_role( $user_roles );
 
343
 
344
  return array_merge( $emails_from_user_roles, $emails_from_user_ids );
345
  }
@@ -366,10 +426,11 @@ class BNFW_Engine {
366
  * Get emails of users based on role.
367
  *
368
  * @since 1.0
369
- * @param unknown $roles
370
- * @return unknown
 
371
  */
372
- private function get_emails_from_role( $roles ) {
373
  if ( ! is_array( $roles ) ) {
374
  $roles = array( $roles );
375
  }
@@ -379,10 +440,15 @@ class BNFW_Engine {
379
  $role_name = $this->get_role_name_by_label( $role );
380
  $users = get_users( array(
381
  'role' => $role_name,
382
- 'fields' => array( 'user_email' ),
383
  ) );
384
 
385
  foreach ( $users as $user ) {
 
 
 
 
 
386
  $email_list[] = $user->user_email;
387
  }
388
  }
20
  $email = $current_user->user_email;
21
 
22
  $headers = array();
23
+ if ( 'html' == $setting['email-formatting'] ) {
24
+ $headers[] = 'Content-type: text/html';
25
+ }
26
 
27
  wp_mail( $email, stripslashes( $subject ), wpautop( $message ), $headers );
28
  }
39
  $message = $this->handle_shortcodes( $setting['message'], $setting['notification'], $id );
40
  $emails = $this->get_emails( $setting );
41
  $headers = $this->get_headers( $emails );
42
+
43
+ if ( 'html' == $setting['email-formatting'] ) {
44
+ $headers[] = 'Content-type: text/html';
45
+ }
46
 
47
  foreach ( $emails['to'] as $email ) {
48
  wp_mail( $email, stripslashes( $subject ), wpautop( $message ), $headers );
69
  $subject = str_replace( '[login_url]', wp_login_url() , $subject );
70
  $message = str_replace( '[login_url]', wp_login_url(), $message );
71
 
72
+ $headers = array();
73
+ if ( 'html' == $setting['email-formatting'] ) {
74
+ $headers[] = 'Content-type: text/html';
75
+ }
76
 
77
  wp_mail( $user->user_email, stripslashes( $subject ), wpautop( $message ), $headers );
78
  }
79
 
80
+ /**
81
+ * Send comment reply notification email.
82
+ *
83
+ * @since 1.3
84
+ * @param array $setting Notification setting
85
+ * @param object $comment Comment object
86
+ * @param object $parent_comment Parent comment object
87
+ */
88
+ public function send_comment_reply_email( $setting, $comment, $parent_comment ) {
89
+ $comment_id = $comment->comment_ID;
90
+
91
+ $subject = $this->handle_shortcodes( $setting['subject'], $setting['notification'], $comment_id );
92
+ $message = $this->handle_shortcodes( $setting['message'], $setting['notification'], $comment_id );
93
+
94
+ $headers = array();
95
+ if ( 'html' == $setting['email-formatting'] ) {
96
+ $headers[] = 'Content-type: text/html';
97
+ }
98
+
99
+ wp_mail( $parent_comment->comment_author_email, stripslashes( $subject ), wpautop( $message ), $headers );
100
+ }
101
+
102
  /**
103
  * Handle shortcode for password reset email message.
104
  *
127
  case 'new-comment':
128
  case 'new-trackback':
129
  case 'new-pingback':
130
+ case 'reply-comment':
131
  // handle new comments, trackbacks and pingbacks
132
  $message = $this->comment_shortcodes( $message, $id );
133
  $comment = get_comment( $id );
138
  case 'user-password':
139
  case 'admin-user':
140
  case 'welcome-email':
141
+ case 'new-user':
142
  // handle users (lost password and new user registration)
143
  $message = $this->user_shortcodes( $message, $id );
144
  break;
235
  $user_info = get_userdata( $post->post_author );
236
  $message = str_replace( '[post_author]', $user_info->display_name, $message );
237
 
238
+ if ( $last_id = get_post_meta( $post->ID, '_edit_last', true ) ) {
239
+ if ( $post->post_author != $last_id ) {
240
+ $last_user_info = get_userdata($last_id);
241
+ } else {
242
+ $last_user_info = $user_info;
243
+ }
244
+
245
+ $message = str_replace( '[post_update_author]', $last_user_info->display_name, $message );
246
+ }
247
+
248
  return $message;
249
  }
250
 
291
  private function user_shortcodes( $message, $user_id ) {
292
  $user_info = get_userdata( $user_id );
293
 
294
+ // deperecated
295
  $message = str_replace( '[ID]', $user_info->ID, $message );
296
+
297
+ $message = str_replace( '[user_id]', $user_info->ID, $message );
298
  $message = str_replace( '[user_login]', $user_info->user_login, $message );
299
  $message = str_replace( '[user_nicename]', $user_info->user_nicename, $message );
300
  $message = str_replace( '[user_email]', $user_info->user_email, $message );
336
  * Get the list of emails from the notification settings.
337
  *
338
  * @since 1.0
339
+ * @param array $setting Notification settings
340
+ * @return array Emails
341
  */
342
  private function get_emails( $setting ) {
343
+ global $current_user;
344
+
345
  $emails = array();
346
 
347
+ $exclude = null;
348
+ if ( 'true' == $setting['disable-current-user'] ) {
349
+ if ( isset( $current_user->ID ) ) {
350
+ $exclude = $current_user->ID;
351
+ }
352
+ }
353
+
354
  if ( ! empty( $setting['users'] ) ) {
355
+ $emails['to'] = $this->get_emails_from_users( $setting['users'], $exclude );
356
  }
357
 
358
  if ( 'true' == $setting['show-fields'] ) {
363
  }
364
 
365
  if ( ! empty( $setting['cc'] ) ) {
366
+ $emails['cc'] = $this->get_emails_from_users( $setting['cc'], $exclude );
367
  }
368
 
369
  if ( ! empty( $setting['bcc'] ) ) {
370
+ $emails['bcc'] = $this->get_emails_from_users( $setting['bcc'], $exclude );
371
  }
372
  }
373
 
378
  * Get emails from users.
379
  *
380
  * @since 1.2
381
+ * @param array $users Users Array
382
+ * @param int $exclude User id to exclude
383
  */
384
+ private function get_emails_from_users( $users, $exclude = null ) {
385
  $email_list = array();
386
  $user_ids = array();
387
  $user_roles = array();
394
  }
395
  }
396
 
397
+ if ( null != $exclude ) {
398
+ $user_ids = array_diff( $user_ids, array( $exclude ) );
399
+ }
400
  $emails_from_user_ids = $this->get_emails_from_id( $user_ids );
401
+
402
+ $emails_from_user_roles = $this->get_emails_from_role( $user_roles, $exclude );
403
 
404
  return array_merge( $emails_from_user_roles, $emails_from_user_ids );
405
  }
426
  * Get emails of users based on role.
427
  *
428
  * @since 1.0
429
+ * @param array $roles User Roles
430
+ * @param int $exclude User id to exclude
431
+ * @return array Email ids
432
  */
433
+ private function get_emails_from_role( $roles, $exclude = null ) {
434
  if ( ! is_array( $roles ) ) {
435
  $roles = array( $roles );
436
  }
440
  $role_name = $this->get_role_name_by_label( $role );
441
  $users = get_users( array(
442
  'role' => $role_name,
443
+ 'fields' => array( 'user_email', 'ID' ),
444
  ) );
445
 
446
  foreach ( $users as $user ) {
447
+ if ( null != $exclude ) {
448
+ if ( $user->ID == $exclude ) {
449
+ continue;
450
+ }
451
+ }
452
  $email_list[] = $user->user_email;
453
  }
454
  }
languages/bnfw.pot CHANGED
@@ -2,9 +2,9 @@
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.1\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/bnfw\n"
7
- "POT-Creation-Date: 2015-03-16 16:17:54+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -13,7 +13,7 @@ msgstr ""
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
15
  #: includes/admin/bnfw-settings.php:14
16
- #: includes/admin/class-bnfw-notification.php:117
17
  msgid "Notification Settings"
18
  msgstr ""
19
 
@@ -33,231 +33,320 @@ msgstr ""
33
  msgid "Don't send notifications for comments marked as SPAM by Akismet"
34
  msgstr ""
35
 
36
- #: includes/admin/class-bnfw-notification.php:43
37
- #: includes/admin/class-bnfw-notification.php:46
38
- #: includes/admin/class-bnfw-notification.php:47
39
  msgid "Notifications"
40
  msgstr ""
41
 
42
- #: includes/admin/class-bnfw-notification.php:44
43
  msgid "Notification"
44
  msgstr ""
45
 
46
- #: includes/admin/class-bnfw-notification.php:45
47
  msgid "Add New"
48
  msgstr ""
49
 
50
- #: includes/admin/class-bnfw-notification.php:48
51
  msgid "Add New Notification"
52
  msgstr ""
53
 
54
- #: includes/admin/class-bnfw-notification.php:49
55
  msgid "Edit Notification"
56
  msgstr ""
57
 
58
- #: includes/admin/class-bnfw-notification.php:50
59
  msgid "New Notification"
60
  msgstr ""
61
 
62
- #: includes/admin/class-bnfw-notification.php:51
63
  msgid "View Notification"
64
  msgstr ""
65
 
66
- #: includes/admin/class-bnfw-notification.php:52
67
  msgid "Search Notifications"
68
  msgstr ""
69
 
70
- #: includes/admin/class-bnfw-notification.php:53
71
  msgid "No Notifications found"
72
  msgstr ""
73
 
74
- #: includes/admin/class-bnfw-notification.php:54
75
  msgid "No Notifications found in trash"
76
  msgstr ""
77
 
78
- #: includes/admin/class-bnfw-notification.php:55
79
  msgid "All Notifications"
80
  msgstr ""
81
 
82
- #: includes/admin/class-bnfw-notification.php:125
83
  msgid "Save Notification"
84
  msgstr ""
85
 
86
- #: includes/admin/class-bnfw-notification.php:154
87
  msgid "Notification For"
88
  msgstr ""
89
 
90
- #: includes/admin/class-bnfw-notification.php:159
91
  msgid "New Comment / Awaiting Moderation"
92
  msgstr ""
93
 
94
- #: includes/admin/class-bnfw-notification.php:160
95
- #: includes/admin/class-bnfw-notification.php:630
96
  msgid "New Trackback"
97
  msgstr ""
98
 
99
- #: includes/admin/class-bnfw-notification.php:161
100
- #: includes/admin/class-bnfw-notification.php:633
101
  msgid "New Pingback"
102
  msgstr ""
103
 
104
- #: includes/admin/class-bnfw-notification.php:162
105
- #: includes/admin/class-bnfw-notification.php:639
106
  msgid "Lost Password - For Admin"
107
  msgstr ""
108
 
109
- #: includes/admin/class-bnfw-notification.php:163
110
  msgid "New User Registration - For Admin"
111
  msgstr ""
112
 
113
- #: includes/admin/class-bnfw-notification.php:166
114
- #: includes/admin/class-bnfw-notification.php:636
115
  msgid "Lost Password - For User"
116
  msgstr ""
117
 
118
- #: includes/admin/class-bnfw-notification.php:167
119
  msgid "New User Registration - For User"
120
  msgstr ""
121
 
122
- #: includes/admin/class-bnfw-notification.php:168
123
  msgid "New User - Welcome Email"
124
  msgstr ""
125
 
126
- #: includes/admin/class-bnfw-notification.php:171
127
- #: includes/admin/class-bnfw-notification.php:651
 
 
 
 
 
128
  msgid "New Post Published"
129
  msgstr ""
130
 
131
- #: includes/admin/class-bnfw-notification.php:172
132
- #: includes/admin/class-bnfw-notification.php:654
133
  msgid "Post Updated"
134
  msgstr ""
135
 
136
- #: includes/admin/class-bnfw-notification.php:173
137
- #: includes/admin/class-bnfw-notification.php:657
138
  msgid "Post Pending Review"
139
  msgstr ""
140
 
141
- #: includes/admin/class-bnfw-notification.php:174
142
- #: includes/admin/class-bnfw-notification.php:660
 
 
 
 
 
143
  msgid "New Category"
144
  msgstr ""
145
 
146
- #: includes/admin/class-bnfw-notification.php:175
147
- #: includes/admin/class-bnfw-notification.php:663
148
  msgid "New Tag"
149
  msgstr ""
150
 
151
- #: includes/admin/class-bnfw-notification.php:188
152
- msgid "Custom Post Type - "
 
 
 
 
153
  msgstr ""
154
 
155
- #: includes/admin/class-bnfw-notification.php:189
156
- #: includes/admin/class-bnfw-notification.php:669
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
157
  msgid "New "
158
  msgstr ""
159
 
160
- #: includes/admin/class-bnfw-notification.php:190
161
  msgid "Update "
162
  msgstr ""
163
 
164
- #: includes/admin/class-bnfw-notification.php:191
165
  msgid "Pending Review"
166
  msgstr ""
167
 
168
- #: includes/admin/class-bnfw-notification.php:207
 
 
 
 
 
 
 
 
 
169
  msgid "Custom Taxonomy"
170
  msgstr ""
171
 
172
- #: includes/admin/class-bnfw-notification.php:208
173
  msgid "New"
174
  msgstr ""
175
 
176
- #: includes/admin/class-bnfw-notification.php:222
177
  msgid ""
178
  "This notification doesn't support additional email fields or shortcodes in "
179
  "the subject line"
180
  msgstr ""
181
 
182
- #: includes/admin/class-bnfw-notification.php:229
183
- msgid "User Roles"
 
 
 
 
 
 
 
 
184
  msgstr ""
185
 
186
- #: includes/admin/class-bnfw-notification.php:252
187
- msgid "Define individual users instead"
188
  msgstr ""
189
 
190
- #: includes/admin/class-bnfw-notification.php:268
191
- msgid "Define user roles instead"
192
  msgstr ""
193
 
194
- #: includes/admin/class-bnfw-notification.php:275
195
- #: includes/admin/class-bnfw-notification.php:574
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
196
  msgid "Subject"
197
  msgstr ""
198
 
199
- #: includes/admin/class-bnfw-notification.php:284
200
  msgid "Message Body"
201
  msgstr ""
202
 
203
- #: includes/admin/class-bnfw-notification.php:456
 
 
 
 
 
 
 
 
 
 
204
  msgid "Notification saved."
205
  msgstr ""
206
 
207
- #: includes/admin/class-bnfw-notification.php:474
208
- #: includes/admin/class-bnfw-notification.php:502
209
- #: includes/admin/class-bnfw-notification.php:503
210
  msgid "Save"
211
  msgstr ""
212
 
213
- #: includes/admin/class-bnfw-notification.php:484
214
  msgid "Disable Notification"
215
  msgstr ""
216
 
217
- #: includes/admin/class-bnfw-notification.php:492
 
 
 
 
218
  msgid "Delete Permanently"
219
  msgstr ""
220
 
221
- #: includes/admin/class-bnfw-notification.php:494
222
  msgid "Move to Trash"
223
  msgstr ""
224
 
225
- #: includes/admin/class-bnfw-notification.php:572
226
  msgid "Notification Type"
227
  msgstr ""
228
 
229
- #: includes/admin/class-bnfw-notification.php:573
230
  msgid "Enabled?"
231
  msgstr ""
232
 
233
- #: includes/admin/class-bnfw-notification.php:575
234
  msgid "User Roles/Users"
235
  msgstr ""
236
 
237
- #: includes/admin/class-bnfw-notification.php:627
238
- msgid "New Comment"
239
- msgstr ""
240
-
241
- #: includes/admin/class-bnfw-notification.php:642
242
  msgid "User Registration - For User"
243
  msgstr ""
244
 
245
- #: includes/admin/class-bnfw-notification.php:645
246
  msgid "New User - Welcome email"
247
  msgstr ""
248
 
249
- #: includes/admin/class-bnfw-notification.php:648
250
  msgid "User Registration - For Admin"
251
  msgstr ""
252
 
253
- #: includes/admin/class-bnfw-notification.php:672
254
  msgid "Updated "
255
  msgstr ""
256
 
257
- #: includes/admin/class-bnfw-notification.php:675
258
  msgid " Pending Review"
259
  msgstr ""
260
 
 
 
 
 
 
 
 
 
 
 
 
 
261
  #: includes/import.php:60
262
  msgid " for "
263
  msgstr ""
@@ -290,26 +379,6 @@ msgstr ""
290
  msgid "[%s] Your username and password"
291
  msgstr ""
292
 
293
- #: includes/tmp.php:3
294
- msgid "Additional Email Fields"
295
- msgstr ""
296
-
297
- #: includes/tmp.php:7
298
- msgid "Show additional email fields"
299
- msgstr ""
300
-
301
- #: includes/tmp.php:13
302
- msgid "From Name and Email"
303
- msgstr ""
304
-
305
- #: includes/tmp.php:23
306
- msgid "CC"
307
- msgstr ""
308
-
309
- #: includes/tmp.php:34
310
- msgid "BCC"
311
- msgstr ""
312
-
313
  #. Plugin Name of the plugin/theme
314
  msgid "Better Notifications for WordPress"
315
  msgstr ""
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\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/bnfw\n"
7
+ "POT-Creation-Date: 2015-07-02 17:40:26+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
15
  #: includes/admin/bnfw-settings.php:14
16
+ #: includes/admin/class-bnfw-notification.php:119
17
  msgid "Notification Settings"
18
  msgstr ""
19
 
33
  msgid "Don't send notifications for comments marked as SPAM by Akismet"
34
  msgstr ""
35
 
36
+ #: includes/admin/class-bnfw-notification.php:45
37
+ #: includes/admin/class-bnfw-notification.php:48
38
+ #: includes/admin/class-bnfw-notification.php:49
39
  msgid "Notifications"
40
  msgstr ""
41
 
42
+ #: includes/admin/class-bnfw-notification.php:46
43
  msgid "Notification"
44
  msgstr ""
45
 
46
+ #: includes/admin/class-bnfw-notification.php:47
47
  msgid "Add New"
48
  msgstr ""
49
 
50
+ #: includes/admin/class-bnfw-notification.php:50
51
  msgid "Add New Notification"
52
  msgstr ""
53
 
54
+ #: includes/admin/class-bnfw-notification.php:51
55
  msgid "Edit Notification"
56
  msgstr ""
57
 
58
+ #: includes/admin/class-bnfw-notification.php:52
59
  msgid "New Notification"
60
  msgstr ""
61
 
62
+ #: includes/admin/class-bnfw-notification.php:53
63
  msgid "View Notification"
64
  msgstr ""
65
 
66
+ #: includes/admin/class-bnfw-notification.php:54
67
  msgid "Search Notifications"
68
  msgstr ""
69
 
70
+ #: includes/admin/class-bnfw-notification.php:55
71
  msgid "No Notifications found"
72
  msgstr ""
73
 
74
+ #: includes/admin/class-bnfw-notification.php:56
75
  msgid "No Notifications found in trash"
76
  msgstr ""
77
 
78
+ #: includes/admin/class-bnfw-notification.php:57
79
  msgid "All Notifications"
80
  msgstr ""
81
 
82
+ #: includes/admin/class-bnfw-notification.php:127
83
  msgid "Save Notification"
84
  msgstr ""
85
 
86
+ #: includes/admin/class-bnfw-notification.php:155
87
  msgid "Notification For"
88
  msgstr ""
89
 
90
+ #: includes/admin/class-bnfw-notification.php:160
91
  msgid "New Comment / Awaiting Moderation"
92
  msgstr ""
93
 
94
+ #: includes/admin/class-bnfw-notification.php:161
95
+ #: includes/admin/class-bnfw-notification.php:755
96
  msgid "New Trackback"
97
  msgstr ""
98
 
99
+ #: includes/admin/class-bnfw-notification.php:162
100
+ #: includes/admin/class-bnfw-notification.php:758
101
  msgid "New Pingback"
102
  msgstr ""
103
 
104
+ #: includes/admin/class-bnfw-notification.php:163
105
+ #: includes/admin/class-bnfw-notification.php:767
106
  msgid "Lost Password - For Admin"
107
  msgstr ""
108
 
109
+ #: includes/admin/class-bnfw-notification.php:164
110
  msgid "New User Registration - For Admin"
111
  msgstr ""
112
 
113
+ #: includes/admin/class-bnfw-notification.php:167
114
+ #: includes/admin/class-bnfw-notification.php:764
115
  msgid "Lost Password - For User"
116
  msgstr ""
117
 
118
+ #: includes/admin/class-bnfw-notification.php:168
119
  msgid "New User Registration - For User"
120
  msgstr ""
121
 
122
+ #: includes/admin/class-bnfw-notification.php:169
123
  msgid "New User - Welcome Email"
124
  msgstr ""
125
 
126
+ #: includes/admin/class-bnfw-notification.php:170
127
+ #: includes/admin/class-bnfw-notification.php:761
128
+ msgid "Comment Reply"
129
+ msgstr ""
130
+
131
+ #: includes/admin/class-bnfw-notification.php:173
132
+ #: includes/admin/class-bnfw-notification.php:779
133
  msgid "New Post Published"
134
  msgstr ""
135
 
136
+ #: includes/admin/class-bnfw-notification.php:174
137
+ #: includes/admin/class-bnfw-notification.php:782
138
  msgid "Post Updated"
139
  msgstr ""
140
 
141
+ #: includes/admin/class-bnfw-notification.php:175
142
+ #: includes/admin/class-bnfw-notification.php:785
143
  msgid "Post Pending Review"
144
  msgstr ""
145
 
146
+ #: includes/admin/class-bnfw-notification.php:176
147
+ #: includes/admin/class-bnfw-notification.php:788
148
+ msgid "Post Scheduled"
149
+ msgstr ""
150
+
151
+ #: includes/admin/class-bnfw-notification.php:177
152
+ #: includes/admin/class-bnfw-notification.php:791
153
  msgid "New Category"
154
  msgstr ""
155
 
156
+ #: includes/admin/class-bnfw-notification.php:178
157
+ #: includes/admin/class-bnfw-notification.php:794
158
  msgid "New Tag"
159
  msgstr ""
160
 
161
+ #: includes/admin/class-bnfw-notification.php:181
162
+ msgid "New Page Published"
163
+ msgstr ""
164
+
165
+ #: includes/admin/class-bnfw-notification.php:182
166
+ msgid "Page Updated"
167
  msgstr ""
168
 
169
+ #: includes/admin/class-bnfw-notification.php:183
170
+ msgid "Page Pending Review"
171
+ msgstr ""
172
+
173
+ #: includes/admin/class-bnfw-notification.php:184
174
+ msgid "Page Scheduled"
175
+ msgstr ""
176
+
177
+ #: includes/admin/class-bnfw-notification.php:185
178
+ msgid "Page - New Comment"
179
+ msgstr ""
180
+
181
+ #: includes/admin/class-bnfw-notification.php:199
182
+ msgid "Custom Post Type"
183
+ msgstr ""
184
+
185
+ #: includes/admin/class-bnfw-notification.php:200
186
+ #: includes/admin/class-bnfw-notification.php:807
187
  msgid "New "
188
  msgstr ""
189
 
190
+ #: includes/admin/class-bnfw-notification.php:201
191
  msgid "Update "
192
  msgstr ""
193
 
194
+ #: includes/admin/class-bnfw-notification.php:202
195
  msgid "Pending Review"
196
  msgstr ""
197
 
198
+ #: includes/admin/class-bnfw-notification.php:203
199
+ msgid "Scheduled"
200
+ msgstr ""
201
+
202
+ #: includes/admin/class-bnfw-notification.php:204
203
+ #: includes/admin/class-bnfw-notification.php:752
204
+ msgid "New Comment"
205
+ msgstr ""
206
+
207
+ #: includes/admin/class-bnfw-notification.php:218
208
  msgid "Custom Taxonomy"
209
  msgstr ""
210
 
211
+ #: includes/admin/class-bnfw-notification.php:223
212
  msgid "New"
213
  msgstr ""
214
 
215
+ #: includes/admin/class-bnfw-notification.php:239
216
  msgid ""
217
  "This notification doesn't support additional email fields or shortcodes in "
218
  "the subject line"
219
  msgstr ""
220
 
221
+ #: includes/admin/class-bnfw-notification.php:246
222
+ msgid "Email formatting"
223
+ msgstr ""
224
+
225
+ #: includes/admin/class-bnfw-notification.php:251
226
+ msgid "HTML Formatting"
227
+ msgstr ""
228
+
229
+ #: includes/admin/class-bnfw-notification.php:256
230
+ msgid "Plain text"
231
  msgstr ""
232
 
233
+ #: includes/admin/class-bnfw-notification.php:263 includes/tmp.php:3
234
+ msgid "Additional Email Fields"
235
  msgstr ""
236
 
237
+ #: includes/admin/class-bnfw-notification.php:267 includes/tmp.php:7
238
+ msgid "Show additional email fields"
239
  msgstr ""
240
 
241
+ #: includes/admin/class-bnfw-notification.php:273 includes/tmp.php:13
242
+ msgid "From Name and Email"
243
+ msgstr ""
244
+
245
+ #: includes/admin/class-bnfw-notification.php:283 includes/tmp.php:23
246
+ msgid "CC"
247
+ msgstr ""
248
+
249
+ #: includes/admin/class-bnfw-notification.php:295 includes/tmp.php:34
250
+ msgid "BCC"
251
+ msgstr ""
252
+
253
+ #: includes/admin/class-bnfw-notification.php:307
254
+ msgid "Users"
255
+ msgstr ""
256
+
257
+ #: includes/admin/class-bnfw-notification.php:321
258
+ msgid "Disable Notification for the User that triggered it"
259
+ msgstr ""
260
+
261
+ #: includes/admin/class-bnfw-notification.php:328
262
+ #: includes/admin/class-bnfw-notification.php:678
263
  msgid "Subject"
264
  msgstr ""
265
 
266
+ #: includes/admin/class-bnfw-notification.php:337
267
  msgid "Message Body"
268
  msgstr ""
269
 
270
+ #: includes/admin/class-bnfw-notification.php:341
271
+ msgid ""
272
+ "Looking for help with shortcodes? Click here to see which ones you can use "
273
+ "with the selected notification."
274
+ msgstr ""
275
+
276
+ #: includes/admin/class-bnfw-notification.php:477
277
+ msgid "Test Notification Sent."
278
+ msgstr ""
279
+
280
+ #: includes/admin/class-bnfw-notification.php:553
281
  msgid "Notification saved."
282
  msgstr ""
283
 
284
+ #: includes/admin/class-bnfw-notification.php:571
285
+ #: includes/admin/class-bnfw-notification.php:607
286
+ #: includes/admin/class-bnfw-notification.php:608
287
  msgid "Save"
288
  msgstr ""
289
 
290
+ #: includes/admin/class-bnfw-notification.php:581
291
  msgid "Disable Notification"
292
  msgstr ""
293
 
294
+ #: includes/admin/class-bnfw-notification.php:587
295
+ msgid "Send Me a Test Email"
296
+ msgstr ""
297
+
298
+ #: includes/admin/class-bnfw-notification.php:597
299
  msgid "Delete Permanently"
300
  msgstr ""
301
 
302
+ #: includes/admin/class-bnfw-notification.php:599
303
  msgid "Move to Trash"
304
  msgstr ""
305
 
306
+ #: includes/admin/class-bnfw-notification.php:676
307
  msgid "Notification Type"
308
  msgstr ""
309
 
310
+ #: includes/admin/class-bnfw-notification.php:677
311
  msgid "Enabled?"
312
  msgstr ""
313
 
314
+ #: includes/admin/class-bnfw-notification.php:679
315
  msgid "User Roles/Users"
316
  msgstr ""
317
 
318
+ #: includes/admin/class-bnfw-notification.php:770
 
 
 
 
319
  msgid "User Registration - For User"
320
  msgstr ""
321
 
322
+ #: includes/admin/class-bnfw-notification.php:773
323
  msgid "New User - Welcome email"
324
  msgstr ""
325
 
326
+ #: includes/admin/class-bnfw-notification.php:776
327
  msgid "User Registration - For Admin"
328
  msgstr ""
329
 
330
+ #: includes/admin/class-bnfw-notification.php:810
331
  msgid "Updated "
332
  msgstr ""
333
 
334
+ #: includes/admin/class-bnfw-notification.php:813
335
  msgid " Pending Review"
336
  msgstr ""
337
 
338
+ #: includes/admin/class-bnfw-notification.php:816
339
+ msgid " Scheduled"
340
+ msgstr ""
341
+
342
+ #: includes/admin/class-bnfw-notification.php:819
343
+ msgid " Comment"
344
+ msgstr ""
345
+
346
+ #: includes/admin/class-bnfw-notification.php:822
347
+ msgid "New term in "
348
+ msgstr ""
349
+
350
  #: includes/import.php:60
351
  msgid " for "
352
  msgstr ""
379
  msgid "[%s] Your username and password"
380
  msgstr ""
381
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
382
  #. Plugin Name of the plugin/theme
383
  msgid "Better Notifications for WordPress"
384
  msgstr ""