Ticket #22524: 22524.3.patch
File 22524.3.patch, 2.1 KB (added by , 12 years ago) |
---|
-
wp-includes/js/media-views.js
3271 3271 'change [data-setting]': 'updateSetting', 3272 3272 'change [data-setting] input': 'updateSetting', 3273 3273 'change [data-setting] select': 'updateSetting', 3274 'change [data-setting] textarea': 'updateSetting' 3274 'change [data-setting] textarea': 'updateSetting', 3275 'click .delete-attachment': 'remove', 3276 'click .edit-attachment': 'edit' 3277 }, 3278 3279 edit: function(event) { 3280 event.preventDefault(); 3281 var editLink = this.model.attributes.editLink.replace(/&/g, "&"); 3282 window.open(editLink, '_blank'); 3283 }, 3284 3285 remove: function(event) { 3286 event.preventDefault(); 3287 3288 if ( showNotice.warn() ) { 3289 var deleteLink = this.model.attributes.deleteLink.replace(/&/g, "&"); 3290 $.get(deleteLink); 3291 } 3275 3292 } 3276 3293 }); 3277 3294 -
wp-includes/media.php
1265 1265 'subtype' => $subtype, 1266 1266 'icon' => wp_mime_type_icon( $attachment->ID ), 1267 1267 'dateFormatted' => mysql2date( get_option('date_format'), $attachment->post_date ), 1268 'deleteLink' => wp_nonce_url( "post.php?action=delete&post=$attachment->ID", 'delete-post_' . $attachment->ID ), 1269 'editLink' => get_edit_post_link( $attachment->ID, true ), 1268 1270 ); 1269 1271 1270 1272 if ( $meta && 'image' === $type ) { … … 1501 1503 <# if ( 'image' === data.type && ! data.uploading ) { #> 1502 1504 <div class="dimensions">{{ data.width }} × {{ data.height }}</div> 1503 1505 <# } #> 1506 <div class="edit-link"> 1507 <a class="edit-attachment" href="#"><?php _e( 'Edit' ) ?></a> 1508 </div> 1509 <div class="delete-link"> 1510 <a class="delete-attachment" href="#"><?php _e( 'Delete Permanently' ) ?></a> 1511 </div> 1504 1512 </div> 1505 1513 <div class="compat-meta"> 1506 1514 <# if ( data.compat && data.compat.meta ) { #>