[wp-trac] [WordPress Trac] #20750: home_url() $scheme parameter fails when site URL uses SSL

WordPress Trac wp-trac at lists.automattic.com
Fri May 25 19:23:38 UTC 2012


#20750: home_url() $scheme parameter fails when site URL uses SSL
--------------------------+-----------------------------
 Reporter:  johnbillion   |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  3.3
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 Steps to reproduce:

  1. Go into General Settings and set your WordPress Address and Site
 Address to use SSL (eg. `https://example.com`).
  2. Output a link somewhere using `home_url()` with the `$scheme`
 parameter 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.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/20750>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list