function mail_edit_format in Mail Editor 7
Formats a text using the supplied template, data, and options.
Parameters
string $template: The template to use.
array $data: The data to be passed on to token_replace().
array $options: The options to be passed on to token_replace().
string $context: The context string that can be used to conditionally add or omit text depending on the context. The default is 'MAIL'.
Return value
string
1 call to mail_edit_format()
- _mail_edit_mail_alter in ./
mail_edit.alter.inc - Implements hook_mail_alter().
File
- ./
mail_edit.module, line 145 - Mail Editor module.
Code
function mail_edit_format($template, $data, $options = array(), $context = NULL) {
_mail_edit_module_load_include('alter.inc');
$context = isset($context) ? $context : 'MAIL';
$result = _mail_edit_preprocess($template, $data, $options, $context);
$result = token_replace($result, $data, $options);
return $result;
}