[wp-hackers] Important changes to post type and taxonomy registration
wp at andrewnacin.com
Fri May 14 02:27:17 UTC 2010
** We have also now removed singular_label in favor of
It is no longer being used throughout core in "Edit %s" fashion -- that is
what this system of labels is replacing. Thus, it no longer needs to be so
prominent. It was also introduced in 3.0, and it dies in 3.0. We are however
keeping the original label property ("Posts," etc.), as that has been around
since the introductions of register_taxonomy and register_post_type.
On Thu, May 13, 2010 at 11:53 AM, Andrew Nacin <wp at andrewnacin.com> wrote:
> Testers and hackers,
> We've made two important changes to how you register post types and
> taxonomies. We've introduced two new arrays into the arguments you would
> normally pass during registration: 'labels', and 'capabilities'.
> More or less, label and singular_label is not enough for i18n purposes, so
> we now generate a dozen or so labels based off the post type that can be
> used throughout core, and any plugin can choose to register their own
> translations for their own custom post types. (This also will apply to
> taxonomies.) It isn't fully implemented yet, but it's close. We may
> eliminate singular_label entirely, since that was introduced earlier in the
> 3.0 cycle.
> Second, we've moved the fine-grained capabilities controls for custom post
> types and taxonomies into a capabilities array. Thus, if you were using
> manage_cap, assign_cap, edit_type_cap, etc -- all of those are gone, moved
> under a cap object. ($post_type_object->cap->edit_posts.) Please take note.
> I've also chronicled this in more detail (and arguably more confusing
> fashion) at http://wpdevel.wordpress.com/?p=814. That post also references
> the tickets where this was implemented, so you can look at the code if you
> have any questions, or ping any of the committers etc.
More information about the wp-hackers