improvements to get_home/site_url, props andreasnrb + code cleanup, see #12735
git-svn-id: https://develop.svn.wordpress.org/trunk@14702 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
5aa105a6af
commit
179273030a
@ -1852,7 +1852,7 @@ function get_home_url( $blog_id = null, $path = '', $scheme = null ) {
|
||||
if ( empty( $blog_id ) || !is_multisite() )
|
||||
$home = get_option( 'home' );
|
||||
else
|
||||
$home = untrailingslashit(get_blogaddress_by_id($blog_id));
|
||||
$home = get_blog_option( $blog_id, 'home' );
|
||||
|
||||
$url = str_replace( 'http://', "$scheme://", $home );
|
||||
|
||||
@ -1903,7 +1903,7 @@ function get_site_url( $blog_id = null, $path = '', $scheme = null ) {
|
||||
if ( !in_array( $scheme, array( 'http', 'https' ) ) ) {
|
||||
if ( ( 'login_post' == $scheme || 'rpc' == $scheme ) && ( force_ssl_login() || force_ssl_admin() ) )
|
||||
$scheme = 'https';
|
||||
elseif ( ('login' == $scheme) && ( force_ssl_admin() ) )
|
||||
elseif ( ( 'login' == $scheme ) && force_ssl_admin() )
|
||||
$scheme = 'https';
|
||||
elseif ( ( 'admin' == $scheme ) && force_ssl_admin() )
|
||||
$scheme = 'https';
|
||||
@ -1914,7 +1914,7 @@ function get_site_url( $blog_id = null, $path = '', $scheme = null ) {
|
||||
if ( empty( $blog_id ) || !is_multisite() )
|
||||
$url = get_option( 'siteurl' );
|
||||
else
|
||||
$url = untrailingslashit(get_blogaddress_by_id($blog_id));
|
||||
$url = get_blog_option( $blog_id, 'siteurl' );
|
||||
|
||||
$url = str_replace( 'http://', "{$scheme}://", $url );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user