Ticket #14867: 14867.3.diff
File 14867.3.diff, 1.1 KB (added by , 10 years ago) |
---|
-
wp-includes/ms-blogs.php
38 38 * @return string Full URL of the blog if found. Empty string if not. 39 39 */ 40 40 function get_blogaddress_by_id( $blog_id ) { 41 $bloginfo = get_blog_details( (int) $blog_id, false ); // only get bare details! 42 return ( $bloginfo ) ? esc_url( 'http://' . $bloginfo->domain . $bloginfo->path ) : ''; 41 $bloginfo = get_blog_details( (int) $blog_id, true ); // get all details 42 if ( empty( $bloginfo ) ) { 43 return ''; 44 } 45 46 // Derive the site's scheme from its home URL 47 $scheme = parse_url( $bloginfo->homeurl, PHP_URL_SCHEME ); 48 $scheme = empty( $scheme ) ? 'http' : $scheme; 49 return esc_url( $scheme . '://' . $bloginfo->domain . $bloginfo->path ); 43 50 } 44 51 45 52 /** … … 218 225 switch_to_blog( $blog_id ); 219 226 $details->blogname = get_option( 'blogname' ); 220 227 $details->siteurl = get_option( 'siteurl' ); 228 $details->homeurl = get_option( 'home' ); 221 229 $details->post_count = get_option( 'post_count' ); 222 230 restore_current_blog(); 223 231