最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

wordpress editor role remove all but 'menus' in appearance menu

programmeradmin0浏览0评论

I'm trying to remove access to everything in the appearance menu in WP admin for the role editor. Or at the least, just remove access to themes and plugins. I have found how to remove the whole appearance menu but not parts of it like that. is this possible?

Preferably something in functions.php so I could toggle this on/off if ever I needed.

I'm trying to remove access to everything in the appearance menu in WP admin for the role editor. Or at the least, just remove access to themes and plugins. I have found how to remove the whole appearance menu but not parts of it like that. is this possible?

Preferably something in functions.php so I could toggle this on/off if ever I needed.

Share Improve this question asked Nov 28, 2018 at 20:54 M21M21 1113 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

by default the editor role should not have access to plugins nor appearance menu. But maybe this roles is already customised in your installation? here is a list of editor default capabilities

via functions.php you can remove everything in the appearance menu like so:

$role_object = get_role( 'editor' );
$role_object->remove_cap( 'edit_theme_options' );

to remove access to plugins you would have to remove some more capabilities i assume. update_plugins, delete_plugins and so on...

otherwise you could use a plugin to handle different roles comfortable. i do use adminimize quite a while.

发布评论

评论列表(0)

  1. 暂无评论