Ticket #22524: 22524.diff
File 22524.diff, 1.9 KB (added by , 12 years ago) |
---|
-
wp-includes/js/media-views.js
3403 3403 'change [data-setting]': 'updateSetting', 3404 3404 'change [data-setting] input': 'updateSetting', 3405 3405 'change [data-setting] select': 'updateSetting', 3406 'change [data-setting] textarea': 'updateSetting' 3406 'change [data-setting] textarea': 'updateSetting', 3407 'click .delete-attachment': 'remove' 3408 }, 3409 3410 remove: function(event) { 3411 event.preventDefault(); 3412 3413 if ( showNotice.warn() ) { 3414 $.get(deleteLink); 3415 // And then remove the model and clear the query cache... 3416 } 3407 3417 } 3408 3418 }); 3409 3419 -
wp-includes/media.php
1327 1327 'subtype' => $subtype, 1328 1328 'icon' => wp_mime_type_icon( $attachment->ID ), 1329 1329 'dateFormatted' => mysql2date( get_option('date_format'), $attachment->post_date ), 1330 'deleteLink' => str_replace( '&', '&', wp_nonce_url( "post.php?action=delete&post=$attachment->ID", 'delete-post_' . $attachment->ID ) ), 1331 'editLink' => get_edit_post_link( $attachment->ID, 'display' ), 1330 1332 ); 1331 1333 1332 1334 if ( $meta && 'image' === $type ) { … … 1642 1644 <# if ( 'image' === data.type && ! data.uploading ) { #> 1643 1645 <div class="dimensions">{{ data.width }} × {{ data.height }}</div> 1644 1646 <# } #> 1647 <div class="edit-link"> 1648 <a class="edit-attachment" href="{{ data.editLink }}" target="_blank"><?php _x( 'Edit', 'media item' ); ?></a> 1649 </div> 1650 <div class="delete-link"> 1651 <a class="delete-attachment" href="#"><?php _e( 'Delete Permanently' ) ?></a> 1652 </div> 1645 1653 </div> 1646 1654 <div class="compat-meta"> 1647 1655 <# if ( data.compat && data.compat.meta ) { #>