Plugin hooks for Plugin activity (2 posts)

  1. Johnb81
    Posted 2 years ago #

    I would like to know if there are any hooks available which can be used to detect other WordPress plugins activity. Basically I would like to trigger an action when an administrator:

    1. installs a plugin
    2. activates a plugin
    3. deactivates a plugin
    4. Uninstalls / deletes a plugin

    Thanks in advance for your answers.

  2. bcworkz
    Posted 2 years ago #

    There are 'activated_plugin' and 'deactivated_plugin' actions. I'm unaware of a way to detect if the files were simply installed. There is a 'uninstall_{$file}' action, but of course you need to know what $file is. In any case, it's possible to add or delete plugin files without WP being involved at all, so install and uninstall actions would be unreliable.

Topic Closed

This topic has been closed to new replies.

About this Topic