New answers tagged

1

You can log out the current user with wp_logout() function: I think it is much better approach. wp_logout() destroys current session, clears authorization cookie and call wp_logout action. Also, it is a pluggable function, which means can be redefined by plugins. You can miss important stuff, specially when working in combination with other plugins. If ...


1

Is there something additional that wp_logout does? As I said in my comment, WordPress runs two functions on wp_logout. wp_destroy_current_session() wp_clear_auth_cookie() wp_clear_auth_cookie() removes all of the cookies associated with authentication. This is what you would like to do with JavaScript. However there's also ...



Top 50 recent answers are included