Add Custom Spam Filtering to CF7
Implements additional spam filtering for Contact Form 7 submissions
PHP
function custom_spam_check($spam, $submission) {
$blacklist = array('[email protected]', '[email protected]');
$email = $submission->get_posted_data('your-email');
if (in_array($email, $blacklist)) {
$spam = true;
}
return $spam;
}
add_filter('wpcf7_spam', 'custom_spam_check', 10, 2);
Snippet Feedback
Did this snippet work for you? Do you have any questions about this snippet? Leave some feedback below.
SHARED BY
1 Views