Make WordPress Core

Changeset 9775


Ignore:
Timestamp:
11/19/2008 05:07:24 AM (16 years ago)
Author:
markjaquith
Message:

Do not redirect to options.php on login if user was POSTing to options.php from another page. props fitztrev. fixes #8133

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/pluggable.php

    r9764 r9775  
    761761        $proto = 'http://';
    762762
    763     $login_url = site_url( 'wp-login.php?redirect_to=' . urlencode($proto . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']), 'login' );
     763    $redirect = ( strpos($_SERVER['REQUEST_URI'], '/options.php') && wp_get_referer() ) ? wp_get_referer() : $proto . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
     764
     765    $login_url = site_url( 'wp-login.php?redirect_to=' . urlencode( $redirect ), 'login' );
    764766
    765767    wp_redirect($login_url);
Note: See TracChangeset for help on using the changeset viewer.