WP Hashcash fix for WordPress 2.0
While I haven’t upgraded my WordPress to the 2.x strain, I have been testing with it. One problem is that one of my spam-fighting plugins, WP Hashcash, didn’t work under 2.x. The reason is that WP Hashcash hooked a deprecated (i.e. it’s going away) filter that is no longer available in WP 2. The fix was pretty easy, though. Just edit line 675 of wp-hashcash.php. Change:
add_filter('post_comment_text', 'hashcash_check_hidden_tag');
to
add_filter('preprocess_comment', 'hashcash_check_hidden_tag');
Voilà, it works swell. Plus, you can make this change under WordPress 1.x and it works, too.