module_exists

Versions
5 – 7
module_exists($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.

▾ 31 functions call module_exists()

aggregator_sanitize_configuration in modules/aggregator/aggregator.module
Check and sanitize aggregator configuration.
block_admin_configure in modules/block/block.admin.inc
Menu callback; displays the block configuration form.
block_block_info_alter in modules/block/block.module
Implement hook_block_info_alter().
cache_clear_all in includes/cache.inc
Expire data from the cache.
contact_help in modules/contact/contact.module
Implement hook_help().
dashboard_system_info_alter in modules/dashboard/dashboard.module
Implement hook_system_info_alter().
drupal_render_cid_parts in includes/common.inc
Helper function for building cache ids.
garland_process_html in themes/garland/template.php
Override or insert variables into the html template.
garland_process_page in themes/garland/template.php
Override or insert variables into the page template.
hook_field_extra_fields in modules/field/field.api.php
Expose "pseudo-field" components on fieldable objects.
image_style_flush in modules/image/image.module
Flush cached media for a style.
language_list in includes/bootstrap.inc
Get a list of languages set up indexed by the specified key
menu_get_active_help in includes/menu.inc
Returns the help associated with the active menu item.
menu_help in modules/menu/menu.module
Implement hook_help().
module_disable in includes/module.inc
Disable a given set of modules.
node_admin_nodes in modules/node/node.admin.inc
Form builder: Builds the node administration overview.
node_delete_multiple in modules/node/node.module
Delete multiple nodes.
node_field_build_modes in modules/node/node.module
Implement hook_field_build_modes().
node_filters in modules/node/node.admin.inc
List node administration filters that can be applied.
node_overview_types in modules/node/content_types.inc
Displays the content type admin overview page.
path_admin_overview in modules/path/path.admin.inc
Return a listing of all defined URL aliases.
syslog_form_system_logging_settings_alter in modules/syslog/syslog.module
Implement hook_form_FORM_ID_alter().
system_admin_by_module in modules/system/system.admin.inc
Menu callback; prints a listing of admin tasks for each installed module.
system_help in modules/system/system.module
Implement hook_help().
system_modules in modules/system/system.admin.inc
Menu callback; provides module enable/disable interface.
system_modules_submit in modules/system/system.admin.inc
Submit callback; handles modules form submission.
system_requirements in modules/system/system.install
Test and report Drupal installation requirements.
template_preprocess_user_picture in modules/user/user.module
Process variables for user-picture.tpl.php.
trigger_example_trigger_example in developer/examples/trigger_example.module
Implementation of hook_trigger_example().
update_results_page in ./update.php
user_admin_settings in modules/user/user.admin.inc
Form builder; Configure user settings for this site.

Code

includes/module.inc, line 210

<?php
function module_exists($module) {
  $list = module_list();
  return isset($list[$module]);
}
?>
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.