Exists a function to verify if specific module is enable?

Comments

nevets’s picture

module_exists(), it takes one argument, the module you are checking for. So for example to see if the blog module is enable you could

<?php
if ( module_exists('blog') ) {
  // Blog module exists
}
?>
marcuscavalcanti’s picture

Thanks nevets.

I thought that function noted that the module existed in the path of Drupal, but not necessarily if it was active