Heads up!
This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.
This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.
This hook can be used to manually flag the submission of a form as honeypot spam.
Usage
add_filter( 'frm_process_honeypot', 'my_custom_function' );
Parameters
- $is_honeypot_spam (bool)
- $atts (array)
Examples
Flag the submission of a form as honeypot spam
This example will flag the submission of a form as honeypot spam
add_filter( 'frm_process_honeypot', 'my_custom_function', 10, 2 );
function my_custom_function( $is_honeypot_spam, $atts ) {
if ( $atts['form']->id === '5' ) { //change 5 to the ID of your form
if ( $is_honeypot_spam ) {
// handle honeypot spam.
}
}
return $is_honeypot_spam;
}