diff --git a/wp-includes/functions.php b/wp-includes/functions.php index bf82736653..c5a9fea79f 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -2080,7 +2080,8 @@ function wp_nonce_ays( $action ) { $title = __( 'WordPress Failure Notice' ); if ( 'log-out' == $action ) { $html = sprintf( __( 'You are attempting to log out of %s' ), get_bloginfo( 'name' ) ) . '

'; - $html .= sprintf( __( "Do you really want to log out?"), wp_logout_url() ); + $redirect_to = isset( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : ''; + $html .= sprintf( __( "Do you really want to log out?"), wp_logout_url( $redirect_to ) ); } else { $html = __( 'Are you sure you want to do this?' ); if ( wp_get_referer() )