cipf v 0.4.1 wip trying to filter registration email

This commit is contained in:
asus
2024-03-27 09:38:19 +01:00
parent 0136be4316
commit 0808c83589
4 changed files with 28 additions and 6 deletions

View File

@@ -89,6 +89,7 @@ function replace_words($matches, $user_id = null) {
function filter_email_wp($args) {
// pattern : anything surrounded by '$$', ex : $$value$$
$pattern = '/\$\$(.*?)\$\$/';
error_log("args: " . json_encode($args));
$old_body = $args['message'];
$new_body = preg_replace_callback($pattern, __NAMESPACE__.'\replace_words', $old_body);

View File

@@ -32,7 +32,10 @@ function return_result($output) {
* format the output
* if is acf, use acf default format
*/
function format_user_info($query, &$current_user, $user_id) {
function format_user_info($query, $current_user, $user_id) {
error_log("query: " . json_encode($query));
error_log("current_user: " . json_encode($current_user));
error_log("user_id: " . json_encode($user_id));
$output_date_format = Custer::USER_INFO_DATE_FORMAT;
$is_acf = false;