1.20.x node.module node_modules_enabled($modules)

Implements hook_modules_enabled().

File

modules/node/node.module, line 3610
The core module that allows content to be submitted to the site.

Code

function node_modules_enabled($modules) {
  // Check if any of the newly enabled modules require the node_access table to
  // be rebuilt.
  if (!node_access_needs_rebuild() && array_intersect($modules, module_implements('node_grants'))) {
    node_access_needs_rebuild(TRUE);
  }

  // Clear the cache of available node types in the event a module shipped with
  // a new node type configuration file.
  node_type_cache_reset();

  // Check if the enabled modules included any content types and enable the
  // ones associated with it.
  $node_types = node_type_get_types();
  foreach ($node_types as $type) {
    if (in_array($type->module, $modules)) {
      $type->disabled = FALSE;
      node_type_save($type);
    }
  }
}