Arne Brachhold

Fixing Jerome’s Keywords and WordPress 2.1

Filed under: Wordpress — arne on March 3, 2007

I’m using the Jerome’s Keywords tagging plugin on this site and noticed that all keywords (tags) for a post will go away if I approve its comments. After some search through the code I’ve found that the plugin is using the “edit_post” hook to update the keywords after you’ve changed them on the post screen.

The problem is that this hook is also executed when you approve a comment, but since you are not coming from the post form you’re not sending any post data (like the keywords) and the plugin assumes that the post has no keywords or you’ve deleted them. Mark Jaquith wrote about this behavior earlier this year. (Read on …)