Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
05/15/2016 02:21:54 AM (11 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/classes/class-bp-groups-component.php

    r10745 r10766  
    841841                parent::setup_cache_groups();
    842842        }
     843
     844        /**
     845         * Set up taxonomies.
     846         *
     847         * @since 2.6.0
     848         */
     849        public function register_taxonomies() {
     850                // Group Type.
     851                register_taxonomy( 'bp_group_type', 'bp_group', array(
     852                        'public' => false,
     853                ) );
     854        }
    843855}
Note: See TracChangeset for help on using the changeset viewer.