Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add activation/deactivation hooks

  • Loading branch information...
commit 88fccec638695ecc2177e70cb8172cc38761e43d 1 parent a1ec8ed
@tylerdigital tylerdigital authored
Showing with 17 additions and 0 deletions.
  1. +17 −0 plugin.php
View
17 plugin.php
@@ -58,6 +58,9 @@ function __construct() {
// Load JavaScript and stylesheets
$this->register_scripts_and_styles();
+ register_activation_hook( __FILE__, array( &$this, 'activate' ) );
+ register_deactivation_hook( __FILE__, array( &$this, 'deactivate' ) );
+
/*
* TODO:
* Define the custom functionality for your plugin. The first parameter of the
@@ -74,6 +77,20 @@ function __construct() {
} // end constructor
+ function activate($network_wide) {
+ /*
+ TODO define activation functionality here
+ $network_wide is true if WPMU superadmin uses "Network Activate" action, false if WPMU is disabled or plugin is activated on an individual blog
+ */
+ }
+
+ function deactivate($network_wide) {
+ /*
+ TODO define deactivation functionality here
+ $network_wide is true if WPMU superadmin uses "Network Deactivate" action, false if WPMU is disabled or plugin is deactivated on an individual blog
+ */
+ }
+
/*--------------------------------------------*
* Core Functions
*---------------------------------------------*/
Please sign in to comment.
Something went wrong with that request. Please try again.