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?