Closed jeremyboggs closed 9 years ago
We can hook onto the delete_post action to do this, but that action only fires when the game is deleted permanently (not just put in the trash). I have a working version in these two commits: 610706e540b31948f79a0b32cf181a837a960140 and 3d9570ee421d15e015ed7f3aaa017c5dfcbe25ca
Is this enough or do we want the delete to happen when just going to the trash?
I also did this specifying each custom post type (move, role, role journal), but we could combine into a single function.
Is this enough or do we want the delete to happen when just going to the trash?
I suppose moving a game to the trash should subsequently move its associated content—moves, roles, journal entries—to their respective trashes. That sounds like good fun.
Implemented in 1910ffe351b1fa13bcea7e26ac37001294cf0855 and 7613e5030a59c1d407d52b778ed3fa4ddce5b79c
I switched it so that when the game is put in the trash, the children (move, role, role journal) are also put in the trash.
It probably should, I suppose.