如何让WordPress支持上传更多文件类型
可以在functions.php中这样写:
1 2 3 4 5 6 7 8 9 | add_filter( 'upload_mimes' , 'wpdit_filter_mime_types' ); function wpdit_filter_mime_types( $mimes ) { $mimes [ 'ttf' ] = 'font/ttf' ; $mimes [ 'woff' ] = 'font/woff' ; $mimes [ 'svg' ] = 'font/svg' ; $mimes [ 'eot' ] = 'font/eot' ; return $mimes ; } |