Blackhole for Bad Bots icon
Security

Blackhole for Bad Bots hooks reference

  • By Jeff Starr
  • v3.9 New
  • Updated

Blackhole for Bad Bots 3.9 has 6 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 Blackhole for Bad Bots fires an action
add_action( 'blackhole_badbots_contextual_help', function( $screen ) {
	// Your code runs here.
}, 10, 1 );

// Change a value Blackhole for Bad Bots is about to use
add_filter( 'blackhole_admin_footer_text', function( $array ) {
	// Change $array here.
	return $array;
}, 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/blackhole-helpers.php line 261
    apply_filters( 'blackhole_alert_headers', $headers, $vars );
  • inc/blackhole-helpers.php line 246
    apply_filters( 'blackhole_alert_message', $message, $vars );
  • inc/blackhole-helpers.php line 222
    apply_filters( 'blackhole_alert_name', get_option('blogname') );
  • inc/blackhole-helpers.php line 224
    apply_filters( 'blackhole_alert_subject', __('Bad Bot Alert at ', 'blackhole-bad-bots') . $name .' @ '. $domain );
  • blackhole.php line 113
    apply_filters( 'blackhole_badbots', $blackhole_badbots );
  • inc/contextual-help.php line 513
    do_action( 'blackhole_badbots_contextual_help', $screen );
  • inc/blackhole-response.php line 17
    apply_filters( 'blackhole_block_connection', 'Connection: Close' );
  • inc/blackhole-response.php line 16
    apply_filters( 'blackhole_block_protocol', 'HTTP/1.1' );
  • inc/blackhole-response.php line 15
    apply_filters( 'blackhole_block_status', '403' );
  • inc/settings-reset.php line 159
    apply_filters( 'blackhole_check_date_expired', '2026-12-20' );
  • inc/blackhole-helpers.php line 81
    apply_filters( 'blackhole_custom_dir', 'blackhole' );
  • inc/settings-display.php line 7
    apply_filters( 'blackhole_dash_icon', 'dashicons-shield-alt' );
  • blackhole.php line 156
    apply_filters( 'blackhole_default_ips', $ips );
  • blackhole.php line 166
    apply_filters( 'blackhole_default_uas', $uas );
  • inc/settings-reset.php line 251
    do_action( 'blackhole_delete_bot', $bot_id, $bot_ip, $badbots_update );
  • inc/blackhole-core.php line 37
    apply_filters( 'blackhole_domain', $http_host, $server_name );
  • inc/blackhole-helpers.php line 200
    apply_filters( 'blackhole_email_address', $address );
  • inc/blackhole-helpers.php line 55
    apply_filters( 'blackhole_enable_host_check', true );
  • blackhole.php line 323
    apply_filters( 'blackhole_get_badbots', $bbb_badbots );
  • blackhole.php line 322
    apply_filters( 'blackhole_get_options', $bbb_options );
  • inc/blackhole-helpers.php line 106
    apply_filters( 'blackhole_ignore_backend', true );
  • inc/blackhole-helpers.php line 105
    apply_filters( 'blackhole_ignore_loggedin', false );
  • inc/blackhole-helpers.php line 107
    apply_filters( 'blackhole_ignore_login', true );
  • inc/blackhole-ip.php line 73
    apply_filters( 'blackhole_ip_filter', $options );
  • blackhole_log

    filter
    inc/blackhole-core.php line 177
    apply_filters( 'blackhole_log', $log, $vars );
  • inc/blackhole-core.php line 179
    do_action( 'blackhole_log_bot', $log, $vars );
  • inc/badbots-register.php line 87
    apply_filters( 'blackhole_log_data', $data, $key, $val );
  • inc/blackhole-response.php line 41
    apply_filters( 'blackhole_message_custom', $message );
  • inc/blackhole-response.php line 31
    apply_filters( 'blackhole_message_default', $message );
  • inc/blackhole-response.php line 49
    apply_filters( 'blackhole_message_nothing', $message );
  • inc/blackhole-core.php line 117
    apply_filters( 'blackhole_needle', 'ip_address', $vars, $bbb_badbots );
  • blackhole.php line 96
    apply_filters( 'blackhole_options', $blackhole_options );
  • inc/settings-reset.php line 213
    do_action( 'blackhole_reset_badbots', $badbots_update, $badbots_default );
  • inc/settings-reset.php line 183
    do_action( 'blackhole_reset_options', $options_update, $options_default );
  • inc/blackhole-core.php line 22
    apply_filters( 'blackhole_robots_rules', $rules, $path );
  • inc/contextual-help.php line 451
    do_action( 'blackhole_settings_contextual_help', $screen );
  • inc/blackhole-helpers.php line 75
    apply_filters( 'blackhole_template_filename', 'blackhole-template' );
  • inc/blackhole-core.php line 14
    apply_filters( 'blackhole_trigger', $link, $text, $title, $href, $nonce );
  • inc/blackhole-ip.php line 91
    apply_filters( 'blackhole_validate_ip_log', 'Invalid IP Address: '. $ip, $ip );
  • inc/blackhole-helpers.php line 29
    apply_filters( 'blackhole_vars', $vars );
  • inc/blackhole-core.php line 77
    apply_filters( 'blackhole_verify_nonce', $verify );
  • inc/blackhole-lookup.php line 11
    apply_filters( 'blackhole_whois_port', 43 );
  • inc/blackhole-lookup.php line 10
    apply_filters( 'blackhole_whois_server', 'whois.arin.net' );

Generated from Blackhole for Bad Bots'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: