Advertisement
webreach

Untitled

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