gform_akismet_fields_<form_id>
The Gravity Forms gform akismet fields form id hook.
Description
Parameters (3)
- 0. $akismet_info (unknown)
- The akismet info.
- 1. $form
- The form.
- 2. $lead
- The lead.
Usage
- To run the hook, copy the example below.
- $akismet_info = apply_filters( 'gform_akismet_fields_{$form_id}', $akismet_info, $form, $lead );
- if ( !empty( $akismet_info ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the gform_akismet_fields_<form_id> callback
- function filter_gform_akismet_fields_form_id( $akismet_info, $form, $lead ) {
- // make filter magic happen here...
- return $akismet_info;
- };
- // add the filter
- add_filter( "gform_akismet_fields_{$form_id}", 'filter_gform_akismet_fields_form_id', 10, 3 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( "gform_akismet_fields_{$form_id}", 'filter_gform_akismet_fields_form_id', 10, 3 );
Defined (1)
The filter is defined in the following location(s).
- /common.php
- $akismet_info = gf_apply_filters( array( 'gform_akismet_fields', $form['id'] ), $akismet_info, $form, $lead );