Skip to:

Opened 10 years ago

Closed 10 years ago

#5692 closed enhancement (fixed)

"bp_xprofile_field_get_children" filter not called if no children present

Reported by: drkane's profile drkane Owned by: boonebgorges's profile boonebgorges
Milestone: 2.1 Priority: normal
Severity: normal Version: 2.0
Component: Extended Profile Keywords:


The "bp_xprofile_field_get_children" filter is not called if there are no children found in the SQL query in row 750 of /buddypress/bp-xprofile/bp-xprofile-classes.php, in the "get_children" function. Instead false is immediately returned.

This means that if you want to add in children through a custom filter, there have to be dummy children present in the database.

A use case for this might be a field which allows you to select a country. Rather than add each individual country as a selection option, which would take a long time, we could instead add them through a filter in a plugin.

Change History (2)

#1 @boonebgorges
10 years ago

  • Milestone changed from Awaiting Review to 2.1
  • Type changed from defect (bug) to enhancement

#2 @boonebgorges
10 years ago

  • Owner set to boonebgorges
  • Resolution set to fixed
  • Status changed from new to closed

In 8478:

Don't skip filter in BP_XProfile_Field::get_children() when no children are found

Even null results should go through the 'bp_xprofile_field_get_children'
filter, so that developers can add children dynamically.

Fixes #5692

Note: See TracTickets for help on using tickets.