[wp-hackers] Custom Post Type Capabilities

Brent thenbrent at gmail.com
Sat May 29 14:05:50 UTC 2010


I'm trying to use a custom capability_type for register_post_type, but I've
run into a few issues.

To allow a post of the custom type to be created and published, I thought
that only *'edit_' . $capability_type* and *'publish_' . $capability_type .
's'* would be required.

However, for the custom post's admin menu to show, *'edit_' .
$capability_type . 's' *is required. This wouldn't be an issue, except that
then when *'edit_' . $capability_type . 's'* is added to that user's role,
they are also able to edit other's posts of that type, even though
*'edit_others_'
. $capability_type . 's' *is not assigned to them. (bug? my
misinterpretation?)

Is there a way to allow a certain role to add new posts & edit those posts,
but not the posts of others? Something equivalent to the built-in author
role but only for this post type.


More information about the wp-hackers mailing list