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:

Description

Adds a role, if it does not exist.

Related Functions

add_filter, add_feed, add_link, add_meta, add_user

Top Google Results

User discussions

wpseek mobile