Tried to find an or some hook to fire a function when theme is being delited, but didn't find any hook..
May be someone can tell if there's a way to fire my function on themes delete event?
I need it to delete options and drop tables on theme delete. ( for example )
Plugins do have uninstall.php
or register_uninstall_hook()
.
Need same for themes! any help ?
My thoughts so far:
create
new WP_Filesystem_$module
class and force WP to use myWP_Filesystem_$module
class for deleting themes, where i can insert custom actions atc.insert custom action in
deleted_site_transient
action, checking if it wasupdate_themes
transient and check if theme was delited, wich theme was deleted etc..
Both methods has different questions like how to force my class or how to check wich theme was deleted in deleted_site_transient
...
What's your thoughts on these ?