Ticket #3500: 3500.03.patch
File 3500.03.patch, 2.2 KB (added by , 13 years ago) |
---|
-
bp-activity/bp-activity-template.php
#P BUDDYPRESS TRUNK SVN
563 563 * @return string 564 564 */ 565 565 function bp_get_activity_avatar( $args = '' ) { 566 566 567 global $activities_template, $bp; 567 568 569 $type_default = bp_is_single_activity() ? 'full' : 'thumb'; 570 568 571 $defaults = array( 569 572 'alt' => __( 'Profile picture of %s', 'buddypress' ), 570 573 'class' => 'avatar', 571 574 'email' => false, 572 'type' => 'thumb',575 'type' => $type_default, 573 576 'user_id' => false 574 577 ); 575 578 576 579 $r = wp_parse_args( $args, $defaults ); 577 580 extract( $r, EXTR_SKIP ); 578 581 579 if ( !isset( $height ) && !isset( $width ) ) { // Backpat 580 if ( 'full' == $type || ( 'thumb' == $type && bp_is_single_activity() ) ) { 581 $height = $bp->avatar->full->height; 582 $width = $bp->avatar->full->width; 583 584 } elseif ( 'thumb' == $type ) { 585 $height = $bp->avatar->thumb->height; 586 $width = $bp->avatar->thumb->width; 582 if ( !isset( $height ) && !isset( $width ) ) { 583 if ( isset( $bp->avatar->full->height ) || isset( $bp->avatar->thumb->height ) ) { // Backpat 584 $height = ( 'full' == $type ) ? $bp->avatar->full->height : $bp->avatar->thumb->height; 585 } else { 586 $height = 20; 587 587 } 588 }589 588 590 // Backpat 591 if ( !isset( $width ) ) 592 $width = 20; 589 if ( isset( $bp->avatar->full->width ) || isset( $bp->avatar->thumb->width ) ) { // Backpat 590 $width = ( 'full' == $type ) ? $bp->avatar->full->width : $bp->avatar->thumb->width; 591 } else { 592 $width = 20; 593 } 593 594 594 if ( !isset( $height ) ) 595 $height = 20; 595 } 596 596 597 597 // Within the loop, we the current activity should be set first to the 598 598 // current_comment, if available -
bp-themes/bp-default/activity/entry.php
18 18 <div class="activity-avatar"> 19 19 <a href="<?php bp_activity_user_link(); ?>"> 20 20 21 <?php bp_activity_avatar( 'type=thumb'); ?>21 <?php bp_activity_avatar(); ?> 22 22 23 23 </a> 24 24 </div>