Implements hook_trigger_info_alter().

We call hook_trigger_info_alter when we want to change an existing trigger. As mentioned earlier, this hook is not required to create your own triggers, and should only be used when you need to alter current existing triggers. In this example implementation a little change is done to the existing trigger provided by core: 'cron'

See also

hook_trigger_info()

Related topics

File

trigger_example/trigger_example.module, line 314
Trigger definition example module.

Code

function trigger_example_trigger_info_alter(&$triggers) {

  // Make a simple change to an existing core trigger, altering the label
  // "When cron runs" to our custom label "On cron execution"
  $triggers['system']['cron']['label'] = t('On cron execution');
}