Make get_header_image() ssl-aware. fixes #14835.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16846 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
5fd4580daa
commit
0036c52101
|
@ -1417,7 +1417,14 @@ function header_textcolor() {
|
||||||
function get_header_image() {
|
function get_header_image() {
|
||||||
$default = defined( 'HEADER_IMAGE' ) ? HEADER_IMAGE : '';
|
$default = defined( 'HEADER_IMAGE' ) ? HEADER_IMAGE : '';
|
||||||
|
|
||||||
return get_theme_mod('header_image', $default);
|
$url = get_theme_mod( 'header_image', $default );
|
||||||
|
|
||||||
|
if ( is_ssl() )
|
||||||
|
$url = str_replace( 'http://', 'https://', $url );
|
||||||
|
else
|
||||||
|
$url = str_replace( 'https://', 'http://', $url );
|
||||||
|
|
||||||
|
return $url;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue