The contact-form-7 wpcf7 submission has disallowed words hook.
Published Date - July 22, 2023
$word = apply_filters(
'wpcf7_submission_has_disallowed_words',
$word,
$submission
);
$word
$submission
The following example is for adding a hook callback.
// define the wpcf7_submission_has_disallowed_words callback
function custom_wpcf7_submission_has_disallowed_words( $word, $submission ){
//custom code here
return $word
}
//add the action
add_filter('wpcf7_submission_has_disallowed_words', 'custom_wpcf7_submission_has_disallowed_words', 10, 2)
The filter is defined in the following location(s).
contact-form-7/modules/disallowed-list.php
$word = apply_filters(
'wpcf7_submission_has_disallowed_words',
$word,
$submission
);