function module_exists
module_exists($module)
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.
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]); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/includes!module.inc/function/module_exists/7.x