[wp-trac] [WordPress Trac] #25767: get_home_path() fails if admin is SSL and not the frontend

WordPress Trac noreply at wordpress.org
Fri Apr 11 18:27:31 UTC 2014


#25767: get_home_path() fails if admin is SSL and not the frontend
----------------------------+-----------------------------
 Reporter:  GregLone        |       Owner:
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:  Future Release
Component:  Filesystem API  |     Version:  3.7.1
 Severity:  normal          |  Resolution:
 Keywords:  needs-patch     |     Focuses:
----------------------------+-----------------------------

Comment (by carlalexander):

 Ran into this issue today. A better fix along the lines above to remove
 the scheme entirely.

 {{{
 #!php
 $home = get_option( 'home' );
 $home = str_replace(parse_url($home, PHP_URL_SCHEME), '', $home);
 $siteurl = get_option( 'siteurl' );
 $siteurl = str_replace(parse_url($siteurl, PHP_URL_SCHEME), '', $siteurl);
 }}}

 That said providing a function that compares the two urls without the
 scheme might be more useful than doing it in the function itself.

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


More information about the wp-trac mailing list