function hook_modules_installed

Perform necessary actions after modules are installed.

This function differs from hook_install() in that it gives all other modules a chance to perform actions when a module is installed, whereas hook_install() is only called on the module actually being installed. See module_enable() for a detailed description of the order in which install and enable hooks are invoked.

This hook should be implemented in a .module file, not in an .install file.


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

See also




Related topics

4 functions implement hook_modules_installed()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

locale_modules_installed in drupal/modules/locale/locale.module
Implements hook_modules_installed().
rdf_modules_installed in drupal/modules/rdf/rdf.module
Implements hook_modules_installed().
system_test_modules_installed in drupal/modules/simpletest/tests/system_test.module
Implements hook_modules_installed().
user_modules_installed in drupal/modules/user/user.module
Implements hook_modules_installed().
1 invocation of hook_modules_installed()
module_enable in drupal/includes/
Enables or installs a given list of modules.


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


function hook_modules_installed($modules) {
  if (in_array('lousy_module', $modules)) {
    variable_set('lousy_module_conflicting_variable', FALSE);