Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
09/14/2016 01:34:44 AM (10 years ago)
Author:
boonebgorges
Message:

Groups: Eliminate the populate_extras option from the bp_has_groups() stack.

Fun fact: Now that all these values are cached and lazy-loaded, the
parameter no longer does anything. Begone!

See #5451.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-groups/classes/class-bp-groups-group.php

    r11095 r11100  
    882882         *     @type array|string $parent_id          Optional. Array or comma-separated list of group IDs. Results
    883883         *                                            will be limited to children of the specified groups. Default: null.
    884          *     @type bool         $populate_extras    Whether to fetch additional information
    885          *                                            (such as member count) about groups. Default: true.
    886884         *     @type array|string $exclude            Optional. Array or comma-separated list of group IDs.
    887885         *                                            Results will exclude the listed groups. Default: false.
    … …  
    936934                        'include'            => false,
    937935                        'parent_id'          => null,
    938                         'populate_extras'    => true,
    939936                        'update_meta_cache'  => true,
    940937                        'update_admin_cache' => false,
    … …  
    11491146                foreach ( (array) $paged_groups as $group ) {
    11501147                        $group_ids[] = $group->id;
    1151                 }
    1152 
    1153                 // Populate some extra information instead of querying each time in the loop.
    1154                 if ( !empty( $r['populate_extras'] ) ) {
    1155                         $paged_groups = BP_Groups_Group::get_group_extras( $paged_groups, $group_ids, $r['type'] );
    11561148                }
    11571149
Note: See TracChangeset for help on using the changeset viewer.