bp_get_group_avatar_url( object|bool $group = false, string $type = 'full' )

Returns the group avatar URL.


Parameters Parameters

$group

(object|bool) (Optional) Group object. Default current group in loop.

Default value: false

$type

(string) (Optional) The type of the avatar ('full' or 'thumb').

Default value: 'full'


Top ↑

Return Return

(string) The avatar URL.


Source Source

File: bp-groups/bp-groups-template.php

function bp_get_group_avatar_url( $group = false, $type = 'full' ) {
	$group_id = bp_get_group_id( $group );

	if ( ! $group_id ) {
		return '';
	}

	return bp_core_fetch_avatar(
		array(
			'type'    => $type,
			'object'  => 'group',
			'item_id' => $group_id,
			'html'    => false,
		)
	);
}


Top ↑

Changelog Changelog

Changelog
Version Description
5.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.