Custom capabilities
-
I need to limit users to be able to only post one CPT. I got some advice from a
developer on how to do this and apparently CPT UI is missing the ability to set custom capabilities. Seems like a good feature request, so I am posting it here.I’m looking through the CPT UI plugin code. It doesn’t set the capabilities under the hood. It only sets the capability_type.
The reason this is not good is because if there’s no create_posts cap set, then it’ll automatically fallback to whatever your edit_posts cap is.
At this point, I can’t think of any other way around this. You need the create_posts cap set to be able to target post creation. This means you need to code the CPT registration on your own or ask the CPT UI plugin author to update their plugin to allow you to add in custom capabilities.
- The topic ‘Custom capabilities’ is closed to new replies.