[wp-trac] [WordPress Trac] #36468: Error in docs of get_home_url() and home_url()

WordPress Trac noreply at wordpress.org
Sun Apr 10 22:19:45 UTC 2016


#36468: Error in docs of get_home_url() and home_url()
--------------------------+-----------------------------
 Reporter:  thomaswm      |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:  docs          |
--------------------------+-----------------------------
 In the docs of `get_home_url()` and `home_url()`, it says:
 > Returns the ‘home’ option with the appropriate protocol, '''‘https’ if
 is_ssl() and ‘http’ otherwise'''. If $scheme is ‘http’ or ‘https’,
 is_ssl() is overridden.

 That's not entirely correct. If `get_home_url()` is called without the
 `$scheme` parameter, then:
 * If `is_ssl()` is true, then `get_home_url()` will return a URL with the
 HTTPS scheme.
 * If `is_ssl()` is false, then `get_home_url()` will return a URL with the
 same scheme as the `home` option. That can be either HTTP or HTTPS.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/36468>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list