Skip to content

Instantly share code, notes, and snippets.

@timothyjensen
Last active September 4, 2019 18:49
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timothyjensen/e9bd59a2042a36bae872b71d41768b97 to your computer and use it in GitHub Desktop.
Save timothyjensen/e9bd59a2042a36bae872b71d41768b97 to your computer and use it in GitHub Desktop.
Enforce anti-spam honeypot on all Gravity Forms forms
<?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