forked from LiveCarta/LiveCartaWP
Changed source root directory
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) exit;
|
||||
|
||||
if (!function_exists('wpae_get_blocked_integrations') || !in_array('contactform7', wpae_get_blocked_integrations())) :
|
||||
|
||||
add_filter( 'wpcf7_validate', 'wpa_contactform7_extra_validation', 10, 2 );
|
||||
|
||||
function wpa_contactform7_extra_validation($result, $tags){
|
||||
if ( empty( $result->get_invalid_fields() ) ) { // only check spam if validation OK (Imp for Level 2)
|
||||
if (wpa_check_is_spam($_POST)){
|
||||
do_action('wpa_handle_spammers','contactform7', $_POST);
|
||||
$result->invalidate('', $GLOBALS['wpa_error_message']);
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
endif;
|
||||
Reference in New Issue
Block a user