apply_filters( 'um_query_args_{$field}__filter_meta', $skip, $member_directory_meta, $field, $value, $filter_type, $is_default ) → {bool}
Filters marker for skipping default filter handle in member directory queries. Hook handle filter queries for the custom usermeta table only. Note: $field is the field meta key.
Parameters:
Name | Type | Description |
---|---|---|
$skip |
bool | Skip default filter handler marker. |
$member_directory_meta |
object | Member_Directory_Meta class instance. |
$field |
string | Filter's field key. |
$value |
mixed | Filter value. |
$filter_type |
string | Filter type. |
$is_default |
bool | If it's admin filtering option then |
- Since:
- 2.1
- Source:
Returns:
Skip default filter handler marker.
- Type
- bool
Example
function um_custom_query_args_filter_rating__filter_meta( $skip, $member_directory_meta, $field, $value, $filter_type, $is_default ) {
$skip = true;
$member_directory_meta->joins[] = "LEFT JOIN {$wpdb->prefix}um_metadata ummreviews ON ( ummreviews.user_id = u.ID AND ummreviews.um_key = '_reviews_avg' )";
return $skip;
}
add_filter( 'um_query_args_filter_rating__filter_meta', 'um_custom_query_args_filter_rating__filter_meta', 10, 6 );