[buddypress-trac] [BuddyPress Trac] #5501: Custom xprofile field: URL

buddypress-trac noreply at wordpress.org
Thu Jul 17 00:52:10 UTC 2014


#5501: Custom xprofile field: URL
-------------------------------------+------------------
 Reporter:  sooskriszta              |       Owner:
     Type:  enhancement              |      Status:  new
 Priority:  high                     |   Milestone:  2.1
Component:  XProfile                 |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  needs-patch 2nd-opinion  |
-------------------------------------+------------------
Changes (by boonebgorges):

 * keywords:  needs-refresh => needs-patch 2nd-opinion


Comment:

 Still missing from
 https://buddypress.trac.wordpress.org/attachment/ticket/5501/5501.03.patch:
 the logic that appends 'http://' to the beginning of a saved value if it's
 not found. I still think that this is a good thing to include (we are
 going to have lots of confused users otherwise) but I don't like putting
 it directly into `xprofile_set_field_data()`.

 I'm thinking that the ability to filter a field value before it's saved is
 probably a fairly common thing that field types will want to do. In the
 spirit of #5630, it may be appropriate to add this kind of functionality
 natively in `BP_XProfile_Field_Type`. Maybe something like a
 `pre_save_filter()` method, which is a pass-through by default, and which
 would be hooked maybe to `'xprofile_data_value_before_save'`. DJPaul and
 others, what do you think?

 Alternatively, if we don't want to do this as part of the field type
 architecture, we could just put the method in the URL class, and then
 `add_filter()` as appropriate right in the class constructor.

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


More information about the buddypress-trac mailing list