I have came across the WordPress logout error several times but I really never figured out the cause of it. In earlier days, it was generally that I was missing a nonce but now even with logout link generated by wp_logout_url();, I am greeted with the WP die screen:
You are attempting to log out of SITE Do you really want to log out?
What causes this to trigger at the first place?
Edit: Like I mentioned it was happening randomly, I think I figured out something. IT works fine with link generated by wp_logout_url(); but as soon as I use a $redirect parameter in wp_logout_url( $redirect );, I start facing the issue.
Any light on the matter?
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
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.
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0