Autoriser d’autres formats pour l’upload dans WordPress.

PHP
                    <?php 
function undfnd_add_upload_mimes( $mimes ) {
    // SVG
    $mimes['svg']  = 'image/svg+xml';

    // SVGZ allowed mime types.
    $mimes['svgz'] = 'application/x-gzip';

    // Word (.doc, .docx)
    $mimes['doc']  = 'application/msword';
    $mimes['docx']  = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document';

    // JSON
    $mimes['json'] = 'text/plain';

    // CSV
    $mimes['csv'] = 'text/csv';

    // Fonts
    $mimes['ttf']   = 'font/ttf';
    $mimes['woff']  = 'font/woff';
    $mimes['woff2'] = 'font/woff2';

    // Excel (xls, xlsx)
    $mimes['xls'] = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';
    $mimes['xlsx'] = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';

    // Optional. Remove a mime type.
    unset( $mimes['exe'] );

    return $mimes;
}
add_filter( 'upload_mimes', 'undfnd_add_upload_mimes' );