Description
Use this filter to control the list of users available in the filters on the entry list, export entries conditional logic and results pages.
Usage
add_filter( 'gform_filters_get_users', 'your_function_name' );
Parameters
- $args array
The array of options to use when filtering the users. See the get_users() Function Reference on the WordPress codex for further details: https://developer.wordpress.org/reference/functions/get_users/
Examples
This example lists only the users from the role “administrator”.
add_filter( 'gform_filters_get_users', 'filters_get_users_args' );
function filters_get_users_args( $args ) {
$args['role'] = 'administrator';
return $args;
}
Placement
This code can be used in the functions.php file of the active theme, a custom functions plugin, a custom add-on, or with a code snippets plugin.
See also the PHP section in this article: Where Do I Put This Code?
Source Code
apply_filters( 'gform_filters_get_users', array( 'number' => 200 ) );
This filter is located in GFCommon::get_entry_info_filter_columns() in common.php