I need to run my function when a user deletes a media file from the media library. Is there a hook I can use?
Would appreciate it if someone could please point me to the right direction.
Thanks!
|
I need to run my function when a user deletes a media file from the media library. Is there a hook I can use? Would appreciate it if someone could please point me to the right direction. Thanks! |
|||
|
|
A more appropriate hook may be In case you want to know when media is added, hook |
|||
|
|
Ok, well the before_delete_post hook was the right hook to use. My function works :) |
|||||
|