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 extend the valid token times before current date. Learn more about Antispam Javascript token.
- It is a filter for extending the timeframe for our Check entries for spam using JavaScript setting. If this isn't enabled, this filter won't do anything.
- The error message that is associated with this filter is Form token is invalid. Please refresh the page.
Usage
add_filter( 'frm_form_token_check_before_today', 'my_custom_function' );
Parameters
- $times (array)
Examples
Extend times to check before today
This example will extend times to check before today, useful for a user with a longer cache time.
add_filter( 'frm_form_token_check_before_today', 'my_custom_function' );
function my_custom_function( $times ) {
array_push( $times, 3 * DAY_IN_SECONDS ); // Three days ago.
return $times;
}