Ticket #21194: 21194.patch
File 21194.patch, 2.0 KB (added by , 12 years ago) |
---|
-
wp-admin/includes/media.php
1159 1159 if ( $send ) 1160 1160 $send = get_submit_button( __( 'Insert into Post' ), 'button', "send[$attachment_id]", false ); 1161 1161 if ( $delete && current_user_can( 'delete_post', $attachment_id ) ) { 1162 if ( !EMPTY_TRASH_DAYS ) { 1163 $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>'; 1164 } elseif ( !MEDIA_TRASH ) { 1162 if ( !MEDIA_TRASH ) { 1165 1163 $delete = "<a href='#' class='del-link' onclick=\"document.getElementById('del_attachment_$attachment_id').style.display='block';return false;\">" . __( 'Delete' ) . "</a> 1166 1164 <div id='del_attachment_$attachment_id' class='del-attachment' style='display:none;'><p>" . sprintf( __( 'You are about to delete <strong>%s</strong>.' ), $filename ) . "</p> 1167 1165 <a href='" . wp_nonce_url( "post.php?action=delete&post=$attachment_id", 'delete-attachment_' . $attachment_id ) . "' id='del[$attachment_id]' class='button'>" . __( 'Continue' ) . "</a> 1168 1166 <a href='#' class='button' onclick=\"this.parentNode.style.display='none';return false;\">" . __( 'Cancel' ) . "</a> 1169 1167 </div>"; 1170 1168 } else { 1171 $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>1169 $delete = "<a href='" . wp_nonce_url( "post.php?action=trash&post=$attachment_id", 'trash-attachment_' . $attachment_id ) . "' id='del[$attachment_id]'>" . __( 'Move to Trash' ) . "</a> 1172 1170 <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>"; 1173 1171 } 1174 1172 } else {