Ticket #14867: 14867.diff
File 14867.diff, 1.4 KB (added by , 15 years ago) |
---|
-
wp-includes/ms-blogs.php
19 19 } 20 20 21 21 function get_blogaddress_by_id( $blog_id ) { 22 $protocol = is_ssl() ? ' https://' : ' http://'; 22 23 $bloginfo = get_blog_details( (int) $blog_id, false ); // only get bare details! 23 return esc_url( 'http://'. $bloginfo->domain . $bloginfo->path );24 return esc_url( $protocol . $bloginfo->domain . $bloginfo->path ); 24 25 } 25 26 26 27 function get_blogaddress_by_name( $blogname ) { … … 38 39 return esc_url( $url . '/' ); 39 40 } 40 41 41 function get_blogaddress_by_domain( $domain, $path ){ 42 function get_blogaddress_by_domain( $domain, $path ) { 43 $protocol = is_ssl() ? ' https://' : ' http://'; 44 42 45 if ( is_subdomain_install() ) { 43 $url = "http://".$domain.$path;46 $url = $protocol.$domain.$path; 44 47 } else { 45 48 if ( $domain != $_SERVER['HTTP_HOST'] ) { 46 49 $blogname = substr( $domain, 0, strpos( $domain, '.' ) ); 47 $url = 'http://'. substr( $domain, strpos( $domain, '.' ) + 1 ) . $path;50 $url = $protocol . substr( $domain, strpos( $domain, '.' ) + 1 ) . $path; 48 51 // we're not installing the main blog 49 52 if ( $blogname != 'www.' ) 50 53 $url .= $blogname . '/'; 51 54 } else { // main blog 52 $url = 'http://'. $domain . $path;55 $url = $protocol . $domain . $path; 53 56 } 54 57 } 58 55 59 return esc_url( $url ); 56 60 } 57 61