Solved my use case!
-
I have clients that create attachments for a CPT, delete the post but leave the Media in the library. “Why is my site getting so big? The backups are HUGE now!” *facepalm*
Thank you for the code for the filter to only effect certain post types so they don’t break the site 😛
Very well thought out use case and code. So far works with WP 5.8.1 and Metabox CPTs.
- The topic ‘Solved my use case!’ is closed to new replies.