Yikes! Very sorry that this happened to you. I believe there are some bulk deletion plugins that you could use to clear all attachments.
As for resetting all of the video thumbnails, you should be able to make a small change so that when you use the “scan past posts” option it will clear the custom field for video thumbnails.
In video-thumbnails.php just change this:
function video_thumbnails_past_callback() {
global $wpdb; // this is how you get access to the database
$post_id = $_POST['post_id'];
// Clear video thumbnail meta before scanning
delete_post_meta( $post_id, '_video_thumbnail' );
echo get_the_title( $post_id ) . ' - ';
$video_thumbnail = get_video_thumbnail( $post_id );
if ( is_wp_error( $video_thumbnail ) ) {
echo $video_thumbnail->get_error_message();
} else if ( $video_thumbnail != null ) {
echo '<span style="color:green">✔</span> Success!';
} else {
echo '<span style="color:red">✖</span> Couldn\'t find a video thumbnail for this post.';
}
die();
}
to this:
function video_thumbnails_past_callback() {
global $wpdb; // this is how you get access to the database
$post_id = $_POST['post_id'];
// Clear video thumbnail meta
delete_post_meta( $post_id, '_video_thumbnail' );
echo get_the_title( $post_id ) . ' - Video Thumbnail meta deleted';
die();
}
Now when you run the “scan past posts” option on the settings page it will instead clear the video thumbnail information stored with the post. Once you undo the change, you can “scan past posts” normally and it will find new thumbnails.
Let me know if you need any more help. I’m in the process of version 2.0 and one of the changes is that all media uploaded as a video thumbnail is specially tagged so that if this type of bug happened again they can all be deleted with one click.
Thanks for your help with this. Much appreciated. It really is a great plugin and provides exactly the functionality I need. I’ll try this soon and let you know if I have questions, but it looks pretty straightforward.
Just wanted to report back that this method works very well. I appreciate your help.
In order to delete the images in a more reasonable fashion, I changed the screen options to show 999 images at a time. This resulted in a URI that was too long since the form was being sent as GET. I modified /wp-admin/upload.php so that the filter form used POST instead. It’s not ideal when you’re deleting 90000 or so images per blog, but it works.