Codex tools: Log in
Languages: English • (Add your language)
Contents |
Removes a role from WordPress.
NB: This setting is saved to the database (in table wp_options, field wp_user_roles), so it might be better to run this on theme/plugin activation
<?php remove_role( $role ); ?>
<?php remove_role( 'subscriber' ); ?>
remove_role() is located in wp-includes/capabilities.php.
Roles and Capabilities: add_role(), remove_role(), get_role(), add_cap(), remove_cap()