Changeset 25276 for trunk/src/wp-includes/ms-blogs.php
- Timestamp:
- 09/06/2013 11:40:58 AM (11 years ago)
- File:
-
- 1 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
Note: See TracChangeset
for help on using the changeset viewer.