- removed custom user function and put it in custer

- changed main file for cipf instead of fipfcard
- reset some fields after prof form validation
This commit is contained in:
asus
2024-03-17 15:28:08 +01:00
parent eaa45c4ed1
commit a245bd4350
11 changed files with 82 additions and 788 deletions

View File

@@ -53,6 +53,27 @@ function replace_words($matches, $user_id = null) {
/*
* filter emails in the form-builder hook, before the wp_mail hook
* it receives the id of the user, no need to have the user still logged-in
*
function filter_email_fb_CIPF($reply_body, $post_array) {
PLGNTLS_class::debug_infos();
$id = $post_array['ID'];
// pattern : anything surrounded by '$$', ex : $$value$$
$pattern = '/\$\$(.*?)\$\$/';
// inline callback, with 'use' to get the id
$new_body = preg_replace_callback($pattern, function($matches) use ($id) {
return replace_words_CIPF($matches, $id);
}, $reply_body);
return $new_body;
}
add_filter('df_confirmation_body', 'filter_email_fb_CIPF', 10, 2); // the receive an email
add_filter('df_notification_body', 'filter_email_fb_CIPF', 10, 2); // the admin receive a notification
*/
/*