Skip to:
Content

BuddyPress.org

Ticket #6997: 6997.patch

File 6997.patch, 1.6 KB (added by Offereins, 8 years ago)
  • src/bp-members/bp-members-template.php

    diff --git a/src/bp-members/bp-members-template.php b/src/bp-members/bp-members-template.php
    index 73fe00e..c72a904 100644
    a b function bp_member_class( $classes = array() ) { 
    619619                 * Filters the determined classes to add to the HTML element.
    620620                 *
    621621                 * @since 1.7.0
     622                 * @since 2.6.0 Added group ID parameter.
    622623                 *
    623624                 * @param string $classes Classes to be added to the HTML element.
     625                 * @param int $group_id Group ID.
    624626                 */
    625                 $classes = apply_filters( 'bp_get_member_class', $classes );
     627                $classes = apply_filters( 'bp_get_member_class', $classes, $members_template->member->id );
    626628                $classes = array_merge( $classes, array() );
    627629                $retval  = 'class="' . join( ' ', $classes ) . '"';
    628630
  • src/bp-groups/bp-groups-template.php

    diff --git a/src/bp-groups/bp-groups-template.php b/src/bp-groups/bp-groups-template.php
    index dd454eb..37cd37e 100644
    a b function bp_group_class( $classes = array() ) { 
    401401                 * Filters classes that will be applied to row class of the current group in the loop.
    402402                 *
    403403                 * @since 1.7.0
     404                 * @since 2.6.0 Added group ID parameter.
    404405                 *
    405406                 * @param array $classes Array of determined classes for the row.
     407                 * @param int $group_id Group ID.
    406408                 */
    407                 $classes = apply_filters( 'bp_get_group_class', $classes );
     409                $classes = apply_filters( 'bp_get_group_class', $classes, $groups_template->group->id );
    408410                $classes = array_merge( $classes, array() );
    409411                $retval = 'class="' . join( ' ', $classes ) . '"';
    410412