editable_roles
Filter HookDescription
Filters the list of editable roles.Hook Information
File Location |
wp-admin/includes/user.php
View on GitHub
|
Hook Type | Filter |
Line Number | 278 |
Hook Parameters
Type | Name | Description |
---|---|---|
array[]
|
$all_roles
|
Array of arrays containing role information. |
Usage Examples
Basic Usage
<?php
// Hook into editable_roles
add_filter('editable_roles', 'my_custom_filter', 10, 1);
function my_custom_filter($all_roles) {
// Your custom filtering logic here
return $all_roles;
}
Source Code Context
wp-admin/includes/user.php:278
- How this hook is used in WordPress core
<?php
273 *
274 * @since 2.8.0
275 *
276 * @param array[] $all_roles Array of arrays containing role information.
277 */
278 $editable_roles = apply_filters( 'editable_roles', $all_roles );
279
280 return $editable_roles;
281 }
282
283 /**
PHP Documentation
<?php
/**
* Filters the list of editable roles.
*
* @since 2.8.0
*
* @param array[] $all_roles Array of arrays containing role information.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-admin/includes/user.php
Related Hooks
Related hooks will be displayed here in future updates.