Version Description
- Update tested up to version to WP 5.8
Download this release
Release Info
Developer | OneSignal |
Plugin | OneSignal – Free Web Push Notifications |
Version | 2.2.2 |
Comparing to | |
See all releases |
Code changes from version 2.2.1 to 2.2.2
- onesignal-public.php +12 -7
- onesignal.php +1 -1
- readme.txt +7 -3
onesignal-public.php
CHANGED
@@ -39,6 +39,16 @@ class OneSignal_Public
|
|
39 |
return false;
|
40 |
}
|
41 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
public static function onesignal_header()
|
43 |
{
|
44 |
$onesignal_wp_settings = OneSignal::get_onesignal_settings();
|
@@ -68,15 +78,10 @@ class OneSignal_Public
|
|
68 |
OneSignal.push( function() {
|
69 |
<?php
|
70 |
if(array_key_exists('onesignal_sw_js', $onesignal_wp_settings)) {
|
71 |
-
|
72 |
-
* strstr method will remove the unecessary path before /wp-content
|
73 |
-
* Ex. It will give you a string like this:
|
74 |
-
* /wp-content/plugins/onesignal-free-web-push-notifications/
|
75 |
-
*/
|
76 |
-
$path = strstr(plugin_dir_url(__FILE__), '/wp-content');
|
77 |
echo "OneSignal.SERVICE_WORKER_UPDATER_PATH = 'OneSignalSDKUpdaterWorker.js';
|
78 |
OneSignal.SERVICE_WORKER_PATH = 'OneSignalSDKWorker.js';
|
79 |
-
OneSignal.SERVICE_WORKER_PARAM = { scope: '$
|
80 |
} else {
|
81 |
echo 'OneSignal.SERVICE_WORKER_UPDATER_PATH = "OneSignalSDKUpdaterWorker.js.php";
|
82 |
OneSignal.SERVICE_WORKER_PATH = "OneSignalSDKWorker.js.php";
|
39 |
return false;
|
40 |
}
|
41 |
|
42 |
+
// Returns the OneSignal plugin URL path
|
43 |
+
// Examples:
|
44 |
+
// /wp-content/plugins/onesignal-free-web-push-notifications
|
45 |
+
// /app/plugins/onesignal-free-web-push-notifications
|
46 |
+
private static function getOneSignalPluginPath()
|
47 |
+
{
|
48 |
+
$path = parse_url(ONESIGNAL_PLUGIN_URL)['path'];
|
49 |
+
return rtrim($path, '/');
|
50 |
+
}
|
51 |
+
|
52 |
public static function onesignal_header()
|
53 |
{
|
54 |
$onesignal_wp_settings = OneSignal::get_onesignal_settings();
|
78 |
OneSignal.push( function() {
|
79 |
<?php
|
80 |
if(array_key_exists('onesignal_sw_js', $onesignal_wp_settings)) {
|
81 |
+
$swScope = self::getOneSignalPluginPath() . '/sdk_files/push/onesignal/';
|
|
|
|
|
|
|
|
|
|
|
82 |
echo "OneSignal.SERVICE_WORKER_UPDATER_PATH = 'OneSignalSDKUpdaterWorker.js';
|
83 |
OneSignal.SERVICE_WORKER_PATH = 'OneSignalSDKWorker.js';
|
84 |
+
OneSignal.SERVICE_WORKER_PARAM = { scope: '$swScope' };";
|
85 |
} else {
|
86 |
echo 'OneSignal.SERVICE_WORKER_UPDATER_PATH = "OneSignalSDKUpdaterWorker.js.php";
|
87 |
OneSignal.SERVICE_WORKER_PATH = "OneSignalSDKWorker.js.php";
|
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.2.
|
10 |
* Author: OneSignal
|
11 |
* Author URI: https://onesignal.com
|
12 |
* License: MIT
|
6 |
* Plugin Name: OneSignal Push Notifications
|
7 |
* Plugin URI: https://onesignal.com/
|
8 |
* Description: Free web push notifications.
|
9 |
+
* Version: 2.2.2
|
10 |
* Author: OneSignal
|
11 |
* Author URI: https://onesignal.com
|
12 |
* License: MIT
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: OneSignal
|
|
3 |
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.
|
7 |
-
Stable tag: 2.2.
|
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 10,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,
|
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.2.1 =
|
71 |
|
72 |
- Fixes error for missing OneSignalSDKWorker.js file
|
3 |
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.8
|
7 |
+
Stable tag: 2.2.2
|
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 10,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,300,000 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.2.2 =
|
71 |
+
|
72 |
+
- Update tested up to version to WP 5.8
|
73 |
+
|
74 |
= 2.2.1 =
|
75 |
|
76 |
- Fixes error for missing OneSignalSDKWorker.js file
|