Extend the "editor" role
-
Hello,
I want to extend the editor role with the capability to create and edit users.
I’ve added
$role = get_role( 'editor' ); $role->add_cap( 'list_users' ); $role->add_cap( 'edit_users' ); $role->add_cap( 'add_users' );
to my functions.php – and the rights a granted.
The problem is that there is no menuitem “users” in the wordpress backendmenu for the editor role? I have to visit /users.php directly to check if the changes have taken effect. How can I add the menupoint “users” ?
Best.
P….
I had in a previous version of the functions.php a function to clear items from mainmenu, but I have removed it (could this still take effect however?)
function remove_menus() { global $menu; global $current_user; get_currentuserinfo(); if($current_user->user_level < 6) { $restricted = array(__('Pages'), __('Media'), __('Links'), __('Custom Post Name'), __('Appearance'), __('Plugins'), __('Users'), __('Tools'), __('Settings'), __('rezension'), ); end ($menu); while (prev($menu)){ $value = explode(' ',$menu[key($menu)][0]); if(in_array($value[0] != NULL?$value[0]:"" , $restricted)){unset($menu[key($menu)]);} }// end while }// end if } add_action('admin_menu', 'remove_menus');
- The topic ‘Extend the "editor" role’ is closed to new replies.