Better Notifications for WordPress - Version 1.8.1

Version Description

  • 21st April 2020 =
  • Added: Core changes to allow the Global Override add-on to only send out notifications once.
  • Fixed: A range of issues relating to the Global Override add-on.
Download this release

Release Info

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

Code changes from version 1.8 to 1.8.1

README.txt CHANGED
@@ -5,7 +5,7 @@ Tags: notification, email, push, sms, alert, HTML, customize, bulk, trigger, CC,
5
  Requires at least: 4.0
6
  Tested up to: 5.4
7
  Requires PHP: 5.6
8
- Stable tag: 1.8
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -234,6 +234,10 @@ Yes, of course! The plugin is completely translation-friendly and if you send me
234
 
235
  == Changelog ==
236
 
 
 
 
 
237
  = 1.8 - 8th April 2020 =
238
  * POTENTIAL BREAKING CHANGES - Please edit and re-save each comment notification you have set-up to ensure that the correct notification is selected and saved.
239
  * New: A huge overhaul of the comment notifications which now gives a great comment management workflow.
5
  Requires at least: 4.0
6
  Tested up to: 5.4
7
  Requires PHP: 5.6
8
+ Stable tag: 1.8.1
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
234
 
235
  == Changelog ==
236
 
237
+ = 1.8.1 - 21st April 2020 =
238
+ * Added: Core changes to allow the [Global Override add-on](https://betternotificationsforwp.com/downloads/per-post-override/) to only send out notifications once.
239
+ * Fixed: A range of issues relating to the [Global Override add-on](https://betternotificationsforwp.com/downloads/per-post-override/).
240
+
241
  = 1.8 - 8th April 2020 =
242
  * POTENTIAL BREAKING CHANGES - Please edit and re-save each comment notification you have set-up to ensure that the correct notification is selected and saved.
243
  * New: A huge overhaul of the comment notifications which now gives a great comment management workflow.
bnfw.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Better Notifications for WP
4
  * Plugin URI: https://wordpress.org/plugins/bnfw/
5
  * Description: Supercharge your WordPress notifications using a WYSIWYG editor and shortcodes. Default and new notifications available. Add more power with Add-ons.
6
- * Version: 1.8
7
  * Author: Made with Fuel
8
  * Author URI: https://betternotificationsforwp.com/
9
  * Author Email: hello@betternotificationsforwp.com
3
  * Plugin Name: Better Notifications for WP
4
  * Plugin URI: https://wordpress.org/plugins/bnfw/
5
  * Description: Supercharge your WordPress notifications using a WYSIWYG editor and shortcodes. Default and new notifications available. Add more power with Add-ons.
6
+ * Version: 1.8.1
7
  * Author: Made with Fuel
8
  * Author URI: https://betternotificationsforwp.com/
9
  * Author Email: hello@betternotificationsforwp.com
includes/engine/class-bnfw-engine.php CHANGED
@@ -1067,16 +1067,15 @@ class BNFW_Engine {
1067
  }
1068
  }
1069
 
1070
- $to_emails = array();
1071
 
1072
  if ( ! empty( $setting['users'] ) ) {
1073
- $to_emails = $this->get_emails_from_users( $setting['users'], $exclude, $id, $setting );
1074
  }
1075
 
1076
  /**
1077
  * BNFW get to emails.
1078
  */
1079
- $emails['to'] = apply_filters( 'bnfw_to_emails', $to_emails, $setting, $id );
1080
 
1081
  if ( $process_post_authors && 'true' === $setting['only-post-author'] ) {
1082
  $post_id = $id;
@@ -1150,6 +1149,7 @@ class BNFW_Engine {
1150
  $emails['bcc'] = array_diff( $emails['bcc'], $excluded_emails );
1151
  }
1152
  }
 
1153
 
1154
  return $emails;
1155
  }
1067
  }
1068
  }
1069
 
1070
+ $emails['to'] = array();
1071
 
1072
  if ( ! empty( $setting['users'] ) ) {
1073
+ $emails['to'] = $this->get_emails_from_users( $setting['users'], $exclude, $id, $setting );
1074
  }
1075
 
1076
  /**
1077
  * BNFW get to emails.
1078
  */
 
1079
 
1080
  if ( $process_post_authors && 'true' === $setting['only-post-author'] ) {
1081
  $post_id = $id;
1149
  $emails['bcc'] = array_diff( $emails['bcc'], $excluded_emails );
1150
  }
1151
  }
1152
+ $emails['to'] = apply_filters( 'bnfw_to_emails', $emails['to'], $setting, $id );
1153
 
1154
  return $emails;
1155
  }
includes/notification/post-notification.php CHANGED
@@ -20,11 +20,12 @@ function bnfw_post_notifications( $notifications, $post_type ) {
20
  $notifications[] = 'pending-' . $post_type;
21
  $notifications[] = 'future-' . $post_type;
22
  $notifications[] = 'comment-' . $post_type;
23
- $notifications[] = 'moderate-' . $post_type . '-comment';
 
24
  $notifications[] = 'new-comment';
25
  $notifications[] = 'new-trackback';
26
  $notifications[] = 'new-pingback';
27
-
28
  return $notifications;
29
  }
30
  add_filter( 'bnfw_post_notifications', 'bnfw_post_notifications', 10, 2 );
20
  $notifications[] = 'pending-' . $post_type;
21
  $notifications[] = 'future-' . $post_type;
22
  $notifications[] = 'comment-' . $post_type;
23
+ $notifications[] = 'moderate-' . $post_type . '-comment';
24
+ if($post_type == 'post'){
25
  $notifications[] = 'new-comment';
26
  $notifications[] = 'new-trackback';
27
  $notifications[] = 'new-pingback';
28
+ }
29
  return $notifications;
30
  }
31
  add_filter( 'bnfw_post_notifications', 'bnfw_post_notifications', 10, 2 );