Created
January 12, 2016 02:46
-
-
Save niknah/233faf895e82fdbddd45 to your computer and use it in GitHub Desktop.
Fix problems with areyouahuman wordpress plugin, contactform.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -rc are-you-a-human/includes/plugin-integration/contact-form-7/ayah_cf7.php are-you-a-human.n/includes/plugin-integration/contact-form-7/ayah_cf7.php | |
*** are-you-a-human/includes/plugin-integration/contact-form-7/ayah_cf7.php 2015-06-17 18:16:30.000000000 +1000 | |
--- are-you-a-human.n/includes/plugin-integration/contact-form-7/ayah_cf7.php 2016-01-12 13:04:18.694492739 +1100 | |
*************** | |
*** 1,6 **** | |
<?php | |
! $CF7_ERROR_MESSAGE = 'We could not verify that you are a human. Please try again.'; | |
/** | |
* Register the AYAH CF7 shortcode | |
--- 1,6 ---- | |
<?php | |
! $GLOBALS['CF7_ERROR_MESSAGE'] = 'We could not verify that you are a human. Please try again.'; | |
/** | |
* Register the AYAH CF7 shortcode | |
*************** | |
*** 27,35 **** | |
if ($ayah->scoreResult()) { | |
return $errors; | |
} else { | |
! global $CF7_ERROR_MESSAGE; | |
! $errors['valid'] = false; | |
! $errors['reason']['your-message'] = __($CF7_ERROR_MESSAGE, 'ayah'); | |
return $errors; | |
} | |
} | |
--- 27,36 ---- | |
if ($ayah->scoreResult()) { | |
return $errors; | |
} else { | |
! $errors->invalidate('',$GLOBALS['CF7_ERROR_MESSAGE']); | |
! | |
! // $errors['valid'] = false; | |
! // $errors['reason']['your-message'] = __($CF7_ERROR_MESSAGE, 'ayah'); | |
return $errors; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment