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.

Built from https://develop.svn.wordpress.org/trunk@31130


git-svn-id: http://core.svn.wordpress.org/trunk@31111 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2015-01-10 21:08:22 +00:00
parent aaae4e9df0
commit a6d6ba957b
2 changed files with 9 additions and 2 deletions

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 )

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.2-alpha-31129';
$wp_version = '4.2-alpha-31130';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.