Skip to:
Content

BuddyPress.org

Changeset 5500


Ignore:
Timestamp:
12/11/2011 04:00:37 PM (14 years ago)
Author:
boonebgorges
Message:

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

Location:
trunk/bp-groups
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-groups/bp-groups-adminbar.php

    r5329 r5500  
    3838        'item_id'    => $bp->groups->current_group->id,
    3939        'width'      => 16,
    40         'height'     => 16
     40        'height'     => 16,
     41        'alt'        => sprintf( __( 'Group logo of %s', 'buddypress' ), $bp->groups->current_group->name )
    4142    ) );
    4243
  • trunk/bp-groups/bp-groups-loader.php

    r5474 r5500  
    470470                $bp->bp_options_avatar = bp_core_fetch_avatar( array(
    471471                    'item_id' => bp_displayed_user_id(),
    472                     'type'    => 'thumb'
     472                    'type'    => 'thumb',
     473                    'alt'     => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_displayed_user_fullname() )
    473474                ) );
    474475                $bp->bp_options_title  = $bp->displayed_user->fullname;
  • trunk/bp-groups/bp-groups-template.php

    r5455 r5500  
    387387            'class' => 'avatar',
    388388            'id' => false,
    389             'alt' => __( 'Group logo of %s', 'buddypress' )
     389            'alt' => sprintf( __( 'Group logo of %s', 'buddypress' ), $groups_template->group->name )
    390390        );
    391391
     
    394394
    395395        /* Fetch the avatar from the folder, if not provide backwards compat. */
    396         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, 'title' => $groups_template->group->name, 'alt' => $groups_template->group->name ) ) )
     396        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, 'title' => $groups_template->group->name, 'alt' => $alt ) ) )
    397397            $avatar = '<img src="' . esc_attr( $groups_template->group->avatar_thumb ) . '" class="avatar" alt="' . esc_attr( $groups_template->group->name ) . '" />';
    398398
     
    566566        $group =& $groups_template->group;
    567567
    568     if ( $group->admins ) { ?>
     568    if ( !empty( $group->admins ) ) { ?>
    569569        <ul id="group-admins">
    570570            <?php foreach( (array)$group->admins as $admin ) { ?>
    571571                <li>
    572                     <a href="<?php echo bp_core_get_user_domain( $admin->user_id, $admin->user_nicename, $admin->user_login ) ?>"><?php echo bp_core_fetch_avatar( array( 'item_id' => $admin->user_id, 'email' => $admin->user_email, 'alt' => __( 'Profile picture of %s', 'buddypress' ) ) ) ?></a>
     572                    <a href="<?php echo bp_core_get_user_domain( $admin->user_id, $admin->user_nicename, $admin->user_login ) ?>"><?php echo bp_core_fetch_avatar( array( 'item_id' => $admin->user_id, 'email' => $admin->user_email, 'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_core_get_user_displayname( $admin->user_id ) ) ) ) ?></a>
    573573                </li>
    574574            <?php } ?>
     
    593593
    594594                <li>
    595                     <a href="<?php echo bp_core_get_user_domain( $mod->user_id, $mod->user_nicename, $mod->user_login ) ?>"><?php echo bp_core_fetch_avatar( array( 'item_id' => $mod->user_id, 'email' => $mod->user_email, 'alt' => __( 'Profile picture of %s', 'buddypress' ) ) ) ?></a>
     595                    <a href="<?php echo bp_core_get_user_domain( $mod->user_id, $mod->user_nicename, $mod->user_login ) ?>"><?php echo bp_core_fetch_avatar( array( 'item_id' => $mod->user_id, 'email' => $mod->user_email, 'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_core_get_user_displayname( $mod->user_id ) ) ) ) ?></a>
    596596                </li>
    597597
     
    10301030            <li>
    10311031
    1032                 <?php echo bp_core_fetch_avatar( array( 'item_id' => $admin->user_id, 'type' => 'thumb', 'width' => 30, 'height' => 30, 'alt' => __( 'Profile picture of %s', 'buddypress' ) ) ) ?>
     1032                <?php echo bp_core_fetch_avatar( array( 'item_id' => $admin->user_id, 'type' => 'thumb', 'width' => 30, 'height' => 30, 'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_core_get_user_displayname( $admin->user_id ) ) ) ) ?>
    10331033
    10341034                <h5>
     
    10461046            <li>
    10471047
    1048                 <?php echo bp_core_fetch_avatar( array( 'item_id' => $admin->user_id, 'type' => 'thumb', 'alt' => __( 'Profile picture of %s', 'buddypress' ) ) ) ?>
     1048                <?php echo bp_core_fetch_avatar( array( 'item_id' => $admin->user_id, 'type' => 'thumb', 'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_core_get_user_displayname( $admin->user_id ) ) ) ) ?>
    10491049
    10501050                <h5><?php echo bp_core_get_userlink( $admin->user_id ) ?></h5>
     
    10951095            <li>
    10961096
    1097                 <?php echo bp_core_fetch_avatar( array( 'item_id' => $mod->user_id, 'type' => 'thumb', 'width' => 30, 'height' => 30, 'alt' => __( 'Profile picture of %s', 'buddypress' ) ) ) ?>
     1097                <?php echo bp_core_fetch_avatar( array( 'item_id' => $mod->user_id, 'type' => 'thumb', 'width' => 30, 'height' => 30, 'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_core_get_user_displayname( $mod->user_id ) ) ) ) ?>
    10981098
    10991099                <h5>
     
    11111111            <li>
    11121112
    1113                 <?php echo bp_core_fetch_avatar( array( 'item_id' => $mod->user_id, 'type' => 'thumb', 'alt' => __( 'Profile picture of %s', 'buddypress' ) ) ) ?>
     1113                <?php echo bp_core_fetch_avatar( array( 'item_id' => $mod->user_id, 'type' => 'thumb', 'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_core_get_user_displayname( $mod->user_id ) ) ) ) ?>
    11141114
    11151115                <h5><?php echo bp_core_get_userlink( $mod->user_id ) ?></h5>
     
    17901790        global $members_template;
    17911791
    1792         return apply_filters( 'bp_get_group_member_avatar', bp_core_fetch_avatar( array( 'item_id' => $members_template->member->user_id, 'type' => 'full', 'email' => $members_template->member->user_email, 'alt' => __( 'Profile picture of %s', 'buddypress' ) ) ) );
     1792        return apply_filters( 'bp_get_group_member_avatar', bp_core_fetch_avatar( array( 'item_id' => $members_template->member->user_id, 'type' => 'full', 'email' => $members_template->member->user_email, 'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), $members_template->member->display_name ) ) ) );
    17931793    }
    17941794
     
    17991799        global $members_template;
    18001800
    1801         return apply_filters( 'bp_get_group_member_avatar_thumb', bp_core_fetch_avatar( array( 'item_id' => $members_template->member->user_id, 'type' => 'thumb', 'email' => $members_template->member->user_email, 'alt' => __( 'Profile picture of %s', 'buddypress' ) ) ) );
     1801        return apply_filters( 'bp_get_group_member_avatar_thumb', bp_core_fetch_avatar( array( 'item_id' => $members_template->member->user_id, 'type' => 'thumb', 'email' => $members_template->member->user_email, 'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), $members_template->member->display_name ) ) ) );
    18021802    }
    18031803
     
    18081808        global $members_template;
    18091809
    1810         return apply_filters( 'bp_get_group_member_avatar_mini', bp_core_fetch_avatar( array( 'item_id' => $members_template->member->user_id, 'type' => 'thumb', 'width' => $width, 'height' => $height, 'email' => $members_template->member->user_email, 'alt' => __( 'Profile picture of %s', 'buddypress' ) ) ) );
     1810        return apply_filters( 'bp_get_group_member_avatar_mini', bp_core_fetch_avatar( array( 'item_id' => $members_template->member->user_id, 'type' => 'thumb', 'width' => $width, 'height' => $height, 'email' => $members_template->member->user_email, 'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), $members_template->member->display_name ) ) ) );
    18111811    }
    18121812
     
    25142514    global $requests_template;
    25152515
    2516     echo apply_filters( 'bp_group_request_user_avatar_thumb', bp_core_fetch_avatar( array( 'item_id' => $requests_template->request->user_id, 'type' => 'thumb', 'alt' => __( 'Profile picture of %s', 'buddypress' ) ) ) );
     2516    echo apply_filters( 'bp_group_request_user_avatar_thumb', bp_core_fetch_avatar( array( 'item_id' => $requests_template->request->user_id, 'type' => 'thumb', 'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_core_get_user_displayname( $requests_template->request->user_id ) ) ) ) );
    25172517}
    25182518
Note: See TracChangeset for help on using the changeset viewer.