Codex tools: Log in
Runs when the blog's theme is changed. Action function argument: name of the new theme. If used in a theme, it only works if the theme that adds action is the one being enabled. Can be used to run certain code when enabling a theme.
<?php add_action('after_switch_theme', 'theme_activation_function'); ?>