Spam Protection icon
Security

Spam Protection hooks reference

  • By yonifre
  • v3.2.0 New
  • Updated

Spam Protection 3.2.0 has 8 actions and 38 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 Spam Protection fires an action
add_action( 'maspik/blocked', function( $submission, $verdict ) {
	// Your code runs here.
}, 10, 2 );

// Change a value Spam Protection is about to use
add_filter( 'maspik/client_ip', function( $resolved, $remote ) {
	// Change $resolved here.
	return $resolved;
}, 10, 2 );

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

  • src/Application/SpamGate.php line 134
    /**
     * Fires after a submission was blocked.
     */
    do_action( 'maspik/blocked', $submission, $verdict );
  • maspik/booted

    action
    src/Kernel/Plugin.php line 79
    /**
     * Fires when MASPIK is fully booted. Third parties can register custom checks
     * / integrations here.
     */
    do_action( 'maspik/booted', $this->container );
  • src/Infrastructure/ClientIp.php line 98
    /**
     * Final say for hosts with a bespoke setup. Must return a valid IP.
     */
    apply_filters( 'maspik/client_ip', $resolved, $remote );
  • src/Admin/Rest/DashboardController.php line 188
    /**
     * Fires after the site pulls rules from the Dashboard.
     */
    do_action( 'maspik/dashboard_refresh', $id );
  • src/Application/SpamGate.php line 106
    /**
     * The sentinel that goes out as `maspik_referrer` alongside the score. The
     * score says how suspicious and which integration; the sentinel says which
     * specific marker was missing, so the server can tell `no_state_token` from
     * `no_gform_submit` without guessing. v2 sent both; sending only the number
     * loses that detail.
     */
    apply_filters( 'maspik/direct_post_referrer', null, $submission );
  • src/Application/SpamGate.php line 94
    /**
     * Form-specific direct-POST evidence. Adapters return a 1–9 score when their
     * plugin's own page-context field is missing (Elementor's `referrer`, CF7's
     * `_wpcf7` id, …). Runs after reset() so the score survives into the Matrix
     * payload.
     */
    apply_filters( 'maspik/direct_post_score', 1, $submission );
  • maspik/passed

    action
    src/Application/SpamGate.php line 141
    /**
     * Fires after a submission passed every check (debug logging mode).
     */
    do_action( 'maspik/passed', $submission, $verdict );
  • src/Integrations/IntegrationsProvider.php line 122
    /**
     * Third parties may register custom integrations.
     */
    do_action( 'maspik/register_integrations', $registry );
  • src/Infrastructure/Telemetry/TelemetryReporter.php line 165
    /**
     * The telemetry receiver URL.
     */
    apply_filters( 'maspik/telemetry_endpoint', $url );
  • src/Kernel/Upgrade.php line 417
    /**
     * Fires after MASPIK migrates to a new version. Third parties (and future
     * in-plugin migrations) can hook version-specific steps.
     */
    do_action( 'maspik/upgraded', $fromVersion, MASPIK_VERSION );
  • src/Premium/License.php line 176 · used in 4 places
    do_action( 'maspik/license_changed' );
  • src/Admin/AdminProvider.php line 159
    do_action( 'litespeed_control_set_nocache', 'Maspik admin API: settings must never be served stale' );
  • src/Integrations/Forms/AffiliateWP.php line 88
    apply_filters( 'maspik_disable_affiliatewp_spam_check', false );
  • src/Integrations/Forms/BitForm.php line 74
    apply_filters( 'maspik_disable_bitform_spam_check', false, $formId, $_POST );
  • src/Integrations/Forms/Bricks.php line 74
    apply_filters( 'maspik_disable_bricks_spam_check', false, $form );
  • src/Integrations/Forms/ContactForm7.php line 78
    apply_filters( 'maspik_disable_cf7_spam_check', false, $formId );
  • src/Integrations/Forms/EasyDigitalDownloads.php line 89
    apply_filters( 'maspik_disable_edd_registration_spam_check', false );
  • src/Integrations/Forms/ElementorAtomic.php line 83
    apply_filters( 'maspik_disable_elementor_atomic_forms_spam_check', false, $formFields, $widgetSettings, $postId );
  • src/Integrations/Forms/Elementor.php line 77
    apply_filters( 'maspik_disable_elementor_spam_check', false, $formName, $record );
  • src/Integrations/Forms/EverestForms.php line 81
    apply_filters( 'maspik_disable_everestforms_spam_check', false, $formId );
  • src/Integrations/Forms/FluentForms.php line 67
    apply_filters( 'maspik_disable_fluentforms_spam_check', false, $formId );
  • src/Integrations/Forms/Forminator.php line 60
    apply_filters( 'maspik_disable_forminator_spam_check', false, $formId );
  • src/Integrations/Forms/FunnelKit.php line 97
    apply_filters( 'maspik_disable_funnelkit_spam_check', false );
  • src/Integrations/Forms/GravityForms.php line 86
    apply_filters( 'maspik_disable_gravityforms_spam_check', false, $formId, $form );
  • src/Integrations/Forms/HelloPlus.php line 60
    apply_filters( 'maspik_disable_helloplus_spam_check', false, $record );
  • src/Integrations/Forms/MemberPress.php line 101
    apply_filters( 'maspik_disable_memberpress_spam_check', false, $productId );
  • src/Integrations/Forms/MetForm.php line 75
    apply_filters( 'maspik_disable_metform_spam_check', false, $formId, $formData );
  • src/Integrations/Forms/NinjaForms.php line 85
    apply_filters( 'maspik_disable_ninjaforms_spam_check', false, $formId );
  • src/Integrations/Forms/WordPressRegistration.php line 48
    apply_filters( 'maspik_disable_registration_spam_check', false );
  • src/Integrations/Forms/SureForms.php line 116
    apply_filters( 'maspik_disable_sureforms_spam_check', false, $formId );
  • src/Integrations/Forms/WordPressComments.php line 64
    apply_filters( 'maspik_disable_wp_comments_spam_check', false, $postId, $commentdata );
  • src/Integrations/Forms/WpForms.php line 67
    apply_filters( 'maspik_disable_wpforms_spam_check', false, $formId );
  • src/Integrations/Forms/WSForm.php line 105
    apply_filters( 'maspik_disable_wsform_spam_check', false, $formId );
  • src/Frontend/ScriptInjector.php line 97
    apply_filters( 'maspik_guard_skip_selector', '' );
  • api.php line 71
    apply_filters( 'maspik_validate_custom_form_fields', false, $fields, $form_name );
  • src/Infrastructure/ClientIp.php line 181
    apply_filters( 'maspik/cloudflare_ips', self::CLOUDFLARE_RANGES );
  • src/Application/CheckFactory.php line 66
    apply_filters( 'maspik/field_checks', PipelineBuilder::fieldChecks($config) );
  • src/Integrations/AbstractFormIntegration.php line 71
    apply_filters( 'maspik/infer_unknown_field_types', false, $this->id() );
  • src/Application/CheckFactory.php line 70
    apply_filters( 'maspik/late_checks', PipelineBuilder::lateChecks($config), $submission );
  • src/Admin/Rest/StatsController.php line 79
    apply_filters( 'maspik/matrix_monthly_limit', 100 );
  • src/Integrations/Forms/MemberPress.php line 204
    apply_filters( 'maspik/memberpress_gate_paid_signups', get_option('maspik_memberpress_gate_paid') === '1' );
  • src/Premium/ProGate.php line 34
    apply_filters( 'maspik/pro_supports', false, $feature );
  • src/Application/SpamGate.php line 75
    apply_filters( 'maspik/skip_check', false, $submission );
  • src/Application/CheckFactory.php line 61
    apply_filters( 'maspik/submission_checks', PipelineBuilder::submissionChecks($config), $submission );
  • src/Infrastructure/ClientIp.php line 175
    apply_filters( 'maspik/trust_private_proxy', true );
  • src/Infrastructure/ClientIp.php line 157
    apply_filters( 'maspik/trusted_proxies', $list );

Generated from Spam Protection'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: