Antispam Bee icon
Security

Antispam Bee hooks reference

  • By pluginkollektiv
  • v2.11.13
  • Updated

Antispam Bee 2.11.13 has 0 actions and 15 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
// Change a value Antispam Bee is about to use
add_filter( 'ab_get_allowed_translate_languages', function( $lang ) {
	// Change $lang here.
	return $lang;
}, 10, 1 );

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

  • inc/gui.class.php line 569
    /**
     * Filter the possible languages for the language spam test
     */
    apply_filters( 'ab_get_allowed_translate_languages', $lang );
  • antispam_bee.php line 2828
    /**
     * Filters the secret for a post, which is used in the textarea id attribute.
     */
    apply_filters( 'ab_get_secret_id_for_post', $secret, (int) $post_id, (bool) self::get_option( 'always_allowed' ) );
  • antispam_bee.php line 2798
    /**
     * Filters the secret for a post, which is used in the textarea name attribute.
     */
    apply_filters( 'ab_get_secret_name_for_post', $secret, (int) $post_id, (bool) self::get_option( 'always_allowed' ) );
  • antispam_bee.php line 1853
    /**
     * Filters the IPLocate API key. With this filter, you can add your own
     * IPLocate API key.
     */
    apply_filters( 'antispam_bee_country_spam_apikey', '' );
  • antispam_bee.php line 1970
    /**
     * Filters the detected language. With this filter, other detection methods can
     * skip in and detect the language.
     */
    apply_filters( 'antispam_bee_detected_lang', null, $comment_text );
  • antispam_bee.php line 1316
    /**
     * Filter to change the inline styles of the honeypot field.
     */
    apply_filters( 'antispam_bee_honeypot_styles', 'padding:0 !important;clip:rect(1px, 1px, 1px, 1px) !important;position:absolute !important;white-space:nowrap !important;height:1px !important;width:1px !important;overflow:hidden !important;' );
  • antispam_bee.php line 1838
    /**
     * Filter to hook into the `_is_country_spam` functionality, to implement for
     * example a custom IP check.
     */
    apply_filters( 'antispam_bee_is_country_spam', null, $ip, $allowed, $denied );
  • antispam_bee.php line 2673
    /**
     * Filters the recipients of the spam notification.
     */
    apply_filters( 'antispam_bee_notification_recipients', array( get_bloginfo( 'admin_email' ) ) );
  • antispam_bee.php line 2682
    /**
     * Filters the subject of the spam notification.
     */
    apply_filters( 'antispam_bee_notification_subject', $subject );
  • antispam_bee.php line 2464
    /**
     * Hook for allowing to modify the client IP used by Antispam Bee. Default
     * value is the `REMOTE_ADDR`. IMPORTANT: Don’t return an empty string here,
     * otherwise all comments are marked as spam.
     */
    apply_filters( 'antispam_bee_trusted_ip', wp_unslash( $_SERVER['REMOTE_ADDR'] ) );
  • antispam_bee.php line 1600
    apply_filters( 'ab_action_time_limit', 5 );
  • antispam_bee.php line 1470
    apply_filters( 'allow_empty_comment', false, $comment );
  • antispam_bee.php line 142
    apply_filters( 'antispam_bee_disallow_ajax_calls', true );
  • antispam_bee.php line 534
    apply_filters( 'antispam_bee_is_ping', $is_ping, $comment );
  • antispam_bee.php line 1707
    apply_filters( 'antispam_bee_patterns', $patterns );

Generated from Antispam Bee'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: