[buddypress-trac] [BuddyPress Trac] #7516: bp_member_profile_data( 'field=Non existing fields' )

buddypress-trac noreply at wordpress.org
Wed Jun 14 20:14:50 UTC 2017


#7516: bp_member_profile_data( 'field=Non existing fields' )
--------------------------+------------------
 Reporter:  seventhqueen  |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  2.9
Component:  Members       |     Version:  2.7
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+------------------

Comment (by tw2113):

 Do we perhaps want to change it to have a filter of
 {{{bp_get_member_profile_data}}} by default and then conditionally append
 the rest?

 {{{
 $filter = 'bp_get_member_profile_data';
 if ( ! empty( $profile_data[ $r['field'] ]['field_type'] ) ) {
     $filter .= "_{$profile_data[ $r['field'] ]['field_type']}";
 }
 $data = apply_filters( $filter, $data, $r )
 }}}

 This way, it at least gets "bp_get_member_profile_data" available as a
 filter. Just a thought.

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


More information about the buddypress-trac mailing list