Assign capability to access custom plugins only in wordpress

256 views Asked by At

I have developed a custom plugin "career" in wordpress . It is for view job application . Jobs are actually posts. I am using user role editor plugin to create role and capabilities . there i have created a capability 'career' and a role 'career_manager' . Now how can I assign this 'career' capability to my custom plugin ? If any user added with role 'career_manager' then he can only have access to my custom plugin 'career' .

1

There are 1 answers

0
Red15 On

You might want to look at the map_meta_cap filter: http://codex.wordpress.org/map_meta_cap

Also there is an example of how to do it here : http://justintadlock.com/archives/2010/07/10/meta-capabilities-for-custom-post-types