mirror of
git://develop.git.wordpress.org/
synced 2025-02-28 02:22:25 +01:00
Make get_header_image() ssl-aware. fixes #14835.
git-svn-id: https://develop.svn.wordpress.org/trunk@16846 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
1527d28dca
commit
0979c21ab0
@ -1415,9 +1415,16 @@ function header_textcolor() {
|
|||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
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…
x
Reference in New Issue
Block a user