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:
@@ -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 ); ?> – {{ size.width }} × {{ size.height }}
|
||||
</option>
|
||||
<# } #>>
|
||||
<# } #>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</label>
|
||||
|
||||
Reference in New Issue
Block a user