Ticket #12085: 12085.diff
File 12085.diff, 5.8 KB (added by , 14 years ago) |
---|
-
wp-admin/upload.php
388 388 $actions['edit'] = '<a href="' . get_edit_post_link($post->ID, true) . '">' . __('Edit') . '</a>'; 389 389 if ( current_user_can('delete_post', $post->ID) ) 390 390 if ( EMPTY_TRASH_DAYS && MEDIA_TRASH ) { 391 $actions['trash'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=trash&post=$post->ID", 'trash- post_' . $post->ID) . "'>" . __('Trash') . "</a>";391 $actions['trash'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=trash&post=$post->ID", 'trash-attachment_' . $post->ID) . "'>" . __('Trash') . "</a>"; 392 392 } else { 393 393 $delete_ays = !MEDIA_TRASH ? " onclick='return showNotice.warn();'" : ''; 394 $actions['delete'] = "<a class='submitdelete'$delete_ays href='" . wp_nonce_url("post.php?action=delete&post=$post->ID", 'delete- post_' . $post->ID) . "'>" . __('Delete Permanently') . "</a>";394 $actions['delete'] = "<a class='submitdelete'$delete_ays href='" . wp_nonce_url("post.php?action=delete&post=$post->ID", 'delete-attachment_' . $post->ID) . "'>" . __('Delete Permanently') . "</a>"; 395 395 } 396 396 $actions['view'] = '<a href="' . get_permalink($post->ID) . '" title="' . esc_attr(sprintf(__('View “%s”'), $title)) . '" rel="permalink">' . __('View') . '</a>'; 397 397 if ( current_user_can('edit_post', $post->ID) ) -
wp-admin/includes/media.php
1245 1245 $send = "<input type='submit' class='button' name='send[$attachment_id]' value='" . esc_attr__( 'Insert into Post' ) . "' />"; 1246 1246 if ( $delete && current_user_can( 'delete_post', $attachment_id ) ) { 1247 1247 if ( !EMPTY_TRASH_DAYS ) { 1248 $delete = "<a href='" . wp_nonce_url( "post.php?action=delete&post=$attachment_id", 'delete- post_' . $attachment_id ) . "' id='del[$attachment_id]' class='delete'>" . __( 'Delete Permanently' ) . '</a>';1248 $delete = "<a href='" . wp_nonce_url( "post.php?action=delete&post=$attachment_id", 'delete-attachment_' . $attachment_id ) . "' id='del[$attachment_id]' class='delete'>" . __( 'Delete Permanently' ) . '</a>'; 1249 1249 } elseif ( !MEDIA_TRASH ) { 1250 1250 $delete = "<a href='#' class='del-link' onclick=\"document.getElementById('del_attachment_$attachment_id').style.display='block';return false;\">" . __( 'Delete' ) . "</a> 1251 1251 <div id='del_attachment_$attachment_id' class='del-attachment' style='display:none;'>" . sprintf( __( 'You are about to delete <strong>%s</strong>.' ), $filename ) . " 1252 <a href='" . wp_nonce_url( "post.php?action=delete&post=$attachment_id", 'delete- post_' . $attachment_id ) . "' id='del[$attachment_id]' class='button'>" . __( 'Continue' ) . "</a>1252 <a href='" . wp_nonce_url( "post.php?action=delete&post=$attachment_id", 'delete-attachment_' . $attachment_id ) . "' id='del[$attachment_id]' class='button'>" . __( 'Continue' ) . "</a> 1253 1253 <a href='#' class='button' onclick=\"this.parentNode.style.display='none';return false;\">" . __( 'Cancel' ) . "</a> 1254 1254 </div>"; 1255 1255 } else { 1256 $delete = "<a href='" . wp_nonce_url( "post.php?action=trash&post=$attachment_id", 'trash- post_' . $attachment_id ) . "' id='del[$attachment_id]' class='delete'>" . __( 'Move to Trash' ) . "</a>1257 <a href='" . wp_nonce_url( "post.php?action=untrash&post=$attachment_id", 'untrash- post_' . $attachment_id ) . "' id='undo[$attachment_id]' class='undo hidden'>" . __( 'Undo' ) . "</a>";1256 $delete = "<a href='" . wp_nonce_url( "post.php?action=trash&post=$attachment_id", 'trash-attachment_' . $attachment_id ) . "' id='del[$attachment_id]' class='delete'>" . __( 'Move to Trash' ) . "</a> 1257 <a href='" . wp_nonce_url( "post.php?action=untrash&post=$attachment_id", 'untrash-attachment_' . $attachment_id ) . "' id='undo[$attachment_id]' class='undo hidden'>" . __( 'Undo' ) . "</a>"; 1258 1258 } 1259 1259 } else { 1260 1260 $delete = ''; -
wp-admin/edit-attachment-rows.php
93 93 $actions['edit'] = '<a href="' . get_edit_post_link($post->ID, true) . '">' . __('Edit') . '</a>'; 94 94 if ( current_user_can('delete_post', $post->ID) ) { 95 95 if ( $is_trash ) 96 $actions['untrash'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=untrash&post=$post->ID", 'untrash- post_' . $post->ID) . "'>" . __('Restore') . "</a>";96 $actions['untrash'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=untrash&post=$post->ID", 'untrash-attachment_' . $post->ID) . "'>" . __('Restore') . "</a>"; 97 97 elseif ( EMPTY_TRASH_DAYS && MEDIA_TRASH ) 98 $actions['trash'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=trash&post=$post->ID", 'trash- post_' . $post->ID) . "'>" . __('Trash') . "</a>";98 $actions['trash'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=trash&post=$post->ID", 'trash-attachment_' . $post->ID) . "'>" . __('Trash') . "</a>"; 99 99 if ( $is_trash || !EMPTY_TRASH_DAYS || !MEDIA_TRASH ) { 100 100 $delete_ays = (!$is_trash && !MEDIA_TRASH) ? " onclick='return showNotice.warn();'" : ''; 101 $actions['delete'] = "<a class='submitdelete'$delete_ays href='" . wp_nonce_url("post.php?action=delete&post=$post->ID", 'delete- post_' . $post->ID) . "'>" . __('Delete Permanently') . "</a>";101 $actions['delete'] = "<a class='submitdelete'$delete_ays href='" . wp_nonce_url("post.php?action=delete&post=$post->ID", 'delete-attachment_' . $post->ID) . "'>" . __('Delete Permanently') . "</a>"; 102 102 } 103 103 } 104 104 if ( !$is_trash ) {