Changeset 17005 for trunk/wp-includes/ms-blogs.php
- Timestamp:
- 12/16/2010 07:48:00 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/ms-blogs.php
r16987 r17005 31 31 * 32 32 * @param int $blog_id Blog ID 33 * @param string $scheme Optional. Scheme to give the URL. Currently 'http', 'https'34 33 * @return string 35 34 */ 36 function get_blogaddress_by_id( $blog_id, $scheme = null ) { 37 if ( ! in_array( $scheme, array( 'http', 'https' ) ) ) 38 $scheme = is_ssl() ? 'https' : 'http'; 39 35 function get_blogaddress_by_id( $blog_id ) { 40 36 $bloginfo = get_blog_details( (int) $blog_id, false ); // only get bare details! 41 return esc_url( "$scheme://". $bloginfo->domain . $bloginfo->path );37 return esc_url( 'http://' . $bloginfo->domain . $bloginfo->path ); 42 38 } 43 39 … … 72 68 * @param string $domain 73 69 * @param string $path 74 * @param string $scheme Optional. Scheme to give the URL. Currently 'http', 'https'75 70 * @return string 76 71 */ 77 function get_blogaddress_by_domain( $domain, $path, $scheme = null ) { 78 if ( ! in_array( $scheme, array( 'http', 'https' ) ) ) 79 $scheme = is_ssl() ? 'https' : 'http'; 80 72 function get_blogaddress_by_domain( $domain, $path ) { 81 73 if ( is_subdomain_install() ) { 82 $url = " $scheme://" .$domain.$path;74 $url = "http://".$domain.$path; 83 75 } else { 84 76 if ( $domain != $_SERVER['HTTP_HOST'] ) { 85 77 $blogname = substr( $domain, 0, strpos( $domain, '.' ) ); 86 $url = "$scheme://". substr( $domain, strpos( $domain, '.' ) + 1 ) . $path;78 $url = 'http://' . substr( $domain, strpos( $domain, '.' ) + 1 ) . $path; 87 79 // we're not installing the main blog 88 80 if ( $blogname != 'www.' ) 89 81 $url .= $blogname . '/'; 90 82 } else { // main blog 91 $url = "$scheme://". $domain . $path;83 $url = 'http://' . $domain . $path; 92 84 } 93 85 }
Note: See TracChangeset
for help on using the changeset viewer.