Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/01/2011 06:26:18 PM (14 years ago)
Author:
djpaul
Message:

Improves avatars' HTML alt and title tags. Fixes #2606.

File:
1 edited

Legend:

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

    r3627 r3635  
    288288            'width' => false,
    289289            'height' => false,
     290            'alt' => __( 'Profile picture of %s', 'buddypress' )
    290291        );
    291292
     
    293294        extract( $r, EXTR_SKIP );
    294295
    295         return apply_filters( 'bp_get_the_topic_poster_avatar', bp_core_fetch_avatar( array( 'item_id' => $forum_template->topic->topic_poster, 'type' => $type, 'width' => $width, 'height' => $height ) ) );
     296        return apply_filters( 'bp_get_the_topic_poster_avatar', bp_core_fetch_avatar( array( 'item_id' => $forum_template->topic->topic_poster, 'type' => $type, 'width' => $width, 'height' => $height, 'alt' => $alt ) ) );
    296297    }
    297298
     
    369370            'width' => false,
    370371            'height' => false,
     372            'alt' => __( 'Group logo for %s', 'buddypress' )
    371373        );
    372374
     
    374376        extract( $r, EXTR_SKIP );
    375377
    376         return apply_filters( 'bp_get_the_topic_object_avatar', bp_core_fetch_avatar( array( 'item_id' => $forum_template->topic->object_id, 'type' => $type, 'object' => 'group', 'width' => $width, 'height' => $height ) ) );
     378        return apply_filters( 'bp_get_the_topic_object_avatar', bp_core_fetch_avatar( array( 'item_id' => $forum_template->topic->object_id, 'type' => $type, 'object' => 'group', 'width' => $width, 'height' => $height, 'alt' => $alt ) ) );
    377379    }
    378380
     
    387389            'width' => false,
    388390            'height' => false,
     391            'alt' => __( 'Profile picture of %s', 'buddypress' )
    389392        );
    390393
     
    392395        extract( $r, EXTR_SKIP );
    393396
    394         return apply_filters( 'bp_get_the_topic_last_poster_avatar', bp_core_fetch_avatar( array( 'email' => $forum_template->topic->topic_last_poster_email, 'item_id' => $forum_template->topic->topic_last_poster, 'type' => $type, 'width' => $width, 'height' => $height ) ) );
     397        return apply_filters( 'bp_get_the_topic_last_poster_avatar', bp_core_fetch_avatar( array( 'email' => $forum_template->topic->topic_last_poster_email, 'item_id' => $forum_template->topic->topic_last_poster, 'type' => $type, 'width' => $width, 'height' => $height, 'alt' => $alt ) ) );
    395398    }
    396399
     
    909912            'width' => 20,
    910913            'height' => 20,
     914            'alt' => __( 'Profile picture of %s', 'buddypress' )
    911915        );
    912916
     
    914918        extract( $r, EXTR_SKIP );
    915919
    916         return apply_filters( 'bp_get_the_topic_post_poster_avatar', bp_core_fetch_avatar( array( 'item_id' => $topic_template->post->poster_id, 'type' => $type, 'width' => $width, 'height' => $height ) ) );
     920        return apply_filters( 'bp_get_the_topic_post_poster_avatar', bp_core_fetch_avatar( array( 'item_id' => $topic_template->post->poster_id, 'type' => $type, 'width' => $width, 'height' => $height, 'alt' => $alt ) ) );
    917921    }
    918922
Note: See TracChangeset for help on using the changeset viewer.