WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Did anyone test if this action is being executed on theme upgrade? Are there any other actions I could use to attach a theme uninstall function?

share|improve this question
No, i don't know, but i'm currently looking into it. I fav your Q and will head back here. Hope you update it too. – kaiser Mar 19 '11 at 16:51
"Does the switch_theme action run when you're upgrading a theme?" I wouldn't have thought so. – t31os Mar 20 '11 at 11:04
up vote 1 down vote accepted

My educated guess is that process is implemented in Theme_Upgrader class.

It does some stuff with upgrader_post_install hook (seems like a good candidate) and it does run switch_theme() under some conditions (that I am too lazy to make sense of at moment).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.