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-template.php

    r8688 r8785  
    2626
    2727    function __construct( $user_id, $profile_group_id, $hide_empty_groups = false, $fetch_fields = false, $fetch_field_data = false, $exclude_groups = false, $exclude_fields = false, $hide_empty_fields = false, $fetch_visibility_level = false, $update_meta_cache = true ) {
    28         $this->groups = BP_XProfile_Group::get( array(
     28        $this->groups = bp_xprofile_get_groups( array(
    2929            'profile_group_id'    => $profile_group_id,
    3030            'user_id'             => $user_id,
     
    601601
    602602    if ( empty( $groups ) ) {
    603         $groups = BP_XProfile_Group::get( array( 'fetch_fields' => true ) );
     603        $groups = bp_xprofile_get_groups( array( 'fetch_fields' => true ) );
    604604        wp_cache_set( 'xprofile_groups_inc_empty', $groups, 'bp' );
    605605    }
Note: See TracChangeset for help on using the changeset viewer.