1.20.x module.inc 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 277
API for loading and interacting with Backdrop modules.

Code

function module_exists($module) {
  $list = module_list();
  return isset($list[$module]);
}