My client is using WordPress for real estate listings. Currently, she is not cleaning up her listings and running out of disk space. What WordPress configuration is possible to have WordPress delete the pictures associated with a page / post that was deleted. As it stands now, I would have to note the pictures and then go into the media library.
My client is using WordPress for real estate listings. Currently, she is not cleaning
Share
This should do the trick …
Disclaimer : Never tried this , so please TEST on a non-production environment first – or use at your own risk…
EDIT I: thanks to @Dale Sattler for comment
EDIT II: added
add_action('trash_post', 'o99_delete_post_children');to support also “move to trash” action in admin list post (and not one by one delete)