[buddypress-trac] [BuddyPress Trac] #5220: Overhaul implementation of xprofile field types

buddypress-trac noreply at wordpress.org
Mon Feb 24 23:31:49 UTC 2014


#5220: Overhaul implementation of xprofile field types
-------------------------+-----------------------
 Reporter:  DJPaul       |       Owner:  DJPaul
     Type:  enhancement  |      Status:  assigned
 Priority:  normal       |   Milestone:  2.0
Component:  XProfile     |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  early        |
-------------------------+-----------------------

Comment (by DJPaul):

 I'm getting close to finishing work on a patch for this ticket, and have
 run into a few areas where I need help. These three functions have
 special-cases for various types of profile field:

 * xprofile_format_profile_field()
 * xprofile_filter_format_field_value()
 * xprofile_filter_link_profile_data()

 Without going into my suggested implementation in detail yet, the latter
 two functions I intend to not change for this ticket because they are both
 implemented as filters, which will allow custom field types to manipulate
 data in a similar way.

 However, I think `xprofile_format_profile_field()` needs some re-factoring
 because it's used inside two other functions and has special handling for
 the datebox field type. The phpDoc description even says "TODO: Should
 really be moved to filters", and it's been like that since sometime before
 the `pre-1.0rc2` tag was created :)

 Can anyone remember what that comment had in mind, or can anyone see a
 good way of restructuring this code? In the worse case, I will simply add
 a filter onto the return value of this function and call it a day.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5220#comment:12>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list