[buddypress-trac] [BuddyPress Trac] #6336: Improve bp_core_check_avatar_type() and introduce a function to get the allowed avatar types

buddypress-trac noreply at wordpress.org
Thu Apr 16 23:09:34 UTC 2015


#6336: Improve bp_core_check_avatar_type() and introduce a function to get the
allowed avatar types
---------------------------+---------------------
 Reporter:  imath          |       Owner:  imath
     Type:  enhancement    |      Status:  closed
 Priority:  normal         |   Milestone:  2.3
Component:  API - Avatars  |     Version:
 Severity:  normal         |  Resolution:  fixed
 Keywords:  has-patch      |
---------------------------+---------------------
Changes (by imath):

 * owner:   => imath
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"9760"]:
 {{{
 #!CommitTicketReference repository="" revision="9760"
 Improve `bp_core_get_allowed_avatar_types()`. Make sure to get the file
 type if the upload was not done using html5

 The way we used to check the image file type is not working if the browser
 is Internet Explorer < 10. In this particular case, the Plupload runtime
 is falling back to flash and the file type is `application/octet-stream`.
 We are now using `wp_check_filetype_and_ext()` to fix this issue.

 You can use the filter `bp_core_get_allowed_avatar_types` if you wish to
 *restrict* the avatar image types. Our supported types are: jpg, jpeg, png
 and gif.

 Props DJPaul.

 Fixes #6336
 See #6290
 See #6278
 }}}

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6336#comment:2>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list