Use set_url_scheme(). Props johnbillion, MarcusPope. see #19037 #20759

git-svn-id: https://develop.svn.wordpress.org/trunk@21664 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2012-08-30 13:33:00 +00:00
parent bca5b5538d
commit 92ea34f6a2
14 changed files with 43 additions and 68 deletions

View File

@@ -891,12 +891,7 @@ function get_header_image() {
if ( is_random_header_image() )
$url = get_random_header_image();
if ( is_ssl() )
$url = str_replace( 'http://', 'https://', $url );
else
$url = str_replace( 'https://', 'http://', $url );
return esc_url_raw( $url );
return esc_url_raw( set_url_scheme( $url ) );
}
/**