I have a custom db table that stores additional post data and I need to delete posts from my custom table when the original post is deleted.
Will WP fire the delete_post
action below and run my_function
when WP "automatically" deletes posts that have been trashed?
add_action( 'delete_post', 'my_function');
I can set up an option to manually purge my custom table if needed but I would prefer it to happen automatically.