Skip to:
Content

Changeset 11209


Ignore:
Timestamp:
10/24/2016 08:32:18 PM (19 months ago)
Author:
hnla
Message:

Add group types to bp_get_group_class()

Commit adds loops group types for the groups loop li elements class, this mirrors the behaviour of members types in bp_get_member_class()

Fixes #7303 Props offereins, hnla

File:
1 edited

Legend:

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

    r11186 r11209  
    576576        $classes[] = sanitize_key( $groups_template->group->status );
    577577
     578        // Add current group types.
     579        if ( $group_types = bp_groups_get_group_type( bp_get_group_id(), false ) ) {
     580            foreach ( $group_types as $group_type ) {
     581                $classes[] = sprintf( 'group-type-%s', esc_attr( $group_type ) );
     582            }
     583        }
     584
    578585        // User's group role.
    579586        if ( bp_is_user_active() ) {
Note: See TracChangeset for help on using the changeset viewer.