I think you might be jumping the gun with actively discarding the data here. What if next month trolls go away, you change your mind, and want all those featured images back?
I would just suppress them on front end by editing template and making thumbnail output conditional or filtering API with something like this:
if ( ! is_admin() ) {
add_filter( 'get_post_metadata', function ( $null, $post_id, $meta_key ) {
if ( '_thumbnail_id' === $meta_key ) { // add check for date or whatever
return false;
}
return $null;
}, 10, 3 );
}
This way you retain all the existing data, just prevent featured images from showing. If you change your mind just remove the check and everything is back.
Related Posts:
- show first 3 thumbnails of posts in different sizes [closed]
- Missing feature image link function
- Get recent posts with thumbnail
- How to display the_post_thumbnail if a post has one or otherwise display the first image in a post?
- Add options to featured image
- Linking thumbnail to full size image
- Why are image thumbnails cropped proportionally (not per dimensions)?
- Add a Post Thumbnail to an RSS Feed with custom size
- Automated mark posts as featured every day
- get excerpt without images
- Why are image thumbnails cropped proportionally (not per dimensions)?
- Display 4 chronological posts starting with a random post
- Setting featured image with function, 1 part not working
- Removing the first image in content
- How to make thumbnail image fit into a div where image dimentions are completely different?
- When to use an if statement after get_posts?
- img width and height attributes being set by get_the_post_thumbnail
- Get the 5 lastest Featured Posts from a category
- How to Display Image Meta underneath EVERY image in EVERY post
- Update Content based on expiration time or queued processing
- How to display a default image for post thumbnail using functions.php?
- Woocommerce Attributes pulling in wrong data
- Getting Featured Image Caption to Only Show if Populated
- wp_get_attachment_image function size argument not working if I also add a custom class
- Can’t check if a post has thumbnail adding filter to get_post_metadata()
- Add Featured image column into wordpress admin on pages AND posts
- Post thumbnail not showing in WP admin area for custom post type
- Overwriting Parent Theme’s Image Sizes
- Backstretch.js and thumbnail sizes to reduce loading time
- set_post_thumbnail when user is not logged in
- How to stop twenty fifteen theme from cropping featured images?
- Create a new query in function.php to filter blog posts
- Can you put a condition on add_image_size() depending on the width of the uploaded image?
- Set spesific size of featured images
- How can this crude function be improved?
- height should be set to auto to avoid pixelation in the post thumbnail function
- It does not work concatenation in function.php
- WordPress function, Run using Crontab
- How to retrieve the current post’s generated featured image size?
- Check if the image size is available and if not use ‘full’ image size
- Test if a post exists by category and date
- Turn get_posts as string into an array for use in theme admin options
- is there a way to remove featured image from blog page and single page
- How to hide image-url if no attachment?
- Can set_post_thumbnail be used to remove a thumbnail?
- Can’t locate custom image sizes defined by child theme
- Is it possible to use array_walk() to append terms to an array of posts?
- Else/If Statement to Display Photo Descriptions
- How to add a new image size and apply it to posts only?
- How to use get_posts() function in functions.php
- Fallback image URL if no featured image exists via a shortcode function
- Display a random tag but using cron to control frequency of change
- Show Featured Image in else statement
- Get the alt text of the image in a array
- If no author posts, echo out some text
- Change custom featured image size in twentythirteen child theme
- resizing of thumbnails not working
- show all the posts thumbnails
- struggling with syntax for the_post_thumbnail();
- include w_thumbnail_src in function?
- Unzip file in functions.php, and add it to cron
- Custom image sizes showing in Classic Editor only when upladed directly to post
- Can/should we delete wordpress cron jobs with no action?
- Run function with schedule is not working correctly
- Bulk updating a group of WordPress Pages every 10 minutes
- Add Featured Image to Existing Post
- Which filter fires upon setting a featured image
- Can I use ‘Featured Image’ as a hero image and a thumbnail?
- How to put 2 php codes in functions.php without site crashing
- remove_filter function to unhook twentysixteen parent theme function
- Can You Set A Minimum Image Dimension For Resizing Images?
- Exclude admins from query get posts
- How to link all featured images to custom url in single.php for only non-logged-in users?
- How to add a cron job in my functions.php
- Featured image on archive page based on post type
- Displaying POST content with HTML tags and all
- Printing medium sized image
- Sticky – Featured Image
- Update (a function) post’s featured image as soon as $image_url changes
- Frontend Feature image upload not work
- Slider Thumbnail Size Issue [closed]
- same get_posts function works diffrently in tag.php and functions.php
- How to exclude posts with empty and non-existent relational custom field with meta_query?
- Display most popular posts
- insert thumbnail image from php script
- Can’t put a hyperlink on Featured Post’s Image
- Apply height and width for the_content() inside youtube video tag
- Set thumbnail from URL, by grabbing image in functions.php
- Overwriting a Shortcode
- add_theme_support not outputting thumbnails
- WP supersize not displaying when different languages flags are selected
- Full size image option removing problem
- Way of getting queried loop before the query with a filter hook?
- Image width issue in IE [closed]
- add if statement to the featured image
- image_size with respect to aspect ratios
- Remove default Image Sizes
- Is mytheme_post_thumbnails() still necessary?
- Generate and upload screenshot as featured image for user-submitted post
- Link on post title only if post have content