Skip to content

Instantly share code, notes, and snippets.

@fdrobidoux
Forked from wp-kitten/gist:2bf444f0cc10bd06bf4e
Last active August 29, 2015 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fdrobidoux/c5b0f4be87eece26c86e to your computer and use it in GitHub Desktop.
Save fdrobidoux/c5b0f4be87eece26c86e to your computer and use it in GitHub Desktop.
<?php
/*
* Add this code to your theme's functions.php file
*/
// Theme activation
add_action("after_switch_theme", "theme_activated");
function theme_activation_hook(){
error_log('theme activated');
}
// Theme deactivation
add_action('switch_theme', 'theme_deactivated');
function theme_deactivation_hook () {
error_log('theme deactivated');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment