Don't default to an unselectable image size. Props tellyworth. fixes #7528 for trunk

git-svn-id: http://svn.automattic.com/wordpress/trunk@8670 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-08-19 17:08:18 +00:00
parent 42b36e1e64
commit 4104795d70
1 changed files with 3 additions and 0 deletions

View File

@ -549,6 +549,9 @@ function image_size_input_fields($post, $checked='') {
// is this size selectable?
$enabled = ( $downsize[3] || 'full' == $size );
$css_id = "image-size-{$size}-{$post->ID}";
// if this size is the default but that's not available, don't select it
if ( $checked && !$enabled )
$checked = '';
// if $checked was not specified, default to the first available size that's bigger than a thumbnail
if ( !$checked && $enabled && 'thumbnail' != $size )
$checked = $size;