[wp-trac] [WordPress Trac] #21153: supporting protocol-relative urls

WordPress Trac noreply at wordpress.org
Sun Sep 28 11:43:31 UTC 2014


#21153: supporting protocol-relative urls
-------------------------+------------------------------
 Reporter:  nagyv        |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  General      |     Version:  3.3.2
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:
-------------------------+------------------------------
Description changed by SergeyBiryukov:

Old description:

> changing http:// and https:// generated links to // links would easily
> add support for hosting a site both under http and https easily
>
> one place I've found this to be changed is in wp-includes/link-
> template.php around line 2006
>
> the first if could be changed to:
>
> $url = str_replace( "https://", "//", $url)
> $url = str_replace( "http://", "//", $url)

New description:

 changing `http://` and `https://` generated links to `//` links would
 easily add support for hosting a site both under http and https easily

 one place I've found this to be changed is in wp-includes/link-
 template.php around line 2006

 the first if could be changed to:
 {{{
 $url = str_replace( "https://", "//", $url)
 $url = str_replace( "http://", "//", $url)
 }}}

--

--
Ticket URL: <https://core.trac.wordpress.org/ticket/21153#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list