Skip to:
Content

BuddyPress.org

Changeset 5479


Ignore:
Timestamp:
12/10/2011 05:41:48 PM (13 years ago)
Author:
boonebgorges
Message:

Pass concatenated alt parameter to bp_core_fetch_avatar() throughout core component. References #3806

Location:
trunk/bp-core
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-avatars.php

    r5473 r5479  
    656656
    657657    if ( !$alt )
    658         $alt = __( 'Avatar of %s', 'buddypress' );
     658        $alt = sprintf( __( 'Avatar of %s', 'buddypress' ), bp_core_get_user_displayname( $id ) );
    659659
    660660    // Let BuddyPress handle the fetching of the avatar
  • trunk/bp-core/bp-core-classes.php

    r5302 r5479  
    170170        wp_cache_set( 'bp_user_url_' . $this->id, $this->user_url, 'bp' );
    171171
    172         $this->avatar       = bp_core_fetch_avatar( array( 'item_id' => $this->id, 'type' => 'full'  ) );
    173         $this->avatar_thumb = bp_core_fetch_avatar( array( 'item_id' => $this->id, 'type' => 'thumb' ) );
    174         $this->avatar_mini  = bp_core_fetch_avatar( array( 'item_id' => $this->id, 'type' => 'thumb', 'width' => 30, 'height' => 30 ) );
     172        $this->avatar       = bp_core_fetch_avatar( array( 'item_id' => $this->id, 'type' => 'full', 'alt' => sprintf( __( 'Avatar of %s', 'buddypress' ), $this->fullname ) ) );
     173        $this->avatar_thumb = bp_core_fetch_avatar( array( 'item_id' => $this->id, 'type' => 'thumb', 'alt' => sprintf( __( 'Avatar of %s', 'buddypress' ), $this->fullname ) ) );
     174        $this->avatar_mini  = bp_core_fetch_avatar( array( 'item_id' => $this->id, 'type' => 'thumb', 'alt' => sprintf( __( 'Avatar of %s', 'buddypress' ), $this->fullname ), 'width' => 30, 'height' => 30 ) );
    175175        $this->last_active  = bp_core_get_last_activity( bp_get_user_meta( $this->id, 'last_activity', true ), __( 'active %s', 'buddypress' ) );
    176176    }
  • trunk/bp-core/bp-core-template.php

    r5415 r5479  
    9595
    9696    if ( function_exists( 'bp_core_fetch_avatar' ) )
    97         echo apply_filters( 'bp_comment_author_avatar', bp_core_fetch_avatar( array( 'item_id' => $comment->user_id, 'type' => 'thumb' ) ) );
     97        echo apply_filters( 'bp_comment_author_avatar', bp_core_fetch_avatar( array( 'item_id' => $comment->user_id, 'type' => 'thumb', 'alt' => sprintf( __( 'Avatar of %s', 'buddypress' ), bp_core_get_user_displayname( $comment->user_id ) ) ) ) );
    9898    else if ( function_exists('get_avatar') )
    9999        get_avatar();
     
    104104
    105105    if ( function_exists( 'bp_core_fetch_avatar' ) )
    106         echo apply_filters( 'bp_post_author_avatar', bp_core_fetch_avatar( array( 'item_id' => $post->post_author, 'type' => 'thumb' ) ) );
     106        echo apply_filters( 'bp_post_author_avatar', bp_core_fetch_avatar( array( 'item_id' => $post->post_author, 'type' => 'thumb', 'alt' => sprintf( __( 'Avatar of %s', 'buddypress' ), bp_core_get_user_displayname( $post->post_author ) ) ) ) );
    107107    else if ( function_exists('get_avatar') )
    108108        get_avatar();
Note: See TracChangeset for help on using the changeset viewer.