Add WordPerfect filetypes to Mimetype list. Props morganestes. Fixes #12849

git-svn-id: https://develop.svn.wordpress.org/trunk@14066 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse 2010-04-11 08:50:23 +00:00
parent 5c178eeef7
commit 74c1d4e71d
1 changed files with 4 additions and 2 deletions

View File

@ -2325,12 +2325,12 @@ function wp_ext2type( $ext ) {
$ext2type = apply_filters( 'ext2type', array(
'audio' => array( 'aac', 'ac3', 'aif', 'aiff', 'm3a', 'm4a', 'm4b', 'mka', 'mp1', 'mp2', 'mp3', 'ogg', 'oga', 'ram', 'wav', 'wma' ),
'video' => array( 'asf', 'avi', 'divx', 'dv', 'flv', 'm4v', 'mkv', 'mov', 'mp4', 'mpeg', 'mpg', 'mpv', 'ogm', 'ogv', 'qt', 'rm', 'vob', 'wmv' ),
'document' => array( 'doc', 'docx', 'docm', 'dotm', 'odt', 'pages', 'pdf', 'rtf' ),
'document' => array( 'doc', 'docx', 'docm', 'dotm', 'odt', 'pages', 'pdf', 'rtf', 'wp', 'wpd' ),
'spreadsheet' => array( 'numbers', 'ods', 'xls', 'xlsx', 'xlsb', 'xlsm' ),
'interactive' => array( 'key', 'ppt', 'pptx', 'pptm', 'odp', 'swf' ),
'text' => array( 'asc', 'csv', 'tsv', 'txt' ),
'archive' => array( 'bz2', 'cab', 'dmg', 'gz', 'rar', 'sea', 'sit', 'sqx', 'tar', 'tgz', 'zip' ),
'code' => array( 'css', 'html', 'php', 'js' ),
'code' => array( 'css', 'htm', 'html', 'php', 'js' ),
));
foreach ( $ext2type as $type => $exts )
if ( in_array( $ext, $exts ) )
@ -2435,6 +2435,8 @@ function get_allowed_mime_types() {
'odc' => 'application/vnd.oasis.opendocument.chart',
'odb' => 'application/vnd.oasis.opendocument.database',
'odf' => 'application/vnd.oasis.opendocument.formula',
// wordperfect formats
'wp|wpd' => 'application/wordperfect',
) );
}