Node > Role
This is the default implementation of the role parser.
Use this element to define user roles and their included capabilities.
parser : 'role'
caps : []
The array of capabilities associate with this role. See add_role for documentation on how to format this attribute.
Note it is recommended to add capabilities as valueless attributes with the '+' modifier.
display
Set the title that this role will be displayed as.
By default, valueless attributes without a modifier will be set as the 'name' attribute.
+ : Valueless attributes set with the '+' modifier will be added the the role's capabilities array.
- : Valueless attributes set with the '-' modifier will be removed from the role's capabilities array.
If set, the value will assigned as the node's 'display' attribute.
This example defines the 'contributor' role with the display name 'Contributor' and assigns the capabilities: 'read', 'edit_posts', 'delete_posts'.
<role contributor "Contributor" +read +edit_posts +delete_posts />