remove_role( string $role )
Removes a role, if it exists.
Parameters
-
$role
string Required -
Role name.
Source
File: wp-includes/capabilities.php
.
View all references
function remove_role( $role ) {
wp_roles()->remove_role( $role );
}
Changelog
Version | Description |
---|---|
2.0.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.
Example
Remove the ‘subscriber’ role if it exists.