Make WordPress Core

Changeset 48673

Timestamp:
07/28/2020 05:38:37 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Login and Registration: Only call get_blog_details() in wp_lostpassword_url() on Multisite.

The function does not exist on single site.

Follow-up to [48672].

See #39311.

File:
1 edited

Legend:

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

    r48672 r48673  
    614614    }
    615615
    616     $blog_details = get_blog_details();
    617 
    618     $lostpassword_url = add_query_arg( $args, network_site_url( $blog_details->path . 'wp-login.php', 'login' ) );
     616    $site_path = '';
     617
     618    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' ) );
    619624
    620625    /**
Note: See TracChangeset for help on using the changeset viewer.