bp_get_new_group_avatar( array|string $args = '' )
Return the avatar for the group currently being created
Description
See also
- bp_core_fetch_avatar(): For a description of arguments and return values.
Parameters
- $args
-
(Optional) Arguments are listed here with an explanation of their defaults. For more information about the arguments, see bp_core_fetch_avatar().
- 'alt'
(string) Default: 'Group photo'. - 'class'
(string) Default: 'avatar'. - 'type'
(string) Default: 'full'. - 'width'
(int|bool) Default: false. - 'height'
(int|bool) Default: false. - 'id'
(string) Passed to $css_id parameter. Default: 'avatar-crop-preview'.
Default value: ''
- 'alt'
Return
(string) The avatar for the group being created
Source
File: bp-groups/bp-groups-template.php
5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 | function bp_get_new_group_avatar( $args = '' ) { // Parse arguments. $r = bp_parse_args( $args , array ( 'type' => 'full' , 'width' => false, 'height' => false, 'class' => 'avatar' , 'id' => 'avatar-crop-preview' , 'alt' => __( 'Group photo' , 'buddyboss' ), ), 'get_new_group_avatar' ); // Merge parsed arguments with object specific data. $r = array_merge ( $r , array ( 'item_id' => bp_get_current_group_id(), 'object' => 'group' , 'avatar_dir' => 'group-avatars' , ) ); // Get the avatar. $avatar = bp_core_fetch_avatar( $r ); /** * Filters the new group avatar. * * @since BuddyPress 1.1.0 * * @param string $avatar HTML markup for the new group avatar. * @param array $r Array of parsed arguments for the group avatar. * @param array $args Array of original arguments passed to the function. */ return apply_filters( 'bp_get_new_group_avatar' , $avatar , $r , $args ); } |
Changelog
Version | Description |
---|---|
BuddyPress 1.1.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.