How to log out everywhere else, destroy all sessions “all other devices”?

WordPress panel service “log out everywhere else” is doing a nice job. I want to use this as a function outside the panel. Screenshoot 2 Answers 2 That button sends an AJAX request that runs wp_ajax_destroy_sessions(). It’s not really abstracted in such a way that you can re-use it outside of AJAX, but if you … Read more

Logout URL performing strange

When I enter url : http://www.example.com/wp-login.php?action=logout it asks if you want to log out or not ? why does it happen where I am not logged in as a admin? If I run this url on any website like http://www.example.com/wp-login.php?action=logout The admin of that site comes to know that somebody logged out, when I just … Read more

Logout redirect to current page – function

I’m looking for a function that can redirect users when they logout to the current page. I’m looking for a code I can use in functions.php? 4 s 4 Using this code in the functions.php does the trick: function wpse_44020_logout_redirect( $logouturl, $redir ) { return $logouturl . ‘&redirect_to=’ . get_permalink(); } add_filter( ‘logout_url’, ‘wpse_44020_logout_redirect’, 10, … Read more