[wp-hackers] Capabilities and all that

Simon Wheatley simon at sweetinteraction.com
Mon Jul 23 14:48:26 UTC 2012


I have a CPT for Videos. I want to allow all the users who would normally be able to edit/delete/publish/etc posts to be able to do the same with videos. I also want to have a separate role, Video Editor, which can do everything with videos but *only* with videos, I don't want them to be able to do anything else.

So far I've created a post type with a capability_type of video, and it has all the edit_video, etc, caps. I've created the Video Editor role and that seems to work.

I was hoping for a neat way of using map_meta_cap or similar to allow anyone with a *_posts(s) type cap to carry that cap over to the *_video(s) caps.

Any tips, or do I have to add all the *_video(s) caps to all the roles in the site I want to have them.

Thanks in advance.


My life in WordPress:

Company information:
Sweet Interaction Ltd is Registered in England/Wales, no. 6610741
Registered office: 7 Malton Av, Manchester, M21 8AT

More information about the wp-hackers mailing list