bp_core_check_avatar_type( array $file )

Does the current avatar upload have an allowed file type?

Description Description

Permitted file types are JPG, GIF and PNG.

Top ↑

Parameters Parameters


(array) (Required) The $_FILES array.

Top ↑

Return Return

(bool) True if the file extension is permitted, otherwise false.

Source Source

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

function bp_core_check_avatar_type( $file ) {
	return bp_attachments_check_filetype( $file['file']['tmp_name'], $file['file']['name'], bp_core_get_allowed_avatar_mimes() );

Top ↑

Changelog Changelog

Version Description
1.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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