mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
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:
@@ -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 )
|
||||
|
||||
Reference in New Issue
Block a user