LLMS_Admin_Users_Table::modify_query_args( array $args )
Modify the query arguments of the users table query.
Description Description
If the current user is an instructor and no role
argument is provided will limit the query to users with the instructors_assistant
and instructor
roles.
Parameters Parameters
- $args
-
(array) (Required) Array of arguments to be passed to a WP_User_Query.
Return Return
(array)
Source Source
File: includes/admin/class-llms-admin-users-table.php
public function modify_query_args( $args ) { if ( LLMS_User_Permissions::is_current_user_instructor() && empty( $args['role'] ) ) { $args['role__in'] = array( 'instructors_assistant', 'instructor' ); } return $args; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.34.0 | Introduced. |