function hook_modules_disabled

hook_modules_disabled($modules)

Perform necessary actions after modules are disabled.

This function differs from hook_disable() in that it gives all other modules a chance to perform actions when modules are disabled, whereas hook_disable() is only called on the module actually being disabled.

Parameters

$modules: An array of the modules that were disabled.

See also

hook_disable()

hook_modules_uninstalled()

Related topics

File

modules/system/system.api.php, line 2700
Hooks provided by Drupal core and the System module.

Code

function hook_modules_disabled($modules) {
  if (in_array('lousy_module', $modules)) {
    mymodule_enable_functionality();
  }
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!system!system.api.php/function/hook_modules_disabled/7.x