Thread Starter
etech0
(@etech0)
Update: it looks like this plugin uses Custom Post Types. How do I allow capabilities for only one post type?
Thread Starter
etech0
(@etech0)
Next update:
I discovered that the Envira plugin uses a custom post type called envira.
So I added this line by register_post_types:
'capability_type' => 'envira'
And I created a capability edit_enviras, and it allows me to create new enviras. However, it does not let me edit enviras that have already been published.
I then created a capability called edit_published_enviras. However, it does not seem to be working at all. (For example, when this capability is checked off and edit_enviras is not, the Envira menu does not show up in the admin)
How can I figure out what is wrong with my edit_published_enviras capability?
Thank you
General information about required capabilities for the custom post type:
http://shinephp.com/capabilities-set-for-custom-post-type/
The key capability to get access to the ‘Posts’ or the custom post type menu, like ‘Envira’ is the ‘edit_posts’, or ‘edit_enviras’. WordPress check this capability before decide to show menu or not.
‘edit_published_posts’ is the additional capability which extends permissions and allows edit posts with ‘Published’ status.
Thread Starter
etech0
(@etech0)
Thanks for answering.
I created a capability for edit_published_enviras, but it didn’t do anything!
Is it ‘envira’ from other author. In that case you need ‘edit_others_enviras’ capability too, similar to ‘edit_others_posts’.
Thread Starter
etech0
(@etech0)
The Envira was created by that author, not by another.