Make WordPress Core


Ignore:
Timestamp:
02/25/2014 08:01:36 PM (11 years ago)
Author:
nacin
Message:

Keep redirect_to when hitting the log out AYS.

props mitchoyoshitaka for initial patch.
fixes #17398.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/functions.php

    r27262 r27272  
    20812081    if ( 'log-out' == $action ) {
    20822082        $html = sprintf( __( 'You are attempting to log out of %s' ), get_bloginfo( 'name' ) ) . '</p><p>';
    2083         $html .= sprintf( __( "Do you really want to <a href='%s'>log out</a>?"), wp_logout_url() );
     2083        $redirect_to = isset( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '';
     2084        $html .= sprintf( __( "Do you really want to <a href='%s'>log out</a>?"), wp_logout_url( $redirect_to ) );
    20842085    } else {
    20852086        $html = __( 'Are you sure you want to do this?' );
Note: See TracChangeset for help on using the changeset viewer.