Created
February 21, 2020 23:35
-
-
Save lukebussey/79b54deeb3e499069c853b46589b63b9 to your computer and use it in GitHub Desktop.
Add Custom Font Formats to Divi 4
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
/* Mime Types Support */ | |
add_filter('upload_mimes', 'custom_mime_types', 999999); | |
function custom_mime_types($mimes) { | |
$mimes['otf'] = 'application/x-font-opentype'; | |
$mimes['woff'] = 'application/font-woff'; | |
$mimes['woff2'] = 'application/font-woff2'; | |
return $mimes; | |
} | |
/* Custom Font Types Support */ | |
add_filter('et_pb_supported_font_formats', 'custom_font_formats', 1); | |
function custom_font_formats() { | |
return array('otf', 'woff', 'woff2'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment