jetpack_contact_form_is_spam

Filter whether the submitted feedback is considered as spam.

Description

apply_filters( 'jetpack_contact_form_is_spam', (bool) $false, (array) $meta ); 

Parameters (2)

0. $false (bool) => false
False Is the submitted feedback spam? Default to false.
1. $meta (array)
Feedack values returned by the Akismet plugin.

Usage

To run the hook, copy the example below.
  1. $false = apply_filters( 'jetpack_contact_form_is_spam', $false, $meta ); 
  2.  
  3. if ( !empty( $false ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the jetpack_contact_form_is_spam callback 
  2. function filter_jetpack_contact_form_is_spam( $false, $meta ) { 
  3. // make filter magic happen here... 
  4. return $false
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'jetpack_contact_form_is_spam', 'filter_jetpack_contact_form_is_spam', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'jetpack_contact_form_is_spam', 'filter_jetpack_contact_form_is_spam', 10, 2 ); 

Defined (3)

The filter is defined in the following location(s).

/modules/contact-form/admin.php  
  1. $is_spam = apply_filters( 'jetpack_contact_form_is_spam', false, $meta ); 
/modules/contact-form/grunion-contact-form.php  
  1. add_filter( 'jetpack_contact_form_is_spam', array( $this, 'is_spam_akismet' ), 10, 2 ); 
  1. $is_spam = apply_filters( 'jetpack_contact_form_is_spam', false, $akismet_values );