add_role Wordpress function


Description:

Add role, if it does not exist.


Syntax:


Arguments:

(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 );


Return Type:

(null|WP_Role) WP_Role object if role is added, null if already exists.


Define At:

wp-includes/capabilities.php


Wordpress Reference URL:

http://codex.wordpress.org/Function_Reference/add_role


0 Flares Facebook 0 Google+ 0 0 Flares ×
Posted in: Wordpress functions
0 Flares Facebook 0 Pin It Share 0 Google+ 0 0 Flares ×