WordPress.org

Make WordPress Core


Ignore:
Timestamp:
02/02/2021 07:01:18 PM (8 months ago)
Author:
SergeyBiryukov
Message:

General: Remove admin and login exceptions for https in get_home_url().

Previously, get_home_url() would automatically switch to https if the current request is already https, but would only do so on the front end.

This addresses the inconsistent behavior of returning different values in the admin and on the frontend.

Follow-up to [12598], [21937], [24844].

Props herregroen, mukesh27.
Fixes #52421.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/rest-api.php

    r50005 r50156  
    790790        $_SERVER['HTTPS'] = 'on';
    791791        $url              = get_rest_url();
    792         $this->assertSame( 'http', parse_url( $url, PHP_URL_SCHEME ) );
     792        $this->assertSame( 'https', parse_url( $url, PHP_URL_SCHEME ) );
    793793
    794794        // Reset.
Note: See TracChangeset for help on using the changeset viewer.