I've been developing a custom post type plugin for my own purposes and I want to understand capabilities in regards to custom post types a little better before I move forward. Unfortunately the Wordpress Codex doesn't really clear it up for me.

I just don't understand what capabilities are actually doing in regards to custom post types.

For example, when I create a custom post type called 'book' and I use 'book' as the capability_type, it generates these 7 primitive capabilities:

Now, can I just create any kind of capability I like? For example could I do this:

[random_capability] => edit_book

So that any user role who has the capability of edit_book can also have permission for random capability?

I've tried experimenting with it by creating two custom post types: book and fantasy-book.

I gave book that random_capability and then told fantasy-book to use book as its capability_type. Now, my understanding is that it would pull books capabilities (including random_capability) and give that capability to fantasy-book, correct?

In practice that doesn't work. I feel like capability_type should be pulling the capabilities of whatever type you give it, or create new capabilities if said type does not exist yet.

If not, then I have no idea how capability_type works and haven't been able to find anything about this. Anyone have any knowledge regarding this?

So basically I should leave the capability creation to other plugins or somewhere else in the code. Should I still allow users to name their own capability types? like my example with book?
– jasonaburtonJul 5 '13 at 1:17

I don't know what you mean by "allow users to name their own capasbility type".
– vancoderJul 5 '13 at 16:48

I'm creating a custom post type maker where the user will be able to set all the settings of a custom post type via a UI in the backend. I meant simply if they would be able to replace 'post' or 'page' with anything - like 'blog' or 'video'
– jasonaburtonJul 5 '13 at 21:20