From a6d8f78f349d73abc09d205b271613ae27810992 Mon Sep 17 00:00:00 2001 From: "B. Endres" Date: Fri, 14 Feb 2020 14:54:25 +0100 Subject: [PATCH] [#6] implementing regex tokens (WIP) --- mailingtools.php | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/mailingtools.php b/mailingtools.php index 12d414e..afb57a9 100644 --- a/mailingtools.php +++ b/mailingtools.php @@ -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 */