Ticket #5343: 5343.diff
| File 5343.diff, 1.8 KB (added by , 12 years ago) |
|---|
-
bp-groups/bp-groups-loader.php
591 591 ) ); 592 592 593 593 if ( empty( $bp->bp_options_avatar ) ) { 594 $bp->bp_options_avatar = bp_group_current_avatar();594 $bp->bp_options_avatar = '<img src="' . esc_url( bp_core_avatar_default_thumb() ) . '" alt="' . esc_attr__( 'No Group Avatar', 'buddypress' ) . '" class="avatar" />'; 595 595 } 596 596 } 597 597 } -
bp-groups/bp-groups-template.php
2626 2626 * Group Avatar Template Tags 2627 2627 **/ 2628 2628 2629 function bp_group_current_avatar() { 2630 global $bp; 2629 function bp_group_current_avatar( $type = 'thumb' ) { 2630 echo bp_get_group_current_avatar( $type ); 2631 } 2631 2632 2632 if ( $bp->groups->current_group->avatar_full ) { ?>2633 function bp_get_group_current_avatar( $type = 'thumb' ) { 2633 2634 2634 <img src="<?php echo esc_url( $bp->groups->current_group->avatar_full ); ?>" alt="<?php _e( 'Group Avatar', 'buddypress' ) ?>" class="avatar" /> 2635 $group_avatar = bp_core_fetch_avatar( array( 2636 'item_id' => bp_get_current_group_id(), 2637 'object' => 'group', 2638 'type' => $type, 2639 'avatar_dir' => 'group-avatars', 2640 'alt' => __( 'Group avatar', 'buddypress' ), 2641 'class' => 'avatar' 2642 ) ); 2635 2643 2636 <?php } else { ?> 2644 return apply_filters( 'bp_get_group_current_avatar', $group_avatar ); 2645 } 2637 2646 2638 <img src="<?php echo esc_url( $bp->groups->image_base . '/none.gif' ); ?>" alt="<?php _e( 'No Group Avatar', 'buddypress' ) ?>" class="avatar" />2639 2640 <?php }2641 }2642 2643 2647 function bp_get_group_has_avatar() { 2644 2648 global $bp; 2645 2649