diff --git a/wp-includes/ms-blogs.php b/wp-includes/ms-blogs.php index b567594e2..0deca99ad 100644 --- a/wp-includes/ms-blogs.php +++ b/wp-includes/ms-blogs.php @@ -30,15 +30,11 @@ function wpmu_update_blogs_date() { * @since MU * * @param int $blog_id Blog ID - * @param string $scheme Optional. Scheme to give the URL. Currently 'http', 'https' * @return string */ -function get_blogaddress_by_id( $blog_id, $scheme = null ) { - if ( ! in_array( $scheme, array( 'http', 'https' ) ) ) - $scheme = is_ssl() ? 'https' : 'http'; - +function get_blogaddress_by_id( $blog_id ) { $bloginfo = get_blog_details( (int) $blog_id, false ); // only get bare details! - return esc_url( "$scheme://" . $bloginfo->domain . $bloginfo->path ); + return esc_url( 'http://' . $bloginfo->domain . $bloginfo->path ); } /** @@ -71,24 +67,20 @@ function get_blogaddress_by_name( $blogname ) { * * @param string $domain * @param string $path - * @param string $scheme Optional. Scheme to give the URL. Currently 'http', 'https' * @return string */ -function get_blogaddress_by_domain( $domain, $path, $scheme = null ) { - if ( ! in_array( $scheme, array( 'http', 'https' ) ) ) - $scheme = is_ssl() ? 'https' : 'http'; - +function get_blogaddress_by_domain( $domain, $path ) { if ( is_subdomain_install() ) { - $url = "$scheme://" . $domain.$path; + $url = "http://".$domain.$path; } else { if ( $domain != $_SERVER['HTTP_HOST'] ) { $blogname = substr( $domain, 0, strpos( $domain, '.' ) ); - $url = "$scheme://" . substr( $domain, strpos( $domain, '.' ) + 1 ) . $path; + $url = 'http://' . substr( $domain, strpos( $domain, '.' ) + 1 ) . $path; // we're not installing the main blog if ( $blogname != 'www.' ) $url .= $blogname . '/'; } else { // main blog - $url = "$scheme://" . $domain . $path; + $url = 'http://' . $domain . $path; } } return esc_url( $url );