- 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:
@@ -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
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user