Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
LLMS_Roles::update_caps( WP_Role $role, string $type = 'add', string[] $exclude_groups = array() )
Update the capabilities for a given role
Description Description
Parameters Parameters
- $role
-
(Required) Role object.
- $type
-
(Optional) Update type [add|remove].
Default value: 'add'
- $exclude_groups
-
(Optional) Array of groups to exclude.
Default value: array()
Return Return
(void)
Source Source
File: includes/class.llms.roles.php
Changelog Changelog
Version | Description |
---|---|
4.5.1 | Added $exclude_group parameter that allows excluding groups of caps from the update. |
3.13.0 | Introduced. |