Filters the list of editable roles.
Parameters
$all_rolesarray[]- Array of arrays containing role information.
Source
$editable_roles = apply_filters( 'editable_roles', $all_roles );
Changelog
| Version | Description |
|---|---|
| 2.8.0 | Introduced. |
Filters the list of editable roles.
$all_rolesarray[]$editable_roles = apply_filters( 'editable_roles', $all_roles );
| Version | Description |
|---|---|
| 2.8.0 | Introduced. |
You must log in before being able to contribute a note or feedback.
Example migrated from Codex:
Filter out roles with levels higher than the current user’s:
Example migrated from Codex:
Add a “No role” option that sets users’ roles to nothing on pages other than the user profile screen (where it already exists):