Duplicate Snippet
Embed Snippet on Your Site
Allow SVG Files Upload
Add support for SVG files to be uploaded in WordPress media.
Code Preview
php
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
Could I simply add other file types to this snippet to allow other files not permitted by WordPress? For example, most of my clients need CAD/CAM file types used in engineering and manufacturing. File types such as .dxf and .dwg. Could I simply add…
$upload_mimes[‘dxf’] = ‘image/x-dxf’;
$upload_mimes[‘dwg’] = ‘image/x-dwg’;