Opened 8 years ago
Closed 8 years ago
#40235 closed defect (bug) (duplicate)
Site Address (URL) in network/site-info.php for primary site always prefixed http://
Reported by: | bobbingwide | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.5 |
Component: | Networks and Sites | Keywords: | |
Focuses: | multisite | Cc: |
Description
While switching a WordPress Multisite network to https
, I noticed that on Edit site for the primary site,
wp-admin/network/site-info.php?id=1
, the Site Address (URL) field was displayed as http://example.com even
though I was using https://
to access the site.
I would have expected it to be https://example.com
Explanation
esc_url() assumes the http:// if the URL doesn't contain a scheme.
Proposed solution
Use logic similar to that in network_home_url().
Change History (2)
Note: See
TracTickets for help on using
tickets.
Simple solution would be to wrap esc_url() with set_url_scheme()