Ticket #25235: 25235.diff
| File 25235.diff, 2.0 KB (added by , 13 years ago) |
|---|
-
src/wp-includes/ms-blogs.php
56 56 } 57 57 58 58 /** 59 * Get a full blog URL, given a domain and a path.60 *61 * @since MU62 *63 * @param string $domain64 * @param string $path65 * @return string66 */67 function get_blogaddress_by_domain( $domain, $path ) {68 if ( is_subdomain_install() ) {69 $url = "http://" . $domain.$path;70 } else {71 if ( $domain != $_SERVER['HTTP_HOST'] ) {72 $blogname = substr( $domain, 0, strpos( $domain, '.' ) );73 $url = 'http://' . substr( $domain, strpos( $domain, '.' ) + 1 ) . $path;74 // we're not installing the main blog75 if ( $blogname != 'www.' )76 $url .= $blogname . '/';77 } else { // main blog78 $url = 'http://' . $domain . $path;79 }80 }81 return esc_url_raw( $url );82 }83 84 /**85 59 * Given a blog's (subdomain or directory) slug, retrieve its id. 86 60 * 87 61 * @since MU -
src/wp-includes/deprecated.php
3378 3378 3379 3379 return $size . $unit; 3380 3380 } 3381 3382 /** 3383 * Get a full blog URL, given a domain and a path. 3384 * 3385 * @since MU 3386 * @deprecated 3.7.0 3387 * 3388 * @param string $domain 3389 * @param string $path 3390 * @return string 3391 */ 3392 function get_blogaddress_by_domain( $domain, $path ) { 3393 _deprecated_function( __FUNCTION__, '3.7' ); 3394 3395 if ( is_subdomain_install() ) { 3396 $url = "http://" . $domain.$path; 3397 } else { 3398 if ( $domain != $_SERVER['HTTP_HOST'] ) { 3399 $blogname = substr( $domain, 0, strpos( $domain, '.' ) ); 3400 $url = 'http://' . substr( $domain, strpos( $domain, '.' ) + 1 ) . $path; 3401 // we're not installing the main blog 3402 if ( $blogname != 'www.' ) 3403 $url .= $blogname . '/'; 3404 } else { // main blog 3405 $url = 'http://' . $domain . $path; 3406 } 3407 } 3408 return esc_url_raw( $url ); 3409 }