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