Having problems with out of date plugins or themes that are not being updated for WordPress 2.3?? I know the guys here are inundated with requests like what do I replace WP_POST2CAT with??, and some of the support docs don't make much sense to newbies and novices alike (like myself) but I found this article this morning that explains it all.
I am sure there are plenty of articles like this around, but I want this to be as easy to find as possible, I also feel that it spells everything out quite clearly:
WordPress 2.3 makes some significant changes to the way categories are stored, while updating some of my (and other people’s) plugins I found the following terms should be replaced:
$wpdb->categories is replaced by $wpdb->terms
$wpdb->post2cat is replaced by $wpdb->term_relationships
$wpdb->post2cat.post_id is replaced by $wpdb->term_relationships.object_id
$wpdb->post2cat.category_id is replaced by $wpdb->term_relationships.term_taxonomy_id
$wpdb->categories.cat_ID is replaced by $wpdb->terms.term_id
wp_terms now contains all the category (read: taxonomy) names and IDs.
wp_term_taxonomy contains the term (read category) ID, a description of what type it is (category, link_category, etc), the description and the number of posts/links in that taxonomy.
wp_term_relationships contains a lookup of an object_id (read: post ID, link ID, etc) and a term taxonomy ID (from the term_taxonomy table, which relates back to the category).
Other refs to look out for are (especially when they are used OUT of the above context):
cat_ID –> term_ID
categories –> terms
cat_name –> name
Partly this is to remind me, partly for anyone else who wants to know.