Viewing 1 replies (of 1 total)
  • Thread Starter David Cavins

    (@dcavins)

    More generally, I’ve got WP installed at wp.site.com, and another web site at b.site.com, and I’d like to generate a logout link so that users may log out from b.site.com successfully. Does anyone know how to generate the correct logout link upon successful login? Or even just capturing the correct nonce would solve my problem. As it is, using the hook “wp_login,” I get the generic, not-logged-in nonce.

    function create_login_cookie_local() {
       global $user;
       $logout = wp_logout_url();
       setcookie("CookieLocalLogin", $logout, time()+172800, "/", "site.com");
       }
    
    add_action('wp_login', 'create_login_cookie_local');
Viewing 1 replies (of 1 total)

The topic ‘Nonce problem with wp_logout_url’ is closed to new replies.