1
0
Fork 0
mirror of https://github.com/inretio/WordPress-Plugin-Boilerplate synced 2025-04-19 05:35:36 +03:00

Moving the activation hook calls outside of the class

Fixes #42
This commit is contained in:
Tom McFarlin 2013-05-13 08:43:08 -04:00
parent 4cd689f925
commit 2b62a4e20a
2 changed files with 7 additions and 6 deletions

View file

@ -48,5 +48,10 @@ if ( ! defined( 'PLUGIN_NAME_VERSION' ) ) {
// TODO: replace `class-plugin-boilerplate.php` with the name of the actual plugin's class file
require_once( plugin_dir_path( __FILE__ ) . 'class-plugin-boilerplate.php' );
// Register hooks that are fired when the plugin is activated, deactivated, and uninstalled, respectively.
// TODO: replace PluginName with the name of the plugin defined in `class-plugin-boilerplate.php`
register_activation_hook( __FILE__, array( 'PluginName', 'activate' ) );
register_deactivation_hook( __FILE__, array( 'PluginName', 'deactivate' ) );
// TODO: replace PluginName with the name of the plugin defined in `class-plugin-boilerplate.php`
PluginName::get_instance();