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:
parent
c71437b94b
commit
3736e6b3f9
|
@ -497,7 +497,7 @@ function wp_print_media_templates() {
|
|||
<div class="dimensions">{{ data.width }} × {{ data.height }}</div>
|
||||
<# } #>
|
||||
|
||||
<# if ( data.can.save ) { #>
|
||||
<# if ( data.can.save && data.sizes ) { #>
|
||||
<a class="edit-attachment" href="{{ data.editLink }}&image-editor" target="_blank"><?php _e( 'Edit Image' ); ?></a>
|
||||
<a class="refresh-attachment" href="#"><?php _e( 'Refresh' ); ?></a>
|
||||
<# } #>
|
||||
|
|
Loading…
Reference in New Issue