Skip to content

Commit

Permalink
[#6] implementing regex tokens (WIP)
Browse files Browse the repository at this point in the history
  • Loading branch information
bjendres committed Feb 14, 2020
1 parent 07108a6 commit a6d8f78
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions mailingtools.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,24 +148,6 @@ function mailingtools_civicrm_alterMailer(&$mailer, $driver, $params) {
}
}

/**
* Implement hook_civicrm_alterMailContent
*/
function mailingtools_civicrm_alterMailContent(&$content) {
// run the TokenReplace routine
$context = [
'groupName' => CRM_Utils_Array::value('groupName', $content),
'valueName' => CRM_Utils_Array::value('valueName', $content),
'messageTemplateID' => CRM_Utils_Array::value('messageTemplateID', $content),
'mailingID' => CRM_Utils_Array::value('mailingID', $content),
];
foreach (['html', 'text', 'subject'] as $field) {
if (isset($content[$field])) {
$content[$field] = CRM_Mailingtools_RegexToken::tokenReplace($content[$field], $context);
}
}
}

/**
* Set permissions for API calls
*/
Expand Down

0 comments on commit a6d8f78

Please sign in to comment.