diff --git a/wp-admin/css/wp-admin.dev.css b/wp-admin/css/wp-admin.dev.css index b1f0a7e3fd..1c68ce29df 100644 --- a/wp-admin/css/wp-admin.dev.css +++ b/wp-admin/css/wp-admin.dev.css @@ -4608,6 +4608,7 @@ h3.available-themes { .appearance_page_custom-header #headimg { border: 1px solid #DFDFDF; + overflow: hidden; width: 100%; } diff --git a/wp-admin/custom-header.php b/wp-admin/custom-header.php index aee52f199e..10a92df6b6 100644 --- a/wp-admin/custom-header.php +++ b/wp-admin/custom-header.php @@ -510,8 +510,14 @@ var farbtastic; admin_image_div_callback ) { 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() ) . ');'; + if ( $custom_header->width ) + $header_image_style .= 'max-width:' . $custom_header->width . 'px;'; + if ( $custom_header->height ) + $header_image_style .= 'height:' . $custom_header->height . 'px;'; ?> -