Important changes to post type and tax registration

Earlier this week, Nikolay committed a change via #12968 that now allows a post type to register a series of custom labels, via a labels array. This is backwards compatible, as I advised that we leave the label and singular_label properties alone. Nikolay is following up with taxonomyTaxonomy A taxonomy is a way to group things together. In WordPress, some common taxonomies are category, link, tag, or post format. labels in #13357.

However, other changes will be incompatible with development releases of 3.0. I’ve made some changes to custom capabilities for post types in #13358, and will be making similar changes for taxonomies as well.

More or less, edit_cap, edit_type_cap, delete_cap, etc., are all gone. Capabilities are now managed by the capability_type property (i.e. ‘post’, ‘page’), which then builds the corresponding capabilities. This is unchanged. If you want to do finer grained control, such as customizing the names of the individual primitive and metaMeta Meta is a term that refers to the inside workings of a group. For us, this is the team that works on internal WordPress sites like WordCamp Central and Make WordPress. capabilities, then you will need to pass this as a capabilities array.

Capabilities are now referenced in coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. as part of the cap property of the post type object, which in turn is an object of capabilities, keyed by what the capability would be called for posts. Thus, $post_type_object->cap->edit_post. Other properties include edit_posts, edit_others_posts, publish_posts, read_post, etc. (Yes, Nikolay and I discussed this in SF, and chaining like this is PHP4 compatible; this is also how the new labels are implemented.)