Gravity Forms Zero Spam icon
Security

Gravity Forms Zero Spam hooks reference

  • By GravityKit
  • v1.10.2
  • Updated

Gravity Forms Zero Spam 1.10.2 has 2 actions and 18 filters, read directly from its source code on Nov 17, 2026. The list updates automatically when a new version is released.

How to use these hooks

Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.

functions.phpyour child theme
// Run your own code when Gravity Forms Zero Spam fires an action
add_action( 'gf_zero_spam_email_rule_match', function( $rule, $email ) {
	// Your code runs here.
}, 10, 2 );

// Change a value Gravity Forms Zero Spam is about to use
add_filter( 'gf_zero_spam_ai_enabled', function( $value, $arg2, $form, $entry ) {
	// Change $value here.
	return $value;
}, 10, 4 );

Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.

All hooks

  • includes/class-gf-zero-spam-ai-review.php line 616 · used in 4 places
    /**
     * Modifies whether AI should process this submission for the current context.
     */
    apply_filters( 'gf_zero_spam_ai_enabled', false, self::CONTEXT_REVIEW, $form, $entry );
  • includes/class-gf-zero-spam-shield-silent-captcha.php line 688 · used in 3 places
    /**
     * This filter is documented in includes/class-gf-zero-spam.php.
     */
    apply_filters( 'gf_zero_spam_check_key_field', $enabled, $form );
  • includes/class-gf-zero-spam.php line 320
    /**
     * Allows the zero spam key field to be disabled by returning false.
     */
    apply_filters( 'gf_zero_spam_add_key_field', true );
  • includes/class-gf-zero-spam-ai-review.php line 1279
    /**
     * Modifies the AI confidence threshold for the current context.
     */
    apply_filters( 'gf_zero_spam_ai_confidence_threshold', $threshold, $context, $form, $entry );
  • includes/class-gf-zero-spam-ai-review.php line 998
    /**
     * Modifies field types included in or excluded from AI payloads.
     */
    apply_filters( 'gf_zero_spam_ai_field_types', $field_types, $form, $entry );
  • includes/class-gf-zero-spam-ai-review.php line 1212
    /**
     * Modifies the AI prompt used for spam review and false-positive rescue.
     */
    apply_filters( 'gf_zero_spam_ai_prompt', $prompt, $form, $entry, $payload );
  • includes/class-gf-zero-spam-ai-review.php line 1335
    /**
     * Modifies the AI provider used for the current classification request.
     */
    apply_filters( 'gf_zero_spam_ai_provider', $provider_id, $context, $form, $entry );
  • includes/class-gf-zero-spam-ai-review.php line 1571
    /**
     * Modifies the per-call AI request timeout.
     */
    apply_filters( 'gf_zero_spam_ai_timeout', self::DEFAULT_TIMEOUT, $form, $entry, $payload );
  • includes/class-gf-zero-spam-ai-review.php line 1451
    /**
     * Short-circuits AI Spam Review with a deterministic verdict.
     */
    apply_filters( 'gf_zero_spam_ai_verdict', null, $payload, $form, $entry );
  • includes/class-gf-zero-spam-addon.php line 252
    /**
     * Filters the order in which the spam checks run during form submission.
     */
    apply_filters( 'gf_zero_spam_check_order', $order );
  • includes/class-gf-zero-spam-token-endpoint.php line 126
    /**
     * Filters the client IP address used for rate limiting.
     */
    apply_filters( 'gf_zero_spam_client_ip', $ip );
  • includes/class-email-rejection.php line 274
    /**
     * Fires when an email matches a rejection rule.
     */
    do_action( 'gf_zero_spam_email_rule_match', $rule, $email );
  • includes/class-email-rejection.php line 203
    /**
     * Modifies the email rejection rules before evaluation.
     */
    apply_filters( 'gf_zero_spam_email_rules', $rules, $field, $form );
  • includes/class-gf-zero-spam.php line 354
    /**
     * Filters the fallback token TTL embedded in the page HTML.
     */
    apply_filters( 'gf_zero_spam_fallback_token_ttl', GF_Zero_Spam_AddOn::get_instance()->get_token_ttl_seconds() );
  • includes/class-gf-zero-spam-token-endpoint.php line 142
    /**
     * Filters the maximum number of token requests allowed per IP per minute.
     */
    apply_filters( 'gf_zero_spam_rate_limit', self::RATE_LIMIT );
  • includes/class-gf-zero-spam.php line 342
    /**
     * Filters the timeout (in milliseconds) for AJAX token fetch attempts.
     */
    apply_filters( 'gf_zero_spam_token_fetch_timeout', 3000 );
  • includes/class-gf-zero-spam.php line 697
    /**
     * Fires when a submission is rejected by the Zero Spam token check.
     */
    do_action( 'gf_zero_spam_token_rejected', $reason_code, $form, $entry );
  • includes/class-gf-zero-spam-token-endpoint.php line 97
    /**
     * Filters the token time-to-live in seconds for dynamically fetched tokens.
     */
    apply_filters( 'gf_zero_spam_token_ttl', GF_Zero_Spam_AddOn::get_instance()->get_token_ttl_seconds() );
  • includes/class-gf-zero-spam-ai-review.php line 442
    apply_filters( 'gf_zero_spam_ai_rescue_result', $proposed_rescue, $verdict, $form, $entry );
  • includes/class-gf-zero-spam-ai-review.php line 1660
    apply_filters( 'gf_zero_spam_ai_result', $proposed_is_spam, $verdict, $form, $entry );

Generated from Gravity Forms Zero Spam's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.

Can't find the right hook?

We can build the customisation for you. Describe what you need: