From 554eb99e5ca96fd71f169e294267507b401bd903 Mon Sep 17 00:00:00 2001 From: Seamus Lee <seamuslee001@gmail.com> Date: Thu, 4 Jan 2018 15:30:27 +1100 Subject: [PATCH] Minor cleanup --- docs/hooks/hook_civicrm_alterMailContent.md | 22 +++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/docs/hooks/hook_civicrm_alterMailContent.md b/docs/hooks/hook_civicrm_alterMailContent.md index 95506395..012070f1 100644 --- a/docs/hooks/hook_civicrm_alterMailContent.md +++ b/docs/hooks/hook_civicrm_alterMailContent.md @@ -19,15 +19,17 @@ tokenizing it. ## Example - /** - * Implement hook_civicrm_alterMailContent - * - * Replace invoice template with custom content from file +```php + /** + * Implement hook_civicrm_alterMailContent + * + * Replace invoice template with custom content from file */ - function mail_civicrm_alterMailContent(&$content) { - if (CRM_Utils_Array::value('valueName', $content) == 'contribution_invoice_receipt') { - $path = CRM_Core_Resources::singleton()->getPath('org.myorg.invoice'); - $html = file_get_contents($path.'/msg/contribution_invoice_receipt.html.tpl'); - $content['html'] = $html; - } + function mail_civicrm_alterMailContent(&$content) { + if (CRM_Utils_Array::value('valueName', $content) == 'contribution_invoice_receipt') { + $path = CRM_Core_Resources::singleton()->getPath('org.myorg.invoice'); + $html = file_get_contents($path.'/msg/contribution_invoice_receipt.html.tpl'); + $content['html'] = $html; } + } +``` -- GitLab