Exist a function to check if module is installed?

Comments

nancydru’s picture

  if (module_exists('mymodule')) { print "Yes, it's there!"; }
  else { print "No, your module is not enabled."; }

Nancy W.
Drupal Cookbook (for New Drupallers)
Adding Hidden Design or How To notes in your database

marcuscavalcanti’s picture

The correct is module_exist in singular :)

nancydru’s picture

I use it with the "s" and it works just fine, but I haven't tried it in a theme function.

Nancy W.
Drupal Cookbook (for New Drupallers)
Adding Hidden Design or How To notes in your database

styro’s picture

the 's' was added in the 4.7 to 5 upgrade:

http://drupal.org/node/64279#module-exists

--
Anton
New to Drupal? | Troubleshooting FAQ
Example knowledge base built with Drupal