wpcf7_spam

The contact-form-7 wpcf7 spam hook.

Published Date - July 22, 2023

Description

return apply_filters( 'wpcf7_spam', $spam, $this );

Parameters

  1. $spam

  2. $instance


Usage

The following example is for adding a hook callback.

// define the wpcf7_spam callback 
function custom_wpcf7_spam( $spam, $instance ){ 
   //custom code here
    return $spam
} 

//add the action 
add_filter('wpcf7_spam', 'custom_wpcf7_spam', 10, 2)

Defined

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

contact-form-7/includes/submission.php

return apply_filters( 'wpcf7_spam', $spam, $this );