From 3a69eacbbe310b75fed31e967bd9e1d404450f8a Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 29 Mar 2010 20:25:30 +0000 Subject: [PATCH] Don't stomp scheme arg. see #12736 git-svn-id: http://svn.automattic.com/wordpress/trunk@13882 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/link-template.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php index cbc3ccc3a..f4a8751cd 100644 --- a/wp-includes/link-template.php +++ b/wp-includes/link-template.php @@ -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;