Media: When an image does not have all image sizes available, make sure we insert the requested size into the editor. props koopersmith. fixes #22693.

git-svn-id: http://core.svn.wordpress.org/trunk@23008 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin
2012-12-04 04:04:45 +00:00
parent 30cf064068
commit 156c5fef0f
2 changed files with 12 additions and 4 deletions

View File

@@ -1825,10 +1825,10 @@ function wp_print_media_templates() {
<#
var size = data.sizes['<?php echo esc_js( $value ); ?>'];
if ( size ) { #>
<option value="<?php echo esc_attr( $value ); ?>" <?php selected( $value, 'medium' ); ?>>
<option value="<?php echo esc_attr( $value ); ?>" <?php selected( $value, 'full' ); ?>>
<?php echo esc_html( $name ); ?> &ndash; {{ size.width }} &times; {{ size.height }}
</option>
<# } #>>
<# } #>
<?php endforeach; ?>
</select>
</label>