Last active
January 21, 2019 10:42
-
-
Save alanef/b54a787652aff88dcc794e27b8e6be3c to your computer and use it in GitHub Desktop.
gform spam filter whitelist
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
| add_filter( 'gform_entry_is_spam', funtion($is_spam, $form, $entry) { | |
| if ( in_whitelist() ) { // in white list is your own rules | |
| return false; | |
| } | |
| return $is_spam; | |
| }, 10, // might need to play with priority if using Akismet integration so it checks after Akismet | |
| 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment