Ticket #11021: wp-bug-11021-admin-includes-media.php.patch

File wp-bug-11021-admin-includes-media.php.patch, 1.2 KB (added by miqrogroove, 4 years ago)
  • wp-admin/includes/media.php

     
    807807 */ 
    808808function image_size_input_fields( $post, $checked = '' ) { 
    809809 
     810                // Validate params 
     811                if ($checked) { 
     812                        $downsize = image_downsize($post->ID, $checked); 
     813                        $enabled = ( $downsize[3] || 'full' == $checked ); 
     814                        if (!$enabled) 
     815                                $checked = ''; 
     816                } 
     817 
    810818                // get a list of the actual pixel dimensions of each possible intermediate version of this image 
    811819                $size_names = array('thumbnail' => __('Thumbnail'), 'medium' => __('Medium'), 'large' => __('Large'), 'full' => __('Full size')); 
    812820 
     
    816824                        // is this size selectable? 
    817825                        $enabled = ( $downsize[3] || 'full' == $size ); 
    818826                        $css_id = "image-size-{$size}-{$post->ID}"; 
    819                         // if this size is the default but that's not available, don't select it 
    820                         if ( $checked && !$enabled ) 
    821                                 $checked = ''; 
    822827                        // if $checked was not specified, default to the first available size that's bigger than a thumbnail 
    823828                        if ( !$checked && $enabled && 'thumbnail' != $size ) 
    824829                                $checked = $size;