Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
12/06/2017 04:18:11 PM (6 years ago)
Author:
djpaul
Message:

Groups: add 'fields' parameter to BP_Groups_Group::get().

Allows return of only group IDs instead of entire objects when fields=ids is set, similiar to the fields parameter in WP_Query.

Fixes #7609

Props dcavins

File:
1 edited

Legend:

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

    r11740 r11762  
    797797        'update_meta_cache'  => true,           // Pre-fetch groupmeta for queried groups.
    798798        'update_admin_cache' => false,
     799        'fields'             => 'all',          // Return BP_Groups_Group objects or a list of ids.
    799800    );
    800801
     
    822823        'order'              => $r['order'],
    823824        'orderby'            => $r['orderby'],
     825        'fields'             => $r['fields'],
    824826    ) );
    825827
Note: See TracChangeset for help on using the changeset viewer.