From c1f57342f3bf4e9b08f3f6a479c6a75afb7ed034 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Tue, 19 Aug 2008 17:08:18 +0000 Subject: [PATCH] Don't default to an unselectable image size. Props tellyworth. fixes #7528 for trunk git-svn-id: https://develop.svn.wordpress.org/trunk@8670 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/media.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index 6481ee4ee2..bb372f0e98 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -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;