Using add_action on login to set localstorage
-
I am using the add_action with wp_login to set a localstorage item on login. Its working fine when I try to login at the wp-admin page but instead of going through with the login it goes to the wp-login.php and is just a blank page. Any ideas on this?
Here is my actual code:
function set_storage_yes() { echo '<script type="text/javascript">window.localStorage.setItem(\'loggedIn\', \'true\'); </script>'; } add_action('wp_login', 'set_storage_yes', 10);
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘Using add_action on login to set localstorage’ is closed to new replies.