module_exist

Definition

module_exist($module)
includes/module.inc, line 90

Description

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.

Code

<?php
function module_exist($module) {
  $list = module_list();
  return array_key_exists($module, $list);
}
?>
 
 

Drupal is a registered trademark of Dries Buytaert.