Opened 10 years ago
Closed 10 years ago
#6137 closed defect (bug) (fixed)
xprofile_insert_field() & BP_XProfile_Field->save() work incorrectly
Reported by: | slaFFik | Owned by: | boonebgorges |
---|---|---|---|
Milestone: | 2.3 | Priority: | high |
Severity: | normal | Version: | |
Component: | Extended Profile | Keywords: | needs-unit-tests |
Cc: |
Description
When you pass is_default_option
to xprofile_insert_field()
function, it's not saved into the DB.
Reason: xprofile_insert_field()
initializes and pass is_default_option
(among others) to BP_XProfile_Field
and to its save()
method, but there is no use or even mention of is_default_option
.
So it's impossible right now using xprofile_insert_field()
to save options defaults for fields. Currently we need to use additional xprofile_field_default_before_save
filter for that.
OR
We need to have a separate function like xprofile_insert_field_option()
that will flatten that (rather) complicated logic in BP_XProfile_Field->save()
around options saving.
See #6134.