Setting Bad Behavior values on site creation

  • 06/05/2013

Contrary to Akismet, it’s not easy to set the global key for Bad Behavior HTTP:BL.

But we can do it setting the value on site creation using the hook wpmu_new_blog.

bad behavior configuration screen

Setting the value automagically in multisite.

	Plugin Name: Copy Bad Behavior key on site creation
	Version: 0.1
	Author: Rodolfo Buaiz
	Author URI:

	function( $blog_id, $user_id, $domain, $path, $site_id, $meta )
	    switch_to_blog( $blog_id );
		$bb['httpbl_key'] = 'MY-BB-HTTPBL';
		$bb['eu_cookie'] = true;
	    update_option( 'bad_behavior_settings', $bb );
	10, 6

Leave a reply

This entry was posted in Hacks and tagged on .