bp_document_allowed_mimes( Array $existing_mimes = array() )
Mine type for uploader allowed by buddyboss document for security reason.
Description
Parameters
- $existing_mimes
-
(Optional) carry mime information.
Default value: array()
Return
(Array)
Source
File: bp-document/bp-document-functions.php
function bp_document_allowed_mimes( $existing_mimes = array() ) { if ( bp_is_active( 'media' ) ) { $existing_mimes = array(); $all_extensions = bp_document_extensions_list(); foreach ( $all_extensions as $extension ) { if ( isset( $extension['is_active'] ) && true === (bool) $extension['is_active'] ) { $extension_name = ltrim( $extension['extension'], '.' ); $existing_mimes[ "$extension_name" ] = $extension['mime_type']; } } } return $existing_mimes; }
Changelog
Version | Description |
---|---|
BuddyBoss 1.4.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.