From 5e39cb73cb4cc89447d135b140ab1b15877f8420 Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Thu, 22 Apr 2010 06:33:06 +0000 Subject: #776728 by jhodgdon: Fixed hook_trigger_info_alter() is undocumented. --- modules/trigger/trigger.api.php | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'modules/trigger') diff --git a/modules/trigger/trigger.api.php b/modules/trigger/trigger.api.php index 23c700741..2e3329c32 100644 --- a/modules/trigger/trigger.api.php +++ b/modules/trigger/trigger.api.php @@ -12,7 +12,7 @@ */ /** - * Declares triggers (events) for users to assign actions to. + * Declare triggers (events) for users to assign actions to. * * This hook is used by the trigger module to create a list of triggers (events) * that users can assign actions to. Your module is responsible for detecting @@ -20,8 +20,6 @@ * out which actions the user has associated with your trigger, and then calling * actions_do() to fire off the actions. * - * @see hook_action_info() - * * @return * A nested associative array. * - The outermost key is the name of the module that is defining the triggers. @@ -38,6 +36,9 @@ * For example, the trigger set for the 'node' module has 'node' as the * outermost key and defines triggers for 'node_insert', 'node_update', * 'node_delete' etc. that fire when a node is saved, updated, etc. + * + * @see hook_action_info() + * @see hook_trigger_info_alter() */ function hook_trigger_info() { return array( @@ -61,6 +62,18 @@ function hook_trigger_info() { ); } +/** + * Alter triggers declared by hook_trigger_info(). + * + * @param $triggers + * Array of trigger information returned by hook_trigger_info() + * implementations. Modify this array in place. See hook_trigger_info() + * for information on what this might contain. + */ +function hook_trigger_info_alter(&$triggers) { + $triggers['node']['node_insert']['label'] = t('When content is saved'); +} + /** * @} End of "addtogroup hooks". */ -- cgit v1.2.3