1
0
Fork 0
mirror of https://github.com/inretio/WordPress-Plugin-Boilerplate synced 2024-12-22 20:03:53 +02:00

Merge pull request #17 from innerbot/master

Added an uninstall hook
This commit is contained in:
Tom McFarlin 2012-11-12 05:05:37 -08:00
commit 47edae47e6

View file

@ -51,6 +51,7 @@ class PluginName {
register_activation_hook( __FILE__, array( $this, 'activate' ) ); register_activation_hook( __FILE__, array( $this, 'activate' ) );
register_deactivation_hook( __FILE__, array( $this, 'deactivate' ) ); register_deactivation_hook( __FILE__, array( $this, 'deactivate' ) );
register_uninstall_hook( __FILE__, array( $this, 'uninstall' ) );
/* /*
* TODO: * TODO:
@ -86,6 +87,15 @@ class PluginName {
// TODO define deactivation functionality here // TODO define deactivation functionality here
} // end deactivate } // 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 * Loads the plugin text domain for translation
*/ */