Making plugins compatible with WordPress 2.3

You might know it or not, but if you use WordPress plugins that are more or less closely related to categories, there’s a 50% chance that they’ll break in WordPress 2.3. The reason is, WordPress devs decided a total overhaul of the category system (and introtuced tagging).

First step is to spot what might cause problems (preferably before your upgrade); for this, the WordPress Upgrade Preflight Check is your friend.

Now this is where the trouble begins for plugins whose development got discontinued by their authors. You’re in the dark to find clear documentation for what should be used instead of direct calls to the database. Saying the codex is incomplete is an euphemism.

In my case, I solved my problem by replacing “SELECT cat_ID from $wpdb->categories” by “$cats = get_all_category_ids();”

get_categories() and get_the_category_by_ID(catID) might be the functions you’re looking for, too.

Leave a Reply

Your email address will not be published. Required fields are marked *