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

Fixes #28038.

Built from https://develop.svn.wordpress.org/trunk@29529


git-svn-id: http://core.svn.wordpress.org/trunk@29305 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2014-08-18 02:42:17 +00:00
parent c71437b94b
commit 3736e6b3f9
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>
<# } #>