Custom capability (roles & capability)
I lurk over web and can’t find solution, so asking here.
I want to add custom role with custom capability “view-gallery”:
add_role('customer', 'Customer', array('view-gallery')).
The question. Can I somehow check this capability for selected post? Like
current_user_can( 'edit_post', $post_id );but with my “view-gallery”? And sure I need to set up some posts to “white list”. So, is there core-solution? I can make it myself, but prefer to use wordpress functionality instead of creating my own bicycle.
- The topic ‘Custom capability (roles & capability)’ is closed to new replies.