function module_exists in Drupal 5
Same name and namespace in other branches
- 6 includes/module.inc \module_exists()
- 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.
22 calls to module_exists()
- block_admin_display in modules/
block/ block.module - Generate main block administration form.
- 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().
- menu_primary_links in includes/
menu.inc - Returns an array containing the primary links. Can optionally descend from the root of the Primary links menu towards the current node for a specified number of levels and return that submenu. Used to generate a primary/secondary menu from different…
File
- includes/
module.inc, line 214 - API for loading and interacting with Drupal modules.
Code
function module_exists($module) {
$list = module_list();
return array_key_exists($module, $list);
}