There are role-editing plugins available that will allow you to fine-tune your users’ capabilities. Have a look here to see if any will do the trick for you:
https://wordpress.org/plugins/search.php?type=term&q=role+editor
Thread Starter
Vedant
(@vedantmistry)
Thanks Bill,
I have already tried those but no luck with what i want to achieve with it.
I want functionality similar to edit_publish_post capability with a minor difference can i edit wordpress core capability or create new one?
I still think a plugin is the way to go. For example, the Members plugin will give you the ability to set and unset each user-capability individually when you create a new role. (One of the presets may even work for you.) You can allow a role to:
- edit_published_posts, but not edit_others_posts
- edit_published_pages, but not edit_others_pages
- delete_published_posts, but not delete_others_posts
- delete_published_pages, but not delete_others_pages
- disallow publish_posts and publish_pages
I’m sure there must be other plugins that give you similar control, since that’s their job. This one hasn’t been updated for a while but it’s never given me any problems, plus I believe you can get premium (paid) support if needed.
BTW, it’s never a good idea to edit core files (because your changes will be lost with an update) but you certainly can write your own plugin.