-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathevaluatewpshortcode.php
More file actions
43 lines (38 loc) · 1.04 KB
/
evaluatewpshortcode.php
File metadata and controls
43 lines (38 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
require_once 'evaluatewpshortcode.civix.php';
use CRM_Evaluatewpshortcode_ExtensionUtil as E;
/**
* Implements hook_civicrm_config().
*
* @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_config/
*/
function evaluatewpshortcode_civicrm_config(&$config) {
_evaluatewpshortcode_civix_civicrm_config($config);
}
/**
* Implements hook_civicrm_install().
*
* @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_install
*/
function evaluatewpshortcode_civicrm_install() {
_evaluatewpshortcode_civix_civicrm_install();
}
/**
* Implements hook_civicrm_enable().
*
* @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_enable
*/
function evaluatewpshortcode_civicrm_enable() {
_evaluatewpshortcode_civix_civicrm_enable();
}
/**
* Implement hook_civicrm_alterMailParams
*
* The main function to evaluate shortcode
*/
function evaluatewpshortcode_civicrm_alterMailParams( &$params, $context ) {
if ( !function_exists( 'do_shortcode' ) ) {
return;
}
$params['html'] = do_shortcode( $params['html'] );
}