gde_upload_mimes
Add upload support for natively unsupported mimetypes used by this plugin.
Description
(array) gde_upload_mimes( (array) $existing_mimes = array() );
Returns (array)
Updated array of allowed upload types
Parameters (1)
- 0. $existing_mimes — Optional. (array) =>
array()
- The existing mimes.
Usage
if ( !function_exists( 'gde_upload_mimes' ) ) { require_once ABSPATH . PLUGINDIR . 'google-doc-embedder/functions-admin.php'; } // The existing mimes. $existing_mimes = array(); // NOTICE! Understand what this does before running. $result = gde_upload_mimes($existing_mimes);
Defined (1)
The function is defined in the following location(s).
- /functions-admin.php
- function gde_upload_mimes( $existing_mimes = array() ) {
- $supported_exts = gde_supported_types();
- foreach ( $supported_exts as $ext => $mimetype ) {
- if ( ! array_key_exists( $ext, gde_mimes_expanded( $existing_mimes ) ) ) {
- $existing_mimes[$ext] = $mimetype;
- }
- }
- return gde_mimes_collapsed( $existing_mimes );
- }