|
@@ 2998-3004 (lines=7) @@
|
| 2995 |
|
|
| 2996 |
|
$orig_scheme = $scheme; |
| 2997 |
|
|
| 2998 |
|
if ( empty( $blog_id ) || !is_multisite() ) { |
| 2999 |
|
$url = get_option( 'home' ); |
| 3000 |
|
} else { |
| 3001 |
|
switch_to_blog( $blog_id ); |
| 3002 |
|
$url = get_option( 'home' ); |
| 3003 |
|
restore_current_blog(); |
| 3004 |
|
} |
| 3005 |
|
|
| 3006 |
|
if ( ! in_array( $scheme, array( 'http', 'https', 'relative' ) ) ) { |
| 3007 |
|
if ( is_ssl() && ! is_admin() && 'wp-login.php' !== $pagenow ) |
|
@@ 3068-3074 (lines=7) @@
|
| 3065 |
|
* @return string Site URL link with optional path appended. |
| 3066 |
|
*/ |
| 3067 |
|
function get_site_url( $blog_id = null, $path = '', $scheme = null ) { |
| 3068 |
|
if ( empty( $blog_id ) || !is_multisite() ) { |
| 3069 |
|
$url = get_option( 'siteurl' ); |
| 3070 |
|
} else { |
| 3071 |
|
switch_to_blog( $blog_id ); |
| 3072 |
|
$url = get_option( 'siteurl' ); |
| 3073 |
|
restore_current_blog(); |
| 3074 |
|
} |
| 3075 |
|
|
| 3076 |
|
$url = set_url_scheme( $url, $scheme ); |
| 3077 |
|
|