Make WordPress Core


Ignore:
Timestamp:
10/20/2011 11:40:09 PM (15 years ago)
Author:
nacin
Message:

Fix the current page default redirect in wp_login_form(). props kawauso, see #17243.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/general-template.php

    r19027 r19032  
    236236function wp_login_form( $args = array() ) {
    237237        $defaults = array( 'echo' => true,
    238                                                 'redirect' => site_url( $_SERVER['REQUEST_URI'] ), // Default redirect is back to the current page
     238                                                'redirect' => ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], // Default redirect is back to the current page
    239239                                                'form_id' => 'loginform',
    240240                                                'label_username' => __( 'Username' ),
Note: See TracChangeset for help on using the changeset viewer.