Soution code for : How To Create Custom User Role in Wordpress
You can use add role function like
add_role( $role, $display_name, $capabilities );
Example
add_role('basic_contributor', 'Basic Contributor', array( 'read' => true, // True allows that capability 'edit_posts' => true, 'delete_posts' => false, // Use false to explicitly deny ));
No comments:
Post a Comment