daily pastebin goal
44%
SHARE
TWEET

Untitled

a guest Feb 17th, 2017 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function custom_upload_mimes($existing_mimes = array()) {
  2.  
  3. // Add *.EPS files to Media upload
  4.     $existing_mimes['eps'] = 'application/postscript';
  5. // Add *.AI files to Media upload
  6.     $existing_mimes['ai'] = 'application/postscript';
  7. // Add *.AI files to Media upload
  8.     $existing_mimes['3ds'] = 'application/postscript';
  9. // Add *.dwg files to Media upload
  10.     $existing_mimes['dwg'] = 'application/acad';
  11. // Add *.dwg files to Media upload
  12.     $existing_mimes['dwg'] = 'application/x-acad';
  13. // Add *.dwg files to Media upload
  14.     $existing_mimes['dwg'] = 'application/autocad_dwg';
  15. // Add *.dwg files to Media upload
  16.     $existing_mimes['dwg'] = 'application/dwg';
  17. // Add *.dwg files to Media upload
  18.     $existing_mimes['dwg'] = 'application/x-dwg';
  19. // Add *.dwg files to Media upload
  20.     $existing_mimes['dwg'] = 'application/x-autocad';
  21. // Add *.dwg files to Media upload
  22.     $existing_mimes['dwg'] = 'drawing/dwg';
  23. //add .zip
  24.     $existing_mimes['zip'] = 'application/zip';
  25.  
  26.     return $existing_mimes;
  27. }
  28.  
  29. add_filter('upload_mimes', 'custom_upload_mimes');
  30.    
  31. add_filter('upload_mimes', 'custom_upload_mimes');
  32. function custom_upload_mimes ( $existing_mimes=array() ) {
  33.     // add your extension to the mimes array as below
  34.     $existing_mimes['zip'] = 'application/zip';
  35.     $existing_mimes['gz'] = 'application/x-gzip';
  36.     return $existing_mimes;
  37. }
RAW Paste Data
Top