mirror of
https://github.com/inretio/WordPress-Plugin-Boilerplate
synced 2024-12-23 04:13:53 +02:00
Added an uninstall hook
This commit is contained in:
parent
f522cbd0e2
commit
d9b406b8dd
1 changed files with 10 additions and 0 deletions
10
plugin.php
10
plugin.php
|
@ -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
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue