You are here

function module_exists in Drupal 6

Same name and namespace in other branches
  1. 5 includes/module.inc \module_exists()
  2. 7 includes/module.inc \module_exists()

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.

30 calls to module_exists()
block_admin_display_form in modules/block/block.admin.inc
Generate main blocks administration form.
block_help in modules/block/block.module
Implementation of hook_help().
blogapi_mt_validate_terms in modules/blogapi/blogapi.module
Blogging API helper - find allowed taxonomy terms for a node type.
chameleon_node in themes/chameleon/chameleon.theme
contact_help in modules/contact/contact.module
Implementation of hook_help().

... See full list

File

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

Code

function module_exists($module) {
  $list = module_list();
  return array_key_exists($module, $list);
}