add_role
add_role ( $role, $display_name, $capabilities = array() )
Parameters:- (string) role Role name.
- (string) display_name Display name for role.
- (bool[]) capabilities List of capabilities keyed by the capability name, e.g. array( 'edit_posts' => true, 'delete_posts' => false ).
Returns:- (WP_Role|void) WP_Role object, if the role is added.
Defined at: - Introduced in WordPress: 2.0.0
- Deprecated in WordPress: —
Description
Adds a role, if it does not exist.