Upload font files

Add Allow the upload of font files (.ttf, .otf, .woff & .woff2) to WordPress media library.

// NAV: Upload font files
add_filter( 'upload_mimes', function( $mimes ) {
$mimes['woff']  = 'application/x-font-woff';
$mimes['woff2'] = 'application/x-font-woff2';
$mimes['ttf']   = 'application/x-font-ttf';
$mimes['svg']   = 'image/svg+xml';
$mimes['eot']   = 'application/vnd.ms-fontobject';
return $mimes;
} );