Logout page
-
Whenever I am trying to log out from my site, I am sent to a second logout page and WP is asking me whether I really want to log out. I have created a custom link “Log out” in my main menu and added the following URL to the logout link:
www.mysite.com/wp-login.php?action=logout&_wpnonce=ed2cc1274b
This second logout side is called in the functions.php in wp-includes.
function wp_nonce_ays( $action ) { if ( 'log-out' == $action ) { $html = sprintf( __( 'You are attempting to log out of %s' ), get_bloginfo( 'name' ) ) . '</p><p>'; $redirect_to = isset( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : ''; $html .= sprintf( __( "Do you really want to <a href='%s'>log out</a>?"), wp_logout_url( $redirect_to ) ); } else { $html = __( 'Are you sure you want to do this?' ); if ( wp_get_referer() ) $html .= "</p><p><a href='" . esc_url( remove_query_arg( 'updated', wp_get_referer() ) ) . "'>" . __( 'Please try again.' ) . "</a>"; } wp_die( $html, __( 'WordPress Failure Notice' ), 403 ); }
Is there any way that I can remove this second logout page? When clicking “Log out” in the main menu I should simply be logged out. I have disabled all plugins already and used the default theme, but I am still directed to the second logout page. Removing the code from the core file is returning a php error.
Any suggestions how to solve this?
Thanks.
- The topic ‘Logout page’ is closed to new replies.