Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- ttf as "application/x-font-ttf" or "application/x-font-truetype"
- otf as "application/x-font-opentype"
- woff as "application/font-woff"
- woff2 as "application/font-woff2" (proposed by W3C)
- eot as "application/vnd.ms-fontobject"
- */
- add_filter('upload_mimes', 'sator_mime_types', 10);
- function sator_mime_types($mime_types){
- $mime_types['ttf'] = "application/x-font-ttf";
- $mime_types['otf'] = "application/x-font-opentype";
- $mime_types['woff'] = "application/font-woff";
- $mime_types['woff2'] = "application/font-woff2";
- $mime_types['eot'] = "application/vnd.ms-fontobject";
- return $mime_types;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement