add_role


add_role ( $role, $display_name, $capabilities = array() )

Parameters:
  • (string) $role Role name.
  • (string) $display_name Display name for role.
  • (array) $capabilities List of capabilities, e.g. array( 'edit_posts' => true, 'delete_posts' => false );
Returns:
  • (WP_Role|null) WP_Role object if role is added, null if already exists.
Defined at:

Description

Add role, if it does not exist.

Related Functions

add_filter, add_link, add_meta, add_user, add_feed

Top Google Results

User discussions

wpseek mobile