module_exists

Versions
5 – 7
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.

▾ 23 functions call 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().
hook_search in developer/hooks/core.php
Define a custom search routine.
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...
menu_rebuild in includes/menu.inc
Populate the database representation of the menu.
module_disable in includes/module.inc
Disable a given set of modules.
node_menu in modules/node/node.module
Implementation of hook_menu().
node_revision_revert_confirm_submit in modules/node/node.module
node_search in modules/node/node.module
Implementation of hook_search().
phptemplate_node in themes/engines/phptemplate/phptemplate.engine
Prepare the values passed to the theme_node function to be passed into a pluggable template engine.
system_modules in modules/system/system.module
Menu callback; provides module enable/disable interface.
system_theme_settings in modules/system/system.module
Menu callback; display theme configuration for entire site and individual themes.
system_update_1010 in modules/system/system.install
theme_aggregator_block_item in modules/aggregator/aggregator.module
Format an individual feed item for display in the block.
theme_block_admin_display in modules/block/block.module
Theme main block administration form submission.
theme_get_settings in includes/theme.inc
Retrieve an associative array containing the settings for a theme.
theme_node in includes/theme.inc
Return a themed node.
theme_system_modules in modules/system/system.module
Theme call back for the modules form.
user_menu in modules/user/user.module
Implementation of hook_menu().
_menu_build in includes/menu.inc
Build the menu by querying both modules and the database.
_phptemplate_variables in themes/garland/template.php
Override or insert PHPTemplate variables into the templates.

Code

includes/module.inc, line 214

<?php
function module_exists($module) {
  $list = module_list();
  return array_key_exists($module, $list);
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.