bp_groups_default_avatar( string $avatar, array $params )

Use the mystery group avatar for groups.


Parameters Parameters

$avatar

(string) (Required) Current avatar src.

$params

(array) (Required) Avatar params.


Top ↑

Return Return

(string)


Source Source

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

function bp_groups_default_avatar( $avatar, $params ) {
	if ( isset( $params['object'] ) && 'group' === $params['object'] ) {
		if ( isset( $params['type'] ) && 'thumb' === $params['type'] ) {
			$file = 'mystery-group-50.png';
		} else {
			$file = 'mystery-group.png';
		}

		$avatar = buddypress()->plugin_url . "bp-core/images/$file";
	}

	return $avatar;
}


Top ↑

Changelog Changelog

Changelog
Version Description
2.6.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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