get_header_image() can return false. In Custom_Image_Header->step_1(), check the value before setting the background-image portion of the style attribute. Setting the the URL to empty string will cause the current request to be set as the source of the background image.

See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31130 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2015-01-10 21:07:54 +00:00
parent 0f54cc95b3
commit d4c4205f31

View File

@ -554,7 +554,14 @@ class Custom_Image_Header {
call_user_func( $this->admin_image_div_callback );
} else {
$custom_header = get_custom_header();
$header_image_style = 'background-image:url(' . esc_url( get_header_image() ) . ');';
$header_image = get_header_image();
if ( $header_image ) {
$header_image_style = 'background-image:url(' . esc_url( $header_image ) . ');';
} else {
$header_image_style = '';
}
if ( $custom_header->width )
$header_image_style .= 'max-width:' . $custom_header->width . 'px;';
if ( $custom_header->height )