Changeset 9943
- Timestamp:
- 06/12/2015 03:28:40 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/bp-groups-template.php
r9942 r9943 4675 4675 } 4676 4676 4677 /** 4678 * Output the avatar for the group currently being created 4679 * 4680 * @since BuddyPress (1.1.0) 4681 * 4682 * @see bp_core_fetch_avatar() For more information on accepted arguments 4683 * 4684 * @param array $args See bp_core_fetch_avatar() 4685 */ 4677 4686 function bp_new_group_avatar( $args = '' ) { 4678 4687 echo bp_get_new_group_avatar( $args ); 4679 4688 } 4689 /** 4690 * Return the avatar for the group currently being created 4691 * 4692 * @since BuddyPress (1.1.0) 4693 * 4694 * @see bp_core_fetch_avatar() For more information on accepted arguments 4695 * 4696 * @param array $args See bp_core_fetch_avatar() 4697 * @return string The avatar for the group being created 4698 */ 4680 4699 function bp_get_new_group_avatar( $args = '' ) { 4681 $bp = buddypress(); 4682 4683 $r = wp_parse_args( $args, array(4700 4701 // Parse arguments 4702 $r = bp_parse_args( $args, array( 4684 4703 'type' => 'full', 4685 4704 'width' => false, … … 4687 4706 'class' => 'avatar', 4688 4707 'id' => 'avatar-crop-preview', 4689 'alt' => __( 'Group avatar', 'buddypress' ),4708 'alt' => __( 'Group photo', 'buddypress' ), 4690 4709 'no_grav' => false 4691 ) ); 4692 4710 ), 'get_new_group_avatar' ); 4711 4712 // Merge parsed arguments with object specific data 4693 4713 $r = array_merge( $r, array( 4694 'item_id' => $bp->groups->current_group->id,4714 'item_id' => bp_get_current_group_id(), 4695 4715 'object' => 'group', 4696 4716 'avatar_dir' => 'group-avatars', 4697 4717 ) ); 4698 4718 4719 // Get the avatar 4699 4720 $avatar = bp_core_fetch_avatar( $r ); 4700 4721
Note: See TracChangeset
for help on using the changeset viewer.