[buddypress-trac] [BuddyPress Trac] #5742: Cannot modify $allowedtags per xProfile field type

buddypress-trac noreply at wordpress.org
Tue Jul 8 14:07:10 UTC 2014


#5742: Cannot modify $allowedtags per xProfile field type
--------------------------+-----------------------------
 Reporter:  needle        |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  XProfile      |    Version:
 Severity:  normal        |   Keywords:  has-patch
--------------------------+-----------------------------
 I've written a plugin that creates a custom field type and have discovered
 that I cannot modify $allowedtags per xProfile field type, but only
 globally.

 To allow this, it seems to me that `$this->field_id` and not `$this->id`
 should be passed to the `xprofile_data_value_before_save` filter in
 `BP_XProfile_ProfileData->save()`, given that
 `xprofile_sanitize_data_value_before_save()` expects the second parameter
 to be `$field_id`. However, this value is not used in the function, nor is
 it passed on to subsequent filters where it could be used to discover the
 field type.

 I'm attaching a patch which would allow the field type to be discoverable
 by passing the `$field_id` onwards.

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


More information about the buddypress-trac mailing list