Skip navigation
Help

module_exists

6 module.inc module_exists($module)
7 module.inc module_exists($module)

Determine whether a given module exists.

Parameters

$module: The name of the module (without the .module extension).

Return value

TRUE if the module is both installed and enabled.

86 calls to module_exists()

File

drupal/includes/module.inc, line 246
API for loading and interacting with Drupal modules.

Code

function module_exists($module) {
  $list = module_list();
  return isset($list[$module]);
}