Don't stomp scheme arg. see #12736

git-svn-id: http://svn.automattic.com/wordpress/trunk@13882 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2010-03-29 20:25:30 +00:00
parent 27b9ed12f8
commit 3a69eacbbe
1 changed files with 6 additions and 2 deletions

View File

@ -1831,7 +1831,9 @@ function home_url( $path = '', $scheme = null ) {
*/
function get_home_url( $blog_id = null, $path = '', $scheme = null ) {
$orig_scheme = $scheme;
$scheme = is_ssl() && !is_admin() ? 'https' : 'http';
if ( !in_array($scheme, array('http', 'https')) )
$scheme = is_ssl() && !is_admin() ? 'https' : 'http';
if ( empty($blog_id) || !is_multisite() )
$home = get_option('home');
@ -2074,7 +2076,9 @@ function network_site_url( $path = '', $scheme = null ) {
function network_home_url( $path = '', $scheme = null ) {
global $current_site;
$orig_scheme = $scheme;
$scheme = is_ssl() && !is_admin() ? 'https' : 'http';
if ( !in_array($scheme, array('http', 'https')) )
$scheme = is_ssl() && !is_admin() ? 'https' : 'http';
$url = 'http://' . $current_site->domain . $current_site->path;