after using the wp_login hook, is it possible to add a snippet of javascript code to the page seen immediately after the login in wordpress?
I want to use this top implement a notification system that notifies the user when they login.
|
The typical method to store pending action in WordPress is to set short-lived transient ( |
|||
|
|
|
I would do something like this:
Set a never-expiring transient for the user after logging on. If a transient is set for that user, inject some JavaScript code and delete the transient. |
|||
|
|
admin_noticeshook. If you need it after an redirect, you maybe need to do it with Cookies and a$_SESSION. – kaiser Jan 9 '12 at 1:09