Advertisement
CodeDropz

Add dwg mime types

Sep 24th, 2023 (edited)
599
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.28 KB | None | 0 0
  1. function wc_edit_upload_types($existing_mimes = array()) {
  2.     $existing_mimes['dwg'] = 'application/acad';
  3.     $existing_mimes['dxf'] = 'image/x-dxf';
  4.     $existing_mimes['dwf'] = 'drawing/x-dwf';
  5.     return $existing_mimes;
  6. }
  7. add_filter('upload_mimes', 'wc_edit_upload_types');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement