Version Description
- Added Safari Mac OSX support.
Download this release
Release Info
Developer | OneSignal |
Plugin | OneSignal – Free Web Push Notifications |
Version | 1.1.0 |
Comparing to | |
See all releases |
Code changes from version 1.0.8 to 1.1.0
- onesignal-admin.php +4 -1
- onesignal-public.php +15 -9
- onesignal-settings.php +2 -1
- onesignal.php +1 -1
- readme.txt +10 -7
- views/config.php +20 -1
- views/css/style_onesignal.css +1 -1
- views/images/settings/SafariRequiredSettings.png +0 -0
- views/images/settings/SafariWebId.png +0 -0
onesignal-admin.php
CHANGED
@@ -77,6 +77,9 @@ class OneSignal_Admin {
|
|
77 |
|
78 |
$onesignal_wp_settings['app_rest_api_key'] = $config['app_rest_api_key'];
|
79 |
|
|
|
|
|
|
|
80 |
OneSignal::save_onesignal_settings($onesignal_wp_settings);
|
81 |
|
82 |
return $onesignal_wp_settings;
|
@@ -132,7 +135,7 @@ class OneSignal_Admin {
|
|
132 |
$fields = array(
|
133 |
'app_id' => $onesignal_wp_settings['app_id'],
|
134 |
'included_segments' => array('All'),
|
135 |
-
'
|
136 |
'url' => get_permalink($post->ID),
|
137 |
'contents' => array("en" => $notif_content)
|
138 |
);
|
77 |
|
78 |
$onesignal_wp_settings['app_rest_api_key'] = $config['app_rest_api_key'];
|
79 |
|
80 |
+
$onesignal_wp_settings['safari_web_id'] = $config['safari_web_id'];
|
81 |
+
|
82 |
+
|
83 |
OneSignal::save_onesignal_settings($onesignal_wp_settings);
|
84 |
|
85 |
return $onesignal_wp_settings;
|
135 |
$fields = array(
|
136 |
'app_id' => $onesignal_wp_settings['app_id'],
|
137 |
'included_segments' => array('All'),
|
138 |
+
'isAnyWeb' => true,
|
139 |
'url' => get_permalink($post->ID),
|
140 |
'contents' => array("en" => $notif_content)
|
141 |
);
|
onesignal-public.php
CHANGED
@@ -45,18 +45,24 @@ class OneSignal_Public {
|
|
45 |
echo "OneSignal.setDefaultNotificationUrl(\"" . $onesignal_wp_settings['default_url'] . "\");";
|
46 |
}
|
47 |
else {
|
48 |
-
echo "OneSignal.setDefaultNotificationUrl(\"" . get_site_url() . "\")
|
49 |
}
|
50 |
?>
|
|
|
51 |
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
|
|
|
|
|
|
|
|
|
|
60 |
}
|
61 |
|
62 |
window.addEventListener("load", function(event){
|
45 |
echo "OneSignal.setDefaultNotificationUrl(\"" . $onesignal_wp_settings['default_url'] . "\");";
|
46 |
}
|
47 |
else {
|
48 |
+
echo "OneSignal.setDefaultNotificationUrl(\"" . get_site_url() . "\");\n";
|
49 |
}
|
50 |
?>
|
51 |
+
var oneSignal_options = {appId: "<?php echo $onesignal_wp_settings["app_id"] ?>"};
|
52 |
|
53 |
+
<?php
|
54 |
+
if ($onesignal_wp_settings["subdomain"] != "") {
|
55 |
+
echo "oneSignal_options['subdomainName'] = \"" . $onesignal_wp_settings["subdomain"] . "\";\n";
|
56 |
+
}
|
57 |
+
else {
|
58 |
+
echo "oneSignal_options['path'] = \"" . $current_plugin_url . "sdk_files/\";\n";
|
59 |
+
}
|
60 |
+
if (@$onesignal_wp_settings["safari_web_id"]) {
|
61 |
+
echo "oneSignal_options['safari_web_id'] = \"" . $onesignal_wp_settings["safari_web_id"] . "\";\n";
|
62 |
+
}
|
63 |
+
?>
|
64 |
+
|
65 |
+
OneSignal.init(oneSignal_options);
|
66 |
}
|
67 |
|
68 |
window.addEventListener("load", function(event){
|
onesignal-settings.php
CHANGED
@@ -16,7 +16,8 @@ class OneSignal {
|
|
16 |
'default_title' => "",
|
17 |
'default_icon' => "",
|
18 |
'default_url' => "",
|
19 |
-
'app_rest_api_key' => ""
|
|
|
20 |
);
|
21 |
}
|
22 |
}
|
16 |
'default_title' => "",
|
17 |
'default_icon' => "",
|
18 |
'default_url' => "",
|
19 |
+
'app_rest_api_key' => "",
|
20 |
+
'safari_web_id' => ""
|
21 |
);
|
22 |
}
|
23 |
}
|
onesignal.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: OneSignal Push Notifications
|
4 |
* Plugin URI: https://onesignal.com/
|
5 |
* Description:
|
6 |
-
* Version: 1.0
|
7 |
* Author: OneSignal
|
8 |
* Author URI: https://onesignal.com
|
9 |
* License: MIT
|
3 |
* Plugin Name: OneSignal Push Notifications
|
4 |
* Plugin URI: https://onesignal.com/
|
5 |
* Description:
|
6 |
+
* Version: 1.1.0
|
7 |
* Author: OneSignal
|
8 |
* Author URI: https://onesignal.com
|
9 |
* License: MIT
|
readme.txt
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
=== OneSignal - Free Web Push Notifications ===
|
2 |
Contributors: OneSignal
|
3 |
Donate link: https://onesignal.com
|
4 |
-
Tags: chrome, push, push notifications, safari, chrome push, safari push, notifications, web push, notification, notify, mavericks, firefox push, android, android push, android notifications, mobile notifications, mobile, desktop notifications, gcm, push messages, onesignal
|
5 |
Requires at least: 3.8
|
6 |
-
Tested up to: 4.3
|
7 |
-
Stable tag: 1.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
11 |
-
Increase engagement and drive more repeat traffic to your WordPress site with
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
-
[OneSignal](https://onesignal.com) is a complete push notification solution for WordPress blogs and sites, trusted by over
|
16 |
|
17 |
After just a few seconds of set-up, your visitors will be able to opt-in to receive desktop push notifications when you publish a new post. OneSignal makes use of a brand new Google Chrome feature to send desktop notifications to your visitors even after they’ve left your website.
|
18 |
|
@@ -22,7 +22,7 @@ Best of all, WordPress users that use OneSignal will get a FREE lifetime account
|
|
22 |
|
23 |
Features:
|
24 |
|
25 |
-
* Supports Chrome Push on both HTTP and HTTPS sites.
|
26 |
|
27 |
* **Automatic Notifications** - Send notifications to followers every time you publish a new post. Or set up a reminder that gets automatically sent to them if they haven’t visited for a few days.
|
28 |
|
@@ -45,8 +45,11 @@ Features:
|
|
45 |
3. Follow the instructions on the new OneSignal Wordpress menu option to get started.
|
46 |
|
47 |
== Changelog ==
|
|
|
|
|
|
|
48 |
= 1.0.8 =
|
49 |
-
- UTF-8 characters in post's
|
50 |
- Fixed bug where manifest.json was not being created for HTTPS sites due to permissions.
|
51 |
- Now adapts to use HTTPS for service worker files if the WordPress settings are not correct.
|
52 |
|
1 |
=== OneSignal - Free Web Push Notifications ===
|
2 |
Contributors: OneSignal
|
3 |
Donate link: https://onesignal.com
|
4 |
+
Tags: chrome, safari, push, push notifications, safari, chrome push, safari push, notifications, web push, notification, notify, mavericks, firefox push, android, android push, android notifications, mobile notifications, mobile, desktop notifications, gcm, push messages, onesignal
|
5 |
Requires at least: 3.8
|
6 |
+
Tested up to: 4.3.1
|
7 |
+
Stable tag: 1.1.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
11 |
+
Increase engagement and drive more repeat traffic to your WordPress site with push notifications. Supports Chrome and Safari.
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
+
[OneSignal](https://onesignal.com) is a complete push notification solution for WordPress blogs and sites, trusted by over 6000 developers and marketers including some of the largest brands and websites in the world.
|
16 |
|
17 |
After just a few seconds of set-up, your visitors will be able to opt-in to receive desktop push notifications when you publish a new post. OneSignal makes use of a brand new Google Chrome feature to send desktop notifications to your visitors even after they’ve left your website.
|
18 |
|
22 |
|
23 |
Features:
|
24 |
|
25 |
+
* Supports Chrome(Desktop & Android) and Safari(Mac OSX) Push on both HTTP and HTTPS sites.
|
26 |
|
27 |
* **Automatic Notifications** - Send notifications to followers every time you publish a new post. Or set up a reminder that gets automatically sent to them if they haven’t visited for a few days.
|
28 |
|
45 |
3. Follow the instructions on the new OneSignal Wordpress menu option to get started.
|
46 |
|
47 |
== Changelog ==
|
48 |
+
= 1.1.0 =
|
49 |
+
- Added Safari Mac OSX support.
|
50 |
+
|
51 |
= 1.0.8 =
|
52 |
+
- UTF-8 characters in post's titles now display correctly in notifications.
|
53 |
- Fixed bug where manifest.json was not being created for HTTPS sites due to permissions.
|
54 |
- Now adapts to use HTTPS for service worker files if the WordPress settings are not correct.
|
55 |
|
views/config.php
CHANGED
@@ -112,6 +112,14 @@ if (array_key_exists('app_id', $_POST)) {
|
|
112 |
<p><strong>6.2:</strong> Test your subcribe link by clicking on the link, button, or widget.</p>
|
113 |
</li>
|
114 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
<br><br>
|
116 |
<div class="alert alert-info" role="alert">
|
117 |
<h4> Subdomain </h4>
|
@@ -224,6 +232,17 @@ if (array_key_exists('app_id', $_POST)) {
|
|
224 |
<input name="subdomain" type="text" value="<?php echo $onesignal_wp_settings['subdomain'] ?>"></input>
|
225 |
</div>
|
226 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
227 |
|
228 |
|
229 |
<div class="row">
|
@@ -271,7 +290,7 @@ if (array_key_exists('app_id', $_POST)) {
|
|
271 |
<div class="col-md-3">
|
272 |
</div>
|
273 |
<div class="col-md-9">
|
274 |
-
<input type="checkbox" name="notification_on_post_from_plugin" value="true" <?php if (
|
275 |
<p> All Posts created from other plugins. </p>
|
276 |
</div>
|
277 |
</div>
|
112 |
<p><strong>6.2:</strong> Test your subcribe link by clicking on the link, button, or widget.</p>
|
113 |
</li>
|
114 |
|
115 |
+
<li>
|
116 |
+
<h4 class="steps"> STEP 7: Add Safari Desktop support</h4>
|
117 |
+
<p> <strong> 7.1:</strong> On the OneSignal Dashboard go to "App Settings" > Safari. Fill out "Site Name" and "Site Domain". Highly recommend you upload your own icons otherwise it will default to OneSignal icons. You can skip the .p12 and password if you don't have one. </p>
|
118 |
+
<img src="<?php echo ONESIGNAL_PLUGIN_URL."views/images/settings/SafariRequiredSettings.png"?>" style="width: 80%">
|
119 |
+
<p> <strong> 7.2:</strong> Press save and copy the generated WebID shown. Enter this in the 'Safari WebID' field under the "Account Settings" tab in Wordpress. </p>
|
120 |
+
<img src="<?php echo ONESIGNAL_PLUGIN_URL."views/images/settings/SafariWebId.png"?>" style="width: 80%">
|
121 |
+
</li>
|
122 |
+
|
123 |
<br><br>
|
124 |
<div class="alert alert-info" role="alert">
|
125 |
<h4> Subdomain </h4>
|
232 |
<input name="subdomain" type="text" value="<?php echo $onesignal_wp_settings['subdomain'] ?>"></input>
|
233 |
</div>
|
234 |
</div>
|
235 |
+
|
236 |
+
<!-- Safari Web ID -->
|
237 |
+
<div class="row topic">
|
238 |
+
<div class="col-md-4">
|
239 |
+
<label>Safari WebID</label>
|
240 |
+
<p> <span style="font-style: italic"> (OneSignal dashboard - "App Settings" > Safari) </span></p>
|
241 |
+
</div>
|
242 |
+
<div class="col-md-8">
|
243 |
+
<input name="safari_web_id" type="text" value="<?php echo @$onesignal_wp_settings['safari_web_id']; ?>"></input>
|
244 |
+
</div>
|
245 |
+
</div>
|
246 |
|
247 |
|
248 |
<div class="row">
|
290 |
<div class="col-md-3">
|
291 |
</div>
|
292 |
<div class="col-md-9">
|
293 |
+
<input type="checkbox" name="notification_on_post_from_plugin" value="true" <?php if (@$onesignal_wp_settings['notification_on_post_from_plugin']) { echo "checked"; } ?>></input>
|
294 |
<p> All Posts created from other plugins. </p>
|
295 |
</div>
|
296 |
</div>
|
views/css/style_onesignal.css
CHANGED
@@ -95,7 +95,7 @@ input[type="text"] {
|
|
95 |
-moz-border-radius: 3px;
|
96 |
border-radius: 3px;
|
97 |
min-width: 300px;
|
98 |
-
width:
|
99 |
padding: 5px 15px;
|
100 |
font-size: 1.2em;
|
101 |
}
|
95 |
-moz-border-radius: 3px;
|
96 |
border-radius: 3px;
|
97 |
min-width: 300px;
|
98 |
+
width: 95%;
|
99 |
padding: 5px 15px;
|
100 |
font-size: 1.2em;
|
101 |
}
|
views/images/settings/SafariRequiredSettings.png
ADDED
Binary file
|
views/images/settings/SafariWebId.png
ADDED
Binary file
|