Changeset 25276
- Timestamp:
- 09/06/2013 11:40:58 AM (11 years ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/ms-blogs.php
r25033 r25276 54 54 } 55 55 return esc_url( $url . '/' ); 56 }57 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 56 } 83 57 -
trunk/src/wp-includes/ms-deprecated.php
r24993 r25276 317 317 return 0; 318 318 } 319 320 /** 321 * Get a full blog URL, given a domain and a path. 322 * 323 * @since MU 324 * @deprecated 3.7.0 325 * 326 * @param string $domain 327 * @param string $path 328 * @return string 329 */ 330 function get_blogaddress_by_domain( $domain, $path ) { 331 _deprecated_function( __FUNCTION__, '3.7' ); 332 333 if ( is_subdomain_install() ) { 334 $url = "http://" . $domain.$path; 335 } else { 336 if ( $domain != $_SERVER['HTTP_HOST'] ) { 337 $blogname = substr( $domain, 0, strpos( $domain, '.' ) ); 338 $url = 'http://' . substr( $domain, strpos( $domain, '.' ) + 1 ) . $path; 339 // we're not installing the main blog 340 if ( $blogname != 'www.' ) 341 $url .= $blogname . '/'; 342 } else { // main blog 343 $url = 'http://' . $domain . $path; 344 } 345 } 346 return esc_url_raw( $url ); 347 }
Note: See TracChangeset
for help on using the changeset viewer.