From d9b406b8dde54692935dc20a38ddc8602b233639 Mon Sep 17 00:00:00 2001 From: Greg Johnson Date: Sun, 11 Nov 2012 01:48:16 -0600 Subject: [PATCH] Added an uninstall hook --- plugin.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/plugin.php b/plugin.php index ff7415e..9c1a840 100644 --- a/plugin.php +++ b/plugin.php @@ -51,6 +51,7 @@ class PluginName { register_activation_hook( __FILE__, array( $this, 'activate' ) ); register_deactivation_hook( __FILE__, array( $this, 'deactivate' ) ); + register_uninstall_hook( __FILE__, array( $this, 'uninstall' ) ); /* * TODO: @@ -86,6 +87,15 @@ class PluginName { // TODO define deactivation functionality here } // end deactivate + /** + * Fired when the plugin is uninstalled. + * + * @params $network_wide True if WPMU superadmin uses "Network Activate" action, false if WPMU is disabled or plugin is activated on an individual blog + */ + public function uninstall( $network_wide ) { + // TODO define uninstall functionality here + } // end uninstall + /** * Loads the plugin text domain for translation */