Created
July 15, 2016 18:27
-
-
Save briankompanee/7db6660e2dcb67dcd387e251f8a74d8f to your computer and use it in GitHub Desktop.
WordPress: Add support for SOLIDWORKS (.sldprt) file type to be uploaded in Media Library
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Add support for SOLIDWORKS (.sldprt) file type to be uploaded in Media Library | |
* Add to functions.php | |
*/ | |
function solidworks_mime_types($mime_types){ | |
$mime_types['sldprt'] = 'application/octet-stream'; //Adding svg extension | |
return $mime_types; | |
} | |
add_filter('upload_mimes', 'solidworks_mime_types', 1, 1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment