Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/25/2011 07:55:01 PM (15 years ago)
Author:
djpaul
Message:

Align avatars in members' activity streams. Fixes #3364

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity/bp-activity-template.php

    r4847 r4849  
    563563     */
    564564    function bp_get_activity_avatar( $args = '' ) {
    565         global $bp, $activities_template;
     565        global $activities_template, $bp;
    566566
    567567        $defaults = array(
     568            'alt'     => __( 'Profile picture of %s', 'buddypress' ),
     569            'class'   => 'avatar',
     570            'email'   => false,
    568571            'type'    => 'thumb',
    569             'width'   => 20,
    570             'height'  => 20,
    571             'class'   => 'avatar',
    572             'alt'     => __( 'Profile picture of %s', 'buddypress' ),
    573             'email'   => false,
    574572            'user_id' => false
    575573        );
     
    577575        $r = wp_parse_args( $args, $defaults );
    578576        extract( $r, EXTR_SKIP );
     577
     578        if ( !isset( $height ) && !isset( $width ) ) {  // Backpat
     579            if ( 'full' == $type ) {
     580                $height = $bp->avatar->full->height;
     581                $width  = $bp->avatar->full->width;
     582
     583            } elseif ( 'thumb' == $type ) {
     584                $height = $bp->avatar->thumb->height;
     585                $width  = $bp->avatar->thumb->width;
     586            }
     587        }
     588
     589        // Backpat
     590        if ( !isset( $width ) )
     591            $width = 20;
     592
     593        if ( !isset( $height ) )
     594            $height = 20;
    579595
    580596        // Within the loop, we the current activity should be set first to the
Note: See TracChangeset for help on using the changeset viewer.