UPDATE (3 August 2012): In version 3.3.0 wordpress core provided direct activation/deactivation hook for themes (see the new usage below). (thanks to jacobsnyder for telling me about it) NOTE: The old approach will still work, so you don’t need to change your existing code if you were using the old approach. Activation hook: Code: <?php…