| | 3373 | // if we're switched on multisite and no specific scheme is requested, try to detect it from the URL |
| | 3374 | if ( is_multisite() && ! empty( $GLOBALS['_wp_switched_stack'] ) ) { |
| | 3375 | if ( ! $scheme |
| | 3376 | || ( 'admin' === $scheme || 'login' === $scheme || 'login_post' === $scheme || 'rpc' === $scheme ) && ! force_ssl_admin() |
| | 3377 | || 'http' !== $scheme && 'https' !== $scheme && 'relative' !== $scheme |
| | 3378 | ) { |
| | 3379 | if ( 0 === strpos( $url, 'https://' ) ) { |
| | 3380 | $scheme = 'https'; |
| | 3381 | } elseif ( 0 === strpos( $url, 'http://' ) ) { |
| | 3382 | $scheme = 'http'; |
| | 3383 | } |
| | 3384 | } |
| | 3385 | } |
| | 3386 | |