Simmons Consulting, the Website of Toby Simmons

WP Hashcash fix for WordPress 2.0

27
Jan

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.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>