Skip to content
Snippets Groups Projects
Commit 269da037 authored by Angie Byron's avatar Angie Byron
Browse files

#777080 by jhodgdon: Fixed hook_hook_info_alter() is not documented.

parent 41491108
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -32,6 +32,8 @@
* exists, and automatically load it when required.
*
* See system_hook_info() for all hook groups defined by Drupal core.
*
* @see hook_hook_info_alter().
*/
function hook_hook_info() {
$hooks['token_info'] = array(
......@@ -43,6 +45,21 @@ function hook_hook_info() {
return $hooks;
}
/**
* Alter information from hook_hook_info().
*
* @param $hooks
* Information gathered by module_hook_info() from other modules'
* implementations of hook_hook_info(). Alter this array directly.
* See hook_hook_info() for information on what this may contain.
*/
function hook_hook_info_alter(&$hooks) {
// Our module wants to completely override the core tokens, so make
// sure the core token hooks are not found.
$hooks['token_info']['group'] = 'mytokens';
$hooks['tokens']['group'] = 'mytokens';
}
/**
* Inform the base system and the Field API about one or more entity types.
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment