module_exist

Versions
4.6 – 4.7
module_exist($module)

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.

▾ 15 functions call module_exist()

block_admin_display in modules/block.module
Prepare the main block administration form.
chameleon_node in themes/chameleon/chameleon.theme
forum_page in modules/forum.module
Menu callback; prints a forum listing.
menu_rebuild in includes/menu.inc
Populate the database representation of the menu.
node_menu in modules/node.module
Implementation of hook_menu().
system_module_listing in modules/system.module
Generate a list of all the available modules, as well as update the system list.
system_theme_settings in modules/system.module
Menu callback; display theme configuration for entire site and individual themes.
theme_aggregator_block_item in modules/aggregator.module
Format an individual feed item for display in the block.
theme_forum_display in modules/forum.module
Format the forum body.
theme_get_settings in includes/theme.inc
Retrieve an associative array containing the settings for a theme.
theme_node in includes/theme.inc
Return a themed node.
tracker_page in modules/tracker.module
Menu callback. Prints a listing of active nodes on the site.
user_menu in modules/user.module
Implementation of hook_menu().
xtemplate_node in themes/engines/xtemplate/xtemplate.engine
_menu_build in includes/menu.inc
Build the menu by querying both modules and the database.

Code

includes/module.inc, line 98

<?php
function module_exist($module) {
  $list = module_list();
  return array_key_exists($module, $list);
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.