bp_blogs_default_avatar( string $avatar, array $params )

Use the mystery blog avatar for blogs.


Parameters Parameters

$avatar

(string) (Required) Current avatar src.

$params

(array) (Required) Avatar params.


Top ↑

Return Return

(string)


Source Source

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

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

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

	return $avatar;
}


Top ↑

Changelog Changelog

Changelog
Version Description
7.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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