buddypress/tests/phpunit/testcases
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
..
activity Group the BP_Activity_Activity::get_id() method params into an array 2021-11-14 15:51:15 +00:00
admin Retire Legacy Forums. 2017-12-08 00:22:09 +00:00
blogs Support date queries for Members, Groups and Sites 2021-12-12 14:09:02 +00:00
core Attachments: introduce a new function to retrieve a media mime type 2022-03-15 23:30:04 +00:00
friends Marking deprecated query classes, their methods, arguments as deprecated in the BP_Friends_Friendship and BP_Friends_Friendship classes. 2021-08-22 03:16:06 +00:00
groups Improve behavior of bp_init_group_extensions(). 2021-12-23 14:27:58 +00:00
members Make sure member has a type before trying to remove one 2022-02-20 18:10:18 +00:00
messages Spell "enough" the right way in strings & function names 2022-01-24 21:57:01 +00:00
notifications Clear the user notification cache when bulk marking as unread items 2022-02-25 13:45:23 +00:00
routing Adapt BuddyPress to WP 5.1.0 multisite changes & deprecations 2020-03-31 02:45:13 +00:00
settings Improve sanitization of email notification settings. 2015-11-11 03:22:53 +00:00
testsuite Use static factory method throughout PHPUnit tests. 2017-11-03 19:44:10 +00:00
xprofile xProfile: prevent the Name field to override WP Field Types on signup 2021-10-09 17:13:00 +00:00