From 08073035a6136d35b8c75acd51c8e4155fda60d9 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Thu, 20 Oct 2011 23:40:09 +0000 Subject: [PATCH] Fix the current page default redirect in wp_login_form(). props kawauso, see #17243. git-svn-id: https://develop.svn.wordpress.org/trunk@19032 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/general-template.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php index 315b2e30d7..ec9bf2cf53 100644 --- a/wp-includes/general-template.php +++ b/wp-includes/general-template.php @@ -235,7 +235,7 @@ function wp_login_url($redirect = '', $force_reauth = false) { */ function wp_login_form( $args = array() ) { $defaults = array( 'echo' => true, - 'redirect' => site_url( $_SERVER['REQUEST_URI'] ), // Default redirect is back to the current page + 'redirect' => ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], // Default redirect is back to the current page 'form_id' => 'loginform', 'label_username' => __( 'Username' ), 'label_password' => __( 'Password' ),