将此代码放入当前活动主题的函数中。php文件
function remove_editor_menus()
{
global $menu;
global $current_user;
get_currentuserinfo();
if($current_user->user_level < 10)
{
$restricted = array(__(\'Pages\'),
__(\'Media\'),
__(\'Comments\'),
__(\'Tools\'),
);
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_editor_menus\');