OneSignal – Free Web Push Notifications - Version 1.0.4

Version Description

  • Notifications sent with the Automatic Push Notifications on Post feature directly link to the post instead of the homepage when opening the notification.
  • Updated GCM instructions and added HTTP subscribe link/widget instructions on the Getting Started tab.
Download this release

Release Info

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

Code changes from version 1.0.3 to 1.0.4

images/SampleNotification.png DELETED
Binary file
onesignal-admin.php CHANGED
@@ -160,6 +160,7 @@ class OneSignal_Admin {
160
  'app_id' => $onesignal_wp_settings['app_id'],
161
  'included_segments' => array('All'),
162
  'isChromeWeb' => true,
 
163
  'contents' => array("en" => $notif_content)
164
  );
165
 
160
  'app_id' => $onesignal_wp_settings['app_id'],
161
  'included_segments' => array('All'),
162
  'isChromeWeb' => true,
163
+ 'url' => get_permalink(),
164
  'contents' => array("en" => $notif_content)
165
  );
166
 
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.3
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.0.4
7
  * Author: OneSignal
8
  * Author URI: https://onesignal.com
9
  * License: MIT
readme.txt CHANGED
@@ -3,8 +3,8 @@ 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.2.1
7
- Stable tag: 1.0.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -12,13 +12,13 @@ Increase engagement and drive more repeat traffic to your WordPress site with de
12
 
13
  == Description ==
14
 
