WordPress.org

Make WordPress Core

Changeset 3044


Ignore:
Timestamp:
11/11/2005 01:35:15 AM (13 years ago)
Author:
matt
Message:

Allow redirect on logout, fixes #1239

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-login.php

    r3041 r3044  
    2525    do_action('wp_logout');
    2626    nocache_headers();
    27     wp_redirect('wp-login.php');
     27
     28    $redirect_to = 'wp-login.php';
     29    if ( isset($_REQUEST['redirect_to']) )
     30        $redirect_to = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $_REQUEST['redirect_to']);
     31           
     32    wp_redirect($redirect_to);
    2833    exit();
    2934
Note: See TracChangeset for help on using the changeset viewer.