It takes just one line of code, Listing 10-10, to remove a role. Listing 10-10. Removing a role <?php remove_role('designer'); ?>
If the deleted role has any users assigned to it, their role will be set to "None" until you assign them another one. You can use the Bulk Edit feature to reassign many users at once.
■ Caution: I do not recommend removing any of the five built-in roles, even if you don't plan to use them. Each of the administration screens (and the menu items leading to them) appears only if you have the capability to see it. If you remove the built-in roles, you'll need to make certain you have created other roles with those capabilities, or you'll find yourself locked out of your site.
Was this article helpful?