wpcf7_spam хук-фильтрCF7 1.0

Использование

add_filter( 'wpcf7_spam', 'wp_kama_wpcf7_spam_filter', 10, 2 );

/**
 * Function for `wpcf7_spam` filter-hook.
 * 
 * @param  $spam 
 * @param  $that 
 *
 * @return 
 */
function wp_kama_wpcf7_spam_filter( $spam, $that ){

	// filter...
	return $spam;
}
$spam
-
$that
-

Где вызывается хук

WPCF7_Submission::spam()
wpcf7_spam
contact-form-7/includes/submission.php 720
return apply_filters( 'wpcf7_spam', $spam, $this );

Где используется хук в Contact Form 7

contact-form-7/modules/akismet.php 9
add_filter( 'wpcf7_spam', 'wpcf7_akismet', 10, 2 );
contact-form-7/modules/disallowed-list.php 3
add_filter( 'wpcf7_spam', 'wpcf7_disallowed_list', 10, 2 );
contact-form-7/modules/recaptcha/recaptcha.php 121
add_filter( 'wpcf7_spam', 'wpcf7_recaptcha_verify_response', 9, 2 );