- May 24, 2019 at 12:45 pm #85096
For CPT’s I have one which is a plural name ‘documents’ as it’s a library of multiple documents per post. In WPFront this is showing up in permissions with a double ss.
Example of the double ss’s;
publish_documentss edit_documentss delete_documentss edit_published_documentss delete_published_documentss edit_others_documentss delete_others_documentss read_private_documentss edit_private_documentss delete_private_documentss
*Not sure if would be easy to do a check for ending s and not double it up.
ThanksMay 24, 2019 at 10:09 pm #85117
In WordPress standards, CPT names are ‘singular’. So that’s why the role capabilities come with ‘plural’ names.
If we were to not use the plural name for role capability, then it will create a conflict. Because under the hood, both singular and plural capabilities exists. For example if you have a CPT called ‘ABC’, then both ‘edit_abc’ and ‘edit_abcs’ exist in the system. If we were to ignore the ‘s’ because ‘ABC’ itself is plural, then it will conflict between singular and plural capabilities.
Not only that I don’t think checking for an ‘s’ at the end is always going to satisfy the condition.(Ex: address)
SyamMay 24, 2019 at 11:20 pm #85119
That makes sense for sure, I appreciate the explanation.
All the best
You must be logged in to reply to this topic.