Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
08/10/2014 08:33:24 PM (10 years ago)
Author:
boonebgorges
Message:

Introduce bp_xprofile_get_groups() procedural wrapper for BP_XProfile_Group::get()

This wrapper includes a filter on the return values, so that plugin authors can
manipulate data programatically.

Also includes some documentation improvements, and implements new function
throughout BP.

See #5657

Props tw2113

File:
1 edited

Legend:

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

    r8753 r8785  
    1717
    1818/*** Field Group Management **************************************************/
     19
     20/**
     21 * Fetch a set of field groups, populated with fields and field data.
     22 *
     23 * Procedural wrapper for BP_XProfile_Group::get() method.
     24 *
     25 * @since BuddyPress (2.1.0)
     26 *
     27 * @param array $args See {@link BP_XProfile_Group::get()} for description of
     28 *        arguments.
     29 * @return array $groups
     30 */
     31function bp_xprofile_get_groups( $args = array() ) {
     32
     33    $groups = BP_XProfile_Group::get( $args );
     34
     35    return apply_filters( 'bp_xprofile_get_groups', $groups, $args );
     36}
    1937
    2038function xprofile_insert_field_group( $args = '' ) {
Note: See TracChangeset for help on using the changeset viewer.