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
807 807 */ 808 808 function image_size_input_fields( $post, $checked = '' ) { 809 809 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 810 818 // get a list of the actual pixel dimensions of each possible intermediate version of this image 811 819 $size_names = array('thumbnail' => __('Thumbnail'), 'medium' => __('Medium'), 'large' => __('Large'), 'full' => __('Full size')); 812 820 … … 816 824 // is this size selectable? 817 825 $enabled = ( $downsize[3] || 'full' == $size ); 818 826 $css_id = "image-size-{$size}-{$post->ID}"; 819 // if this size is the default but that's not available, don't select it820 if ( $checked && !$enabled )821 $checked = '';822 827 // if $checked was not specified, default to the first available size that's bigger than a thumbnail 823 828 if ( !$checked && $enabled && 'thumbnail' != $size ) 824 829 $checked = $size;
