Filter: um_prepare_user_results_array_meta

apply_filters( 'um_prepare_user_results_array_meta', $user_ids, $query_args ) → {array}

Filters the member directory query result when um_usermeta table is used.

Parameters:
Name Type Description
$user_ids array

Members Query Result.

$query_args array

Query arguments.

Since:
  • 2.1.3
Source:
Returns:

Query result.

Type
array
Example

Remove some users where ID equals 10 and 12 from query.

function my_custom_um_prepare_user_results_array_meta( $user_ids, $query_args ) {
    $user_ids = array_diff( $user_ids, array( 10, 12 ) );
    return $user_ids;
}
add_filter( 'um_prepare_user_results_array_meta', 'my_custom_um_prepare_user_results_array', 10, 2 );