function module_exists in Drupal 7
Same name and namespace in other branches
- 5 includes/module.inc \module_exists()
- 6 includes/module.inc \module_exists()
Determines whether a given module exists.
Parameters
string $module: The name of the module (without the .module extension).
Return value
bool TRUE if the module is both installed and enabled, FALSE otherwise.
43 calls to module_exists()
- aggregator_sanitize_configuration in modules/
aggregator/ aggregator.module - Checks and sanitizes the aggregator configuration.
- aggregator_save_category in modules/
aggregator/ aggregator.module - Adds/edits/deletes aggregator categories.
- aggregator_save_feed in modules/
aggregator/ aggregator.module - Add/edit/delete an aggregator feed.
- bartik_process_html in themes/
bartik/ template.php - Override or insert variables into the page template for HTML output.
- bartik_process_page in themes/
bartik/ template.php - Override or insert variables into the page template.
File
- includes/
module.inc, line 278 - API for loading and interacting with Drupal modules.
Code
function module_exists($module) {
$list = module_list();
return isset($list[$module]);
}