Capabilities
-
Hi,
I need to have separate permissions/capabilities for the default post type and a custom post type.
I installed Justin Tadlock’s Members plugin and expected (newbie) that there would be separate permissions for posts and the custom post type.
It aint so ?? I only had permissions for the regualr post type even though I had created a custom post type with CPT UI.
I understand that in order to do that, I need to specify a capabilities array – is this correct?
Eg:
register_post_type( 'movie', array( 'public' => true, 'capability_type' => 'movie', 'capabilities' => array( 'publish_posts' => 'publish_movies', 'edit_posts' => 'edit_movies', 'edit_others_posts' => 'edit_others_movies', 'delete_posts' => 'delete_movies', 'delete_others_posts' => 'delete_others_movies', 'read_private_posts' => 'read_private_movies', 'edit_post' => 'edit_movie', 'delete_post' => 'delete_movie', 'read_post' => 'read_movie', ),
I just realized (please correct me if I am wrong) that the plugin does not allow setting of a capabilities array.
What is the best way to do this then?
Or put another way, could you please suggest the best way for me to be able to see permissions for a custom post type in Members plugin?
Thanks ahead of time.
- The topic ‘Capabilities’ is closed to new replies.