Changeset 7745
- Timestamp:
- 01/21/2014 12:16:37 AM (11 years ago)
- Location:
- trunk/bp-groups
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-groups/bp-groups-loader.php
r7520 r7745 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 } -
trunk/bp-groups/bp-groups-template.php
r7520 r7745 2627 2627 **/ 2628 2628 2629 function bp_group_current_avatar() { 2630 global $bp; 2631 2632 if ( $bp->groups->current_group->avatar_full ) { ?> 2633 2634 <img src="<?php echo esc_url( $bp->groups->current_group->avatar_full ); ?>" alt="<?php _e( 'Group Avatar', 'buddypress' ) ?>" class="avatar" /> 2635 2636 <?php } else { ?> 2637 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 } 2629 /** 2630 * Outputs the current group avatar 2631 * 2632 * @since BuddyPress (1.0) 2633 * @param string $type thumb or full ? 2634 * @uses bp_get_group_current_avatar() to get the avatar of the current group 2635 */ 2636 function bp_group_current_avatar( $type = 'thumb' ) { 2637 echo bp_get_group_current_avatar( $type ); 2638 } 2639 2640 /** 2641 * Returns the current group avatar 2642 * 2643 * @since BuddyPress (2.0) 2644 * @param string $type thumb or full ? 2645 * @uses bp_core_fetch_avatar() to get the avatar of the group 2646 * @uses bp_get_current_group_id() to get current group id 2647 * @uses apply_filters() Filter bp_get_group_current_avatar to modify return value 2648 * @return string $tab The current tab's slug 2649 */ 2650 function bp_get_group_current_avatar( $type = 'thumb' ) { 2651 2652 $group_avatar = bp_core_fetch_avatar( array( 2653 'item_id' => bp_get_current_group_id(), 2654 'object' => 'group', 2655 'type' => $type, 2656 'avatar_dir' => 'group-avatars', 2657 'alt' => __( 'Group avatar', 'buddypress' ), 2658 'class' => 'avatar' 2659 ) ); 2660 2661 return apply_filters( 'bp_get_group_current_avatar', $group_avatar ); 2662 } 2642 2663 2643 2664 function bp_get_group_has_avatar() {
Note: See TracChangeset
for help on using the changeset viewer.