WordPress.org

Make WordPress Core

Ticket #7528: image-size-unavailable-r8655.patch

File image-size-unavailable-r8655.patch, 665 bytes (added by tellyworth, 6 years ago)
  • wp-admin/includes/media.php

     
    549549                        // is this size selectable? 
    550550                        $enabled = ( $downsize[3] || 'full' == $size ); 
    551551                        $css_id = "image-size-{$size}-{$post->ID}"; 
     552                        // if this size is the default but that's not available, don't select it 
     553                        if ( $checked && !$enabled ) 
     554                                $checked = ''; 
    552555                        // if $checked was not specified, default to the first available size that's bigger than a thumbnail 
    553556                        if ( !$checked && $enabled && 'thumbnail' != $size ) 
    554557                                $checked = $size;