WordPress.org

Ready to get started?Download WordPress

Codex

Plugin API/Action Reference/activated plugin

This page is marked as incomplete. You can help Codex by expanding it.

Description

This hook is run immediately after any plugin is activated, and may be used to detect the activation of plugins.

Example

function detect_plugin_activation(  $plugin, $network_activation ) {
    // do stuff
}
add_action( 'activated_plugin', 'detect_plugin_activation', 10, 2 );

Related

  • Action: activated_plugin - runs when any plugin is activated
  • Action: deactivated_plugin - runs when any plugin is deactivated