bp_core_get_allowed_avatar_types()

Get allowed avatar types.

Description

Return

(array)

Source

File: bp-core/bp-core-avatars.php

function bp_core_get_allowed_avatar_types() {
	$allowed_types = bp_attachments_get_allowed_types( 'avatar' );

	/**
	 * Filters the list of allowed image types.
	 *
	 * @since BuddyPress 2.3.0
	 *
	 * @param array $allowed_types List of image types.
	 */
	$avatar_types = (array) apply_filters( 'bp_core_get_allowed_avatar_types', $allowed_types );

	if ( empty( $avatar_types ) ) {
		$avatar_types = $allowed_types;
	} else {
		$avatar_types = array_intersect( $allowed_types, $avatar_types );
	}

	return array_values( $avatar_types );
}

Changelog

Changelog
Version Description
BuddyPress 2.3.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.