Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
05/15/2016 02:21:54 AM (9 years ago)
Author:
boonebgorges
Message:

Introduce Group Types API.

Modeled on the Member Types API, Group Types allow developers to register
arbitrary group categorizations, and assign one or more of these types to a
given group. BuddyPress stores this information in a custom taxonomy on the
root blog.

Group queries can be filtered by group type, by using the group_type,
group_type__in, and group_type__not_in parameters in the bp_has_groups()
template loop function stack.

Props Mamaduka, boonebgorges, dcavins.
See #6784.

File:
1 edited

Legend:

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

    r10454 r10766  
    212212}
    213213add_action( 'groups_member_after_save', 'groups_clear_group_administrator_cache_on_member_save' );
     214
     215/**
     216 * Clear the group type cache for a group.
     217 *
     218 * Called when group is deleted.
     219 *
     220 * @since 2.6.0
     221 *
     222 * @param int $group_id The group ID.
     223 */
     224function groups_clear_group_type_cache( $group_id = 0 ) {
     225    wp_cache_delete( $group_id, 'bp_groups_group_type' );
     226}
     227add_action( 'groups_delete_group', 'groups_clear_group_type_cache' );
    214228
    215229/* List actions to clear super cached pages on, if super cache is installed */
Note: See TracChangeset for help on using the changeset viewer.