Delete image files and meta entries from wp_postmeta
-
I have a plugin that uses upload images for advertizements and a admin area managing them.
When he decides to delete the image for a advertizement on the “admin” page I would like to delete the wp_postmeta entries as well as the image file in the uploads area.
For the deletion of the physical file I believe it’s as simple as unlink().
But wp_postmeta() is going to end up a mess! I’m not really extracting any data from it with my plugin but merely working with copied and pasted image links to update a advert.
Is there any way to target the relevant image file’s data in wp_postmeta()?
Maybe I am going about this the wrong way.
- The topic ‘Delete image files and meta entries from wp_postmeta’ is closed to new replies.