hook_mail_alter() missing components in doc
sja1 - October 3, 2009 - 17:30
| Project: | Drupal |
| Version: | 6.x-dev |
| Component: | documentation |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
| Issue tags: | Novice |
Jump to:
Description
The documentation appears to leave out 2 keys in the $message array: 'params' and 'language'.
The following is an excerpt from the drupal_mail function, showing that these two variables are included in the array passed to hook_mail_alter.
// Bundle up the variables into a structured array for altering.
$message = array(
'id' => $module .'_'. $key,
'to' => $to,
'from' => isset($from) ? $from : $default_from,
'language' => $language,
'params' => $params,
'subject' => '',
'body' => array()
);
#1
The Drupal 7 doc for hook_mail_alter has these two components: http://api.drupal.org/api/function/hook_mail_alter/7
Drupal 6 version leaves them out, and sja1 is correct that they are in http://api.drupal.org/api/function/drupal_mail/6 and should be documented in hook_mail_alter().
#2
#3
I fixed this for Drupal 6 (it's in the contrib repository). Just copied the relevant lines from Drupal 7 doc.
http://drupal.org/cvs?commit=272426
#4
Automatically closed -- issue fixed for 2 weeks with no activity.