Advertisement
Guest User

Untitled

a guest
Jun 15th, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. // Create custom user role
  2.  
  3. $result = add_role( 'client', __('Sales Person'),
  4.  
  5. array(
  6. 'read' => true, // true allows this capability
  7. 'edit_posts' => false, // Disallows user to edit their own posts
  8. 'edit_pages' => false, // Disallows user to edit pages
  9. 'edit_others_posts' => false, // Disallows user to edit others posts not just their own
  10. 'create_posts' => false, // Disallows user to create new posts
  11. 'manage_categories' => false, // Disallows user to manage post categories
  12. 'publish_posts' => false, // Disallows the user to publish, otherwise posts stays in draft mode
  13. 'edit_themes' => false, // false denies this capability. User can’t edit your theme
  14. 'install_plugins' => false, // User cant add new plugins
  15. 'update_plugin' => false, // User can’t update any plugins
  16. 'update_core' => false // user cant perform core updates
  17. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement