Make WordPress Core


Ignore:
Timestamp:
07/28/2020 05:18:06 PM (6 years ago)
Author:
SergeyBiryukov
Message:

Login and Registration: Link to the correct site after activating a user on a Multisite install in subdirectory mode.

Props pkarjala, Mista-Flo, tmoore41, Ipstenu, ksoares, mukesh27, whyisjake.
Fixes #39311.

File:
1 edited

Legend:

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

    r48573 r48672  
    606606 */
    607607function wp_lostpassword_url( $redirect = '' ) {
    608         $args = array();
     608        $args = array(
     609                'action' => 'lostpassword',
     610        );
     611
    609612        if ( ! empty( $redirect ) ) {
    610613                $args['redirect_to'] = urlencode( $redirect );
    611614        }
    612615
    613         $lostpassword_url = add_query_arg( $args, network_site_url( 'wp-login.php?action=lostpassword', 'login' ) );
     616        $blog_details = get_blog_details();
     617
     618        $lostpassword_url = add_query_arg( $args, network_site_url( $blog_details->path . 'wp-login.php', 'login' ) );
    614619
    615620        /**
Note: See TracChangeset for help on using the changeset viewer.