15
- [OneSignal](https://onesignal.com) is a complete push notification solution for WordPress blogs and sites, trusted by over 2400 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
 
19
  OneSignal makes it easy to configure when to send notifications, target notifications to specific users, and to customize the Opt-In process for your visitors.
20
 
21
- Best of all, for a limited time, all WordPress users that use OneSignal will get a FREE lifetime account.
22
 
23
  Features:
24
 
@@ -46,14 +46,18 @@ Features:
46
 
47
  == Changelog ==
48
 
 
 
 
 
49
  = 1.0.3 =
50
- Fixed compatibility issue with PHP versions older than 5.3.0
51
- For HTTPS sites a modal dialog is shown before the native Chrome Notification permission prompt.
52
 
53
  = 1.0.2 =
54
- Fixed bug with OneSignal not getting initialized in some cases.
55
- Now omits extra unneeded manifest link from the head tag when using HTTP.
56
- Clicks handler added to elements with the class OneSignal-prompt are now setup in a more compatible way.
57
 
58
  = 1.0.1 =
59
  Modified description
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.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
12
 
13
  == Description ==
14
 
15
+ [OneSignal](https://onesignal.com) is a complete push notification solution for WordPress blogs and sites, trusted by over 5000 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
 
19
  OneSignal makes it easy to configure when to send notifications, target notifications to specific users, and to customize the Opt-In process for your visitors.
20
 
21
+ Best of all, WordPress users that use OneSignal will get a FREE lifetime account.
22
 
23
  Features:
24
 
46
 
47
  == Changelog ==
48
 
49
+ = 1.0.4 =
50
+ - Notifications sent with the Automatic Push Notifications on Post feature directly link to the post instead of the homepage when opening the notification.
51
+ - Updated GCM instructions and added HTTP subscribe link/widget instructions on the Getting Started tab.
52
+
53
  = 1.0.3 =
54
+ - Fixed compatibility issue with PHP versions older than 5.3.0
55
+ - For HTTPS sites a modal dialog is shown before the native Chrome Notification permission prompt.
56
 
57
  = 1.0.2 =
58
+ - Fixed bug with OneSignal not getting initialized in some cases.
59
+ - Now omits extra unneeded manifest link from the head tag when using HTTP.
60
+ - Clicks handler added to elements with the class OneSignal-prompt are now setup in a more compatible way.
61
 
62
  = 1.0.1 =
63
  Modified description
views/config.php CHANGED
@@ -51,16 +51,17 @@ if ($_POST['app_id']) {
51
  <li>
52
  <h4 class="steps"> Step 1: Register an account and create a OneSignal App</h4>
53
  <p> Go to <a href="https://www.onesignal.com"> onesignal.com </a> and create a new account. After verifying your account, sign in and create a new OneSignal app. </p>
54
- <img src="<?php echo ONESIGNAL_PLUGIN_URL."views/images/settings/create-1.jpg" ?>">
55
  </li>
56
 
57
  <li>
58
  <h4 class="steps"> Step 2: Create a Google Project </h4>
59
  <p> <strong> 2.1: Create a project at <a href="https://console.developers.google.com/project">https://console.developers.google.com/project</a> for your app.</strong> </p>
60
- <img src="<?php echo ONESIGNAL_PLUGIN_URL."views/images/settings/gcm-1.jpg"?>">
 
61
 
62
- <p> <strong>2.2: Select your Project and click on "Overview." Your project number should be located on this page. </strong> </p>
63
- <img src="<?php echo ONESIGNAL_PLUGIN_URL."views/images/settings/gcm-2.jpg"?>">
64
 
65
  <div class="alert alert-warning" role="alert">
66
  <p> <strong>Save the Project Number: </strong> You will need this number shortly when you configure your OneSignal app. </p>
@@ -69,59 +70,70 @@ if ($_POST['app_id']) {
69
 
70
  <li>
71
 
 
 
 
72
 
73
- <p> <strong>2.3: Turn on both "Google Cloud Messaging for Chrome" and "Google Cloud Messaging for Android" APIs </strong> </p>
74
- <p> Under APIs & auth>APIs, search for "Google Cloud Messaging for Chrome." Turn it on. You will need this for desktop notifications. </p>
75
- <p> Search for "Google Cloud Messaging for Android" and turn it on. You need this so an Chrome browser running on Android can send system notifications to the user. </p>
76
 
77
- <img src="<?php echo ONESIGNAL_PLUGIN_URL."views/images/settings/gcm-3.jpg"?>">
78
- <img src="<?php echo ONESIGNAL_PLUGIN_URL."views/images/settings/gcm-4.jpg"?>">
79
- <img src="<?php echo ONESIGNAL_PLUGIN_URL."views/images/settings/gcm-5.jpg"?>">
 
80
 
81
- <p> <strong> 2.4: Create and save a Server Key </strong> </p>
82
- <p> Under "APIs & auth" > "Credentials", Click "CREATE NEW KEY". </p>
83
- <img src="<?php echo ONESIGNAL_PLUGIN_URL."views/images/settings/gcm-6.jpg"?>">
84
 
85
- <p> Select "Server key" </p>
86
- <img src="<?php echo ONESIGNAL_PLUGIN_URL."views/images/settings/gcm-7.jpg"?>">
87
 
88
- <p> Press the Create button. Leave the IP addresses box empty</p>
89
- <img src="<?php echo ONESIGNAL_PLUGIN_URL."views/images/settings/gcm-8.jpg"?>">
90
-
91
- <p> Copy the "API Key." This is your Google Server API Key. You will need it to configure your project with OneSignal </p>
92
- <img src="<?php echo ONESIGNAL_PLUGIN_URL."views/images/settings/gcm-9.jpg"?>">
93
  </li>
94
 
95
 
96
  <li>
97
- <h4 class="steps"> Step 3: Configure your WordPress website with OneSignal </h4>
98
- <p> <strong> 3.1: Log into OneSignal. In the dashboard, select "Application Settings" then press the "Configure" button to the right of "Chrome Website (GCM)". </strong> </p>
99
- <img src="<?php echo ONESIGNAL_PLUGIN_URL."views/images/settings/gcm-10.jpg"?>">
100
-
101
- <p> <strong> 3.2: Paste your Google Server API Key in here and press Save. </strong> </p>
102
- <img src="<?php echo ONESIGNAL_PLUGIN_URL."views/images/settings/gcm-11.jpg"?>">
103
-
104
-
105
- <p> <strong> 3.3: Fill in the remaining fields: </strong> </p>
106
- <img src="<?php echo ONESIGNAL_PLUGIN_URL."views/images/settings/gcm-12.jpg"?>">
107
- <div class="alert alert-info" role="alert">
108
- <h4> Subdomain </h4>
109
- <p> <strong> Why do I need to choose a Subdomain Name? </strong> Chrome Push Notifications only work on HTTPS websites. Because most WordPress sites are on HTTP, we send notifications through our HTTPS site using your desired subdomain. Users will see notifications sent from: "your-subdomain.onesignal.com"</p>
110
- <br/><br/>
111
- <p> <strong> What if I'm already on HTTPS? </strong> If your site is already on HTTPS, you don't have to do anything! You can leave the Subdomain field blank. </p>
112
- <br/><br/>
113
- <p> <strong> Choosing a Subdomain: </strong> Users will see this subdomain on every notification, so keep it recognizable! We recommend using your site's name as the subdomain. For example, if your subdomain were "ilikemuskrats," we would send notifications from https://ilikemuskrats.onesignal.com.</p>
114
- <br/>
115
- <br/>
116
- <h4> Your Site URL </h4>
117
- <p> This is your WordPress site's URL.</p>
118
- <p> <span style="font-style: italic;"> ex: www.myWordPressSite.com </span> </p>
119
- <br/>
120
- <br/>
121
- <h4> Google Project Number </h4>
122
- <p> This can be retrieved in Step 2.2 </p>
123
- </div>
124
  </li>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
125
 
126
  <div class="alert alert-info" role="success">
127
  <p> Congratulations! The next step is to configure your OneSignal Plugin's Account Settings, which only takes a minute.</p>
51
  <li>
52
  <h4 class="steps"> Step 1: Register an account and create a OneSignal App</h4>
53
  <p> Go to <a href="https://www.onesignal.com"> onesignal.com </a> and create a new account. After verifying your account, sign in and create a new OneSignal app. </p>
54
+ <img src="<?php echo ONESIGNAL_PLUGIN_URL."views/images/settings/create-1.jpg" ?>" style="width: 80%">
55
  </li>
56
 
57
  <li>
58
  <h4 class="steps"> Step 2: Create a Google Project </h4>
59
  <p> <strong> 2.1: Create a project at <a href="https://console.developers.google.com/project">https://console.developers.google.com/project</a> for your app.</strong> </p>
60
+ <img src="<?php echo ONESIGNAL_PLUGIN_URL."views/images/settings/gcm-1.jpg"?>" style="width: 80%">
61
+ <img src="<?php echo ONESIGNAL_PLUGIN_URL."views/images/settings/gcm-1-2.jpg"?>" style="width: 80%">
62
 
63
+ <p> <strong>2.2: Once your project has finished creating, select your project and click on Overview. Your project number should be located on this page. </strong> </p>
64
+ <img src="<?php echo ONESIGNAL_PLUGIN_URL."views/images/settings/gcm-2.jpg"?>" style="width: 80%">
65
 
66
  <div class="alert alert-warning" role="alert">
67
  <p> <strong>Save the Project Number: </strong> You will need this number shortly when you configure your OneSignal app. </p>
70
 
71
  <li>
72
 
73
+ <br>
74
+ <p> <strong>STEP 3: Turn on both "Google Cloud Messaging for Chrome" and "Google Cloud Messaging for Android" APIs</strong> </p>
75
+ <p> 3.1: Under APIs & auth > APIs, search for Google Cloud Messaging for Chrome. Turn it on. You will need this for desktop notifications.</p>
76
 
77
+ <img src="<?php echo ONESIGNAL_PLUGIN_URL."views/images/settings/gcm-3.jpg"?>" style="width: 80%">
78
+ <img src="<?php echo ONESIGNAL_PLUGIN_URL."views/images/settings/gcm-4.jpg"?>" style="width: 80%">
79
+ <img src="<?php echo ONESIGNAL_PLUGIN_URL."views/images/settings/gcm-5.jpg"?>" style="width: 80%">
80
 
81
+ <br>
82
+ <p> <strong> STEP 4: Create and save Server Key</strong> </p>
83
+ <p>4.1: Under APIs & auth > Credentials, click the Add credentials button, and click API key. </p>
84
+ <img src="<?php echo ONESIGNAL_PLUGIN_URL."views/images/settings/gcm-6.jpg"?>" style="width: 80%">
85
 
86
+ <p>4.2: Select "Server key" </p>
87
+ <img src="<?php echo ONESIGNAL_PLUGIN_URL."views/images/settings/gcm-7.jpg"?>" style="width: 80%">
 
88
 
89
+ <p>4.3: Without entering any values into the textbox, press the Create button.</p>
90
+ <img src="<?php echo ONESIGNAL_PLUGIN_URL."views/images/settings/gcm-8.jpg"?>" style="width: 80%">
91
 
92
+ <p>4.4: Copy the API Key. You will need it to enter it to the Google Server API Key field in your App Settings. </p>
93
+ <img src="<?php echo ONESIGNAL_PLUGIN_URL."views/images/settings/gcm-9.jpg"?>" style="width: 80%">
 
 
 
94
  </li>
95
 
96
 
97
  <li>
98
+ <h4 class="steps"> STEP 5: Configure your Chrome Website with OneSignal </h4>
99
+ <p> <strong> 5.1: Log into OneSignal. In the dashboard, select Application Settings then press the Configure button to the right of Chrome Website (GCM). </strong> </p>
100
+ <p> <strong> 5.2: Paste your Google API Key in here.</strong> </p>
101
+ <img src="<?php echo ONESIGNAL_PLUGIN_URL."views/images/settings/gcm-10.jpg"?>" style="width: 80%">
102
+ <img src="<?php echo ONESIGNAL_PLUGIN_URL."views/images/settings/gcm-11.jpg"?>" style="width: 80%">
103
+
104
+ <p> <strong> 5.3: Fill in the remaining HTTP fields and press Save.</strong></p>
105
+ <p>(Skip these fields if your site is HTTPS)</p>
106
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
107
  </li>
108
+
109
+ <li>
110
+ <h4 class="steps"> STEP 6: Add Subscribe Link or Widget (HTTP Only)</h4>
111
+ <p> <strong> 6.1:</strong> On HTTP sites you can not auto prompt for push notifications. You need to supply either a link/button or add our widget to your site. </p>
112
+ <p> <strong> Option 1 Widget: </strong> This provides a quick and easy way to add an opt-in option for push notifications.<br>Under Appearance > Widgets drag the OneSignal Widget from the list on the left to the Widget Area on the right. You can customize the widget title and body to your liking.</p>
113
+ <p> <strong> Option 2 CSS Class: </strong>Assign the class <span class="sample-code"> "OneSignal-prompt" </span> to any link or button element. <br/>Example:</p>
114
+ <div id="custom-link-example"><xmp class="sample-code"><a href="#" class="OneSignal-prompt"> Subscribe to Notifications </a></xmp></div>
115
+ <br>
116
+ <p><strong>6.2:</strong> Test your subcribe link by clicking on the link, button, or widget.</p>
117
+ </li>
118
+
119
+ <br><br>
120
+ <div class="alert alert-info" role="alert">
121
+ <h4> Subdomain </h4>
122
+ <p> <strong> Why do I need to choose a Subdomain Name? </strong> Chrome Push Notifications only work on HTTPS websites. Because most WordPress sites are on HTTP, we send notifications through our HTTPS site using your desired subdomain. Users will see notifications sent from: "your-subdomain.onesignal.com"</p>
123
+ <br/><br/>
124
+ <p> <strong> What if I'm already on HTTPS? </strong> If your site is already on HTTPS, you don't have to do anything! You can leave the Subdomain field blank. </p>
125
+ <br/><br/>
126
+ <p> <strong> Choosing a Subdomain: </strong> Users will see this subdomain on every notification, so keep it recognizable! We recommend using your site's name as the subdomain. For example, if your subdomain were "ilikemuskrats," we would send notifications from https://ilikemuskrats.onesignal.com.</p>
127
+ <br/>
128
+ <br/>
129
+ <h4> Your Site URL </h4>
130
+ <p> This is your WordPress site's URL.</p>
131
+ <p> <span style="font-style: italic;"> ex: www.myWordPressSite.com </span> </p>
132
+ <br/>
133
+ <br/>
134
+ <h4> Google Project Number </h4>
135
+ <p> This can be retrieved in Step 2.2 </p>
136
+ </div>
137
 
138
  <div class="alert alert-info" role="success">
139
  <p> Congratulations! The next step is to configure your OneSignal Plugin's Account Settings, which only takes a minute.</p>
views/images/settings/app_id-1.jpg DELETED
Binary file
views/images/settings/app_id_instructions.jpg DELETED
Binary file
views/images/settings/create-2.jpg DELETED
Binary file
views/images/settings/gcm-1-2.jpg ADDED
Binary file
views/images/settings/gcm-1.jpg CHANGED
Binary file
views/images/settings/gcm-10.jpg CHANGED
Binary file
views/images/settings/gcm-11.jpg CHANGED
Binary file
views/images/settings/gcm-12.jpg DELETED
Binary file
views/images/settings/gcm-2.jpg CHANGED
Binary file
views/images/settings/gcm-3.jpg CHANGED
Binary file
views/images/settings/gcm-4.jpg CHANGED
Binary file
views/images/settings/gcm-5.jpg CHANGED
Binary file
views/images/settings/gcm-6.jpg CHANGED
Binary file
views/images/settings/gcm-7.jpg CHANGED
Binary file
views/images/settings/gcm-8.jpg CHANGED
Binary file
views/images/settings/gcm-9.jpg CHANGED
Binary file