Skip to:
Content

BuddyPress.org

Ticket #5657: bp-xprofile-functions-5657.diff

File bp-xprofile-functions-5657.diff, 1.3 KB (added by tw2113, 10 years ago)
  • src/bp-xprofile/bp-xprofile-functions.php

     
    10041004
    10051005        return $field_ids;
    10061006}
     1007
     1008/**
     1009 * Populates the BP_XProfile_Group object with profile field groups, fields, and field data
     1010 *
     1011 * Procedural wrapper for BP_XProfile_Group::get() method.
     1012 *
     1013 * @since BuddyPress (2.1)
     1014 *
     1015 * @param array $args Takes an array of parameters:
     1016 *              'profile_group_id' - Limit results to a single profile group
     1017 *              'user_id' - Required if you want to load a specific user's data
     1018 *              'hide_empty_groups' - Hide groups without any fields
     1019 *              'hide_empty_fields' - Hide fields where the user has not provided data
     1020 *              'fetch_fields' - Load each group's fields
     1021 *              'fetch_field_data' - Load each field's data. Requires a user_id
     1022 *              'exclude_groups' - Comma-separated list of groups to exclude
     1023 *              'exclude_fields' - Comma-separated list of fields to exclude
     1024 *              'update_meta_cache' - Whether to pre-fetch xprofilemeta
     1025 *                 for all retrieved groups, fields, and data
     1026 *
     1027 * @return array $groups
     1028 */
     1029function bp_xprofile_get_groups( $args = array() ) {
     1030
     1031        $groups = BP_XProfile_Group::get( $args );
     1032
     1033        return apply_filters( 'bp_xprofile_get_groups', $groups, $args );
     1034}