这个edit_theme_options
该功能应允许用户编辑本页所述的侧栏:http://codex.wordpress.org/Appearance_Widgets_SubPanel
要添加到的代码functions.php
$role = get_role(\'editor\');
$role->add_cap(\'edit_theme_options\');
Edit:
这可以防止编辑器访问主题或菜单
function custom_admin_menu() {
$user = new WP_User(get_current_user_id());
if (!empty( $user->roles) && is_array($user->roles)) {
foreach ($user->roles as $role)
$role = $role;
}
if($role == "editor") {
remove_submenu_page( \'themes.php\', \'themes.php\' );
remove_submenu_page( \'themes.php\', \'nav-menus.php\' );
}
}
add_action(\'admin_menu\', \'custom_admin_menu\');
我还没有机会对此进行测试,但它只会将它们从菜单中删除,它们可能仍然可以通过直接键入URL来访问它们。