mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-22 15:31:42 +01:00
Do not redirect to options.php on login if user was POSTing to options.php from another page. props fitztrev. fixes #8133
git-svn-id: http://svn.automattic.com/wordpress/trunk@9775 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
502707fa29
commit
0435f3d294
@ -760,7 +760,9 @@ function auth_redirect() {
|
||||
else
|
||||
$proto = 'http://';
|
||||
|
||||
$login_url = site_url( 'wp-login.php?redirect_to=' . urlencode($proto . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']), 'login' );
|
||||
$redirect = ( strpos($_SERVER['REQUEST_URI'], '/options.php') && wp_get_referer() ) ? wp_get_referer() : $proto . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
|
||||
|
||||
$login_url = site_url( 'wp-login.php?redirect_to=' . urlencode( $redirect ), 'login' );
|
||||
|
||||
wp_redirect($login_url);
|
||||
exit();
|
||||
|
Loading…
Reference in New Issue
Block a user