editable_roles
Filters the list of editable roles.
Description
Parameters (1)
- 0. $all_roles (unknown)
- The all roles.
Usage
- To run the hook, copy the example below.
- $all_roles = apply_filters( 'editable_roles', $all_roles );
- if ( !empty( $all_roles ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the editable_roles callback
- function filter_editable_roles( $all_roles ) {
- // make filter magic happen here...
- return $all_roles;
- };
- // add the filter
- add_filter( 'editable_roles', 'filter_editable_roles', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'editable_roles', 'filter_editable_roles', 10, 1 );
Defined (1)
The filter is defined in the following location(s).
- /admin/class-admin.php
- $editable_roles = apply_filters( 'editable_roles', $all_roles );