WordPress.org

Codex

Plugin API/Action Reference/after switch theme

This page is marked as incomplete. You can help Codex by expanding it.

Description

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.

Usage

 <?php add_action('after_switch_theme''theme_activation_function'); ?> 

Related