Keep redirect_to when hitting the log out AYS.

props mitchoyoshitaka for initial patch.
fixes #17398.


git-svn-id: https://develop.svn.wordpress.org/trunk@27272 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2014-02-25 20:01:36 +00:00
parent f14ef59818
commit ef8c2d0020
1 changed files with 2 additions and 1 deletions

View File

@ -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' ) ) . '</p><p>';
$html .= sprintf( __( "Do you really want to <a href='%s'>log out</a>?"), wp_logout_url() );
$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() )