Better Notifications for WordPress - Version 1.1.5.1

Version Description

  • Fix for Custom Post Type notifications not populating shortcodes.
  • Fix for Custom Taxonomy terms not sending out notification emails.
Download this release

Release Info

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

Code changes from version 1.1.5 to 1.1.5.1

README.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: voltronik
3
  Tags: notifications, email, alerts, roles, users, HTML
4
  Requires at least: 3.5
5
  Tested up to: 4.1.1
6
- Stable tag: 1.1.5
7
  License: GPLv2 or later
8
 
9
  Send customisable HTML emails to your users for different WordPress notifications.
@@ -147,6 +147,10 @@ It might do but this is untested.
147
 
148
  == Changelog ==
149
 
 
 
 
 
150
  = 1.1.5 =
151
  * New Shortcode: [permalink].
152
  * New Notifications: 'Scheduled Posts' and 'Scheduled Pages'.
3
  Tags: notifications, email, alerts, roles, users, HTML
4
  Requires at least: 3.5
5
  Tested up to: 4.1.1
6
+ Stable tag: 1.1.5.1
7
  License: GPLv2 or later
8
 
9
  Send customisable HTML emails to your users for different WordPress notifications.
147
 
148
  == Changelog ==
149
 
150
+ = 1.1.5.1 =
151
+ * Fix for Custom Post Type notifications not populating shortcodes.
152
+ * Fix for Custom Taxonomy terms not sending out notification emails.
153
+
154
  = 1.1.5 =
155
  * New Shortcode: [permalink].
156
  * New Notifications: 'Scheduled Posts' and 'Scheduled Pages'.
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.1.5
7
  * Author: Voltronik
8
  * Author URI: http://www.voltronik.co.uk/
9
  * Author Email: plugins@voltronik.co.uk
@@ -96,7 +96,7 @@ class BNFW {
96
  add_action( 'draft_to_publish' , array( $this, 'publish_post' ) );
97
  add_action( 'publish_to_publish' , array( $this, 'update_post' ) );
98
 
99
- $post_types = get_post_types( array( '_builtin' => true ), 'names' );
100
  $post_types = array_diff( $post_types, array( BNFW_Notification::POST_TYPE ) );
101
 
102
  foreach ( $post_types as $post_type ) {
@@ -161,7 +161,7 @@ class BNFW {
161
  * @param string $taxonomy
162
  */
163
  public function create_term( $term_id, $tt_id, $taxonomy ) {
164
- $this->send_notification( 'new-' . $taxonomy, $term_id );
165
  }
166
 
167
  /**
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.1.5.1
7
  * Author: Voltronik
8
  * Author URI: http://www.voltronik.co.uk/
9
  * Author Email: plugins@voltronik.co.uk
96
  add_action( 'draft_to_publish' , array( $this, 'publish_post' ) );
97
  add_action( 'publish_to_publish' , array( $this, 'update_post' ) );
98
 
99
+ $post_types = get_post_types( array( 'public' => true ), 'names' );
100
  $post_types = array_diff( $post_types, array( BNFW_Notification::POST_TYPE ) );
101
 
102
  foreach ( $post_types as $post_type ) {
161
  * @param string $taxonomy
162
  */
163
  public function create_term( $term_id, $tt_id, $taxonomy ) {
164
+ $this->send_notification( 'newterm-' . $taxonomy, $term_id );
165
  }
166
 
167
  /**
includes/admin/class-bnfw-notification.php CHANGED
@@ -184,6 +184,7 @@ class BNFW_Notification {
184
  </optgroup>
185
  <?php
186
  $types = get_post_types( array(
 
187
  '_builtin' => false,
188
  ), 'names'
189
  );
@@ -211,14 +212,18 @@ class BNFW_Notification {
211
  );
212
 
213
  if ( count( $taxs > 0 ) ) {
 
 
 
214
  foreach ( $taxs as $tax ) {
215
  $tax_name = 'newterm-' . $tax->name;
216
  ?>
217
- <optgroup label="<?php _e( 'Custom Taxonomy', 'bnfw' );?>">
218
  <option value="<?php echo $tax_name; ?>" <?php selected( $tax_name, $setting['notification'] );?>><?php printf( '%s %s', __( 'New', 'bnfw' ), $tax->labels->name ); ?></option>
219
- </optgroup>
220
  <?php
221
  }
 
 
 
222
  }
223
  ?>
224
  </select>
184
  </optgroup>
185
  <?php
186
  $types = get_post_types( array(
187
+ 'public' => true,
188
  '_builtin' => false,
189
  ), 'names'
190
  );
212
  );
213
 
214
  if ( count( $taxs > 0 ) ) {
215
+ ?>
216
+ <optgroup label="<?php _e( 'Custom Taxonomy', 'bnfw' );?>">
217
+ <?php
218
  foreach ( $taxs as $tax ) {
219
  $tax_name = 'newterm-' . $tax->name;
220
  ?>
 
221
  <option value="<?php echo $tax_name; ?>" <?php selected( $tax_name, $setting['notification'] );?>><?php printf( '%s %s', __( 'New', 'bnfw' ), $tax->labels->name ); ?></option>
 
222
  <?php
223
  }
224
+ ?>
225
+ </optgroup>
226
+ <?php
227
  }
228
  ?>
229
  </select>
includes/engine/class-bnfw-engine.php CHANGED
@@ -111,7 +111,7 @@ class BNFW_Engine {
111
 
112
  } else if ( 'new' == $type[0] || 'update' == $type[0] || 'pending' == $type[0] || 'future' == $type[0] ) {
113
  // handle new, update and pending posts
114
- $post_types = get_post_types( array( '_builtin' => true ), 'names' );
115
  $post_types = array_diff( $post_types, array( BNFW_Notification::POST_TYPE ) );
116
 
117
  if ( in_array( $type[1], $post_types ) ) {
111
 
112
  } else if ( 'new' == $type[0] || 'update' == $type[0] || 'pending' == $type[0] || 'future' == $type[0] ) {
113
  // handle new, update and pending posts
114
+ $post_types = get_post_types( array( 'public' => true ), 'names' );
115
  $post_types = array_diff( $post_types, array( BNFW_Notification::POST_TYPE ) );
116
 
117
  if ( in_array( $type[1], $post_types ) ) {