Media Modal: don't show the "Edit Image" button for attachments that don't have `data.sizes` set.

Fixes #28038.


git-svn-id: https://develop.svn.wordpress.org/trunk@29529 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2014-08-18 02:41:46 +00:00
parent e67f53149d
commit 8691d31bdc
1 changed files with 1 additions and 1 deletions

View File

@ -497,7 +497,7 @@ function wp_print_media_templates() {
<div class="dimensions">{{ data.width }} &times; {{ data.height }}</div>
<# } #>
<# if ( data.can.save ) { #>
<# if ( data.can.save && data.sizes ) { #>
<a class="edit-attachment" href="{{ data.editLink }}&amp;image-editor" target="_blank"><?php _e( 'Edit Image' ); ?></a>
<a class="refresh-attachment" href="#"><?php _e( 'Refresh' ); ?></a>
<# } #>