[buddypress-trac] [BuddyPress Trac] #6137: xprofile_insert_field() & BP_XProfile_Field->save() work incorrectly

buddypress-trac noreply at wordpress.org
Sun Jan 18 22:44:00 UTC 2015


#6137: xprofile_insert_field() & BP_XProfile_Field->save() work incorrectly
--------------------------+-----------------------------
 Reporter:  slaFFik       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  XProfile      |    Version:
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 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.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6137>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list