diff --git a/src/wp-includes/media-template.php b/src/wp-includes/media-template.php
index 65803d4..c9774a7 100644
a
|
b
|
function wp_print_media_templates() { |
276 | 276 | </script> |
277 | 277 | |
278 | 278 | <script type="text/html" id="tmpl-attachment-details"> |
| 279 | <# var settings = wp.media.view.settings; #> |
279 | 280 | <h3> |
280 | 281 | <?php _e('Attachment Details'); ?> |
281 | 282 | |
… |
… |
function wp_print_media_templates() { |
304 | 305 | <# } #> |
305 | 306 | |
306 | 307 | <# if ( data.can.save ) { #> |
307 | | <a class="edit-attachment" href="{{ data.editLink }}&image-editor" target="_blank"><?php _e( 'Edit Image' ); ?></a> |
| 308 | <# if ( _.contains( settings.imageEditorSupports, data.mime ) ) { #> |
| 309 | <a class="edit-attachment" href="{{ data.editLink }}&image-editor" target="_blank"><?php _e( 'Edit Image' ); ?></a> |
| 310 | <# } #> |
308 | 311 | <a class="refresh-attachment" href="#"><?php _e( 'Refresh' ); ?></a> |
309 | 312 | <# } #> |
310 | 313 | <# } #> |
diff --git a/src/wp-includes/media.php b/src/wp-includes/media.php
index f9b47e4..615e706 100644
a
|
b
|
function wp_enqueue_media( $args = array() ) { |
2782 | 2782 | } |
2783 | 2783 | } |
2784 | 2784 | |
| 2785 | $image_mime_types = array( 'image/bmp', 'image/gif', 'image/jpeg', 'image/jpeg', 'image/jpeg', 'image/png', 'image/tiff', 'image/tiff', ); |
| 2786 | $image_editor_supports = array(); |
| 2787 | foreach ( $image_mime_types as $mime_type ) { |
| 2788 | if ( wp_image_editor_supports( array( 'mime_type' => $mime_type ) ) ) |
| 2789 | $settings['imageEditorSupports'][] = $mime_type; |
| 2790 | } |
| 2791 | |
2785 | 2792 | $hier = $post && is_post_type_hierarchical( $post->post_type ); |
2786 | 2793 | |
2787 | 2794 | $strings = array( |