1
0
Fork 0
mirror of https://github.com/buddypress/buddypress.git synced 2026-07-23 21:06:56 +08:00
buddypress/tests/phpunit/testcases/core
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
..
functions Make sure BP directory page IDs are not wrongly unset on multisite 2021-12-04 14:53:34 +00:00
nav Navigation: Ensure subnav menus can be registered before the parent nav is registered. 2018-07-24 02:52:25 +00:00
template Use static factory method throughout PHPUnit tests. 2017-11-03 19:44:10 +00:00
attachments.php Attachments: introduce a new function to retrieve a media mime type 2022-03-15 23:30:04 +00:00
avatars.php PHP Unit tests: fix avatar filter failing test 2020-10-16 17:58:00 +00:00
cache.php Use static factory method throughout PHPUnit tests. 2017-11-03 19:44:10 +00:00
caps.php Core: improve the way BuddyPress adds the bp_moderate cap to Admins 2020-10-04 16:44:28 +00:00
class-bp-attachment.php Introduce a new method to the BP Attachment API to add file revisions 2021-12-11 12:00:16 +00:00
class-bp-button.php Use static factory method throughout PHPUnit tests. 2017-11-03 19:44:10 +00:00
class-bp-component.php Introduce a new BP_Component property for block globals 2021-07-14 08:52:00 +00:00
class-bp-core-user.php Members: stop mirroring user last_activity data to user metadata 2020-10-15 18:33:17 +00:00
class-bp-email-recipient.php Use static factory method throughout PHPUnit tests. 2017-11-03 19:44:10 +00:00
class-bp-email.php Tests, PHPUnit: test sending a different email type. 2018-01-03 12:05:25 +00:00
class-bp-media-extractor.php PHPUnit: fix failing tests about media 2021-02-06 19:15:14 +00:00
class-bp-user-query.php Support date queries for Members, Groups and Sites 2021-12-12 14:09:02 +00:00
class-bp-walker-nav-menu.php Compat classes to handle Walker_Nav_Menu::walk() changes in WP 5.3 2019-11-29 03:46:56 +00:00
filters.php Add Root component slugs to MS Subdirectory site reserved names 2020-03-15 05:30:13 +00:00
functions.php Test tool: revert [12677] 2020-07-05 11:42:13 +00:00
invitations.php Limit orderby values in BP_Invitation. 2021-08-18 00:28:22 +00:00
optouts.php BP_Optout: Prevent bp_send_email() delivery to opted-out address. 2021-04-28 23:49:31 +00:00
suggestions-nonauth.php Ensure that shared user fixtures are fully cleaned up. 2017-11-03 21:11:52 +00:00
suggestions.php Ensure that shared user fixtures are fully cleaned up. 2017-11-03 21:11:52 +00:00
templateLoader.php Pass extra args to template loading files. 2020-09-19 18:19:45 +00:00