bp_core_get_allowed_avatar_types()

Get allowed avatar types.


Return Return

(array)


Source 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 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 );
}


Top ↑

Changelog Changelog

Changelog
Version Description
2.3.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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