diff --git a/wp-admin/edit-attachment-rows.php b/wp-admin/edit-attachment-rows.php index eef8f0cf85..1b972a9f94 100644 --- a/wp-admin/edit-attachment-rows.php +++ b/wp-admin/edit-attachment-rows.php @@ -96,8 +96,10 @@ foreach ($posts_columns as $column_name => $column_display_name ) { $actions['untrash'] = "ID) . "'>" . __('Restore') . ""; elseif ( EMPTY_TRASH_DAYS && MEDIA_TRASH ) $actions['trash'] = "ID) . "'>" . __('Trash') . ""; - if ( $is_trash || !EMPTY_TRASH_DAYS || !MEDIA_TRASH ) - $actions['delete'] = "ID) . "'>" . __('Delete Permanently') . ""; + if ( $is_trash || !EMPTY_TRASH_DAYS || !MEDIA_TRASH ) { + $delete_ays = (!$is_trash && !MEDIA_TRASH) ? " onclick='return showNotice.warn();'" : ''; + $actions['delete'] = "ID) . "'>" . __('Delete Permanently') . ""; + } } if ( !$is_trash ) $actions['view'] = '' . __('View') . ''; diff --git a/wp-admin/upload.php b/wp-admin/upload.php index f0c9635c37..58c3a72a9f 100644 --- a/wp-admin/upload.php +++ b/wp-admin/upload.php @@ -392,10 +392,12 @@ foreach ($arc_result as $arc_row) { if ( current_user_can('edit_post', $post->ID) ) $actions['edit'] = '' . __('Edit') . ''; if ( current_user_can('delete_post', $post->ID) ) - if ( EMPTY_TRASH_DAYS && MEDIA_TRASH ) + if ( EMPTY_TRASH_DAYS && MEDIA_TRASH ) { $actions['trash'] = "ID) . "'>" . __('Trash') . ""; - else - $actions['delete'] = "ID) . "'>" . __('Delete Permanently') . ""; + } else { + $delete_ays = !MEDIA_TRASH ? " onclick='return showNotice.warn();'" : ''; + $actions['delete'] = "ID) . "'>" . __('Delete Permanently') . ""; + } $actions['view'] = '' . __('View') . ''; if ( current_user_can('edit_post', $post->ID) ) $actions['attach'] = ''.__('Attach').'';