Hooks in Drupal 7
Same name and namespace in other branches
- 8 core/core.api.php \hooks
- 4 includes/module.inc \hooks
- 5 includes/module.inc \hooks
- 6 includes/module.inc \hooks
- 9 core/core.api.php \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
File
- includes/
module.inc, line 617 - API for loading and interacting with Drupal modules.
Functions
Name | Location | Description |
---|---|---|
hook_actions_delete |
modules/ |
Executes code after an action is deleted. |
hook_action_info |
modules/ |
Declares information about actions. |
hook_action_info_alter |
modules/ |
Alters the actions declared by another module. |
hook_admin_paths |
modules/ |
Define administrative paths. |
hook_admin_paths_alter |
modules/ |
Redefine administrative paths defined by other modules. |
hook_aggregator_fetch |
modules/ |
Create an alternative fetcher for aggregator.module. |
hook_aggregator_fetch_info |
modules/ |
Specify the title and short description of your fetcher. |
hook_aggregator_parse |
modules/ |
Create an alternative parser for aggregator module. |
hook_aggregator_parse_info |
modules/ |
Specify the title and short description of your parser. |
hook_aggregator_process |
modules/ |
Create a processor for aggregator.module. |
hook_aggregator_process_info |
modules/ |
Specify the title and short description of your processor. |
hook_aggregator_remove |
modules/ |
Remove stored feed data. |
hook_ajax_render_alter |
modules/ |
Alter the commands that are sent to the user through the Ajax framework. |
hook_archiver_info |
modules/ |
Declare archivers to the system. |
hook_archiver_info_alter |
modules/ |
Alter archiver information declared by other modules. |
hook_batch_alter |
modules/ |
Alter batch information before a batch is processed. |
hook_block_cid_parts_alter |
modules/ |
Act on block cache ID (cid) parts before the cid is generated. |
hook_block_configure |
modules/ |
Define a configuration form for a block. |
hook_block_info |
modules/ |
Define all blocks provided by the module. |
hook_block_info_alter |
modules/ |
Change block definition before saving to the database. |
hook_block_list_alter |
modules/ |
Act on blocks prior to rendering. |
hook_block_save |
modules/ |
Save the configuration options from hook_block_configure(). |
hook_block_view |
modules/ |
Return a rendered or renderable view of a block. |
hook_block_view_alter |
modules/ |
Perform alterations to the content of a block. |
hook_block_view_MODULE_DELTA_alter |
modules/ |
Perform alterations to a specific block. |
hook_boot |
modules/ |
Perform setup tasks for all page requests. |
hook_comment_delete |
modules/ |
The comment is being deleted by the moderator. |
hook_comment_insert |
modules/ |
The comment is being inserted. |
hook_comment_load |
modules/ |
Comments are being loaded from the database. |
hook_comment_presave |
modules/ |
The comment passed validation and is about to be saved. |
hook_comment_publish |
modules/ |
The comment is being published by the moderator. |
hook_comment_unpublish |
modules/ |
The comment is being unpublished by the moderator. |
hook_comment_update |
modules/ |
The comment is being updated. |
hook_comment_view |
modules/ |
The comment is being viewed. This hook can be used to add additional data to the comment before theming. |
hook_comment_view_alter |
modules/ |
The comment was built; the module may modify the structured content. |
hook_contextual_links_view_alter |
modules/ |
Alter a contextual links element before it is rendered. |
hook_countries_alter |
modules/ |
Alter the default country list. |
hook_cron |
modules/ |
Perform periodic actions. |
hook_cron_queue_info |
modules/ |
Declare queues holding items that need to be run periodically. |
hook_cron_queue_info_alter |
modules/ |
Alter cron queue information before cron runs. |
hook_css_alter |
modules/ |
Alter CSS files before they are output on the page. |
hook_custom_theme |
modules/ |
Return the machine-readable name of the theme to use for the current page. |
hook_dashboard_regions |
modules/ |
Add regions to the dashboard. |
hook_dashboard_regions_alter |
modules/ |
Alter dashboard regions provided by modules. |
hook_date_formats |
modules/ |
Define additional date formats. |
hook_date_formats_alter |
modules/ |
Alter date formats declared by another module. |
hook_date_format_types |
modules/ |
Define additional date types. |
hook_date_format_types_alter |
modules/ |
Modify existing date types. |
hook_delete |
modules/ |
Respond to node deletion. |
hook_disable |
modules/ |
Perform necessary actions before module is disabled. |
hook_drupal_goto_alter |
modules/ |
Change the page the user is sent to by drupal_goto(). |
hook_element_info |
modules/ |
Allows modules to declare their own Form API element types and specify their default values. |
hook_element_info_alter |
modules/ |
Alter the element type information returned from modules. |
hook_enable |
modules/ |
Perform necessary actions after module is enabled. |
hook_entity_delete |
modules/ |
Act on entities when deleted. |
hook_entity_info |
modules/ |
Inform the base system and the Field API about one or more entity types. |
hook_entity_info_alter |
modules/ |
Alter the entity info. |
hook_entity_insert |
modules/ |
Act on entities when inserted. |
hook_entity_load |
modules/ |
Act on entities when loaded. |
hook_entity_prepare_view |
modules/ |
Act on entities as they are being prepared for view. |
hook_entity_presave |
modules/ |
Act on an entity before it is about to be created or updated. |
hook_entity_query_alter |
modules/ |
Alter or execute an EntityFieldQuery. |
hook_entity_update |
modules/ |
Act on entities when updated. |
hook_entity_view |
modules/ |
Act on entities being assembled before rendering. |
hook_entity_view_alter |
modules/ |
Alter the results of ENTITY_view(). |
hook_entity_view_mode_alter |
modules/ |
Change the view mode of an entity that is being displayed. |
hook_exit |
modules/ |
Perform cleanup tasks. |
hook_field_access |
modules/ |
Determine whether the user has access to a given field. |
hook_field_attach_create_bundle |
modules/ |
Act on field_attach_create_bundle(). |
hook_field_attach_delete |
modules/ |
Act on field_attach_delete(). |
hook_field_attach_delete_bundle |
modules/ |
Act on field_attach_delete_bundle. |
hook_field_attach_delete_revision |
modules/ |
Act on field_attach_delete_revision(). |
hook_field_attach_form |
modules/ |
Act on field_attach_form(). |
hook_field_attach_insert |
modules/ |
Act on field_attach_insert(). |
hook_field_attach_load |
modules/ |
Act on field_attach_load(). |
hook_field_attach_prepare_translation_alter |
modules/ |
Perform alterations on field_attach_prepare_translation(). |
hook_field_attach_preprocess_alter |
modules/ |
Alter field_attach_preprocess() variables. |
hook_field_attach_presave |
modules/ |
Act on field_attach_presave(). |
hook_field_attach_purge |
modules/ |
Act on field_purge_data(). |
hook_field_attach_rename_bundle |
modules/ |
Act on field_attach_rename_bundle(). |
hook_field_attach_submit |
modules/ |
Act on field_attach_submit(). |
hook_field_attach_update |
modules/ |
Act on field_attach_update(). |
hook_field_attach_validate |
modules/ |
Act on field_attach_validate(). |
hook_field_attach_view_alter |
modules/ |
Perform alterations on field_attach_view() or field_view_field(). |
hook_field_available_languages_alter |
modules/ |
Alter field_available_languages() values. |
hook_field_create_field |
modules/ |
Act on a field being created. |
hook_field_create_instance |
modules/ |
Act on a field instance being created. |
hook_field_delete |
modules/ |
Define custom delete behavior for this module's field data. |
hook_field_delete_field |
modules/ |
Act on a field being deleted. |
hook_field_delete_instance |
modules/ |
Act on a field instance being deleted. |
hook_field_delete_revision |
modules/ |
Define custom revision delete behavior for this module's field types. |
hook_field_display_alter |
modules/ |
Alters the display settings of a field before it gets displayed. |
hook_field_display_ENTITY_TYPE_alter |
modules/ |
Alters the display settings of a field on a given entity type before it gets displayed. |
hook_field_extra_fields |
modules/ |
Exposes "pseudo-field" components on fieldable entities. |
hook_field_extra_fields_alter |
modules/ |
Alter "pseudo-field" components on fieldable entities. |
hook_field_extra_fields_display_alter |
modules/ |
Alters the display settings of pseudo-fields before an entity is displayed. |
hook_field_formatter_info |
modules/ |
Expose Field API formatter types. |
hook_field_formatter_info_alter |
modules/ |
Perform alterations on Field API formatter types. |
hook_field_formatter_prepare_view |
modules/ |
Allow formatters to load information for field values being displayed. |
hook_field_formatter_view |
modules/ |
Build a renderable array for a field value. |
hook_field_info |
modules/ |
Define Field API field types. |
hook_field_info_alter |
modules/ |
Perform alterations on Field API field types. |
hook_field_info_max_weight |
modules/ |
Returns the maximum weight for the entity components handled by the module. |
hook_field_insert |
modules/ |
Define custom insert behavior for this module's field data. |
hook_field_is_empty |
modules/ |
Define what constitutes an empty item for a field type. |
hook_field_language_alter |
modules/ |
Perform alterations on field_language() values. |
hook_field_load |
modules/ |
Define custom load behavior for this module's field types. |
hook_field_prepare_translation |
modules/ |
Define custom prepare_translation behavior for this module's field types. |
hook_field_prepare_view |
modules/ |
Prepare field values prior to display. |
hook_field_presave |
modules/ |
Define custom presave behavior for this module's field types. |
hook_field_purge_field |
modules/ |
Acts when a field record is being purged. |
hook_field_purge_instance |
modules/ |
Acts when a field instance is being purged. |
hook_field_read_field |
modules/ |
Act on field records being read from the database. |
hook_field_read_instance |
modules/ |
Act on a field record being read from the database. |
hook_field_schema |
modules/ |
Define the Field API schema for a field structure. |
hook_field_storage_create_field |
modules/ |
Act on creation of a new field. |
hook_field_storage_delete |
modules/ |
Delete all field data for an entity. |
hook_field_storage_delete_field |
modules/ |
Act on deletion of a field. |
hook_field_storage_delete_instance |
modules/ |
Act on deletion of a field instance. |
hook_field_storage_delete_revision |
modules/ |
Delete a single revision of field data for an entity. |
hook_field_storage_details |
modules/ |
Reveal the internal details about the storage for a field. |
hook_field_storage_details_alter |
modules/ |
Perform alterations on Field API storage details. |
hook_field_storage_info |
modules/ |
Expose Field API storage backends. |
hook_field_storage_info_alter |
modules/ |
Perform alterations on Field API storage types. |
hook_field_storage_load |
modules/ |
Load field data for a set of entities. |
hook_field_storage_pre_insert |
modules/ |
Act before the storage backends insert field data. |
hook_field_storage_pre_load |
modules/ |
Act before the storage backends load field data. |
hook_field_storage_pre_update |
modules/ |
Act before the storage backends update field data. |
hook_field_storage_purge |
modules/ |
Remove field storage information when field data is purged. |
hook_field_storage_purge_field |
modules/ |
Remove field storage information when a field record is purged. |
hook_field_storage_purge_field_instance |
modules/ |
Remove field storage information when a field instance is purged. |
hook_field_storage_query |
modules/ |
Execute an EntityFieldQuery. |
hook_field_storage_update_field |
modules/ |
Update the storage information for a field. |
hook_field_storage_write |
modules/ |
Write field data for an entity. |
hook_field_update |
modules/ |
Define custom update behavior for this module's field data. |
hook_field_update_field |
modules/ |
Act on a field being updated. |
hook_field_update_forbid |
modules/ |
Forbid a field update from occurring. |
hook_field_update_instance |
modules/ |
Act on a field instance being updated. |
hook_field_validate |
modules/ |
Validate this module's field data. |
hook_field_widget_error |
modules/ |
Flag a field-level validation error. |
hook_field_widget_form |
modules/ |
Return the form for a single field widget. |
hook_field_widget_form_alter |
modules/ |
Alter forms for field widgets provided by other modules. |
hook_field_widget_info |
modules/ |
Expose Field API widget types. |
hook_field_widget_info_alter |
modules/ |
Perform alterations on Field API widget types. |
hook_field_widget_properties_alter |
modules/ |
Alters the widget properties of a field instance before it gets displayed. |
hook_field_widget_properties_ENTITY_TYPE_alter |
modules/ |
Alters the widget properties of a field instance on a given entity type before it gets displayed. |
hook_field_widget_WIDGET_TYPE_form_alter |
modules/ |
Alter widget forms for a specific widget provided by another module. |
hook_filetransfer_info |
modules/ |
Register information about FileTransfer classes provided by a module. |
hook_filetransfer_info_alter |
modules/ |
Alter the FileTransfer class registry. |
hook_file_copy |
modules/ |
Respond to a file that has been copied. |
hook_file_delete |
modules/ |
Respond to a file being deleted. |
hook_file_download |
modules/ |
Control access to private file downloads and specify HTTP headers. |
hook_file_insert |
modules/ |
Respond to a file being added. |
hook_file_load |
modules/ |
Load additional information into file objects. |
hook_file_mimetype_mapping_alter |
modules/ |
Alter MIME type mappings used to determine MIME type from a file extension. |
hook_file_move |
modules/ |
Respond to a file that has been moved. |
hook_file_presave |
modules/ |
Act on a file being inserted or updated. |
hook_file_update |
modules/ |
Respond to a file being updated. |
hook_file_url_alter |
modules/ |
Alter the URL to a file. |
hook_file_validate |
modules/ |
Check that files meet a given criteria. |
hook_filter_format_disable |
modules/ |
Perform actions when a text format has been disabled. |
hook_filter_format_insert |
modules/ |
Perform actions when a new text format has been created. |
hook_filter_format_update |
modules/ |
Perform actions when a text format has been updated. |
hook_filter_info |
modules/ |
Define content filters. |
hook_filter_info_alter |
modules/ |
Perform alterations on filter definitions. |
hook_flush_caches |
modules/ |
Add a list of cache tables to be cleared. |
hook_form |
modules/ |
Display a node editing form. |
hook_forms |
modules/ |
Map form_ids to form builder functions. |
hook_form_alter |
modules/ |
Perform alterations before a form is rendered. |
hook_form_BASE_FORM_ID_alter |
modules/ |
Provide a form-specific alteration for shared ('base') forms. |
hook_form_FORM_ID_alter |
modules/ |
Provide a form-specific alteration instead of the global hook_form_alter(). |
hook_help |
modules/ |
Provide online user help. |
hook_hook_info |
modules/ |
Defines one or more hooks that are exposed by a module. |
hook_hook_info_alter |
modules/ |
Alter information from hook_hook_info(). |
hook_html_head_alter |
modules/ |
Alter XHTML HEAD tags before they are rendered by drupal_get_html_head(). |
hook_image_default_styles |
modules/ |
Provide module-based image styles for reuse throughout Drupal. |
hook_image_effect_info |
modules/ |
Define information about image effects provided by a module. |
hook_image_effect_info_alter |
modules/ |
Alter the information provided in hook_image_effect_info(). |
hook_image_styles_alter |
modules/ |
Modify any image styles provided by other modules or the user. |
hook_image_style_delete |
modules/ |
Respond to image style deletion. |
hook_image_style_flush |
modules/ |
Respond to image style flushing. |
hook_image_style_save |
modules/ |
Respond to image style updating. |
hook_image_toolkits |
modules/ |
Define image toolkits provided by this module. |
hook_init |
modules/ |
Perform setup tasks for non-cached page requests. |
hook_insert |
modules/ |
Respond to creation of a new node. |
hook_install |
modules/ |
Perform setup tasks when the module is installed. |
hook_install_tasks |
modules/ |
Return an array of tasks to be performed by an installation profile. |
hook_install_tasks_alter |
modules/ |
Alter the full list of installation tasks. |
hook_js_alter |
modules/ |
Perform necessary alterations to the JavaScript before it is presented on the page. |
hook_language_fallback_candidates_alter |
modules/ |
Perform alterations on the language fallback candidates. |
hook_language_init |
modules/ |
Allows modules to act after language initialization has been performed. |
hook_language_negotiation_info |
modules/ |
Define language negotiation providers. |
hook_language_negotiation_info_alter |
modules/ |
Perform alterations on language negoiation providers. |
hook_language_switch_links_alter |
modules/ |
Perform alterations on language switcher links. |
hook_language_types_info |
modules/ |
Define language types. |
hook_language_types_info_alter |
modules/ |
Perform alterations on language types. |
hook_library |
modules/ |
Registers JavaScript/CSS libraries associated with a module. |
hook_library_alter |
modules/ |
Alters the JavaScript/CSS library registry. |
hook_load |
modules/ |
Act on nodes being loaded from the database. |
hook_locale |
modules/ |
Allows modules to define their own text groups that can be translated. |
hook_mail |
modules/ |
Prepare a message based on parameters; called from drupal_mail(). |
hook_mail_alter |
modules/ |
Alter an email message created with the drupal_mail() function. |
hook_menu |
modules/ |
Define menu items and page callbacks. |
hook_menu_alter |
modules/ |
Alter the data being saved to the {menu_router} table after hook_menu is invoked. |
hook_menu_breadcrumb_alter |
modules/ |
Alter links in the active trail before it is rendered as the breadcrumb. |
hook_menu_contextual_links_alter |
modules/ |
Alter contextual links before they are rendered. |
hook_menu_delete |
modules/ |
Respond to a custom menu deletion. |
hook_menu_get_item_alter |
modules/ |
Alter a menu router item right after it has been retrieved from the database or cache. |
hook_menu_insert |
modules/ |
Respond to a custom menu creation. |
hook_menu_link_alter |
modules/ |
Alter the data being saved to the {menu_links} table by menu_link_save(). |
hook_menu_link_delete |
modules/ |
Inform modules that a menu link has been deleted. |
hook_menu_link_insert |
modules/ |
Inform modules that a menu link has been created. |
hook_menu_link_update |
modules/ |
Inform modules that a menu link has been updated. |
hook_menu_local_tasks_alter |
modules/ |
Alter tabs and actions displayed on the page before they are rendered. |
hook_menu_site_status_alter |
modules/ |
Control site status before menu dispatching. |
hook_menu_update |
modules/ |
Respond to a custom menu update. |
hook_modules_disabled |
modules/ |
Perform necessary actions after modules are disabled. |
hook_modules_enabled |
modules/ |
Perform necessary actions after modules are enabled. |
hook_modules_installed |
modules/ |
Perform necessary actions after modules are installed. |
hook_modules_uninstalled |
modules/ |
Perform necessary actions after modules are uninstalled. |
hook_module_implements_alter |
modules/ |
Alter the registry of modules implementing a hook. |
hook_multilingual_settings_changed |
modules/ |
Allow modules to react to language settings changes. |
hook_node_access |
modules/ |
Control access to a node. |
hook_node_access_records |
modules/ |
Set permissions for a node to be written to the database. |
hook_node_access_records_alter |
modules/ |
Alter permissions for a node before it is written to the database. |
hook_node_delete |
modules/ |
Respond to node deletion. |
hook_node_grants |
modules/ |
Inform the node access system what permissions the user has. |
hook_node_grants_alter |
modules/ |
Alter user access rules when trying to view, edit or delete a node. |
hook_node_info |
modules/ |
Define module-provided node types. |
hook_node_insert |
modules/ |
Respond to creation of a new node. |
hook_node_load |
modules/ |
Act on arbitrary nodes being loaded from the database. |
hook_node_operations |
modules/ |
Add mass node operations. |
hook_node_prepare |
modules/ |
Act on a node object about to be shown on the add/edit form. |
hook_node_presave |
modules/ |
Act on a node being inserted or updated. |
hook_node_revision_delete |
modules/ |
Respond to deletion of a node revision. |
hook_node_search_result |
modules/ |
Act on a node being displayed as a search result. |
hook_node_submit |
modules/ |
Act on a node after validated form values have been copied to it. |
hook_node_type_delete |
modules/ |
Respond to node type deletion. |
hook_node_type_insert |
modules/ |
Respond to node type creation. |
hook_node_type_update |
modules/ |
Respond to node type updates. |
hook_node_update |
modules/ |
Respond to updates to a node. |
hook_node_update_index |
modules/ |
Act on a node being indexed for searching. |
hook_node_validate |
modules/ |
Perform node validation before a node is created or updated. |
hook_node_view |
modules/ |
Act on a node that is being assembled before rendering. |
hook_node_view_alter |
modules/ |
Alter the results of node_view(). |
hook_openid |
modules/ |
Allow modules to modify the OpenID request parameters. |
hook_openid_discovery_method_info |
modules/ |
Allow modules to declare OpenID discovery methods. |
hook_openid_discovery_method_info_alter |
modules/ |
Allow modules to alter discovery methods. |
hook_openid_normalization_method_info |
modules/ |
Allow modules to declare OpenID normalization methods. |
hook_openid_normalization_method_info_alter |
modules/ |
Allow modules to alter normalization methods. |
hook_openid_response |
modules/ |
Allow modules to act upon a successful OpenID login. |
hook_overlay_child_initialize |
modules/ |
Allow modules to act when an overlay child window is initialized. |
hook_overlay_parent_initialize |
modules/ |
Allow modules to act when an overlay parent window is initialized. |
hook_page_alter |
modules/ |
Perform alterations before a page is rendered. |
hook_page_build |
modules/ |
Add elements to a page before it is rendered. |
hook_page_delivery_callback_alter |
modules/ |
Alters the delivery callback used to send the result of the page callback to the browser. |
hook_path_delete |
modules/ |
Respond to a path being deleted. |
hook_path_insert |
modules/ |
Respond to a path being inserted. |
hook_path_update |
modules/ |
Respond to a path being updated. |
hook_permission |
modules/ |
Define user permissions. |
hook_prepare |
modules/ |
Act on a node object about to be shown on the add/edit form. |
hook_query_alter |
modules/ |
Perform alterations to a structured query. |
hook_query_TAG_alter |
modules/ |
Perform alterations to a structured query for a given tag. |
hook_ranking |
modules/ |
Provide additional methods of scoring for core search results for nodes. |
hook_rdf_mapping |
modules/ |
Allow modules to define RDF mappings for field bundles. |
hook_rdf_namespaces |
modules/ |
Allow modules to define namespaces for RDF mappings. |
hook_registry_files_alter |
modules/ |
Perform necessary alterations to the list of files parsed by the registry. |
hook_requirements |
modules/ |
Check installation requirements and do status reporting. |
hook_schema |
modules/ |
Define the current version of the database schema. |
hook_schema_alter |
modules/ |
Perform alterations to existing database schemas. |
hook_search_access |
modules/ |
Define access to a custom search routine. |
hook_search_admin |
modules/ |
Add elements to the search settings form. |
hook_search_execute |
modules/ |
Execute a search for a set of key words. |
hook_search_info |
modules/ |
Define a custom search type. |
hook_search_page |
modules/ |
Override the rendering of search results. |
hook_search_preprocess |
modules/ |
Preprocess text for search. |
hook_search_reset |
modules/ |
Take action when the search index is going to be rebuilt. |
hook_search_status |
modules/ |
Report the status of indexing. |
hook_shortcut_default_set |
modules/ |
Return the name of a default shortcut set for the provided user account. |
hook_simpletest_alter |
modules/ |
Alter the list of tests. |
hook_stream_wrappers |
modules/ |
Registers PHP stream wrapper implementations associated with a module. |
hook_stream_wrappers_alter |
modules/ |
Alters the list of PHP stream wrapper implementations. |
hook_system_info_alter |
modules/ |
Alter the information parsed from module and theme .info files |
hook_system_themes_page_alter |
modules/ |
Alters theme operation links. |
hook_system_theme_engine_info |
modules/ |
Return additional theme engines provided by modules. |
hook_system_theme_info |
modules/ |
Return additional themes provided by modules. |
hook_taxonomy_term_delete |
modules/ |
Respond to the deletion of taxonomy terms. |
hook_taxonomy_term_insert |
modules/ |
Act on taxonomy terms when inserted. |
hook_taxonomy_term_load |
modules/ |
Act on taxonomy terms when loaded. |
hook_taxonomy_term_presave |
modules/ |
Act on taxonomy terms before they are saved. |
hook_taxonomy_term_update |
modules/ |
Act on taxonomy terms when updated. |
hook_taxonomy_term_view |
modules/ |
Act on a taxonomy term that is being assembled before rendering. |
hook_taxonomy_term_view_alter |
modules/ |
Alter the results of taxonomy_term_view(). |
hook_taxonomy_vocabulary_delete |
modules/ |
Respond to the deletion of taxonomy vocabularies. |
hook_taxonomy_vocabulary_insert |
modules/ |
Act on taxonomy vocabularies when inserted. |
hook_taxonomy_vocabulary_load |
modules/ |
Act on taxonomy vocabularies when loaded. |
hook_taxonomy_vocabulary_presave |
modules/ |
Act on taxonomy vocabularies before they are saved. |
hook_taxonomy_vocabulary_update |
modules/ |
Act on taxonomy vocabularies when updated. |
hook_test_finished |
modules/ |
An individual test has finished. |
hook_test_group_finished |
modules/ |
A test group has finished. |
hook_test_group_started |
modules/ |
A test group has started. |
hook_theme |
modules/ |
Register a module (or theme's) theme implementations. |
hook_theme_registry_alter |
modules/ |
Alter the theme registry information returned from hook_theme(). |
hook_tokens |
modules/ |
Provide replacement values for placeholder tokens. |
hook_tokens_alter |
modules/ |
Alter replacement values for placeholder tokens. |
hook_token_info |
modules/ |
Provide information about available placeholder tokens and token types. |
hook_token_info_alter |
modules/ |
Alter the metadata about available placeholder tokens and token types. |
hook_translated_menu_link_alter |
modules/ |
Alter a menu link after it has been translated and before it is rendered. |
hook_trigger_info |
modules/ |
Declare triggers (events) for users to assign actions to. |
hook_trigger_info_alter |
modules/ |
Alter triggers declared by hook_trigger_info(). |
hook_uninstall |
modules/ |
Remove any information that the module sets. |
hook_update |
modules/ |
Respond to updates to a node. |
hook_updater_info |
modules/ |
Provide information on Updaters (classes that can update Drupal). |
hook_updater_info_alter |
modules/ |
Alter the Updater information array. |
hook_update_dependencies |
modules/ |
Return an array of information about module update dependencies. |
hook_update_index |
modules/ |
Update the search index for this module. |
hook_update_last_removed |
modules/ |
Return a number which is no longer available as hook_update_N(). |
hook_update_N |
modules/ |
Perform a single update. |
hook_update_projects_alter |
modules/ |
Alter the list of projects before fetching data and comparing versions. |
hook_update_status_alter |
modules/ |
Alter the information about available updates for projects. |
hook_url_inbound_alter |
modules/ |
Alters inbound URL requests. |
hook_url_outbound_alter |
modules/ |
Alters outbound URLs. |
hook_username_alter |
modules/ |
Alter the username that is displayed for a user. |
hook_user_cancel |
modules/ |
Act on user account cancellations. |
hook_user_cancel_methods_alter |
modules/ |
Modify account cancellation methods. |
hook_user_categories |
modules/ |
Define a list of user settings or profile information categories. |
hook_user_delete |
modules/ |
Respond to user deletion. |
hook_user_flood_control |
modules/ |
Respond to user flood control events. |
hook_user_insert |
modules/ |
A user account was created. |
hook_user_load |
modules/ |
Act on user objects when loaded from the database. |
hook_user_login |
modules/ |
The user just logged in. |
hook_user_logout |
modules/ |
The user just logged out. |
hook_user_operations |
modules/ |
Add mass user operations. |
hook_user_presave |
modules/ |
A user account is about to be created or updated. |
hook_user_role_delete |
modules/ |
Respond to user role deletion. |
hook_user_role_insert |
modules/ |
Respond to creation of a new user role. |
hook_user_role_presave |
modules/ |
Act on a user role being inserted or updated. |
hook_user_role_update |
modules/ |
Respond to updates to a user role. |
hook_user_update |
modules/ |
A user account was updated. |
hook_user_view |
modules/ |
The user's account information is being displayed. |
hook_user_view_alter |
modules/ |
The user was built; the module may modify the structured content. |
hook_validate |
modules/ |
Perform node validation before a node is created or updated. |
hook_verify_update_archive |
modules/ |
Verify an archive after it has been downloaded and extracted. |
hook_view |
modules/ |
Display a node. |
hook_watchdog |
modules/ |
Log an event message. |
hook_xmlrpc |
modules/ |
Register XML-RPC callbacks. |
hook_xmlrpc_alter |
modules/ |
Alters the definition of XML-RPC methods before they are called. |
module_hook |
includes/ |
Determines whether a module implements a hook. |
module_hook_info |
includes/ |
Retrieves a list of hooks that are declared through hook_hook_info(). |
module_implements |
includes/ |
Determines which modules are implementing a hook. |
module_implements_write_cache |
includes/ |
Writes the hook implementation cache. |
module_invoke |
includes/ |
Invokes a hook in a particular module. |
module_invoke_all |
includes/ |
Invokes a hook in all enabled modules that implement it. |
Sub-Topics
Name | Location | Description |
---|---|---|
Callbacks |
includes/ |
Callback function signatures. |
Field Formatter API |
modules/ |
Define Field API formatter types. |
Field Types API |
modules/ |
Define field types. |
Field Widget API |
modules/ |
Define Field API widget types. |