Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/25/2009 08:38:56 PM (12 years ago)
Author:
apeatling
Message:

Activity stream commenting updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-friends/bp-friends-templatetags.php

    r2077 r2128  
    194194    }
    195195
    196 function bp_friend_avatar_thumb() {
    197     echo bp_get_friend_avatar_thumb();
    198 }
    199     function bp_get_friend_avatar_thumb() {
    200         global $friends_template;
    201 
    202         return apply_filters( 'bp_get_friend_avatar_thumb', $friends_template->friendship->friend->avatar_thumb );
     196function bp_friend_avatar_thumb( $args = '' ) {
     197    echo bp_get_friend_avatar_thumb( $args );
     198}
     199    function bp_get_friend_avatar_thumb( $args = '' ) {
     200        global $bp, $friends_template;
     201
     202        $defaults = array(
     203            'type' => 'thumb',
     204            'width' => false,
     205            'height' => false,
     206            'class' => 'avatar',
     207            'id' => false,
     208            'alt' => __( 'Group avatar', 'buddypress' )
     209        );
     210
     211        $r = wp_parse_args( $args, $defaults );
     212        extract( $r, EXTR_SKIP );
     213
     214        return apply_filters( 'bp_get_friend_avatar_thumb', bp_core_fetch_avatar( array( 'item_id' => $friends_template->friendship->friend->id, 'type' => $type, 'alt' => $alt, 'width' => $width, 'height' => $height, 'class' => $class ) ) );
    203215    }
    204216
Note: See TracChangeset for help on using the changeset viewer.