Changeset 11090
- Timestamp:
- 09/13/2016 05:35:46 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/bp-groups-functions.php
r11086 r11090 37 37 * 38 38 * @since 1.2.0 39 * 40 * @param array|string $args { 41 * Array of al arguments. 42 * @type int $group_id ID of the group. 43 * @type bool $load_users No longer used. 44 * @type bool $populate_extras Whether to fetch membership data and other 45 * extra information about the group. 46 * Default: false. 47 * } 39 * @since 2.7.0 The function signature was changed to accept a group ID only, 40 * instead of an array containing the group ID. 41 * 42 * @param int $group_id ID of the group. 48 43 * @return BP_Groups_Group $group The group object. 49 44 */ 50 45 function groups_get_group( $args = '' ) { 51 $r = wp_parse_args( $args, array( 52 'group_id' => false, 53 'load_users' => false, 54 'populate_extras' => false, 55 ) ); 56 57 $group_args = array( 58 'populate_extras' => $r['populate_extras'], 59 ); 60 61 $group = new BP_Groups_Group( $r['group_id'], $group_args ); 46 // Backward compatibilty. 47 if ( is_array( $args ) && isset( $args['group_id'] ) ) { 48 $group_id = $args['group_id']; 49 } 50 51 $group = new BP_Groups_Group( $group_id ); 62 52 63 53 /**
Note: See TracChangeset
for help on using the changeset viewer.