Last active
January 11, 2017 17:25
-
-
Save stephenscaff/e15b3f4c037cc039ba03 to your computer and use it in GitHub Desktop.
Create a new user role called "client" in Wordpress.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*-----------------------------------------------*/ | |
| /* Create new Role for: Client | |
| /*-----------------------------------------------*/ | |
| $result = add_role( 'client', __('Client' ), | |
| array( | |
| 'read' => true, // true allows this capability | |
| 'edit_posts' => false, // Allows user to edit their own posts | |
| 'edit_pages' => false, // Allows user to edit pages | |
| 'edit_others_posts' => false, // Allows user to edit others posts not just their own | |
| 'create_posts' => false, // Allows user to create new posts | |
| 'manage_categories' => false, // Allows user to manage post categories | |
| 'publish_posts' => false, // Allows 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 | |
| ) | |
| ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment