Skip to:
Content

BuddyPress.org

Changeset 8478


Ignore:
Timestamp:
06/07/2014 06:00:43 PM (6 years ago)
Author:
boonebgorges
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-xprofile/bp-xprofile-classes.php

    r8430 r8478  
    750750        $sql = $wpdb->prepare( "SELECT * FROM {$bp->profile->table_name_fields} WHERE parent_id = %d AND group_id = %d $sort_sql", $parent_id, $this->group_id );
    751751
    752         if ( !$children = $wpdb->get_results( $sql ) )
    753             return false;
    754 
    755         return apply_filters( 'bp_xprofile_field_get_children', $children );
     752        $children = $wpdb->get_results( $sql );
     753
     754        return apply_filters( 'bp_xprofile_field_get_children', $children, $for_editing );
    756755    }
    757756
Note: See TracChangeset for help on using the changeset viewer.