Skip to:
Content

BuddyPress.org

Ticket #2152: patch.diff

File patch.diff, 1.3 KB (added by calvin_42, 14 years ago)

Patch

  • bp-groups/bp-groups-templatetags.php

    function bp_group_avatar( $args = '' ) { 
    284284                        'width' => false,
    285285                        'height' => false,
    286286                        'class' => 'avatar',
     287                        'item_id' => $groups_template->group->id,
    287288                        'id' => false,
    288289                        'alt' => __( 'Group avatar', 'buddypress' )
    289290                );
    function bp_group_avatar( $args = '' ) { 
    292293                extract( $r, EXTR_SKIP );
    293294
    294295                /* Fetch the avatar from the folder, if not provide backwards compat. */
    295                 if ( !$avatar = bp_core_fetch_avatar( array( 'item_id' => $groups_template->group->id, 'object' => 'group', 'type' => $type, 'avatar_dir' => 'group-avatars', 'alt' => $alt, 'css_id' => $id, 'class' => $class, 'width' => $width, 'height' => $height ) ) )
     296                if ( !$avatar = bp_core_fetch_avatar( array( 'item_id' => $item_id, 'object' => 'group', 'type' => $type, 'avatar_dir' => 'group-avatars', 'alt' => $alt, 'css_id' => $id, 'class' => $class, 'width' => $width, 'height' => $height ) ) )
    296297                        $avatar = '<img src="' . esc_attr( $groups_template->group->avatar_thumb ) . '" class="avatar" alt="' . esc_attr( $groups_template->group->name ) . '" />';
    297298
    298299                return apply_filters( 'bp_get_group_avatar', $avatar );