Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/varun1505/wp-gcm-push-notifications/archive/refs/heads/master.zipNo built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.
Push notifications for WordPress blogs
This plugin pushes a notification to all the registered devices when a new post is published.
How to use?
You have to use it just like any other wordpress plugin
- Download and install the plugin
- Activate it from your WP-Admin Dashboard
- Go to Settings -> GCM Settings and enter the API Key (Sender ID) that you obtained from the Google API's console.
- Thats it! You are good to go! Whenever you publish a post, a notification will be sent to registered devices
How to Register a device?
You'll have to request the API to register the device as below
- Obtain the Device ID for the device.
-
Send device id as follows:
http://yourwebsite.com/gcm/register/<your-device-id> - Now your device is registered.
How to un-register a device?
To un-register a device, send the device-id as follows:
http://yourwebsite.com/gcm/unregister/<your-device-id<
What else is coming to this plugin?
- Customizing the message that is sent to the device.
- Selecting post types from custom post types.
- Options for enabling push-notifications for more user-actions like new user added, comments, etc.