1
0
Fork 0
mirror of https://github.com/inretio/WordPress-Plugin-Boilerplate synced 2024-12-23 04:13:53 +02:00

Moved uninstall placeholder from hook to uninstall.php

This commit is contained in:
Japh 2013-03-05 16:24:35 +11:00
parent 4f1cd0cbbf
commit 816e16c59f
2 changed files with 10 additions and 10 deletions

View file

@ -52,7 +52,6 @@ class PluginName {
// Register hooks that are fired when the plugin is activated, deactivated, and uninstalled, respectively. // Register hooks that are fired when the plugin is activated, deactivated, and uninstalled, respectively.
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:
@ -88,15 +87,6 @@ class PluginName {
// TODO: Define deactivation functionality here // TODO: Define deactivation functionality here
} // end deactivate } // end deactivate
/**
* Fired when the plugin is uninstalled.
*
* @param boolean $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
*/ */

View file

@ -0,0 +1,10 @@
<?php
/**
* Fired when the plugin is uninstalled.
*/
//if uninstall not called from WordPress exit
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) )
exit ();
// TODO: Define uninstall functionality here