editable_roles WordPress Filter Hook
The editable_roles hook allows you to modify the list of roles that are available for selection in the WordPress admin interface. This can be useful if you want to add or remove roles, or change the order in which they appear.
apply_filters( 'editable_roles', array[] $all_roles ) #
Filters the list of editable roles.
Parameters
- $all_roles
(array[])Array of arrays containing role information.
More Information
editable_roles
is a filter applied by the function get_editable_roles() to the list of roles that one user can assign to others (a user must have the edit_users capability to change another user’s role). This list is displayed in the bulk operations (if the user has the list_users and promote_users) of the Users Screen, and on the profile screen.
Source
Changelog
Version | Description |
---|---|
2.8.0 | Introduced. |