我找到了这个很好的函数
<?php
function addUploadMimes($mimes) {
$mimes = array_merge($mimes, array(
\'tmbundle|tmCommand|tmDragCommand|tmSnippet|tmLanguage|tmPreferences\' => \'application/octet-stream\'
));
return $mimes;
}
add_filter(\'upload_mimes\', \'addUploadMimes\');
?>
通过在上添加文件类型,可以添加更多文件类型
"\'tmbundle|tmCommand|tmDragCommand|tmSnippet|tmLanguage|tmPreferences\'"
由管道(|)隔开