Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save niknah/233faf895e82fdbddd45 to your computer and use it in GitHub Desktop.
Save niknah/233faf895e82fdbddd45 to your computer and use it in GitHub Desktop.
Fix problems with areyouahuman wordpress plugin, contactform.
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