Changeset 7956 for trunk/bp-groups/bp-groups-functions.php
- Timestamp:
- 02/21/2014 05:51:10 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-groups/bp-groups-functions.php
r7948 r7956 41 41 */ 42 42 function groups_get_group( $args = '' ) { 43 $ defaults =array(43 $r = wp_parse_args( $args, array( 44 44 'group_id' => false, 45 45 'load_users' => false, 46 46 'populate_extras' => true, 47 ) ); 48 49 $group_args = array( 50 'populate_extras' => $r['populate_extras'], 47 51 ); 48 52 49 $args = wp_parse_args( $args, $defaults ); 50 extract( $args, EXTR_SKIP ); 51 52 $cache_key = 'bp_groups_group_' . $group_id . ( $load_users ? '_load_users' : '_noload_users' ); 53 54 if ( !$group = wp_cache_get( $cache_key, 'bp' ) ) { 55 $group_args = array( 56 'populate_extras' => $populate_extras, 57 ); 58 59 $group = new BP_Groups_Group( $group_id, $group_args ); 60 wp_cache_set( $cache_key, $group, 'bp' ); 61 } 53 $group = new BP_Groups_Group( $r['group_id'], $group_args ); 62 54 63 55 return apply_filters( 'groups_get_group', $group );
Note: See TracChangeset
for help on using the changeset viewer.