Hooks

Allow modules to interact with the Drupal core.

Drupal's module system is based on the concept of "hooks". A hook is a PHP function that is named foo_bar(), where "foo" is the name of the module (whose filename is thus foo.module) and "bar" is the name of the hook. Each hook has a defined set of parameters and a specified result type.

To extend Drupal, a module need simply implement a hook. When Drupal wishes to allow intervention from modules, it determines which modules implement a hook and calls that hook in all enabled modules that implement it.

The available hooks to implement are explained here in the Hooks section of the developer documentation. The string "hook" is used as a placeholder for the module name in the hook definitions. For example, if the module file is called example.module, then hook_help() as implemented by that module would be defined as example_help().

The example functions included are not part of the Drupal core, they are just models that you can modify. Only the hooks implemented within modules are executed when running Drupal.

See also the themeable group page.

Groups

NameLocationDescription
Field Formatter APImodules/field/field.api.phpDefine Field API formatter types.
Field Types APImodules/field/field.api.phpDefine field types.
Field Widget APImodules/field/field.api.phpDefine Field API widget types.

Functions & methods

NameLocationDescription
hook_actions_deletemodules/system/system.api.phpExecutes code after an action is deleted.
hook_action_infomodules/system/system.api.phpDeclares information about actions.
hook_action_info_altermodules/system/system.api.phpAlters the actions declared by another module.
hook_admin_pathsmodules/system/system.api.phpDefine administrative paths.
hook_admin_paths_altermodules/system/system.api.phpRedefine administrative paths defined by other modules.
hook_aggregator_fetchmodules/aggregator/aggregator.api.phpCreate an alternative fetcher for aggregator.module.
hook_aggregator_fetch_infomodules/aggregator/aggregator.api.phpSpecify the title and short description of your fetcher.
hook_aggregator_parsemodules/aggregator/aggregator.api.phpCreate an alternative parser for aggregator module.
hook_aggregator_parse_infomodules/aggregator/aggregator.api.phpSpecify the title and short description of your parser.
hook_aggregator_processmodules/aggregator/aggregator.api.phpCreate a processor for aggregator.module.
hook_aggregator_process_infomodules/aggregator/aggregator.api.phpSpecify the title and short description of your processor.
hook_aggregator_removemodules/aggregator/aggregator.api.phpRemove stored feed data.
hook_ajax_render_altermodules/system/system.api.phpAlter the commands that are sent to the user through the Ajax framework.
hook_archiver_infomodules/system/system.api.phpDeclare archivers to the system.
hook_archiver_info_altermodules/system/system.api.phpAlter archiver information declared by other modules.
hook_batch_altermodules/system/system.api.phpAlter batch information before a batch is processed.
hook_block_configuremodules/block/block.api.phpDefine a configuration form for a block.
hook_block_infomodules/block/block.api.phpDefine all blocks provided by the module.
hook_block_info_altermodules/block/block.api.phpChange block definition before saving to the database.
hook_block_list_altermodules/block/block.api.phpAct on blocks prior to rendering.
hook_block_savemodules/block/block.api.phpSave the configuration options from hook_block_configure().
hook_block_viewmodules/block/block.api.phpReturn a rendered or renderable view of a block.
hook_block_view_altermodules/block/block.api.phpPerform alterations to the content of a block.
hook_block_view_MODULE_DELTA_altermodules/block/block.api.phpPerform alterations to a specific block.
hook_bootmodules/system/system.api.phpPerform setup tasks for all page requests.
hook_comment_deletemodules/comment/comment.api.phpThe comment is being deleted by the moderator.
hook_comment_insertmodules/comment/comment.api.phpThe comment is being inserted.
hook_comment_loadmodules/comment/comment.api.phpComments are being loaded from the database.
hook_comment_presavemodules/comment/comment.api.phpThe comment passed validation and is about to be saved.
hook_comment_publishmodules/comment/comment.api.phpThe comment is being published by the moderator.
hook_comment_unpublishmodules/comment/comment.api.phpThe comment is being unpublished by the moderator.
hook_comment_updatemodules/comment/comment.api.phpThe comment is being updated.
hook_comment_viewmodules/comment/comment.api.phpThe comment is being viewed. This hook can be used to add additional data to the comment before theming.
hook_comment_view_altermodules/comment/comment.api.phpThe comment was built; the module may modify the structured content.
hook_contextual_links_view_altermodules/contextual/contextual.api.phpAlter a contextual links element before it is rendered.
hook_countries_altermodules/system/system.api.phpAlter the default country list.
hook_cronmodules/system/system.api.phpPerform periodic actions.
hook_cron_queue_infomodules/system/system.api.phpDeclare queues holding items that need to be run periodically.
hook_cron_queue_info_altermodules/system/system.api.phpAlter cron queue information before cron runs.
hook_css_altermodules/system/system.api.phpAlter CSS files before they are output on the page.
hook_custom_thememodules/system/system.api.phpReturn the machine-readable name of the theme to use for the current page.
hook_dashboard_regionsmodules/dashboard/dashboard.api.phpAdd regions to the dashboard.
hook_dashboard_regions_altermodules/dashboard/dashboard.api.phpAlter dashboard regions provided by modules.
hook_date_formatsmodules/system/system.api.phpDefine additional date formats.
hook_date_formats_altermodules/system/system.api.phpAlter date formats declared by another module.
hook_date_format_typesmodules/system/system.api.phpDefine additional date types.
hook_date_format_types_altermodules/system/system.api.phpModify existing date types.
hook_deletemodules/node/node.api.phpRespond to node deletion.
hook_disablemodules/system/system.api.phpPerform necessary actions before module is disabled.
hook_drupal_goto_altermodules/system/system.api.phpChange the page the user is sent to by drupal_goto().
hook_element_infomodules/system/system.api.phpAllows modules to declare their own Forms API element types and specify their default values.
hook_element_info_altermodules/system/system.api.phpAlter the element type information returned from modules.
hook_enablemodules/system/system.api.phpPerform necessary actions after module is enabled.
hook_entity_deletemodules/system/system.api.phpAct on entities when deleted.
hook_entity_infomodules/system/system.api.phpInform the base system and the Field API about one or more entity types.
hook_entity_info_altermodules/system/system.api.phpAlter the entity info.
hook_entity_insertmodules/system/system.api.phpAct on entities when inserted.
hook_entity_loadmodules/system/system.api.phpAct on entities when loaded.
hook_entity_prepare_viewmodules/system/system.api.phpAct on entities as they are being prepared for view.
hook_entity_presavemodules/system/system.api.phpAct on an entity before it is about to be created or updated.
hook_entity_query_altermodules/system/system.api.phpAlter or execute an EntityFieldQuery.
hook_entity_updatemodules/system/system.api.phpAct on entities when updated.
hook_entity_viewmodules/system/system.api.phpAct on entities being assembled before rendering.
hook_entity_view_altermodules/system/system.api.phpAlter the results of ENTITY_view().
hook_exitmodules/system/system.api.phpPerform cleanup tasks.
hook_field_accessmodules/field/field.api.phpDetermine whether the user has access to a given field.
hook_field_attach_create_bundlemodules/field/field.api.phpAct on field_attach_create_bundle().
hook_field_attach_deletemodules/field/field.api.phpAct on field_attach_delete().
hook_field_attach_delete_bundlemodules/field/field.api.phpAct on field_attach_delete_bundle.
hook_field_attach_delete_revisionmodules/field/field.api.phpAct on field_attach_delete_revision().
hook_field_attach_formmodules/field/field.api.phpAct on field_attach_form().
hook_field_attach_insertmodules/field/field.api.phpAct on field_attach_insert().
hook_field_attach_loadmodules/field/field.api.phpAct on field_attach_load().
hook_field_attach_prepare_translation_altermodules/field/field.api.phpPerform alterations on field_attach_prepare_translation().
hook_field_attach_preprocess_altermodules/field/field.api.phpAlter field_attach_preprocess() variables.
hook_field_attach_presavemodules/field/field.api.phpAct on field_attach_presave().
hook_field_attach_purgemodules/field/field.api.phpAct on field_purge_data().
hook_field_attach_rename_bundlemodules/field/field.api.phpAct on field_attach_rename_bundle().
hook_field_attach_submitmodules/field/field.api.phpAct on field_attach_submit().
hook_field_attach_updatemodules/field/field.api.phpAct on field_attach_update().
hook_field_attach_validatemodules/field/field.api.phpAct on field_attach_validate().
hook_field_attach_view_altermodules/field/field.api.phpPerform alterations on field_attach_view() or field_view_field().
hook_field_available_languages_altermodules/field/field.api.phpAlter field_available_languages() values.
hook_field_create_fieldmodules/field/field.api.phpAct on a field being created.
hook_field_create_instancemodules/field/field.api.phpAct on a field instance being created.
hook_field_deletemodules/field/field.api.phpDefine custom delete behavior for this module's field data.
hook_field_delete_fieldmodules/field/field.api.phpAct on a field being deleted.
hook_field_delete_instancemodules/field/field.api.phpAct on a field instance being deleted.
hook_field_delete_revisionmodules/field/field.api.phpDefine custom revision delete behavior for this module's field types.
hook_field_display_altermodules/field/field.api.phpAlters the display settings of a field before it gets displayed.
hook_field_display_ENTITY_TYPE_altermodules/field/field.api.phpAlters the display settings of a field on a given entity type before it gets displayed.
hook_field_extra_fieldsmodules/field/field.api.phpExposes "pseudo-field" components on fieldable entities.
hook_field_extra_fields_altermodules/field/field.api.phpAlter "pseudo-field" components on fieldable entities.
hook_field_extra_fields_display_altermodules/field/field.api.phpAlters the display settings of pseudo-fields before an entity is displayed.
hook_field_formatter_infomodules/field/field.api.phpExpose Field API formatter types.
hook_field_formatter_info_altermodules/field/field.api.phpPerform alterations on Field API formatter types.
hook_field_formatter_prepare_viewmodules/field/field.api.phpAllow formatters to load information for field values being displayed.
hook_field_formatter_viewmodules/field/field.api.phpBuild a renderable array for a field value.
hook_field_infomodules/field/field.api.phpDefine Field API field types.
hook_field_info_altermodules/field/field.api.phpPerform alterations on Field API field types.
hook_field_info_max_weightmodules/field/field.api.phpReturns the maximum weight for the entity components handled by the module.
hook_field_insertmodules/field/field.api.phpDefine custom insert behavior for this module's field data.
hook_field_is_emptymodules/field/field.api.phpDefine what constitutes an empty item for a field type.
hook_field_language_altermodules/field/field.api.phpPerform alterations on field_language() values.
hook_field_loadmodules/field/field.api.phpDefine custom load behavior for this module's field types.
hook_field_prepare_translationmodules/field/field.api.phpDefine custom prepare_translation behavior for this module's field types.
hook_field_prepare_viewmodules/field/field.api.phpPrepare field values prior to display.
hook_field_presavemodules/field/field.api.phpDefine custom presave behavior for this module's field types.
hook_field_purge_fieldmodules/field/field.api.phpActs when a field record is being purged.
hook_field_purge_instancemodules/field/field.api.phpActs when a field instance is being purged.
hook_field_read_fieldmodules/field/field.api.phpAct on field records being read from the database.
hook_field_read_instancemodules/field/field.api.phpAct on a field record being read from the database.
hook_field_schemamodules/field/field.api.phpDefine the Field API schema for a field structure.
hook_field_storage_create_fieldmodules/field/field.api.phpAct on creation of a new field.
hook_field_storage_deletemodules/field/field.api.phpDelete all field data for an entity.
hook_field_storage_delete_fieldmodules/field/field.api.phpAct on deletion of a field.
hook_field_storage_delete_instancemodules/field/field.api.phpAct on deletion of a field instance.
hook_field_storage_delete_revisionmodules/field/field.api.phpDelete a single revision of field data for an entity.
hook_field_storage_detailsmodules/field/field.api.phpReveal the internal details about the storage for a field.
hook_field_storage_details_altermodules/field/field.api.phpPerform alterations on Field API storage details.
hook_field_storage_infomodules/field/field.api.phpExpose Field API storage backends.
hook_field_storage_info_altermodules/field/field.api.phpPerform alterations on Field API storage types.
hook_field_storage_loadmodules/field/field.api.phpLoad field data for a set of entities.
hook_field_storage_pre_insertmodules/field/field.api.phpAct before the storage backends insert field data.
hook_field_storage_pre_loadmodules/field/field.api.phpAct before the storage backends load field data.
hook_field_storage_pre_updatemodules/field/field.api.phpAct before the storage backends update field data.
hook_field_storage_purgemodules/field/field.api.phpRemove field storage information when field data is purged.
hook_field_storage_purge_fieldmodules/field/field.api.phpRemove field storage information when a field record is purged.
hook_field_storage_purge_field_instancemodules/field/field.api.phpRemove field storage information when a field instance is purged.
hook_field_storage_querymodules/field/field.api.phpExecute an EntityFieldQuery.
hook_field_storage_update_fieldmodules/field/field.api.phpUpdate the storage information for a field.
hook_field_storage_writemodules/field/field.api.phpWrite field data for an entity.
hook_field_updatemodules/field/field.api.phpDefine custom update behavior for this module's field data.
hook_field_update_fieldmodules/field/field.api.phpAct on a field being updated.
hook_field_update_forbidmodules/field/field.api.phpForbid a field update from occurring.
hook_field_update_instancemodules/field/field.api.phpAct on a field instance being updated.
hook_field_validatemodules/field/field.api.phpValidate this module's field data.
hook_field_widget_errormodules/field/field.api.phpFlag a field-level validation error.
hook_field_widget_formmodules/field/field.api.phpReturn the form for a single field widget.
hook_field_widget_form_altermodules/field/field.api.phpAlter forms for field widgets provided by other modules.
hook_field_widget_infomodules/field/field.api.phpExpose Field API widget types.
hook_field_widget_info_altermodules/field/field.api.phpPerform alterations on Field API widget types.
hook_field_widget_properties_altermodules/field/field.api.phpAlters the widget properties of a field instance before it gets displayed.
hook_field_widget_properties_ENTITY_TYPE_altermodules/field/field.api.phpAlters the widget properties of a field instance on a given entity type before it gets displayed.
hook_field_widget_WIDGET_TYPE_form_altermodules/field/field.api.phpAlter widget forms for a specific widget provided by another module.
hook_filetransfer_infomodules/system/system.api.phpRegister information about FileTransfer classes provided by a module.
hook_filetransfer_info_altermodules/system/system.api.phpAlter the FileTransfer class registry.
hook_file_copymodules/system/system.api.phpRespond to a file that has been copied.
hook_file_deletemodules/system/system.api.phpRespond to a file being deleted.
hook_file_downloadmodules/system/system.api.phpControl access to private file downloads and specify HTTP headers.
hook_file_insertmodules/system/system.api.phpRespond to a file being added.
hook_file_loadmodules/system/system.api.phpLoad additional information into file objects.
hook_file_mimetype_mapping_altermodules/system/system.api.phpAlter MIME type mappings used to determine MIME type from a file extension.
hook_file_movemodules/system/system.api.phpRespond to a file that has been moved.
hook_file_presavemodules/system/system.api.phpAct on a file being inserted or updated.
hook_file_updatemodules/system/system.api.phpRespond to a file being updated.
hook_file_url_altermodules/system/system.api.phpAlter the URL to a file.
hook_file_validatemodules/system/system.api.phpCheck that files meet a given criteria.
hook_filter_format_disablemodules/filter/filter.api.phpPerform actions when a text format has been disabled.
hook_filter_format_insertmodules/filter/filter.api.phpPerform actions when a new text format has been created.
hook_filter_format_updatemodules/filter/filter.api.phpPerform actions when a text format has been updated.
hook_filter_infomodules/filter/filter.api.phpDefine content filters.
hook_filter_info_altermodules/filter/filter.api.phpPerform alterations on filter definitions.
hook_flush_cachesmodules/system/system.api.phpAdd a list of cache tables to be cleared.
hook_formmodules/node/node.api.phpDisplay a node editing form.
hook_formsmodules/system/system.api.phpMap form_ids to form builder functions.
hook_form_altermodules/system/system.api.phpPerform alterations before a form is rendered.
hook_form_BASE_FORM_ID_altermodules/system/system.api.phpProvide a form-specific alteration for shared ('base') forms.
hook_form_FORM_ID_altermodules/system/system.api.phpProvide a form-specific alteration instead of the global hook_form_alter().
hook_helpmodules/help/help.api.phpProvide online user help.
hook_hook_infomodules/system/system.api.phpDefines one or more hooks that are exposed by a module.
hook_hook_info_altermodules/system/system.api.phpAlter information from hook_hook_info().
hook_html_head_altermodules/system/system.api.phpAlter XHTML HEAD tags before they are rendered by drupal_get_html_head().
hook_image_default_stylesmodules/image/image.api.phpProvide module-based image styles for reuse throughout Drupal.
hook_image_effect_infomodules/image/image.api.phpDefine information about image effects provided by a module.
hook_image_effect_info_altermodules/image/image.api.phpAlter the information provided in hook_image_effect_info().
hook_image_styles_altermodules/image/image.api.phpModify any image styles provided by other modules or the user.
hook_image_style_deletemodules/image/image.api.phpRespond to image style deletion.
hook_image_style_flushmodules/image/image.api.phpRespond to image style flushing.
hook_image_style_savemodules/image/image.api.phpRespond to image style updating.
hook_image_toolkitsmodules/system/system.api.phpDefine image toolkits provided by this module.
hook_initmodules/system/system.api.phpPerform setup tasks for non-cached page requests.
hook_insertmodules/node/node.api.phpRespond to creation of a new node.
hook_installmodules/system/system.api.phpPerform setup tasks when the module is installed.
hook_install_tasksmodules/system/system.api.phpReturn an array of tasks to be performed by an installation profile.
hook_install_tasks_altermodules/system/system.api.phpAlter the full list of installation tasks.
hook_js_altermodules/system/system.api.phpPerform necessary alterations to the JavaScript before it is presented on the page.
hook_language_fallback_candidates_altermodules/system/language.api.phpPerform alterations on the language fallback candidates.
hook_language_initmodules/system/language.api.phpAllows modules to act after language initialization has been performed.
hook_language_negotiation_infomodules/system/language.api.phpAllow modules to define their own language providers.
hook_language_negotiation_info_altermodules/system/language.api.phpPerform alterations on language providers.
hook_language_switch_links_altermodules/system/language.api.phpPerform alterations on language switcher links.
hook_language_types_infomodules/system/language.api.phpAllow modules to define their own language types.
hook_language_types_info_altermodules/system/language.api.phpPerform alterations on language types.
hook_librarymodules/system/system.api.phpRegisters JavaScript/CSS libraries associated with a module.
hook_library_altermodules/system/system.api.phpAlters the JavaScript/CSS library registry.
hook_loadmodules/node/node.api.phpAct on nodes being loaded from the database.
hook_localemodules/locale/locale.api.phpAllows modules to define their own text groups that can be translated.
hook_mailmodules/system/system.api.phpPrepare a message based on parameters; called from drupal_mail().
hook_mail_altermodules/system/system.api.phpAlter an email message created with the drupal_mail() function.
hook_menumodules/system/system.api.phpDefine menu items and page callbacks.
hook_menu_altermodules/system/system.api.phpAlter the data being saved to the {menu_router} table after hook_menu is invoked.
hook_menu_breadcrumb_altermodules/system/system.api.phpAlter links in the active trail before it is rendered as the breadcrumb.
hook_menu_contextual_links_altermodules/system/system.api.phpAlter contextual links before they are rendered.
hook_menu_deletemodules/menu/menu.api.phpInforms modules that a custom menu was deleted.
hook_menu_get_item_altermodules/system/system.api.phpAlter a menu router item right after it has been retrieved from the database or cache.
hook_menu_insertmodules/menu/menu.api.phpInforms modules that a custom menu was created.
hook_menu_link_altermodules/system/system.api.phpAlter the data being saved to the {menu_links} table by menu_link_save().
hook_menu_link_deletemodules/system/system.api.phpInform modules that a menu link has been deleted.
hook_menu_link_insertmodules/system/system.api.phpInform modules that a menu link has been created.
hook_menu_link_updatemodules/system/system.api.phpInform modules that a menu link has been updated.
hook_menu_local_tasks_altermodules/system/system.api.phpAlter tabs and actions displayed on the page before they are rendered.
hook_menu_site_status_altermodules/system/system.api.phpControl site status before menu dispatching.
hook_menu_updatemodules/menu/menu.api.phpInforms modules that a custom menu was updated.
hook_modules_disabledmodules/system/system.api.phpPerform necessary actions after modules are disabled.
hook_modules_enabledmodules/system/system.api.phpPerform necessary actions after modules are enabled.
hook_modules_installedmodules/system/system.api.phpPerform necessary actions after modules are installed.
hook_modules_uninstalledmodules/system/system.api.phpPerform necessary actions after modules are uninstalled.
hook_module_implements_altermodules/system/system.api.phpAlter the registry of modules implementing a hook.
hook_multilingual_settings_changedmodules/locale/locale.api.phpAllow modules to react to language settings changes.
hook_node_accessmodules/node/node.api.phpControl access to a node.
hook_node_access_recordsmodules/node/node.api.phpSet permissions for a node to be written to the database.
hook_node_access_records_altermodules/node/node.api.phpAlter permissions for a node before it is written to the database.
hook_node_deletemodules/node/node.api.phpRespond to node deletion.
hook_node_grantsmodules/node/node.api.phpInform the node access system what permissions the user has.
hook_node_grants_altermodules/node/node.api.phpAlter user access rules when trying to view, edit or delete a node.
hook_node_infomodules/node/node.api.phpDefine module-provided node types.
hook_node_insertmodules/node/node.api.phpRespond to creation of a new node.
hook_node_loadmodules/node/node.api.phpAct on nodes being loaded from the database.
hook_node_operationsmodules/node/node.api.phpAdd mass node operations.
hook_node_preparemodules/node/node.api.phpAct on a node object about to be shown on the add/edit form.
hook_node_presavemodules/node/node.api.phpAct on a node being inserted or updated.
hook_node_revision_deletemodules/node/node.api.phpRespond to deletion of a node revision.
hook_node_search_resultmodules/node/node.api.phpAct on a node being displayed as a search result.
hook_node_submitmodules/node/node.api.phpAct on a node after validated form values have been copied to it.
hook_node_type_deletemodules/node/node.api.phpRespond to node type deletion.
hook_node_type_insertmodules/node/node.api.phpRespond to node type creation.
hook_node_type_updatemodules/node/node.api.phpRespond to node type updates.
hook_node_updatemodules/node/node.api.phpRespond to updates to a node.
hook_node_update_indexmodules/node/node.api.phpAct on a node being indexed for searching.
hook_node_validatemodules/node/node.api.phpPerform node validation before a node is created or updated.
hook_node_viewmodules/node/node.api.phpAct on a node that is being assembled before rendering.
hook_node_view_altermodules/node/node.api.phpAlter the results of node_view().
hook_openidmodules/openid/openid.api.phpAllow modules to modify the OpenID request parameters.
hook_openid_discovery_method_infomodules/openid/openid.api.phpAllow modules to declare OpenID discovery methods.
hook_openid_discovery_method_info_altermodules/openid/openid.api.phpAllow modules to alter discovery methods.
hook_openid_normalization_method_infomodules/openid/openid.api.phpAllow modules to declare OpenID normalization methods.
hook_openid_normalization_method_info_altermodules/openid/openid.api.phpAllow modules to alter normalization methods.
hook_openid_responsemodules/openid/openid.api.phpAllow modules to act upon a successful OpenID login.
hook_overlay_child_initializemodules/overlay/overlay.api.phpAllow modules to act when an overlay child window is initialized.
hook_overlay_parent_initializemodules/overlay/overlay.api.phpAllow modules to act when an overlay parent window is initialized.
hook_page_altermodules/system/system.api.phpPerform alterations before a page is rendered.
hook_page_buildmodules/system/system.api.phpAdd elements to a page before it is rendered.
hook_page_delivery_callback_altermodules/system/system.api.phpAlters the delivery callback used to send the result of the page callback to the browser.
hook_path_deletemodules/path/path.api.phpRespond to a path being deleted.
hook_path_insertmodules/path/path.api.phpRespond to a path being inserted.
hook_path_updatemodules/path/path.api.phpRespond to a path being updated.
hook_permissionmodules/system/system.api.phpDefine user permissions.
hook_preparemodules/node/node.api.phpAct on a node object about to be shown on the add/edit form.
hook_query_altermodules/system/system.api.phpPerform alterations to a structured query.
hook_query_TAG_altermodules/system/system.api.phpPerform alterations to a structured query for a given tag.
hook_rankingmodules/node/node.api.phpProvide additional methods of scoring for core search results for nodes.
hook_rdf_mappingmodules/rdf/rdf.api.phpAllow modules to define RDF mappings for field bundles.
hook_rdf_namespacesmodules/rdf/rdf.api.phpAllow modules to define namespaces for RDF mappings.
hook_registry_files_altermodules/system/system.api.phpPerform necessary alterations to the list of files parsed by the registry.
hook_requirementsmodules/system/system.api.phpCheck installation requirements and do status reporting.
hook_schemamodules/system/system.api.phpDefine the current version of the database schema.
hook_schema_altermodules/system/system.api.phpPerform alterations to existing database schemas.
hook_search_accessmodules/search/search.api.phpDefine access to a custom search routine.
hook_search_adminmodules/search/search.api.phpAdd elements to the search settings form.
hook_search_executemodules/search/search.api.phpExecute a search for a set of key words.
hook_search_infomodules/search/search.api.phpDefine a custom search type.
hook_search_pagemodules/search/search.api.phpOverride the rendering of search results.
hook_search_preprocessmodules/search/search.api.phpPreprocess text for search.
hook_search_resetmodules/search/search.api.phpTake action when the search index is going to be rebuilt.
hook_search_statusmodules/search/search.api.phpReport the status of indexing.
hook_shortcut_default_setmodules/shortcut/shortcut.api.phpReturn the name of a default shortcut set for the provided user account.
hook_simpletest_altermodules/simpletest/simpletest.api.phpAlter the list of tests.
hook_stream_wrappersmodules/system/system.api.phpRegisters PHP stream wrapper implementations associated with a module.
hook_stream_wrappers_altermodules/system/system.api.phpAlters the list of PHP stream wrapper implementations.
hook_system_info_altermodules/system/system.api.phpAlter the information parsed from module and theme .info files
hook_system_themes_page_altermodules/system/system.api.phpAlters theme operation links.
hook_system_theme_infomodules/system/system.api.phpReturn additional themes provided by modules.
hook_taxonomy_term_deletemodules/taxonomy/taxonomy.api.phpRespond to the deletion of taxonomy terms.
hook_taxonomy_term_insertmodules/taxonomy/taxonomy.api.phpAct on taxonomy terms when inserted.
hook_taxonomy_term_loadmodules/taxonomy/taxonomy.api.phpAct on taxonomy terms when loaded.
hook_taxonomy_term_presavemodules/taxonomy/taxonomy.api.phpAct on taxonomy terms before they are saved.
hook_taxonomy_term_updatemodules/taxonomy/taxonomy.api.phpAct on taxonomy terms when updated.
hook_taxonomy_term_view_altermodules/taxonomy/taxonomy.api.phpAlter the results of taxonomy_term_view().
hook_taxonomy_vocabulary_deletemodules/taxonomy/taxonomy.api.phpRespond to the deletion of taxonomy vocabularies.
hook_taxonomy_vocabulary_insertmodules/taxonomy/taxonomy.api.phpAct on taxonomy vocabularies when inserted.
hook_taxonomy_vocabulary_loadmodules/taxonomy/taxonomy.api.phpAct on taxonomy vocabularies when loaded.
hook_taxonomy_vocabulary_presavemodules/taxonomy/taxonomy.api.phpAct on taxonomy vocabularies before they are saved.
hook_taxonomy_vocabulary_updatemodules/taxonomy/taxonomy.api.phpAct on taxonomy vocabularies when updated.
hook_test_finishedmodules/simpletest/simpletest.api.phpAn individual test has finished.
hook_test_group_finishedmodules/simpletest/simpletest.api.phpA test group has finished.
hook_test_group_startedmodules/simpletest/simpletest.api.phpA test group has started.
hook_thememodules/system/system.api.phpRegister a module (or theme's) theme implementations.
hook_theme_registry_altermodules/system/system.api.phpAlter the theme registry information returned from hook_theme().
hook_tokensmodules/system/system.api.phpProvide replacement values for placeholder tokens.
hook_tokens_altermodules/system/system.api.phpAlter replacement values for placeholder tokens.
hook_token_infomodules/system/system.api.phpProvide information about available placeholder tokens and token types.
hook_token_info_altermodules/system/system.api.phpAlter the metadata about available placeholder tokens and token types.
hook_translated_menu_link_altermodules/system/system.api.phpAlter a menu link after it has been translated and before it is rendered.
hook_trigger_infomodules/trigger/trigger.api.phpDeclare triggers (events) for users to assign actions to.
hook_trigger_info_altermodules/trigger/trigger.api.phpAlter triggers declared by hook_trigger_info().
hook_uninstallmodules/system/system.api.phpRemove any information that the module sets.
hook_updatemodules/node/node.api.phpRespond to updates to a node.
hook_updater_infomodules/system/system.api.phpProvide information on Updaters (classes that can update Drupal).
hook_updater_info_altermodules/system/system.api.phpAlter the Updater information array.
hook_update_dependenciesmodules/system/system.api.phpReturn an array of information about module update dependencies.
hook_update_indexmodules/search/search.api.phpUpdate the search index for this module.
hook_update_last_removedmodules/system/system.api.phpReturn a number which is no longer available as hook_update_N().
hook_update_Nmodules/system/system.api.phpPerform a single update.
hook_update_projects_altermodules/update/update.api.phpAlter the list of projects before fetching data and comparing versions.
hook_update_status_altermodules/update/update.api.phpAlter the information about available updates for projects.
hook_url_inbound_altermodules/system/system.api.phpAlters inbound URL requests.
hook_url_outbound_altermodules/system/system.api.phpAlters outbound URLs.
hook_username_altermodules/system/system.api.phpAlter the username that is displayed for a user.
hook_user_cancelmodules/user/user.api.phpAct on user account cancellations.
hook_user_cancel_methods_altermodules/user/user.api.phpModify account cancellation methods.
hook_user_categoriesmodules/user/user.api.phpRetrieve a list of user setting or profile information categories.
hook_user_deletemodules/user/user.api.phpRespond to user deletion.
hook_user_insertmodules/user/user.api.phpA user account was created.
hook_user_loadmodules/user/user.api.phpAct on user objects when loaded from the database.
hook_user_loginmodules/user/user.api.phpThe user just logged in.
hook_user_logoutmodules/user/user.api.phpThe user just logged out.
hook_user_operationsmodules/user/user.api.phpAdd mass user operations.
hook_user_presavemodules/user/user.api.phpA user account is about to be created or updated.
hook_user_role_deletemodules/user/user.api.phpInform other modules that a user role has been deleted.
hook_user_role_insertmodules/user/user.api.phpInform other modules that a user role has been added.
hook_user_role_presavemodules/user/user.api.phpInform other modules that a user role is about to be saved.
hook_user_role_updatemodules/user/user.api.phpInform other modules that a user role has been updated.
hook_user_updatemodules/user/user.api.phpA user account was updated.
hook_user_viewmodules/user/user.api.phpThe user's account information is being displayed.
hook_user_view_altermodules/user/user.api.phpThe user was built; the module may modify the structured content.
hook_validatemodules/node/node.api.phpPerform node validation before a node is created or updated.
hook_verify_update_archivemodules/update/update.api.phpVerify an archive after it has been downloaded and extracted.
hook_viewmodules/node/node.api.phpDisplay a node.
hook_watchdogmodules/system/system.api.phpLog an event message.
hook_xmlrpcmodules/system/system.api.phpRegister XML-RPC callbacks.
hook_xmlrpc_altermodules/system/system.api.phpAlters the definition of XML-RPC methods before they are called.
module_hookincludes/module.incDetermine whether a module implements a hook.
module_hook_infoincludes/module.incRetrieve a list of what hooks are explicitly declared.
module_implementsincludes/module.incDetermine which modules are implementing a hook.
module_implements_write_cacheincludes/module.incWrites the hook implementation cache.
module_invokeincludes/module.incInvoke a hook in a particular module.
module_invoke_allincludes/module.incInvoke a hook in all enabled modules that implement it.
sample_search_conditions_callbackmodules/search/search.api.phpAn example conditions callback function for search.

File

includes/module.inc, line 590
API for loading and interacting with Drupal modules.