LLMS_User_Permissions::handle_caps( bool[] $allcaps, string[] $cap, array $args )

Custom capability checks for LifterLMS things


Description Description


Parameters Parameters

$allcaps

(Required) Array of key/value pairs where keys represent a capability name and boolean values represent whether the user has that capability.

$cap

(Required) Required primitive capabilities for the requested capability.

$args

(Required) Arguments that accompany the requested capability check.

  • (string) Requested capability.
  • '1'
    (int) Concerned user ID.
  • '...$2'
    (mixed) Optional second and further parameters, typically object ID.


Top ↑

Return Return

(array)


Top ↑

Source Source

File: includes/class.llms.user.permissions.php



Top ↑

Changelog Changelog

Changelog
Version Description
4.21.2 Add logic to handle the view_grades capability.
3.37.14 Use strict comparison.
3.36.5 Add llms_user_caps_edit_others_posts_post_types filter.
3.34.0 Add logic for edit_users and delete_users capabilities with regards to LifterLMS user roles. Add logic for view_students, edit_students, and delete_students capabilities.
3.13.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.