buddypress/tests/phpunit
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
..
assets Update all references from wp_parse_args to bp_parse_args. 2021-09-12 20:43:39 +00:00
includes Raise WordPress required version to 5.4 2021-11-07 17:22:42 +00:00
testcases Attachments: introduce a new function to retrieve a media mime type 2022-03-15 23:30:04 +00:00
bootstrap.php Build/Test Tools: include @wordpress/env into BuddyPress 2020-08-30 17:53:06 +00:00
codecoverage.xml Travis-CI: disable xdebug globally and switch travis:codecoverage to use xdebug instead of phpdbg. 2016-08-08 13:36:32 +00:00
env.multisite.xml Build/Test Tools: include @wordpress/env into BuddyPress 2020-08-30 17:53:06 +00:00
env.xml Build/Test Tools: include @wordpress/env into BuddyPress 2020-08-30 17:53:06 +00:00
multisite.xml Tests: Fix missing 'name' attribute warning for PHPUnit 7. 2020-06-16 04:34:24 +00:00