Is there a way to detect if a blog was deleted, deactivated or archived within a Multisite installation ?
Something that will be the opposite of wpmu_new_blog
I’ve search google, wasn’t much help.
Searched here found: WPMU Hook for archive or deactivate blog?
This post looks relevant however they did not cover deletion nor was it confirmed working by the ‘op’.
Thanks
If you look at the top answer of the question you found you can read that the user found the hook
wpmu_deactivate_blog
on wpseek.com.Searching for
delete_blog
got me here: delete_blog. I thinkdelete_blog
is the hook you’re looking for. Try it and maybe you can confirm it yourself.From the WP3.0 source:
delete_blog
is an Action hook that’s fired in thewpmu_delete_blog
function.By the looks of it, the function switches to the right blog before firing the
delete_blog
action hook.