Чтобы отключить проверку типа файлов нужно добавить в wpconfig.php
define(‘ALLOW_UNFILTERED_UPLOADS’, true);
function enable_extended_upload ( $mime_types =array() ) {
// Список MIME-типов, разрешенных для загрузки в медиабиблиотеку. Можно добавлять свои...
$mime_types['exe'] = 'application/exe';
$mime_types['msi'] = 'application/msi';
$mime_types['lnk'] = 'application/x-ms-shortcut';
$mime_types['csv'] = 'text/csv';
$mime_types['rar'] = 'application/x-rar-compressed';
$mime_types['7z'] = 'application/x-7z-compressed';
$mime_types['zip'] = 'application/x-zip-compressed';
$mime_types['vsd'] = 'application/vnd.visio';
$mime_types['pps'] = 'application/vnd.ms-powerpoint';
$mime_types['ppsx'] = 'application/vnd.ms-powerpoint';
$mime_types['odp'] = 'application/vnd.oasis.opendocument.presentation';
$mime_types['ods'] = 'application/vnd.oasis.opendocument.spreadsheet';
$mime_types['odt'] = 'application/vnd.oasis.opendocument.text';
$mime_types['txt'] = 'text/plain';
return $mime_types;
}
add_filter('upload_mimes', 'enable_extended_upload');