bp_core_check_avatar_type( array $file )
Does the current avatar upload have an allowed file type?
Description
Permitted file types are JPG, GIF and PNG.
Parameters
- $file
-
(Required) The $_FILES array.
Return
(bool) True if the file extension is permitted, otherwise false.
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() ); }
Changelog
Version | Description |
---|---|
BuddyPress 1.0.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.