S
S
strify_252016-01-06 12:48:42
PHP
strify_25, 2016-01-06 12:48:42

How to make html5 notification in wordpress?

Maybe someone made notifications in the browser ... The bottom line is that when a new post is added, the user will receive a notification at the bottom right of the screen.
I did this example ydmitriy.ru/blog/html5-notifications
By clicking on the button, everything works, but how to make sure that it is added when a post is added? Maybe there are some hooks for this?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Andrzej Wielski, 2016-01-06
@wielski

Done with Service Workers.
More details here: https://developers.google.com/web/updates/2015/03/...
Difficult. I have not yet seen ready-made solutions in a wrapper (especially under WP).
If you want to show only when the site tab is open - it's easier here, you can get by using the WP api, unloading new posts, and showing a message.

N
nozzy, 2016-01-06
@nozzy

Well, if the button works, then try calling the js function through the hook - save_post
wp-kama.ru/hook/save_post
wordpress.stackexchange.com/questions/125135/execu...

V
Vitaly B, 2016-01-06
@vitaliy_balahnin

push plugin for wp
https://onesignal.com/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question