Make WordPress Core


Ignore:
Timestamp:
07/28/2020 05:42:44 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Login and Registration: Correct the logic for determining the path to wp-login.php in wp_lostpassword_url().

Follow-up to [48672], [48673].

See #39311.

File:
1 edited

Legend:

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

    r48673 r48674  
    614614    }
    615615
    616     $site_path = '';
    617 
    618616    if ( is_multisite() ) {
    619         $blog_details = get_blog_details();
    620         $site_path    = $blog_details->path . 'wp-login.php';
    621     }
    622 
    623     $lostpassword_url = add_query_arg( $args, network_site_url( $site_path . 'wp-login.php', 'login' ) );
     617        $blog_details  = get_blog_details();
     618        $wp_login_path = $blog_details->path . 'wp-login.php';
     619    } else {
     620        $wp_login_path = 'wp-login.php';
     621    }
     622
     623    $lostpassword_url = add_query_arg( $args, network_site_url( $wp_login_path, 'login' ) );
    624624
    625625    /**
Note: See TracChangeset for help on using the changeset viewer.