2017-05-31 117 views

回答

0

你可以做到这一点通过的functions.php,

// Remove a capability from a specific user. 
$user_id = // The ID of the user to remove the capability from. 
$user = new WP_User($user_id); 
$user->remove_cap('delete_users'); 

只需指定用户ID和删除其删除用户的能力。

+0

发行删除超级管理员 - (一)我要限制多个管理员,这必须是一个自动循环,而不是给ID(B )这种方式管理员将无法删除任何用户,我想只是不允许删除superadmin(ID = 1)。 –

+0

好的,这里是相同的问题可能会帮助你:https://wordpress.stackexchange。 COM /问题/ 104808 /防止管理员用户对编辑看到超级管理员,从用户列表 –

0

Adminimize插件在wordpress中是正确的。