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

buddypress-trac noreply at wordpress.org
Wed Jul 23 13:42:49 UTC 2014


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

 * owner:   => boonebgorges
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"8672"]:
 {{{
 #!CommitTicketReference repository="" revision="8672"
 Introduce BP_XProfile_Field_Type::pre_validate_filter(), and use in URL
 field type

 The pre_validate_filter() method allows field types to intercept field
 values,
 before they are run through the is_valid() validation routine, and
 optionally
 modify them.

 BP_XProfile_Field_Type_URL uses this filter to silently add the 'http://'
 protocol to submitted values before run through the validation regex
 (which
 requires the protocol). The result is a smoother UX, as users are not
 required
 to enter the protocol in order to have their field value saved.

 To make it possible for protocol-less values to be submitted on the
 profile
 edit form, the 'type' attribute of the URL field was changed from 'url' to
 'text' (with a 'url' inputtype). With 'type=url', modern browsers require
 a
 fully-qualified URL before allowing the form to be submitted.

 Fixes #5501
 }}}

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


More information about the buddypress-trac mailing list