wp_logout_url isn’t forwarding to correct link

The issue is you pointing entirely unrelated (from WordPress point of view) domain to WP site. When WP processes logout the redirect is performed by wp_safe_redirect(), which disallows to redirect user “outside” the site. Since it has no clue about your custom domain that link is simply discarded. I would advise to properly set up … Read more

Getting User email on logout. wp_logout

wp_get_current_user() will never work in this hook, because, wp_logout action fires after user is logged out: session destroyed, cookies cleared and current user is set to 0. But wp_logout action recieves $user_id. I will give you a working example, because I do not familiar with your custom functions. //pass $user_id as argument function mmd_JudgeLogoutCheck($user_id) { … Read more

Ajax function returns -1

Rarst said it worked for him both logged in and logged out, i can also confirm the same, here’s my ugly test code that works, very much just a hacked together version of your code(for testing). function say_coucou(){ check_ajax_referer( ‘hello’, ‘nonce’ ); echo “Hello”; die; } add_action(‘wp_ajax_hello_hello’, ‘say_coucou’); add_action(‘wp_ajax_nopriv_hello_hello’, ‘say_coucou’); add_action(‘admin_print_footer_scripts’,’blabla’,20000); add_action(‘wp_head’,’enj’,20000); add_action(‘wp_footer’,’blabla’,20000); function enj() … Read more

add logout button on admin side menu

I’m using this as a custom logout button, it also displays a random quote before logout the user. I think you can adapt it to your needs by removing what you don’t need. Instructions: Copy the code below and save as users-logout.php Create a folder called users-logout, upload the file and the images below to … Read more

WordPress failure when logging out

This message is raised by wp_nonce_ays() which is called by check_admin_referer(). Your browser has probably not sent a referer header, so WordPress could not validate the nonce. This may be a problem in your browser settings or your network connection.

Get wp_logout_url function to work on external (non-WordPress) page

To allow WordPress functions to operate outside of the WordPress environment, you need to let your external pages know about and have access to the WordPress Core and API environment. http://codex.wordpress.org/Integrating_WordPress_with_Your_Website The above link is one such reference which covers this very purpose. Specifically, In order to transform regular PHP pages into ones that utilize … Read more