#20750 closed defect (bug) (duplicate)
home_url() $scheme parameter fails when site URL uses SSL
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | 3.3 |
| Component: | General | Keywords: | has-patch |
| Focuses: | Cc: |
Description
Steps to reproduce:
- Go into General Settings and set your WordPress Address and Site Address to use SSL (eg.
https://example.com). - Output a link somewhere using
home_url()with the$schemeparameter set to 'http'. Example:
echo home_url( '/', 'http' );
Expected output: http://example.com.
Actual output: https://example.com.
The inverse of course works as expected, if your site uses an HTTP URL and you pass 'https' as the $scheme parameter you'll end up with https://example.com.
Seen in 3.3, probably occurs in earlier versions.
Attachments (2)
Change History (5)
Note: See
TracTickets for help on using
tickets.
I'm going to close this as #20759 will address this issue by switching to the new
set_url_scheme()function.