Better Notifications for WordPress - Version 1.6.8

Version Description

  • 23rd November 2017
Download this release

Release Info

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

Code changes from version 1.6.7 to 1.6.8

README.txt CHANGED
@@ -3,8 +3,9 @@ Contributors: voltronik
3
  Donate link: https://betternotificationsforwp.com/donate/
4
  Tags: notification, email, push, sms, alert, HTML, customize, bulk, trigger, CC, BCC
5
  Requires at least: 3.5
6
- Tested up to: 4.8.1
7
- Stable tag: 1.6.7
 
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -109,7 +110,7 @@ If you'd like to see a notification in the list above, please drop me a line in
109
  1. Upload the 'bnfw' plugin folder to the '/wp-content/plugins/' directory or install it via your WordPress Admin.
110
  2. Activate the plugin through the 'Plugins' menu in WordPress.
111
  3. Use the settings in the new 'Notifications' Menu item in the sidebar to configure the plugin.
112
- 4. (Optional) Install a plugin to use SMTP instead of `wp_mail()`. I recommend [Postman SMTP Mailer/Email Log](https://wordpress.org/plugins/postman-smtp/).
113
  5. Test by creating a notification with some [shortcodes](https://betternotificationsforwp.com/shortcodes/ "Shortcodes for use in Better Notifications for WordPress").
114
 
115
 
@@ -201,13 +202,19 @@ An older version might work but this is untested. A lot of the newer features re
201
 
202
  == Changelog ==
203
 
 
 
 
 
 
 
204
  = 1.6.7 - 10th August 2017 =
205
  * New: Shortcode - `[current_time]` Will output the current time as per the settings in WordPress > Settings.
206
  * New: Shortcode - `[current_date]` Will output the current date as per the settings in WordPress > Settings.
207
  * New: Shortcode - `[admin_email]` Adds the email address of the main site admin as per the settings in WordPress > Settings.
208
  * Fixed: BNFW now respects the post status of posts submitted via ACF's front-end forms (acf_form).
209
  * Fixed: Privately Published posts that are updated now trigger the 'Post Updated' notification.
210
- Changed: The opt-in for plugin tracking in BNFW has changed. You may be asked to opt-in / opt-out when updating the plugin.
211
 
212
  = 1.6.6 - 28th June 2017 =
213
  * Fixed: New Comments on Custom Post Types weren't always sending notifications.
3
  Donate link: https://betternotificationsforwp.com/donate/
4
  Tags: notification, email, push, sms, alert, HTML, customize, bulk, trigger, CC, BCC
5
  Requires at least: 3.5
6
+ Tested up to: 4.9.1
7
+ Requires PHP: 5.6
8
+ Stable tag: 1.6.8
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
110
  1. Upload the 'bnfw' plugin folder to the '/wp-content/plugins/' directory or install it via your WordPress Admin.
111
  2. Activate the plugin through the 'Plugins' menu in WordPress.
112
  3. Use the settings in the new 'Notifications' Menu item in the sidebar to configure the plugin.
113
+ 4. (Optional) Install a plugin to use SMTP instead of `wp_mail()`. I recommend [Post SMTP Mailer/Email Log](https://wordpress.org/plugins/post-smtp/).
114
  5. Test by creating a notification with some [shortcodes](https://betternotificationsforwp.com/shortcodes/ "Shortcodes for use in Better Notifications for WordPress").
115
 
116
 
202
 
203
  == Changelog ==
204
 
205
+ = 1.6.8 - 23rd November 2017 =
206
+ * New: All shortcodes that are correctly registered within WordPress will now be stripped from the `[post_excerpt]` and `[post_content]` shortcodes so as to not cause layout or styling issues within your notifications.
207
+ * Added: A minimum PHP version of 5.6 is now required to run BNFW.
208
+ * Fixed: Compatibility with the [Reminders](https://betternotificationsforwp.com/downloads/update-reminder/) and [Conditional Notifications](https://betternotificationsforwp.com/downloads/conditional-notifications/) add-ons.
209
+ * Reminder: You may be asked to opt into plugin tracking when updating. Please consider doing so as it really helps with the development of the plugin. Full details on what is tracked is available on [this page](https://betternotificationsforwp.com/documentation/settings/what-information-will-be-tracked-by-opting-into-usage-tracking/).
210
+
211
  = 1.6.7 - 10th August 2017 =
212
  * New: Shortcode - `[current_time]` Will output the current time as per the settings in WordPress > Settings.
213
  * New: Shortcode - `[current_date]` Will output the current date as per the settings in WordPress > Settings.
214
  * New: Shortcode - `[admin_email]` Adds the email address of the main site admin as per the settings in WordPress > Settings.
215
  * Fixed: BNFW now respects the post status of posts submitted via ACF's front-end forms (acf_form).
216
  * Fixed: Privately Published posts that are updated now trigger the 'Post Updated' notification.
217
+ * Changed: The opt-in for plugin tracking in BNFW has changed. You may be asked to opt-in / opt-out when updating the plugin.
218
 
219
  = 1.6.6 - 28th June 2017 =
220
  * Fixed: New Comments on Custom Post Types weren't always sending notifications.
assets/js/bnfw.js CHANGED
@@ -192,6 +192,10 @@ jQuery(document).ready(function($) {
192
  case 'updatereminder':
193
  notification_slug = 'updatereminder-post';
194
  break;
 
 
 
 
195
  }
196
 
197
  break;
192
  case 'updatereminder':
193
  notification_slug = 'updatereminder-post';
194
  break;
195
+
196
+ default:
197
+ notification_slug = notification;
198
+ break;
199
  }
200
 
201
  break;
bnfw.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Better Notifications for WordPress
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.6.7
7
  * Author: Made with Fuel
8
  * Author URI: https://betternotificationsforwp.com/
9
  * Author Email: hello@betternotificationsforwp.com
3
  * Plugin Name: Better Notifications for WordPress
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.6.8
7
  * Author: Made with Fuel
8
  * Author URI: https://betternotificationsforwp.com/
9
  * Author Email: hello@betternotificationsforwp.com
includes/engine/class-bnfw-engine.php CHANGED
@@ -485,10 +485,11 @@ class BNFW_Engine {
485
  * @param int $post_id
486
  * @return string
487
  */
488
- public function post_shortcodes( $message, $post_id ) {
489
  $post = get_post( $post_id );
490
 
491
- $post_content = apply_filters( 'the_content', $post->post_content );
 
492
  $post_content = str_replace( ']]>', ']]>', $post_content );
493
 
494
  $message = str_replace( '[ID]', $post->ID, $message );
@@ -496,7 +497,7 @@ class BNFW_Engine {
496
  $message = str_replace( '[post_date_gmt]', $post->post_date_gmt, $message );
497
  $message = str_replace( '[post_content]', $post_content, $message );
498
  $message = str_replace( '[post_title]', $post->post_title, $message );
499
- $message = str_replace( '[post_excerpt]', ( $post->post_excerpt ? $post->post_excerpt : wp_trim_words( $post_content ) ), $message );
500
  $message = str_replace( '[post_status]', $post->post_status, $message );
501
  $message = str_replace( '[comment_status]', $post->comment_status, $message );
502
  $message = str_replace( '[ping_status]', $post->ping_status, $message );
485
  * @param int $post_id
486
  * @return string
487
  */
488
+ public function post_shortcodes( $message, $post_id ) {
489
  $post = get_post( $post_id );
490
 
491
+ $post_content = strip_shortcodes( $post->post_content );
492
+ $post_content = apply_filters( 'the_content', $post_content );
493
  $post_content = str_replace( ']]>', ']]>', $post_content );
494
 
495
  $message = str_replace( '[ID]', $post->ID, $message );
497
  $message = str_replace( '[post_date_gmt]', $post->post_date_gmt, $message );
498
  $message = str_replace( '[post_content]', $post_content, $message );
499
  $message = str_replace( '[post_title]', $post->post_title, $message );
500
+ $message = str_replace( '[post_excerpt]', ( strip_shortcodes( $post->post_excerpt ? $post->post_excerpt : wp_trim_words( $post_content ) ) ), $message );
501
  $message = str_replace( '[post_status]', $post->post_status, $message );
502
  $message = str_replace( '[comment_status]', $post->comment_status, $message );
503
  $message = str_replace( '[ping_status]', $post->ping_status, $message );