Theme activation hooks

<?php

ActivationHooks::init();

class ActivationHooks {
function init(){
register_activation_hook(__FILE__,array(__CLASS__,'activate'));
register_deactivation_hook(__FILE__,array(__CLASS__,'deactivate'));
}
function activate(){
register_uninstall_hook(__FILE__,array(__CLASS__,'uninstall'));
}
function deactivate(){
// Remove cron jobs here
}
function uninstall(){
// Delete options here
}
}
?>

0 Comments

You must be logged in to post a comment.