Last active
April 24, 2024 18:20
-
-
Save timothyjensen/e9bd59a2042a36bae872b71d41768b97 to your computer and use it in GitHub Desktop.
Enforce anti-spam honeypot on all Gravity Forms forms
This file contains hidden or 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
<?php | |
/** | |
* Enforce anti-spam honeypot on all Gravity forms. | |
* | |
* @param array $form | |
* | |
* @return array $form | |
*/ | |
add_filter( 'gform_form_post_get_meta', function ( $form ) { | |
$form['enableHoneypot'] = true; | |
return $form; | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment