#3513 closed enhancement (fixed)
add field_ ID to xprofile_get_field_data filter
Reported by: | sboisvert | Owned by: | |
---|---|---|---|
Milestone: | 1.5 | Priority: | normal |
Severity: | minor | Version: | 1.5 |
Component: | Extended Profile | Keywords: | |
Cc: | sboisvert |
Description
There may be a much better way to do what I am trying to do, and if so I apologize for wasting your time if this would be better implemented in another way.
But I find it would be particularly useful to have $field_id passed to the xprofile_get_field_data filter as without it I find it hard to see how one would adequately know how to process the data.
I have included an svn patch that adds $field_id to both apply_filter calls in xprofile_get_field_data function. Note that I am open to changing this to move it up one to the bp_get_profile_field_data filter, but I suspect it is most versatile in xprofile_get_field_data.
For information purposes, our particular use case involves displaying translations of the drop down value selected based on the language the user is browsing the site in.
Good catch. You're right that the filter is more or less useless without the field_id passed along as well. In fact, I'll do you one better, and pass along the $user_id parameter as well.