gform_filters_get_users

gform_filters_get_users

DescriptionUsageParametersExamplesPlacementSource Code

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
array( 'number' => 200 )
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 api_get_users_args( $args ) {
$args['role'] = 'administrator';
return $args;
}

Placement
This code should be placed in the functions.php file of your active theme.
Source Code
apply_filters( 'gform_filters_get_users', array( 'number' => 200 ) )

This action hook is located in GFCommon::get_entry_info_filter_columns() in common.php

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注