edd_allowed_mime_types

Allowed Mime Types.

Description

(array) edd_allowed_mime_types( (array) $existing_mimes = array() ); 

Returns (array)

A list of all the new MIME types appended

Parameters (1)

0. $existing_mimes — Optional. (array) => array()
A list of all the existing MIME types

Usage

  1. if ( !function_exists( 'edd_allowed_mime_types' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'easy-digital-downloads/includes/mime-types.php'; 
  3.  
  4. // A list of all the existing MIME types 
  5. $existing_mimes = array(); 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = edd_allowed_mime_types($existing_mimes); 
  9.  

Defined (1)

The function is defined in the following location(s).

/includes/mime-types.php  
  1. function edd_allowed_mime_types( $existing_mimes = array() ) { 
  2. $existing_mimes['zip'] = 'application/zip'; 
  3. $existing_mimes['epub'] = 'application/epub+zip'; 
  4. $existing_mimes['mobi'] = 'application/x-mobipocket-ebook'; 
  5. $existing_mimes['m4r'] = 'audio/aac'; 
  6. $existing_mimes['aif'] = 'audio/x-aiff'; 
  7. $existing_mimes['aiff'] = 'audio/aiff'; 
  8. $existing_mimes['psd'] = 'image/photoshop'; 
  9. $existing_mimes['exe'] = 'application/octet-stream'; 
  10. $existing_mimes['apk'] = 'application/vnd.android.package-archive'; 
  11. $existing_mimes['msi'] = 'application/x-ole-storage'; 
  12. $existing_mimes['csv'] = 'text/csv'; 
  13.  
  14. return $existing_mimes;