WordPress.org

Make WordPress Core

Ticket #21130: 21130.3.patch

File 21130.3.patch, 1.3 KB (added by SergeyBiryukov, 3 years ago)
  • wp-admin/css/wp-admin.dev.css

     
    46014601 
    46024602.appearance_page_custom-header #headimg { 
    46034603        border: 1px solid #DFDFDF; 
     4604        overflow: hidden; 
    46044605        width: 100%; 
    46054606} 
    46064607 
  • wp-admin/custom-header.php

     
    510510        <?php if ( $this->admin_image_div_callback ) { 
    511511          call_user_func( $this->admin_image_div_callback ); 
    512512        } else { 
     513                $header_image_style = 'background-image:url(' . esc_url( get_header_image() ) . ');'; 
     514                if ( get_custom_header()->width ) 
     515                        $header_image_style .= 'max-width:' . get_custom_header()->width . 'px;'; 
     516                if ( get_custom_header()->height ) 
     517                        $header_image_style .= 'height:' . get_custom_header()->height . 'px;'; 
    513518        ?> 
    514         <div id="headimg" style="background-image:url(<?php esc_url ( header_image() ) ?>);max-width:<?php echo get_custom_header()->width; ?>px;height:<?php echo get_custom_header()->height; ?>px;"> 
     519        <div id="headimg" style="<?php echo $header_image_style; ?>"> 
    515520                <?php 
    516521                if ( display_header_text() ) 
    517522                        $style = ' style="color:#' . get_header_textcolor() . ';"';