apply_filters( 'um_rest_userdata', $val, $user_id ) → {mixed}
Filters the output data for Rest API userdata call.
Parameters:
Name | Type | Description |
---|---|---|
$val |
mixed | User data value. |
$user_id |
int | User ID. |
- Since:
- 2.0
- Source:
Returns:
User data value.
- Type
- mixed
Example
function my_custom_um_rest_userdata( $value, $user_id ) {
// your code here
return $response;
}
add_filter( 'um_rest_userdata', 'my_custom_um_rest_userdata', 10, 2 );