Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Create custom user role
- $result = add_role( 'client', __('Sales Person'),
- array(
- 'read' => true, // true allows this capability
- 'edit_posts' => false, // Disallows user to edit their own posts
- 'edit_pages' => false, // Disallows user to edit pages
- 'edit_others_posts' => false, // Disallows user to edit others posts not just their own
- 'create_posts' => false, // Disallows user to create new posts
- 'manage_categories' => false, // Disallows user to manage post categories
- 'publish_posts' => false, // Disallows the user to publish, otherwise posts stays in draft mode
- 'edit_themes' => false, // false denies this capability. User can’t edit your theme
- 'install_plugins' => false, // User cant add new plugins
- 'update_plugin' => false, // User can’t update any plugins
- 'update_core' => false // user cant perform core updates
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement