OneSignal – Free Web Push Notifications - Version 2.1.4

Version Description

  • Bug fix: adds check to prevent notifications for non-public post types
Download this release

Release Info

Developer OneSignal
Plugin Icon 128x128 OneSignal – Free Web Push Notifications
Version 2.1.4
Comparing to
See all releases

Code changes from version 2.1.3 to 2.1.4

Files changed (3) hide show
  1. onesignal-admin.php +5 -0
  2. onesignal.php +3 -3
  3. readme.txt +6 -2
onesignal-admin.php CHANGED
@@ -666,6 +666,11 @@ class OneSignal_Admin
666
  $do_send_notification = $non_editor_post_publish_do_send_notification;
667
  }
668
 
 
 
 
 
 
669
  if (has_filter('onesignal_include_post')) {
670
  if (apply_filters('onesignal_include_post', $new_status, $old_status, $post)) {
671
  $do_send_notification = true;
666
  $do_send_notification = $non_editor_post_publish_do_send_notification;
667
  }
668
 
669
+ // Prevent notifying updates for non-public post types.
670
+ if ( ! is_post_type_viewable( $post->post_type ) ) {
671
+ $do_send_notification = false;
672
+ }
673
+
674
  if (has_filter('onesignal_include_post')) {
675
  if (apply_filters('onesignal_include_post', $new_status, $old_status, $post)) {
676
  $do_send_notification = true;
onesignal.php CHANGED
@@ -6,7 +6,7 @@ defined('ABSPATH') or die('This page may not be accessed directly.');
6
  * Plugin Name: OneSignal Push Notifications
7
  * Plugin URI: https://onesignal.com/
8
  * Description: Free web push notifications.
9
- * Version: 2.1.3
10
  * Author: OneSignal
11
  * Author URI: https://onesignal.com
12
  * License: MIT
@@ -30,5 +30,5 @@ if (file_exists(plugin_dir_path(__FILE__).'onesignal-extra.php')) {
30
  require_once plugin_dir_path(__FILE__).'onesignal-extra.php';
31
  }
32
 
33
- add_action('init', array('OneSignal_Admin', 'init'));
34
- add_action('init', array('OneSignal_Public', 'init'));
6
  * Plugin Name: OneSignal Push Notifications
7
  * Plugin URI: https://onesignal.com/
8
  * Description: Free web push notifications.
9
+ * Version: 2.1.4
10
  * Author: OneSignal
11
  * Author URI: https://onesignal.com
12
  * License: MIT
30
  require_once plugin_dir_path(__FILE__).'onesignal-extra.php';
31
  }
32
 
33
+ add_action('init', ['OneSignal_Admin', 'init']);
34
+ add_action('init', ['OneSignal_Public', 'init']);
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://onesignal.com
4
  Tags: push notification, push notifications, desktop notifications, mobile notifications, chrome push, android, android notification, android notifications, android push, desktop notification, firefox, firefox push, mobile, mobile notification, notification, notifications, notify, onesignal, push, push messages, safari, safari push, web push, chrome
5
  Requires at least: 3.8
6
  Tested up to: 5.5
7
- Stable tag: 2.1.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -23,7 +23,7 @@ You can configure notification delivery at preset intervals, create user segment
23
  OneSignal’s free plan allows targeting up to 30,000 subscribers with push notifications. Contact support@onesignal.com if you have any questions. We’d love to hear from you!
24
 
25
  = Company =
26
- OneSignal is trusted by over 1,030,155 developers and marketing strategists. We power push notifications for everyone from early stage startups to Fortune 500 Companies, sending over 6 billion notifications per day. It is the most popular push notification plugin on Wordpress with 100,000+ installations.
27
 
28
  = Features =
29
  * **Supports Chrome** (Desktop & Android), **Safari** (Mac OS X), **Microsoft Edge** (Desktop & Android), **Opera** (Desktop & Android) and **Firefox** (Desktop & Android) on both HTTP and HTTPS sites.
@@ -67,6 +67,10 @@ HTTPS Setup Video: [youtube https://www.youtube.com/watch?v=BeTZ2KgytC0]
67
 
68
  == Changelog ==
69
 
 
 
 
 
70
  = 2.1.3 =
71
 
72
  - Update of "Tested up to" value (WP 5.5)
4
  Tags: push notification, push notifications, desktop notifications, mobile notifications, chrome push, android, android notification, android notifications, android push, desktop notification, firefox, firefox push, mobile, mobile notification, notification, notifications, notify, onesignal, push, push messages, safari, safari push, web push, chrome
5
  Requires at least: 3.8
6
  Tested up to: 5.5
7
+ Stable tag: 2.1.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
23
  OneSignal’s free plan allows targeting up to 30,000 subscribers with push notifications. Contact support@onesignal.com if you have any questions. We’d love to hear from you!
24
 
25
  = Company =
26
+ OneSignal is trusted by over 1,043,856 developers and marketing strategists. We power push notifications for everyone from early stage startups to Fortune 500 Companies, sending over 6 billion notifications per day. It is the most popular push notification plugin on Wordpress with 100,000+ installations.
27
 
28
  = Features =
29
  * **Supports Chrome** (Desktop & Android), **Safari** (Mac OS X), **Microsoft Edge** (Desktop & Android), **Opera** (Desktop & Android) and **Firefox** (Desktop & Android) on both HTTP and HTTPS sites.
67
 
68
  == Changelog ==
69
 
70
+ = 2.1.4 =
71
+
72
+ - Bug fix: adds check to prevent notifications for non-public post types
73
+
74
  = 2.1.3 =
75
 
76
  - Update of "Tested up to" value (WP 5.5)