buddypress/tests
Mathieu Viet 780dc9e062 Attachments: introduce a new function to retrieve a media mime type
`bp_attachements_get_mime_type()` returns a media mime type if it is supported by WordPress, `false` if not. This function was mainly introduced to replace the `mime_content_type()` PHP function which appeared to be problematic for some end users (Some hosts are disabling it, causing an error during the Avatar crop step).

This commit also introduces `bp_attachments_get_file_object()`, a function to avoid code duplication about getting a BP Attachment object.

Props Nihanthk, maleemuse

Fixes #8646 (branch 10.0)



git-svn-id: https://buddypress.svn.wordpress.org/branches/10.0@13264 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
2022-03-15 23:30:04 +00:00
..
phpunit Attachments: introduce a new function to retrieve a media mime type 2022-03-15 23:30:04 +00:00